eat-js-sdk 2.3.10 → 2.4.1

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.
@@ -2265,10 +2265,10 @@ function child(node, is_text) {
2265
2265
  if (child2 === null) {
2266
2266
  child2 = hydrate_node.appendChild(create_text());
2267
2267
  } else if (is_text && child2.nodeType !== TEXT_NODE) {
2268
- var text = create_text();
2269
- child2?.before(text);
2270
- set_hydrate_node(text);
2271
- return text;
2268
+ var text2 = create_text();
2269
+ child2?.before(text2);
2270
+ set_hydrate_node(text2);
2271
+ return text2;
2272
2272
  }
2273
2273
  set_hydrate_node(child2);
2274
2274
  return child2;
@@ -2286,10 +2286,10 @@ function first_child(fragment, is_text = false) {
2286
2286
  return first;
2287
2287
  }
2288
2288
  if (is_text && hydrate_node?.nodeType !== TEXT_NODE) {
2289
- var text = create_text();
2290
- hydrate_node?.before(text);
2291
- set_hydrate_node(text);
2292
- return text;
2289
+ var text2 = create_text();
2290
+ hydrate_node?.before(text2);
2291
+ set_hydrate_node(text2);
2292
+ return text2;
2293
2293
  }
2294
2294
  return hydrate_node;
2295
2295
  }
@@ -2305,14 +2305,14 @@ function sibling(node, count = 1, is_text = false) {
2305
2305
  return next_sibling;
2306
2306
  }
2307
2307
  if (is_text && next_sibling?.nodeType !== TEXT_NODE) {
2308
- var text = create_text();
2308
+ var text2 = create_text();
2309
2309
  if (next_sibling === null) {
2310
- last_sibling?.after(text);
2310
+ last_sibling?.after(text2);
2311
2311
  } else {
2312
- next_sibling.before(text);
2312
+ next_sibling.before(text2);
2313
2313
  }
2314
- set_hydrate_node(text);
2315
- return text;
2314
+ set_hydrate_node(text2);
2315
+ return text2;
2316
2316
  }
2317
2317
  set_hydrate_node(next_sibling);
2318
2318
  return (
@@ -3349,6 +3349,20 @@ function from_namespace(content, flags2, ns = "svg") {
3349
3349
  function from_svg(content, flags2) {
3350
3350
  return /* @__PURE__ */ from_namespace(content, flags2, "svg");
3351
3351
  }
3352
+ function text(value = "") {
3353
+ if (!hydrating) {
3354
+ var t2 = create_text(value + "");
3355
+ assign_nodes(t2, t2);
3356
+ return t2;
3357
+ }
3358
+ var node = hydrate_node;
3359
+ if (node.nodeType !== TEXT_NODE) {
3360
+ node.before(node = create_text());
3361
+ set_hydrate_node(node);
3362
+ }
3363
+ assign_nodes(node, node);
3364
+ return node;
3365
+ }
3352
3366
  function comment() {
3353
3367
  if (hydrating) {
3354
3368
  assign_nodes(hydrate_node, null);
@@ -3386,11 +3400,11 @@ function is_passive_event(name) {
3386
3400
  return PASSIVE_EVENTS.includes(name);
3387
3401
  }
3388
3402
  let should_intro = true;
3389
- function set_text(text, value) {
3403
+ function set_text(text2, value) {
3390
3404
  var str = value == null ? "" : typeof value === "object" ? value + "" : value;
3391
- if (str !== (text.__t ?? (text.__t = text.nodeValue))) {
3392
- text.__t = str;
3393
- text.nodeValue = str + "";
3405
+ if (str !== (text2.__t ?? (text2.__t = text2.nodeValue))) {
3406
+ text2.__t = str;
3407
+ text2.nodeValue = str + "";
3394
3408
  }
3395
3409
  }
3396
3410
  function mount(component2, options) {
@@ -5353,23 +5367,23 @@ function InvalidBanner($$anchor, $$props) {
5353
5367
  }
5354
5368
  };
5355
5369
  var p = root$m();
5356
- var text = child(p, true);
5370
+ var text2 = child(p, true);
5357
5371
  reset(p);
5358
- template_effect(() => set_text(text, bannerLabel()));
5372
+ template_effect(() => set_text(text2, bannerLabel()));
5359
5373
  append($$anchor, p);
5360
5374
  return pop($$exports);
5361
5375
  }
5362
5376
  create_custom_element(InvalidBanner, { bannerLabel: {} }, [], [], true);
5363
5377
  const interactionUtils = {
5364
5378
  // Text processing utilities
5365
- normalizeText: (text) => {
5366
- return text.trim().toLowerCase().replace(/\s+/g, " ");
5379
+ normalizeText: (text2) => {
5380
+ return text2.trim().toLowerCase().replace(/\s+/g, " ");
5367
5381
  },
5368
- removeDiacritics: (text) => {
5369
- return text.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
5382
+ removeDiacritics: (text2) => {
5383
+ return text2.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
5370
5384
  },
5371
- removePunctuation: (text) => {
5372
- return text.replace(/[^\w\s]/gi, "");
5385
+ removePunctuation: (text2) => {
5386
+ return text2.replace(/[^\w\s]/gi, "");
5373
5387
  },
5374
5388
  // Accessibility helpers
5375
5389
  announceToScreenReader: (message) => {
@@ -5435,6 +5449,9 @@ async function typesetMathJax(element) {
5435
5449
  } else if (typeof mathJax.typeset === "function") {
5436
5450
  mathJax.typeset([element]);
5437
5451
  }
5452
+ element.querySelectorAll("mjx-container").forEach((el) => {
5453
+ el.setAttribute("tabindex", "-1");
5454
+ });
5438
5455
  }
5439
5456
  var root_1$o = /* @__PURE__ */ from_html(`<div><!></div>`);
5440
5457
  function CommonStringToHtml($$anchor, $$props) {
@@ -5835,7 +5852,7 @@ function ResultIcon($$anchor, $$props) {
5835
5852
  return pop($$exports);
5836
5853
  }
5837
5854
  create_custom_element(ResultIcon, { isCorrect: {}, iconType: {}, parentProps: {} }, [], [], true);
5838
- var root_3$d = /* @__PURE__ */ from_html(`<span class="sr-only">Alert. &nbsp;</span>`);
5855
+ var root_3$c = /* @__PURE__ */ from_html(`<span class="sr-only">Alert. &nbsp;</span>`);
5839
5856
  var root_1$m = /* @__PURE__ */ from_html(`<div data-testid="feedback-alt"><!> <div><!> <span><!></span></div></div>`);
5840
5857
  function FeedbackAlert($$anchor, $$props) {
5841
5858
  push($$props, true);
@@ -5928,7 +5945,7 @@ function FeedbackAlert($$anchor, $$props) {
5928
5945
  var node_2 = child(div_1);
5929
5946
  {
5930
5947
  var consequent_1 = ($$anchor3) => {
5931
- var span = root_3$d();
5948
+ var span = root_3$c();
5932
5949
  append($$anchor3, span);
5933
5950
  };
5934
5951
  if_block(node_2, ($$render) => {
@@ -6398,11 +6415,11 @@ function fade(node, { delay = 0, duration = 400, easing = linear } = {}) {
6398
6415
  css: (t2) => `opacity: ${t2 * o2}`
6399
6416
  };
6400
6417
  }
6401
- var root_1$l = /* @__PURE__ */ from_html(`<div><div role="tooltip" data-testid="img-viewer-tt"> <span aria-hidden="true"></span></div></div>`);
6418
+ var root_1$l = /* @__PURE__ */ from_html(`<div><div role="tooltip" data-testid="img-viewer-tt"><!> <span aria-hidden="true"></span></div></div>`);
6402
6419
  var root$i = /* @__PURE__ */ from_html(`<div class="relative inline-block"><!> <!></div>`);
6403
6420
  function CommonTooltip($$anchor, $$props) {
6404
6421
  push($$props, true);
6405
- let text = prop($$props, "text", 7), placement = prop($$props, "placement", 7, "bottom"), open = prop($$props, "open", 7, void 0), disabled = prop($$props, "disabled", 7, false), trigger = prop($$props, "trigger", 7, "hover"), tooltipClass = prop($$props, "tooltipClass", 7, ""), showDelay = prop($$props, "showDelay", 7, 80), hideDelay = prop($$props, "hideDelay", 7, 120), children = prop($$props, "children", 7);
6422
+ let text2 = prop($$props, "text", 7), placement = prop($$props, "placement", 7, "bottom"), open = prop($$props, "open", 7, void 0), disabled = prop($$props, "disabled", 7, false), trigger = prop($$props, "trigger", 7, "hover"), tooltipClass = prop($$props, "tooltipClass", 7, ""), showDelay = prop($$props, "showDelay", 7, 80), hideDelay = prop($$props, "hideDelay", 7, 120), children = prop($$props, "children", 7);
6406
6423
  let internalOpen = /* @__PURE__ */ state(false);
6407
6424
  let showTimer = /* @__PURE__ */ state(null);
6408
6425
  let hideTimer = /* @__PURE__ */ state(null);
@@ -6514,10 +6531,10 @@ function CommonTooltip($$anchor, $$props) {
6514
6531
  show,
6515
6532
  hide,
6516
6533
  get text() {
6517
- return text();
6534
+ return text2();
6518
6535
  },
6519
6536
  set text($$value) {
6520
- text($$value);
6537
+ text2($$value);
6521
6538
  flushSync();
6522
6539
  },
6523
6540
  get placement() {
@@ -6593,8 +6610,13 @@ function CommonTooltip($$anchor, $$props) {
6593
6610
  var consequent = ($$anchor2) => {
6594
6611
  var div_1 = root_1$l();
6595
6612
  var div_2 = child(div_1);
6596
- var text_1 = child(div_2);
6597
- var span = sibling(text_1);
6613
+ var node_2 = child(div_2);
6614
+ CommonStringToHtml(node_2, {
6615
+ get htmlString() {
6616
+ return text2();
6617
+ }
6618
+ });
6619
+ var span = sibling(node_2, 2);
6598
6620
  reset(div_2);
6599
6621
  bind_this(div_2, ($$value) => set(bubbleEl, $$value), () => get$1(bubbleEl));
6600
6622
  reset(div_1);
@@ -6602,7 +6624,6 @@ function CommonTooltip($$anchor, $$props) {
6602
6624
  set_class(div_1, 1, `absolute z-50 pointer-events-none select-none ${get$1(containerPosClass) ?? ""}`);
6603
6625
  set_attribute(div_2, "aria-hidden", !get$1(isOpen));
6604
6626
  set_class(div_2, 1, `img-viewer-tt rounded-md bg-gray-900 text-white p-3 font-normal text-sm leading-[150%] max-w-[300px] break-words ${tooltipClass() ?? ""}`);
6605
- set_text(text_1, `${text() ?? ""} `);
6606
6627
  set_class(span, 1, `tooltip-arrow absolute w-2 h-2 bg-gray-900 ${get$1(arrowPosClass) ?? ""}`);
6607
6628
  });
6608
6629
  transition(3, div_1, () => fade, () => ({ duration: 40 }));
@@ -6960,12 +6981,13 @@ function useImageModalSize() {
6960
6981
  calculateStimulusImageLayout
6961
6982
  };
6962
6983
  }
6963
- var root_3$c = /* @__PURE__ */ from_html(`<span class="w-6 h-6 flex items-center justify-center"><!></span>`);
6964
- var root_4$7 = /* @__PURE__ */ from_html(`<span class="w-6 h-6 flex items-center justify-center"><!></span>`);
6965
- var root_5$9 = /* @__PURE__ */ from_html(`<div><span aria-hidden="true"><!></span></div>`);
6966
- var root_8$6 = /* @__PURE__ */ from_html(`<span class="w-4 h-4 flex items-center justify-center"><!></span>`);
6967
- var root_9$4 = /* @__PURE__ */ from_html(`<span class="w-4 h-4 flex items-center justify-center"><!></span>`);
6968
- var root_2$d = /* @__PURE__ */ from_html(`<div class="absolute inset-0 m-0"><div class="w-full h-full px-0 md:px-[82px] lg:px-[128px] pt-14 pb-[72px] relative lg:py-24 flex flex-col items-center justify-center"><div aria-live="polite" aria-atomic="true" class="sr-only"> </div> <div class="w-full h-full flex flex-col md:flex-row md:justify-center items-center justify-between"><div class="md:hidden"></div> <!> <!> <div><div class="flex-shrink-0 flex items-center justify-between py-1 px-2 md:px-4 border-border-minimal border rounded-t-md lg:rounded-t-lg md:gap-4 h-8.5 md:h-fit"><!> <!> <!></div> <div class="rounded-b-md"><img class="mx-auto block rounded-b-md lg:rounded-b-lg object-contain max-w-full max-h-[calc(100vh-168px-34px)] md:max-h-[calc(100vh-128px-54px)] lg:max-h-[calc(100vh-192px-54px)] pointer-events-none"/></div></div> <div class="md:hidden flex justify-center items-center gap-1 flex-shrink-0 h-6 mt-4"><!> <!></div></div></div></div>`);
6984
+ var root_4$8 = /* @__PURE__ */ from_html(`<span class="w-6 h-6 flex items-center justify-center"><!></span>`);
6985
+ var root_5$8 = /* @__PURE__ */ from_html(`<span class="w-6 h-6 flex items-center justify-center"><!></span>`);
6986
+ var root_7$5 = /* @__PURE__ */ from_html(`<span class="sr-only"><!></span>`);
6987
+ var root_6$5 = /* @__PURE__ */ from_html(`<div><!> <span aria-hidden="true"><!></span></div>`);
6988
+ var root_10$3 = /* @__PURE__ */ from_html(`<span class="w-4 h-4 flex items-center justify-center"><!></span>`);
6989
+ var root_11$2 = /* @__PURE__ */ from_html(`<span class="w-4 h-4 flex items-center justify-center"><!></span>`);
6990
+ var root_2$f = /* @__PURE__ */ from_html(`<div class="absolute inset-0 m-0"><div class="w-full h-full px-0 md:px-[82px] lg:px-[128px] pt-14 pb-[72px] relative lg:py-24 flex flex-col items-center justify-center"><div aria-live="polite" aria-atomic="true" class="sr-only"><!> <!></div> <div class="w-full h-full flex flex-col md:flex-row md:justify-center items-center justify-between"><div class="md:hidden"></div> <!> <!> <div><div class="flex-shrink-0 flex items-center justify-between py-1 px-2 md:px-4 border-border-minimal border rounded-t-md lg:rounded-t-lg md:gap-4 h-8.5 md:h-fit"><!> <!> <!></div> <div class="rounded-b-md"><img class="mx-auto block rounded-b-md lg:rounded-b-lg object-contain max-w-full max-h-[calc(100vh-168px-34px)] md:max-h-[calc(100vh-128px-54px)] lg:max-h-[calc(100vh-192px-54px)] pointer-events-none"/></div></div> <div class="md:hidden flex justify-center items-center gap-1 flex-shrink-0 h-6 mt-4"><!> <!></div></div></div></div>`);
6969
6991
  function MCQImageModal($$anchor, $$props) {
6970
6992
  push($$props, true);
6971
6993
  let isOpen = prop($$props, "isOpen", 7, false), options = prop($$props, "options", 23, () => []), currentIndex = prop($$props, "currentIndex", 7, 0), modalAriaLabel = prop($$props, "modalAriaLabel", 7, ""), onnavigate = prop($$props, "onnavigate", 7), onclose = prop($$props, "onclose", 7);
@@ -6979,7 +7001,8 @@ function MCQImageModal($$anchor, $$props) {
6979
7001
  let containerMaxWidth = /* @__PURE__ */ state("100%");
6980
7002
  let textElement = /* @__PURE__ */ state(null);
6981
7003
  let isTextTruncated = /* @__PURE__ */ state(false);
6982
- let navigationAnnouncement = /* @__PURE__ */ state("");
7004
+ let navigationAnswerRaw = /* @__PURE__ */ state("");
7005
+ let navigationAltText = /* @__PURE__ */ state("");
6983
7006
  let leftButtonDesktopEl = /* @__PURE__ */ state(null);
6984
7007
  let leftButtonMobileEl = /* @__PURE__ */ state(null);
6985
7008
  let isLeftPressed = /* @__PURE__ */ state(false);
@@ -7036,21 +7059,20 @@ function MCQImageModal($$anchor, $$props) {
7036
7059
  tick().then(checkTextTruncation);
7037
7060
  }
7038
7061
  });
7039
- const createNavigationAnnouncement = (option) => {
7040
- const answerText = option?.answer ? useRemoveRichTextHtmlTags(option.answer) : "";
7041
- const altText = option?.media?.alternative_text || "";
7042
- return `${answerText} , ${altText}`;
7062
+ const updateNavigationAnnouncement = (option) => {
7063
+ set(navigationAnswerRaw, option?.answer ?? "", true);
7064
+ set(navigationAltText, option?.media?.alternative_text ?? "", true);
7043
7065
  };
7044
7066
  const navigatePrevious = () => {
7045
7067
  if (!options() || options().length === 0) return;
7046
7068
  const newIndex = (currentIndex() - 1 + options().length) % options().length;
7047
- set(navigationAnnouncement, createNavigationAnnouncement(options()[newIndex]), true);
7069
+ updateNavigationAnnouncement(options()[newIndex]);
7048
7070
  onnavigate()?.({ index: newIndex });
7049
7071
  };
7050
7072
  const navigateNext = () => {
7051
7073
  if (!options() || options().length === 0) return;
7052
7074
  const newIndex = (currentIndex() + 1) % options().length;
7053
- set(navigationAnnouncement, createNavigationAnnouncement(options()[newIndex]), true);
7075
+ updateNavigationAnnouncement(options()[newIndex]);
7054
7076
  onnavigate()?.({ index: newIndex });
7055
7077
  };
7056
7078
  const closeModal = () => {
@@ -7085,7 +7107,7 @@ function MCQImageModal($$anchor, $$props) {
7085
7107
  };
7086
7108
  user_effect(() => {
7087
7109
  if (isOpen() && get$1(currentOption)) {
7088
- set(navigationAnnouncement, createNavigationAnnouncement(get$1(currentOption)), true);
7110
+ updateNavigationAnnouncement(get$1(currentOption));
7089
7111
  }
7090
7112
  });
7091
7113
  user_effect(() => {
@@ -7161,7 +7183,7 @@ function MCQImageModal($$anchor, $$props) {
7161
7183
  var fragment = comment();
7162
7184
  var node = first_child(fragment);
7163
7185
  {
7164
- var consequent = ($$anchor2) => {
7186
+ var consequent_2 = ($$anchor2) => {
7165
7187
  CommonModal($$anchor2, {
7166
7188
  get modalData() {
7167
7189
  return get$1(imageModalData);
@@ -7171,15 +7193,31 @@ function MCQImageModal($$anchor, $$props) {
7171
7193
  modalClass: "bg-charcoal/80 backdrop-blur-md pointer-events-none",
7172
7194
  dataTestId: "mcq-img-viewer-mdl",
7173
7195
  children: ($$anchor3, $$slotProps) => {
7174
- var div = root_2$d();
7196
+ var div = root_2$f();
7175
7197
  var div_1 = child(div);
7176
7198
  var div_2 = child(div_1);
7177
- var text = child(div_2, true);
7199
+ var node_1 = child(div_2);
7200
+ CommonStringToHtml(node_1, {
7201
+ get htmlString() {
7202
+ return get$1(navigationAnswerRaw);
7203
+ }
7204
+ });
7205
+ var node_2 = sibling(node_1, 2);
7206
+ {
7207
+ var consequent = ($$anchor4) => {
7208
+ var text$1 = text();
7209
+ template_effect(() => set_text(text$1, `, ${get$1(navigationAltText) ?? ""}`));
7210
+ append($$anchor4, text$1);
7211
+ };
7212
+ if_block(node_2, ($$render) => {
7213
+ if (get$1(navigationAltText)) $$render(consequent);
7214
+ });
7215
+ }
7178
7216
  reset(div_2);
7179
7217
  var div_3 = sibling(div_2, 2);
7180
- var node_1 = sibling(child(div_3), 2);
7218
+ var node_3 = sibling(child(div_3), 2);
7181
7219
  bind_this(
7182
- CommonButton(node_1, {
7220
+ CommonButton(node_3, {
7183
7221
  variant: "standard",
7184
7222
  transparent: true,
7185
7223
  ariaLabel: "Previous",
@@ -7190,9 +7228,9 @@ function MCQImageModal($$anchor, $$props) {
7190
7228
  dataTestId: "img-viewer-prev",
7191
7229
  onclick: navigatePrevious,
7192
7230
  children: ($$anchor4, $$slotProps2) => {
7193
- var span = root_3$c();
7194
- var node_2 = child(span);
7195
- SvgLoader(node_2, {
7231
+ var span = root_4$8();
7232
+ var node_4 = child(span);
7233
+ SvgLoader(node_4, {
7196
7234
  svgName: "smallChevronLeft",
7197
7235
  className: "text-primary-emphasis",
7198
7236
  width: 12,
@@ -7206,8 +7244,8 @@ function MCQImageModal($$anchor, $$props) {
7206
7244
  ($$value) => set(leftButtonDesktopEl, $$value, true),
7207
7245
  () => get$1(leftButtonDesktopEl)
7208
7246
  );
7209
- var node_3 = sibling(node_1, 2);
7210
- CommonButton(node_3, {
7247
+ var node_5 = sibling(node_3, 2);
7248
+ CommonButton(node_5, {
7211
7249
  variant: "standard",
7212
7250
  transparent: true,
7213
7251
  ariaLabel: "Next",
@@ -7218,9 +7256,9 @@ function MCQImageModal($$anchor, $$props) {
7218
7256
  dataTestId: "img-viewer-next",
7219
7257
  onclick: navigateNext,
7220
7258
  children: ($$anchor4, $$slotProps2) => {
7221
- var span_1 = root_4$7();
7222
- var node_4 = child(span_1);
7223
- SvgLoader(node_4, {
7259
+ var span_1 = root_5$8();
7260
+ var node_6 = child(span_1);
7261
+ SvgLoader(node_6, {
7224
7262
  svgName: "smallChevronRight",
7225
7263
  className: "text-primary-emphasis",
7226
7264
  width: 12,
@@ -7231,12 +7269,12 @@ function MCQImageModal($$anchor, $$props) {
7231
7269
  },
7232
7270
  $$slots: { default: true }
7233
7271
  });
7234
- var div_4 = sibling(node_3, 2);
7272
+ var div_4 = sibling(node_5, 2);
7235
7273
  var div_5 = child(div_4);
7236
- var node_5 = child(div_5);
7274
+ var node_7 = child(div_5);
7237
7275
  {
7238
7276
  let $0 = /* @__PURE__ */ user_derived(() => !get$1(isTextTruncated));
7239
- CommonTooltip(node_5, {
7277
+ CommonTooltip(node_7, {
7240
7278
  placement: "bottom",
7241
7279
  trigger: "hover",
7242
7280
  get disabled() {
@@ -7246,24 +7284,43 @@ function MCQImageModal($$anchor, $$props) {
7246
7284
  return get$1(fullAnswerText);
7247
7285
  },
7248
7286
  children: ($$anchor4, $$slotProps2) => {
7249
- var div_6 = root_5$9();
7250
- var span_2 = child(div_6);
7251
- var node_6 = child(span_2);
7287
+ var div_6 = root_6$5();
7288
+ var node_8 = child(div_6);
7289
+ {
7290
+ var consequent_1 = ($$anchor5) => {
7291
+ var span_2 = root_7$5();
7292
+ var node_9 = child(span_2);
7293
+ {
7294
+ let $02 = /* @__PURE__ */ user_derived(() => get$1(currentOption)?.answer);
7295
+ CommonStringToHtml(node_9, {
7296
+ get htmlString() {
7297
+ return get$1($02);
7298
+ }
7299
+ });
7300
+ }
7301
+ reset(span_2);
7302
+ append($$anchor5, span_2);
7303
+ };
7304
+ if_block(node_8, ($$render) => {
7305
+ if (get$1(isTextTruncated)) $$render(consequent_1);
7306
+ });
7307
+ }
7308
+ var span_3 = sibling(node_8, 2);
7309
+ var node_10 = child(span_3);
7252
7310
  {
7253
7311
  let $02 = /* @__PURE__ */ user_derived(() => get$1(currentOption)?.answer);
7254
- CommonStringToHtml(node_6, {
7312
+ CommonStringToHtml(node_10, {
7255
7313
  get htmlString() {
7256
7314
  return get$1($02);
7257
7315
  },
7258
7316
  dataTestId: "mcq-img-viewer-lbl"
7259
7317
  });
7260
7318
  }
7261
- reset(span_2);
7319
+ reset(span_3);
7262
7320
  reset(div_6);
7263
7321
  bind_this(div_6, ($$value) => set(textElement, $$value), () => get$1(textElement));
7264
7322
  template_effect(() => {
7265
7323
  set_attribute(div_6, "tabindex", get$1(isTextTruncated) ? 0 : void 0);
7266
- set_attribute(div_6, "aria-label", get$1(isTextTruncated) ? get$1(fullAnswerText) : void 0);
7267
7324
  set_class(div_6, 1, `break-all text-sm md:text-lg font-semibold text-primary-emphasis ${get$1(isTextTruncated) ? "hover:text-charcoal hover:underline hover:decoration-2 hover:underline-offset-[25%] focus-visible:bg-yellow-900 focus-visible:outline-none focus-visible:underline focus-visible:decoration-2 focus-visible:underline-offset-[25%] focus-visible:text-charcoal coarse:active:bg-yellow-900" : ""} select-none line-clamp-1`);
7268
7325
  });
7269
7326
  append($$anchor4, div_6);
@@ -7271,8 +7328,8 @@ function MCQImageModal($$anchor, $$props) {
7271
7328
  $$slots: { default: true }
7272
7329
  });
7273
7330
  }
7274
- var node_7 = sibling(node_5, 2);
7275
- CommonButton(node_7, {
7331
+ var node_11 = sibling(node_7, 2);
7332
+ CommonButton(node_11, {
7276
7333
  variant: "standard",
7277
7334
  ariaLabel: "Close",
7278
7335
  className: "flex-shrink-0 hidden md:flex",
@@ -7286,8 +7343,8 @@ function MCQImageModal($$anchor, $$props) {
7286
7343
  },
7287
7344
  $$slots: { default: true }
7288
7345
  });
7289
- var node_8 = sibling(node_7, 2);
7290
- CommonButton(node_8, {
7346
+ var node_12 = sibling(node_11, 2);
7347
+ CommonButton(node_12, {
7291
7348
  variant: "touch-target",
7292
7349
  ariaLabel: "Close",
7293
7350
  className: "flex-shrink-0 md:hidden -mr-2.5",
@@ -7308,9 +7365,9 @@ function MCQImageModal($$anchor, $$props) {
7308
7365
  reset(div_7);
7309
7366
  reset(div_4);
7310
7367
  var div_8 = sibling(div_4, 2);
7311
- var node_9 = child(div_8);
7368
+ var node_13 = child(div_8);
7312
7369
  bind_this(
7313
- CommonButton(node_9, {
7370
+ CommonButton(node_13, {
7314
7371
  variant: "touch-target",
7315
7372
  transparent: true,
7316
7373
  ariaLabel: "Previous",
@@ -7321,23 +7378,23 @@ function MCQImageModal($$anchor, $$props) {
7321
7378
  dataTestId: "img-viewer-prev",
7322
7379
  onclick: navigatePrevious,
7323
7380
  children: ($$anchor4, $$slotProps2) => {
7324
- var span_3 = root_8$6();
7325
- var node_10 = child(span_3);
7326
- SvgLoader(node_10, {
7381
+ var span_4 = root_10$3();
7382
+ var node_14 = child(span_4);
7383
+ SvgLoader(node_14, {
7327
7384
  svgName: "smallChevronLeft",
7328
7385
  className: "text-primary-emphasis",
7329
7386
  height: 7.43
7330
7387
  });
7331
- reset(span_3);
7332
- append($$anchor4, span_3);
7388
+ reset(span_4);
7389
+ append($$anchor4, span_4);
7333
7390
  },
7334
7391
  $$slots: { default: true }
7335
7392
  }),
7336
7393
  ($$value) => set(leftButtonMobileEl, $$value, true),
7337
7394
  () => get$1(leftButtonMobileEl)
7338
7395
  );
7339
- var node_11 = sibling(node_9, 2);
7340
- CommonButton(node_11, {
7396
+ var node_15 = sibling(node_13, 2);
7397
+ CommonButton(node_15, {
7341
7398
  variant: "touch-target",
7342
7399
  transparent: true,
7343
7400
  ariaLabel: "Next",
@@ -7348,15 +7405,15 @@ function MCQImageModal($$anchor, $$props) {
7348
7405
  dataTestId: "img-viewer-next",
7349
7406
  onclick: navigateNext,
7350
7407
  children: ($$anchor4, $$slotProps2) => {
7351
- var span_4 = root_9$4();
7352
- var node_12 = child(span_4);
7353
- SvgLoader(node_12, {
7408
+ var span_5 = root_11$2();
7409
+ var node_16 = child(span_5);
7410
+ SvgLoader(node_16, {
7354
7411
  svgName: "smallChevronRight",
7355
7412
  className: "text-primary-emphasis",
7356
7413
  height: 7.43
7357
7414
  });
7358
- reset(span_4);
7359
- append($$anchor4, span_4);
7415
+ reset(span_5);
7416
+ append($$anchor4, span_5);
7360
7417
  },
7361
7418
  $$slots: { default: true }
7362
7419
  });
@@ -7365,7 +7422,6 @@ function MCQImageModal($$anchor, $$props) {
7365
7422
  reset(div_1);
7366
7423
  reset(div);
7367
7424
  template_effect(() => {
7368
- set_text(text, get$1(navigationAnnouncement));
7369
7425
  set_class(div_4, 1, `bg-white rounded-lg flex flex-col max-w-full md:max-w-[calc(100vw-164px)] lg:max-w-[calc(100vw-248px)] max-h-[calc(100vh-168px)] md:max-h-[calc(100vh-128px)] lg:max-h-[calc(100vh-192px)] ${get$1(isImageLoaded) ? "" : "opacity-0"}`);
7370
7426
  set_style(div_4, `max-width: ${get$1(containerMaxWidth) ?? ""};`);
7371
7427
  set_attribute(img, "src", get$1(currentImageUrl));
@@ -7379,7 +7435,7 @@ function MCQImageModal($$anchor, $$props) {
7379
7435
  });
7380
7436
  };
7381
7437
  if_block(node, ($$render) => {
7382
- if (isOpen()) $$render(consequent);
7438
+ if (isOpen()) $$render(consequent_2);
7383
7439
  });
7384
7440
  }
7385
7441
  append($$anchor, fragment);
@@ -7559,10 +7615,10 @@ function InteractionSection($$anchor, $$props) {
7559
7615
  return pop($$exports);
7560
7616
  }
7561
7617
  create_custom_element(InteractionSection, { children: {} }, [], [], true);
7562
- var root_5$8 = /* @__PURE__ */ from_html(`<div></div>`);
7563
- var root_4$6 = /* @__PURE__ */ from_html(`<div class="px-4 w-full max-w-[1008px] mx-auto flex-shrink-0 text-center font-semibold text-sm md:text-lg leading-[150%] text-white" aria-hidden="true" data-testid="img-viewer-cap-txt"> </div> <!>`, 1);
7564
- var root_7$5 = /* @__PURE__ */ from_html(`<div></div>`);
7565
- var root_2$c = /* @__PURE__ */ from_html(`<div class="absolute inset-0"><div class="w-full h-full flex items-center justify-center pt-14 pb-[72px] lg:py-24"><div aria-live="polite" aria-atomic="true" class="sr-only"> </div> <div class="flex flex-col items-center overflow-y-auto overflow-x-hidden w-full px-0 md:px-6 lg:px-16"><div class="relative bg-white rounded-md md:rounded-lg shadow-sm overflow-hidden flex-shrink-0"><img class="block object-contain w-full h-auto max-w-full mx-auto"/> <!></div> <!></div></div></div>`);
7618
+ var root_5$7 = /* @__PURE__ */ from_html(`<div></div>`);
7619
+ var root_4$7 = /* @__PURE__ */ from_html(`<div class="px-4 w-full max-w-[1008px] mx-auto flex-shrink-0 text-center font-semibold text-sm md:text-lg leading-[150%] text-white" aria-hidden="true" data-testid="img-viewer-cap-txt"> </div> <!>`, 1);
7620
+ var root_7$4 = /* @__PURE__ */ from_html(`<div></div>`);
7621
+ var root_2$e = /* @__PURE__ */ from_html(`<div class="absolute inset-0"><div class="w-full h-full flex items-center justify-center pt-14 pb-[72px] lg:py-24"><div aria-live="polite" aria-atomic="true" class="sr-only"> </div> <div class="flex flex-col items-center overflow-y-auto overflow-x-hidden w-full px-0 md:px-6 lg:px-16"><div class="relative bg-white rounded-md md:rounded-lg shadow-sm overflow-hidden flex-shrink-0"><img class="block object-contain w-full h-auto max-w-full mx-auto"/> <!></div> <!></div></div></div>`);
7566
7622
  function PromptStimulusImageModal($$anchor, $$props) {
7567
7623
  push($$props, true);
7568
7624
  let isOpen = prop($$props, "isOpen", 7, false), imageUrl = prop($$props, "imageUrl", 7, ""), altText = prop($$props, "altText", 7, ""), caption = prop($$props, "caption", 7, ""), onclose = prop($$props, "onclose", 7);
@@ -7696,10 +7752,10 @@ function PromptStimulusImageModal($$anchor, $$props) {
7696
7752
  dataTestId: "img-viewer-mdl",
7697
7753
  onupdateModalSettings: updateModalSettings,
7698
7754
  children: ($$anchor3, $$slotProps) => {
7699
- var div = root_2$c();
7755
+ var div = root_2$e();
7700
7756
  var div_1 = child(div);
7701
7757
  var div_2 = child(div_1);
7702
- var text = child(div_2, true);
7758
+ var text2 = child(div_2, true);
7703
7759
  reset(div_2);
7704
7760
  var div_3 = sibling(div_2, 2);
7705
7761
  var div_4 = child(div_3);
@@ -7725,7 +7781,7 @@ function PromptStimulusImageModal($$anchor, $$props) {
7725
7781
  var node_2 = sibling(div_4, 2);
7726
7782
  {
7727
7783
  var consequent_1 = ($$anchor4) => {
7728
- var fragment_3 = root_4$6();
7784
+ var fragment_3 = root_4$7();
7729
7785
  var div_5 = first_child(fragment_3);
7730
7786
  var text_1 = child(div_5, true);
7731
7787
  reset(div_5);
@@ -7733,7 +7789,7 @@ function PromptStimulusImageModal($$anchor, $$props) {
7733
7789
  var node_3 = sibling(div_5, 2);
7734
7790
  {
7735
7791
  var consequent = ($$anchor5) => {
7736
- var div_6 = root_5$8();
7792
+ var div_6 = root_5$7();
7737
7793
  template_effect(() => set_style(div_6, `height:${get$1(bottomSpacerHeight) ?? ""}px`));
7738
7794
  append($$anchor5, div_6);
7739
7795
  };
@@ -7752,7 +7808,7 @@ function PromptStimulusImageModal($$anchor, $$props) {
7752
7808
  var node_4 = first_child(fragment_4);
7753
7809
  {
7754
7810
  var consequent_2 = ($$anchor5) => {
7755
- var div_7 = root_7$5();
7811
+ var div_7 = root_7$4();
7756
7812
  template_effect(() => set_style(div_7, `height:${get$1(bottomSpacerHeight) ?? ""}px`));
7757
7813
  append($$anchor5, div_7);
7758
7814
  };
@@ -7775,7 +7831,7 @@ function PromptStimulusImageModal($$anchor, $$props) {
7775
7831
  reset(div_1);
7776
7832
  reset(div);
7777
7833
  template_effect(() => {
7778
- set_text(text, get$1(modalAnnouncement));
7834
+ set_text(text2, get$1(modalAnnouncement));
7779
7835
  set_style(div_3, `max-height:${get$1(scrollMaxHeight) ?? ""}`);
7780
7836
  set_style(div_4, get$1(containerStyle));
7781
7837
  set_attribute(img, "src", imageUrl());
@@ -8215,9 +8271,9 @@ const getViewTemplate = (context) => templates.find((template) => template.match
8215
8271
  const shouldRenderSection = (section) => section.condition !== false;
8216
8272
  const getClassString = (classes = []) => classes.join(" ");
8217
8273
  const getStyleString = (styles = {}) => Object.entries(styles).map(([k, v]) => `${k}:${v}`).join(";");
8218
- var root_4$5 = /* @__PURE__ */ from_html(`<p class="text-lg leading-[22px] text-blue-1000 font-semibold mt-4" data-testid="img-cap-txt"> </p>`);
8219
- var root_5$7 = /* @__PURE__ */ from_html(`<div class="mt-6 w-full"><button class="flex items-center font-semibold leading-[1.5] outline-none group w-fit h-11 text-charcoal" aria-controls="long-description-content" aria-labelledby="image-description-label" type="button"><div class="w-6 h-6 flex items-center justify-center mr-2" data-testid="img-desc-txt"><!></div> <div id="image-description-label" class="image-description-accordion group-[.active]:border-b-2">Image Description</div></button> <div id="long-description-content" data-testid="img-desc-txt"><!></div></div>`);
8220
- var root_2$b = /* @__PURE__ */ from_html(`<div class="flex flex-col justify-center items-center text-center"><div class="flex flex-col items-center"><div class="relative inline-block"><img/> <!></div> <!></div></div> <!>`, 1);
8274
+ var root_4$6 = /* @__PURE__ */ from_html(`<p class="text-lg leading-[22px] text-blue-1000 font-semibold mt-4" data-testid="img-cap-txt"> </p>`);
8275
+ var root_5$6 = /* @__PURE__ */ from_html(`<div class="mt-6 w-full"><button class="flex items-center font-semibold leading-[1.5] outline-none group w-fit h-11 text-charcoal" aria-controls="long-description-content" aria-labelledby="image-description-label" type="button"><div class="w-6 h-6 flex items-center justify-center mr-2" data-testid="img-desc-txt"><!></div> <div id="image-description-label" class="image-description-accordion group-[.active]:border-b-2">Image Description</div></button> <div id="long-description-content" data-testid="img-desc-txt"><!></div></div>`);
8276
+ var root_2$d = /* @__PURE__ */ from_html(`<div class="flex flex-col justify-center items-center text-center"><div class="flex flex-col items-center"><div class="relative inline-block"><img/> <!></div> <!></div></div> <!>`, 1);
8221
8277
  var root_1$j = /* @__PURE__ */ from_html(`<div class="w-full"><!></div>`);
8222
8278
  function CommonMedia($$anchor, $$props) {
8223
8279
  push($$props, true);
@@ -8309,7 +8365,7 @@ function CommonMedia($$anchor, $$props) {
8309
8365
  var node_1 = child(div);
8310
8366
  {
8311
8367
  var consequent_2 = ($$anchor3) => {
8312
- var fragment_1 = root_2$b();
8368
+ var fragment_1 = root_2$d();
8313
8369
  var div_1 = first_child(fragment_1);
8314
8370
  var div_2 = child(div_1);
8315
8371
  var div_3 = child(div_2);
@@ -8334,10 +8390,10 @@ function CommonMedia($$anchor, $$props) {
8334
8390
  var node_3 = sibling(div_3, 2);
8335
8391
  {
8336
8392
  var consequent = ($$anchor4) => {
8337
- var p = root_4$5();
8338
- var text = child(p, true);
8393
+ var p = root_4$6();
8394
+ var text2 = child(p, true);
8339
8395
  reset(p);
8340
- template_effect(() => set_text(text, fileCaption()));
8396
+ template_effect(() => set_text(text2, fileCaption()));
8341
8397
  append($$anchor4, p);
8342
8398
  };
8343
8399
  if_block(node_3, ($$render) => {
@@ -8349,7 +8405,7 @@ function CommonMedia($$anchor, $$props) {
8349
8405
  var node_4 = sibling(div_1, 2);
8350
8406
  {
8351
8407
  var consequent_1 = ($$anchor4) => {
8352
- var div_4 = root_5$7();
8408
+ var div_4 = root_5$6();
8353
8409
  var button = child(div_4);
8354
8410
  button.__click = toggleLongDescription;
8355
8411
  button.__keydown = handleKeyDown;
@@ -8437,12 +8493,12 @@ create_custom_element(
8437
8493
  [],
8438
8494
  true
8439
8495
  );
8440
- var root_4$4 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-txt-ctr"><!></div>`);
8441
- var root_5$6 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-img-ctr"><!></div>`);
8496
+ var root_4$5 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-txt-ctr"><!></div>`);
8497
+ var root_5$5 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-img-ctr"><!></div>`);
8442
8498
  var root_3$b = /* @__PURE__ */ from_html(`<!> <!>`, 1);
8443
- var root_7$4 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-img-ctr"><!></div>`);
8444
- var root_8$5 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-txt-ctr"><!></div>`);
8445
- var root_6$3 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
8499
+ var root_7$3 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-img-ctr"><!></div>`);
8500
+ var root_8$7 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-txt-ctr"><!></div>`);
8501
+ var root_6$4 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
8446
8502
  var root_1$i = /* @__PURE__ */ from_html(`<div class="stimulus-section flex flex-col w-full"><!> <div><!></div></div>`);
8447
8503
  function StimulusSection($$anchor, $$props) {
8448
8504
  push($$props, true);
@@ -8535,7 +8591,7 @@ function StimulusSection($$anchor, $$props) {
8535
8591
  var node_3 = first_child(fragment_2);
8536
8592
  {
8537
8593
  var consequent_1 = ($$anchor4) => {
8538
- var div_2 = root_4$4();
8594
+ var div_2 = root_4$5();
8539
8595
  var node_4 = child(div_2);
8540
8596
  CommonStringToHtml(node_4, {
8541
8597
  get htmlString() {
@@ -8556,7 +8612,7 @@ function StimulusSection($$anchor, $$props) {
8556
8612
  var node_5 = sibling(node_3, 2);
8557
8613
  {
8558
8614
  var consequent_2 = ($$anchor4) => {
8559
- var div_3 = root_5$6();
8615
+ var div_3 = root_5$5();
8560
8616
  let classes_2;
8561
8617
  var node_6 = child(div_3);
8562
8618
  CommonMedia(node_6, {
@@ -8591,11 +8647,11 @@ function StimulusSection($$anchor, $$props) {
8591
8647
  append($$anchor3, fragment_2);
8592
8648
  };
8593
8649
  var alternate = ($$anchor3) => {
8594
- var fragment_3 = root_6$3();
8650
+ var fragment_3 = root_6$4();
8595
8651
  var node_7 = first_child(fragment_3);
8596
8652
  {
8597
8653
  var consequent_4 = ($$anchor4) => {
8598
- var div_4 = root_7$4();
8654
+ var div_4 = root_7$3();
8599
8655
  let classes_3;
8600
8656
  var node_8 = child(div_4);
8601
8657
  CommonMedia(node_8, {
@@ -8630,7 +8686,7 @@ function StimulusSection($$anchor, $$props) {
8630
8686
  var node_9 = sibling(node_7, 2);
8631
8687
  {
8632
8688
  var consequent_5 = ($$anchor4) => {
8633
- var div_5 = root_8$5();
8689
+ var div_5 = root_8$7();
8634
8690
  var node_10 = child(div_5);
8635
8691
  CommonStringToHtml(node_10, {
8636
8692
  get htmlString() {
@@ -8679,8 +8735,8 @@ create_custom_element(
8679
8735
  [],
8680
8736
  true
8681
8737
  );
8682
- var root_8$4 = /* @__PURE__ */ from_html(`<div class="divider my-6"></div>`);
8683
- var root_13$2 = /* @__PURE__ */ from_html(`<div class="divider my-6"></div>`);
8738
+ var root_8$6 = /* @__PURE__ */ from_html(`<div class="divider my-6"></div>`);
8739
+ var root_13$3 = /* @__PURE__ */ from_html(`<div class="divider my-6"></div>`);
8684
8740
  var root_15$1 = /* @__PURE__ */ from_html(`<div aria-live="polite"><!></div>`);
8685
8741
  var root_1$h = /* @__PURE__ */ from_html(`<div><!></div>`);
8686
8742
  var root_16$2 = /* @__PURE__ */ from_html(`<div><!></div>`);
@@ -8858,7 +8914,7 @@ function PromptContainer($$anchor, $$props) {
8858
8914
  var node_3 = first_child(fragment_6);
8859
8915
  {
8860
8916
  var consequent_3 = ($$anchor6) => {
8861
- var div_4 = root_8$4();
8917
+ var div_4 = root_8$6();
8862
8918
  append($$anchor6, div_4);
8863
8919
  };
8864
8920
  var alternate_2 = ($$anchor6) => {
@@ -8881,7 +8937,7 @@ function PromptContainer($$anchor, $$props) {
8881
8937
  var node_6 = first_child(fragment_10);
8882
8938
  {
8883
8939
  var consequent_5 = ($$anchor8) => {
8884
- var div_5 = root_13$2();
8940
+ var div_5 = root_13$3();
8885
8941
  append($$anchor8, div_5);
8886
8942
  };
8887
8943
  var alternate = ($$anchor8) => {
@@ -9067,15 +9123,18 @@ create_custom_element(
9067
9123
  [],
9068
9124
  true
9069
9125
  );
9070
- var root_1$g = /* @__PURE__ */ from_html(`<span> </span>`);
9071
- var root_2$a = /* @__PURE__ */ from_html(`<span>Missing answer</span>`);
9072
- var root_3$a = /* @__PURE__ */ from_html(`<p>Missing answer</p>`);
9073
- var root_4$3 = /* @__PURE__ */ from_html(`<p class="text-red-400 text-sm font-semibold leading-[1.3] pr-2.5 hidden md:block"> </p>`);
9074
- var root_5$5 = /* @__PURE__ */ from_html(`<span aria-hidden="true"><!></span>`);
9075
- var root_9$3 = /* @__PURE__ */ from_html(`<span class="w-3 h-2 flex items-center justify-center"><!></span>`);
9076
- var root_8$3 = /* @__PURE__ */ from_html(`<span><!></span>`);
9077
- var root_10$3 = /* @__PURE__ */ from_html(`<div class="w-full overflow-hidden bg-white rounded-b-lg flex items-center justify-center relative"><img class="mcq-opt-img min-h-[154px] max-h-[184px] w-auto max-w-full object-contain pointer-events-none" data-testid="mcq-opt-img" loading="lazy"/></div>`);
9078
- var root$e = /* @__PURE__ */ from_html(`<div class="relative"><button><span><span class="flex items-center justify-between w-full"><span class="flex items-center"><span> </span> <span class="flex flex-col px-3 text-left"><!> <!> <!></span></span> <span class="flex items-center"><!> <!> <!> <!></span></span></span> <!></button> <!></div>`);
9126
+ var root_1$g = /* @__PURE__ */ from_html(`<div class="sr-only" tabindex="-1"><!></div>`);
9127
+ var root_2$c = /* @__PURE__ */ from_html(`<span> </span>`);
9128
+ var root_3$a = /* @__PURE__ */ from_html(`<span>Missing answer</span>`);
9129
+ var root_4$4 = /* @__PURE__ */ from_html(`<span class="sr-only"> </span>`);
9130
+ var root_5$4 = /* @__PURE__ */ from_html(`<span class="sr-only"> </span>`);
9131
+ var root_6$3 = /* @__PURE__ */ from_html(`<p>Missing answer</p>`);
9132
+ var root_7$2 = /* @__PURE__ */ from_html(`<p class="text-red-400 text-sm font-semibold leading-[1.3] pr-2.5 hidden md:block"> </p>`);
9133
+ var root_8$5 = /* @__PURE__ */ from_html(`<span aria-hidden="true"><!></span>`);
9134
+ var root_12$3 = /* @__PURE__ */ from_html(`<span class="w-3 h-2 flex items-center justify-center"><!></span>`);
9135
+ var root_11$1 = /* @__PURE__ */ from_html(`<span><!></span>`);
9136
+ var root_13$2 = /* @__PURE__ */ from_html(`<div class="w-full overflow-hidden bg-white rounded-b-lg flex items-center justify-center relative"><img class="mcq-opt-img min-h-[154px] max-h-[184px] w-auto max-w-full object-contain pointer-events-none" data-testid="mcq-opt-img" loading="lazy"/></div>`);
9137
+ var root$e = /* @__PURE__ */ from_html(`<div class="relative"><!> <button><span><span class="flex items-center justify-between w-full"><span class="flex items-center"><span aria-hidden="true"> </span> <span class="flex flex-col px-3 text-left"><!> <!> <!> <!> <!></span></span> <span class="flex items-center"><!> <!> <!> <!></span></span></span> <!></button> <!></div>`);
9079
9138
  function MCQOption($$anchor, $$props) {
9080
9139
  push($$props, true);
9081
9140
  let option = prop($$props, "option", 7), index2 = prop($$props, "index", 7), config = prop($$props, "config", 7), state2 = prop($$props, "state", 7), optionHasMedia = prop($$props, "optionHasMedia", 7, false), onOptionClick = prop($$props, "onOptionClick", 7), onExpandImage = prop($$props, "onExpandImage", 7);
@@ -9086,10 +9145,27 @@ function MCQOption($$anchor, $$props) {
9086
9145
  let mode = /* @__PURE__ */ user_derived(() => get$1(sharedState).mode);
9087
9146
  let isPreviewMode2 = /* @__PURE__ */ user_derived(() => get$1(mode) === MODES.PREVIEW);
9088
9147
  let isInteractiveMode2 = /* @__PURE__ */ user_derived(() => get$1(mode) === MODES.INTERACTIVE);
9089
- const getAriaLabel = () => {
9090
- if (!get$1(optionState)) {
9091
- return `Option ${useAlphabetEquivalent(index2())}: ${useRemoveRichTextHtmlTags(option().answer)}`;
9148
+ let optionHasMath = /* @__PURE__ */ user_derived(() => hasMathJax(option().answer));
9149
+ let labelPrefix = /* @__PURE__ */ user_derived(() => (() => {
9150
+ const isSelected = (!get$1(optionState)?.isFinished || get$1(isInteractiveMode2)) && (get$1(optionState)?.isSelected ?? false);
9151
+ return `${isSelected ? "Selected " : ""}Option ${useAlphabetEquivalent(index2())}: `;
9152
+ })());
9153
+ let labelSuffix = /* @__PURE__ */ user_derived(() => (() => {
9154
+ if (!get$1(optionState)) return "";
9155
+ const selectedOptions = state2().data.selectedOptions ?? [];
9156
+ if (get$1(optionState).isFinished && !get$1(isPreviewMode2) && !get$1(isInteractiveMode2)) {
9157
+ if (get$1(optionState).isCorrect) return get$1(optionState).isSelected ? "(Correct answer)" : "(Missing Answer)";
9158
+ if (get$1(optionState).isSelected) return "(Incorrect answer)";
9159
+ } else if (get$1(isPreviewMode2) && !get$1(isInteractiveMode2)) {
9160
+ if (get$1(optionState).isCorrect) return "(Correct answer)";
9161
+ } else if (get$1(isInteractiveMode2) && selectedOptions.length === get$1(totalCorrectAnswers)) {
9162
+ if (get$1(optionState).isSelected) return get$1(optionState).isCorrect ? "(Correct answer)" : "(Incorrect answer)";
9163
+ if (get$1(optionState).isCorrect) return "(Missing Answer)";
9092
9164
  }
9165
+ return "";
9166
+ })());
9167
+ function getAriaLabel() {
9168
+ if (!get$1(optionState)) return `Option ${useAlphabetEquivalent(index2())}: ${useRemoveRichTextHtmlTags(option().answer)}`;
9093
9169
  const selectedOptions = state2().data.selectedOptions ?? [];
9094
9170
  let label = `${(!get$1(optionState).isFinished || get$1(isInteractiveMode2)) && get$1(optionState).isSelected ? "Selected " : ""}Option ${useAlphabetEquivalent(index2())}: ${useRemoveRichTextHtmlTags(option().answer)}`;
9095
9171
  if (get$1(optionState).isFinished && !get$1(isPreviewMode2) && !get$1(isInteractiveMode2)) {
@@ -9110,8 +9186,11 @@ function MCQOption($$anchor, $$props) {
9110
9186
  }
9111
9187
  }
9112
9188
  return label;
9113
- };
9114
- let ariaLabel = /* @__PURE__ */ user_derived(() => get$1(optionState) ? getAriaLabel() : `Option ${useAlphabetEquivalent(index2())}: ${useRemoveRichTextHtmlTags(option().answer)}`);
9189
+ }
9190
+ let ariaLabel = /* @__PURE__ */ user_derived(() => get$1(optionHasMath) ? null : getAriaLabel());
9191
+ let mathLabelId = `mcq-opt-math-label-${index2()}`;
9192
+ let mathAriaLabelledBy = /* @__PURE__ */ user_derived(() => get$1(optionHasMath) && get$1(optionState)?.isSelected ? mathLabelId : null);
9193
+ let mathLabelString = /* @__PURE__ */ user_derived(() => `${get$1(labelPrefix)}${option().answer}${get$1(labelSuffix) ? " " + get$1(labelSuffix) : ""}`);
9115
9194
  var $$exports = {
9116
9195
  get option() {
9117
9196
  return option();
@@ -9164,19 +9243,37 @@ function MCQOption($$anchor, $$props) {
9164
9243
  }
9165
9244
  };
9166
9245
  var div = root$e();
9167
- var button = child(div);
9246
+ var node = child(div);
9247
+ {
9248
+ var consequent = ($$anchor2) => {
9249
+ var div_1 = root_1$g();
9250
+ var node_1 = child(div_1);
9251
+ CommonStringToHtml(node_1, {
9252
+ get htmlString() {
9253
+ return get$1(mathLabelString);
9254
+ }
9255
+ });
9256
+ reset(div_1);
9257
+ template_effect(() => set_attribute(div_1, "id", mathLabelId));
9258
+ append($$anchor2, div_1);
9259
+ };
9260
+ if_block(node, ($$render) => {
9261
+ if (get$1(optionHasMath) && get$1(optionState)?.isSelected) $$render(consequent);
9262
+ });
9263
+ }
9264
+ var button = sibling(node, 2);
9168
9265
  button.__click = () => onOptionClick()(option().id, option().answer);
9169
9266
  var span = child(button);
9170
9267
  var span_1 = child(span);
9171
9268
  var span_2 = child(span_1);
9172
9269
  var span_3 = child(span_2);
9173
- var text = child(span_3, true);
9270
+ var text2 = child(span_3, true);
9174
9271
  reset(span_3);
9175
9272
  var span_4 = sibling(span_3, 2);
9176
- var node = child(span_4);
9273
+ var node_2 = child(span_4);
9177
9274
  {
9178
- var consequent = ($$anchor2) => {
9179
- var span_5 = root_1$g();
9275
+ var consequent_1 = ($$anchor2) => {
9276
+ var span_5 = root_2$c();
9180
9277
  var text_1 = child(span_5, true);
9181
9278
  reset(span_5);
9182
9279
  template_effect(() => {
@@ -9186,64 +9283,90 @@ function MCQOption($$anchor, $$props) {
9186
9283
  });
9187
9284
  append($$anchor2, span_5);
9188
9285
  };
9189
- if_block(node, ($$render) => {
9190
- if (get$1(optionState)?.showStudentLabel && !get$1(correctAnswerIds).includes(option().id)) $$render(consequent);
9286
+ if_block(node_2, ($$render) => {
9287
+ if (get$1(optionState)?.showStudentLabel && !get$1(correctAnswerIds).includes(option().id)) $$render(consequent_1);
9191
9288
  });
9192
9289
  }
9193
- var node_1 = sibling(node, 2);
9290
+ var node_3 = sibling(node_2, 2);
9194
9291
  {
9195
- var consequent_1 = ($$anchor2) => {
9196
- var span_6 = root_2$a();
9292
+ var consequent_2 = ($$anchor2) => {
9293
+ var span_6 = root_3$a();
9197
9294
  template_effect(() => set_class(span_6, 1, `text-green-750 text-sm mb-0.5 font-semibold leading-[1.3]
9198
9295
  ${optionHasMedia() ? "" : "md:hidden"}`));
9199
9296
  append($$anchor2, span_6);
9200
9297
  };
9201
- if_block(node_1, ($$render) => {
9202
- if (get$1(optionState)?.showMissingAnswerLabel) $$render(consequent_1);
9298
+ if_block(node_3, ($$render) => {
9299
+ if (get$1(optionState)?.showMissingAnswerLabel) $$render(consequent_2);
9203
9300
  });
9204
9301
  }
9205
- var node_2 = sibling(node_1, 2);
9206
- CommonStringToHtml(node_2, {
9302
+ var node_4 = sibling(node_3, 2);
9303
+ {
9304
+ var consequent_3 = ($$anchor2) => {
9305
+ var span_7 = root_4$4();
9306
+ var text_2 = child(span_7, true);
9307
+ reset(span_7);
9308
+ template_effect(() => set_text(text_2, get$1(labelPrefix)));
9309
+ append($$anchor2, span_7);
9310
+ };
9311
+ if_block(node_4, ($$render) => {
9312
+ if (get$1(optionHasMath)) $$render(consequent_3);
9313
+ });
9314
+ }
9315
+ var node_5 = sibling(node_4, 2);
9316
+ CommonStringToHtml(node_5, {
9207
9317
  otherClass: "overflow-hidden text-ellipsis line-clamp-3",
9208
9318
  get htmlString() {
9209
9319
  return option().answer;
9210
9320
  }
9211
9321
  });
9322
+ var node_6 = sibling(node_5, 2);
9323
+ {
9324
+ var consequent_4 = ($$anchor2) => {
9325
+ var span_8 = root_5$4();
9326
+ var text_3 = child(span_8, true);
9327
+ reset(span_8);
9328
+ template_effect(() => set_text(text_3, get$1(labelSuffix)));
9329
+ append($$anchor2, span_8);
9330
+ };
9331
+ if_block(node_6, ($$render) => {
9332
+ if (get$1(optionHasMath) && get$1(labelSuffix)) $$render(consequent_4);
9333
+ });
9334
+ }
9212
9335
  reset(span_4);
9213
9336
  reset(span_2);
9214
- var span_7 = sibling(span_2, 2);
9215
- var node_3 = child(span_7);
9337
+ var span_9 = sibling(span_2, 2);
9338
+ var node_7 = child(span_9);
9216
9339
  {
9217
- var consequent_2 = ($$anchor2) => {
9218
- var p = root_3$a();
9340
+ var consequent_5 = ($$anchor2) => {
9341
+ var p = root_6$3();
9219
9342
  template_effect(() => set_class(p, 1, `text-green-750 text-sm font-semibold leading-[1.3] hidden md:block
9220
9343
  ${get$1(totalCorrectAnswers) > 1 ? "pr-2.5" : ""}`));
9221
9344
  append($$anchor2, p);
9222
9345
  };
9223
- if_block(node_3, ($$render) => {
9224
- if (get$1(optionState)?.showMissingAnswerLabel && !optionHasMedia()) $$render(consequent_2);
9346
+ if_block(node_7, ($$render) => {
9347
+ if (get$1(optionState)?.showMissingAnswerLabel && !optionHasMedia()) $$render(consequent_5);
9225
9348
  });
9226
9349
  }
9227
- var node_4 = sibling(node_3, 2);
9350
+ var node_8 = sibling(node_7, 2);
9228
9351
  {
9229
- var consequent_3 = ($$anchor2) => {
9230
- var p_1 = root_4$3();
9231
- var text_2 = child(p_1, true);
9352
+ var consequent_6 = ($$anchor2) => {
9353
+ var p_1 = root_7$2();
9354
+ var text_4 = child(p_1, true);
9232
9355
  reset(p_1);
9233
- template_effect(() => set_text(text_2, get$1(isInteractiveMode2) ? "Your answer" : get$1(isPreviewMode2) ? "" : "Student's answer"));
9356
+ template_effect(() => set_text(text_4, get$1(isInteractiveMode2) ? "Your answer" : get$1(isPreviewMode2) ? "" : "Student's answer"));
9234
9357
  append($$anchor2, p_1);
9235
9358
  };
9236
- if_block(node_4, ($$render) => {
9237
- if (get$1(optionState)?.showStudentLabel && !get$1(correctAnswerIds).includes(option().id) && !optionHasMedia()) $$render(consequent_3);
9359
+ if_block(node_8, ($$render) => {
9360
+ if (get$1(optionState)?.showStudentLabel && !get$1(correctAnswerIds).includes(option().id) && !optionHasMedia()) $$render(consequent_6);
9238
9361
  });
9239
9362
  }
9240
- var node_5 = sibling(node_4, 2);
9363
+ var node_9 = sibling(node_8, 2);
9241
9364
  {
9242
- var consequent_5 = ($$anchor2) => {
9243
- var span_8 = root_5$5();
9244
- var node_6 = child(span_8);
9365
+ var consequent_8 = ($$anchor2) => {
9366
+ var span_10 = root_8$5();
9367
+ var node_10 = child(span_10);
9245
9368
  {
9246
- var consequent_4 = ($$anchor3) => {
9369
+ var consequent_7 = ($$anchor3) => {
9247
9370
  SvgLoader($$anchor3, {
9248
9371
  svgName: "successSolid",
9249
9372
  className: "correct-icon",
@@ -9257,74 +9380,74 @@ function MCQOption($$anchor, $$props) {
9257
9380
  dataTestId: "icon-incorrect"
9258
9381
  });
9259
9382
  };
9260
- if_block(node_6, ($$render) => {
9261
- if (get$1(correctAnswerIds).includes(option().id) || get$1(isPreviewMode2) && !get$1(isInteractiveMode2)) $$render(consequent_4);
9383
+ if_block(node_10, ($$render) => {
9384
+ if (get$1(correctAnswerIds).includes(option().id) || get$1(isPreviewMode2) && !get$1(isInteractiveMode2)) $$render(consequent_7);
9262
9385
  else $$render(alternate, false);
9263
9386
  });
9264
9387
  }
9265
- reset(span_8);
9266
- template_effect(($0) => set_class(span_8, 1, `${$0 ?? ""} p-0.5`), [
9388
+ reset(span_10);
9389
+ template_effect(($0) => set_class(span_10, 1, `${$0 ?? ""} p-0.5`), [
9267
9390
  () => get$1(correctAnswerIds).includes(option().id) || get$1(isPreviewMode2) && !get$1(isInteractiveMode2) ? "text-green-700" : "text-red-850"
9268
9391
  ]);
9269
- append($$anchor2, span_8);
9392
+ append($$anchor2, span_10);
9270
9393
  };
9271
- if_block(node_5, ($$render) => {
9272
- if (get$1(optionState)?.showResultIcon) $$render(consequent_5);
9394
+ if_block(node_9, ($$render) => {
9395
+ if (get$1(optionState)?.showResultIcon) $$render(consequent_8);
9273
9396
  });
9274
9397
  }
9275
- var node_7 = sibling(node_5, 2);
9398
+ var node_11 = sibling(node_9, 2);
9276
9399
  {
9277
- var consequent_7 = ($$anchor2) => {
9278
- var span_9 = root_8$3();
9279
- var node_8 = child(span_9);
9400
+ var consequent_10 = ($$anchor2) => {
9401
+ var span_11 = root_11$1();
9402
+ var node_12 = child(span_11);
9280
9403
  {
9281
- var consequent_6 = ($$anchor3) => {
9282
- var span_10 = root_9$3();
9283
- var node_9 = child(span_10);
9284
- SvgLoader(node_9, {
9404
+ var consequent_9 = ($$anchor3) => {
9405
+ var span_12 = root_12$3();
9406
+ var node_13 = child(span_12);
9407
+ SvgLoader(node_13, {
9285
9408
  svgName: "successRounded",
9286
9409
  className: "selected-icon",
9287
9410
  dataTestId: "icon-check-selected"
9288
9411
  });
9289
- reset(span_10);
9290
- append($$anchor3, span_10);
9412
+ reset(span_12);
9413
+ append($$anchor3, span_12);
9291
9414
  };
9292
- if_block(node_8, ($$render) => {
9293
- if (get$1(optionState)?.isSelected) $$render(consequent_6);
9415
+ if_block(node_12, ($$render) => {
9416
+ if (get$1(optionState)?.isSelected) $$render(consequent_9);
9294
9417
  });
9295
9418
  }
9296
- reset(span_9);
9297
- template_effect(() => set_class(span_9, 1, clsx(get$1(optionState)?.checkboxClasses || "custom-checkbox border-gray-850")));
9298
- append($$anchor2, span_9);
9419
+ reset(span_11);
9420
+ template_effect(() => set_class(span_11, 1, clsx(get$1(optionState)?.checkboxClasses || "custom-checkbox border-gray-850")));
9421
+ append($$anchor2, span_11);
9299
9422
  };
9300
- if_block(node_7, ($$render) => {
9301
- if (get$1(optionState)?.showCheckbox) $$render(consequent_7);
9423
+ if_block(node_11, ($$render) => {
9424
+ if (get$1(optionState)?.showCheckbox) $$render(consequent_10);
9302
9425
  });
9303
9426
  }
9304
- reset(span_7);
9427
+ reset(span_9);
9305
9428
  reset(span_1);
9306
9429
  reset(span);
9307
- var node_10 = sibling(span, 2);
9430
+ var node_14 = sibling(span, 2);
9308
9431
  {
9309
- var consequent_8 = ($$anchor2) => {
9310
- var div_1 = root_10$3();
9311
- var img = child(div_1);
9312
- reset(div_1);
9432
+ var consequent_11 = ($$anchor2) => {
9433
+ var div_2 = root_13$2();
9434
+ var img = child(div_2);
9435
+ reset(div_2);
9313
9436
  template_effect(() => {
9314
9437
  set_attribute(img, "id", `img-${index2() ?? ""}`);
9315
9438
  set_attribute(img, "alt", `Graphic, ${(option().media?.alternative_text || "") ?? ""}`);
9316
9439
  set_attribute(img, "src", option().media.file.url);
9317
9440
  });
9318
- append($$anchor2, div_1);
9441
+ append($$anchor2, div_2);
9319
9442
  };
9320
- if_block(node_10, ($$render) => {
9321
- if (optionHasMedia() && option().media) $$render(consequent_8);
9443
+ if_block(node_14, ($$render) => {
9444
+ if (optionHasMedia() && option().media) $$render(consequent_11);
9322
9445
  });
9323
9446
  }
9324
9447
  reset(button);
9325
- var node_11 = sibling(button, 2);
9448
+ var node_15 = sibling(button, 2);
9326
9449
  {
9327
- var consequent_9 = ($$anchor2) => {
9450
+ var consequent_12 = ($$anchor2) => {
9328
9451
  CommonButton($$anchor2, {
9329
9452
  variant: "touch-target",
9330
9453
  ariaLabel: "Expand image",
@@ -9345,8 +9468,8 @@ function MCQOption($$anchor, $$props) {
9345
9468
  $$slots: { default: true }
9346
9469
  });
9347
9470
  };
9348
- if_block(node_11, ($$render) => {
9349
- if (optionHasMedia()) $$render(consequent_9);
9471
+ if_block(node_15, ($$render) => {
9472
+ if (optionHasMedia()) $$render(consequent_12);
9350
9473
  });
9351
9474
  }
9352
9475
  reset(div);
@@ -9358,11 +9481,12 @@ function MCQOption($$anchor, $$props) {
9358
9481
  set_attribute(button, "aria-checked", get$1(totalCorrectAnswers) > 1 ? get$1(optionState)?.isSelected : null);
9359
9482
  set_attribute(button, "aria-disabled", get$1(optionState)?.isFinished && !get$1(isInteractiveMode2) ? "true" : null);
9360
9483
  set_attribute(button, "aria-label", get$1(ariaLabel));
9484
+ set_attribute(button, "aria-labelledby", get$1(mathAriaLabelledBy));
9361
9485
  set_class(button, 1, `${get$1(totalCorrectAnswers) > 1 ? "mcq-opt-chk" : "mcq-opt-btn"} ${(get$1(optionState)?.buttonClasses || "group btn-mcq-option") ?? ""}`);
9362
9486
  set_attribute(button, "data-testid", get$1(totalCorrectAnswers) > 1 ? "mcq-opt-chk" : "mcq-opt-btn");
9363
9487
  set_class(span, 1, `btn-mcq-text ${optionHasMedia() ? "min-h-[44px]" : ""}`);
9364
9488
  set_class(span_3, 1, `choice ${optionHasMedia() ? "my-1.5" : ""}`);
9365
- set_text(text, $0);
9489
+ set_text(text2, $0);
9366
9490
  },
9367
9491
  [() => useAlphabetEquivalent(index2())]
9368
9492
  );
@@ -9385,9 +9509,9 @@ create_custom_element(
9385
9509
  [],
9386
9510
  true
9387
9511
  );
9388
- var root_2$9 = /* @__PURE__ */ from_html(`<div class="absolute inset-0 bg-transparent z-50"></div>`);
9512
+ var root_2$b = /* @__PURE__ */ from_html(`<div class="absolute inset-0 bg-transparent z-50"></div>`);
9389
9513
  var root_1$f = /* @__PURE__ */ from_html(`<div><!> <div></div></div>`);
9390
- var root_4$2 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-center p-4"><div class="text-gray-500">Loading...</div></div>`);
9514
+ var root_4$3 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-center p-4"><div class="text-gray-500">Loading...</div></div>`);
9391
9515
  function MCQInteractionContent($$anchor, $$props) {
9392
9516
  push($$props, true);
9393
9517
  let config = prop($$props, "config", 7), state2 = prop($$props, "state", 7), isDataSaving = prop($$props, "isDataSaving", 7, false), onoptionClick = prop($$props, "onoptionClick", 7), onExpandImage = prop($$props, "onExpandImage", 7);
@@ -9445,7 +9569,7 @@ function MCQInteractionContent($$anchor, $$props) {
9445
9569
  var node_1 = child(div);
9446
9570
  {
9447
9571
  var consequent = ($$anchor3) => {
9448
- var div_1 = root_2$9();
9572
+ var div_1 = root_2$b();
9449
9573
  append($$anchor3, div_1);
9450
9574
  };
9451
9575
  if_block(node_1, ($$render) => {
@@ -9481,7 +9605,7 @@ function MCQInteractionContent($$anchor, $$props) {
9481
9605
  append($$anchor2, div);
9482
9606
  };
9483
9607
  var alternate = ($$anchor2) => {
9484
- var div_3 = root_4$2();
9608
+ var div_3 = root_4$3();
9485
9609
  append($$anchor2, div_3);
9486
9610
  };
9487
9611
  if_block(node, ($$render) => {
@@ -10103,7 +10227,7 @@ function shouldSaveTextAnswer(currentAnswer, latestAnswer, isDataSaving) {
10103
10227
  return !isDataSaving && hasChanged;
10104
10228
  }
10105
10229
  var root_1$e = /* @__PURE__ */ from_html(`<label class="inline-txb-lbl absolute left-0 top-0 bottom-0" data-testid="inline-txb-lbl" aria-hidden="true"><span class="absolute inset-0 bg-black opacity-5 rounded-l-lg w-8.5 h-10.5 top-1"></span> <span class="absolute font-semibold text-base leading-[19px] text-charcoal px-3 inline-block pt-[15px]"> </span></label>`);
10106
- var root_2$8 = /* @__PURE__ */ from_html(`<span class="w-6 h-6 absolute right-4 top-3.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
10230
+ var root_2$a = /* @__PURE__ */ from_html(`<span class="w-6 h-6 absolute right-4 top-3.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
10107
10231
  var root$c = /* @__PURE__ */ from_html(`<span><!> <input data-testid="input-inline-txb" placeholder="Type your answer here" autocomplete="off"/> <!></span>`);
10108
10232
  function TypeInInlineField($$anchor, $$props) {
10109
10233
  push($$props, true);
@@ -10209,12 +10333,12 @@ function TypeInInlineField($$anchor, $$props) {
10209
10333
  var consequent = ($$anchor2) => {
10210
10334
  var label = root_1$e();
10211
10335
  var span_1 = sibling(child(label), 2);
10212
- var text = child(span_1, true);
10336
+ var text2 = child(span_1, true);
10213
10337
  reset(span_1);
10214
10338
  reset(label);
10215
10339
  template_effect(() => {
10216
10340
  set_attribute(label, "for", `inline-${index2() ?? ""}`);
10217
- set_text(text, get$1(blankNumber));
10341
+ set_text(text2, get$1(blankNumber));
10218
10342
  });
10219
10343
  append($$anchor2, label);
10220
10344
  };
@@ -10229,7 +10353,7 @@ function TypeInInlineField($$anchor, $$props) {
10229
10353
  var node_1 = sibling(input, 2);
10230
10354
  {
10231
10355
  var consequent_1 = ($$anchor2) => {
10232
- var span_2 = root_2$8();
10356
+ var span_2 = root_2$a();
10233
10357
  var node_2 = child(span_2);
10234
10358
  {
10235
10359
  let $0 = /* @__PURE__ */ user_derived(() => Boolean(isCorrect()));
@@ -10282,9 +10406,9 @@ create_custom_element(
10282
10406
  );
10283
10407
  var root_1$d = /* @__PURE__ */ from_html(`<p class="p2 text-red-400 mb-3">Student's answer</p>`);
10284
10408
  var root_3$8 = /* @__PURE__ */ from_html(`<span class="w-8 h-8 absolute right-2 top-2.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
10285
- var root_2$7 = /* @__PURE__ */ from_html(`<div class="relative"><textarea autocomplete="off" rows="3"></textarea> <!></div>`);
10286
- var root_5$4 = /* @__PURE__ */ from_html(`<span class="w-8 h-8 absolute right-2 top-2.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
10287
- var root_4$1 = /* @__PURE__ */ from_html(`<div class="relative"><input autocomplete="off"/> <!></div>`);
10409
+ var root_2$9 = /* @__PURE__ */ from_html(`<div class="relative"><textarea autocomplete="off" rows="3"></textarea> <!></div>`);
10410
+ var root_5$3 = /* @__PURE__ */ from_html(`<span class="w-8 h-8 absolute right-2 top-2.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
10411
+ var root_4$2 = /* @__PURE__ */ from_html(`<div class="relative"><input autocomplete="off"/> <!></div>`);
10288
10412
  var root$b = /* @__PURE__ */ from_html(`<div class="relative"><!> <!></div>`);
10289
10413
  function TypeInTextField($$anchor, $$props) {
10290
10414
  push($$props, true);
@@ -10427,7 +10551,7 @@ function TypeInTextField($$anchor, $$props) {
10427
10551
  var node_1 = sibling(node, 2);
10428
10552
  {
10429
10553
  var consequent_2 = ($$anchor2) => {
10430
- var div_1 = root_2$7();
10554
+ var div_1 = root_2$9();
10431
10555
  var textarea = child(div_1);
10432
10556
  remove_textarea_child(textarea);
10433
10557
  textarea.__mousedown = handleMouseDown;
@@ -10478,7 +10602,7 @@ function TypeInTextField($$anchor, $$props) {
10478
10602
  append($$anchor2, div_1);
10479
10603
  };
10480
10604
  var alternate = ($$anchor2) => {
10481
- var div_2 = root_4$1();
10605
+ var div_2 = root_4$2();
10482
10606
  var input = child(div_2);
10483
10607
  remove_input_defaults(input);
10484
10608
  input.__mousedown = handleMouseDown;
@@ -10487,7 +10611,7 @@ function TypeInTextField($$anchor, $$props) {
10487
10611
  var node_4 = sibling(input, 2);
10488
10612
  {
10489
10613
  var consequent_3 = ($$anchor3) => {
10490
- var span_1 = root_5$4();
10614
+ var span_1 = root_5$3();
10491
10615
  var node_5 = child(span_1);
10492
10616
  {
10493
10617
  let $0 = /* @__PURE__ */ user_derived(() => isSkipped() ? false : Boolean(isCorrect()));
@@ -10621,9 +10745,9 @@ const action = (node) => {
10621
10745
  action.update = n.update;
10622
10746
  action.destroy = n.destroy;
10623
10747
  var root_1$c = /* @__PURE__ */ from_html(`<label data-testid="qn-number-txt" aria-hidden="true"><span></span> <span> </span></label>`);
10624
- var root_2$6 = /* @__PURE__ */ from_html(`<div role="textbox" aria-readonly="true"><!></div>`);
10625
- var root_4 = /* @__PURE__ */ from_html(`<div role="textbox" aria-readonly="true" data-testid="ans-sum-corr-txb"><!></div>`);
10626
- var root_5$3 = /* @__PURE__ */ from_html(`<textarea rows="1" readonly=""></textarea>`);
10748
+ var root_2$8 = /* @__PURE__ */ from_html(`<div role="textbox" aria-readonly="true"><!></div>`);
10749
+ var root_4$1 = /* @__PURE__ */ from_html(`<div role="textbox" aria-readonly="true" data-testid="ans-sum-corr-txb"><!></div>`);
10750
+ var root_5$2 = /* @__PURE__ */ from_html(`<textarea rows="1" readonly=""></textarea>`);
10627
10751
  var root_6$2 = /* @__PURE__ */ from_html(`<span class="w-6 h-6 absolute right-4 top-[calc(50%+0.375rem)] -translate-y-1/2 flex items-center justify-center"><!></span>`);
10628
10752
  var root$a = /* @__PURE__ */ from_html(`<div><!> <!> <!></div>`);
10629
10753
  function AnswerDisplay($$anchor, $$props) {
@@ -10760,7 +10884,7 @@ function AnswerDisplay($$anchor, $$props) {
10760
10884
  var label = root_1$c();
10761
10885
  var span = child(label);
10762
10886
  var span_1 = sibling(span, 2);
10763
- var text = child(span_1, true);
10887
+ var text2 = child(span_1, true);
10764
10888
  reset(span_1);
10765
10889
  reset(label);
10766
10890
  template_effect(() => {
@@ -10768,7 +10892,7 @@ function AnswerDisplay($$anchor, $$props) {
10768
10892
  set_class(label, 1, `qn-number-txt ${get$1(labelClasses) ?? ""}`);
10769
10893
  set_class(span, 1, clsx(get$1(backgroundSpanClasses)));
10770
10894
  set_class(span_1, 1, clsx(get$1(numberSpanClasses)));
10771
- set_text(text, questionNumber());
10895
+ set_text(text2, questionNumber());
10772
10896
  });
10773
10897
  append($$anchor2, label);
10774
10898
  };
@@ -10779,7 +10903,7 @@ function AnswerDisplay($$anchor, $$props) {
10779
10903
  var node_1 = sibling(node, 2);
10780
10904
  {
10781
10905
  var consequent_1 = ($$anchor2) => {
10782
- var div_1 = root_2$6();
10906
+ var div_1 = root_2$8();
10783
10907
  var node_2 = child(div_1);
10784
10908
  CommonStringToHtml(node_2, {
10785
10909
  get htmlString() {
@@ -10809,7 +10933,7 @@ function AnswerDisplay($$anchor, $$props) {
10809
10933
  var node_3 = first_child(fragment);
10810
10934
  {
10811
10935
  var consequent_2 = ($$anchor3) => {
10812
- var div_2 = root_4();
10936
+ var div_2 = root_4$1();
10813
10937
  var node_4 = child(div_2);
10814
10938
  CommonStringToHtml(node_4, {
10815
10939
  get htmlString() {
@@ -10827,12 +10951,12 @@ function AnswerDisplay($$anchor, $$props) {
10827
10951
  append($$anchor3, div_2);
10828
10952
  };
10829
10953
  var alternate = ($$anchor3) => {
10830
- var textarea = root_5$3();
10954
+ var textarea = root_5$2();
10831
10955
  remove_textarea_child(textarea);
10832
10956
  action$1(textarea, ($$node) => action?.($$node));
10833
10957
  template_effect(() => {
10834
10958
  set_attribute(textarea, "aria-label", get$1(ariaLabel));
10835
- set_class(textarea, 1, get$1(textareaClasses));
10959
+ set_class(textarea, 1, `${type() === "student" ? "ans-sum-stud-txb" : "ans-sum-corr-txb"} ${get$1(textareaClasses) ?? ""}`);
10836
10960
  set_attribute(textarea, "data-testid", type() === "student" ? "ans-sum-stud-txb" : "ans-sum-corr-txb");
10837
10961
  set_attribute(textarea, "id", `${type() ?? ""}-${comparison().id ?? ""}-${questionNumber() - 1}`);
10838
10962
  set_value(textarea, get$1(displayAnswer));
@@ -11140,7 +11264,7 @@ create_custom_element(
11140
11264
  true
11141
11265
  );
11142
11266
  var root_1$a = /* @__PURE__ */ from_html(`<div aria-hidden="true" class="flex items-center text-charcoal mt-2" data-testid="info-alt-ans-txt"><!> <span class="p3">There is more than one possible correct answer for this question.</span></div>`);
11143
- var root_2$5 = /* @__PURE__ */ from_html(`<div class="mt-4"><!></div>`);
11267
+ var root_2$7 = /* @__PURE__ */ from_html(`<div class="mt-4"><!></div>`);
11144
11268
  var root$8 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
11145
11269
  function TypeInFeedback($$anchor, $$props) {
11146
11270
  push($$props, true);
@@ -11251,7 +11375,7 @@ function TypeInFeedback($$anchor, $$props) {
11251
11375
  var node_2 = sibling(node, 2);
11252
11376
  {
11253
11377
  var consequent_1 = ($$anchor2) => {
11254
- var div_1 = root_2$5();
11378
+ var div_1 = root_2$7();
11255
11379
  var node_3 = child(div_1);
11256
11380
  {
11257
11381
  let $0 = /* @__PURE__ */ user_derived(() => feedbackState().isResultCorrect ? "correct" : feedbackState().isSkipped ? "skipped" : "incorrect");
@@ -11327,12 +11451,12 @@ create_custom_element(
11327
11451
  true
11328
11452
  );
11329
11453
  var root_3$7 = /* @__PURE__ */ from_html(`<p></p>`);
11330
- var root_8$2 = /* @__PURE__ */ from_html(`<div class="absolute inset-0 bg-transparent z-50"></div>`);
11331
- var root_2$4 = /* @__PURE__ */ from_html(`<div class="inline-typein-container mt-6 relative"><!> <div class="divider my-6"></div> <!></div>`);
11454
+ var root_8$4 = /* @__PURE__ */ from_html(`<div class="absolute inset-0 bg-transparent z-50"></div>`);
11455
+ var root_2$6 = /* @__PURE__ */ from_html(`<div class="inline-typein-container mt-6 relative"><!> <div class="divider my-6"></div> <!></div>`);
11332
11456
  var root_10$2 = /* @__PURE__ */ from_html(`<div class="mb-4"><!></div>`);
11333
11457
  var root_13$1 = /* @__PURE__ */ from_html(`<div role="textbox" tabindex="0" aria-readonly="true" aria-labelledby="missing-answer-label" class="typein-textbox typein-textbox-missing border-2 border-green-700 py-[9px] px-4"><!></div>`);
11334
11458
  var root_12$2 = /* @__PURE__ */ from_html(`<div class="mt-6"><p id="missing-answer-label" class="p2 text-green-750 mb-3">Missing answer</p> <!></div>`);
11335
- var root_9$2 = /* @__PURE__ */ from_html(`<!> <!> <span class="sr-only" aria-live="polite" aria-atomic="true"> </span> <!>`, 1);
11459
+ var root_9$3 = /* @__PURE__ */ from_html(`<!> <!> <span class="sr-only" aria-live="polite" aria-atomic="true"> </span> <!>`, 1);
11336
11460
  function TypeInComponent($$anchor, $$props) {
11337
11461
  push($$props, true);
11338
11462
  let api = prop($$props, "api", 7), config = prop($$props, "config", 7), isDataSaving = prop($$props, "isDataSaving", 7, false), onstateChange = prop($$props, "onstateChange", 7);
@@ -11567,7 +11691,7 @@ function TypeInComponent($$anchor, $$props) {
11567
11691
  var node = first_child(fragment_1);
11568
11692
  {
11569
11693
  var consequent_3 = ($$anchor3) => {
11570
- var div = root_2$4();
11694
+ var div = root_2$6();
11571
11695
  var node_1 = child(div);
11572
11696
  each(node_1, 17, () => segments, index, ($$anchor4, segment) => {
11573
11697
  var p_1 = root_3$7();
@@ -11641,7 +11765,7 @@ function TypeInComponent($$anchor, $$props) {
11641
11765
  var node_5 = sibling(node_1, 4);
11642
11766
  {
11643
11767
  var consequent_2 = ($$anchor4) => {
11644
- var div_1 = root_8$2();
11768
+ var div_1 = root_8$4();
11645
11769
  append($$anchor4, div_1);
11646
11770
  };
11647
11771
  if_block(node_5, ($$render) => {
@@ -11653,7 +11777,7 @@ function TypeInComponent($$anchor, $$props) {
11653
11777
  append($$anchor3, div);
11654
11778
  };
11655
11779
  var alternate_2 = ($$anchor3) => {
11656
- var fragment_6 = root_9$2();
11780
+ var fragment_6 = root_9$3();
11657
11781
  var node_6 = first_child(fragment_6);
11658
11782
  {
11659
11783
  var consequent_4 = ($$anchor4) => {
@@ -11724,7 +11848,7 @@ function TypeInComponent($$anchor, $$props) {
11724
11848
  });
11725
11849
  }
11726
11850
  var span = sibling(node_8, 2);
11727
- var text = child(span, true);
11851
+ var text2 = child(span, true);
11728
11852
  reset(span);
11729
11853
  var node_9 = sibling(span, 2);
11730
11854
  {
@@ -11788,7 +11912,7 @@ function TypeInComponent($$anchor, $$props) {
11788
11912
  if (get$1(showMissingAnswer)) $$render(consequent_6);
11789
11913
  });
11790
11914
  }
11791
- template_effect(() => set_text(text, get$1(missingAnswerAnnouncement)));
11915
+ template_effect(() => set_text(text2, get$1(missingAnswerAnnouncement)));
11792
11916
  append($$anchor3, fragment_6);
11793
11917
  };
11794
11918
  if_block(node, ($$render) => {
@@ -11886,8 +12010,8 @@ const createTypeInInteraction = (config, sessionData) => {
11886
12010
  const regexPattern = new RegExp(`^${regex}$`, "i");
11887
12011
  return regexPattern.test(answer.trim());
11888
12012
  };
11889
- const patternNormalizer = (text) => {
11890
- let s = text.toLowerCase();
12013
+ const patternNormalizer = (text2) => {
12014
+ let s = text2.toLowerCase();
11891
12015
  if (config.ignorePunctuation) {
11892
12016
  s = s.replace(punctuationRegex, "");
11893
12017
  }
@@ -14341,15 +14465,15 @@ function isInt(value) {
14341
14465
  return (x | 0) === x;
14342
14466
  })(parseFloat(value));
14343
14467
  }
14344
- var root_1$9 = /* @__PURE__ */ from_html(`<span class="text-green-800 preview-icon"><!></span>`);
14345
- var root_3$6 = /* @__PURE__ */ from_html(`<span class="text-red-800 preview-icon"><!></span>`);
14346
- var root_5$2 = /* @__PURE__ */ from_html(`<span class="text-green-800"><!></span>`);
14347
- var root_7$3 = /* @__PURE__ */ from_html(`<span class="preview-vertical hidden"><!></span>`);
14348
- var root$7 = /* @__PURE__ */ from_html(`<button data-item-button=""><span><!></span> <div><span></span> <span class="absolute"><!> <!></span></div></button>`);
14468
+ var root_1$9 = /* @__PURE__ */ from_html(`<span class="sr-only"> </span>`);
14469
+ var root_2$5 = /* @__PURE__ */ from_html(`<span class="text-green-800 preview-icon"><!></span>`);
14470
+ var root_4 = /* @__PURE__ */ from_html(`<span class="text-red-800 preview-icon"><!></span>`);
14471
+ var root_6$1 = /* @__PURE__ */ from_html(`<span class="text-green-800"><!></span>`);
14472
+ var root_8$3 = /* @__PURE__ */ from_html(`<span class="preview-vertical hidden"><!></span>`);
14473
+ var root$7 = /* @__PURE__ */ from_html(`<button data-item-button=""><span class="sr-only"> </span> <span><!></span> <!> <div aria-hidden="true"><span></span> <span class="absolute"><!> <!></span></div></button>`);
14349
14474
  function CategoriseItem($$anchor, $$props) {
14350
14475
  push($$props, true);
14351
14476
  let itemId = prop($$props, "itemId", 7), itemText = prop($$props, "itemText", 7), containerId = prop($$props, "containerId", 7), mode = prop($$props, "mode", 7), selectedItemId = prop($$props, "selectedItemId", 7, void 0), isLocked = prop($$props, "isLocked", 7, false), isCollapsed = prop($$props, "isCollapsed", 7, false), resultType = prop($$props, "resultType", 7, ""), isCurrentMobileItem = prop($$props, "isCurrentMobileItem", 7, true), isClonedItem = prop($$props, "isClonedItem", 7, false), isConsideredItem = prop($$props, "isConsideredItem", 7, false), activeContainerForKeyboard = prop($$props, "activeContainerForKeyboard", 7, void 0), onclick = prop($$props, "onclick", 7), onfocus = prop($$props, "onfocus", 7), onblur = prop($$props, "onblur", 7), onkeydown = prop($$props, "onkeydown", 7);
14352
- const ariaWord = useRemoveRichTextHtmlTags(itemText());
14353
14477
  const isWordBin = containerId() === CATEGORISE.CONTAINER_WORD_BIN_ID;
14354
14478
  let touchStartX = /* @__PURE__ */ state(0);
14355
14479
  let touchStartY = /* @__PURE__ */ state(0);
@@ -14359,17 +14483,23 @@ function CategoriseItem($$anchor, $$props) {
14359
14483
  const isSelected = /* @__PURE__ */ user_derived(() => selectedItemId() === get$1(cleanItemId));
14360
14484
  const hasAnyItemSelected = /* @__PURE__ */ user_derived(() => !!selectedItemId());
14361
14485
  const canInteract = /* @__PURE__ */ user_derived(() => !isLocked() && (!resultType() || mode() === MODES.INTERACTIVE));
14362
- const ariaLabel = /* @__PURE__ */ user_derived(() => () => {
14486
+ const ariaPrefix = /* @__PURE__ */ user_derived(() => () => {
14363
14487
  if (resultType() === ANSWER_RESULTS.INCORRECT && isWordBin && !get$1(isSelected)) {
14364
- return `Skipped answer: ${ariaWord}`;
14488
+ return "Skipped answer:";
14365
14489
  }
14366
14490
  if ((resultType() === ANSWER_RESULTS.CORRECT || resultType() === ANSWER_RESULTS.INCORRECT) && !get$1(isSelected)) {
14367
- return `Student's answer: ${ariaWord} (${resultType()})`;
14491
+ return "Student's answer:";
14368
14492
  }
14369
14493
  if (resultType() === ANSWER_RESULTS.MISSED) {
14370
- return `Missing answer: ${ariaWord}`;
14494
+ return "Missing answer:";
14495
+ }
14496
+ return `${get$1(isSelected) ? "Selected option" : "Option"}:`;
14497
+ });
14498
+ const ariaSuffix = /* @__PURE__ */ user_derived(() => () => {
14499
+ if ((resultType() === ANSWER_RESULTS.CORRECT || resultType() === ANSWER_RESULTS.INCORRECT) && !get$1(isSelected)) {
14500
+ return `(${resultType()})`;
14371
14501
  }
14372
- return `${get$1(isSelected) ? "Selected option" : "Option"}: ${ariaWord}`;
14502
+ return "";
14373
14503
  });
14374
14504
  const handleFocus = (event2) => {
14375
14505
  set(lastFocusTime, Date.now(), true);
@@ -14644,59 +14774,75 @@ function CategoriseItem($$anchor, $$props) {
14644
14774
  button.__touchend = handleTouchEnd;
14645
14775
  button.__keydown = handleKeyDown;
14646
14776
  var span = child(button);
14647
- var node = child(span);
14777
+ var text2 = child(span, true);
14778
+ reset(span);
14779
+ var span_1 = sibling(span, 2);
14780
+ var node = child(span_1);
14648
14781
  CommonStringToHtml(node, {
14649
14782
  get htmlString() {
14650
14783
  return itemText();
14651
14784
  },
14652
14785
  otherClass: "inline-block w-full"
14653
14786
  });
14654
- reset(span);
14655
- var div = sibling(span, 2);
14656
- var span_1 = child(div);
14657
- var span_2 = sibling(span_1, 2);
14658
- var node_1 = child(span_2);
14787
+ reset(span_1);
14788
+ var node_1 = sibling(span_1, 2);
14659
14789
  {
14660
14790
  var consequent = ($$anchor2) => {
14661
- var span_3 = root_1$9();
14662
- var node_2 = child(span_3);
14663
- SvgLoader(node_2, {
14791
+ var span_2 = root_1$9();
14792
+ var text_1 = child(span_2, true);
14793
+ reset(span_2);
14794
+ template_effect(($0) => set_text(text_1, $0), [() => get$1(ariaSuffix)()]);
14795
+ append($$anchor2, span_2);
14796
+ };
14797
+ if_block(node_1, ($$render) => {
14798
+ if (get$1(ariaSuffix)()) $$render(consequent);
14799
+ });
14800
+ }
14801
+ var div = sibling(node_1, 2);
14802
+ var span_3 = child(div);
14803
+ var span_4 = sibling(span_3, 2);
14804
+ var node_2 = child(span_4);
14805
+ {
14806
+ var consequent_1 = ($$anchor2) => {
14807
+ var span_5 = root_2$5();
14808
+ var node_3 = child(span_5);
14809
+ SvgLoader(node_3, {
14664
14810
  svgName: "successSolid",
14665
14811
  className: "correct-icon",
14666
14812
  dataTestId: "icon-correct"
14667
14813
  });
14668
- reset(span_3);
14669
- append($$anchor2, span_3);
14814
+ reset(span_5);
14815
+ append($$anchor2, span_5);
14670
14816
  };
14671
14817
  var alternate_2 = ($$anchor2) => {
14672
14818
  var fragment = comment();
14673
- var node_3 = first_child(fragment);
14819
+ var node_4 = first_child(fragment);
14674
14820
  {
14675
- var consequent_1 = ($$anchor3) => {
14676
- var span_4 = root_3$6();
14677
- var node_4 = child(span_4);
14678
- SvgLoader(node_4, {
14821
+ var consequent_2 = ($$anchor3) => {
14822
+ var span_6 = root_4();
14823
+ var node_5 = child(span_6);
14824
+ SvgLoader(node_5, {
14679
14825
  svgName: "errorSolid",
14680
14826
  className: "incorrect-icon",
14681
14827
  dataTestId: "icon-incorrect"
14682
14828
  });
14683
- reset(span_4);
14684
- append($$anchor3, span_4);
14829
+ reset(span_6);
14830
+ append($$anchor3, span_6);
14685
14831
  };
14686
14832
  var alternate_1 = ($$anchor3) => {
14687
14833
  var fragment_1 = comment();
14688
- var node_5 = first_child(fragment_1);
14834
+ var node_6 = first_child(fragment_1);
14689
14835
  {
14690
- var consequent_2 = ($$anchor4) => {
14691
- var span_5 = root_5$2();
14692
- var node_6 = child(span_5);
14693
- SvgLoader(node_6, {
14836
+ var consequent_3 = ($$anchor4) => {
14837
+ var span_7 = root_6$1();
14838
+ var node_7 = child(span_7);
14839
+ SvgLoader(node_7, {
14694
14840
  svgName: "success",
14695
14841
  className: "missing-correct-icon",
14696
14842
  dataTestId: "icon-miss-corr"
14697
14843
  });
14698
- reset(span_5);
14699
- append($$anchor4, span_5);
14844
+ reset(span_7);
14845
+ append($$anchor4, span_7);
14700
14846
  };
14701
14847
  var alternate = ($$anchor4) => {
14702
14848
  SvgLoader($$anchor4, {
@@ -14706,9 +14852,9 @@ function CategoriseItem($$anchor, $$props) {
14706
14852
  });
14707
14853
  };
14708
14854
  if_block(
14709
- node_5,
14855
+ node_6,
14710
14856
  ($$render) => {
14711
- if (resultType() === ANSWER_RESULTS.MISSED) $$render(consequent_2);
14857
+ if (resultType() === ANSWER_RESULTS.MISSED) $$render(consequent_3);
14712
14858
  else $$render(alternate, false);
14713
14859
  },
14714
14860
  true
@@ -14717,9 +14863,9 @@ function CategoriseItem($$anchor, $$props) {
14717
14863
  append($$anchor3, fragment_1);
14718
14864
  };
14719
14865
  if_block(
14720
- node_3,
14866
+ node_4,
14721
14867
  ($$render) => {
14722
- if (resultType() === ANSWER_RESULTS.INCORRECT && !get$1(isSelected)) $$render(consequent_1);
14868
+ if (resultType() === ANSWER_RESULTS.INCORRECT && !get$1(isSelected)) $$render(consequent_2);
14723
14869
  else $$render(alternate_1, false);
14724
14870
  },
14725
14871
  true
@@ -14727,48 +14873,48 @@ function CategoriseItem($$anchor, $$props) {
14727
14873
  }
14728
14874
  append($$anchor2, fragment);
14729
14875
  };
14730
- if_block(node_1, ($$render) => {
14731
- if (resultType() === ANSWER_RESULTS.CORRECT && !get$1(isSelected)) $$render(consequent);
14876
+ if_block(node_2, ($$render) => {
14877
+ if (resultType() === ANSWER_RESULTS.CORRECT && !get$1(isSelected)) $$render(consequent_1);
14732
14878
  else $$render(alternate_2, false);
14733
14879
  });
14734
14880
  }
14735
- var node_7 = sibling(node_1, 2);
14881
+ var node_8 = sibling(node_2, 2);
14736
14882
  {
14737
- var consequent_3 = ($$anchor2) => {
14738
- var span_6 = root_7$3();
14739
- var node_8 = child(span_6);
14740
- SvgLoader(node_8, {
14883
+ var consequent_4 = ($$anchor2) => {
14884
+ var span_8 = root_8$3();
14885
+ var node_9 = child(span_8);
14886
+ SvgLoader(node_9, {
14741
14887
  svgName: "gripVertical",
14742
14888
  className: "grip-icon",
14743
14889
  dataTestId: "icon-grip"
14744
14890
  });
14745
- reset(span_6);
14746
- append($$anchor2, span_6);
14891
+ reset(span_8);
14892
+ append($$anchor2, span_8);
14747
14893
  };
14748
- if_block(node_7, ($$render) => {
14749
- if (resultType() === ANSWER_RESULTS.CORRECT || resultType() === ANSWER_RESULTS.INCORRECT) $$render(consequent_3);
14894
+ if_block(node_8, ($$render) => {
14895
+ if (resultType() === ANSWER_RESULTS.CORRECT || resultType() === ANSWER_RESULTS.INCORRECT) $$render(consequent_4);
14750
14896
  });
14751
14897
  }
14752
- reset(span_2);
14898
+ reset(span_4);
14753
14899
  reset(div);
14754
14900
  reset(button);
14755
14901
  template_effect(
14756
14902
  ($0, $1, $2, $3, $4, $5, $6) => {
14757
14903
  set_attribute(button, "id", itemId());
14758
- set_attribute(button, "aria-label", $0);
14759
- set_class(button, 1, $1);
14760
- set_attribute(button, "data-testid", $2);
14761
- set_attribute(button, "tabindex", $3);
14904
+ set_class(button, 1, $0);
14905
+ set_attribute(button, "data-testid", $1);
14906
+ set_attribute(button, "tabindex", $2);
14762
14907
  button.disabled = isLocked() && !resultType();
14763
- set_class(span, 1, $4);
14908
+ set_text(text2, $3);
14909
+ set_class(span_1, 1, $4);
14764
14910
  set_class(div, 1, $5);
14765
- set_class(span_1, 1, $6);
14911
+ set_class(span_3, 1, $6);
14766
14912
  },
14767
14913
  [
14768
- () => get$1(ariaLabel)(),
14769
14914
  () => clsx(get$1(buttonClasses)()),
14770
14915
  () => get$1(getItemTestId)(),
14771
14916
  () => get$1(itemTabIndex)(),
14917
+ () => get$1(ariaPrefix)(),
14772
14918
  () => clsx(get$1(textClasses)()),
14773
14919
  () => clsx(get$1(iconContainerClasses)()),
14774
14920
  () => clsx(get$1(iconBgClasses)())
@@ -14804,13 +14950,15 @@ create_custom_element(
14804
14950
  [],
14805
14951
  true
14806
14952
  );
14807
- var root_1$8 = /* @__PURE__ */ from_html(`<button tabindex="0"></button>`);
14808
- var root_7$2 = /* @__PURE__ */ from_html(`<div class="w-full text-base text-charcoal font-semibold mt-1 mb-2">Missing answers:</div>`);
14809
- var root_6$1 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
14953
+ var root_2$4 = /* @__PURE__ */ from_html(`<span class="sr-only"> </span> <!>`, 1);
14954
+ var root_3$6 = /* @__PURE__ */ from_html(`<span class="sr-only"> </span>`);
14955
+ var root_1$8 = /* @__PURE__ */ from_html(`<button tabindex="0"><!></button>`);
14956
+ var root_9$2 = /* @__PURE__ */ from_html(`<div class="w-full text-base text-charcoal font-semibold mt-1 mb-2">Missing answers:</div>`);
14957
+ var root_8$2 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
14810
14958
  var root$6 = /* @__PURE__ */ from_html(`<!> <section><!></section>`, 1);
14811
14959
  function CategoriseDndContainer($$anchor, $$props) {
14812
14960
  push($$props, true);
14813
- let containerId = prop($$props, "containerId", 7), containerLabel = prop($$props, "containerLabel", 7, ""), containerClass = prop($$props, "containerClass", 7, ""), showButton = prop($$props, "showButton", 7, true), items = prop($$props, "items", 23, () => []), selectedItemId = prop($$props, "selectedItemId", 7, void 0), isLocked = prop($$props, "isLocked", 7, false), isMobile = prop($$props, "isMobile", 7, false), mode = prop($$props, "mode", 7), paddingTop = prop($$props, "paddingTop", 7, 0), dndType = prop($$props, "dndType", 7, "categorise"), activeContainerForKeyboard = prop($$props, "activeContainerForKeyboard", 7, void 0), isCollapsed = prop($$props, "isCollapsed", 7, false), onitemdrop = prop($$props, "onitemdrop", 7), onitemselect = prop($$props, "onitemselect", 7), oncontainerclick = prop($$props, "oncontainerclick", 7), onitemfocus = prop($$props, "onitemfocus", 7), onitemblur = prop($$props, "onitemblur", 7), onitemkeydown = prop($$props, "onitemkeydown", 7), ondraghover = prop($$props, "ondraghover", 7), ondragstart = prop($$props, "ondragstart", 7), children = prop($$props, "children", 7);
14961
+ let containerId = prop($$props, "containerId", 7), containerLabel = prop($$props, "containerLabel", 7, ""), containerLabelHtml = prop($$props, "containerLabelHtml", 7, ""), containerIndex = prop($$props, "containerIndex", 7, 0), containerClass = prop($$props, "containerClass", 7, ""), showButton = prop($$props, "showButton", 7, true), items = prop($$props, "items", 23, () => []), selectedItemId = prop($$props, "selectedItemId", 7, void 0), isLocked = prop($$props, "isLocked", 7, false), isMobile = prop($$props, "isMobile", 7, false), mode = prop($$props, "mode", 7), paddingTop = prop($$props, "paddingTop", 7, 0), dndType = prop($$props, "dndType", 7, "categorise"), activeContainerForKeyboard = prop($$props, "activeContainerForKeyboard", 7, void 0), isCollapsed = prop($$props, "isCollapsed", 7, false), onitemdrop = prop($$props, "onitemdrop", 7), onitemselect = prop($$props, "onitemselect", 7), oncontainerclick = prop($$props, "oncontainerclick", 7), onitemfocus = prop($$props, "onitemfocus", 7), onitemblur = prop($$props, "onitemblur", 7), onitemkeydown = prop($$props, "onitemkeydown", 7), ondraghover = prop($$props, "ondraghover", 7), ondragstart = prop($$props, "ondragstart", 7), children = prop($$props, "children", 7);
14814
14962
  let considerItemId = /* @__PURE__ */ state(void 0);
14815
14963
  let isHoveringDrag = /* @__PURE__ */ state(false);
14816
14964
  let dragCounter = /* @__PURE__ */ state(0);
@@ -14957,6 +15105,20 @@ function CategoriseDndContainer($$anchor, $$props) {
14957
15105
  containerLabel($$value);
14958
15106
  flushSync();
14959
15107
  },
15108
+ get containerLabelHtml() {
15109
+ return containerLabelHtml();
15110
+ },
15111
+ set containerLabelHtml($$value = "") {
15112
+ containerLabelHtml($$value);
15113
+ flushSync();
15114
+ },
15115
+ get containerIndex() {
15116
+ return containerIndex();
15117
+ },
15118
+ set containerIndex($$value = 0) {
15119
+ containerIndex($$value);
15120
+ flushSync();
15121
+ },
14960
15122
  get containerClass() {
14961
15123
  return containerClass();
14962
15124
  },
@@ -15101,17 +15263,44 @@ function CategoriseDndContainer($$anchor, $$props) {
15101
15263
  var fragment = root$6();
15102
15264
  var node = first_child(fragment);
15103
15265
  {
15104
- var consequent = ($$anchor2) => {
15266
+ var consequent_1 = ($$anchor2) => {
15105
15267
  var button = root_1$8();
15106
15268
  button.__click = handleContainerClick;
15107
- template_effect(() => {
15108
- set_class(button, 1, `focus-ring absolute inset-0 bg-transparent rounded-lg z-10 pointer-events-auto focus-visible:border ${containerId() === "container-word-bin" ? "focus-visible:border-gray-400" : "focus-visible:border-gray-800"}`);
15109
- set_attribute(button, "aria-label", containerLabel());
15110
- });
15269
+ var node_1 = child(button);
15270
+ {
15271
+ var consequent = ($$anchor3) => {
15272
+ var fragment_1 = root_2$4();
15273
+ var span = first_child(fragment_1);
15274
+ var text2 = child(span);
15275
+ reset(span);
15276
+ var node_2 = sibling(span, 2);
15277
+ CommonStringToHtml(node_2, {
15278
+ get htmlString() {
15279
+ return containerLabelHtml();
15280
+ },
15281
+ otherClass: "sr-only"
15282
+ });
15283
+ template_effect(() => set_text(text2, `Category ${containerIndex() ?? ""}:`));
15284
+ append($$anchor3, fragment_1);
15285
+ };
15286
+ var alternate = ($$anchor3) => {
15287
+ var span_1 = root_3$6();
15288
+ var text_1 = child(span_1, true);
15289
+ reset(span_1);
15290
+ template_effect(() => set_text(text_1, containerLabel()));
15291
+ append($$anchor3, span_1);
15292
+ };
15293
+ if_block(node_1, ($$render) => {
15294
+ if (containerLabelHtml()) $$render(consequent);
15295
+ else $$render(alternate, false);
15296
+ });
15297
+ }
15298
+ reset(button);
15299
+ template_effect(() => set_class(button, 1, `focus-ring absolute inset-0 bg-transparent rounded-lg z-10 pointer-events-auto focus-visible:border ${containerId() === "container-word-bin" ? "focus-visible:border-gray-400" : "focus-visible:border-gray-800"}`));
15111
15300
  append($$anchor2, button);
15112
15301
  };
15113
15302
  if_block(node, ($$render) => {
15114
- if (!isLocked() && selectedItemId() && !get$1(isSourceContainer)()) $$render(consequent);
15303
+ if (!isLocked() && selectedItemId() && !get$1(isSourceContainer)()) $$render(consequent_1);
15115
15304
  });
15116
15305
  }
15117
15306
  var section = sibling(node, 2);
@@ -15119,50 +15308,50 @@ function CategoriseDndContainer($$anchor, $$props) {
15119
15308
  section.__touchstart = handleSectionTouchStart;
15120
15309
  section.__touchmove = handleSectionTouchMove;
15121
15310
  set_attribute(section, "tabindex", -1);
15122
- var node_1 = child(section);
15311
+ var node_3 = child(section);
15123
15312
  {
15124
- var consequent_2 = ($$anchor2) => {
15125
- var fragment_1 = comment();
15126
- var node_2 = first_child(fragment_1);
15313
+ var consequent_3 = ($$anchor2) => {
15314
+ var fragment_2 = comment();
15315
+ var node_4 = first_child(fragment_2);
15127
15316
  {
15128
- var consequent_1 = ($$anchor3) => {
15129
- var fragment_2 = comment();
15130
- var node_3 = first_child(fragment_2);
15131
- snippet(node_3, children, () => ({ empty: () => {
15317
+ var consequent_2 = ($$anchor3) => {
15318
+ var fragment_3 = comment();
15319
+ var node_5 = first_child(fragment_3);
15320
+ snippet(node_5, children, () => ({ empty: () => {
15132
15321
  } }));
15133
- append($$anchor3, fragment_2);
15322
+ append($$anchor3, fragment_3);
15134
15323
  };
15135
- if_block(node_2, ($$render) => {
15136
- if (children()) $$render(consequent_1);
15324
+ if_block(node_4, ($$render) => {
15325
+ if (children()) $$render(consequent_2);
15137
15326
  });
15138
15327
  }
15139
- append($$anchor2, fragment_1);
15328
+ append($$anchor2, fragment_2);
15140
15329
  };
15141
- var alternate = ($$anchor2) => {
15142
- var fragment_3 = comment();
15143
- var node_4 = first_child(fragment_3);
15330
+ var alternate_1 = ($$anchor2) => {
15331
+ var fragment_4 = comment();
15332
+ var node_6 = first_child(fragment_4);
15144
15333
  {
15145
- var consequent_4 = ($$anchor3) => {
15146
- var fragment_4 = comment();
15147
- var node_5 = first_child(fragment_4);
15148
- each(node_5, 19, () => get$1(localItems), (item) => `${item.id}-${get$1(dragCounter)}`, ($$anchor4, item, index2) => {
15334
+ var consequent_5 = ($$anchor3) => {
15335
+ var fragment_5 = comment();
15336
+ var node_7 = first_child(fragment_5);
15337
+ each(node_7, 19, () => get$1(localItems), (item) => `${item.id}-${get$1(dragCounter)}`, ($$anchor4, item, index2) => {
15149
15338
  const itemResultType = /* @__PURE__ */ user_derived(() => getItemResultType(get$1(item).isClonedItem && get$1(item).cloneId ? get$1(item).cloneId : get$1(item).id));
15150
- var fragment_5 = root_6$1();
15151
- var node_6 = first_child(fragment_5);
15339
+ var fragment_6 = root_8$2();
15340
+ var node_8 = first_child(fragment_6);
15152
15341
  {
15153
- var consequent_3 = ($$anchor5) => {
15154
- var div = root_7$2();
15342
+ var consequent_4 = ($$anchor5) => {
15343
+ var div = root_9$2();
15155
15344
  append($$anchor5, div);
15156
15345
  };
15157
- if_block(node_6, ($$render) => {
15158
- if (get$1(itemResultType) === ANSWER_RESULTS.MISSED && get$1(index2) === get$1(localItems).findIndex((i) => getItemResultType(i.id) === ANSWER_RESULTS.MISSED)) $$render(consequent_3);
15346
+ if_block(node_8, ($$render) => {
15347
+ if (get$1(itemResultType) === ANSWER_RESULTS.MISSED && get$1(index2) === get$1(localItems).findIndex((i) => getItemResultType(i.id) === ANSWER_RESULTS.MISSED)) $$render(consequent_4);
15159
15348
  });
15160
15349
  }
15161
- var node_7 = sibling(node_6, 2);
15350
+ var node_9 = sibling(node_8, 2);
15162
15351
  {
15163
15352
  let $0 = /* @__PURE__ */ user_derived(() => get$1(item).itemText || "");
15164
15353
  let $1 = /* @__PURE__ */ user_derived(() => get$1(considerItemId) === get$1(item).id);
15165
- CategoriseItem(node_7, {
15354
+ CategoriseItem(node_9, {
15166
15355
  get itemId() {
15167
15356
  return get$1(item).id;
15168
15357
  },
@@ -15205,23 +15394,23 @@ function CategoriseDndContainer($$anchor, $$props) {
15205
15394
  onkeydown: (e2) => onitemkeydown()?.(e2, get$1(item).id, get$1(index2))
15206
15395
  });
15207
15396
  }
15208
- append($$anchor4, fragment_5);
15397
+ append($$anchor4, fragment_6);
15209
15398
  });
15210
- append($$anchor3, fragment_4);
15399
+ append($$anchor3, fragment_5);
15211
15400
  };
15212
15401
  if_block(
15213
- node_4,
15402
+ node_6,
15214
15403
  ($$render) => {
15215
- if (showButton()) $$render(consequent_4);
15404
+ if (showButton()) $$render(consequent_5);
15216
15405
  },
15217
15406
  true
15218
15407
  );
15219
15408
  }
15220
- append($$anchor2, fragment_3);
15409
+ append($$anchor2, fragment_4);
15221
15410
  };
15222
- if_block(node_1, ($$render) => {
15223
- if (get$1(isEmpty)) $$render(consequent_2);
15224
- else $$render(alternate, false);
15411
+ if_block(node_3, ($$render) => {
15412
+ if (get$1(isEmpty)) $$render(consequent_3);
15413
+ else $$render(alternate_1, false);
15225
15414
  });
15226
15415
  }
15227
15416
  reset(section);
@@ -15243,6 +15432,8 @@ create_custom_element(
15243
15432
  {
15244
15433
  containerId: {},
15245
15434
  containerLabel: {},
15435
+ containerLabelHtml: {},
15436
+ containerIndex: {},
15246
15437
  containerClass: {},
15247
15438
  showButton: {},
15248
15439
  items: {},
@@ -15271,7 +15462,7 @@ create_custom_element(
15271
15462
  var root_2$3 = /* @__PURE__ */ from_svg(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-testid="icon-chevron-coll"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>`);
15272
15463
  var root_3$5 = /* @__PURE__ */ from_svg(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-testid="icon-chevron-exp"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path></svg>`);
15273
15464
  var root_1$7 = /* @__PURE__ */ from_html(`<button type="button" class="focus-ring flex items-center rounded-[32px] p-1.5 text-charcoal text-sm border border-gray-800 bg-gray-50 min-w-[85px] ml-3 whitespace-nowrap active:raw-focus-ring active:bg-black-55"><span class="mx-0.5"> </span> <span class="w-4 h-4 text-inherit flex items-center justify-center"><!></span></button>`);
15274
- var root$5 = /* @__PURE__ */ from_html(`<div role="group" data-testid="cat-ctr"><div><!> <!></div> <!></div>`);
15465
+ var root$5 = /* @__PURE__ */ from_html(`<div role="group" data-testid="cat-ctr"><div><span class="sr-only"> </span> <!> <span class="sr-only"> </span> <!></div> <!></div>`);
15275
15466
  function CategoriseCategory($$anchor, $$props) {
15276
15467
  push($$props, true);
15277
15468
  let categoryId = prop($$props, "categoryId", 7), categoryTitle = prop($$props, "categoryTitle", 7), categoryIndex = prop($$props, "categoryIndex", 7, 1), items = prop($$props, "items", 23, () => []), selectedItemId = prop($$props, "selectedItemId", 7, void 0), isLocked = prop($$props, "isLocked", 7, false), isCollapsed = prop($$props, "isCollapsed", 7, false), isDraggingOver = prop($$props, "isDraggingOver", 7, false), dropContainerId = prop($$props, "dropContainerId", 7, void 0), hasAddItemAnimation = prop($$props, "hasAddItemAnimation", 7, false), dragSourceContainerId = prop($$props, "dragSourceContainerId", 7, void 0), mode = prop($$props, "mode", 7), isMobile = prop($$props, "isMobile", 7, false), hasStimulus = prop($$props, "hasStimulus", 7, false), dndType = prop($$props, "dndType", 7, "categorise"), tabindex = prop($$props, "tabindex", 7, 0), activeContainerForKeyboard = prop($$props, "activeContainerForKeyboard", 7, void 0), onitemdrop = prop($$props, "onitemdrop", 7), onitemselect = prop($$props, "onitemselect", 7), oncontainerclick = prop($$props, "oncontainerclick", 7), ontogglecollapse = prop($$props, "ontogglecollapse", 7), onitemfocus = prop($$props, "onitemfocus", 7), onitemblur = prop($$props, "onitemblur", 7), onitemkeydown = prop($$props, "onitemkeydown", 7), onkeydown = prop($$props, "onkeydown", 7), ondraghover = prop($$props, "ondraghover", 7), ondragstart = prop($$props, "ondragstart", 7);
@@ -15302,7 +15493,6 @@ function CategoriseCategory($$anchor, $$props) {
15302
15493
  ${get$1(effectiveIsCollapsed) && isDraggingOver() && get$1(isNotSourceContainer) ? "!bg-violet-100 md:!bg-white" : ""}
15303
15494
  ${get$1(effectiveIsCollapsed) && isMobile() ? "rounded-b-lg md:rounded-b-none" : ""}`);
15304
15495
  const adjustedTabindex = /* @__PURE__ */ user_derived(tabindex);
15305
- const shouldShowAriaLabel = /* @__PURE__ */ user_derived(() => !get$1(hasSelectedItem) || !get$1(isNotSourceContainer));
15306
15496
  const handleToggle = () => {
15307
15497
  if (isMobile() && ontogglecollapse()) {
15308
15498
  ontogglecollapse()(categoryId());
@@ -15519,15 +15709,20 @@ function CategoriseCategory($$anchor, $$props) {
15519
15709
  };
15520
15710
  div.__click = handleContainerClick;
15521
15711
  var div_1 = child(div);
15522
- var node = child(div_1);
15712
+ var span = child(div_1);
15713
+ var text2 = child(span);
15714
+ reset(span);
15715
+ var node = sibling(span, 2);
15523
15716
  CommonStringToHtml(node, {
15524
15717
  get htmlString() {
15525
15718
  return categoryTitle();
15526
15719
  },
15527
- otherClass: "text-base leading-5 !text-gray-900 md:item-heading",
15528
- ariaHidden: true
15720
+ otherClass: "text-base leading-5 !text-gray-900 md:item-heading"
15529
15721
  });
15530
- var node_1 = sibling(node, 2);
15722
+ var span_1 = sibling(node, 2);
15723
+ var text_1 = child(span_1);
15724
+ reset(span_1);
15725
+ var node_1 = sibling(span_1, 2);
15531
15726
  {
15532
15727
  var consequent_1 = ($$anchor2) => {
15533
15728
  var button = root_1$7();
@@ -15537,11 +15732,11 @@ function CategoriseCategory($$anchor, $$props) {
15537
15732
  e2.stopPropagation();
15538
15733
  }
15539
15734
  };
15540
- var span = child(button);
15541
- var text = child(span, true);
15542
- reset(span);
15543
- var span_1 = sibling(span, 2);
15544
- var node_2 = child(span_1);
15735
+ var span_2 = child(button);
15736
+ var text_2 = child(span_2, true);
15737
+ reset(span_2);
15738
+ var span_3 = sibling(span_2, 2);
15739
+ var node_2 = child(span_3);
15545
15740
  {
15546
15741
  var consequent = ($$anchor3) => {
15547
15742
  var svg = root_2$3();
@@ -15556,12 +15751,12 @@ function CategoriseCategory($$anchor, $$props) {
15556
15751
  else $$render(alternate, false);
15557
15752
  });
15558
15753
  }
15559
- reset(span_1);
15754
+ reset(span_3);
15560
15755
  reset(button);
15561
15756
  template_effect(() => {
15562
15757
  set_attribute(button, "aria-label", get$1(getTotalWords));
15563
15758
  set_attribute(button, "tabindex", selectedItemId() ? -1 : 0);
15564
- set_text(text, get$1(getTotalWords));
15759
+ set_text(text_2, get$1(getTotalWords));
15565
15760
  });
15566
15761
  append($$anchor2, button);
15567
15762
  };
@@ -15586,6 +15781,12 @@ function CategoriseCategory($$anchor, $$props) {
15586
15781
  get containerLabel() {
15587
15782
  return get$1($0);
15588
15783
  },
15784
+ get containerLabelHtml() {
15785
+ return categoryTitle();
15786
+ },
15787
+ get containerIndex() {
15788
+ return categoryIndex();
15789
+ },
15589
15790
  get containerClass() {
15590
15791
  return get$1(containerClasses);
15591
15792
  },
@@ -15649,9 +15850,10 @@ function CategoriseCategory($$anchor, $$props) {
15649
15850
  bind_this(div, ($$value) => set(categoryElement, $$value), () => get$1(categoryElement));
15650
15851
  template_effect(() => {
15651
15852
  set_attribute(div, "tabindex", get$1(adjustedTabindex));
15652
- set_attribute(div, "aria-label", get$1(shouldShowAriaLabel) ? `Category ${categoryIndex()}: ${get$1(cleanCategoryTitle)}. ${get$1(getTotalWords)} added.` : void 0);
15653
15853
  set_class(div, 1, `cat-ctr ${get$1(outerClasses) ?? ""}`);
15654
15854
  set_class(div_1, 1, clsx(get$1(titleClasses)));
15855
+ set_text(text2, `Category ${categoryIndex() ?? ""}:`);
15856
+ set_text(text_1, `. ${get$1(getTotalWords) ?? ""} added.`);
15655
15857
  });
15656
15858
  bind_element_size(div_1, "clientHeight", ($$value) => set(categoryTitleHeight, $$value));
15657
15859
  append($$anchor, div);
@@ -15963,7 +16165,7 @@ function CategoriseWordBin($$anchor, $$props) {
15963
16165
  };
15964
16166
  var div_1 = child(div);
15965
16167
  var span = sibling(child(div_1), 2);
15966
- var text = child(span);
16168
+ var text2 = child(span);
15967
16169
  reset(span);
15968
16170
  reset(div_1);
15969
16171
  var div_2 = sibling(div_1, 2);
@@ -16096,7 +16298,7 @@ function CategoriseWordBin($$anchor, $$props) {
16096
16298
  set_attribute(div, "aria-label", !get$1(hasSelectedItem) || !get$1(isNotSourceContainer) ? `Word Bin. ${get$1(itemsRemaining)} out of ${totalItems()} left.` : void 0);
16097
16299
  set_class(div, 1, `cat-bin-grp ${get$1(outerClasses) ?? ""}`);
16098
16300
  set_class(div_1, 1, clsx(get$1(titleClasses)));
16099
- set_text(text, `${get$1(itemsRemaining) ?? ""} out of ${totalItems() ?? ""} left`);
16301
+ set_text(text2, `${get$1(itemsRemaining) ?? ""} out of ${totalItems() ?? ""} left`);
16100
16302
  });
16101
16303
  event("focus", div, function(...$$args) {
16102
16304
  (onfocus() || void 0)?.apply(this, $$args);
@@ -16341,11 +16543,14 @@ function CategoriseComponent($$anchor, $$props) {
16341
16543
  onstateChange()(new CustomEvent("statechange", { detail: { state: get$1(interactionState), serialized } }));
16342
16544
  }
16343
16545
  };
16344
- const announceToScreenReader = async (message) => {
16546
+ const announceToScreenReader = async (message, hasMath = false) => {
16345
16547
  set(announcement, "");
16346
16548
  await tick();
16347
16549
  set(announcement, message, true);
16348
16550
  await tick();
16551
+ if (hasMath && get$1(srDivRef)) {
16552
+ await typesetMathJax(get$1(srDivRef));
16553
+ }
16349
16554
  setTimeout(
16350
16555
  () => {
16351
16556
  set(announcement, "");
@@ -16433,11 +16638,12 @@ function CategoriseComponent($$anchor, $$props) {
16433
16638
  const targetCategoryIndex = config().category_groups.findIndex((c) => c.id === targetContainerId);
16434
16639
  const targetCategory = targetCategoryIndex >= 0 ? config().category_groups[targetCategoryIndex] : void 0;
16435
16640
  if (item) {
16436
- const cleanItemName = useRemoveRichTextHtmlTags(item.name);
16437
- const cleanCategoryName = targetCategory ? useRemoveRichTextHtmlTags(targetCategory.name) : null;
16641
+ const itemName = useRemoveRichTextHtmlTags(item.name);
16642
+ const categoryName = targetCategory ? useRemoveRichTextHtmlTags(targetCategory.name) : null;
16438
16643
  const itemCount = targetContainerId === CATEGORISE.CONTAINER_WORD_BIN_ID ? get$1(interactionState).data.wordBinItems.length : api().getCategoryItems(get$1(interactionState), targetContainerId).length;
16439
- const message = createItemPlacementAnnouncement(cleanItemName, cleanCategoryName, targetCategoryIndex, itemCount, targetContainerId);
16440
- await announceToScreenReader(message);
16644
+ const message = createItemPlacementAnnouncement(itemName, categoryName, targetCategoryIndex, itemCount, targetContainerId);
16645
+ const containsMath = hasMathJax(message);
16646
+ await announceToScreenReader(containsMath ? processMathJax(message) : message, containsMath);
16441
16647
  }
16442
16648
  await playDropAnimation(targetContainerId);
16443
16649
  };
@@ -16488,11 +16694,12 @@ function CategoriseComponent($$anchor, $$props) {
16488
16694
  const targetCategoryIndex = containerId === CATEGORISE.CONTAINER_WORD_BIN_ID ? -1 : config().category_groups.findIndex((c) => c.id === containerId);
16489
16695
  const targetCategory = targetCategoryIndex >= 0 ? config().category_groups[targetCategoryIndex] : null;
16490
16696
  if (item) {
16491
- const cleanItemName = useRemoveRichTextHtmlTags(item.name);
16492
- const cleanCategoryName = targetCategory ? useRemoveRichTextHtmlTags(targetCategory.name) : null;
16697
+ const itemName = useRemoveRichTextHtmlTags(item.name);
16698
+ const categoryName = targetCategory ? useRemoveRichTextHtmlTags(targetCategory.name) : null;
16493
16699
  const itemCount = containerId === CATEGORISE.CONTAINER_WORD_BIN_ID ? get$1(interactionState).data.wordBinItems.length : api().getCategoryItems(get$1(interactionState), containerId).length;
16494
- const message = createItemPlacementAnnouncement(cleanItemName, cleanCategoryName, targetCategoryIndex, itemCount, containerId);
16495
- await announceToScreenReader(message);
16700
+ const message = createItemPlacementAnnouncement(itemName, categoryName, targetCategoryIndex, itemCount, containerId);
16701
+ const containsMath = hasMathJax(message);
16702
+ await announceToScreenReader(containsMath ? processMathJax(message) : message, containsMath);
16496
16703
  }
16497
16704
  await playDropAnimation(containerId);
16498
16705
  await tick();
@@ -16748,7 +16955,7 @@ function CategoriseComponent($$anchor, $$props) {
16748
16955
  bind_this(button, ($$value) => set(skipToWordBinRef, $$value), () => get$1(skipToWordBinRef));
16749
16956
  var div = sibling(button, 2);
16750
16957
  var div_1 = child(div);
16751
- var text = child(div_1, true);
16958
+ var text2 = child(div_1, true);
16752
16959
  reset(div_1);
16753
16960
  bind_this(div_1, ($$value) => set(srDivRef, $$value), () => get$1(srDivRef));
16754
16961
  var div_2 = sibling(div_1, 2);
@@ -16955,7 +17162,7 @@ function CategoriseComponent($$anchor, $$props) {
16955
17162
  reset(div);
16956
17163
  template_effect(() => {
16957
17164
  set_attribute(button, "tabindex", get$1(selectedItemId) ? -1 : 0);
16958
- set_text(text, get$1(announcement));
17165
+ set_text(text2, get$1(announcement));
16959
17166
  set_attribute(div_2, "aria-hidden", get$1(isModalOpen));
16960
17167
  });
16961
17168
  append($$anchor2, fragment_1);
@@ -17506,14 +17713,14 @@ const createCategoriseConfig = (data) => {
17506
17713
  };
17507
17714
  registerInteraction("categorise", createCategoriseInteraction, CategoriseComponent);
17508
17715
  function useDropdown(prompt, options) {
17509
- const parseText = (text) => {
17716
+ const parseText = (text2) => {
17510
17717
  const regex = /<eat-contentful:([^>]+)>/g;
17511
17718
  const parts = [];
17512
17719
  let lastIndex = 0;
17513
17720
  let match;
17514
- while ((match = regex.exec(text)) !== null) {
17721
+ while ((match = regex.exec(text2)) !== null) {
17515
17722
  if (match.index > lastIndex) {
17516
- const textBefore = text.substring(lastIndex, match.index);
17723
+ const textBefore = text2.substring(lastIndex, match.index);
17517
17724
  const strippedText = textBefore.replace(/<[^>]*>/g, "").trim();
17518
17725
  if (strippedText) {
17519
17726
  parts.push({
@@ -17531,8 +17738,8 @@ function useDropdown(prompt, options) {
17531
17738
  });
17532
17739
  lastIndex = regex.lastIndex;
17533
17740
  }
17534
- if (lastIndex < text.length) {
17535
- const textAfter = text.substring(lastIndex);
17741
+ if (lastIndex < text2.length) {
17742
+ const textAfter = text2.substring(lastIndex);
17536
17743
  const strippedText = textAfter.replace(/<[^>]*>/g, "").trim();
17537
17744
  if (strippedText) {
17538
17745
  parts.push({
@@ -18285,7 +18492,7 @@ function DropdownContainer($$anchor, $$props) {
18285
18492
  };
18286
18493
  var span = root$2();
18287
18494
  var span_1 = child(span);
18288
- var text = child(span_1, true);
18495
+ var text2 = child(span_1, true);
18289
18496
  reset(span_1);
18290
18497
  var node = sibling(span_1, 2);
18291
18498
  {
@@ -18544,7 +18751,7 @@ function DropdownContainer($$anchor, $$props) {
18544
18751
  bind_this(span, ($$value) => set(containerRef, $$value), () => get$1(containerRef));
18545
18752
  template_effect(() => {
18546
18753
  set_attribute(span_1, "id", labelId);
18547
- set_text(text, get$1(ariaLabel));
18754
+ set_text(text2, get$1(ariaLabel));
18548
18755
  set_attribute(div_1, "id", comboId);
18549
18756
  set_class(div_1, 1, `drp-cmb ${get$1(containerClasses) ?? ""}`);
18550
18757
  set_attribute(div_1, "aria-expanded", get$1(state$1).isOpen);
@@ -19343,10 +19550,10 @@ const createDropdownConfig = (loadedData) => {
19343
19550
  };
19344
19551
  registerInteraction("dropdown", createDropdownInteraction, DropdownComponent);
19345
19552
  const htmlUtils = {
19346
- decodeNbsp: (text) => text.replace(/&amp;nbsp;/g, " ").replace(/&nbsp;/g, " "),
19347
- decodeHtmlEntities: (text) => {
19348
- if (!text.includes("&")) return text;
19349
- return text.replace(/&#(\d+);/g, (_, n2) => String.fromCharCode(Number(n2))).replace(/&#x([0-9a-f]+);/gi, (_, h) => String.fromCharCode(parseInt(h, 16))).replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&");
19553
+ decodeNbsp: (text2) => text2.replace(/&amp;nbsp;/g, " ").replace(/&nbsp;/g, " "),
19554
+ decodeHtmlEntities: (text2) => {
19555
+ if (!text2.includes("&")) return text2;
19556
+ return text2.replace(/&#(\d+);/g, (_, n2) => String.fromCharCode(Number(n2))).replace(/&#x([0-9a-f]+);/gi, (_, h) => String.fromCharCode(parseInt(h, 16))).replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&");
19350
19557
  },
19351
19558
  stripTags: (html2) => html2.replace(/<[^>]+>/g, ""),
19352
19559
  hasHtmlTags: (s) => /<[^>]/.test(s),
@@ -19465,20 +19672,20 @@ const extractHtmlWords = (htmlText) => {
19465
19672
  };
19466
19673
  const splitParagraphs = (rawText) => rawText.split(/<\/p>/i).map((p) => p.replace(/^<p>/i, "").trim()).filter(Boolean);
19467
19674
  const decodeAuthored = (para) => para.replace(/&lt;eat-contentful&gt;/g, "<eat-contentful>").replace(/&lt;\/eat-contentful&gt;/g, "</eat-contentful>").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&apos;/g, "'");
19468
- const flushLeadingPunct = (text, state2) => {
19469
- const m = text.match(leadingPunctuationPattern);
19675
+ const flushLeadingPunct = (text2, state2) => {
19676
+ const m = text2.match(leadingPunctuationPattern);
19470
19677
  const extractedLeading = m ? m[1] : "";
19471
19678
  const lp = state2.pendingLeadingPunct + extractedLeading;
19472
19679
  const leadingPunctuation = lp.length ? lp : void 0;
19473
19680
  state2.pendingLeadingPunct = "";
19474
19681
  return { leadingPunctuation, extractedLeading };
19475
19682
  };
19476
- const appendTrailingOrPush = (text, state2) => {
19683
+ const appendTrailingOrPush = (text2, state2) => {
19477
19684
  const prev = state2.segments[state2.segments.length - 1];
19478
19685
  if (prev && !prev.isPunctuation && !prev.isLineBreak) {
19479
- prev.trailingPunctuation = (prev.trailingPunctuation ?? "") + text;
19686
+ prev.trailingPunctuation = (prev.trailingPunctuation ?? "") + text2;
19480
19687
  } else {
19481
- state2.segments.push({ id: `${state2.globalIndex}`, text, isPunctuation: true });
19688
+ state2.segments.push({ id: `${state2.globalIndex}`, text: text2, isPunctuation: true });
19482
19689
  state2.globalIndex++;
19483
19690
  }
19484
19691
  };
@@ -19538,9 +19745,9 @@ const processPlainWord = (visibleWord, state2) => {
19538
19745
  }
19539
19746
  if (!wordAfterLeading.length) return;
19540
19747
  const punctMatch = wordAfterLeading.match(trailingPunctuationPattern);
19541
- const text = decodeNbsp(punctMatch ? wordAfterLeading.slice(0, -punctMatch[1].length) : wordAfterLeading);
19748
+ const text2 = decodeNbsp(punctMatch ? wordAfterLeading.slice(0, -punctMatch[1].length) : wordAfterLeading);
19542
19749
  const trailingPunctuation = punctMatch ? punctMatch[1] : void 0;
19543
- state2.segments.push({ id: `${state2.globalIndex}`, text, leadingPunctuation, trailingPunctuation });
19750
+ state2.segments.push({ id: `${state2.globalIndex}`, text: text2, leadingPunctuation, trailingPunctuation });
19544
19751
  state2.globalIndex++;
19545
19752
  };
19546
19753
  const processContentfulToken = (match, state2) => {
@@ -19556,10 +19763,10 @@ const processContentfulToken = (match, state2) => {
19556
19763
  const rawText = punctMatch ? rawAfterLeading.slice(0, -punctMatch[1].length) : rawAfterLeading;
19557
19764
  const trailingPunctuation = punctMatch ? punctMatch[1] : void 0;
19558
19765
  const innerText = punctMatch ? textAfterLeading.slice(0, -punctMatch[1].length) : textAfterLeading;
19559
- const text = outerOpen + innerText + outerClose;
19766
+ const text2 = outerOpen + innerText + outerClose;
19560
19767
  state2.segments.push({
19561
19768
  id: `${state2.globalIndex}`,
19562
- text,
19769
+ text: text2,
19563
19770
  rawText,
19564
19771
  leadingPunctuation,
19565
19772
  trailingPunctuation,
@@ -19581,9 +19788,9 @@ const parseSentences = (rawText) => {
19581
19788
  const rawChunk = (contentfulMatch ? contentfulMatch[2] : chunk).trim();
19582
19789
  const displayText = decodeNbsp(rawChunk);
19583
19790
  if (displayText) {
19584
- const text = contentfulMatch ? outerOpen + displayText + outerClose : displayText;
19791
+ const text2 = contentfulMatch ? outerOpen + displayText + outerClose : displayText;
19585
19792
  const rawText2 = contentfulMatch ? rawChunk : void 0;
19586
- segments.push({ id: String(posIndex), text, rawText: rawText2, isContentful: contentfulMatch ? true : void 0 });
19793
+ segments.push({ id: String(posIndex), text: text2, rawText: rawText2, isContentful: contentfulMatch ? true : void 0 });
19587
19794
  posIndex++;
19588
19795
  }
19589
19796
  }
@@ -19638,7 +19845,7 @@ const parseWords = (rawText) => {
19638
19845
  }
19639
19846
  return state2.segments;
19640
19847
  };
19641
- const parseSelectableText = (text, selectableType) => selectableType === "Sentence" ? parseSentences(text) : parseWords(text);
19848
+ const parseSelectableText = (text2, selectableType) => selectableType === "Sentence" ? parseSentences(text2) : parseWords(text2);
19642
19849
  function getSegmentState(segmentId, selectedIds, correctAnswerIds, isPreviewMode2, isValidating) {
19643
19850
  const isSegmentSelected = selectedIds.includes(segmentId);
19644
19851
  const isInCorrectAnswers = correctAnswerIds.includes(segmentId);
@@ -19854,7 +20061,7 @@ var root_43 = /* @__PURE__ */ from_html(`<span class="sr-only">Missing answer</s
19854
20061
  var root_44 = /* @__PURE__ */ from_html(`<span class="segment-trailing-punct" aria-hidden="true"><!></span>`);
19855
20062
  var root_31 = /* @__PURE__ */ from_html(`<span role="button"><!><span class="selectable-segment-text"><!></span><!><!><!></span><!>`, 1);
19856
20063
  var root_28 = /* @__PURE__ */ from_html(`<span></span>`);
19857
- var root = /* @__PURE__ */ from_html(`<main class="selectable-text-passage" aria-describedby="passage-reader" data-testid="select-passage-ctr"><span id="passage-reader" class="sr-only"> </span> <div><!></div></main>`);
20064
+ var root = /* @__PURE__ */ from_html(`<main id="main-content" class="selectable-text-passage" aria-describedby="passage-reader" data-testid="select-passage-ctr"><span id="passage-reader" class="sr-only"> </span> <div><!></div></main>`);
19858
20065
  function SelectableTextInteractionContent($$anchor, $$props) {
19859
20066
  push($$props, true);
19860
20067
  let config = prop($$props, "config", 7), interactionState = prop($$props, "state", 7), isDataSaving = prop($$props, "isDataSaving", 7, false), contentfulSegmentIds = prop($$props, "contentfulSegmentIds", 23, () => []), onselection = prop($$props, "onselection", 7);
@@ -19873,8 +20080,8 @@ function SelectableTextInteractionContent($$anchor, $$props) {
19873
20080
  return stripTags2(s.leadingPunctuation ?? "") + decodeHtmlEntities2(stripTags2(s.text)) + stripTags2(s.trailingPunctuation ?? "");
19874
20081
  }).join(" ").replace(/\s+/g, " ").trim());
19875
20082
  const getSegmentAriaLabel = (segment, seg, segmentId) => {
19876
- const text = stripTags2(segment.text);
19877
- const parts = [`Option: ${text}`];
20083
+ const text2 = stripTags2(segment.text);
20084
+ const parts = [`Option: ${text2}`];
19878
20085
  if (seg.isCorrect) parts.push("correct");
19879
20086
  else if (seg.isIncorrect) parts.push("incorrect");
19880
20087
  else if (seg.isMissing) parts.push("missing answer");
@@ -20011,11 +20218,11 @@ function SelectableTextInteractionContent($$anchor, $$props) {
20011
20218
  },
20012
20219
  []
20013
20220
  );
20014
- const splitLastWord = (text) => {
20221
+ const splitLastWord = (text2) => {
20015
20222
  const tagRe = /<[^>]+>|[^<]+/g;
20016
20223
  const tokens = [];
20017
20224
  let m;
20018
- while ((m = tagRe.exec(text)) !== null) {
20225
+ while ((m = tagRe.exec(text2)) !== null) {
20019
20226
  tokens.push({ isTag: m[0].startsWith("<"), value: m[0] });
20020
20227
  }
20021
20228
  let splitTi = -1;
@@ -20030,7 +20237,7 @@ function SelectableTextInteractionContent($$anchor, $$props) {
20030
20237
  }
20031
20238
  }
20032
20239
  }
20033
- if (splitTi === -1) return ["", text];
20240
+ if (splitTi === -1) return ["", text2];
20034
20241
  const getTagName2 = (tag) => tag.replace(/^<\/?([^\s>/]+).*$/, "$1").toLowerCase();
20035
20242
  const openStack = [];
20036
20243
  for (let i = 0; i < splitTi; i++) {
@@ -20853,12 +21060,12 @@ function SelectableTextComponent($$anchor, $$props) {
20853
21060
  create_custom_element(SelectableTextComponent, { api: {}, config: {}, isDataSaving: {}, onstateChange: {} }, [], [], true);
20854
21061
  const createSelectableTextConfig = (data) => {
20855
21062
  const { mode, isFinished, isLocked, getItemRubric, getItemStimulus, getItemInteraction } = useSharedState(data);
20856
- const { prompt, text, selectable_type, is_single_mark, correct_answers, max_selections, feedback } = getItemInteraction();
20857
- const contentfulCount = (text?.match(/<eat-contentful>|&lt;eat-contentful&gt;/gi) ?? []).length;
21063
+ const { prompt, text: text2, selectable_type, is_single_mark, correct_answers, max_selections, feedback } = getItemInteraction();
21064
+ const contentfulCount = (text2?.match(/<eat-contentful>|&lt;eat-contentful&gt;/gi) ?? []).length;
20858
21065
  const maxSelections = contentfulCount || max_selections;
20859
21066
  return {
20860
21067
  prompt,
20861
- text,
21068
+ text: text2,
20862
21069
  selectable_type,
20863
21070
  is_single_mark,
20864
21071
  correct_answers,