@pie-qti/item-player 0.1.23 → 0.1.24

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.
@@ -296,9 +296,9 @@ function Ut(e) {
296
296
  function Wt(e) {
297
297
  let t = 0, n = wr(0), r;
298
298
  return () => {
299
- Xr() && (K(n), ri(() => (t === 0 && (r = Ui(() => e(() => kr(n)))), t += 1, () => {
299
+ Xr() && (K(n), ri(() => (t === 0 && (r = Ui(() => e(() => Or(n)))), t += 1, () => {
300
300
  jt(() => {
301
- --t, t === 0 && (r?.(), r = void 0, kr(n));
301
+ --t, t === 0 && (r?.(), r = void 0, Or(n));
302
302
  });
303
303
  })));
304
304
  };
@@ -370,7 +370,7 @@ var Yt = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Zt =
370
370
  }
371
371
  update_pending_count(e, t) {
372
372
  M(F, this, bn).call(this, e, t), N(an, this, P(an, this) + e), !(!P(un, this) || P(sn, this)) && (N(sn, this, !0), jt(() => {
373
- N(sn, this, !1), P(un, this) && Dr(P(un, this), P(an, this));
373
+ N(sn, this, !1), P(un, this) && Er(P(un, this), P(an, this));
374
374
  }));
375
375
  }
376
376
  get_effect_pending() {
@@ -423,7 +423,7 @@ function hn(e) {
423
423
  function gn() {
424
424
  let e = P(Zt, this).pending;
425
425
  e && (this.is_pending = !0, N(tn, this, oi(() => e(P(Yt, this)))), jt(() => {
426
- var e = N(rn, this, document.createDocumentFragment()), t = B();
426
+ var e = N(rn, this, document.createDocumentFragment()), t = Rr();
427
427
  e.append(t), N(en, this, M(F, this, yn).call(this, () => oi(() => P(Qt, this).call(this, t)))), P(on, this) === 0 && (P(Yt, this).before(e), N(rn, this, null), fi(P(tn, this), () => {
428
428
  N(tn, this, null);
429
429
  }), M(F, this, vn).call(this, L));
@@ -585,7 +585,7 @@ function On(e, t, n) {
585
585
  s.add(n), c.async_deriveds.set(t, n);
586
586
  }
587
587
  let u = (e, t = void 0) => {
588
- l?.(), s.delete(n), t !== Dn && (c.activate(), t ? (a.f |= Ve, Dr(a, t)) : (a.f & 8388608 && (a.f ^= Ve), Dr(a, e)), c.deactivate());
588
+ l?.(), s.delete(n), t !== Dn && (c.activate(), t ? (a.f |= Ve, Er(a, t)) : (a.f & 8388608 && (a.f ^= Ve), Er(a, e)), c.deactivate());
589
589
  };
590
590
  n.promise.then(u, (e) => u(null, e || "unknown"));
591
591
  }), Zr(() => {
@@ -920,19 +920,19 @@ function wr(e, t) {
920
920
  };
921
921
  }
922
922
  /*#__NO_SIDE_EFFECTS__*/
923
- function Tr(e, t) {
923
+ function z(e, t) {
924
924
  let n = wr(e, t);
925
925
  return Ti(n), n;
926
926
  }
927
927
  /*#__NO_SIDE_EFFECTS__*/
928
- function Er(e, t = !1, n = !0) {
928
+ function Tr(e, t = !1, n = !0) {
929
929
  let r = wr(e);
930
930
  return t || (r.equals = Ct), r;
931
931
  }
932
- function z(e, t, n = !1) {
933
- return W !== null && (!xi || W.f & 131072) && Ot() && W.f & 4325394 && (wi === null || !wi.has(e)) && st(), Dr(e, n ? jr(t) : t, Un);
932
+ function B(e, t, n = !1) {
933
+ return W !== null && (!xi || W.f & 131072) && Ot() && W.f & 4325394 && (wi === null || !wi.has(e)) && st(), Er(e, n ? Ar(t) : t, Un);
934
934
  }
935
- function Dr(e, t, n = null) {
935
+ function Er(e, t, n = null) {
936
936
  if (!e.equals(t)) {
937
937
  Sr.set(e, yi ? t : e.v);
938
938
  var r = sr.ensure();
@@ -940,11 +940,11 @@ function Dr(e, t, n = null) {
940
940
  let t = e;
941
941
  e.f & 2048 && jn(t), Rn === null && Ft(t);
942
942
  }
943
- e.wv = Pi(), Ar(e, Oe, n), Ot() && G !== null && G.f & 1024 && !(G.f & 96) && (Oi === null ? ki([e]) : Oi.push(e)), !r.is_fork && xr.size > 0 && !Cr && Or();
943
+ e.wv = Pi(), kr(e, Oe, n), Ot() && G !== null && G.f & 1024 && !(G.f & 96) && (Oi === null ? ki([e]) : Oi.push(e)), !r.is_fork && xr.size > 0 && !Cr && Dr();
944
944
  }
945
945
  return t;
946
946
  }
947
- function Or() {
947
+ function Dr() {
948
948
  Cr = !1;
949
949
  for (let e of xr) {
950
950
  e.f & 1024 && A(e, ke);
@@ -958,10 +958,10 @@ function Or() {
958
958
  }
959
959
  xr.clear();
960
960
  }
961
- function kr(e) {
962
- z(e, e.v + 1);
961
+ function Or(e) {
962
+ B(e, e.v + 1);
963
963
  }
964
- function Ar(e, t, n) {
964
+ function kr(e, t, n) {
965
965
  var r = e.reactions;
966
966
  if (r !== null) for (var i = Ot(), a = r.length, o = 0; o < a; o++) {
967
967
  var s = r[o], c = s.f;
@@ -970,7 +970,7 @@ function Ar(e, t, n) {
970
970
  if (l && A(s, t), c & 131072) xr.add(s);
971
971
  else if (c & 2) {
972
972
  var u = s;
973
- Rn?.delete(u), c & 65536 || (c & 512 && (G === null || !(G.f & 2097152)) && (s.f |= Re), Ar(u, ke, n));
973
+ Rn?.delete(u), c & 65536 || (c & 512 && (G === null || !(G.f & 2097152)) && (s.f |= Re), kr(u, ke, n));
974
974
  } else if (l) {
975
975
  var d = s;
976
976
  c & 16 && gr !== null && gr.add(d), n === null ? vr(d) : n.push(d);
@@ -978,40 +978,40 @@ function Ar(e, t, n) {
978
978
  }
979
979
  }
980
980
  }
981
- function jr(e) {
981
+ function Ar(e) {
982
982
  if (typeof e != "object" || !e || He in e) return e;
983
983
  let t = _e(e);
984
984
  if (t !== he && t !== ge) return e;
985
- var n = /* @__PURE__ */ new Map(), r = ce(e), i = /* @__PURE__ */ Tr(0), a = null, o = Mi, s = (e) => {
985
+ var n = /* @__PURE__ */ new Map(), r = ce(e), i = /* @__PURE__ */ z(0), a = null, o = Mi, s = (e) => {
986
986
  if (Mi === o) return e();
987
987
  var t = W, n = Mi;
988
988
  Si(null), Ni(o);
989
989
  var r = e();
990
990
  return Si(t), Ni(n), r;
991
991
  };
992
- return r && n.set("length", /* @__PURE__ */ Tr(e.length, a)), new Proxy(e, {
992
+ return r && n.set("length", /* @__PURE__ */ z(e.length, a)), new Proxy(e, {
993
993
  defineProperty(e, t, r) {
994
994
  (!("value" in r) || r.configurable === !1 || r.enumerable === !1 || r.writable === !1) && at();
995
995
  var i = n.get(t);
996
996
  return i === void 0 ? s(() => {
997
- var e = /* @__PURE__ */ Tr(r.value, a);
997
+ var e = /* @__PURE__ */ z(r.value, a);
998
998
  return n.set(t, e), e;
999
- }) : z(i, r.value, !0), !0;
999
+ }) : B(i, r.value, !0), !0;
1000
1000
  },
1001
1001
  deleteProperty(e, t) {
1002
1002
  var r = n.get(t);
1003
1003
  if (r === void 0) {
1004
1004
  if (t in e) {
1005
- let e = s(() => /* @__PURE__ */ Tr(T, a));
1006
- n.set(t, e), kr(i);
1005
+ let e = s(() => /* @__PURE__ */ z(T, a));
1006
+ n.set(t, e), Or(i);
1007
1007
  }
1008
- } else z(r, T), kr(i);
1008
+ } else B(r, T), Or(i);
1009
1009
  return !0;
1010
1010
  },
1011
1011
  get(t, r, i) {
1012
1012
  if (r === He) return e;
1013
1013
  var o = n.get(r), c = r in t;
1014
- if (o === void 0 && (!c || pe(t, r)?.writable) && (o = s(() => /* @__PURE__ */ Tr(jr(c ? t[r] : T), a)), n.set(r, o)), o !== void 0) {
1014
+ if (o === void 0 && (!c || pe(t, r)?.writable) && (o = s(() => /* @__PURE__ */ z(Ar(c ? t[r] : T), a)), n.set(r, o)), o !== void 0) {
1015
1015
  var l = K(o);
1016
1016
  return l === T ? void 0 : l;
1017
1017
  }
@@ -1036,27 +1036,27 @@ function jr(e) {
1036
1036
  has(e, t) {
1037
1037
  if (t === He) return !0;
1038
1038
  var r = n.get(t), i = r !== void 0 && r.v !== T || Reflect.has(e, t);
1039
- return (r !== void 0 || G !== null && (!i || pe(e, t)?.writable)) && (r === void 0 && (r = s(() => /* @__PURE__ */ Tr(i ? jr(e[t]) : T, a)), n.set(t, r)), K(r) === T) ? !1 : i;
1039
+ return (r !== void 0 || G !== null && (!i || pe(e, t)?.writable)) && (r === void 0 && (r = s(() => /* @__PURE__ */ z(i ? Ar(e[t]) : T, a)), n.set(t, r)), K(r) === T) ? !1 : i;
1040
1040
  },
1041
1041
  set(e, t, o, c) {
1042
1042
  var l = n.get(t), u = t in e;
1043
1043
  if (r && t === "length") for (var d = o; d < l.v; d += 1) {
1044
1044
  var f = n.get(d + "");
1045
- f === void 0 ? d in e && (f = s(() => /* @__PURE__ */ Tr(T, a)), n.set(d + "", f)) : z(f, T);
1045
+ f === void 0 ? d in e && (f = s(() => /* @__PURE__ */ z(T, a)), n.set(d + "", f)) : B(f, T);
1046
1046
  }
1047
- if (l === void 0) (!u || pe(e, t)?.writable) && (l = s(() => /* @__PURE__ */ Tr(void 0, a)), z(l, jr(o)), n.set(t, l));
1047
+ if (l === void 0) (!u || pe(e, t)?.writable) && (l = s(() => /* @__PURE__ */ z(void 0, a)), B(l, Ar(o)), n.set(t, l));
1048
1048
  else {
1049
1049
  u = l.v !== T;
1050
- var p = s(() => jr(o));
1051
- z(l, p);
1050
+ var p = s(() => Ar(o));
1051
+ B(l, p);
1052
1052
  }
1053
1053
  var m = Reflect.getOwnPropertyDescriptor(e, t);
1054
1054
  if (m?.set && m.set.call(c, o), !u) {
1055
1055
  if (r && typeof t == "string") {
1056
1056
  var h = n.get("length"), g = Number(t);
1057
- Number.isInteger(g) && g >= h.v && z(h, g + 1);
1057
+ Number.isInteger(g) && g >= h.v && B(h, g + 1);
1058
1058
  }
1059
- kr(i);
1059
+ Or(i);
1060
1060
  }
1061
1061
  return !0;
1062
1062
  },
@@ -1074,40 +1074,40 @@ function jr(e) {
1074
1074
  }
1075
1075
  });
1076
1076
  }
1077
- function Mr(e) {
1077
+ function jr(e) {
1078
1078
  try {
1079
1079
  if (typeof e == "object" && e && He in e) return e[He];
1080
1080
  } catch {}
1081
1081
  return e;
1082
1082
  }
1083
- function Nr(e, t) {
1084
- return Object.is(Mr(e), Mr(t));
1083
+ function Mr(e, t) {
1084
+ return Object.is(jr(e), jr(t));
1085
1085
  }
1086
- var Pr, Fr, Ir, Lr;
1087
- function Rr() {
1088
- if (Pr === void 0) {
1089
- Pr = window, Fr = /Firefox/.test(navigator.userAgent);
1086
+ var Nr, Pr, Fr, Ir;
1087
+ function Lr() {
1088
+ if (Nr === void 0) {
1089
+ Nr = window, Pr = /Firefox/.test(navigator.userAgent);
1090
1090
  var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1091
- Ir = pe(t, "firstChild").get, Lr = pe(t, "nextSibling").get, ve(e) && (e[Ke] = void 0, e[Ge] = null, e[qe] = void 0, e.__e = void 0), ve(n) && (n[Je] = void 0);
1091
+ Fr = pe(t, "firstChild").get, Ir = pe(t, "nextSibling").get, ve(e) && (e[Ke] = void 0, e[Ge] = null, e[qe] = void 0, e.__e = void 0), ve(n) && (n[Je] = void 0);
1092
1092
  }
1093
1093
  }
1094
- function B(e = "") {
1094
+ function Rr(e = "") {
1095
1095
  return document.createTextNode(e);
1096
1096
  }
1097
1097
  /*@__NO_SIDE_EFFECTS__*/
1098
1098
  function zr(e) {
1099
- return Ir.call(e);
1099
+ return Fr.call(e);
1100
1100
  }
1101
1101
  /*@__NO_SIDE_EFFECTS__*/
1102
1102
  function Br(e) {
1103
- return Lr.call(e);
1103
+ return Ir.call(e);
1104
1104
  }
1105
1105
  function V(e, t) {
1106
1106
  if (!E) return /* @__PURE__ */ zr(e);
1107
1107
  var n = /* @__PURE__ */ zr(D);
1108
- if (n === null) n = D.appendChild(B());
1108
+ if (n === null) n = D.appendChild(Rr());
1109
1109
  else if (t && n.nodeType !== 3) {
1110
- var r = B();
1110
+ var r = Rr();
1111
1111
  return n?.before(r), O(r), r;
1112
1112
  }
1113
1113
  return t && Kr(n), O(n), n;
@@ -1119,7 +1119,7 @@ function Vr(e, t = !1) {
1119
1119
  }
1120
1120
  if (t) {
1121
1121
  if (D?.nodeType !== 3) {
1122
- var r = B();
1122
+ var r = Rr();
1123
1123
  return D?.before(r), O(r), r;
1124
1124
  }
1125
1125
  Kr(D);
@@ -1132,7 +1132,7 @@ function Hr(e, t = 1, n = !1) {
1132
1132
  if (!E) return r;
1133
1133
  if (n) {
1134
1134
  if (r?.nodeType !== 3) {
1135
- var a = B();
1135
+ var a = Rr();
1136
1136
  return r === null ? i?.after(a) : r.before(a), O(a), a;
1137
1137
  }
1138
1138
  Kr(r);
@@ -1691,7 +1691,7 @@ function q(e, t) {
1691
1691
  return () => {
1692
1692
  if (E) return ma(D, null), D;
1693
1693
  i === void 0 && (i = pa(a ? e : "<!>" + e), n || (i = /* @__PURE__ */ zr(i)));
1694
- var t = r || Fr ? document.importNode(i, !0) : i.cloneNode(!0);
1694
+ var t = r || Pr ? document.importNode(i, !0) : i.cloneNode(!0);
1695
1695
  if (n) {
1696
1696
  var o = /* @__PURE__ */ zr(t), s = t.lastChild;
1697
1697
  ma(o, s);
@@ -1701,15 +1701,15 @@ function q(e, t) {
1701
1701
  }
1702
1702
  function ha(e = "") {
1703
1703
  if (!E) {
1704
- var t = B(e + "");
1704
+ var t = Rr(e + "");
1705
1705
  return ma(t, t), t;
1706
1706
  }
1707
1707
  var n = D;
1708
- return n.nodeType === 3 ? Kr(n) : (n.before(n = B()), O(n)), ma(n, n), n;
1708
+ return n.nodeType === 3 ? Kr(n) : (n.before(n = Rr()), O(n)), ma(n, n), n;
1709
1709
  }
1710
1710
  function ga() {
1711
1711
  if (E) return ma(D, null), D;
1712
- var e = document.createDocumentFragment(), t = document.createComment(""), n = B();
1712
+ var e = document.createDocumentFragment(), t = document.createComment(""), n = Rr();
1713
1713
  return e.append(t, n), ma(t, n), e;
1714
1714
  }
1715
1715
  function J(e, t) {
@@ -1729,9 +1729,9 @@ function va(e, t) {
1729
1729
  }
1730
1730
  var ya = /* @__PURE__ */ new Map();
1731
1731
  function ba(e, { target: t, anchor: n, props: r = {}, events: i, context: a, intro: o = !0, transformError: s }) {
1732
- Rr();
1732
+ Lr();
1733
1733
  var c = void 0, l = ei(() => {
1734
- var o = n ?? t.appendChild(B());
1734
+ var o = n ?? t.appendChild(Rr());
1735
1735
  Jt(o, { pending: () => {} }, (t) => {
1736
1736
  Et({});
1737
1737
  var n = wt;
@@ -1790,7 +1790,7 @@ var Ca = /* @__PURE__ */ new WeakMap(), wa = /* @__PURE__ */ new WeakMap(), Ta =
1790
1790
  let i = () => {
1791
1791
  if (Array.from(P(Ca, this).values()).includes(e)) {
1792
1792
  var t = document.createDocumentFragment();
1793
- gi(r, t), t.append(B()), P(Ta, this).set(e, {
1793
+ gi(r, t), t.append(Rr()), P(Ta, this).set(e, {
1794
1794
  effect: r,
1795
1795
  fragment: t
1796
1796
  });
@@ -1810,7 +1810,7 @@ var Ca = /* @__PURE__ */ new WeakMap(), wa = /* @__PURE__ */ new WeakMap(), Ta =
1810
1810
  var n = L, r = Wr();
1811
1811
  if (t && !P(wa, this).has(e) && !P(Ta, this).has(e)) {
1812
1812
  if (r) {
1813
- var i = document.createDocumentFragment(), a = B();
1813
+ var i = document.createDocumentFragment(), a = Rr();
1814
1814
  i.append(a), P(Ta, this).set(e, {
1815
1815
  effect: oi(() => t(a)),
1816
1816
  fragment: i
@@ -1893,7 +1893,7 @@ function Ia(e, t, n, r, i, a = null) {
1893
1893
  var o = e, s = /* @__PURE__ */ new Map();
1894
1894
  if (t & 4) {
1895
1895
  var c = e;
1896
- o = E ? O(/* @__PURE__ */ zr(c)) : c.appendChild(B());
1896
+ o = E ? O(/* @__PURE__ */ zr(c)) : c.appendChild(Rr());
1897
1897
  }
1898
1898
  E && _t();
1899
1899
  var l = null, u = /* @__PURE__ */ kn(() => {
@@ -1917,9 +1917,9 @@ function Ia(e, t, n, r, i, a = null) {
1917
1917
  for (var g = /* @__PURE__ */ new Set(), _ = L, v = Wr(), y = 0; y < e; y += 1) {
1918
1918
  E && D.nodeType === 8 && D.data === "]" && (o = D, c = !0, gt(!1));
1919
1919
  var b = d[y], ee = r(b, y), x = p ? null : s.get(ee);
1920
- x ? (x.v && Dr(x.v, b), x.i && Dr(x.i, y), v && _.unskip_effect(x.e)) : (x = za(s, p ? o : Fa ?? (Fa = B()), b, ee, y, i, t, n), p || (x.e.f |= Le), s.set(ee, x)), g.add(ee);
1920
+ x ? (x.v && Er(x.v, b), x.i && Er(x.i, y), v && _.unskip_effect(x.e)) : (x = za(s, p ? o : Fa ?? (Fa = Rr()), b, ee, y, i, t, n), p || (x.e.f |= Le), s.set(ee, x)), g.add(ee);
1921
1921
  }
1922
- if (e === 0 && a && !l && (p ? l = oi(() => a(o)) : (l = oi(() => a(Fa ?? (Fa = B()))), l.f |= Le)), e > g.size && $e("", "", ""), E && e > 0 && O(yt()), !p) {
1922
+ if (e === 0 && a && !l && (p ? l = oi(() => a(o)) : (l = oi(() => a(Fa ?? (Fa = Rr()))), l.f |= Le)), e > g.size && $e("", "", ""), E && e > 0 && O(yt()), !p) {
1923
1923
  if (f.set(_, g), v) {
1924
1924
  for (let [e, t] of s) g.has(e) || _.skip_effect(t.e);
1925
1925
  _.oncommit(m), _.ondiscard(h);
@@ -1992,7 +1992,7 @@ function Ra(e, t, n, r, i) {
1992
1992
  });
1993
1993
  }
1994
1994
  function za(e, t, n, r, i, a, o, s) {
1995
- var c = o & 1 ? o & 16 ? wr(n) : /* @__PURE__ */ Er(n, !1, !1) : null, l = o & 2 ? wr(i) : null;
1995
+ var c = o & 1 ? o & 16 ? wr(n) : /* @__PURE__ */ Tr(n, !1, !1) : null, l = o & 2 ? wr(i) : null;
1996
1996
  return {
1997
1997
  v: c,
1998
1998
  i: l,
@@ -2062,7 +2062,7 @@ function Ua(e, t, n, r, i, a) {
2062
2062
  if (s = E ? s : Gr(e, a), ma(s, s), r) {
2063
2063
  var n = null;
2064
2064
  E && ta(e) && s.append(n = document.createComment(""));
2065
- var i = E ? /* @__PURE__ */ zr(s) : s.appendChild(B());
2065
+ var i = E ? /* @__PURE__ */ zr(s) : s.appendChild(Rr());
2066
2066
  E && (i === null ? gt(!1) : O(i)), r(s, i), n?.remove();
2067
2067
  }
2068
2068
  G.nodes.end = s, t.before(s);
@@ -2221,7 +2221,7 @@ function io(e, t, n = !1) {
2221
2221
  for (var r of e.options) r.selected = t.includes(oo(r));
2222
2222
  return;
2223
2223
  }
2224
- for (r of e.options) if (Nr(oo(r), t)) {
2224
+ for (r of e.options) if (Mr(oo(r), t)) {
2225
2225
  r.selected = !0;
2226
2226
  return;
2227
2227
  }
@@ -2466,25 +2466,239 @@ function Po(e, t, n, r) {
2466
2466
  var y = G;
2467
2467
  return (function(e, t) {
2468
2468
  if (arguments.length > 0) {
2469
- let n = t ? K(v) : i && a ? jr(e) : e;
2470
- return z(v, n), _ = !0, s !== void 0 && (s = n), e;
2469
+ let n = t ? K(v) : i && a ? Ar(e) : e;
2470
+ return B(v, n), _ = !0, s !== void 0 && (s = n), e;
2471
2471
  }
2472
2472
  return yi && _ || y.f & 16384 ? v.v : K(v);
2473
2473
  });
2474
2474
  }
2475
+ var Fo, Io = !1, Lo = /* @__PURE__ */ new WeakMap(), Ro = /* @__PURE__ */ new WeakMap(), zo = /* @__PURE__ */ new WeakMap(), Bo = /* @__PURE__ */ new WeakSet();
2476
+ Fo = class extends Date {
2477
+ constructor(...e) {
2478
+ super(...e), Kt(this, Bo), j(this, Lo, /* @__PURE__ */ z(super.getTime())), j(this, Ro, /* @__PURE__ */ new Map()), j(this, zo, W), Io || M(Bo, this, Vo).call(this);
2479
+ }
2480
+ };
2481
+ function Vo() {
2482
+ Io = !0;
2483
+ var e = Fo.prototype, t = Date.prototype, n = Object.getOwnPropertyNames(t);
2484
+ for (let r of n) (r.startsWith("get") || r.startsWith("to") || r === "valueOf") && (e[r] = function(...e) {
2485
+ if (e.length > 0) return K(P(Lo, this)), t[r].apply(this, e);
2486
+ var n = P(Ro, this).get(r);
2487
+ if (n === void 0) {
2488
+ let i = W;
2489
+ Si(P(zo, this)), n = /* @__PURE__ */ I(() => (K(P(Lo, this)), t[r].apply(this, e))), P(Ro, this).set(r, n), Si(i);
2490
+ }
2491
+ return K(n);
2492
+ }), r.startsWith("set") && (e[r] = function(...e) {
2493
+ var n = t[r].apply(this, e);
2494
+ return B(P(Lo, this), t.getTime.call(this)), n;
2495
+ });
2496
+ }
2497
+ //#endregion
2498
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/reactivity/set.js
2499
+ var Ho, Uo, Wo = [
2500
+ "forEach",
2501
+ "isDisjointFrom",
2502
+ "isSubsetOf",
2503
+ "isSupersetOf"
2504
+ ], Go = [
2505
+ "difference",
2506
+ "intersection",
2507
+ "symmetricDifference",
2508
+ "union"
2509
+ ], Ko = !1, qo = /* @__PURE__ */ new WeakMap(), Jo = /* @__PURE__ */ new WeakMap(), Yo = /* @__PURE__ */ new WeakMap(), Xo = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakSet();
2510
+ Uo = Symbol.iterator, Ho = class extends Set {
2511
+ constructor(e) {
2512
+ if (super(), Kt(this, Zo), j(this, qo, /* @__PURE__ */ new Map()), j(this, Jo, /* @__PURE__ */ z(0)), j(this, Yo, /* @__PURE__ */ z(0)), j(this, Xo, Mi || -1), e) {
2513
+ for (var t of e) super.add(t);
2514
+ P(Yo, this).v = super.size;
2515
+ }
2516
+ Ko || M(Zo, this, $o).call(this);
2517
+ }
2518
+ has(e) {
2519
+ var t = super.has(e), n = P(qo, this), r = n.get(e);
2520
+ if (r === void 0) {
2521
+ if (!t) return K(P(Jo, this)), !1;
2522
+ r = M(Zo, this, Qo).call(this, !0), n.set(e, r);
2523
+ }
2524
+ return K(r), t;
2525
+ }
2526
+ add(e) {
2527
+ return super.has(e) || (super.add(e), B(P(Yo, this), super.size), Or(P(Jo, this))), this;
2528
+ }
2529
+ delete(e) {
2530
+ var t = super.delete(e), n = P(qo, this), r = n.get(e);
2531
+ return r !== void 0 && (n.delete(e), B(r, !1)), t && (B(P(Yo, this), super.size), Or(P(Jo, this))), t;
2532
+ }
2533
+ clear() {
2534
+ if (super.size !== 0) {
2535
+ super.clear();
2536
+ var e = P(qo, this);
2537
+ for (var t of e.values()) B(t, !1);
2538
+ e.clear(), B(P(Yo, this), 0), Or(P(Jo, this));
2539
+ }
2540
+ }
2541
+ keys() {
2542
+ return this.values();
2543
+ }
2544
+ values() {
2545
+ return K(P(Jo, this)), super.values();
2546
+ }
2547
+ entries() {
2548
+ return K(P(Jo, this)), super.entries();
2549
+ }
2550
+ [Uo]() {
2551
+ return this.keys();
2552
+ }
2553
+ get size() {
2554
+ return K(P(Yo, this));
2555
+ }
2556
+ };
2557
+ function Qo(e) {
2558
+ return Mi === P(Xo, this) ? /* @__PURE__ */ z(e) : wr(e);
2559
+ }
2560
+ function $o() {
2561
+ Ko = !0;
2562
+ var e = Ho.prototype, t = Set.prototype;
2563
+ for (let n of Wo) e[n] = function(...e) {
2564
+ return K(P(Jo, this)), t[n].apply(this, e);
2565
+ };
2566
+ for (let n of Go) e[n] = function(...e) {
2567
+ K(P(Jo, this));
2568
+ var r = t[n].apply(this, e);
2569
+ return new Ho(r);
2570
+ };
2571
+ }
2572
+ //#endregion
2573
+ //#region \0@oxc-project+runtime@0.144.0/helpers/esm/getPrototypeOf.js
2574
+ function es(e) {
2575
+ return es = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
2576
+ return e.__proto__ || Object.getPrototypeOf(e);
2577
+ }, es(e);
2578
+ }
2579
+ //#endregion
2580
+ //#region \0@oxc-project+runtime@0.144.0/helpers/esm/superPropBase.js
2581
+ function ts(e, t) {
2582
+ for (; !{}.hasOwnProperty.call(e, t) && (e = es(e)) !== null;);
2583
+ return e;
2584
+ }
2585
+ //#endregion
2586
+ //#region \0@oxc-project+runtime@0.144.0/helpers/esm/get.js
2587
+ function ns() {
2588
+ return ns = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(e, t, n) {
2589
+ var r = ts(e, t);
2590
+ if (r) {
2591
+ var i = Object.getOwnPropertyDescriptor(r, t);
2592
+ return i.get ? i.get.call(arguments.length < 3 ? e : n) : i.value;
2593
+ }
2594
+ }, ns.apply(null, arguments);
2595
+ }
2596
+ //#endregion
2597
+ //#region \0@oxc-project+runtime@0.144.0/helpers/esm/superPropGet.js
2598
+ function rs(e, t, n, r) {
2599
+ var i = ns(es(1 & r ? e.prototype : e), t, n);
2600
+ return 2 & r && typeof i == "function" ? function(e) {
2601
+ return i.apply(n, e);
2602
+ } : i;
2603
+ }
2604
+ //#endregion
2605
+ //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/reactivity/map.js
2606
+ var is, as, os = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), ls = /* @__PURE__ */ new WeakMap(), us = /* @__PURE__ */ new WeakSet();
2607
+ as = Symbol.iterator, is = class extends Map {
2608
+ constructor(e) {
2609
+ if (super(), Kt(this, us), j(this, os, /* @__PURE__ */ new Map()), j(this, ss, /* @__PURE__ */ z(0)), j(this, cs, /* @__PURE__ */ z(0)), j(this, ls, Mi || -1), e) {
2610
+ for (var [t, n] of e) super.set(t, n);
2611
+ P(cs, this).v = super.size;
2612
+ }
2613
+ }
2614
+ has(e) {
2615
+ var t = P(os, this), n = t.get(e);
2616
+ if (n === void 0) {
2617
+ if (super.has(e)) n = M(us, this, ds).call(this, 0), t.set(e, n);
2618
+ else return K(P(ss, this)), !1;
2619
+ }
2620
+ return K(n), !0;
2621
+ }
2622
+ forEach(e, t) {
2623
+ M(us, this, fs).call(this), super.forEach(e, t);
2624
+ }
2625
+ get(e) {
2626
+ var t = P(os, this), n = t.get(e);
2627
+ if (n === void 0) {
2628
+ if (super.has(e)) n = M(us, this, ds).call(this, 0), t.set(e, n);
2629
+ else {
2630
+ K(P(ss, this));
2631
+ return;
2632
+ }
2633
+ }
2634
+ return K(n), super.get(e);
2635
+ }
2636
+ set(e, t) {
2637
+ var n = P(os, this), r = n.get(e), i = super.get(e), a = super.set(e, t), o = P(ss, this);
2638
+ if (r === void 0) r = M(us, this, ds).call(this, 0), n.set(e, r), B(P(cs, this), super.size), Or(o);
2639
+ else if (i !== t) {
2640
+ Or(r);
2641
+ var s = o.reactions === null ? null : new Set(o.reactions);
2642
+ (s === null || !r.reactions?.every((e) => s.has(e))) && Or(o);
2643
+ }
2644
+ return a;
2645
+ }
2646
+ delete(e) {
2647
+ var t = P(os, this), n = t.get(e), r = super.delete(e);
2648
+ return n !== void 0 && (t.delete(e), B(n, -1)), r && (B(P(cs, this), super.size), Or(P(ss, this))), r;
2649
+ }
2650
+ clear() {
2651
+ if (super.size !== 0) {
2652
+ super.clear();
2653
+ var e = P(os, this);
2654
+ B(P(cs, this), 0);
2655
+ for (var t of e.values()) B(t, -1);
2656
+ Or(P(ss, this)), e.clear();
2657
+ }
2658
+ }
2659
+ keys() {
2660
+ return K(P(ss, this)), super.keys();
2661
+ }
2662
+ values() {
2663
+ return M(us, this, fs).call(this), super.values();
2664
+ }
2665
+ entries() {
2666
+ return M(us, this, fs).call(this), super.entries();
2667
+ }
2668
+ [as]() {
2669
+ return this.entries();
2670
+ }
2671
+ get size() {
2672
+ return K(P(cs, this)), super.size;
2673
+ }
2674
+ };
2675
+ function ds(e) {
2676
+ return Mi === P(ls, this) ? /* @__PURE__ */ z(e) : wr(e);
2677
+ }
2678
+ function fs() {
2679
+ K(P(ss, this));
2680
+ var e = P(os, this);
2681
+ if (P(cs, this).v !== e.size) {
2682
+ for (var t of rs(is.prototype, "keys", this, 2)([])) if (!e.has(t)) {
2683
+ var n = M(us, this, ds).call(this, 0);
2684
+ e.set(t, n);
2685
+ }
2686
+ }
2687
+ for ([, n] of P(os, this)) K(n);
2688
+ }
2475
2689
  //#endregion
2476
2690
  //#region ../../node_modules/.bun/svelte@5.56.9/node_modules/svelte/src/internal/disclose-version.js
2477
2691
  if (typeof window < "u") {
2478
- var Fo, Io;
2479
- ((Fo = (Io = window).__svelte ?? (Io.__svelte = {})).v ?? (Fo.v = /* @__PURE__ */ new Set())).add("5");
2692
+ var ps, ms;
2693
+ ((ps = (ms = window).__svelte ?? (ms.__svelte = {})).v ?? (ps.v = /* @__PURE__ */ new Set())).add("5");
2480
2694
  }
2481
2695
  //#endregion
2482
2696
  //#region src/extraction/types.ts
2483
- var Lo = class extends Error {
2697
+ var hs = class extends Error {
2484
2698
  constructor(e, t, n, r) {
2485
2699
  super(e), this.extractorId = t, this.elementType = n, this.cause = r, this.name = "ExtractionError";
2486
2700
  }
2487
- }, Ro = Symbol("registerFrameworkDeliveryFields"), zo = class e {
2701
+ }, gs = Symbol("registerFrameworkDeliveryFields"), _s = class e {
2488
2702
  constructor(e) {
2489
2703
  this.extractorsById = /* @__PURE__ */ new Map(), this.extractorsByType = /* @__PURE__ */ new Map(), this.deliveryFieldsByType = /* @__PURE__ */ new Map(), this.frameworkDeliveryFieldsByType = /* @__PURE__ */ new Map(), this.sealed = !1, this.qti2xMapper = new t(), this.elementNameMapper = e;
2490
2704
  }
@@ -2494,7 +2708,7 @@ var Lo = class extends Error {
2494
2708
  if (!e.elementTypes || e.elementTypes.length === 0) throw Error(`Extractor '${e.id}' must specify at least one element type`);
2495
2709
  if (typeof e.priority != "number") throw Error(`Extractor '${e.id}' must have a numeric priority`);
2496
2710
  if (e.outputType !== void 0 && (typeof e.outputType != "string" || !e.outputType)) throw Error(`Extractor '${e.id}' must have a non-empty outputType`);
2497
- let t = Uo(e);
2711
+ let t = xs(e);
2498
2712
  this.extractorsById.set(t.id, t);
2499
2713
  for (let e of t.elementTypes) {
2500
2714
  let n = this.qti2xMapper.toCanonical(e), r = this.extractorsByType.get(n);
@@ -2533,7 +2747,7 @@ var Lo = class extends Error {
2533
2747
  let t = e.rawTagName || "unknown";
2534
2748
  return {
2535
2749
  success: !1,
2536
- error: new Lo(`No extractor available for element '${t}'. Registered types: ${Array.from(this.extractorsByType.keys()).join(", ")}`, "none", t)
2750
+ error: new hs(`No extractor available for element '${t}'. Registered types: ${Array.from(this.extractorsByType.keys()).join(", ")}`, "none", t)
2537
2751
  };
2538
2752
  }
2539
2753
  try {
@@ -2542,7 +2756,7 @@ var Lo = class extends Error {
2542
2756
  let t = n.validate(r);
2543
2757
  if (!t.valid) return {
2544
2758
  success: !1,
2545
- error: new Lo(`Validation failed for extractor '${n.id}': ${t.errors?.join(", ")}`, n.id, e.rawTagName || "unknown")
2759
+ error: new hs(`Validation failed for extractor '${n.id}': ${t.errors?.join(", ")}`, n.id, e.rawTagName || "unknown")
2546
2760
  };
2547
2761
  if (t.warnings && t.warnings.length > 0) return {
2548
2762
  success: !0,
@@ -2560,7 +2774,7 @@ var Lo = class extends Error {
2560
2774
  let r = e.rawTagName || "unknown";
2561
2775
  return {
2562
2776
  success: !1,
2563
- error: t instanceof Lo ? t : new Lo(`Extraction failed for '${r}': ${t instanceof Error ? t.message : String(t)}`, n.id, r, t instanceof Error ? t : void 0)
2777
+ error: t instanceof hs ? t : new hs(`Extraction failed for '${r}': ${t instanceof Error ? t.message : String(t)}`, n.id, r, t instanceof Error ? t : void 0)
2564
2778
  };
2565
2779
  }
2566
2780
  }
@@ -2575,16 +2789,16 @@ var Lo = class extends Error {
2575
2789
  registerDeliveryFields(e, t) {
2576
2790
  this.assertMutable();
2577
2791
  let n = this.qti2xMapper.toCanonical(e), r = this.deliveryFieldsByType.get(n) ?? [];
2578
- this.deliveryFieldsByType.set(n, Wo([...r, ...t]));
2792
+ this.deliveryFieldsByType.set(n, Ss([...r, ...t]));
2579
2793
  }
2580
- [Ro](e, t) {
2794
+ [gs](e, t) {
2581
2795
  this.assertMutable();
2582
2796
  let n = this.qti2xMapper.toCanonical(e), r = this.frameworkDeliveryFieldsByType.get(n) ?? [];
2583
- this.frameworkDeliveryFieldsByType.set(n, Wo([...r, ...t]));
2797
+ this.frameworkDeliveryFieldsByType.set(n, Ss([...r, ...t]));
2584
2798
  }
2585
2799
  getDeliveryFieldsForType(e) {
2586
2800
  let t = this.qti2xMapper.toCanonical(e);
2587
- return Go(this.deliveryFieldsByType.get(t) ?? Bo, this.frameworkDeliveryFieldsByType.get(t) ?? Bo);
2801
+ return Cs(this.deliveryFieldsByType.get(t) ?? vs, this.frameworkDeliveryFieldsByType.get(t) ?? vs);
2588
2802
  }
2589
2803
  hasExtractor(e) {
2590
2804
  return this.extractorsById.has(e);
@@ -2595,8 +2809,8 @@ var Lo = class extends Error {
2595
2809
  clone() {
2596
2810
  let t = new e(this.elementNameMapper);
2597
2811
  for (let e of this.extractorsById.values()) t.register(e);
2598
- for (let [e, n] of this.deliveryFieldsByType) t.deliveryFieldsByType.set(e, Wo(n));
2599
- for (let [e, n] of this.frameworkDeliveryFieldsByType) t.frameworkDeliveryFieldsByType.set(e, Wo(n));
2812
+ for (let [e, n] of this.deliveryFieldsByType) t.deliveryFieldsByType.set(e, Ss(n));
2813
+ for (let [e, n] of this.frameworkDeliveryFieldsByType) t.frameworkDeliveryFieldsByType.set(e, Ss(n));
2600
2814
  return t;
2601
2815
  }
2602
2816
  seal() {
@@ -2608,15 +2822,15 @@ var Lo = class extends Error {
2608
2822
  assertMutable() {
2609
2823
  if (this.sealed) throw Error("ExtractionRegistry is sealed for this AssessmentItem; create a new definition to change InteractionModules");
2610
2824
  }
2611
- }, Bo = Object.freeze([]);
2612
- function Vo(e) {
2613
- return new zo(e);
2825
+ }, vs = Object.freeze([]);
2826
+ function ys(e) {
2827
+ return new _s(e);
2614
2828
  }
2615
- function Ho(e, t, n) {
2616
- e[Ro](t, n);
2829
+ function bs(e, t, n) {
2830
+ e[gs](t, n);
2617
2831
  }
2618
- function Uo(e) {
2619
- let t = e.delivery ? Object.freeze({ fields: Wo(e.delivery.fields) }) : void 0;
2832
+ function xs(e) {
2833
+ let t = e.delivery ? Object.freeze({ fields: Ss(e.delivery.fields) }) : void 0;
2620
2834
  return Object.freeze({
2621
2835
  id: e.id,
2622
2836
  name: e.name,
@@ -2630,27 +2844,27 @@ function Uo(e) {
2630
2844
  ...e.validate ? { validate: e.validate.bind(e) } : {}
2631
2845
  });
2632
2846
  }
2633
- function Wo(e) {
2847
+ function Ss(e) {
2634
2848
  return Object.freeze(e.map((e) => Object.freeze({
2635
2849
  ...e,
2636
2850
  path: Object.freeze([...e.path])
2637
2851
  })));
2638
2852
  }
2639
- function Go(e, t) {
2640
- if (e.length === 0 && t.length === 0) return Bo;
2853
+ function Cs(e, t) {
2854
+ if (e.length === 0 && t.length === 0) return vs;
2641
2855
  let n = /* @__PURE__ */ new Map();
2642
2856
  for (let r of [...e, ...t]) n.set(JSON.stringify(r.path), r);
2643
- return Wo([...n.values()]);
2857
+ return Ss([...n.values()]);
2644
2858
  }
2645
2859
  //#endregion
2646
2860
  //#region src/extraction/deliveryTypes.ts
2647
- function Ko(...e) {
2861
+ function ws(...e) {
2648
2862
  return {
2649
2863
  kind: "html",
2650
2864
  path: e
2651
2865
  };
2652
2866
  }
2653
- function qo(e, ...t) {
2867
+ function Ts(e, ...t) {
2654
2868
  return {
2655
2869
  kind: "url",
2656
2870
  path: t,
@@ -2659,7 +2873,7 @@ function qo(e, ...t) {
2659
2873
  }
2660
2874
  //#endregion
2661
2875
  //#region src/core/random.ts
2662
- function Jo(e) {
2876
+ function Es(e) {
2663
2877
  let t = e >>> 0;
2664
2878
  return () => {
2665
2879
  t = t + 1831565813 >>> 0;
@@ -2669,15 +2883,15 @@ function Jo(e) {
2669
2883
  }
2670
2884
  //#endregion
2671
2885
  //#region src/core/shuffle.ts
2672
- function Yo(e) {
2886
+ function Ds(e) {
2673
2887
  let t = 2166136261;
2674
2888
  for (let n = 0; n < e.length; n++) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
2675
2889
  return t >>> 0;
2676
2890
  }
2677
- function Xo(e, t) {
2678
- return Jo(Yo(`${e}:${t}`));
2891
+ function Os(e, t) {
2892
+ return Es(Ds(`${e}:${t}`));
2679
2893
  }
2680
- function Zo(e, t, n) {
2894
+ function ks(e, t, n) {
2681
2895
  let r = /* @__PURE__ */ new Map(), i = [];
2682
2896
  for (let n = 0; n < e.length; n++) {
2683
2897
  let a = e[n];
@@ -2694,12 +2908,12 @@ function Zo(e, t, n) {
2694
2908
  }
2695
2909
  return a;
2696
2910
  }
2697
- function Qo(e, t, n) {
2698
- return !t || !n || e.length < 2 ? [...e] : Zo(e, (e) => e.fixed === !0, n);
2911
+ function As(e, t, n) {
2912
+ return !t || !n || e.length < 2 ? [...e] : ks(e, (e) => e.fixed === !0, n);
2699
2913
  }
2700
2914
  //#endregion
2701
2915
  //#region src/interactions/associate/extractor.ts
2702
- var $o = {
2916
+ var js = {
2703
2917
  id: "qti:associate-interaction",
2704
2918
  name: "QTI Standard Associate Interaction",
2705
2919
  priority: 10,
@@ -2721,7 +2935,7 @@ var $o = {
2721
2935
  };
2722
2936
  }), i = n.getBooleanAttribute(e, "shuffle"), a = n.getNumberAttribute(e, "maxAssociations", 0), o = n.getNumberAttribute(e, "minAssociations", 0), s = n.getChildrenByTag(e, "prompt"), c = s.length > 0 ? n.getHtmlContent(s[0]) : null;
2723
2937
  return {
2724
- choices: Qo(r, i, t.shuffleRng),
2938
+ choices: As(r, i, t.shuffleRng),
2725
2939
  shuffle: i,
2726
2940
  maxAssociations: a,
2727
2941
  ...o > 0 ? { minAssociations: o } : {},
@@ -2739,7 +2953,7 @@ var $o = {
2739
2953
  errors: t.length > 0 ? t : void 0
2740
2954
  };
2741
2955
  }
2742
- }, es = {
2956
+ }, Ms = {
2743
2957
  id: "qti:choice-interaction",
2744
2958
  name: "QTI Standard Choice Interaction",
2745
2959
  priority: 10,
@@ -2759,7 +2973,7 @@ var $o = {
2759
2973
  };
2760
2974
  }), i = n.querySelector(e, "prompt"), a = i ? n.getHtmlContent(i) : null, o = n.getBooleanAttribute(e, "shuffle"), s = n.getNumberAttribute(e, "maxChoices", 1), c = n.getNumberAttribute(e, "minChoices", 0), l = n.getClasses(e), u = n.getAttribute(e, "data-max-selections-message", "") || null, d = n.getAttribute(e, "data-min-selections-message", "") || null;
2761
2975
  return {
2762
- choices: Qo(r, o, t.shuffleRng),
2976
+ choices: As(r, o, t.shuffleRng),
2763
2977
  shuffle: o,
2764
2978
  maxChoices: s,
2765
2979
  minChoices: c,
@@ -2781,7 +2995,7 @@ var $o = {
2781
2995
  warnings: n.length > 0 ? n : void 0
2782
2996
  };
2783
2997
  }
2784
- }, ts = {
2998
+ }, Ns = {
2785
2999
  id: "qti:custom-interaction",
2786
3000
  name: "QTI Standard Custom Interaction",
2787
3001
  priority: 10,
@@ -2789,7 +3003,7 @@ var $o = {
2789
3003
  description: "Extracts standard QTI customInteraction (custom/portable interactions)",
2790
3004
  canHandle(e, t) {
2791
3005
  let n = e.rawTagName?.toLowerCase() ?? "";
2792
- return n !== "custominteraction" && n !== "qti-custom-interaction" ? !1 : !ns(e);
3006
+ return n !== "custominteraction" && n !== "qti-custom-interaction" ? !1 : !Ps(e);
2793
3007
  },
2794
3008
  extract(e, t) {
2795
3009
  let { utils: n } = t, r = e.outerHTML || e.toString(), i = {};
@@ -2809,7 +3023,7 @@ var $o = {
2809
3023
  };
2810
3024
  }
2811
3025
  };
2812
- function ns(e) {
3026
+ function Ps(e) {
2813
3027
  let t = (e) => {
2814
3028
  for (let n of e.childNodes ?? []) {
2815
3029
  let e = n, r = e.rawTagName?.toLowerCase() ?? "", i = r.includes(":") ? r.slice(r.lastIndexOf(":") + 1) : r;
@@ -2821,29 +3035,29 @@ function ns(e) {
2821
3035
  }
2822
3036
  //#endregion
2823
3037
  //#region src/security/styleValues.ts
2824
- var rs = /^(?:\d+(?:\.\d*)?|\.\d+)$/, is = 1e5;
2825
- function as(e, t) {
3038
+ var Fs = /^(?:\d+(?:\.\d*)?|\.\d+)$/, Is = 1e5;
3039
+ function Ls(e, t) {
2826
3040
  if (typeof e == "number") return Number.isFinite(e) && e >= 0 ? e : null;
2827
3041
  if (typeof e != "string") return null;
2828
3042
  let n = e.trim();
2829
- if (t && n.toLowerCase().endsWith("px") && (n = n.slice(0, -2).trim()), !rs.test(n)) return null;
3043
+ if (t && n.toLowerCase().endsWith("px") && (n = n.slice(0, -2).trim()), !Fs.test(n)) return null;
2830
3044
  let r = Number(n);
2831
- return Number.isFinite(r) && r >= 0 && r <= is ? r : null;
3045
+ return Number.isFinite(r) && r >= 0 && r <= Is ? r : null;
2832
3046
  }
2833
- function os(e) {
2834
- let t = as(e, !0);
3047
+ function Rs(e) {
3048
+ let t = Ls(e, !0);
2835
3049
  return t === null ? null : `${t}px`;
2836
3050
  }
2837
3051
  function X(e, t) {
2838
- let n = as(e, !1);
3052
+ let n = Ls(e, !1);
2839
3053
  if (n !== null && n > 0) return String(n);
2840
3054
  if (t === void 0) return;
2841
- let r = as(t, !1);
3055
+ let r = Ls(t, !1);
2842
3056
  return r !== null && r > 0 ? String(r) : void 0;
2843
3057
  }
2844
3058
  //#endregion
2845
3059
  //#region src/interactions/drawing/extractor.ts
2846
- var ss = {
3060
+ var zs = {
2847
3061
  id: "qti:drawing-interaction",
2848
3062
  name: "QTI Standard Drawing Interaction",
2849
3063
  priority: 10,
@@ -2884,7 +3098,7 @@ var ss = {
2884
3098
  warnings: t.length > 0 ? t : void 0
2885
3099
  };
2886
3100
  }
2887
- }, cs = {
3101
+ }, Bs = {
2888
3102
  id: "qti:end-attempt-interaction",
2889
3103
  name: "QTI Standard End Attempt Interaction",
2890
3104
  priority: 10,
@@ -2909,7 +3123,7 @@ var ss = {
2909
3123
  warnings: n.length > 0 ? n : void 0
2910
3124
  };
2911
3125
  }
2912
- }, ls = {
3126
+ }, Vs = {
2913
3127
  id: "qti:extended-text-interaction",
2914
3128
  name: "QTI Standard Extended Text Interaction",
2915
3129
  priority: 10,
@@ -2954,18 +3168,18 @@ var ss = {
2954
3168
  warnings: n.length > 0 ? n : void 0
2955
3169
  };
2956
3170
  }
2957
- }, us = /<(?:qti-gap|gap)(?=[\s/>])([^>]*)\/?>/gi, ds = /<\/(?:qti-gap|gap)>/gi, fs = /<(?:qti-gap-text|gapText)\b[\s\S]*?<\/(?:qti-gap-text|gapText)>/gi, ps = /<(?:qti-gap-match-interaction|gapMatchInteraction)\b[^>]*>/i, ms = /<\/(?:qti-gap-match-interaction|gapMatchInteraction)>/i, hs = /<(?:qti-prompt|prompt)\b[\s\S]*?<\/(?:qti-prompt|prompt)>/gi;
2958
- function gs(e, t) {
3171
+ }, Hs = /<(?:qti-gap|gap)(?=[\s/>])([^>]*)\/?>/gi, Us = /<\/(?:qti-gap|gap)>/gi, Ws = /<(?:qti-gap-text|gapText)\b[\s\S]*?<\/(?:qti-gap-text|gapText)>/gi, Gs = /<(?:qti-gap-match-interaction|gapMatchInteraction)\b[^>]*>/i, Ks = /<\/(?:qti-gap-match-interaction|gapMatchInteraction)>/i, qs = /<(?:qti-prompt|prompt)\b[\s\S]*?<\/(?:qti-prompt|prompt)>/gi;
3172
+ function Js(e, t) {
2959
3173
  let n = RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, "i").exec(e);
2960
3174
  return (n?.[1] ?? n?.[2] ?? "").trim();
2961
3175
  }
2962
- function _s(e) {
2963
- return e.replace(ps, "").replace(ms, "").replace(hs, "").replace(fs, "").replace(us, (e, t) => {
2964
- let n = gs(t, "identifier");
3176
+ function Ys(e) {
3177
+ return e.replace(Gs, "").replace(Ks, "").replace(qs, "").replace(Ws, "").replace(Hs, (e, t) => {
3178
+ let n = Js(t, "identifier");
2965
3179
  return n ? `[GAP:${n}]` : "";
2966
- }).replace(ds, "").trim();
3180
+ }).replace(Us, "").trim();
2967
3181
  }
2968
- var vs = {
3182
+ var Xs = {
2969
3183
  id: "qti:gap-match-interaction",
2970
3184
  name: "QTI Standard Gap Match Interaction",
2971
3185
  priority: 10,
@@ -2991,22 +3205,22 @@ var vs = {
2991
3205
  a = n.getHtmlContent(e);
2992
3206
  let t = n.getChildrenByTag(e, "gap");
2993
3207
  for (let e of t) s.push(n.getAttribute(e, "identifier", ""));
2994
- o = a.replace(us, (e, t) => {
2995
- let n = gs(t, "identifier");
3208
+ o = a.replace(Hs, (e, t) => {
3209
+ let n = Js(t, "identifier");
2996
3210
  return n ? `[GAP:${n}]` : "";
2997
- }).replace(ds, "").trim();
3211
+ }).replace(Us, "").trim();
2998
3212
  }
2999
3213
  if (s.length === 0) {
3000
- let t = n.getHtmlContent(e), r = Array.from(t.matchAll(us));
3214
+ let t = n.getHtmlContent(e), r = Array.from(t.matchAll(Hs));
3001
3215
  for (let e of r) {
3002
- let t = gs(e[1] ?? "", "identifier");
3216
+ let t = Js(e[1] ?? "", "identifier");
3003
3217
  t && s.push(t);
3004
3218
  }
3005
- s.length > 0 && (!o || !o.includes("[GAP:")) && (o = _s(t));
3219
+ s.length > 0 && (!o || !o.includes("[GAP:")) && (o = Ys(t));
3006
3220
  }
3007
- let c = n.getBooleanAttribute(e, "shuffle"), l = n.getClasses(e), u = os(n.getAttribute(e, "data-choices-container-width", "")), d = n.getAttribute(e, "data-max-selections-message", "") || null, f = n.getAttribute(e, "data-min-selections-message", "") || null;
3221
+ let c = n.getBooleanAttribute(e, "shuffle"), l = n.getClasses(e), u = Rs(n.getAttribute(e, "data-choices-container-width", "")), d = n.getAttribute(e, "data-max-selections-message", "") || null, f = n.getAttribute(e, "data-min-selections-message", "") || null;
3008
3222
  return {
3009
- gapTexts: Qo(r, c, t.shuffleRng),
3223
+ gapTexts: As(r, c, t.shuffleRng),
3010
3224
  gaps: s,
3011
3225
  shuffle: c,
3012
3226
  prompt: a,
@@ -3032,7 +3246,7 @@ var vs = {
3032
3246
  errors: t.length > 0 ? t : void 0
3033
3247
  };
3034
3248
  }
3035
- }, ys = {
3249
+ }, Zs = {
3036
3250
  id: "qti:graphic-associate-interaction",
3037
3251
  name: "QTI Standard Graphic Associate Interaction",
3038
3252
  priority: 10,
@@ -3090,7 +3304,7 @@ var vs = {
3090
3304
  warnings: n.length > 0 ? n : void 0
3091
3305
  };
3092
3306
  }
3093
- }, bs = {
3307
+ }, Qs = {
3094
3308
  id: "qti:graphic-gap-match-interaction",
3095
3309
  name: "QTI Standard Graphic Gap Match Interaction",
3096
3310
  priority: 10,
@@ -3155,7 +3369,7 @@ var vs = {
3155
3369
  shape: n.getAttribute(e, "shape", "rect"),
3156
3370
  coords: n.getAttribute(e, "coords", ""),
3157
3371
  matchMax: n.getNumberAttribute(e, "matchMax", 1)
3158
- })), l = n.getChildrenByTag(e, "prompt"), u = l.length > 0 ? n.getHtmlContent(l[0]) : null, d = n.getClasses(e), f = os(n.getAttribute(e, "data-choices-container-width", "")), p = n.getAttribute(e, "data-max-selections-message", "") || null, m = n.getAttribute(e, "data-min-selections-message", "") || null;
3372
+ })), l = n.getChildrenByTag(e, "prompt"), u = l.length > 0 ? n.getHtmlContent(l[0]) : null, d = n.getClasses(e), f = Rs(n.getAttribute(e, "data-choices-container-width", "")), p = n.getAttribute(e, "data-max-selections-message", "") || null, m = n.getAttribute(e, "data-min-selections-message", "") || null;
3159
3373
  return {
3160
3374
  imageData: i,
3161
3375
  maxAssociations: a,
@@ -3185,7 +3399,7 @@ var vs = {
3185
3399
  warnings: n.length > 0 ? n : void 0
3186
3400
  };
3187
3401
  }
3188
- }, xs = {
3402
+ }, $s = {
3189
3403
  id: "qti:graphic-order-interaction",
3190
3404
  name: "QTI Standard Graphic Order Interaction",
3191
3405
  priority: 10,
@@ -3239,7 +3453,7 @@ var vs = {
3239
3453
  warnings: n.length > 0 ? n : void 0
3240
3454
  };
3241
3455
  }
3242
- }, Ss = {
3456
+ }, ec = {
3243
3457
  id: "qti:hotspot-interaction",
3244
3458
  name: "QTI Standard Hotspot Interaction",
3245
3459
  priority: 10,
@@ -3306,41 +3520,41 @@ var vs = {
3306
3520
  warnings: n.length > 0 ? n : void 0
3307
3521
  };
3308
3522
  }
3309
- }, Cs = {
3523
+ }, tc = {
3310
3524
  rejectDoctype: !0,
3311
3525
  maxItemXmlBytes: 1e7,
3312
3526
  maxHtmlBytes: 5e6,
3313
3527
  maxHtmlNodes: 2e5,
3314
3528
  maxHtmlDepth: 200
3315
3529
  };
3316
- function ws(e) {
3530
+ function nc(e) {
3317
3531
  let t = globalThis.TextEncoder;
3318
3532
  return t ? new t().encode(e).byteLength : e.length * 2;
3319
3533
  }
3320
- function Ts(e) {
3534
+ function rc(e) {
3321
3535
  let t = e?.parsingLimits;
3322
3536
  return t?.enabled === !0 ? {
3323
3537
  enabled: !0,
3324
- rejectDoctype: t?.rejectDoctype ?? Cs.rejectDoctype,
3325
- maxItemXmlBytes: t?.maxItemXmlBytes ?? Cs.maxItemXmlBytes,
3326
- maxHtmlBytes: t?.maxHtmlBytes ?? Cs.maxHtmlBytes,
3327
- maxHtmlNodes: t?.maxHtmlNodes ?? Cs.maxHtmlNodes,
3328
- maxHtmlDepth: t?.maxHtmlDepth ?? Cs.maxHtmlDepth
3538
+ rejectDoctype: t?.rejectDoctype ?? tc.rejectDoctype,
3539
+ maxItemXmlBytes: t?.maxItemXmlBytes ?? tc.maxItemXmlBytes,
3540
+ maxHtmlBytes: t?.maxHtmlBytes ?? tc.maxHtmlBytes,
3541
+ maxHtmlNodes: t?.maxHtmlNodes ?? tc.maxHtmlNodes,
3542
+ maxHtmlDepth: t?.maxHtmlDepth ?? tc.maxHtmlDepth
3329
3543
  } : {
3330
3544
  enabled: !1,
3331
- ...Cs
3545
+ ...tc
3332
3546
  };
3333
3547
  }
3334
- function Es(e, t) {
3335
- let n = Ts(t);
3548
+ function ic(e, t) {
3549
+ let n = rc(t);
3336
3550
  if (!n.enabled) return;
3337
- let r = ws(String(e ?? ""));
3551
+ let r = nc(String(e ?? ""));
3338
3552
  if (r > n.maxItemXmlBytes) throw Error(`itemXml exceeds maxItemXmlBytes (${r} > ${n.maxItemXmlBytes})`);
3339
3553
  if (n.rejectDoctype && /<!\s*doctype/i.test(e)) throw Error("itemXml contains <!DOCTYPE>, which is rejected by parsingLimits");
3340
3554
  }
3341
3555
  //#endregion
3342
3556
  //#region src/core/urlPolicy.ts
3343
- var Ds = {
3557
+ var ac = {
3344
3558
  allowHttps: !0,
3345
3559
  allowHttp: !1,
3346
3560
  allowProtocolRelative: !1,
@@ -3349,21 +3563,21 @@ var Ds = {
3349
3563
  allowBlobImages: !1,
3350
3564
  allowBlobMedia: !1
3351
3565
  };
3352
- function Os(e) {
3566
+ function oc(e) {
3353
3567
  return {
3354
- ...Ds,
3568
+ ...ac,
3355
3569
  ...e ?? {}
3356
3570
  };
3357
3571
  }
3358
- function ks(e) {
3572
+ function sc(e) {
3359
3573
  let t = e.toLowerCase().trim();
3360
3574
  return t.startsWith("javascript:") || t.startsWith("vbscript:") || t.startsWith("data:text/html");
3361
3575
  }
3362
- function As(e, t) {
3576
+ function cc(e, t) {
3363
3577
  let n = t.allowedHosts;
3364
3578
  return !n || n.length === 0 || n.includes(e);
3365
3579
  }
3366
- function js(e, t) {
3580
+ function lc(e, t) {
3367
3581
  let n;
3368
3582
  try {
3369
3583
  n = new URL(e);
@@ -3371,86 +3585,86 @@ function js(e, t) {
3371
3585
  return null;
3372
3586
  }
3373
3587
  let r = n.protocol.toLowerCase();
3374
- return r === "https:" && !t.allowHttps || r === "http:" && !t.allowHttp || r !== "https:" && r !== "http:" || !As(n.hostname, t) ? null : n.toString();
3588
+ return r === "https:" && !t.allowHttps || r === "http:" && !t.allowHttp || r !== "https:" && r !== "http:" || !cc(n.hostname, t) ? null : n.toString();
3375
3589
  }
3376
- function Ms(e, t, n) {
3590
+ function uc(e, t, n) {
3377
3591
  let r = e.toLowerCase().trim();
3378
3592
  return !r.startsWith("data:") || t !== "img" || !n.allowDataImages || !r.startsWith("data:image/") || !n.allowSvgDataImages && r.startsWith("data:image/svg+xml") ? null : e.trim();
3379
3593
  }
3380
- function Ns(e, t, n = "any") {
3381
- let r = Os(t), i = String(e ?? "").trim();
3594
+ function dc(e, t, n = "any") {
3595
+ let r = oc(t), i = String(e ?? "").trim();
3382
3596
  if (!i) return null;
3383
- let a = c(i), o = Fs(a), s = Ps(a).trim();
3384
- if (!o || !s || ks(o)) return null;
3385
- let l = Ms(o, n, r);
3597
+ let a = c(i), o = pc(a), s = fc(a).trim();
3598
+ if (!o || !s || sc(o)) return null;
3599
+ let l = uc(o, n, r);
3386
3600
  if (l) return l;
3387
3601
  if (o.toLowerCase().startsWith("data:")) return null;
3388
- if (/^[\\/]{2}/.test(s)) return r.allowProtocolRelative ? js(`https:${s.replace(/\\/g, "/")}`, r) : null;
3602
+ if (/^[\\/]{2}/.test(s)) return r.allowProtocolRelative ? lc(`https:${s.replace(/\\/g, "/")}`, r) : null;
3389
3603
  if (o.toLowerCase().startsWith("blob:")) return n === "img" && r.allowBlobImages || n === "media" && r.allowBlobMedia ? o : null;
3390
3604
  let u = /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(o);
3391
3605
  if (s.startsWith("/") || s.startsWith("./") || s.startsWith("../") || !u) {
3392
3606
  if (r.assetBaseUrl) try {
3393
3607
  let e = s.startsWith("/") ? s.slice(1) : s;
3394
- return js(new URL(e, r.assetBaseUrl).toString(), r);
3608
+ return lc(new URL(e, r.assetBaseUrl).toString(), r);
3395
3609
  } catch {
3396
3610
  return null;
3397
3611
  }
3398
3612
  return s;
3399
3613
  }
3400
- return js(o, r);
3614
+ return lc(o, r);
3401
3615
  }
3402
- function Ps(e) {
3403
- return Array.from(e).filter((e) => !Is(e)).join("");
3616
+ function fc(e) {
3617
+ return Array.from(e).filter((e) => !mc(e)).join("");
3404
3618
  }
3405
- function Fs(e) {
3406
- return Array.from(e).filter((e) => !Is(e) && !/\s/.test(e)).join("");
3619
+ function pc(e) {
3620
+ return Array.from(e).filter((e) => !mc(e) && !/\s/.test(e)).join("");
3407
3621
  }
3408
- function Is(e) {
3622
+ function mc(e) {
3409
3623
  let t = e.charCodeAt(0);
3410
3624
  return t <= 31 || t === 127;
3411
3625
  }
3412
3626
  //#endregion
3413
3627
  //#region src/core/sanitizer.ts
3414
- var Ls = class extends Error {
3628
+ var hc = class extends Error {
3415
3629
  constructor(e) {
3416
3630
  super(e);
3417
3631
  }
3418
3632
  };
3419
- function Rs(e) {
3633
+ function gc(e) {
3420
3634
  return e?.security?.urlPolicy;
3421
3635
  }
3422
- function zs(e) {
3636
+ function _c(e) {
3423
3637
  return e?.security?.allowObjectEmbeds === !0;
3424
3638
  }
3425
- function Bs(e) {
3639
+ function vc(e) {
3426
3640
  return e?.security?.allowIframes === !0;
3427
3641
  }
3428
- function Vs(e) {
3642
+ function yc(e) {
3429
3643
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
3430
3644
  }
3431
- function Hs(e, t) {
3645
+ function bc(e, t) {
3432
3646
  let n = e.getAttribute(t);
3433
- return n ? ` ${t}="${Vs(n)}"` : "";
3647
+ return n ? ` ${t}="${yc(n)}"` : "";
3434
3648
  }
3435
- function Us(e, t, n) {
3436
- let r = Rs(t), i = Ns(e, r, n);
3649
+ function xc(e, t, n) {
3650
+ let r = gc(t), i = dc(e, r, n);
3437
3651
  if (!i) return null;
3438
3652
  if (!t?.sanitizeUrl) return i;
3439
3653
  let a = t.sanitizeUrl(i, n);
3440
- return a ? Ns(a, r, n) : null;
3654
+ return a ? dc(a, r, n) : null;
3441
3655
  }
3442
- function Ws(e, t, n) {
3443
- return Us(e, t, n) ?? "#";
3656
+ function Sc(e, t, n) {
3657
+ return xc(e, t, n) ?? "#";
3444
3658
  }
3445
- function Gs(e, t) {
3659
+ function Cc(e, t) {
3446
3660
  let n = [];
3447
3661
  for (let r of f(e)) {
3448
- let e = Us(r.url, t, "img");
3662
+ let e = xc(r.url, t, "img");
3449
3663
  e && n.push([e, r.descriptors].filter(Boolean).join(" "));
3450
3664
  }
3451
3665
  return n.join(", ");
3452
3666
  }
3453
- function Ks(e) {
3667
+ function wc(e) {
3454
3668
  if (l(e)) return !0;
3455
3669
  let t = u(e);
3456
3670
  for (let e of t.matchAll(/(?:^|;)position:([^;]*)/gi)) {
@@ -3459,13 +3673,13 @@ function Ks(e) {
3459
3673
  }
3460
3674
  return !1;
3461
3675
  }
3462
- var qs = new r();
3463
- function Js(e) {
3676
+ var Tc = new r();
3677
+ function Ec(e) {
3464
3678
  if (!e.startsWith("qti-")) return !1;
3465
- let t = qs.toCanonical(e);
3466
- return qs.toNative(t) === e;
3679
+ let t = Tc.toCanonical(e);
3680
+ return Tc.toNative(t) === e;
3467
3681
  }
3468
- var Ys = /* @__PURE__ */ new Set([
3682
+ var Dc = /* @__PURE__ */ new Set([
3469
3683
  "clip-path",
3470
3684
  "color-profile",
3471
3685
  "cursor",
@@ -3477,7 +3691,7 @@ var Ys = /* @__PURE__ */ new Set([
3477
3691
  "marker-start",
3478
3692
  "mask",
3479
3693
  "stroke"
3480
- ]), Xs = /* @__PURE__ */ new Set([
3694
+ ]), Oc = /* @__PURE__ */ new Set([
3481
3695
  "animate",
3482
3696
  "animatecolor",
3483
3697
  "animatemotion",
@@ -3485,7 +3699,7 @@ var Ys = /* @__PURE__ */ new Set([
3485
3699
  "discard",
3486
3700
  "set"
3487
3701
  ]);
3488
- function Zs(e) {
3702
+ function kc(e) {
3489
3703
  let t = u(e);
3490
3704
  if (!/url\(/i.test(t)) return !1;
3491
3705
  let n = !1, r = !1, i = t.replace(/url\(([^)]*)\)/gi, (e, t) => {
@@ -3495,7 +3709,7 @@ function Zs(e) {
3495
3709
  });
3496
3710
  return r || !n || /url\(/i.test(i);
3497
3711
  }
3498
- function Qs(e) {
3712
+ function Ac(e) {
3499
3713
  let t = e.parentNode;
3500
3714
  for (; t;) {
3501
3715
  if (t.rawTagName?.toLowerCase() === "svg") return !0;
@@ -3503,35 +3717,35 @@ function Qs(e) {
3503
3717
  }
3504
3718
  return !1;
3505
3719
  }
3506
- function $s(e, t, n, r) {
3720
+ function jc(e, t, n, r) {
3507
3721
  let i = [...e.childNodes];
3508
- for (let e of i) e.rawTagName && ec(e, t, n, r + 1);
3722
+ for (let e of i) e.rawTagName && Mc(e, t, n, r + 1);
3509
3723
  e.replaceWith(...e.childNodes);
3510
3724
  }
3511
- function ec(e, t, n, r) {
3725
+ function Mc(e, t, n, r) {
3512
3726
  if (n.enabled) {
3513
- if (r > n.maxDepth) throw new Ls(`HTML depth exceeds maxHtmlDepth (${r} > ${n.maxDepth})`);
3514
- if (n.nodes++, n.nodes > n.maxNodes) throw new Ls(`HTML node count exceeds maxHtmlNodes (${n.nodes} > ${n.maxNodes})`);
3727
+ if (r > n.maxDepth) throw new hc(`HTML depth exceeds maxHtmlDepth (${r} > ${n.maxDepth})`);
3728
+ if (n.nodes++, n.nodes > n.maxNodes) throw new hc(`HTML node count exceeds maxHtmlNodes (${n.nodes} > ${n.maxNodes})`);
3515
3729
  }
3516
3730
  let i = e.rawTagName?.toLowerCase();
3517
3731
  if (i === "script") {
3518
3732
  e.remove();
3519
3733
  return;
3520
3734
  }
3521
- if (i && Xs.has(i)) {
3522
- if (Qs(e)) {
3735
+ if (i && Oc.has(i)) {
3736
+ if (Ac(e)) {
3523
3737
  e.remove();
3524
3738
  return;
3525
3739
  }
3526
- $s(e, t, n, r);
3740
+ jc(e, t, n, r);
3527
3741
  return;
3528
3742
  }
3529
- if (i === "iframe" && !Bs(t)) {
3743
+ if (i === "iframe" && !vc(t)) {
3530
3744
  e.remove();
3531
3745
  return;
3532
3746
  }
3533
- if ((i === "object" || i === "embed") && !zs(t)) {
3534
- let n = rc(e, t);
3747
+ if ((i === "object" || i === "embed") && !_c(t)) {
3748
+ let n = Fc(e, t);
3535
3749
  if (n) {
3536
3750
  e.replaceWith(n);
3537
3751
  return;
@@ -3543,8 +3757,8 @@ function ec(e, t, n, r) {
3543
3757
  e.remove();
3544
3758
  return;
3545
3759
  }
3546
- if (i?.includes("-") && !Js(i)) {
3547
- $s(e, t, n, r);
3760
+ if (i?.includes("-") && !Ec(i)) {
3761
+ jc(e, t, n, r);
3548
3762
  return;
3549
3763
  }
3550
3764
  let a = e.attributes || {};
@@ -3564,37 +3778,37 @@ function ec(e, t, n, r) {
3564
3778
  e.removeAttribute(n);
3565
3779
  continue;
3566
3780
  }
3567
- if (r === "style" && Ks(a)) {
3781
+ if (r === "style" && wc(a)) {
3568
3782
  e.removeAttribute(n);
3569
3783
  continue;
3570
3784
  }
3571
3785
  if (r === "srcset") {
3572
- let r = Gs(a, t);
3786
+ let r = Cc(a, t);
3573
3787
  r ? r !== a && e.setAttribute(n, r) : e.removeAttribute(n);
3574
3788
  continue;
3575
3789
  }
3576
- if (Ys.has(r) && Zs(a)) {
3790
+ if (Dc.has(r) && kc(a)) {
3577
3791
  e.removeAttribute(n);
3578
3792
  continue;
3579
3793
  }
3580
3794
  if (r === "background") {
3581
- let r = Us(a, t, "img");
3795
+ let r = xc(a, t, "img");
3582
3796
  r ? r !== a && e.setAttribute(n, r) : e.removeAttribute(n);
3583
3797
  continue;
3584
3798
  }
3585
3799
  if (r === "href" || r === "xlink:href" || r === "src" || r === "data" || r === "action" || r === "formaction" || r === "poster") {
3586
- let r = Ws(a, t, i === "img" ? "img" : i === "audio" || i === "video" || i === "source" ? "media" : i === "object" || i === "embed" ? "object" : i === "a" ? "link" : "any");
3800
+ let r = Sc(a, t, i === "img" ? "img" : i === "audio" || i === "video" || i === "source" ? "media" : i === "object" || i === "embed" ? "object" : i === "a" ? "link" : "any");
3587
3801
  r !== a && e.setAttribute(n, r);
3588
3802
  }
3589
3803
  }
3590
3804
  }
3591
3805
  let o = e.childNodes.filter((e) => e.rawTagName);
3592
- for (let e of o) ec(e, t, n, r + 1);
3806
+ for (let e of o) Mc(e, t, n, r + 1);
3593
3807
  }
3594
- function tc(e, t) {
3808
+ function Nc(e, t) {
3595
3809
  if (!e || typeof e != "string") return "";
3596
3810
  try {
3597
- let n = Ts(t?.security);
3811
+ let n = rc(t?.security);
3598
3812
  if (n.enabled) {
3599
3813
  let t = globalThis.TextEncoder;
3600
3814
  if ((t ? new t().encode(e).byteLength : e.length * 2) > n.maxHtmlBytes) return "";
@@ -3605,41 +3819,41 @@ function tc(e, t) {
3605
3819
  maxNodes: n.maxHtmlNodes,
3606
3820
  maxDepth: n.maxHtmlDepth
3607
3821
  };
3608
- for (let e of i) ec(e, t, a, 1);
3822
+ for (let e of i) Mc(e, t, a, 1);
3609
3823
  return r.toString();
3610
3824
  } catch (e) {
3611
- return e instanceof Ls || console.error("HTML sanitization failed:", e), "";
3825
+ return e instanceof hc || console.error("HTML sanitization failed:", e), "";
3612
3826
  }
3613
3827
  }
3614
- function nc(e, t) {
3615
- return !e || typeof e != "string" ? "" : /<[^>]+>/.test(e) ? tc(e, t) : e;
3828
+ function Pc(e, t) {
3829
+ return !e || typeof e != "string" ? "" : /<[^>]+>/.test(e) ? Nc(e, t) : e;
3616
3830
  }
3617
- function rc(e, t) {
3831
+ function Fc(e, t) {
3618
3832
  if (e.rawTagName?.toLowerCase() !== "object") return null;
3619
3833
  let n = e.getAttribute("type")?.trim().toLowerCase() ?? "", r = e.getAttribute("data")?.trim() ?? "";
3620
3834
  if (!n || !r) return null;
3621
- let i = `${Hs(e, "width")}${Hs(e, "height")}`, a = Hs(e, "class"), o = Hs(e, "id");
3835
+ let i = `${bc(e, "width")}${bc(e, "height")}`, a = bc(e, "class"), o = bc(e, "id");
3622
3836
  if (n.startsWith("image/")) {
3623
- let n = Us(r, t, "img");
3837
+ let n = xc(r, t, "img");
3624
3838
  if (!n) return null;
3625
3839
  let s = e.getAttribute("aria-label") ?? e.getAttribute("title") ?? e.textContent?.trim() ?? "";
3626
- return `<img src="${Vs(n)}" alt="${Vs(s)}"${i}${a}${o}>`;
3840
+ return `<img src="${yc(n)}" alt="${yc(s)}"${i}${a}${o}>`;
3627
3841
  }
3628
3842
  if (n.startsWith("audio/")) {
3629
- let e = Us(r, t, "media");
3630
- return e ? `<audio controls${a}${o}><source src="${Vs(e)}" type="${Vs(n)}"></audio>` : null;
3843
+ let e = xc(r, t, "media");
3844
+ return e ? `<audio controls${a}${o}><source src="${yc(e)}" type="${yc(n)}"></audio>` : null;
3631
3845
  }
3632
3846
  if (n.startsWith("video/")) {
3633
- let s = Us(r, t, "media");
3847
+ let s = xc(r, t, "media");
3634
3848
  if (!s) return null;
3635
- let c = e.getAttribute("poster")?.trim() ?? "", l = c ? Us(c, t, "img") : null;
3636
- return `<video controls${i}${a}${o}${l ? ` poster="${Vs(l)}"` : ""}><source src="${Vs(s)}" type="${Vs(n)}"></video>`;
3849
+ let c = e.getAttribute("poster")?.trim() ?? "", l = c ? xc(c, t, "img") : null;
3850
+ return `<video controls${i}${a}${o}${l ? ` poster="${yc(l)}"` : ""}><source src="${yc(s)}" type="${yc(n)}"></video>`;
3637
3851
  }
3638
3852
  return null;
3639
3853
  }
3640
3854
  //#endregion
3641
3855
  //#region src/interactions/hottext/extractor.ts
3642
- var ic = {
3856
+ var Ic = {
3643
3857
  id: "qti:hottext-interaction",
3644
3858
  name: "QTI Standard Hottext Interaction",
3645
3859
  priority: 10,
@@ -3662,7 +3876,7 @@ var ic = {
3662
3876
  };
3663
3877
  }), a = n.getNumberAttribute(e, "maxChoices", 1), o = n.getNumberAttribute(e, "minChoices", 0), s = n.getClasses(e), c = n.getAttribute(e, "data-max-selections-message", "") || null, l = n.getAttribute(e, "data-min-selections-message", "") || null, u = n.getChildrenByTag(e, "prompt"), d = u.length > 0 ? n.getHtmlContent(u[0]) : null, f = "";
3664
3878
  for (let t of e.childNodes) typeof t != "string" && t.rawTagName !== "prompt" && t.rawTagName !== "qti-prompt" ? f += t.outerHTML || t.toString() : typeof t == "string" && (f += t);
3665
- return f = tc(f, { security: t.config.security }), {
3879
+ return f = Nc(f, { security: t.config.security }), {
3666
3880
  hottextChoices: i,
3667
3881
  contentHtml: f,
3668
3882
  maxChoices: a,
@@ -3685,7 +3899,7 @@ var ic = {
3685
3899
  warnings: n.length > 0 ? n : void 0
3686
3900
  };
3687
3901
  }
3688
- }, ac = {
3902
+ }, Lc = {
3689
3903
  id: "qti:inline-choice-interaction",
3690
3904
  name: "QTI Standard Inline Choice Interaction",
3691
3905
  priority: 10,
@@ -3704,7 +3918,7 @@ var ic = {
3704
3918
  };
3705
3919
  }), i = n.getChildrenByTag(e, "label"), a = i.length > 0 ? n.getTextContent(i[0]) : null, o = n.getAttribute(e, "data-prompt", "") || null, s = n.getBooleanAttribute(e, "shuffle"), c = n.getClasses(e);
3706
3920
  return {
3707
- choices: Qo(r, s, t.shuffleRng),
3921
+ choices: As(r, s, t.shuffleRng),
3708
3922
  shuffle: s,
3709
3923
  label: a,
3710
3924
  ...o ? { dataPrompt: o } : {},
@@ -3724,7 +3938,7 @@ var ic = {
3724
3938
  warnings: n.length > 0 ? n : void 0
3725
3939
  };
3726
3940
  }
3727
- }, oc = {
3941
+ }, Rc = {
3728
3942
  id: "qti:match-interaction",
3729
3943
  name: "QTI Standard Match Interaction",
3730
3944
  priority: 10,
@@ -3776,8 +3990,8 @@ var ic = {
3776
3990
  }
3777
3991
  let s = n.getBooleanAttribute(e, "shuffle"), c = n.getNumberAttribute(e, "maxAssociations", 1), l = n.getNumberAttribute(e, "minAssociations", 0), u = l > 0 ? l : void 0, d = n.getClasses(e), f = n.getAttribute(e, "data-qti-max-selections-message", "") || null, p = n.getAttribute(e, "data-qti-min-selections-message", "") || null, m = n.getAttribute(e, "data-qti-first-column-header", "") || null, h = n.getChildrenByTag(e, "prompt"), g = h.length > 0 ? n.getHtmlContent(h[0]) : null;
3778
3992
  return {
3779
- sourceSet: Qo(a, s, t.shuffleRng),
3780
- targetSet: Qo(o, s, t.shuffleRng),
3993
+ sourceSet: As(a, s, t.shuffleRng),
3994
+ targetSet: As(o, s, t.shuffleRng),
3781
3995
  shuffle: s,
3782
3996
  maxAssociations: c,
3783
3997
  ...u === void 0 ? {} : { minAssociations: u },
@@ -3803,7 +4017,7 @@ var ic = {
3803
4017
  errors: t.length > 0 ? t : void 0
3804
4018
  };
3805
4019
  }
3806
- }, sc = {
4020
+ }, zc = {
3807
4021
  id: "qti:media-interaction",
3808
4022
  name: "QTI Standard Media Interaction",
3809
4023
  priority: 10,
@@ -3868,7 +4082,7 @@ var ic = {
3868
4082
  warnings: n.length > 0 ? n : void 0
3869
4083
  };
3870
4084
  }
3871
- }, cc = {
4085
+ }, Bc = {
3872
4086
  id: "qti:order-interaction",
3873
4087
  name: "QTI Standard Order Interaction",
3874
4088
  priority: 10,
@@ -3888,7 +4102,7 @@ var ic = {
3888
4102
  };
3889
4103
  }), i = n.querySelector(e, "prompt"), a = i ? n.getHtmlContent(i) : null, o = n.getBooleanAttribute(e, "shuffle"), s = n.getAttribute(e, "orientation", "vertical"), c = n.getNumberAttribute(e, "minChoices", 0), l = n.getNumberAttribute(e, "maxChoices", 0);
3890
4104
  return {
3891
- choices: Qo(r, o, t.shuffleRng),
4105
+ choices: As(r, o, t.shuffleRng),
3892
4106
  shuffle: o,
3893
4107
  orientation: s,
3894
4108
  minChoices: c,
@@ -3915,7 +4129,7 @@ var ic = {
3915
4129
  };
3916
4130
  //#endregion
3917
4131
  //#region src/interactions/position-object/extractor.ts
3918
- function lc(e, t, n, r) {
4132
+ function Vc(e, t, n, r) {
3919
4133
  if (!e) return null;
3920
4134
  let i = t.getAttribute(e, "type", ""), a = t.getAttribute(e, "data", ""), o = X(t.getAttribute(e, "width", ""), n), s = X(t.getAttribute(e, "height", ""), r), c = t.getHtmlContent(e);
3921
4135
  return i.startsWith("image/svg") && /<svg[\s>]/i.test(c) ? {
@@ -3930,7 +4144,7 @@ function lc(e, t, n, r) {
3930
4144
  height: s
3931
4145
  };
3932
4146
  }
3933
- var uc = {
4147
+ var Hc = {
3934
4148
  id: "qti:position-object-interaction",
3935
4149
  name: "QTI Standard Position Object Interaction",
3936
4150
  priority: 10,
@@ -3941,7 +4155,7 @@ var uc = {
3941
4155
  return t === "positionobjectinteraction" || t === "qti-position-object-interaction";
3942
4156
  },
3943
4157
  extract(e, t) {
3944
- let { utils: n, responseId: r } = t, i = e.parentNode, a = i?.rawTagName?.toLowerCase(), o = i && (a === "positionobjectstage" || a === "qti-position-object-stage") && n.getChildrenByTag(i, "positionObjectInteraction").includes(e) ? i : void 0, s = o ? n.getChildrenByTag(o, "object")[0] : void 0, c = n.getChildrenByTag(e, "object")[0], l = lc(s, n, "500", "300"), u = lc(c, n, "50", "50"), d = n.getNumberAttribute(e, "maxChoices", 1), f = n.getNumberAttribute(e, "minChoices", 0), p = n.getTextContent(c).trim() || r, m = n.getClasses(e), h = n.getPrompt(e);
4158
+ let { utils: n, responseId: r } = t, i = e.parentNode, a = i?.rawTagName?.toLowerCase(), o = i && (a === "positionobjectstage" || a === "qti-position-object-stage") && n.getChildrenByTag(i, "positionObjectInteraction").includes(e) ? i : void 0, s = o ? n.getChildrenByTag(o, "object")[0] : void 0, c = n.getChildrenByTag(e, "object")[0], l = Vc(s, n, "500", "300"), u = Vc(c, n, "50", "50"), d = n.getNumberAttribute(e, "maxChoices", 1), f = n.getNumberAttribute(e, "minChoices", 0), p = n.getTextContent(c).trim() || r, m = n.getClasses(e), h = n.getPrompt(e);
3945
4159
  return {
3946
4160
  imageData: l,
3947
4161
  positionObjectStages: [{
@@ -3967,7 +4181,7 @@ var uc = {
3967
4181
  warnings: n.length > 0 ? n : void 0
3968
4182
  };
3969
4183
  }
3970
- }, dc = {
4184
+ }, Uc = {
3971
4185
  id: "qti:portable-custom-interaction",
3972
4186
  name: "QTI Portable Custom Interaction",
3973
4187
  outputType: "portableCustomInteraction",
@@ -3979,29 +4193,29 @@ var uc = {
3979
4193
  ],
3980
4194
  description: "Extracts QTI 2.x/3.0 portable custom interaction module paths, markup, and config",
3981
4195
  canHandle(e, t) {
3982
- let n = fc(e);
3983
- return n === "portablecustominteraction" || n === "qti-portable-custom-interaction" || n === "custominteraction" && pc(e, ["portablecustominteraction"]) !== null;
4196
+ let n = Wc(e);
4197
+ return n === "portablecustominteraction" || n === "qti-portable-custom-interaction" || n === "custominteraction" && Gc(e, ["portablecustominteraction"]) !== null;
3984
4198
  },
3985
4199
  extract(e, t) {
3986
- let { utils: n } = t, r = fc(e) === "custominteraction" ? pc(e, ["portablecustominteraction"]) : e;
4200
+ let { utils: n } = t, r = Wc(e) === "custominteraction" ? Gc(e, ["portablecustominteraction"]) : e;
3987
4201
  if (!r) throw Error("customInteraction does not contain a portableCustomInteraction payload");
3988
- let i = n.getAttribute(e, "responseIdentifier") || n.getAttribute(e, "response-identifier") || t.responseId || "", a = n.getAttribute(r, "customInteractionTypeIdentifier") || n.getAttribute(r, "custom-interaction-type-identifier") || n.getAttribute(r, "customInteractionIdentifierType") || n.getAttribute(r, "custom-interaction-identifier-type") || "", o = "", s, c = pc(r, ["interactionmodules", "qti-interaction-modules"]);
4202
+ let i = n.getAttribute(e, "responseIdentifier") || n.getAttribute(e, "response-identifier") || t.responseId || "", a = n.getAttribute(r, "customInteractionTypeIdentifier") || n.getAttribute(r, "custom-interaction-type-identifier") || n.getAttribute(r, "customInteractionIdentifierType") || n.getAttribute(r, "custom-interaction-identifier-type") || "", o = "", s, c = Gc(r, ["interactionmodules", "qti-interaction-modules"]);
3989
4203
  if (c) {
3990
- let e = pc(c, ["interactionmodule", "qti-interaction-module"]);
4204
+ let e = Gc(c, ["interactionmodule", "qti-interaction-module"]);
3991
4205
  if (e) {
3992
4206
  o = n.getAttribute(e, "primaryPath") || n.getAttribute(e, "primary-path") || "";
3993
4207
  let t = n.getAttribute(e, "fallbackPath") || n.getAttribute(e, "fallback-path") || "";
3994
4208
  t && (s = t);
3995
4209
  }
3996
4210
  }
3997
- let l = pc(r, ["instance"]);
4211
+ let l = Gc(r, ["instance"]);
3998
4212
  if (!o && l) {
3999
- let e = mc(l, ["script"]).find((e) => !!n.getAttribute(e, "src"));
4213
+ let e = Kc(l, ["script"]).find((e) => !!n.getAttribute(e, "src"));
4000
4214
  o = e ? n.getAttribute(e, "src") : "";
4001
4215
  }
4002
- let u = pc(r, ["interactionmarkup", "qti-interaction-markup"]) ?? l, d = u ? n.getHtmlContent(u) : "", f = {}, p = pc(r, ["pciproperties", "qti-pci-properties"]);
4216
+ let u = Gc(r, ["interactionmarkup", "qti-interaction-markup"]) ?? l, d = u ? n.getHtmlContent(u) : "", f = {}, p = Gc(r, ["pciproperties", "qti-pci-properties"]);
4003
4217
  if (p) {
4004
- let e = mc(p, ["pciproperty", "qti-pci-property"]);
4218
+ let e = Kc(p, ["pciproperty", "qti-pci-property"]);
4005
4219
  for (let t of e) {
4006
4220
  let e = n.getAttribute(t, "key") || n.getAttribute(t, "name") || "", r = n.getAttribute(t, "value") || (t.textContent ?? "").trim() || "";
4007
4221
  e && (f[e] = r);
@@ -4025,25 +4239,25 @@ var uc = {
4025
4239
  };
4026
4240
  }
4027
4241
  };
4028
- function fc(e) {
4242
+ function Wc(e) {
4029
4243
  let t = e.rawTagName?.toLowerCase() ?? "";
4030
4244
  return t.includes(":") ? t.slice(t.lastIndexOf(":") + 1) : t;
4031
4245
  }
4032
- function pc(e, t) {
4033
- return mc(e, t)[0] ?? null;
4246
+ function Gc(e, t) {
4247
+ return Kc(e, t)[0] ?? null;
4034
4248
  }
4035
- function mc(e, t) {
4249
+ function Kc(e, t) {
4036
4250
  let n = new Set(t.map((e) => e.toLowerCase())), r = [], i = (e) => {
4037
4251
  for (let t of e.childNodes ?? []) {
4038
4252
  let e = t;
4039
- e.rawTagName && (n.has(fc(e)) && r.push(e), i(e));
4253
+ e.rawTagName && (n.has(Wc(e)) && r.push(e), i(e));
4040
4254
  }
4041
4255
  };
4042
4256
  return i(e), r;
4043
4257
  }
4044
4258
  //#endregion
4045
4259
  //#region src/interactions/select-point/extractor.ts
4046
- var hc = {
4260
+ var qc = {
4047
4261
  id: "qti:select-point-interaction",
4048
4262
  name: "QTI Standard Select Point Interaction",
4049
4263
  priority: 10,
@@ -4092,7 +4306,7 @@ var hc = {
4092
4306
  warnings: n.length > 0 ? n : void 0
4093
4307
  };
4094
4308
  }
4095
- }, gc = {
4309
+ }, Jc = {
4096
4310
  id: "qti:slider-interaction",
4097
4311
  name: "QTI Standard Slider Interaction",
4098
4312
  priority: 10,
@@ -4123,7 +4337,7 @@ var hc = {
4123
4337
  warnings: n.length > 0 ? n : void 0
4124
4338
  };
4125
4339
  }
4126
- }, _c = {
4340
+ }, Yc = {
4127
4341
  id: "qti:text-entry-interaction",
4128
4342
  name: "QTI Standard Text Entry Interaction",
4129
4343
  priority: 10,
@@ -4151,7 +4365,7 @@ var hc = {
4151
4365
  warnings: n.length > 0 ? n : void 0
4152
4366
  };
4153
4367
  }
4154
- }, vc = {
4368
+ }, Xc = {
4155
4369
  id: "qti:upload-interaction",
4156
4370
  name: "QTI Standard Upload Interaction",
4157
4371
  priority: 10,
@@ -4182,172 +4396,172 @@ var hc = {
4182
4396
  warnings: t.length > 0 ? t : void 0
4183
4397
  };
4184
4398
  }
4185
- }, Z = Ko("prompt"), yc = [Ko("imageData", "content"), qo("img", "imageData", "src")], bc = Dc([
4399
+ }, Z = ws("prompt"), Zc = [ws("imageData", "content"), Ts("img", "imageData", "src")], Qc = al([
4186
4400
  {
4187
4401
  type: "choiceInteraction",
4188
- extractor: es,
4402
+ extractor: Ms,
4189
4403
  placement: "block",
4190
- delivery: [Z, Ko("choices", "*", "text")]
4404
+ delivery: [Z, ws("choices", "*", "text")]
4191
4405
  },
4192
4406
  {
4193
4407
  type: "textEntryInteraction",
4194
- extractor: _c,
4408
+ extractor: Yc,
4195
4409
  placement: "inline",
4196
4410
  delivery: []
4197
4411
  },
4198
4412
  {
4199
4413
  type: "extendedTextInteraction",
4200
- extractor: ls,
4414
+ extractor: Vs,
4201
4415
  placement: "block",
4202
4416
  delivery: [Z]
4203
4417
  },
4204
4418
  {
4205
4419
  type: "inlineChoiceInteraction",
4206
- extractor: ac,
4420
+ extractor: Lc,
4207
4421
  placement: "inline",
4208
4422
  delivery: []
4209
4423
  },
4210
4424
  {
4211
4425
  type: "orderInteraction",
4212
- extractor: cc,
4426
+ extractor: Bc,
4213
4427
  placement: "block",
4214
- delivery: [Z, Ko("choices", "*", "text")]
4428
+ delivery: [Z, ws("choices", "*", "text")]
4215
4429
  },
4216
4430
  {
4217
4431
  type: "matchInteraction",
4218
- extractor: oc,
4432
+ extractor: Rc,
4219
4433
  placement: "block",
4220
4434
  delivery: [
4221
4435
  Z,
4222
- Ko("sourceSet", "*", "text"),
4223
- Ko("targetSet", "*", "text")
4436
+ ws("sourceSet", "*", "text"),
4437
+ ws("targetSet", "*", "text")
4224
4438
  ]
4225
4439
  },
4226
4440
  {
4227
4441
  type: "associateInteraction",
4228
- extractor: $o,
4442
+ extractor: js,
4229
4443
  placement: "block",
4230
- delivery: [Z, Ko("choices", "*", "text")]
4444
+ delivery: [Z, ws("choices", "*", "text")]
4231
4445
  },
4232
4446
  {
4233
4447
  type: "gapMatchInteraction",
4234
- extractor: vs,
4448
+ extractor: Xs,
4235
4449
  placement: "block",
4236
- delivery: [Z, Ko("promptText")]
4450
+ delivery: [Z, ws("promptText")]
4237
4451
  },
4238
4452
  {
4239
4453
  type: "sliderInteraction",
4240
- extractor: gc,
4454
+ extractor: Jc,
4241
4455
  placement: "block",
4242
4456
  delivery: [Z]
4243
4457
  },
4244
4458
  {
4245
4459
  type: "hotspotInteraction",
4246
- extractor: Ss,
4460
+ extractor: ec,
4247
4461
  placement: "block",
4248
- delivery: [Z, ...yc]
4462
+ delivery: [Z, ...Zc]
4249
4463
  },
4250
4464
  {
4251
4465
  type: "graphicGapMatchInteraction",
4252
- extractor: bs,
4466
+ extractor: Qs,
4253
4467
  placement: "block",
4254
4468
  delivery: [
4255
4469
  Z,
4256
- ...yc,
4257
- qo("img", "gapImages", "*", "src")
4470
+ ...Zc,
4471
+ Ts("img", "gapImages", "*", "src")
4258
4472
  ]
4259
4473
  },
4260
4474
  {
4261
4475
  type: "uploadInteraction",
4262
- extractor: vc,
4476
+ extractor: Xc,
4263
4477
  placement: "block",
4264
4478
  delivery: [Z]
4265
4479
  },
4266
4480
  {
4267
4481
  type: "drawingInteraction",
4268
- extractor: ss,
4482
+ extractor: zs,
4269
4483
  placement: "block",
4270
- delivery: [Z, ...yc]
4484
+ delivery: [Z, ...Zc]
4271
4485
  },
4272
4486
  {
4273
4487
  type: "customInteraction",
4274
- extractor: ts,
4488
+ extractor: Ns,
4275
4489
  placement: "block",
4276
4490
  delivery: [Z]
4277
4491
  },
4278
4492
  {
4279
4493
  type: "portableCustomInteraction",
4280
- extractor: dc,
4494
+ extractor: Uc,
4281
4495
  placement: "block",
4282
- delivery: [Ko("markup")]
4496
+ delivery: [ws("markup")]
4283
4497
  },
4284
4498
  {
4285
4499
  type: "mediaInteraction",
4286
- extractor: sc,
4500
+ extractor: zc,
4287
4501
  placement: "block",
4288
- delivery: [Z, qo("media-or-object", "mediaElement", "src")]
4502
+ delivery: [Z, Ts("media-or-object", "mediaElement", "src")]
4289
4503
  },
4290
4504
  {
4291
4505
  type: "hottextInteraction",
4292
- extractor: ic,
4506
+ extractor: Ic,
4293
4507
  placement: "block",
4294
- delivery: [Z, Ko("contentHtml")]
4508
+ delivery: [Z, ws("contentHtml")]
4295
4509
  },
4296
4510
  {
4297
4511
  type: "selectPointInteraction",
4298
- extractor: hc,
4512
+ extractor: qc,
4299
4513
  placement: "block",
4300
- delivery: [Z, ...yc]
4514
+ delivery: [Z, ...Zc]
4301
4515
  },
4302
4516
  {
4303
4517
  type: "graphicOrderInteraction",
4304
- extractor: xs,
4518
+ extractor: $s,
4305
4519
  placement: "block",
4306
- delivery: [Z, ...yc]
4520
+ delivery: [Z, ...Zc]
4307
4521
  },
4308
4522
  {
4309
4523
  type: "graphicAssociateInteraction",
4310
- extractor: ys,
4524
+ extractor: Zs,
4311
4525
  placement: "block",
4312
- delivery: [Z, ...yc]
4526
+ delivery: [Z, ...Zc]
4313
4527
  },
4314
4528
  {
4315
4529
  type: "positionObjectInteraction",
4316
- extractor: uc,
4530
+ extractor: Hc,
4317
4531
  placement: "block",
4318
4532
  delivery: [
4319
4533
  Z,
4320
- ...yc,
4321
- Ko("positionObjectStages", "*", "objectData", "content"),
4322
- qo("img", "positionObjectStages", "*", "objectData", "src")
4534
+ ...Zc,
4535
+ ws("positionObjectStages", "*", "objectData", "content"),
4536
+ Ts("img", "positionObjectStages", "*", "objectData", "src")
4323
4537
  ]
4324
4538
  },
4325
4539
  {
4326
4540
  type: "endAttemptInteraction",
4327
- extractor: cs,
4541
+ extractor: Bs,
4328
4542
  placement: "block",
4329
4543
  delivery: [Z]
4330
4544
  }
4331
4545
  ]);
4332
- function xc() {
4333
- return bc;
4546
+ function $c() {
4547
+ return Qc;
4334
4548
  }
4335
- var Sc = new Map(bc.map((e) => [e.type.toLowerCase(), e.type]));
4336
- function Cc(e) {
4549
+ var el = new Map(Qc.map((e) => [e.type.toLowerCase(), e.type]));
4550
+ function tl(e) {
4337
4551
  let t = e.toLowerCase();
4338
- return t.startsWith("qti-") ? t.slice(4).replace(/-([a-z])/g, (e, t) => t.toUpperCase()) : Sc.get(t) ?? e;
4552
+ return t.startsWith("qti-") ? t.slice(4).replace(/-([a-z])/g, (e, t) => t.toUpperCase()) : el.get(t) ?? e;
4339
4553
  }
4340
- function wc(e) {
4341
- let t = Cc(e);
4342
- return bc.find((e) => e.type === t) ?? null;
4554
+ function nl(e) {
4555
+ let t = tl(e);
4556
+ return Qc.find((e) => e.type === t) ?? null;
4343
4557
  }
4344
- function Tc(e) {
4345
- return wc(e)?.placement === "inline";
4558
+ function rl(e) {
4559
+ return nl(e)?.placement === "inline";
4346
4560
  }
4347
- function Ec(e) {
4348
- return Tc(Cc(e));
4561
+ function il(e) {
4562
+ return rl(tl(e));
4349
4563
  }
4350
- function Dc(e) {
4564
+ function al(e) {
4351
4565
  return Object.freeze(e.map((e) => Object.freeze({
4352
4566
  ...e,
4353
4567
  delivery: Object.freeze(e.delivery.map((e) => Object.freeze({
@@ -4358,7 +4572,7 @@ function Dc(e) {
4358
4572
  }
4359
4573
  //#endregion
4360
4574
  //#region src/core/ComponentRegistry.ts
4361
- var Oc = {
4575
+ var ol = {
4362
4576
  choiceInteraction: {
4363
4577
  name: "default-choice",
4364
4578
  tagName: "pie-qti-choice"
@@ -4443,7 +4657,7 @@ var Oc = {
4443
4657
  name: "default-catalog-popup",
4444
4658
  tagName: "pie-qti-catalog-popup"
4445
4659
  }
4446
- }, kc = class {
4660
+ }, sl = class {
4447
4661
  constructor() {
4448
4662
  this.components = /* @__PURE__ */ new Map(), this.definedElements = /* @__PURE__ */ new Set(), this.sealed = !1;
4449
4663
  }
@@ -4502,12 +4716,12 @@ var Oc = {
4502
4716
  if (this.sealed) throw Error("ComponentRegistry is sealed for this AssessmentItem; create a new definition to change renderers");
4503
4717
  }
4504
4718
  };
4505
- function Ac() {
4506
- let e = new kc();
4507
- return jc(e), e;
4719
+ function cl() {
4720
+ let e = new sl();
4721
+ return ll(e), e;
4508
4722
  }
4509
- function jc(e) {
4510
- for (let [t, n] of Object.entries(Oc)) e.register(t, {
4723
+ function ll(e) {
4724
+ for (let [t, n] of Object.entries(ol)) e.register(t, {
4511
4725
  ...n,
4512
4726
  description: `Default web component tag for ${t}`,
4513
4727
  priority: -100
@@ -4515,9 +4729,9 @@ function jc(e) {
4515
4729
  }
4516
4730
  //#endregion
4517
4731
  //#region src/document/AssessmentItemDocument.ts
4518
- var Mc = class {
4732
+ var ul = class {
4519
4733
  constructor({ itemXml: e, elementNameMapper: t, attributeNameMapper: n, security: r }) {
4520
- this.itemXml = e, this.security = r, this.mathMlPrefixes = Ic(e), this.elementNameMapper = t, this.attributeNameMapper = n, Es(this.itemXml, this.security), this.xmlDocument = ne(this.itemXml), this.assessmentItem = x(this.xmlDocument), this.extractionSource = this.serializeItemBodyForExtraction();
4734
+ this.itemXml = e, this.security = r, this.mathMlPrefixes = ml(e), this.elementNameMapper = t, this.attributeNameMapper = n, ic(this.itemXml, this.security), this.xmlDocument = ne(this.itemXml), this.assessmentItem = x(this.xmlDocument), this.extractionSource = this.serializeItemBodyForExtraction();
4521
4735
  }
4522
4736
  detectVersion() {
4523
4737
  let e = this.assessmentItem.namespaceURI;
@@ -4605,7 +4819,7 @@ var Mc = class {
4605
4819
  return e.getAttribute(this.attributeNameMapper.toNative(t));
4606
4820
  }
4607
4821
  serializeChildren(e) {
4608
- return Lc(Fc(this.serializeChildNodes(e)), this.mathMlPrefixes);
4822
+ return hl(pl(this.serializeChildNodes(e)), this.mathMlPrefixes);
4609
4823
  }
4610
4824
  findExtractionElements(e) {
4611
4825
  let t = this.createExtractionRoot();
@@ -4619,7 +4833,7 @@ var Mc = class {
4619
4833
  element: e,
4620
4834
  contextRoot: t,
4621
4835
  responseIdentifier: a,
4622
- normalizedType: Cc(i)
4836
+ normalizedType: tl(i)
4623
4837
  });
4624
4838
  }), r;
4625
4839
  }
@@ -4650,7 +4864,7 @@ var Mc = class {
4650
4864
  walkExtractionChildren(e, t) {
4651
4865
  for (let n of e.childNodes ?? []) {
4652
4866
  let e = n;
4653
- e.rawTagName && (Nc(e.rawTagName) || (t(e), this.walkExtractionChildren(e, t)));
4867
+ e.rawTagName && (dl(e.rawTagName) || (t(e), this.walkExtractionChildren(e, t)));
4654
4868
  }
4655
4869
  }
4656
4870
  getExtractionResponseIdentifier(e) {
@@ -4658,17 +4872,17 @@ var Mc = class {
4658
4872
  return e.getAttribute?.("responseIdentifier") || e.getAttribute?.(t) || e.getAttribute?.("response-identifier") || e.getAttribute?.("responseidentifier") || "";
4659
4873
  }
4660
4874
  };
4661
- function Nc(e) {
4875
+ function dl(e) {
4662
4876
  let t = e.toLowerCase();
4663
4877
  return t === "rubricblock" || t === "qti-rubric-block";
4664
4878
  }
4665
- function Pc(e) {
4666
- return new Mc(e);
4879
+ function fl(e) {
4880
+ return new ul(e);
4667
4881
  }
4668
- function Fc(e) {
4882
+ function pl(e) {
4669
4883
  return e.replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g, (e, t) => t);
4670
4884
  }
4671
- function Ic(e) {
4885
+ function ml(e) {
4672
4886
  let t = /* @__PURE__ */ new Set();
4673
4887
  for (let n of e.matchAll(/\sxmlns:([A-Za-z_][\w.-]*)=(["'])http:\/\/www\.w3\.org\/1998\/Math\/MathML\2/g)) {
4674
4888
  let e = n[1];
@@ -4676,26 +4890,26 @@ function Ic(e) {
4676
4890
  }
4677
4891
  return t;
4678
4892
  }
4679
- function Lc(e, t) {
4893
+ function hl(e, t) {
4680
4894
  let n = e;
4681
4895
  for (let e of t) {
4682
- let t = Rc(e);
4896
+ let t = gl(e);
4683
4897
  n = n.replace(RegExp(`(<\\/?)${t}:([A-Za-z][\\w.-]*)(?=[\\s>/])`, "g"), "$1$2").replace(RegExp(`\\sxmlns:${t}=(["'])http:\\/\\/www\\.w3\\.org\\/1998\\/Math\\/MathML\\1`, "g"), "");
4684
4898
  }
4685
4899
  return n;
4686
4900
  }
4687
- function Rc(e) {
4901
+ function gl(e) {
4688
4902
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4689
4903
  }
4690
4904
  //#endregion
4691
4905
  //#region src/extraction/utils.ts
4692
- function zc(e) {
4906
+ function _l(e) {
4693
4907
  return e?.textContent?.trim() || "";
4694
4908
  }
4695
- function Bc(e, t, n) {
4696
- return e?.childNodes ? e.childNodes.filter((e) => Gc(e.rawTagName, t, n)) : [];
4909
+ function vl(e, t, n) {
4910
+ return e?.childNodes ? e.childNodes.filter((e) => Cl(e.rawTagName, t, n)) : [];
4697
4911
  }
4698
- function Vc(e, t, n = !1, r) {
4912
+ function yl(e, t, n = !1, r) {
4699
4913
  let i = e.getAttribute(t);
4700
4914
  if (i == null && r) {
4701
4915
  let n = r.toNative(t);
@@ -4703,7 +4917,7 @@ function Vc(e, t, n = !1, r) {
4703
4917
  }
4704
4918
  return i == null ? n : i === "true";
4705
4919
  }
4706
- function Hc(e, t, n, r) {
4920
+ function bl(e, t, n, r) {
4707
4921
  let i = e.getAttribute(t);
4708
4922
  if (i == null && r) {
4709
4923
  let n = r.toNative(t);
@@ -4711,7 +4925,7 @@ function Hc(e, t, n, r) {
4711
4925
  }
4712
4926
  return i ? Number(i) : n;
4713
4927
  }
4714
- function Uc(e, t, n = "", r) {
4928
+ function xl(e, t, n = "", r) {
4715
4929
  let i = e.getAttribute(t);
4716
4930
  if (i == null && r) {
4717
4931
  let n = r.toNative(t);
@@ -4719,29 +4933,29 @@ function Uc(e, t, n = "", r) {
4719
4933
  }
4720
4934
  return i || n;
4721
4935
  }
4722
- function Wc(e) {
4936
+ function Sl(e) {
4723
4937
  let t = e.getAttribute("class");
4724
4938
  return t ? t.split(/\s+/).filter(Boolean) : [];
4725
4939
  }
4726
- function Gc(e, t, n) {
4940
+ function Cl(e, t, n) {
4727
4941
  if (!e) return !1;
4728
4942
  let r = t.toLowerCase(), i = n.toNative(r);
4729
4943
  return e.toLowerCase() === i.toLowerCase();
4730
4944
  }
4731
- function Kc(n, r, i) {
4945
+ function wl(n, r, i) {
4732
4946
  let a = r || new t(), o = i || new e();
4733
4947
  return {
4734
4948
  matchesTag(e, t) {
4735
- return Gc(e.rawTagName, t, a);
4949
+ return Cl(e.rawTagName, t, a);
4736
4950
  },
4737
4951
  getChildrenByTag(e, t) {
4738
- return Bc(e, t, a);
4952
+ return vl(e, t, a);
4739
4953
  },
4740
4954
  querySelectorAll(e, t) {
4741
4955
  let n = t.split(/\s+/), r = [e];
4742
4956
  for (let e of n) {
4743
4957
  let t = [];
4744
- for (let n of r) if (Gc(n.rawTagName, e, a) && t.push(n), n.childNodes) for (let r of n.childNodes) typeof r != "string" && Gc(r.rawTagName, e, a) && t.push(r);
4958
+ for (let n of r) if (Cl(n.rawTagName, e, a) && t.push(n), n.childNodes) for (let r of n.childNodes) typeof r != "string" && Cl(r.rawTagName, e, a) && t.push(r);
4745
4959
  r = t;
4746
4960
  }
4747
4961
  return r;
@@ -4752,69 +4966,69 @@ function Kc(n, r, i) {
4752
4966
  },
4753
4967
  hasChildWithTag(e, t) {
4754
4968
  if (!e.childNodes) return !1;
4755
- for (let n of e.childNodes) if (typeof n != "string" && Gc(n.rawTagName, t, a)) return !0;
4969
+ for (let n of e.childNodes) if (typeof n != "string" && Cl(n.rawTagName, t, a)) return !0;
4756
4970
  return !1;
4757
4971
  },
4758
4972
  getHtmlContent(e) {
4759
- return nc(e?.innerHTML?.trim() || "", { security: n });
4973
+ return Pc(e?.innerHTML?.trim() || "", { security: n });
4760
4974
  },
4761
4975
  getTextContent(e) {
4762
- return zc(e);
4976
+ return _l(e);
4763
4977
  },
4764
4978
  getAttribute(e, t, n = "") {
4765
- return Uc(e, t, n, o);
4979
+ return xl(e, t, n, o);
4766
4980
  },
4767
4981
  getBooleanAttribute(e, t, n = !1) {
4768
- return Vc(e, t, n, o);
4982
+ return yl(e, t, n, o);
4769
4983
  },
4770
4984
  getNumberAttribute(e, t, n = 0) {
4771
- return Hc(e, t, n, o);
4985
+ return bl(e, t, n, o);
4772
4986
  },
4773
4987
  getPrompt(e) {
4774
- let t = Bc(e, "prompt", a)[0];
4988
+ let t = vl(e, "prompt", a)[0];
4775
4989
  return t ? this.getHtmlContent(t) : null;
4776
4990
  },
4777
4991
  getClasses(e) {
4778
- return Wc(e);
4992
+ return Sl(e);
4779
4993
  }
4780
4994
  };
4781
4995
  }
4782
4996
  //#endregion
4783
4997
  //#region src/extraction/createContext.ts
4784
- function qc(e, t, n, r, i, a) {
4998
+ function Tl(e, t, n, r, i, a) {
4785
4999
  let o = i.elementNameMapper, s = i.attributeNameMapper;
4786
5000
  return {
4787
5001
  element: e,
4788
5002
  responseId: t,
4789
5003
  dom: n,
4790
5004
  declarations: r,
4791
- utils: Kc(i.security, o, s),
5005
+ utils: wl(i.security, o, s),
4792
5006
  config: i,
4793
- ...a ? { shuffleRng: Xo(a, t) } : {}
5007
+ ...a ? { shuffleRng: Os(a, t) } : {}
4794
5008
  };
4795
5009
  }
4796
5010
  //#endregion
4797
5011
  //#region src/core/trustedTypes.ts
4798
- function Jc() {
5012
+ function El() {
4799
5013
  return globalThis.trustedTypes;
4800
5014
  }
4801
- var Yc = /* @__PURE__ */ new Map();
4802
- function Xc(e) {
4803
- let t = Yc.get(e);
5015
+ var Dl = /* @__PURE__ */ new Map();
5016
+ function Ol(e) {
5017
+ let t = Dl.get(e);
4804
5018
  if (t) return t;
4805
- let n = Jc();
5019
+ let n = El();
4806
5020
  if (!n?.createPolicy) return null;
4807
5021
  try {
4808
5022
  let t = n.createPolicy(e, { createHTML: (e) => e });
4809
- return t?.createHTML ? (Yc.set(e, t), t) : null;
5023
+ return t?.createHTML ? (Dl.set(e, t), t) : null;
4810
5024
  } catch {
4811
5025
  return null;
4812
5026
  }
4813
5027
  }
4814
- function Zc(e, t) {
5028
+ function kl(e, t) {
4815
5029
  if (!t) return e;
4816
5030
  if (!e) return "";
4817
- let n = Xc(t);
5031
+ let n = Ol(t);
4818
5032
  if (!n) return e;
4819
5033
  try {
4820
5034
  return n.createHTML(e);
@@ -4822,28 +5036,28 @@ function Zc(e, t) {
4822
5036
  return e;
4823
5037
  }
4824
5038
  }
4825
- function Qc(e) {
5039
+ function Al(e) {
4826
5040
  return typeof e == "string" ? e : String(e);
4827
5041
  }
4828
5042
  //#endregion
4829
5043
  //#region src/extraction/interactionSecurity.ts
4830
- function $c(e, t, n, r = e.type) {
4831
- let i = rl(e);
4832
- for (let e of t) el(i, e.path, (t, a, o) => {
5044
+ function jl(e, t, n, r = e.type) {
5045
+ let i = Fl(e);
5046
+ for (let e of t) Ml(i, e.path, (t, a, o) => {
4833
5047
  if (e.kind === "html") {
4834
- nl(a, o, Zc(tc(typeof t == "string" ? t : "", { security: n }), n?.trustedTypesPolicyName));
5048
+ Pl(a, o, kl(Nc(typeof t == "string" ? t : "", { security: n }), n?.trustedTypesPolicyName));
4835
5049
  return;
4836
5050
  }
4837
5051
  if (typeof t != "string") {
4838
- nl(a, o, "");
5052
+ Pl(a, o, "");
4839
5053
  return;
4840
5054
  }
4841
- let s = tl(e.use, i, r);
4842
- nl(a, o, Ns(t, n?.urlPolicy, s) ?? "");
5055
+ let s = Nl(e.use, i, r);
5056
+ Pl(a, o, dc(t, n?.urlPolicy, s) ?? "");
4843
5057
  });
4844
- return r === "mediaInteraction" && (i.allowObjectEmbeds = n?.allowObjectEmbeds === !0), il(i);
5058
+ return r === "mediaInteraction" && (i.allowObjectEmbeds = n?.allowObjectEmbeds === !0), Il(i);
4845
5059
  }
4846
- function el(e, t, n, r, i) {
5060
+ function Ml(e, t, n, r, i) {
4847
5061
  if (t.length === 0) {
4848
5062
  r !== void 0 && i !== void 0 && n(e, r, i);
4849
5063
  return;
@@ -4852,70 +5066,70 @@ function el(e, t, n, r, i) {
4852
5066
  let [a, ...o] = t;
4853
5067
  if (a === "*") {
4854
5068
  if (Array.isArray(e)) {
4855
- for (let t = 0; t < e.length; t += 1) el(e[t], o, n, e, t);
5069
+ for (let t = 0; t < e.length; t += 1) Ml(e[t], o, n, e, t);
4856
5070
  return;
4857
5071
  }
4858
- for (let [t, r] of Object.entries(e)) el(r, o, n, e, t);
5072
+ for (let [t, r] of Object.entries(e)) Ml(r, o, n, e, t);
4859
5073
  return;
4860
5074
  }
4861
5075
  let s = e;
4862
- a in s && el(s[a], o, n, s, a);
5076
+ a in s && Ml(s[a], o, n, s, a);
4863
5077
  }
4864
- function tl(e, t, n) {
5078
+ function Nl(e, t, n) {
4865
5079
  if (e !== "media-or-object") return e;
4866
5080
  let r = n === "mediaInteraction" && "mediaElement" in t ? t.mediaElement : null;
4867
5081
  return r && typeof r == "object" && "type" in r && r.type === "object" ? "object" : "media";
4868
5082
  }
4869
- function nl(e, t, n) {
5083
+ function Pl(e, t, n) {
4870
5084
  if (Array.isArray(e) && typeof t == "number") {
4871
5085
  e[t] = n;
4872
5086
  return;
4873
5087
  }
4874
5088
  e[String(t)] = n;
4875
5089
  }
4876
- function rl(e) {
4877
- if (Array.isArray(e)) return e.map((e) => rl(e));
5090
+ function Fl(e) {
5091
+ if (Array.isArray(e)) return e.map((e) => Fl(e));
4878
5092
  if (e && typeof e == "object") {
4879
5093
  let t = Object.getPrototypeOf(e);
4880
- return t !== Object.prototype && t !== null ? e : Object.fromEntries(Object.entries(e).map(([e, t]) => [e, rl(t)]));
5094
+ return t !== Object.prototype && t !== null ? e : Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Fl(t)]));
4881
5095
  }
4882
5096
  return e;
4883
5097
  }
4884
- function il(e) {
5098
+ function Il(e) {
4885
5099
  if (!e || typeof e != "object" || Object.isFrozen(e)) return e;
4886
5100
  let t = Object.getPrototypeOf(e);
4887
5101
  if (!Array.isArray(e) && t !== Object.prototype && t !== null) return e;
4888
5102
  Object.freeze(e);
4889
- for (let t of Object.values(e)) il(t);
5103
+ for (let t of Object.values(e)) Il(t);
4890
5104
  return e;
4891
5105
  }
4892
5106
  //#endregion
4893
5107
  //#region src/extraction/interactionExtractionPipeline.ts
4894
- function al({ document: e, extractionRegistry: t, declarations: n, config: r, sessionGuid: i }) {
4895
- let a = cl(n), o = e.findExtractionElements(sl(t)), s = [];
5108
+ function Ll({ document: e, extractionRegistry: t, declarations: n, config: r, sessionGuid: i }) {
5109
+ let a = Bl(n), o = e.findExtractionElements(zl(t)), s = [];
4896
5110
  for (let e of o) {
4897
- let n = qc(e.element, e.responseIdentifier, e.contextRoot, a, r, i), o = t.extract(e.element, n);
5111
+ let n = Tl(e.element, e.responseIdentifier, e.contextRoot, a, r, i), o = t.extract(e.element, n);
4898
5112
  if (!o.success) throw o.error;
4899
5113
  let c = o.extractor, l = c?.outputType ?? e.normalizedType, u = {
4900
5114
  ...o.data,
4901
5115
  type: l,
4902
5116
  responseId: e.responseIdentifier
4903
5117
  }, d = t.getDeliveryFieldsForType(e.normalizedType), f = c.delivery?.fields ?? [];
4904
- s.push($c(u, ol(d, f), r.security, e.normalizedType));
5118
+ s.push(jl(u, Rl(d, f), r.security, e.normalizedType));
4905
5119
  }
4906
5120
  return Object.freeze(s);
4907
5121
  }
4908
- function ol(e, t) {
5122
+ function Rl(e, t) {
4909
5123
  let n = /* @__PURE__ */ new Map();
4910
5124
  for (let r of [...t, ...e]) n.set(JSON.stringify(r.path), r);
4911
5125
  return [...n.values()];
4912
5126
  }
4913
- function sl(e) {
5127
+ function zl(e) {
4914
5128
  let t = /* @__PURE__ */ new Set();
4915
5129
  for (let n of e.getExtractors()) for (let e of n.elementTypes) t.add(e);
4916
5130
  return [...t];
4917
5131
  }
4918
- function cl(e) {
5132
+ function Bl(e) {
4919
5133
  let t = /* @__PURE__ */ new Map();
4920
5134
  for (let n of Object.values(e)) t.set(n.identifier, {
4921
5135
  identifier: n.identifier,
@@ -4926,30 +5140,30 @@ function cl(e) {
4926
5140
  }
4927
5141
  //#endregion
4928
5142
  //#region src/pnp/applyPnp.ts
4929
- var ll = "data-qti-colorscheme", ul = "data-qti-magnification";
4930
- function dl(e, t) {
5143
+ var Vl = "data-qti-colorscheme", Hl = "data-qti-magnification";
5144
+ function Ul(e, t) {
4931
5145
  let n = t?.display?.colorScheme;
4932
- !n || n === "default" ? e.removeAttribute(ll) : e.setAttribute(ll, n);
5146
+ !n || n === "default" ? e.removeAttribute(Vl) : e.setAttribute(Vl, n);
4933
5147
  let r = t?.display?.magnification;
4934
- r !== void 0 && Number.isFinite(r) && r > 0 ? (e.setAttribute(ul, String(r)), e.style?.setProperty?.("--qti-magnification", String(r))) : (e.removeAttribute(ul), e.style?.removeProperty?.("--qti-magnification"));
5148
+ r !== void 0 && Number.isFinite(r) && r > 0 ? (e.setAttribute(Hl, String(r)), e.style?.setProperty?.("--qti-magnification", String(r))) : (e.removeAttribute(Hl), e.style?.removeProperty?.("--qti-magnification"));
4935
5149
  }
4936
5150
  //#endregion
4937
5151
  //#region src/catalog/catalogExtractor.ts
4938
- function fl(e) {
5152
+ function Wl(e) {
4939
5153
  if (!e.trim()) return /* @__PURE__ */ new Map();
4940
5154
  let t = s(`<root>${e}</root>`, { lowerCaseTagName: !0 }).querySelector("qti-catalog-info");
4941
- return t ? hl(t) : /* @__PURE__ */ new Map();
5155
+ return t ? ql(t) : /* @__PURE__ */ new Map();
4942
5156
  }
4943
- function pl(e) {
5157
+ function Gl(e) {
4944
5158
  let t = s(e, { lowerCaseTagName: !0 }).querySelector("qti-catalog-info");
4945
- return t ? hl(t) : /* @__PURE__ */ new Map();
5159
+ return t ? ql(t) : /* @__PURE__ */ new Map();
4946
5160
  }
4947
- function ml(e, t) {
5161
+ function Kl(e, t) {
4948
5162
  let n = new Map(e);
4949
5163
  for (let [e, r] of t) n.set(e, r);
4950
5164
  return n;
4951
5165
  }
4952
- function hl(e) {
5166
+ function ql(e) {
4953
5167
  let t = /* @__PURE__ */ new Map();
4954
5168
  for (let n of e.querySelectorAll("qti-catalog")) {
4955
5169
  let e = n.getAttribute("id") ?? n.getAttribute("identifier");
@@ -4957,14 +5171,14 @@ function hl(e) {
4957
5171
  let r = [];
4958
5172
  for (let e of n.querySelectorAll("qti-card")) {
4959
5173
  let t = e.getAttribute("support") ?? e.getAttribute("usage");
4960
- for (let n of gl(e, t ?? void 0)) r.push(n);
5174
+ for (let n of Jl(e, t ?? void 0)) r.push(n);
4961
5175
  }
4962
5176
  r.length > 0 && t.set(e, { entries: r });
4963
5177
  }
4964
5178
  for (let n of e.querySelectorAll("qti-card")) {
4965
5179
  let e = n.getAttribute("identifier");
4966
5180
  if (!e) continue;
4967
- let r = gl(n);
5181
+ let r = Jl(n);
4968
5182
  if (r.length > 0) {
4969
5183
  let n = t.get(e);
4970
5184
  n ? n.entries.push(...r) : t.set(e, { entries: r });
@@ -4972,35 +5186,35 @@ function hl(e) {
4972
5186
  }
4973
5187
  return t;
4974
5188
  }
4975
- function gl(e, t) {
5189
+ function Jl(e, t) {
4976
5190
  let n = e.querySelectorAll("qti-card-entry"), r = [];
4977
5191
  if (n.length > 0) {
4978
5192
  for (let e of n) {
4979
5193
  let n = e.getAttribute("usage") ?? e.getAttribute("data-reading-type") ?? t;
4980
5194
  n && r.push({
4981
5195
  usage: n,
4982
- lang: _l(e),
4983
- html: vl(e)
5196
+ lang: Yl(e),
5197
+ html: Xl(e)
4984
5198
  });
4985
5199
  }
4986
5200
  return r;
4987
5201
  }
4988
5202
  return t && r.push({
4989
5203
  usage: t,
4990
- lang: _l(e),
4991
- html: vl(e)
5204
+ lang: Yl(e),
5205
+ html: Xl(e)
4992
5206
  }), r;
4993
5207
  }
4994
- function _l(e) {
5208
+ function Yl(e) {
4995
5209
  return e.getAttribute("xml:lang") ?? e.getAttribute("xmllang") ?? e.getAttribute("lang") ?? void 0;
4996
5210
  }
4997
- function vl(e) {
5211
+ function Xl(e) {
4998
5212
  let t = e.querySelector("qti-html-content"), n = e.querySelector("qti-file-href");
4999
5213
  return t ? t.innerHTML ?? t.text ?? "" : n ? n.getAttribute("src") ?? n.text?.trim() ?? "" : "";
5000
5214
  }
5001
5215
  //#endregion
5002
5216
  //#region src/catalog/catalogLookup.ts
5003
- function yl(e, t, n, r) {
5217
+ function Zl(e, t, n, r) {
5004
5218
  let i = e.get(t);
5005
5219
  if (!i) return null;
5006
5220
  let a = i.entries.filter((e) => e.usage === n);
@@ -5016,11 +5230,11 @@ function yl(e, t, n, r) {
5016
5230
  }
5017
5231
  //#endregion
5018
5232
  //#region src/pci/types.ts
5019
- var bl = class extends Error {
5233
+ var Ql = class extends Error {
5020
5234
  constructor(e, t) {
5021
5235
  super(`PCI module loading is disabled for response '${e}'. Provide a host-controlled moduleResolver before loading '${t}'.`), this.responseIdentifier = e, this.authoredPath = t, this.name = "PciModuleResolverRequiredError";
5022
5236
  }
5023
- }, xl = class extends Error {
5237
+ }, $l = class extends Error {
5024
5238
  constructor(e, t, n) {
5025
5239
  super(t ? `PCI module failed to load from '${e}' and fallback '${t}'` : `PCI module failed to load from '${e}'`), this.primaryPath = e, this.fallbackPath = t, this.name = "PciLoadError", n && Object.defineProperty(this, "cause", {
5026
5240
  value: n,
@@ -5028,7 +5242,7 @@ var bl = class extends Error {
5028
5242
  configurable: !0
5029
5243
  });
5030
5244
  }
5031
- }, Sl = class {
5245
+ }, eu = class {
5032
5246
  constructor(e, t = {}) {
5033
5247
  this.module = null, this.destroyed = !1, this.loadGeneration = 0, this._response = null, this._hasResponse = !1, this._moduleOwnsResponse = !1, this._restorePending = !1, this._responseChangeListeners = /* @__PURE__ */ new Set(), this._remountRequestListeners = /* @__PURE__ */ new Set(), this.data = e, this.baseUrl = typeof t == "string" ? t : t.baseUrl ?? "", this.moduleResolver = typeof t == "string" ? void 0 : t.moduleResolver;
5034
5248
  }
@@ -5040,7 +5254,7 @@ var bl = class extends Error {
5040
5254
  }
5041
5255
  async load() {
5042
5256
  if (this.destroyed) throw Error("Cannot load a destroyed PciHost");
5043
- if (!this.moduleResolver) throw new bl(this.data.responseIdentifier, this.data.primaryPath);
5257
+ if (!this.moduleResolver) throw new Ql(this.data.responseIdentifier, this.data.primaryPath);
5044
5258
  let e = ++this.loadGeneration, t = this.resolveUrl(this.data.primaryPath);
5045
5259
  try {
5046
5260
  let n = await this.resolveModule(t, this.data.primaryPath, "primary");
@@ -5048,14 +5262,14 @@ var bl = class extends Error {
5048
5262
  return;
5049
5263
  } catch (t) {
5050
5264
  if (!this.isCurrentLoad(e)) throw t;
5051
- if (!this.data.fallbackPath) throw new xl(this.data.primaryPath, void 0, t);
5265
+ if (!this.data.fallbackPath) throw new $l(this.data.primaryPath, void 0, t);
5052
5266
  }
5053
5267
  let n = this.resolveUrl(this.data.fallbackPath);
5054
5268
  try {
5055
5269
  let t = await this.resolveModule(n, this.data.fallbackPath, "fallback");
5056
5270
  this.adoptResolvedModule(t, this.data.fallbackPath, e);
5057
5271
  } catch (t) {
5058
- throw this.isCurrentLoad(e) ? new xl(this.data.primaryPath, this.data.fallbackPath, t) : t;
5272
+ throw this.isCurrentLoad(e) ? new $l(this.data.primaryPath, this.data.fallbackPath, t) : t;
5059
5273
  }
5060
5274
  }
5061
5275
  initialize(e) {
@@ -5140,7 +5354,7 @@ var bl = class extends Error {
5140
5354
  if (r.length > 0) throw Error(`PCI module at '${t}' does not export a valid PciModule interface; missing: ${r.join(", ")}`);
5141
5355
  return n;
5142
5356
  }
5143
- }, Cl = {
5357
+ }, tu = {
5144
5358
  stringValue: "string",
5145
5359
  floatValue: "float",
5146
5360
  integerValue: "integer",
@@ -5150,20 +5364,20 @@ var bl = class extends Error {
5150
5364
  nsf: "integer",
5151
5365
  exponent: "integer"
5152
5366
  };
5153
- function wl(e) {
5367
+ function nu(e) {
5154
5368
  let t = e.toUpperCase().charCodeAt(0);
5155
5369
  return t >= 48 && t <= 57 ? t - 48 : t >= 65 && t <= 90 ? t - 65 + 10 : -1;
5156
5370
  }
5157
- function Tl(e, t) {
5371
+ function ru(e, t) {
5158
5372
  let n = 0;
5159
5373
  for (let r of e) {
5160
- let e = wl(r);
5374
+ let e = nu(r);
5161
5375
  if (e < 0 || e >= t) return null;
5162
5376
  n = n * t + e;
5163
5377
  }
5164
5378
  return n;
5165
5379
  }
5166
- function El(e, t) {
5380
+ function iu(e, t) {
5167
5381
  if (!Number.isInteger(t) || t < 2 || t > 36) return {
5168
5382
  valid: !1,
5169
5383
  value: null,
@@ -5185,7 +5399,7 @@ function El(e, t) {
5185
5399
  nsf: null,
5186
5400
  exponent: null
5187
5401
  };
5188
- let o = Tl(i || "0", t), s = Tl(a || "0", t);
5402
+ let o = ru(i || "0", t), s = ru(a || "0", t);
5189
5403
  if (o === null || s === null) return {
5190
5404
  valid: !1,
5191
5405
  value: null,
@@ -5219,8 +5433,8 @@ function El(e, t) {
5219
5433
  exponent: c
5220
5434
  };
5221
5435
  }
5222
- function Dl(e, t = 10) {
5223
- let n = El(e, t);
5436
+ function au(e, t = 10) {
5437
+ let n = iu(e, t);
5224
5438
  return {
5225
5439
  stringValue: e,
5226
5440
  floatValue: n.value,
@@ -5234,32 +5448,32 @@ function Dl(e, t = 10) {
5234
5448
  }
5235
5449
  //#endregion
5236
5450
  //#region src/core/Player.ts
5237
- function Ol(e) {
5238
- let t = new Al(e, void 0, { compileOnly: !0 });
5451
+ function ou(e) {
5452
+ let t = new cu(e, void 0, { compileOnly: !0 });
5239
5453
  try {
5240
5454
  return t.capturePreparedDefinition();
5241
5455
  } finally {
5242
5456
  t.destroy();
5243
5457
  }
5244
5458
  }
5245
- function kl(e, t, n = !1) {
5246
- return new Al(e, t, { skipTemplateProcessing: n });
5459
+ function su(e, t, n = !1) {
5460
+ return new cu(e, t, { skipTemplateProcessing: n });
5247
5461
  }
5248
- var Al = class {
5462
+ var cu = class {
5249
5463
  constructor(i, a, s = {}) {
5250
- this.interactionDataCache = null, this.warnedImpliedZeroMaxScore = !1, this.responseProcessingProgram = null, this.templateProcessingProgram = null, this.outcomeProcessingProgram = null, this._catalogIndex = /* @__PURE__ */ new Map(), this._stimulusCatalogIndexes = /* @__PURE__ */ new Map(), this._pciHosts = /* @__PURE__ */ new Map(), this._pnpChangeListeners = /* @__PURE__ */ new Set(), this.lifecycleStatus = "initial", this.accumulatedDurationMs = 0, this.config = i, this.itemXml = i.itemXml ?? "", this.role = i.role ?? "candidate", this.sessionGuid = Ml(), this.sessionStartedAt = Date.now(), this.rng = i.rng ?? (typeof i.seed == "number" ? Jo(i.seed) : Math.random), this.mapper = a ? a.mapper : i.elementNameMapper ? i.elementNameMapper : o(this.itemXml) === "3.0" ? new r() : new t();
5464
+ this.interactionDataCache = null, this.warnedImpliedZeroMaxScore = !1, this.responseProcessingProgram = null, this.templateProcessingProgram = null, this.outcomeProcessingProgram = null, this._catalogIndex = /* @__PURE__ */ new Map(), this._stimulusCatalogIndexes = /* @__PURE__ */ new Map(), this._pciHosts = /* @__PURE__ */ new Map(), this._pnpChangeListeners = /* @__PURE__ */ new Set(), this.lifecycleStatus = "initial", this.accumulatedDurationMs = 0, this.config = i, this.itemXml = i.itemXml ?? "", this.role = i.role ?? "candidate", this.sessionGuid = uu(), this.sessionStartedAt = Date.now(), this.rng = i.rng ?? (typeof i.seed == "number" ? Es(i.seed) : Math.random), this.mapper = a ? a.mapper : i.elementNameMapper ? i.elementNameMapper : o(this.itemXml) === "3.0" ? new r() : new t();
5251
5465
  let c = a?.attributeMapper ?? i.attributeNameMapper ?? (this.mapper.version === "3.0" ? new n() : new e());
5252
5466
  if (this.config = {
5253
5467
  ...i,
5254
5468
  elementNameMapper: this.mapper,
5255
5469
  attributeNameMapper: c
5256
- }, a ? (this.itemDocument = a.itemDocument, this.decls = Nl(a.declarations)) : (this.itemDocument = Pc({
5470
+ }, a ? (this.itemDocument = a.itemDocument, this.decls = du(a.declarations)) : (this.itemDocument = fl({
5257
5471
  itemXml: this.itemXml,
5258
5472
  elementNameMapper: this.mapper,
5259
5473
  attributeNameMapper: c,
5260
5474
  security: this.config.security
5261
- }), this.decls = this.buildDeclarations(), this.ensureBuiltinDeclarations(this.decls)), this.sourceDeclarations = Nl(this.decls), this.ctx = new p(this.decls), this.ops = new m(), this.extractionRegistry = this.config.extractionRegistry ?? Vo(this.mapper), this.componentRegistry = this.config.componentRegistry ?? Ac(), this.i18nProvider = this.config.i18nProvider ?? this.createDefaultI18nProvider(), !this.extractionRegistry.isSealed()) {
5262
- for (let e of xc()) this.extractionRegistry.register(e.extractor), Ho(this.extractionRegistry, e.type, e.delivery);
5475
+ }), this.decls = this.buildDeclarations(), this.ensureBuiltinDeclarations(this.decls)), this.sourceDeclarations = du(this.decls), this.ctx = new p(this.decls), this.ops = new m(), this.extractionRegistry = this.config.extractionRegistry ?? ys(this.mapper), this.componentRegistry = this.config.componentRegistry ?? cl(), this.i18nProvider = this.config.i18nProvider ?? this.createDefaultI18nProvider(), !this.extractionRegistry.isSealed()) {
5476
+ for (let e of $c()) this.extractionRegistry.register(e.extractor), bs(this.extractionRegistry, e.type, e.delivery);
5263
5477
  this.extractionRegistry.seal();
5264
5478
  }
5265
5479
  let l = {
@@ -5278,13 +5492,13 @@ var Al = class {
5278
5492
  else {
5279
5493
  let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
5280
5494
  for (let e of this.config.deliveryContext?.catalogSources ?? []) {
5281
- let n = fl(e.xml);
5495
+ let n = Wl(e.xml);
5282
5496
  if (e.scope === "stimulus" && e.stimulusIdentifier) {
5283
5497
  let t = this._stimulusCatalogIndexes.get(e.stimulusIdentifier) ?? /* @__PURE__ */ new Map();
5284
- this._stimulusCatalogIndexes.set(e.stimulusIdentifier, ml(t, n));
5285
- } else t = ml(t, n);
5498
+ this._stimulusCatalogIndexes.set(e.stimulusIdentifier, Kl(t, n));
5499
+ } else t = Kl(t, n);
5286
5500
  }
5287
- this.config.catalogXml && (e = ml(e, pl(this.config.catalogXml))), e = ml(e, pl(this.itemXml)), this._catalogIndex = ml(e, t);
5501
+ this.config.catalogXml && (e = Kl(e, Gl(this.config.catalogXml))), e = Kl(e, Gl(this.itemXml)), this._catalogIndex = Kl(e, t);
5288
5502
  }
5289
5503
  !a && this.config.strictQtiCompliance?.enabled && this.validateStrictCompliance();
5290
5504
  }
@@ -5296,7 +5510,7 @@ var Al = class {
5296
5510
  mapper: this.mapper,
5297
5511
  attributeMapper: this.config.attributeNameMapper,
5298
5512
  itemDocument: this.itemDocument,
5299
- declarations: Nl(this.sourceDeclarations),
5513
+ declarations: du(this.sourceDeclarations),
5300
5514
  responseProcessing: this.responseProcessing,
5301
5515
  responseProcessingProgram: this.responseProcessingProgram,
5302
5516
  templateProcessingProgram: this.templateProcessingProgram,
@@ -5306,10 +5520,10 @@ var Al = class {
5306
5520
  });
5307
5521
  }
5308
5522
  applyPnp(e) {
5309
- this._rootEl = e, dl(e, this._pnp);
5523
+ this._rootEl = e, Ul(e, this._pnp);
5310
5524
  }
5311
5525
  updatePnp(e) {
5312
- this._pnp = jl(this._pnp, e), this._rootEl && dl(this._rootEl, this._pnp);
5526
+ this._pnp = lu(this._pnp, e), this._rootEl && Ul(this._rootEl, this._pnp);
5313
5527
  for (let e of this._pnpChangeListeners) e(this._pnp);
5314
5528
  }
5315
5529
  getPnp() {
@@ -5322,14 +5536,14 @@ var Al = class {
5322
5536
  return this.config.deliveryContext;
5323
5537
  }
5324
5538
  getCatalogEntry(e, t, n, r) {
5325
- let i = (r?.stimulusIdentifier ? yl(this._stimulusCatalogIndexes.get(r.stimulusIdentifier) ?? /* @__PURE__ */ new Map(), e, t, n) : null) ?? yl(this._catalogIndex, e, t, n);
5326
- return i === null ? null : Fl(i) ? Ns(i.trim(), this.config.security?.urlPolicy, "img") : Zc(this.sanitizeHtmlContent(i), this.config.security?.trustedTypesPolicyName);
5539
+ let i = (r?.stimulusIdentifier ? Zl(this._stimulusCatalogIndexes.get(r.stimulusIdentifier) ?? /* @__PURE__ */ new Map(), e, t, n) : null) ?? Zl(this._catalogIndex, e, t, n);
5540
+ return i === null ? null : pu(i) ? dc(i.trim(), this.config.security?.urlPolicy, "img") : kl(this.sanitizeHtmlContent(i), this.config.security?.trustedTypesPolicyName);
5327
5541
  }
5328
5542
  sanitizeHtmlContent(e) {
5329
- return tc(e, { security: this.config.security });
5543
+ return Nc(e, { security: this.config.security });
5330
5544
  }
5331
5545
  createPciHost(e) {
5332
- let t = new Sl(e, {
5546
+ let t = new eu(e, {
5333
5547
  baseUrl: this.config.pci?.baseUrl,
5334
5548
  moduleResolver: this.config.pci?.moduleResolver
5335
5549
  });
@@ -5540,7 +5754,7 @@ var Al = class {
5540
5754
  if (e.scope && e.scope !== "all" && n !== e.scope) continue;
5541
5755
  let a = [...i.view];
5542
5756
  if (a.length > 0 && t && !a.includes(t)) continue;
5543
- let o = Zc(tc(this.renderPrintedVariables(i.content), { security: this.config.security }), this.config.security?.trustedTypesPolicyName);
5757
+ let o = kl(Nc(this.renderPrintedVariables(i.content), { security: this.config.security }), this.config.security?.trustedTypesPolicyName);
5544
5758
  r.push({
5545
5759
  view: a,
5546
5760
  html: o,
@@ -5557,7 +5771,7 @@ var Al = class {
5557
5771
  return this.extractionRegistry;
5558
5772
  }
5559
5773
  getInteractionData() {
5560
- return this.interactionDataCache || (this.interactionDataCache = al({
5774
+ return this.interactionDataCache || (this.interactionDataCache = Ll({
5561
5775
  document: this.itemDocument,
5562
5776
  extractionRegistry: this.extractionRegistry,
5563
5777
  declarations: this.decls,
@@ -6002,7 +6216,7 @@ var Al = class {
6002
6216
  }
6003
6217
  qtiValueToSerializable(e) {
6004
6218
  if (!e || e.kind !== "value") return null;
6005
- if (e.cardinality !== "record") return Pl(e.value);
6219
+ if (e.cardinality !== "record") return fu(e.value);
6006
6220
  let t = {};
6007
6221
  for (let [n, r] of Object.entries(e.value)) t[n] = {
6008
6222
  ...r.baseType ? { baseType: r.baseType } : {},
@@ -6013,7 +6227,7 @@ var Al = class {
6013
6227
  }
6014
6228
  qtiValueToPublic(e) {
6015
6229
  if (!e || e.kind !== "value") return null;
6016
- if (e.cardinality !== "record") return Pl(e.value);
6230
+ if (e.cardinality !== "record") return fu(e.value);
6017
6231
  let t = {};
6018
6232
  for (let [n, r] of Object.entries(e.value)) t[n] = this.qtiValueToPublic(r);
6019
6233
  return t;
@@ -6113,15 +6327,15 @@ var Al = class {
6113
6327
  }
6114
6328
  coerceToDeclarationValue(e, t, n, r) {
6115
6329
  if (n == null) return re(e, t);
6116
- if (typeof n == "object" && n && "kind" in n) return Pl(n);
6330
+ if (typeof n == "object" && n && "kind" in n) return fu(n);
6117
6331
  let i = r ? this.getExtendedTextBase(r) : void 0;
6118
6332
  if (t === "record") return this.coerceRecordValue(n, i ?? 10);
6119
6333
  if (!e) return re(void 0, t);
6120
- if (e === "file") return t === "multiple" || t === "ordered" ? w(e, t, Pl((Array.isArray(n) ? n : [n]).filter((e) => e != null))) : w(e, t, Pl(n));
6334
+ if (e === "file") return t === "multiple" || t === "ordered" ? w(e, t, fu((Array.isArray(n) ? n : [n]).filter((e) => e != null))) : w(e, t, fu(n));
6121
6335
  if (t === "multiple" || t === "ordered") {
6122
6336
  let r = (Array.isArray(n) ? n : [n]).map((e) => String(e ?? "").trim()).filter((e) => e.length > 0).map((t) => {
6123
6337
  if (i && (e === "integer" || e === "float")) {
6124
- let n = Dl(t, i);
6338
+ let n = au(t, i);
6125
6339
  return e === "integer" ? n.integerValue : n.floatValue;
6126
6340
  }
6127
6341
  let n = y(e, t);
@@ -6132,7 +6346,7 @@ var Al = class {
6132
6346
  let a = String(n ?? "").trim();
6133
6347
  if (a.length === 0) return re(e, t);
6134
6348
  if (i && (e === "integer" || e === "float")) {
6135
- let t = Dl(a, i), n = e === "integer" ? t.integerValue : t.floatValue;
6349
+ let t = au(a, i), n = e === "integer" ? t.integerValue : t.floatValue;
6136
6350
  return n === null ? re(e, "single") : w(e, "single", n);
6137
6351
  }
6138
6352
  return y(e, a);
@@ -6150,7 +6364,7 @@ var Al = class {
6150
6364
  } catch {
6151
6365
  return re(void 0, "record");
6152
6366
  }
6153
- else n = Dl(e, t);
6367
+ else n = au(e, t);
6154
6368
  }
6155
6369
  if (!n || typeof n != "object" || Array.isArray(n)) return re(void 0, "record");
6156
6370
  let r = {};
@@ -6159,7 +6373,7 @@ var Al = class {
6159
6373
  r[e] = t;
6160
6374
  continue;
6161
6375
  }
6162
- let n = Cl[e], i = t;
6376
+ let n = tu[e], i = t;
6163
6377
  if (t && typeof t == "object" && !Array.isArray(t) && "value" in t) {
6164
6378
  let e = t;
6165
6379
  n = e.baseType ?? n, i = e.value;
@@ -6185,12 +6399,12 @@ var Al = class {
6185
6399
  return r = r.replace(/<printedVariable\b([^>]*)\/>/gi, (e, r) => n(t(String(r)))), r;
6186
6400
  }
6187
6401
  renderHtmlContent(e) {
6188
- return Zc(tc(this.renderPrintedVariables(e), { security: this.config.security }), this.config.security?.trustedTypesPolicyName);
6402
+ return kl(Nc(this.renderPrintedVariables(e), { security: this.config.security }), this.config.security?.trustedTypesPolicyName);
6189
6403
  }
6190
6404
  getModalFeedback(e) {
6191
6405
  let t = [];
6192
6406
  for (let n of this.itemDocument.readModalFeedback()) {
6193
- let { identifier: r, outcomeIdentifier: i, showHide: a, title: o } = n, s = Zc(tc(n.content, { security: this.config.security }), this.config.security?.trustedTypesPolicyName), c = e[i];
6407
+ let { identifier: r, outcomeIdentifier: i, showHide: a, title: o } = n, s = kl(Nc(n.content, { security: this.config.security }), this.config.security?.trustedTypesPolicyName), c = e[i];
6194
6408
  (a === "show" ? c === r : c !== r) && s && t.push({
6195
6409
  identifier: r,
6196
6410
  outcomeIdentifier: i,
@@ -6202,7 +6416,7 @@ var Al = class {
6202
6416
  return t;
6203
6417
  }
6204
6418
  };
6205
- function jl(e, t) {
6419
+ function lu(e, t) {
6206
6420
  return {
6207
6421
  display: {
6208
6422
  ...e?.display ?? {},
@@ -6218,7 +6432,7 @@ function jl(e, t) {
6218
6432
  }
6219
6433
  };
6220
6434
  }
6221
- function Ml() {
6435
+ function uu() {
6222
6436
  let e = typeof crypto < "u" ? crypto : void 0;
6223
6437
  if (typeof e?.randomUUID == "function") return e.randomUUID();
6224
6438
  if (typeof e?.getRandomValues == "function") {
@@ -6227,26 +6441,26 @@ function Ml() {
6227
6441
  }
6228
6442
  throw Error("No Web Crypto API available: cannot generate a session GUID. @pie-qti/item-player requires crypto.randomUUID or crypto.getRandomValues (present in all supported browsers and in Node >= 20).");
6229
6443
  }
6230
- function Nl(e) {
6444
+ function du(e) {
6231
6445
  return structuredClone(e);
6232
6446
  }
6233
- function Pl(e) {
6447
+ function fu(e) {
6234
6448
  return !e || typeof e != "object" ? e : structuredClone(e);
6235
6449
  }
6236
- function Fl(e) {
6450
+ function pu(e) {
6237
6451
  let t = e.trim();
6238
6452
  return /^(https?:\/\/|\/\/|\/|\.{0,2}\/|data:|blob:)/i.test(t) || /\.(png|jpe?g|gif|webp|svg|mp3|wav|ogg|mp4|webm|pdf)(\?.*)?$/i.test(t);
6239
6453
  }
6240
6454
  //#endregion
6241
6455
  //#region src/core/rolePolicy.ts
6242
- var Il = /* @__PURE__ */ new Set([
6456
+ var mu = /* @__PURE__ */ new Set([
6243
6457
  "scorer",
6244
6458
  "author",
6245
6459
  "tutor",
6246
6460
  "testConstructor"
6247
6461
  ]);
6248
- function Ll(e) {
6249
- let t = e === "candidate", n = Il.has(e);
6462
+ function hu(e) {
6463
+ let t = e === "candidate", n = mu.has(e);
6250
6464
  return {
6251
6465
  isCandidate: t,
6252
6466
  isReadOnly: !t,
@@ -6255,7 +6469,7 @@ function Ll(e) {
6255
6469
  }
6256
6470
  //#endregion
6257
6471
  //#region src/components/utils/feedbackUtils.ts
6258
- var Rl = [
6472
+ var gu = [
6259
6473
  {
6260
6474
  pattern: /<strong>Incorrect;<\/strong>/gi,
6261
6475
  replacement: "<strong>Incorrect</strong> "
@@ -6273,55 +6487,55 @@ var Rl = [
6273
6487
  replacement: "Correct "
6274
6488
  }
6275
6489
  ];
6276
- function zl(e, t = Rl) {
6490
+ function _u(e, t = gu) {
6277
6491
  if (!e) return e;
6278
6492
  let n = e;
6279
6493
  for (let e of t) n = n.replace(e.pattern, e.replacement);
6280
6494
  return n;
6281
6495
  }
6282
- function Bl(e, t) {
6496
+ function vu(e, t) {
6283
6497
  let { outcomeValues: n, applyHeuristics: r = !1, wrapWithSpan: i = !1, transforms: a } = t;
6284
6498
  return e && e.replace(/<feedbackInline\b([^>]*)>([\s\S]*?)<\/feedbackInline>/gi, (e, t, o) => {
6285
- let s = Vl(t, "outcomeIdentifier"), c = Vl(t, "identifier"), l = Vl(t, "showHide") ?? "show", u = s ? n[s] : void 0;
6499
+ let s = yu(t, "outcomeIdentifier"), c = yu(t, "identifier"), l = yu(t, "showHide") ?? "show", u = s ? n[s] : void 0;
6286
6500
  if (s === null || c === null || u == null || u === "") return "";
6287
6501
  let d = Array.isArray(u) ? u.includes(c) : u === c;
6288
- return (l.toLowerCase() === "show" ? d : !d) ? (r && (o = zl(o, a)), i ? ` <span class="qti-feedback-inline">${o}</span>` : o) : "";
6502
+ return (l.toLowerCase() === "show" ? d : !d) ? (r && (o = _u(o, a)), i ? ` <span class="qti-feedback-inline">${o}</span>` : o) : "";
6289
6503
  });
6290
6504
  }
6291
- function Vl(e, t) {
6505
+ function yu(e, t) {
6292
6506
  return (RegExp(`\\b${t}\\s*=\\s*"([^"]*)"`, "i").exec(e) ?? RegExp(`\\b${t}\\s*=\\s*'([^']*)'`, "i").exec(e))?.[1] ?? null;
6293
6507
  }
6294
6508
  //#endregion
6295
6509
  //#region src/components/utils/stylesheetRender.ts
6296
- function Hl(e, t = "[data-qti-item-body-scope]") {
6297
- return e ? e.stylesheets.map((e) => Ul(e, t)).filter(Boolean).join("\n") : "";
6510
+ function bu(e, t = "[data-qti-item-body-scope]") {
6511
+ return e ? e.stylesheets.map((e) => xu(e, t)).filter(Boolean).join("\n") : "";
6298
6512
  }
6299
- function Ul(e, t) {
6513
+ function xu(e, t) {
6300
6514
  let n = e.cssText?.trim();
6301
- return !n || l(n) ? "" : ql(n, Xl(e, t)) || "";
6515
+ return !n || l(n) ? "" : Tu(n, Ou(e, t)) || "";
6302
6516
  }
6303
- var Wl = /* @__PURE__ */ new Set([
6517
+ var Su = /* @__PURE__ */ new Set([
6304
6518
  "media",
6305
6519
  "supports",
6306
6520
  "container",
6307
6521
  "layer",
6308
6522
  "scope"
6309
- ]), Gl = /^(?::root|html|body)(?![\w-])/, Kl = /^@(?:-[a-z]+-)?([\w-]+)/i;
6310
- function ql(e, t = "[data-qti-item-body-scope]") {
6523
+ ]), Cu = /^(?::root|html|body)(?![\w-])/, wu = /^@(?:-[a-z]+-)?([\w-]+)/i;
6524
+ function Tu(e, t = "[data-qti-item-body-scope]") {
6311
6525
  if (!e) return "";
6312
6526
  let n = t?.trim();
6313
- return n ? Jl(tu(e), n).trim() : e;
6527
+ return n ? Eu(Nu(e), n).trim() : e;
6314
6528
  }
6315
- function Jl(e, t) {
6529
+ function Eu(e, t) {
6316
6530
  let n = "", r = 0;
6317
6531
  for (; r < e.length;) {
6318
- let i = Ql(e, r);
6532
+ let i = Au(e, r);
6319
6533
  if (i.end <= r) break;
6320
- n += Yl(i, t), r = i.end;
6534
+ n += Du(i, t), r = i.end;
6321
6535
  }
6322
6536
  return n;
6323
6537
  }
6324
- function Yl(e, t) {
6538
+ function Du(e, t) {
6325
6539
  if (e.kind === "statement") {
6326
6540
  let t = e.text.trim();
6327
6541
  return t === ";" ? "" : `${t}\n`;
@@ -6330,28 +6544,28 @@ function Yl(e, t) {
6330
6544
  let n = e.prelude.trim();
6331
6545
  if (!n) return "";
6332
6546
  if (n.startsWith("@")) {
6333
- let r = Kl.exec(n)?.[1]?.toLowerCase();
6334
- if (r && Wl.has(r)) {
6335
- let r = Jl(e.block, t);
6547
+ let r = wu.exec(n)?.[1]?.toLowerCase();
6548
+ if (r && Su.has(r)) {
6549
+ let r = Eu(e.block, t);
6336
6550
  return r.trim() ? `${n} {\n${r}}\n` : "";
6337
6551
  }
6338
6552
  return `${n} {${e.block}}\n`;
6339
6553
  }
6340
6554
  let r = e.block.trim();
6341
6555
  if (!r) return "";
6342
- let i = eu(n, ",").map((e) => Zl(e.trim(), t)).filter(Boolean);
6556
+ let i = Mu(n, ",").map((e) => ku(e.trim(), t)).filter(Boolean);
6343
6557
  return i.length === 0 ? "" : `${i.join(", ")} { ${r} }\n`;
6344
6558
  }
6345
- function Xl(e, t) {
6346
- return e.source !== "stimulus" || !e.stimulusIdentifier ? t : `${t} [data-stimulus-idref="${nu(e.stimulusIdentifier)}"]`;
6559
+ function Ou(e, t) {
6560
+ return e.source !== "stimulus" || !e.stimulusIdentifier ? t : `${t} [data-stimulus-idref="${Pu(e.stimulusIdentifier)}"]`;
6347
6561
  }
6348
- function Zl(e, t) {
6562
+ function ku(e, t) {
6349
6563
  if (!e) return "";
6350
6564
  if (e === t || e.startsWith(`${t} `)) return e;
6351
- let n = Gl.exec(e);
6565
+ let n = Cu.exec(e);
6352
6566
  return n ? `${t}${e.slice(n[0].length)}` : `${t} ${e}`;
6353
6567
  }
6354
- function Ql(e, t) {
6568
+ function Au(e, t) {
6355
6569
  let n = t, r = null, i = 0;
6356
6570
  for (; n < e.length;) {
6357
6571
  let a = e[n];
@@ -6365,7 +6579,7 @@ function Ql(e, t) {
6365
6579
  end: n + 1
6366
6580
  };
6367
6581
  else if (i === 0 && a === "{") {
6368
- let r = $l(e, n);
6582
+ let r = ju(e, n);
6369
6583
  return {
6370
6584
  kind: "rule",
6371
6585
  prelude: e.slice(t, n),
@@ -6381,7 +6595,7 @@ function Ql(e, t) {
6381
6595
  end: e.length
6382
6596
  };
6383
6597
  }
6384
- function $l(e, t) {
6598
+ function ju(e, t) {
6385
6599
  let n = 0, r = null;
6386
6600
  for (let i = t; i < e.length; i += 1) {
6387
6601
  let t = e[i];
@@ -6404,7 +6618,7 @@ function $l(e, t) {
6404
6618
  end: e.length
6405
6619
  };
6406
6620
  }
6407
- function eu(e, t) {
6621
+ function Mu(e, t) {
6408
6622
  let n = [], r = "", i = null, a = 0;
6409
6623
  for (let o = 0; o < e.length; o += 1) {
6410
6624
  let s = e[o];
@@ -6424,7 +6638,7 @@ function eu(e, t) {
6424
6638
  }
6425
6639
  return n.push(r), n;
6426
6640
  }
6427
- function tu(e) {
6641
+ function Nu(e) {
6428
6642
  let t = "", n = null, r = 0;
6429
6643
  for (; r < e.length;) {
6430
6644
  let i = e[r];
@@ -6449,67 +6663,67 @@ function tu(e) {
6449
6663
  }
6450
6664
  return t;
6451
6665
  }
6452
- function nu(e) {
6666
+ function Pu(e) {
6453
6667
  return e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n|\r|\f/g, " ");
6454
6668
  }
6455
6669
  //#endregion
6456
6670
  //#region src/components/utils/stimulusRender.ts
6457
- function ru(e, t) {
6671
+ function Fu(e, t) {
6458
6672
  return Object.fromEntries(Object.entries(e?.stimuli ?? {}).map(([e, n]) => [e, t(n.bodyHtml)]));
6459
6673
  }
6460
- function iu(e, t) {
6674
+ function Iu(e, t) {
6461
6675
  if (Object.keys(t).length === 0) return e;
6462
6676
  let n = /* @__PURE__ */ new Set(), r = e.replace(/<([a-z][\w:-]*)([^>]*\bdata-stimulus-idref=(["'])([^"']+)\3[^>]*)>\s*<\/\1>/gi, (e, r, i, a, o) => {
6463
6677
  let s = t[o];
6464
- return s ? (n.add(o), `<${r}${ou(i, "qti-stimulus-dock")}>${s}</${r}>`) : e;
6678
+ return s ? (n.add(o), `<${r}${Ru(i, "qti-stimulus-dock")}>${s}</${r}>`) : e;
6465
6679
  });
6466
6680
  r = r.replace(/<qti-assessment-stimulus-ref\b([^>]*)\/?>\s*(?:<\/qti-assessment-stimulus-ref>)?/gi, (e, r) => {
6467
- let i = au(r, "identifier");
6681
+ let i = Lu(r, "identifier");
6468
6682
  if (!i) return e;
6469
6683
  if (n.has(i)) return "";
6470
6684
  let a = t[i];
6471
- return a ? (n.add(i), `<div data-stimulus-idref="${su(i)}" class="qti-stimulus-dock">${a}</div>`) : e;
6685
+ return a ? (n.add(i), `<div data-stimulus-idref="${zu(i)}" class="qti-stimulus-dock">${a}</div>`) : e;
6472
6686
  });
6473
- let i = Object.entries(t).filter(([e]) => !n.has(e)).map(([e, t]) => `<div data-stimulus-idref="${su(e)}" class="qti-stimulus-block">${t}</div>`).join("");
6687
+ let i = Object.entries(t).filter(([e]) => !n.has(e)).map(([e, t]) => `<div data-stimulus-idref="${zu(e)}" class="qti-stimulus-block">${t}</div>`).join("");
6474
6688
  return i ? i + r : r;
6475
6689
  }
6476
- function au(e, t) {
6690
+ function Lu(e, t) {
6477
6691
  return e.match(RegExp(`\\b${t}\\s*=\\s*["']([^"']+)["']`, "i"))?.[1] ?? null;
6478
6692
  }
6479
- function ou(e, t) {
6693
+ function Ru(e, t) {
6480
6694
  let n = e.match(/\bclass\s*=\s*(["'])([^"']*)\1/i);
6481
6695
  if (!n) return `${e} class="${t}"`;
6482
6696
  let r = n[1], i = n[2] ?? "", a = new Set(i.split(/\s+/).filter(Boolean));
6483
6697
  return a.add(t), e.replace(n[0], `class=${r}${Array.from(a).join(" ")}${r}`);
6484
6698
  }
6485
- function su(e) {
6699
+ function zu(e) {
6486
6700
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
6487
6701
  }
6488
6702
  //#endregion
6489
6703
  //#region src/interactions/inline/render-plan.ts
6490
- function cu(e) {
6491
- return Tc(e);
6704
+ function Bu(e) {
6705
+ return rl(e);
6492
6706
  }
6493
- function lu(e) {
6494
- return Ec(e);
6707
+ function Vu(e) {
6708
+ return il(e);
6495
6709
  }
6496
- function uu(e, t) {
6497
- return e.replace(/<textEntryInteraction[^>]*responseIdentifier="([^"]+)"[^>]*?(?:\/>|><\/textEntryInteraction>)/gi, (e, n) => pu(t, n, "textEntryInteraction") ? fu("textEntry", n) : e).replace(/<qti-text-entry-interaction[^>]*response-identifier="([^"]+)"[^>]*?(?:\/>|><\/qti-text-entry-interaction>)/gi, (e, n) => pu(t, n, "textEntryInteraction") ? fu("textEntry", n) : e).replace(/<inlineChoiceInteraction[^>]*responseIdentifier="([^"]+)"[^>]*>[\s\S]*?<\/inlineChoiceInteraction>/gi, (e, n) => pu(t, n, "inlineChoiceInteraction") ? fu("inlineChoice", n) : e).replace(/<qti-inline-choice-interaction[^>]*response-identifier="([^"]+)"[^>]*>[\s\S]*?<\/qti-inline-choice-interaction>/gi, (e, n) => pu(t, n, "inlineChoiceInteraction") ? fu("inlineChoice", n) : e);
6710
+ function Hu(e, t) {
6711
+ return e.replace(/<textEntryInteraction[^>]*responseIdentifier="([^"]+)"[^>]*?(?:\/>|><\/textEntryInteraction>)/gi, (e, n) => Gu(t, n, "textEntryInteraction") ? Wu("textEntry", n) : e).replace(/<qti-text-entry-interaction[^>]*response-identifier="([^"]+)"[^>]*?(?:\/>|><\/qti-text-entry-interaction>)/gi, (e, n) => Gu(t, n, "textEntryInteraction") ? Wu("textEntry", n) : e).replace(/<inlineChoiceInteraction[^>]*responseIdentifier="([^"]+)"[^>]*>[\s\S]*?<\/inlineChoiceInteraction>/gi, (e, n) => Gu(t, n, "inlineChoiceInteraction") ? Wu("inlineChoice", n) : e).replace(/<qti-inline-choice-interaction[^>]*response-identifier="([^"]+)"[^>]*>[\s\S]*?<\/qti-inline-choice-interaction>/gi, (e, n) => Gu(t, n, "inlineChoiceInteraction") ? Wu("inlineChoice", n) : e);
6498
6712
  }
6499
- function du(e, t) {
6500
- let n = uu(e, t), r = [], i = /\[TEXTENTRY:([^\]]+)\]|\[INLINECHOICE:([^\]]+)\]/g, a = 0, o;
6713
+ function Uu(e, t) {
6714
+ let n = Hu(e, t), r = [], i = /\[TEXTENTRY:([^\]]+)\]|\[INLINECHOICE:([^\]]+)\]/g, a = 0, o;
6501
6715
  for (; (o = i.exec(n)) !== null;) {
6502
6716
  if (o.index > a && r.push({
6503
6717
  type: "html",
6504
6718
  content: n.substring(a, o.index)
6505
6719
  }), o[0].startsWith("[TEXTENTRY:")) {
6506
- let e = mu(t, o[1], "textEntryInteraction");
6720
+ let e = Ku(t, o[1], "textEntryInteraction");
6507
6721
  e && r.push({
6508
6722
  type: "textEntry",
6509
6723
  interaction: e
6510
6724
  });
6511
6725
  } else {
6512
- let e = mu(t, o[2], "inlineChoiceInteraction");
6726
+ let e = Ku(t, o[2], "inlineChoiceInteraction");
6513
6727
  e && r.push({
6514
6728
  type: "inlineChoice",
6515
6729
  interaction: e
@@ -6525,28 +6739,28 @@ function du(e, t) {
6525
6739
  content: n
6526
6740
  }];
6527
6741
  }
6528
- function fu(e, t) {
6742
+ function Wu(e, t) {
6529
6743
  return e === "textEntry" ? `[TEXTENTRY:${t}]` : `[INLINECHOICE:${t}]`;
6530
6744
  }
6531
- function pu(e, t, n) {
6532
- return !!mu(e, t, n);
6745
+ function Gu(e, t, n) {
6746
+ return !!Ku(e, t, n);
6533
6747
  }
6534
- function mu(e, t, n) {
6748
+ function Ku(e, t, n) {
6535
6749
  return e.find((e) => e.responseId === t && e.type === n) ?? null;
6536
6750
  }
6537
6751
  //#endregion
6538
6752
  //#region src/presentation/itemPresentationPlan.ts
6539
- function hu({ source: e, responses: t = {}, disabled: n = !1, role: r = "candidate", outcomeValues: i = {}, heuristicsConfig: a, itemBodyScopeSelector: o = "[data-qti-item-body-scope]", renderItemBodyRubrics: s = !0, onComponentError: c }) {
6540
- let l = Ll(r), u = n || l.isReadOnly, d = l.canViewCorrectResponses ? e.correctResponses : {}, { html: f, scopedCss: p } = _u({
6753
+ function qu({ source: e, responses: t = {}, disabled: n = !1, role: r = "candidate", outcomeValues: i = {}, heuristicsConfig: a, itemBodyScopeSelector: o = "[data-qti-item-body-scope]", renderItemBodyRubrics: s = !0, onComponentError: c }) {
6754
+ let l = hu(r), u = n || l.isReadOnly, d = l.canViewCorrectResponses ? e.correctResponses : {}, { html: f, scopedCss: p } = Yu({
6541
6755
  source: e,
6542
6756
  role: r,
6543
6757
  outcomeValues: i,
6544
6758
  heuristicsConfig: a,
6545
6759
  itemBodyScopeSelector: o,
6546
6760
  renderItemBodyRubrics: s
6547
- }), m = du(f, e.interactions).map((t) => t.type === "html" ? {
6761
+ }), m = Uu(f, e.interactions).map((t) => t.type === "html" ? {
6548
6762
  kind: "html",
6549
- html: vu(tc(t.content, { security: e.security }), e.security)
6763
+ html: Xu(Nc(t.content, { security: e.security }), e.security)
6550
6764
  } : t.type === "textEntry" ? {
6551
6765
  kind: "interaction",
6552
6766
  mount: {
@@ -6561,7 +6775,7 @@ function hu({ source: e, responses: t = {}, disabled: n = !1, role: r = "candida
6561
6775
  renderer: "inline-choice",
6562
6776
  interaction: t.interaction
6563
6777
  }
6564
- }), h = Ou({
6778
+ }), h = od({
6565
6779
  interactions: e.interactions,
6566
6780
  source: e,
6567
6781
  responses: t,
@@ -6573,7 +6787,7 @@ function hu({ source: e, responses: t = {}, disabled: n = !1, role: r = "candida
6573
6787
  kind: "interaction",
6574
6788
  mount: e
6575
6789
  }));
6576
- return gu({
6790
+ return Ju({
6577
6791
  capabilities: l,
6578
6792
  disabled: u,
6579
6793
  correctResponses: d,
@@ -6582,82 +6796,82 @@ function hu({ source: e, responses: t = {}, disabled: n = !1, role: r = "candida
6582
6796
  scopedCss: p
6583
6797
  });
6584
6798
  }
6585
- function gu(e) {
6799
+ function Ju(e) {
6586
6800
  if (!e || typeof e != "object" || Object.isFrozen(e)) return e;
6587
6801
  let t = Object.getPrototypeOf(e);
6588
6802
  if (!Array.isArray(e) && t !== Object.prototype && t !== null) return e;
6589
6803
  Object.freeze(e);
6590
- for (let t of Object.values(e)) gu(t);
6804
+ for (let t of Object.values(e)) Ju(t);
6591
6805
  return e;
6592
6806
  }
6593
- function _u({ source: e, role: t, outcomeValues: n, heuristicsConfig: r, itemBodyScopeSelector: i, renderItemBodyRubrics: a }) {
6594
- let o = Qc(e.itemBodyHtml), s = Hl(e.deliveryContext, i), c = ru(e.deliveryContext, (t) => tc(t, { security: e.security }));
6595
- o = iu(o, c), o = yu(o, t, { renderRubrics: a });
6807
+ function Yu({ source: e, role: t, outcomeValues: n, heuristicsConfig: r, itemBodyScopeSelector: i, renderItemBodyRubrics: a }) {
6808
+ let o = Al(e.itemBodyHtml), s = bu(e.deliveryContext, i), c = Fu(e.deliveryContext, (t) => Nc(t, { security: e.security }));
6809
+ o = Iu(o, c), o = Zu(o, t, { renderRubrics: a });
6596
6810
  let l = d(r);
6597
- return o = Bl(o, {
6811
+ return o = vu(o, {
6598
6812
  outcomeValues: n,
6599
6813
  applyHeuristics: l.feedbackTextFormatting,
6600
6814
  wrapWithSpan: !1
6601
6815
  }), {
6602
- html: Du(o),
6816
+ html: ad(o),
6603
6817
  scopedCss: s
6604
6818
  };
6605
6819
  }
6606
- function vu(e, t) {
6607
- return Zc(e, t?.trustedTypesPolicyName);
6820
+ function Xu(e, t) {
6821
+ return kl(e, t?.trustedTypesPolicyName);
6608
6822
  }
6609
- function yu(e, t, { renderRubrics: n }) {
6823
+ function Zu(e, t, { renderRubrics: n }) {
6610
6824
  if (!e || !/rubric-?block/i.test(e)) return e;
6611
6825
  try {
6612
6826
  let r = s(e, {
6613
6827
  lowerCaseTagName: !1,
6614
6828
  comment: !1
6615
6829
  });
6616
- return bu(r, t, { renderRubrics: n }), r.toString();
6830
+ return Qu(r, t, { renderRubrics: n }), r.toString();
6617
6831
  } catch {
6618
6832
  return e;
6619
6833
  }
6620
6834
  }
6621
- function bu(e, t, { renderRubrics: n }) {
6835
+ function Qu(e, t, { renderRubrics: n }) {
6622
6836
  let r = [...e.childNodes];
6623
6837
  for (let e of r) {
6624
6838
  let r = e.rawTagName?.toLowerCase();
6625
- if (r && xu(r) && (!n || !Su(e, t))) {
6839
+ if (r && $u(r) && (!n || !ed(e, t))) {
6626
6840
  e.remove();
6627
6841
  continue;
6628
6842
  }
6629
- e.childNodes?.length && bu(e, t, { renderRubrics: n }), r && xu(r) && e.replaceWith(Cu(e));
6843
+ e.childNodes?.length && Qu(e, t, { renderRubrics: n }), r && $u(r) && e.replaceWith(td(e));
6630
6844
  }
6631
6845
  }
6632
- function xu(e) {
6846
+ function $u(e) {
6633
6847
  return e === "rubricblock" || e === "qti-rubric-block";
6634
6848
  }
6635
- function Su(e, t) {
6849
+ function ed(e, t) {
6636
6850
  let n = e.getAttribute("view")?.trim();
6637
- return !n || wu(n).includes(t);
6851
+ return !n || nd(n).includes(t);
6638
6852
  }
6639
- function Cu(e) {
6853
+ function td(e) {
6640
6854
  let t = e.getAttribute("view")?.trim(), n = e.getAttribute("use")?.trim();
6641
6855
  return `<div ${[
6642
6856
  "class=\"qti-rubric-block\"",
6643
- t ? `data-qti-rubric-view="${Eu(t)}"` : "",
6644
- n ? `data-qti-rubric-use="${Eu(n)}"` : ""
6645
- ].filter(Boolean).join(" ")}>${Tu(e)}</div>`;
6857
+ t ? `data-qti-rubric-view="${id(t)}"` : "",
6858
+ n ? `data-qti-rubric-use="${id(n)}"` : ""
6859
+ ].filter(Boolean).join(" ")}>${rd(e)}</div>`;
6646
6860
  }
6647
- function wu(e) {
6861
+ function nd(e) {
6648
6862
  return e.split(/[\s,]+/).filter(Boolean);
6649
6863
  }
6650
- function Tu(e) {
6864
+ function rd(e) {
6651
6865
  return [...e.childNodes].map((e) => e.toString()).join("");
6652
6866
  }
6653
- function Eu(e) {
6867
+ function id(e) {
6654
6868
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
6655
6869
  }
6656
- function Du(e) {
6657
- return e.replace(/<(\w+Interaction|qti-[\w-]+-interaction|positionObjectStage|qti-position-object-stage)(\s[^>]*)?>[\s\S]*?<\/\1>/gi, (e, t) => lu(t.toLowerCase()) ? e : `<span class="qti-hidden-interaction">${e}</span>`);
6870
+ function ad(e) {
6871
+ return e.replace(/<(\w+Interaction|qti-[\w-]+-interaction|positionObjectStage|qti-position-object-stage)(\s[^>]*)?>[\s\S]*?<\/\1>/gi, (e, t) => Vu(t.toLowerCase()) ? e : `<span class="qti-hidden-interaction">${e}</span>`);
6658
6872
  }
6659
- function Ou({ interactions: e, source: t, responses: n, correctResponses: r, roleCapabilities: i, effectiveDisabled: a, onComponentError: o }) {
6660
- return e.filter((e) => !cu(e.type)).map((e) => {
6873
+ function od({ interactions: e, source: t, responses: n, correctResponses: r, roleCapabilities: i, effectiveDisabled: a, onComponentError: o }) {
6874
+ return e.filter((e) => !Bu(e.type)).map((e) => {
6661
6875
  try {
6662
6876
  let o = "stringIdentifier" in e && typeof e.stringIdentifier == "string" ? e.stringIdentifier : void 0;
6663
6877
  return {
@@ -6665,7 +6879,7 @@ function Ou({ interactions: e, source: t, responses: n, correctResponses: r, rol
6665
6879
  renderer: "web-component",
6666
6880
  interaction: e,
6667
6881
  tagName: t.componentRegistry.getTagName(e),
6668
- key: ku(e),
6882
+ key: sd(e),
6669
6883
  response: n[e.responseId] ?? null,
6670
6884
  ...o ? { stringResponse: n[o] ?? null } : {},
6671
6885
  correctResponse: i.canViewCorrectResponses ? r[e.responseId] ?? null : null,
@@ -6679,26 +6893,26 @@ function Ou({ interactions: e, source: t, responses: n, correctResponses: r, rol
6679
6893
  }
6680
6894
  }).filter((e) => e !== null);
6681
6895
  }
6682
- function ku(e) {
6896
+ function sd(e) {
6683
6897
  let t = e, n = Array.isArray(t?.choices) && t.choices.length > 0 ? t.choices.map((e) => e?.identifier).filter(Boolean).join(",") : "", r = typeof t?.prompt == "string" ? t.prompt : "";
6684
6898
  return `${e.type}|${e.responseId}|${n}|${r}`;
6685
6899
  }
6686
6900
  //#endregion
6687
6901
  //#region src/core/ItemSession.ts
6688
- function Au(e) {
6902
+ function cd(e) {
6689
6903
  let t = e;
6690
6904
  if (typeof t.getRuntimeBinding != "function") throw Error("ItemSession runtime binding is unavailable");
6691
6905
  return t.getRuntimeBinding();
6692
6906
  }
6693
- var ju = class {
6907
+ var ld = class {
6694
6908
  constructor(e, t, n = {}, r) {
6695
6909
  this.itemIdentifier = e, this.listeners = /* @__PURE__ */ new Set(), this.revision = 0, this.disposed = !1, this.defaultRole = t.role ?? "candidate";
6696
6910
  let i = { ...t };
6697
- this.player = r ? kl(i, r, !!n.restore) : new Al(i);
6911
+ this.player = r ? su(i, r, !!n.restore) : new cu(i);
6698
6912
  try {
6699
6913
  if (n.responses && this.assertKnownResponseIdentifiers(Object.keys(n.responses)), n.restore && this.player.restoreItemSession(n.restore), n.activate && this.player.getLifecycleStatus() === "suspended" && this.player.activateAttempt(), n.responses) {
6700
6914
  let e = this.player.getLifecycleStatus();
6701
- if (!Mu(e)) throw Error(`Cannot override responses while item session is ${e}`);
6915
+ if (!ud(e)) throw Error(`Cannot override responses while item session is ${e}`);
6702
6916
  this.player.setResponses({ ...n.responses });
6703
6917
  }
6704
6918
  this.currentView = this.captureView();
@@ -6708,10 +6922,10 @@ var ju = class {
6708
6922
  this.runtimeBinding = this.createBinding();
6709
6923
  }
6710
6924
  state() {
6711
- return Lu(this.currentView);
6925
+ return hd(this.currentView);
6712
6926
  }
6713
6927
  dispatch(e) {
6714
- if (this.assertActive(), Nu(e) && !Mu(this.currentView.lifecycleStatus)) throw Error(`Cannot ${Pu(e)} while item session is ${this.currentView.lifecycleStatus}`);
6928
+ if (this.assertActive(), dd(e) && !ud(this.currentView.lifecycleStatus)) throw Error(`Cannot ${fd(e)} while item session is ${this.currentView.lifecycleStatus}`);
6715
6929
  let t = this.currentView, n;
6716
6930
  switch (e.action) {
6717
6931
  case "setResponse":
@@ -6726,7 +6940,7 @@ var ju = class {
6726
6940
  default: n = this.player.runItemSessionAction(e);
6727
6941
  }
6728
6942
  this.revision += 1, this.currentView = this.captureView(n?.sessionState);
6729
- let r = Iu({
6943
+ let r = md({
6730
6944
  command: e,
6731
6945
  previous: t,
6732
6946
  current: this.currentView,
@@ -6735,9 +6949,9 @@ var ju = class {
6735
6949
  return this.notify(r), r;
6736
6950
  }
6737
6951
  present(e = {}) {
6738
- return this.assertActive(), hu({
6952
+ return this.assertActive(), qu({
6739
6953
  ...e,
6740
- disabled: e.disabled === !0 || !Mu(this.currentView.lifecycleStatus),
6954
+ disabled: e.disabled === !0 || !ud(this.currentView.lifecycleStatus),
6741
6955
  source: {
6742
6956
  itemBodyHtml: this.player.getItemBodyHtml(),
6743
6957
  interactions: this.player.getInteractionData(),
@@ -6748,8 +6962,8 @@ var ju = class {
6748
6962
  security: this.player.getSecurityConfig(),
6749
6963
  directRubrics: this.player.getRubrics({ scope: "direct" })
6750
6964
  },
6751
- responses: Lu(this.currentView.responses),
6752
- outcomeValues: Lu(this.currentView.outcomes),
6965
+ responses: hd(this.currentView.responses),
6966
+ outcomeValues: hd(this.currentView.outcomes),
6753
6967
  role: this.defaultRole
6754
6968
  });
6755
6969
  }
@@ -6757,7 +6971,7 @@ var ju = class {
6757
6971
  return this.assertActive(), this.listeners.add(e), () => this.listeners.delete(e);
6758
6972
  }
6759
6973
  serialize() {
6760
- return this.assertActive(), Lu(this.player.saveItemSession());
6974
+ return this.assertActive(), hd(this.player.saveItemSession());
6761
6975
  }
6762
6976
  getRuntimeBinding() {
6763
6977
  return this.assertActive(), this.runtimeBinding;
@@ -6765,19 +6979,19 @@ var ju = class {
6765
6979
  dispose() {
6766
6980
  if (this.disposed) return;
6767
6981
  let e = this.currentView;
6768
- this.disposed = !0, this.revision += 1, this.currentView = Lu({
6982
+ this.disposed = !0, this.revision += 1, this.currentView = hd({
6769
6983
  ...e,
6770
6984
  revision: this.revision,
6771
6985
  disposed: !0
6772
- }), this.player.destroy(), this.notify(Iu({
6986
+ }), this.player.destroy(), this.notify(md({
6773
6987
  command: { action: "dispose" },
6774
6988
  previous: e,
6775
6989
  current: this.currentView
6776
6990
  })), this.listeners.clear();
6777
6991
  }
6778
6992
  captureView(e = this.player.saveItemSession()) {
6779
- let t = Fu(e.responseVariables);
6780
- return Lu({
6993
+ let t = pd(e.responseVariables);
6994
+ return hd({
6781
6995
  revision: this.revision,
6782
6996
  itemIdentifier: e.itemIdentifier || this.itemIdentifier || void 0,
6783
6997
  role: this.defaultRole,
@@ -6790,9 +7004,9 @@ var ju = class {
6790
7004
  canSubmit: this.player.canSubmitResponses(t),
6791
7005
  disposed: this.disposed,
6792
7006
  responses: t,
6793
- outcomes: Fu(e.outcomeVariables),
6794
- templates: Fu(e.templateVariables),
6795
- context: Fu(e.contextVariables)
7007
+ outcomes: pd(e.outcomeVariables),
7008
+ templates: pd(e.templateVariables),
7009
+ context: pd(e.contextVariables)
6796
7010
  });
6797
7011
  }
6798
7012
  createBinding() {
@@ -6812,9 +7026,9 @@ var ju = class {
6812
7026
  this.assertActive();
6813
7027
  let t = this.player.createPciHost(e);
6814
7028
  return t.onResponseChange(() => {
6815
- if (this.disposed || !Mu(this.currentView.lifecycleStatus)) return;
7029
+ if (this.disposed || !ud(this.currentView.lifecycleStatus)) return;
6816
7030
  let n = this.currentView;
6817
- this.revision += 1, this.currentView = this.captureView(), this.notify(Iu({
7031
+ this.revision += 1, this.currentView = this.captureView(), this.notify(md({
6818
7032
  command: {
6819
7033
  action: "setResponse",
6820
7034
  responseIdentifier: e.responseIdentifier,
@@ -6829,7 +7043,7 @@ var ju = class {
6829
7043
  }
6830
7044
  notify(e) {
6831
7045
  for (let t of [...this.listeners]) try {
6832
- t(Lu(e));
7046
+ t(hd(e));
6833
7047
  } catch (e) {
6834
7048
  console.error("[QTI ItemSession] subscriber failed:", e);
6835
7049
  }
@@ -6842,56 +7056,56 @@ var ju = class {
6842
7056
  if (n) throw Error(`Unknown response identifier '${n}'`);
6843
7057
  }
6844
7058
  };
6845
- function Mu(e) {
7059
+ function ud(e) {
6846
7060
  return e === "initial" || e === "interacting";
6847
7061
  }
6848
- function Nu(e) {
7062
+ function dd(e) {
6849
7063
  return e.action === "setResponse" || e.action === "setResponses" || e.action === "suspendAttempt" || e.action === "endAttempt" || e.action === "submitAttempt";
6850
7064
  }
6851
- function Pu(e) {
7065
+ function fd(e) {
6852
7066
  return e.action === "setResponse" || e.action === "setResponses" ? "update responses" : `run ${e.action}`;
6853
7067
  }
6854
- function Fu(e) {
6855
- return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Lu(t.value)]));
7068
+ function pd(e) {
7069
+ return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, hd(t.value)]));
6856
7070
  }
6857
- function Iu(e) {
6858
- return Lu(e);
7071
+ function md(e) {
7072
+ return hd(e);
6859
7073
  }
6860
- function Lu(e) {
6861
- if (Array.isArray(e)) return Object.freeze(e.map((e) => Lu(e)));
7074
+ function hd(e) {
7075
+ if (Array.isArray(e)) return Object.freeze(e.map((e) => hd(e)));
6862
7076
  if (!e || typeof e != "object") return e;
6863
7077
  if (ArrayBuffer.isView(e)) return structuredClone(e);
6864
7078
  if (e instanceof ArrayBuffer) return e.slice(0);
6865
7079
  let t = Object.getPrototypeOf(e);
6866
7080
  if (t !== Object.prototype && t !== null) return e;
6867
- let n = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Lu(t)]));
7081
+ let n = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, hd(t)]));
6868
7082
  return Object.freeze(n);
6869
7083
  }
6870
7084
  //#endregion
6871
7085
  //#region src/core/AssessmentItemDefinition.ts
6872
- function Ru(e) {
6873
- return new zu(e);
7086
+ function gd(e) {
7087
+ return new _d(e);
6874
7088
  }
6875
- var zu = class {
7089
+ var _d = class {
6876
7090
  constructor(e) {
6877
7091
  if (!e.itemXml.trim()) throw Error("AssessmentItemDefinition requires non-empty itemXml");
6878
7092
  this.rngFactory = e.rngFactory;
6879
- let t = e.plugins ? Object.freeze([...e.plugins]) : Object.freeze([]), n = Hu(e), { elementNameMapper: r, attributeNameMapper: i } = Vu(n), a = Uu(n, {
7093
+ let t = e.plugins ? Object.freeze([...e.plugins]) : Object.freeze([]), n = bd(e), { elementNameMapper: r, attributeNameMapper: i } = yd(n), a = xd(n, {
6880
7094
  elementNameMapper: r,
6881
7095
  attributeNameMapper: i
6882
7096
  }, t);
6883
- this.prepared = Ol({ ...a }), this.identifier = Bu(this.prepared), this.playerConfig = a, Object.freeze(this);
7097
+ this.prepared = ou({ ...a }), this.identifier = vd(this.prepared), this.playerConfig = a, Object.freeze(this);
6884
7098
  }
6885
7099
  openSession(e = {}) {
6886
7100
  if (e.restore?.itemIdentifier && this.identifier && e.restore.itemIdentifier !== this.identifier) throw Error(`Cannot restore item session for '${e.restore.itemIdentifier}' into '${this.identifier}'`);
6887
- return new ju(this.identifier, Gu(this.playerConfig, this.rngFactory), e, this.prepared);
7101
+ return new ld(this.identifier, Cd(this.playerConfig, this.rngFactory), e, this.prepared);
6888
7102
  }
6889
7103
  };
6890
- function Bu(e) {
7104
+ function vd(e) {
6891
7105
  if (!e || typeof e != "object" || !("identifier" in e) || typeof e.identifier != "string") throw Error("AssessmentItemDefinition compilation did not produce an identifier");
6892
7106
  return e.identifier;
6893
7107
  }
6894
- function Vu(i) {
7108
+ function yd(i) {
6895
7109
  if (i.elementNameMapper && i.attributeNameMapper) return {
6896
7110
  elementNameMapper: i.elementNameMapper,
6897
7111
  attributeNameMapper: i.attributeNameMapper
@@ -6902,24 +7116,24 @@ function Vu(i) {
6902
7116
  attributeNameMapper: i.attributeNameMapper ?? (a ? new n() : new e())
6903
7117
  };
6904
7118
  }
6905
- function Hu(e) {
7119
+ function bd(e) {
6906
7120
  let { plugins: t, rngFactory: n, ...r } = e, i = {
6907
7121
  ...r,
6908
7122
  itemXml: e.itemXml,
6909
7123
  ...e.processingFragmentLimits ? { processingFragmentLimits: Object.freeze({ ...e.processingFragmentLimits }) } : {},
6910
7124
  ...e.pci ? { pci: Object.freeze({ ...e.pci }) } : {},
6911
7125
  ...e.customOperators ? { customOperators: Object.freeze({ ...e.customOperators }) } : {},
6912
- ...e.security ? { security: Ku(e.security) } : {},
6913
- ...e.pnp ? { pnp: Ku(e.pnp) } : {},
6914
- ...e.deliveryContext ? { deliveryContext: Ku(e.deliveryContext) } : {}
7126
+ ...e.security ? { security: wd(e.security) } : {},
7127
+ ...e.pnp ? { pnp: wd(e.pnp) } : {},
7128
+ ...e.deliveryContext ? { deliveryContext: wd(e.deliveryContext) } : {}
6915
7129
  };
6916
7130
  return Object.freeze(i);
6917
7131
  }
6918
- function Uu(e, t, n) {
6919
- let r = Vo(t.elementNameMapper);
6920
- for (let e of xc()) r.register(e.extractor), Ho(r, e.type, e.delivery);
6921
- let i = Ac(), a = /* @__PURE__ */ new Set();
6922
- for (let e of n) Wu(e, a), e.registerExtractors?.(r), e.registerComponents?.(i), a.add(e.name);
7132
+ function xd(e, t, n) {
7133
+ let r = ys(t.elementNameMapper);
7134
+ for (let e of $c()) r.register(e.extractor), bs(r, e.type, e.delivery);
7135
+ let i = cl(), a = /* @__PURE__ */ new Set();
7136
+ for (let e of n) Sd(e, a), e.registerExtractors?.(r), e.registerComponents?.(i), a.add(e.name);
6923
7137
  return r.seal(), i.seal(), Object.freeze({
6924
7138
  ...e,
6925
7139
  elementNameMapper: t.elementNameMapper,
@@ -6928,7 +7142,7 @@ function Uu(e, t, n) {
6928
7142
  componentRegistry: i
6929
7143
  });
6930
7144
  }
6931
- function Wu(e, t) {
7145
+ function Sd(e, t) {
6932
7146
  if (e.kind !== "assessment-item-definition-plugin") throw Error(`Definition plugin '${e.name || "<unnamed>"}' must declare kind 'assessment-item-definition-plugin'`);
6933
7147
  if (!e.name || typeof e.name != "string") throw Error("AssessmentItemDefinition plugin must have a valid name");
6934
7148
  if (!/^\d+\.\d+\.\d+/.test(e.version)) throw Error(`Definition plugin '${e.name}' has invalid version format: ${e.version}`);
@@ -6936,21 +7150,21 @@ function Wu(e, t) {
6936
7150
  let n = (e.dependencies ?? []).filter((e) => !t.has(e));
6937
7151
  if (n.length > 0) throw Error(`Definition plugin '${e.name}' has missing dependencies: ${n.join(", ")}`);
6938
7152
  }
6939
- function Gu(e, t) {
7153
+ function Cd(e, t) {
6940
7154
  return {
6941
7155
  ...e,
6942
7156
  ...t ? { rng: t() } : {}
6943
7157
  };
6944
7158
  }
6945
- function Ku(e) {
6946
- if (Array.isArray(e)) return Object.freeze(e.map((e) => Ku(e)));
7159
+ function wd(e) {
7160
+ if (Array.isArray(e)) return Object.freeze(e.map((e) => wd(e)));
6947
7161
  if (!e || typeof e != "object" || Object.getPrototypeOf(e) !== Object.prototype) return e;
6948
- let t = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Ku(t)]));
7162
+ let t = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, wd(t)]));
6949
7163
  return Object.freeze(t);
6950
7164
  }
6951
7165
  //#endregion
6952
7166
  //#region src/components/actions/typesetAction.ts
6953
- function qu(e, t) {
7167
+ function Td(e, t) {
6954
7168
  if (!(typeof window < "u" && typeof MutationObserver < "u")) return {
6955
7169
  update() {},
6956
7170
  destroy() {}
@@ -6981,7 +7195,7 @@ function qu(e, t) {
6981
7195
  }
6982
7196
  //#endregion
6983
7197
  //#region src/catalog/applyGlossaryTriggers.ts
6984
- var Ju = [
7198
+ var Ed = [
6985
7199
  {
6986
7200
  usage: "tts-pronunciation",
6987
7201
  flag: "ttsPronunciation",
@@ -7012,90 +7226,90 @@ var Ju = [
7012
7226
  label: "Request extended description",
7013
7227
  text: "D"
7014
7228
  }
7015
- ], Yu = "illustrated-glossary", Xu = /* @__PURE__ */ new Set([
7229
+ ], Dd = "illustrated-glossary", Od = /* @__PURE__ */ new Set([
7016
7230
  "glossary-on-screen",
7017
7231
  "keyword-translation",
7018
- Yu
7019
- ]), Zu = new Set(Ju.map((e) => e.flag)), Qu = new Set(Ju.map((e) => e.usage)), $u = /^[a-z][a-z0-9._-]*$/;
7020
- function ed(e, t) {
7021
- td(e);
7232
+ Dd
7233
+ ]), kd = new Set(Ed.map((e) => e.flag)), Ad = new Set(Ed.map((e) => e.usage)), jd = /^[a-z][a-z0-9._-]*$/;
7234
+ function Md(e, t) {
7235
+ Nd(e);
7022
7236
  let n = t.getPnp();
7023
- if (!n) return () => td(e);
7024
- let r = n.content?.glossaryOnScreen === !0, i = n.content?.keywordTranslation, a = i?.active === !0 && !!i.languageCode, o = n.content?.illustratedGlossary === !0, s = n.content?.catalogSupports ?? {}, c = ad(s), l = Ju.some((e) => sd(od(s, e)));
7025
- if (!r && !a && !o && !l && c.length === 0) return () => td(e);
7237
+ if (!n) return () => Nd(e);
7238
+ let r = n.content?.glossaryOnScreen === !0, i = n.content?.keywordTranslation, a = i?.active === !0 && !!i.languageCode, o = n.content?.illustratedGlossary === !0, s = n.content?.catalogSupports ?? {}, c = Ld(s), l = Ed.some((e) => zd(Rd(s, e)));
7239
+ if (!r && !a && !o && !l && c.length === 0) return () => Nd(e);
7026
7240
  let u = e.querySelectorAll("[data-catalog-idref]");
7027
- if (u.length === 0) return () => td(e);
7241
+ if (u.length === 0) return () => Nd(e);
7028
7242
  let d = null;
7029
7243
  for (let e of Array.from(u)) {
7030
7244
  let n = e.getAttribute("data-catalog-idref");
7031
7245
  if (!n) continue;
7032
- let l = id(e), u = document.createElement("span");
7246
+ let l = Id(e), u = document.createElement("span");
7033
7247
  if (u.className = "qti-catalog-term", u.style.cssText = "position:relative;display:inline", e.parentNode?.insertBefore(u, e), u.appendChild(e), r) {
7034
- let r = nd(e.textContent ?? n, "glossary-on-screen", "Show definition");
7248
+ let r = Pd(e.textContent ?? n, "glossary-on-screen", "Show definition");
7035
7249
  u.appendChild(r), r.addEventListener("click", () => {
7036
7250
  if (d) {
7037
7251
  d(), d = null;
7038
7252
  return;
7039
7253
  }
7040
7254
  let i = t.getCatalogEntry(n, "glossary-on-screen", void 0, { stimulusIdentifier: l });
7041
- i !== null && (d = dd(u, e.textContent ?? n, i, r, t, () => {
7255
+ i !== null && (d = Ud(u, e.textContent ?? n, i, r, t, () => {
7042
7256
  d = null;
7043
7257
  }));
7044
7258
  });
7045
7259
  }
7046
7260
  if (a) {
7047
- let r = i.languageCode, a = nd(e.textContent ?? n, "keyword-translation", "Show translation");
7261
+ let r = i.languageCode, a = Pd(e.textContent ?? n, "keyword-translation", "Show translation");
7048
7262
  u.appendChild(a), a.addEventListener("click", () => {
7049
7263
  if (d) {
7050
7264
  d(), d = null;
7051
7265
  return;
7052
7266
  }
7053
7267
  let i = t.getCatalogEntry(n, "keyword-translation", r, { stimulusIdentifier: l });
7054
- i !== null && (d = dd(u, e.textContent ?? n, i, a, t, () => {
7268
+ i !== null && (d = Ud(u, e.textContent ?? n, i, a, t, () => {
7055
7269
  d = null;
7056
7270
  }));
7057
7271
  });
7058
7272
  }
7059
7273
  if (o) {
7060
- let r = nd(e.textContent ?? n, Yu, "Show illustrated glossary");
7274
+ let r = Pd(e.textContent ?? n, Dd, "Show illustrated glossary");
7061
7275
  u.appendChild(r), r.addEventListener("click", () => {
7062
7276
  if (d) {
7063
7277
  d(), d = null;
7064
7278
  return;
7065
7279
  }
7066
- let i = t.getCatalogEntry(n, Yu, void 0, { stimulusIdentifier: l });
7067
- i !== null && (d = dd(u, e.textContent ?? n, i, r, t, () => {
7280
+ let i = t.getCatalogEntry(n, Dd, void 0, { stimulusIdentifier: l });
7281
+ i !== null && (d = Ud(u, e.textContent ?? n, i, r, t, () => {
7068
7282
  d = null;
7069
7283
  }));
7070
7284
  });
7071
7285
  }
7072
- for (let r of Ju) {
7073
- let i = od(s, r);
7074
- sd(i) && rd(u, e, n, {
7286
+ for (let r of Ed) {
7287
+ let i = Rd(s, r);
7288
+ zd(i) && Fd(u, e, n, {
7075
7289
  ...r,
7076
- languageCode: cd(i)
7290
+ languageCode: Bd(i)
7077
7291
  }, t, l);
7078
7292
  }
7079
- for (let r of c) rd(u, e, n, r, t, l);
7293
+ for (let r of c) Fd(u, e, n, r, t, l);
7080
7294
  }
7081
7295
  return () => {
7082
- d?.(), td(e);
7296
+ d?.(), Nd(e);
7083
7297
  };
7084
7298
  }
7085
- function td(e) {
7299
+ function Nd(e) {
7086
7300
  for (let t of Array.from(e.querySelectorAll(".qti-catalog-term"))) {
7087
7301
  let e = Array.from(t.children).find((e) => e.getAttribute?.("data-catalog-idref") !== null);
7088
7302
  e && t.parentNode && t.parentNode.insertBefore(e, t), t.remove();
7089
7303
  }
7090
7304
  }
7091
- function nd(e, t, n, r) {
7305
+ function Pd(e, t, n, r) {
7092
7306
  let i = document.createElement("button");
7093
- return i.type = "button", i.className = "qti-catalog-trigger", i.style.cssText = "display:inline-flex;align-items:center;justify-content:center;min-width:1.75rem;min-height:1.75rem;margin-inline:0.25rem;line-height:1;", i.setAttribute("aria-label", `${n}: ${e}`), i.setAttribute("data-catalog-usage", t), i.textContent = r ?? (t === "keyword-translation" ? "T" : t === Yu ? "I" : "?"), i;
7307
+ return i.type = "button", i.className = "qti-catalog-trigger", i.style.cssText = "display:inline-flex;align-items:center;justify-content:center;min-width:1.75rem;min-height:1.75rem;margin-inline:0.25rem;line-height:1;", i.setAttribute("aria-label", `${n}: ${e}`), i.setAttribute("data-catalog-usage", t), i.textContent = r ?? (t === "keyword-translation" ? "T" : t === Dd ? "I" : "?"), i;
7094
7308
  }
7095
- function rd(e, t, n, r, i, a) {
7309
+ function Fd(e, t, n, r, i, a) {
7096
7310
  let o = i.getCatalogEntry(n, r.usage, r.languageCode, { stimulusIdentifier: a });
7097
7311
  if (o === null) return;
7098
- let s = nd(t.textContent ?? n, r.usage, r.label, r.text);
7312
+ let s = Pd(t.textContent ?? n, r.usage, r.label, r.text);
7099
7313
  e.appendChild(s), s.addEventListener("click", () => {
7100
7314
  s.dispatchEvent(new CustomEvent("qti-catalog-lookup", {
7101
7315
  bubbles: !0,
@@ -7110,39 +7324,39 @@ function rd(e, t, n, r, i, a) {
7110
7324
  }));
7111
7325
  });
7112
7326
  }
7113
- function id(e) {
7327
+ function Id(e) {
7114
7328
  return (e.closest?.("[data-stimulus-idref]"))?.getAttribute?.("data-stimulus-idref")?.trim() || void 0;
7115
7329
  }
7116
- function ad(e) {
7330
+ function Ld(e) {
7117
7331
  return Object.entries(e).map(([e, t]) => ({
7118
- usage: ld(e),
7332
+ usage: Vd(e),
7119
7333
  preference: t
7120
- })).filter(({ usage: e, preference: t }) => e !== null && sd(t) && !ud(e)).map(({ usage: e, preference: t }) => ({
7334
+ })).filter(({ usage: e, preference: t }) => e !== null && zd(t) && !Hd(e)).map(({ usage: e, preference: t }) => ({
7121
7335
  usage: e,
7122
7336
  label: `Request ${e.replace(/[-_]+/g, " ")}`,
7123
7337
  text: e.slice(0, 1).toUpperCase(),
7124
- languageCode: cd(t)
7338
+ languageCode: Bd(t)
7125
7339
  }));
7126
7340
  }
7127
- function od(e, t) {
7341
+ function Rd(e, t) {
7128
7342
  return e[t.flag] ?? e[t.usage];
7129
7343
  }
7130
- function sd(e) {
7344
+ function zd(e) {
7131
7345
  return e === void 0 ? !1 : typeof e == "boolean" ? e : e.active !== !1;
7132
7346
  }
7133
- function cd(e) {
7347
+ function Bd(e) {
7134
7348
  if (!e || typeof e == "boolean") return;
7135
7349
  let t = e.languageCode?.trim();
7136
7350
  if (!(!t || !/^[a-zA-Z]{2,8}(?:-[a-zA-Z0-9]{1,8})*$/.test(t))) return t;
7137
7351
  }
7138
- function ld(e) {
7352
+ function Vd(e) {
7139
7353
  let t = e.trim().toLowerCase();
7140
- return $u.test(t) ? t : null;
7354
+ return jd.test(t) ? t : null;
7141
7355
  }
7142
- function ud(e) {
7143
- return Zu.has(e) || Qu.has(e) || Xu.has(e);
7356
+ function Hd(e) {
7357
+ return kd.has(e) || Ad.has(e) || Od.has(e);
7144
7358
  }
7145
- function dd(e, t, n, r, i, a) {
7359
+ function Ud(e, t, n, r, i, a) {
7146
7360
  let o = i.getComponentRegistry(), s, c = !1;
7147
7361
  function l() {
7148
7362
  c || (c = !0, s.remove(), r.focus(), a());
@@ -7151,10 +7365,10 @@ function dd(e, t, n, r, i, a) {
7151
7365
  if (u !== null) {
7152
7366
  let r = document.createElement(u);
7153
7367
  r.content = n, r.label = t, r.onClose = l, e.appendChild(r), s = r;
7154
- } else s = fd(t, n, l), e.appendChild(s);
7368
+ } else s = Wd(t, n, l), e.appendChild(s);
7155
7369
  return l;
7156
7370
  }
7157
- function fd(e, t, n) {
7371
+ function Wd(e, t, n) {
7158
7372
  let r = document.createElement("div");
7159
7373
  r.className = "card card-bordered bg-base-100 shadow-lg qti-catalog-popup", r.setAttribute("role", "dialog"), r.setAttribute("aria-label", e), r.setAttribute("aria-modal", "true"), r.style.cssText = "position:absolute;z-index:1000;min-width:16rem;max-width:24rem";
7160
7374
  let i = document.createElement("div");
@@ -7165,7 +7379,7 @@ function fd(e, t, n) {
7165
7379
  o.type = "button", o.className = "btn btn-ghost btn-xs", o.setAttribute("aria-label", "Close"), o.textContent = "✕", i.appendChild(a), i.appendChild(o);
7166
7380
  let s = document.createElement("div");
7167
7381
  s.className = "card-body p-3";
7168
- let c = Qc(t);
7382
+ let c = Al(t);
7169
7383
  if (/^(https?:\/\/|\/)/i.test(c.trim())) {
7170
7384
  let t = document.createElement("img");
7171
7385
  t.src = c.trim(), t.alt = e, t.className = "max-w-full h-auto block mx-auto", s.appendChild(t);
@@ -7190,14 +7404,14 @@ function fd(e, t, n) {
7190
7404
  }
7191
7405
  //#endregion
7192
7406
  //#region src/catalog/glossaryAction.ts
7193
- function pd(e, t) {
7194
- let n = ed(e, t.player), r = t.player.onPnpChange?.(() => {
7195
- n(), n = ed(e, t.player);
7407
+ function Gd(e, t) {
7408
+ let n = Md(e, t.player), r = t.player.onPnpChange?.(() => {
7409
+ n(), n = Md(e, t.player);
7196
7410
  }) ?? (() => {});
7197
7411
  return {
7198
7412
  update(t) {
7199
- n(), r(), n = ed(e, t.player), r = t.player.onPnpChange?.(() => {
7200
- n(), n = ed(e, t.player);
7413
+ n(), r(), n = Md(e, t.player), r = t.player.onPnpChange?.(() => {
7414
+ n(), n = Md(e, t.player);
7201
7415
  }) ?? (() => {});
7202
7416
  },
7203
7417
  destroy() {
@@ -7207,23 +7421,23 @@ function pd(e, t) {
7207
7421
  }
7208
7422
  //#endregion
7209
7423
  //#region src/interactions/inline-choice/InlineChoice.svelte
7210
- var md = /* @__PURE__ */ q("<option> </option>"), hd = /* @__PURE__ */ q("<span class=\"qti-inline-choice-correct-badge svelte-p2969z\"> </span>"), gd = /* @__PURE__ */ q("<span class=\"inline-choice-wrapper svelte-p2969z\"><select><option> </option><!></select> <!></span>"), _d = {
7424
+ var Kd = /* @__PURE__ */ q("<option> </option>"), qd = /* @__PURE__ */ q("<span class=\"qti-inline-choice-correct-badge svelte-p2969z\"> </span>"), Jd = /* @__PURE__ */ q("<span class=\"inline-choice-wrapper svelte-p2969z\"><select><option> </option><!></select> <!></span>"), Yd = {
7211
7425
  hash: "svelte-p2969z",
7212
7426
  code: ".inline-choice-wrapper.svelte-p2969z {position:relative;display:inline-block;}.qti-inline-select.svelte-p2969z {display:inline-block;width:auto;min-width:120px;margin:0 4px;padding:0.25rem 1.75rem 0.25rem 0.5rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:0.5rem;background:var(--pie-qti-base-100, oklch(100% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;}.qti-inline-select.svelte-p2969z:focus-visible {outline:2px solid var(--pie-qti-focus, var(--pie-qti-primary, oklch(45% 0.24 277)));outline-offset:2px;}.qti-inline-select-correct.svelte-p2969z {border-color:var(--pie-qti-success, oklch(76% 0.177 163.223));background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 10%, transparent);}.qti-inline-choice-correct-badge.svelte-p2969z {position:absolute;top:-1.5rem;left:0;display:inline-flex;align-items:center;white-space:nowrap;min-height:1.1rem;padding:0 0.5rem;border:1px solid var(--pie-qti-success, oklch(76% 0.177 163.223));border-radius:9999px;background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 12%, transparent);color:var(--pie-qti-base-content, oklch(21% 0 0));font-size:0.7rem;font-weight:600;}"
7213
7427
  };
7214
- function vd(e, t) {
7215
- Et(t, !0), Wa(e, _d);
7428
+ function Xd(e, t) {
7429
+ Et(t, !0), Wa(e, Yd);
7216
7430
  let n = Po(t, "response", 3, ""), r = Po(t, "correctAnswer", 3, null), i = Po(t, "disabled", 3, !1), a = Po(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ I(() => r() === null ? n() : r()), s = /* @__PURE__ */ I(() => r() ? t.interaction.choices.find((e) => e.identifier === r()) : null);
7217
7431
  function c(e) {
7218
7432
  let n = e.currentTarget?.value ?? "";
7219
7433
  a()(t.interaction.responseId, n);
7220
7434
  }
7221
- var l = gd(), u = V(l);
7435
+ var l = Jd(), u = V(l);
7222
7436
  let d;
7223
7437
  var f = V(u), p = V(f, !0);
7224
7438
  k(f), f.value = f.__value = "", Ia(Hr(f), 17, () => t.interaction.choices, Ma, (e, t) => {
7225
7439
  let n = /* @__PURE__ */ I(() => r() === K(t).identifier);
7226
- var i = md(), a = V(i);
7440
+ var i = Kd(), a = V(i);
7227
7441
  k(i);
7228
7442
  var o = {};
7229
7443
  H(() => {
@@ -7233,7 +7447,7 @@ function vd(e, t) {
7233
7447
  var m;
7234
7448
  ao(u);
7235
7449
  var h = Hr(u, 2), g = (e) => {
7236
- var n = hd(), r = V(n);
7450
+ var n = qd(), r = V(n);
7237
7451
  k(n), H((e) => _a(r, `${e ?? ""}: ${K(s).text ?? ""}`), [() => t.i18n?.t("interactions.choice.correct", "Correct") ?? "Correct"]), J(e, n);
7238
7452
  };
7239
7453
  ja(h, (e) => {
@@ -7248,27 +7462,27 @@ function vd(e, t) {
7248
7462
  ca(["change"]);
7249
7463
  //#endregion
7250
7464
  //#region src/interactions/text-entry/InlineTextEntry.svelte
7251
- var yd = /* @__PURE__ */ q("<span role=\"alert\" class=\"qti-text-entry-error svelte-v4bfxs\"> </span>"), bd = /* @__PURE__ */ q("<input type=\"text\"/> <!>", 1), xd = {
7465
+ var Zd = /* @__PURE__ */ q("<span role=\"alert\" class=\"qti-text-entry-error svelte-v4bfxs\"> </span>"), Qd = /* @__PURE__ */ q("<input type=\"text\"/> <!>", 1), $d = {
7252
7466
  hash: "svelte-v4bfxs",
7253
7467
  code: ".qti-inline-input.svelte-v4bfxs {box-sizing:border-box;padding:0.25rem 0.5rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:0.5rem;background:var(--pie-qti-base-100, oklch(100% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;}.qti-inline-input.svelte-v4bfxs:focus-visible {outline:2px solid var(--pie-qti-focus, var(--pie-qti-primary, oklch(45% 0.24 277)));outline-offset:2px;}.qti-inline-input-correct.svelte-v4bfxs {border-color:var(--pie-qti-success, oklch(76% 0.177 163.223));background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 10%, transparent);}.qti-text-entry-error.svelte-v4bfxs {display:block;color:var(--pie-qti-error, oklch(71% 0.194 13.428));font-size:0.75rem;}"
7254
7468
  };
7255
- function Sd(e, t) {
7256
- Et(t, !0), Wa(e, xd);
7257
- let n = Po(t, "response", 3, ""), r = Po(t, "correctAnswer", 3, null), i = Po(t, "disabled", 3, !1), a = Po(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ Tr(null), s = /* @__PURE__ */ I(() => r() === null ? n() : r()), c = /* @__PURE__ */ I(() => (t.interaction.interactionClasses ?? []).find((e) => e.startsWith("qti-input-width-"))), l = /* @__PURE__ */ I(() => (t.interaction.interactionClasses ?? []).filter((e) => !e.startsWith("qti-input-width-")).join(" ")), u = /* @__PURE__ */ I(() => `${t.interaction.responseId}-error`);
7469
+ function ef(e, t) {
7470
+ Et(t, !0), Wa(e, $d);
7471
+ let n = Po(t, "response", 3, ""), r = Po(t, "correctAnswer", 3, null), i = Po(t, "disabled", 3, !1), a = Po(t, "onResponseChange", 3, () => {}), o = /* @__PURE__ */ z(null), s = /* @__PURE__ */ I(() => r() === null ? n() : r()), c = /* @__PURE__ */ I(() => (t.interaction.interactionClasses ?? []).find((e) => e.startsWith("qti-input-width-"))), l = /* @__PURE__ */ I(() => (t.interaction.interactionClasses ?? []).filter((e) => !e.startsWith("qti-input-width-")).join(" ")), u = /* @__PURE__ */ I(() => `${t.interaction.responseId}-error`);
7258
7472
  function d(e) {
7259
7473
  let n = e.currentTarget, r = n?.value ?? "";
7260
- a()(t.interaction.responseId, r), n?.validity.valid && z(o, null);
7474
+ a()(t.interaction.responseId, r), n?.validity.valid && B(o, null);
7261
7475
  }
7262
7476
  function f(e) {
7263
- e.preventDefault(), z(o, t.interaction.patternMaskMessage ?? t.i18n?.t("interactions.textEntry.patternError", "Please match the required format") ?? "Please match the required format", !0);
7477
+ e.preventDefault(), B(o, t.interaction.patternMaskMessage ?? t.i18n?.t("interactions.textEntry.patternError", "Please match the required format") ?? "Please match the required format", !0);
7264
7478
  }
7265
7479
  function p(e) {
7266
7480
  e.currentTarget?.checkValidity();
7267
7481
  }
7268
- var m = bd(), h = Vr(m);
7482
+ var m = Qd(), h = Vr(m);
7269
7483
  _o(h);
7270
7484
  var g = Hr(h, 2), _ = (e) => {
7271
- var t = yd(), n = V(t, !0);
7485
+ var t = Zd(), n = V(t, !0);
7272
7486
  k(t), H(() => {
7273
7487
  Y(t, "id", K(u)), _a(n, K(o));
7274
7488
  }), J(e, t);
@@ -7287,13 +7501,13 @@ function Sd(e, t) {
7287
7501
  ca(["input"]);
7288
7502
  //#endregion
7289
7503
  //#region src/components/ItemBody.svelte
7290
- var Cd = 0, wd = /* @__PURE__ */ q("<div class=\"qti-item-body svelte-11qbngh\"><div class=\"qti-item-body-content svelte-11qbngh\"><div class=\"inline-interaction-container svelte-11qbngh\"><!> <!></div></div> <!></div>"), Td = {
7504
+ var tf = 0, nf = /* @__PURE__ */ q("<div class=\"qti-item-body svelte-11qbngh\"><div class=\"qti-item-body-content svelte-11qbngh\"><div class=\"inline-interaction-container svelte-11qbngh\"><!> <!></div></div> <!></div>"), rf = {
7291
7505
  hash: "svelte-11qbngh",
7292
7506
  code: "\n /* Allow the whole item body to shrink inside flex/grid layouts (prevents overflow). */.qti-item-body.svelte-11qbngh {max-width:100%;min-width:0;}.qti-item-body-content.svelte-11qbngh {max-width:none;margin-bottom:1rem;}\n\n /*\n * Custom elements default to inline; force them to be block-level and width-contained.\n * This prevents wide interactions (SVGs, tables, canvases) from spilling outside panels.\n */.qti-item-body :is(\n pie-qti-choice,\n pie-qti-slider,\n pie-qti-order,\n pie-qti-match,\n pie-qti-associate,\n pie-qti-gap-match,\n pie-qti-hotspot,\n pie-qti-hottext,\n pie-qti-media,\n pie-qti-custom,\n pie-qti-portable-custom,\n pie-qti-end-attempt,\n pie-qti-position-object,\n pie-qti-graphic-gap-match,\n pie-qti-graphic-order,\n pie-qti-graphic-associate,\n pie-qti-select-point,\n pie-qti-extended-text\n ) {display:block;max-width:100%;min-width:0;}\n\n /* Keep inline interactions from breaking paragraph flow */.inline-interaction-container.svelte-11qbngh p {display:inline;}\n\n /*\n * Hide all QTI interaction elements wrapped with qti-hidden-interaction.\n * These are rendered separately as web components above.\n * Keeping them in the HTML (but hidden) makes debugging easier and is fully extensible.\n * Any *Interaction element will be automatically wrapped and hidden - no hardcoded list needed!\n */.qti-item-body .qti-hidden-interaction {display:none !important;}\n\n /*\n * Style for inline feedback elements that appear within choice text or other content.\n * Provides visual distinction and spacing for feedback that appears inline with content.\n */.qti-feedback-inline {display:inline-block;margin-left:0.5rem;padding-left:0.5rem;border-left:2px solid var(--pie-qti-base-content, currentColor);opacity:0.8;}\n\n /* QTI 3.0 Shared Stimulus: stimulus blocks that were prepended before the item body */.qti-stimulus-block {margin-bottom:1rem;}\n\n /* QTI rubricBlock / qti-rubric-block content rendered in item-body source order. */.qti-item-body .qti-rubric-block {display:block;max-width:100%;min-width:0;margin:1rem 0;padding:1rem;overflow-x:auto;border:1px solid var(--pie-qti-base-300, #d1d5db);border-inline-start:4px solid var(--pie-qti-primary, #2563eb);border-radius:0.5rem;background:var(--pie-qti-base-200, #f8fafc);}.qti-item-body .qti-rubric-block > :first-child {margin-top:0;}.qti-item-body .qti-rubric-block > :last-child {margin-bottom:0;}.qti-item-body .qti-rubric-block table {max-width:100%;border-collapse:collapse;}.qti-item-body .qti-rubric-block th,\n .qti-item-body .qti-rubric-block td {padding:0.5rem;border:1px solid var(--pie-qti-base-300, #d1d5db);vertical-align:top;}\n\n /* QTI 3.0 Shared Vocabulary: qti-input-width-N sets minimum input width in character units. */.qti-input-width-1 {min-width:1ch;}.qti-input-width-2 {min-width:2ch;}.qti-input-width-3 {min-width:3ch;}.qti-input-width-4 {min-width:4ch;}.qti-input-width-5 {min-width:5ch;}.qti-input-width-6 {min-width:6ch;}.qti-input-width-10 {min-width:10ch;}.qti-input-width-15 {min-width:15ch;}.qti-input-width-20 {min-width:20ch;}.qti-input-width-25 {min-width:25ch;}.qti-input-width-30 {min-width:30ch;}.qti-input-width-35 {min-width:35ch;}.qti-input-width-40 {min-width:40ch;}.qti-input-width-45 {min-width:45ch;}.qti-input-width-50 {min-width:50ch;}.qti-input-width-72 {min-width:72ch;}"
7293
7507
  };
7294
- function Ed(e, t) {
7295
- Et(t, !0), Wa(e, Td);
7296
- let n = Po(t, "disabled", 3, !1), r = Po(t, "renderItemBodyRubrics", 3, !0), a = `qti-item-body-${++Cd}`, o = `[data-qti-item-body-scope="${a}"]`, s = /* @__PURE__ */ I(() => t.i18n?.getLocale()), c = /* @__PURE__ */ I(() => t.i18n?.getDirection?.()), l = /* @__PURE__ */ I(() => Au(t.session)), u = /* @__PURE__ */ I(() => (t.revision, t.session.state())), d = /* @__PURE__ */ I(() => K(u).responses), f = /* @__PURE__ */ I(() => (t.revision, t.session.present({
7508
+ function af(e, t) {
7509
+ Et(t, !0), Wa(e, rf);
7510
+ let n = Po(t, "disabled", 3, !1), r = Po(t, "renderItemBodyRubrics", 3, !0), a = `qti-item-body-${++tf}`, o = `[data-qti-item-body-scope="${a}"]`, s = /* @__PURE__ */ I(() => t.i18n?.getLocale()), c = /* @__PURE__ */ I(() => t.i18n?.getDirection?.()), l = /* @__PURE__ */ I(() => cd(t.session)), u = /* @__PURE__ */ I(() => (t.revision, t.session.state())), d = /* @__PURE__ */ I(() => K(u).responses), f = /* @__PURE__ */ I(() => (t.revision, t.session.present({
7297
7511
  disabled: n(),
7298
7512
  heuristicsConfig: t.heuristicsConfig,
7299
7513
  itemBodyScopeSelector: o,
@@ -7323,7 +7537,7 @@ function Ed(e, t) {
7323
7537
  let { responseId: t, value: n } = e.detail;
7324
7538
  h(t, n);
7325
7539
  }
7326
- let _ = (e) => K(l).createPciHost(e), v = /* @__PURE__ */ Tr(null);
7540
+ let _ = (e) => K(l).createPciHost(e), v = /* @__PURE__ */ z(null);
7327
7541
  Qr(() => {
7328
7542
  if (!K(v)) return;
7329
7543
  t.revision, K(l).applyPnp(K(v));
@@ -7342,7 +7556,7 @@ function Ed(e, t) {
7342
7556
  destroy() {}
7343
7557
  };
7344
7558
  }
7345
- var b = wd(), ee = V(b), x = V(ee), S = V(x), te = (e) => {
7559
+ var b = nf(), ee = V(b), x = V(ee), S = V(x), te = (e) => {
7346
7560
  var t = ga();
7347
7561
  Ua(Vr(t), () => "style", !1, (e, t) => {
7348
7562
  xo(e, () => ({ "data-qti-stylesheets": "resolved" }));
@@ -7360,7 +7574,7 @@ function Ed(e, t) {
7360
7574
  let r = /* @__PURE__ */ I(() => K(f).capabilities.canViewCorrectResponses ? K(f).correctResponses[K(n).mount.interaction.responseId] ?? null : null);
7361
7575
  {
7362
7576
  let i = /* @__PURE__ */ I(() => m(K(n).mount.interaction.responseId)), a = /* @__PURE__ */ I(() => K(f).capabilities.canViewCorrectResponses ? K(r) : null);
7363
- Sd(e, {
7577
+ ef(e, {
7364
7578
  get interaction() {
7365
7579
  return K(n).mount.interaction;
7366
7580
  },
@@ -7383,7 +7597,7 @@ function Ed(e, t) {
7383
7597
  let r = /* @__PURE__ */ I(() => K(f).capabilities.canViewCorrectResponses ? K(f).correctResponses[K(n).mount.interaction.responseId] ?? null : null);
7384
7598
  {
7385
7599
  let i = /* @__PURE__ */ I(() => m(K(n).mount.interaction.responseId)), a = /* @__PURE__ */ I(() => K(f).capabilities.canViewCorrectResponses ? K(r) : null);
7386
- vd(e, {
7600
+ Xd(e, {
7387
7601
  get interaction() {
7388
7602
  return K(n).mount.interaction;
7389
7603
  },
@@ -7424,18 +7638,18 @@ function Ed(e, t) {
7424
7638
  createPciHost: _
7425
7639
  }));
7426
7640
  }), J(e, r);
7427
- }), k(b), No(b, (e) => z(v, e), () => K(v)), Ga(b, (e, t) => qu?.(e, t), () => ({ typeset: t.typeset })), Ga(b, (e, t) => pd?.(e, t), () => ({ player: K(l) })), H(() => {
7641
+ }), k(b), No(b, (e) => B(v, e), () => K(v)), Ga(b, (e, t) => Td?.(e, t), () => ({ typeset: t.typeset })), Ga(b, (e, t) => Gd?.(e, t), () => ({ player: K(l) })), H(() => {
7428
7642
  Y(b, "data-qti-item-body-scope", a), Y(b, "lang", K(s)), Y(b, "dir", K(c)), b.dir = b.dir;
7429
7643
  }), J(e, b), Dt();
7430
7644
  }
7431
7645
  //#endregion
7432
7646
  //#region src/components/ModalFeedbackDisplay.svelte
7433
- var Dd = /* @__PURE__ */ q("<h3 class=\"qti-feedback-title svelte-i66ia0\"> </h3>"), Od = /* @__PURE__ */ q("<div class=\"qti-feedback-content svelte-i66ia0\"></div>"), kd = /* @__PURE__ */ q("<div><!> <!></div>"), Ad = /* @__PURE__ */ q("<dialog open=\"\" class=\"qti-feedback-modal svelte-i66ia0\" aria-modal=\"true\"><div class=\"qti-feedback-modal-box svelte-i66ia0\"><button class=\"qti-feedback-close-button svelte-i66ia0\" type=\"button\">✕</button> <!> <div class=\"qti-feedback-actions svelte-i66ia0\"><button class=\"qti-feedback-primary-button svelte-i66ia0\" type=\"button\"> </button></div></div></dialog>"), jd = {
7647
+ var of = /* @__PURE__ */ q("<h3 class=\"qti-feedback-title svelte-i66ia0\"> </h3>"), sf = /* @__PURE__ */ q("<div class=\"qti-feedback-content svelte-i66ia0\"></div>"), cf = /* @__PURE__ */ q("<div><!> <!></div>"), lf = /* @__PURE__ */ q("<dialog open=\"\" class=\"qti-feedback-modal svelte-i66ia0\" aria-modal=\"true\"><div class=\"qti-feedback-modal-box svelte-i66ia0\"><button class=\"qti-feedback-close-button svelte-i66ia0\" type=\"button\">✕</button> <!> <div class=\"qti-feedback-actions svelte-i66ia0\"><button class=\"qti-feedback-primary-button svelte-i66ia0\" type=\"button\"> </button></div></div></dialog>"), uf = {
7434
7648
  hash: "svelte-i66ia0",
7435
7649
  code: ".qti-feedback-modal.svelte-i66ia0 {box-sizing:border-box;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background-color:rgba(0, 0, 0, 0.5);color:var(--pie-qti-base-content, oklch(21% 0 0));}.qti-feedback-modal[open].svelte-i66ia0 {display:grid;place-items:center;}.qti-feedback-modal-box.svelte-i66ia0 {position:relative;box-sizing:border-box;width:min(48rem, calc(100vw - 2rem));max-height:80vh;overflow-y:auto;padding:1.5rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:1rem;background:var(--pie-qti-base-100, oklch(100% 0 0));box-shadow:0 20px 45px rgba(0, 0, 0, 0.2);}.qti-feedback-close-button.svelte-i66ia0,\n .qti-feedback-primary-button.svelte-i66ia0 {display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));background:var(--pie-qti-base-100, oklch(100% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;cursor:pointer;}.qti-feedback-close-button.svelte-i66ia0 {position:absolute;top:0.5rem;right:0.5rem;width:2rem;height:2rem;padding:0;border-radius:9999px;background:transparent;border-color:transparent;}.qti-feedback-close-button.svelte-i66ia0:hover {background:var(--pie-qti-base-200, oklch(98% 0 0));border-color:var(--pie-qti-base-300, oklch(95% 0 0));}.qti-feedback-primary-button.svelte-i66ia0 {gap:0.5rem;padding:0.5rem 0.75rem;border-radius:0.75rem;border-color:var(--pie-qti-primary, oklch(45% 0.24 277));background:color-mix(in oklch, var(--pie-qti-primary, oklch(45% 0.24 277)) 12%, transparent);}.qti-feedback-close-button.svelte-i66ia0:focus-visible,\n .qti-feedback-primary-button.svelte-i66ia0:focus-visible {outline:2px solid var(--pie-qti-focus, var(--pie-qti-primary, oklch(45% 0.24 277)));outline-offset:2px;}.qti-feedback-item.svelte-i66ia0 {margin-bottom:1rem;}.qti-feedback-item-bordered.svelte-i66ia0 {padding-bottom:1rem;border-bottom:1px solid var(--pie-qti-base-300, oklch(95% 0 0));}.qti-feedback-title.svelte-i66ia0 {margin:0 0 0.5rem;font-size:1.125rem;font-weight:700;}.qti-feedback-content.svelte-i66ia0 {max-width:none;}.qti-feedback-actions.svelte-i66ia0 {display:flex;justify-content:flex-end;margin-top:1rem;}"
7436
7650
  };
7437
- function Md(e, t) {
7438
- Et(t, !0), Wa(e, jd);
7651
+ function df(e, t) {
7652
+ Et(t, !0), Wa(e, uf);
7439
7653
  let n = Po(t, "feedback", 19, () => []), r = /* @__PURE__ */ I(() => n().length > 0), i = "item-player-modal-feedback-title", a = /* @__PURE__ */ I(() => n().find((e) => e.title)?.title);
7440
7654
  function o() {
7441
7655
  t.onClose?.();
@@ -7444,12 +7658,12 @@ function Md(e, t) {
7444
7658
  e.target === e.currentTarget && o();
7445
7659
  }
7446
7660
  var c = ga(), l = Vr(c), u = (e) => {
7447
- var r = Ad(), c = V(r), l = V(c), u = Hr(l, 2);
7661
+ var r = lf(), c = V(r), l = V(c), u = Hr(l, 2);
7448
7662
  Ia(u, 17, n, Ma, (e, r, a) => {
7449
- var o = kd();
7663
+ var o = cf();
7450
7664
  let s;
7451
7665
  var c = V(o), l = (e) => {
7452
- var t = Dd();
7666
+ var t = of();
7453
7667
  Y(t, "id", a === 0 ? i : void 0);
7454
7668
  var n = V(t, !0);
7455
7669
  k(t), H(() => _a(n, K(r).title)), J(e, t);
@@ -7458,10 +7672,10 @@ function Md(e, t) {
7458
7672
  K(r).title && e(l);
7459
7673
  });
7460
7674
  var u = Hr(c, 2), d = (e) => {
7461
- var n = Od();
7462
- Ha(n, () => K(r).content, !0), k(n), Ga(n, (e, t) => qu?.(e, t), () => ({ typeset: t.typeset })), J(e, n);
7675
+ var n = sf();
7676
+ Ha(n, () => K(r).content, !0), k(n), Ga(n, (e, t) => Td?.(e, t), () => ({ typeset: t.typeset })), J(e, n);
7463
7677
  }, f = (e) => {
7464
- var t = Od();
7678
+ var t = sf();
7465
7679
  Ha(t, () => K(r).content, !0), k(t), J(e, t);
7466
7680
  };
7467
7681
  ja(u, (e) => {
@@ -7487,15 +7701,15 @@ function Md(e, t) {
7487
7701
  ca(["click"]);
7488
7702
  //#endregion
7489
7703
  //#region src/components/ItemPlayer.svelte
7490
- var Nd = /* @__PURE__ */ q("<div class=\"qti-player-alert qti-player-alert-error svelte-129urwy\"><span> </span></div>"), Pd = /* @__PURE__ */ q("<span class=\"qti-player-badge qti-player-badge-success svelte-129urwy\"> </span>"), Fd = /* @__PURE__ */ q("<span> </span>"), Id = /* @__PURE__ */ q("<div class=\"qti-player-attempt-status svelte-129urwy\"><!></div>"), Ld = /* @__PURE__ */ q("<div class=\"qti-player-actions svelte-129urwy\"><button class=\"qti-player-button qti-player-button-primary svelte-129urwy\"> </button> <!></div>"), Rd = /* @__PURE__ */ q("<!> <!> <!>", 1), zd = /* @__PURE__ */ q("<div class=\"qti-player-alert qti-player-alert-info svelte-129urwy\"><span> </span></div>"), Bd = /* @__PURE__ */ q("<div class=\"qti-item-player svelte-129urwy\"><!></div>"), Vd = {
7704
+ var ff = /* @__PURE__ */ q("<div class=\"qti-player-alert qti-player-alert-error svelte-129urwy\"><span> </span></div>"), pf = /* @__PURE__ */ q("<span class=\"qti-player-badge qti-player-badge-success svelte-129urwy\"> </span>"), mf = /* @__PURE__ */ q("<span> </span>"), hf = /* @__PURE__ */ q("<div class=\"qti-player-attempt-status svelte-129urwy\"><!></div>"), gf = /* @__PURE__ */ q("<div class=\"qti-player-actions svelte-129urwy\"><button class=\"qti-player-button qti-player-button-primary svelte-129urwy\"> </button> <!></div>"), _f = /* @__PURE__ */ q("<!> <!> <!>", 1), vf = /* @__PURE__ */ q("<div class=\"qti-player-alert qti-player-alert-info svelte-129urwy\"><span> </span></div>"), yf = /* @__PURE__ */ q("<div class=\"qti-item-player svelte-129urwy\"><!></div>"), bf = {
7491
7705
  hash: "svelte-129urwy",
7492
7706
  code: ".qti-item-player.svelte-129urwy {color:var(--pie-qti-base-content, oklch(21% 0 0));}.qti-player-alert.svelte-129urwy {display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:0.75rem;background:var(--pie-qti-base-200, oklch(98% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));}.qti-player-alert-error.svelte-129urwy {border-color:var(--pie-qti-error, oklch(71% 0.194 13.428));background:color-mix(in oklch, var(--pie-qti-error, oklch(71% 0.194 13.428)) 8%, transparent);}.qti-player-alert-info.svelte-129urwy {border-color:var(--pie-qti-info, oklch(74% 0.16 232.661));background:color-mix(in oklch, var(--pie-qti-info, oklch(74% 0.16 232.661)) 8%, transparent);}.qti-player-actions.svelte-129urwy {display:flex;align-items:center;gap:1rem;margin-top:1.5rem;}.qti-player-button.svelte-129urwy {display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;padding:0.5rem 0.75rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:0.75rem;background:var(--pie-qti-base-200, oklch(98% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;line-height:1.1;cursor:pointer;}.qti-player-button-primary.svelte-129urwy {border-color:var(--pie-qti-primary, oklch(45% 0.24 277));background:color-mix(in oklch, var(--pie-qti-primary, oklch(45% 0.24 277)) 12%, transparent);}.qti-player-button.svelte-129urwy:disabled {opacity:0.55;cursor:not-allowed;}.qti-player-button.svelte-129urwy:focus-visible {outline:2px solid var(--pie-qti-focus, var(--pie-qti-primary, oklch(45% 0.24 277)));outline-offset:2px;}.qti-player-attempt-status.svelte-129urwy {color:color-mix(in oklch, var(--pie-qti-base-content, oklch(21% 0 0)) 70%, transparent);font-size:0.875rem;}.qti-player-badge.svelte-129urwy {display:inline-flex;align-items:center;justify-content:center;min-height:1.25rem;padding:0 0.5rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:9999px;font-size:0.75rem;font-weight:600;}.qti-player-badge-success.svelte-129urwy {border-color:var(--pie-qti-success, oklch(76% 0.177 163.223));background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 12%, transparent);}"
7493
7707
  };
7494
- function Hd(e, t) {
7495
- Et(t, !0), Wa(e, Vd);
7496
- let n = Po(t, "role", 3, "candidate"), r = Po(t, "responses", 19, () => ({})), i = Po(t, "disabled", 3, !1), a = Po(t, "renderItemBodyRubrics", 3, !0), o = /* @__PURE__ */ I(() => t.showSubmit ?? !!t.onSubmit), s = /* @__PURE__ */ Tr(null), c = /* @__PURE__ */ Tr(null), l = /* @__PURE__ */ Tr(null), u = /* @__PURE__ */ Tr(jr([])), d = /* @__PURE__ */ I(() => K(c)?.adaptive ?? !1), f = /* @__PURE__ */ I(() => K(c)?.completed ?? !1), p = /* @__PURE__ */ I(() => K(c)?.numAttempts ?? 0), m = /* @__PURE__ */ I(() => K(c)?.canSubmit ?? !1), h = /* @__PURE__ */ I(() => K(c)?.role ?? n());
7708
+ function xf(e, t) {
7709
+ Et(t, !0), Wa(e, bf);
7710
+ let n = Po(t, "role", 3, "candidate"), r = Po(t, "responses", 19, () => ({})), i = Po(t, "disabled", 3, !1), a = Po(t, "renderItemBodyRubrics", 3, !0), o = /* @__PURE__ */ I(() => t.showSubmit ?? !!t.onSubmit), s = /* @__PURE__ */ z(null), c = /* @__PURE__ */ z(null), l = /* @__PURE__ */ z(null), u = /* @__PURE__ */ z(Ar([])), d = /* @__PURE__ */ I(() => K(c)?.adaptive ?? !1), f = /* @__PURE__ */ I(() => K(c)?.completed ?? !1), p = /* @__PURE__ */ I(() => K(c)?.numAttempts ?? 0), m = /* @__PURE__ */ I(() => K(c)?.canSubmit ?? !1), h = /* @__PURE__ */ I(() => K(c)?.role ?? n());
7497
7711
  function g(e) {
7498
- z(c, e, !0);
7712
+ B(c, e, !0);
7499
7713
  }
7500
7714
  Qr(() => {
7501
7715
  let e = null, i = !1;
@@ -7503,7 +7717,7 @@ function Hd(e, t) {
7503
7717
  if (t.session) e = t.session;
7504
7718
  else {
7505
7719
  let a = Ui(() => r());
7506
- e = Ru({
7720
+ e = gd({
7507
7721
  itemXml: t.itemXml,
7508
7722
  role: n(),
7509
7723
  security: t.security,
@@ -7515,19 +7729,19 @@ function Hd(e, t) {
7515
7729
  plugins: t.plugins
7516
7730
  }).openSession({ responses: a }), i = !0;
7517
7731
  }
7518
- z(s, e, !0), g(e.state()), z(l, null), z(u, [], !0);
7732
+ B(s, e, !0), g(e.state()), B(l, null), B(u, [], !0);
7519
7733
  let a = e.subscribe(({ command: n, current: r }) => {
7520
7734
  if (g(r), r.disposed) {
7521
- K(s) === e && z(s, null);
7735
+ K(s) === e && B(s, null);
7522
7736
  return;
7523
7737
  }
7524
7738
  n.action === "setResponse" && t.onResponseChange?.(n.responseIdentifier, r.responses[n.responseIdentifier]);
7525
7739
  });
7526
7740
  return () => {
7527
- a(), i && e?.dispose(), K(s) === e && (z(s, null), z(c, null));
7741
+ a(), i && e?.dispose(), K(s) === e && (B(s, null), B(c, null));
7528
7742
  };
7529
7743
  } catch (n) {
7530
- i && e?.dispose(), z(l, n instanceof Error ? n.message : t.i18n?.t("item.parsingError") ?? "item.parsingError", !0), z(s, null), z(c, null);
7744
+ i && e?.dispose(), B(l, n instanceof Error ? n.message : t.i18n?.t("item.parsingError") ?? "item.parsingError", !0), B(s, null), B(c, null);
7531
7745
  }
7532
7746
  }), Qr(() => {
7533
7747
  let e = r(), n = K(s);
@@ -7539,11 +7753,11 @@ function Hd(e, t) {
7539
7753
  responses: e
7540
7754
  });
7541
7755
  } catch (e) {
7542
- z(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7756
+ B(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7543
7757
  }
7544
7758
  });
7545
7759
  function _(e) {
7546
- z(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7760
+ B(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7547
7761
  }
7548
7762
  function v(e = !0) {
7549
7763
  if (K(s)) try {
@@ -7555,7 +7769,7 @@ function Hd(e, t) {
7555
7769
  countAttempt: e
7556
7770
  }), r = n.result?.scoring;
7557
7771
  if (!r) throw Error("Item session submission did not produce a scoring result");
7558
- z(u, r.modalFeedback || [], !0);
7772
+ B(u, r.modalFeedback || [], !0);
7559
7773
  let i = { ...n.current.responses };
7560
7774
  if (t.onSubmit?.(i, r), K(d)) {
7561
7775
  let e = r;
@@ -7563,18 +7777,18 @@ function Hd(e, t) {
7563
7777
  }
7564
7778
  return r;
7565
7779
  } catch (e) {
7566
- z(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7780
+ B(l, e instanceof Error ? e.message : t.i18n?.t("item.processingError") ?? "item.processingError", !0);
7567
7781
  }
7568
7782
  }
7569
7783
  function y() {
7570
- z(u, [], !0);
7784
+ B(u, [], !0);
7571
7785
  }
7572
- var b = { submit: v }, ee = Bd(), x = V(ee), S = (e) => {
7573
- var t = Nd(), n = V(t), r = V(n, !0);
7786
+ var b = { submit: v }, ee = yf(), x = V(ee), S = (e) => {
7787
+ var t = ff(), n = V(t), r = V(n, !0);
7574
7788
  k(n), k(t), H(() => _a(r, K(l))), J(e, t);
7575
7789
  }, te = (e) => {
7576
- var n = Rd(), r = Vr(n);
7577
- Ed(r, {
7790
+ var n = _f(), r = Vr(n);
7791
+ af(r, {
7578
7792
  get session() {
7579
7793
  return K(s);
7580
7794
  },
@@ -7596,14 +7810,14 @@ function Hd(e, t) {
7596
7810
  onError: _
7597
7811
  });
7598
7812
  var l = Hr(r, 2), g = (e) => {
7599
- var n = Ld(), r = V(n), i = V(r, !0);
7813
+ var n = gf(), r = V(n), i = V(r, !0);
7600
7814
  k(r);
7601
7815
  var a = Hr(r, 2), o = (e) => {
7602
- var n = Id(), r = V(n), i = (e) => {
7603
- var n = Pd(), r = V(n, !0);
7816
+ var n = hf(), r = V(n), i = (e) => {
7817
+ var n = pf(), r = V(n, !0);
7604
7818
  k(n), H((e) => _a(r, e), [() => t.i18n?.t("item.complete") ?? "item.complete"]), J(e, n);
7605
7819
  }, a = (e) => {
7606
- var n = Fd(), r = V(n, !0);
7820
+ var n = mf(), r = V(n, !0);
7607
7821
  k(n), H((e) => _a(r, e), [() => t.i18n?.t("item.attempt", { numAttempts: K(p) + 1 }) ?? `item.attempt (${K(p) + 1})`]), J(e, n);
7608
7822
  };
7609
7823
  ja(r, (e) => {
@@ -7618,7 +7832,7 @@ function Hd(e, t) {
7618
7832
  };
7619
7833
  ja(l, (e) => {
7620
7834
  K(h) === "candidate" && !i() && K(o) && e(g);
7621
- }), Md(Hr(l, 2), {
7835
+ }), df(Hr(l, 2), {
7622
7836
  get feedback() {
7623
7837
  return K(u);
7624
7838
  },
@@ -7631,7 +7845,7 @@ function Hd(e, t) {
7631
7845
  }
7632
7846
  }), J(e, n);
7633
7847
  }, C = (e) => {
7634
- var n = zd(), r = V(n), i = V(r, !0);
7848
+ var n = vf(), r = V(n), i = V(r, !0);
7635
7849
  k(r), k(n), H((e) => _a(i, e), [() => t.i18n?.t("item.loading") ?? "item.loading"]), J(e, n);
7636
7850
  };
7637
7851
  return ja(x, (e) => {
@@ -7641,16 +7855,17 @@ function Hd(e, t) {
7641
7855
  ca(["click"]);
7642
7856
  //#endregion
7643
7857
  //#region src/element-class.ts
7644
- var Ud = globalThis.HTMLElement ?? class {}, Wd = /* @__PURE__ */ new WeakMap(), Gd = /* @__PURE__ */ new WeakMap(), Kd = /* @__PURE__ */ new WeakMap(), qd = /* @__PURE__ */ new WeakMap(), Jd = /* @__PURE__ */ new WeakMap(), Yd = /* @__PURE__ */ new WeakMap(), Xd = /* @__PURE__ */ new WeakMap(), Zd = /* @__PURE__ */ new WeakMap(), Qd = /* @__PURE__ */ new WeakMap(), $d = /* @__PURE__ */ new WeakMap(), ef = /* @__PURE__ */ new WeakMap(), tf = /* @__PURE__ */ new WeakMap(), nf = /* @__PURE__ */ new WeakMap(), rf = /* @__PURE__ */ new WeakMap(), af = /* @__PURE__ */ new WeakMap(), of = /* @__PURE__ */ new WeakMap(), sf = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakSet(), cf = class extends Ud {
7858
+ var Sf = globalThis.HTMLElement ?? class {}, Cf = /* @__PURE__ */ new WeakMap(), wf = /* @__PURE__ */ new WeakMap(), Tf = /* @__PURE__ */ new WeakMap(), Ef = /* @__PURE__ */ new WeakMap(), Df = /* @__PURE__ */ new WeakMap(), Of = /* @__PURE__ */ new WeakMap(), kf = /* @__PURE__ */ new WeakMap(), Af = /* @__PURE__ */ new WeakMap(), jf = /* @__PURE__ */ new WeakMap(), Mf = /* @__PURE__ */ new WeakMap(), Nf = /* @__PURE__ */ new WeakMap(), Pf = /* @__PURE__ */ new WeakMap(), Ff = /* @__PURE__ */ new WeakMap(), If = /* @__PURE__ */ new WeakMap(), Lf = /* @__PURE__ */ new WeakMap(), Rf = /* @__PURE__ */ new WeakMap(), zf = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakSet(), Bf = class extends Sf {
7645
7859
  constructor(...e) {
7646
- super(...e), Kt(this, Q), j(this, Wd, a({
7860
+ super(...e), Kt(this, Q), j(this, Cf, a({
7647
7861
  host: this,
7648
- mount: (e, t) => va(Hd, {
7862
+ createSubscriber: Wt,
7863
+ mount: (e, t) => va(xf, {
7649
7864
  target: e,
7650
7865
  props: t
7651
7866
  }),
7652
7867
  unmount: Sa
7653
- })), j(this, Gd, ""), j(this, Kd, "candidate"), j(this, qd, !1), j(this, Jd, void 0), j(this, Yd, !0), j(this, Xd, void 0), j(this, Zd, void 0), j(this, Qd, void 0), j(this, $d, void 0), j(this, ef, void 0), j(this, tf, void 0), j(this, nf, void 0), j(this, rf, void 0), j(this, af, void 0), j(this, of, void 0), j(this, sf, void 0);
7868
+ })), j(this, wf, ""), j(this, Tf, "candidate"), j(this, Ef, !1), j(this, Df, void 0), j(this, Of, !0), j(this, kf, void 0), j(this, Af, void 0), j(this, jf, void 0), j(this, Mf, void 0), j(this, Nf, void 0), j(this, Pf, void 0), j(this, Ff, void 0), j(this, If, void 0), j(this, Lf, void 0), j(this, Rf, void 0), j(this, zf, void 0);
7654
7869
  }
7655
7870
  static get observedAttributes() {
7656
7871
  return [
@@ -7661,103 +7876,103 @@ var Ud = globalThis.HTMLElement ?? class {}, Wd = /* @__PURE__ */ new WeakMap(),
7661
7876
  ];
7662
7877
  }
7663
7878
  get itemXml() {
7664
- return P(Gd, this);
7879
+ return P(wf, this);
7665
7880
  }
7666
7881
  set itemXml(e) {
7667
- N(Gd, this, e ?? ""), M(Q, this, $).call(this);
7882
+ N(wf, this, e ?? ""), M(Q, this, $).call(this);
7668
7883
  }
7669
7884
  get role() {
7670
- return P(Kd, this);
7885
+ return P(Tf, this);
7671
7886
  }
7672
7887
  set role(e) {
7673
- N(Kd, this, e ?? "candidate"), M(Q, this, $).call(this);
7888
+ N(Tf, this, e ?? "candidate"), M(Q, this, $).call(this);
7674
7889
  }
7675
7890
  get disabled() {
7676
- return P(qd, this);
7891
+ return P(Ef, this);
7677
7892
  }
7678
7893
  set disabled(e) {
7679
- N(qd, this, !!e), M(Q, this, $).call(this);
7894
+ N(Ef, this, !!e), M(Q, this, $).call(this);
7680
7895
  }
7681
7896
  get locale() {
7682
- return P(Jd, this);
7897
+ return P(Df, this);
7683
7898
  }
7684
7899
  set locale(e) {
7685
- N(Jd, this, e ?? void 0), M(Q, this, $).call(this);
7900
+ N(Df, this, e ?? void 0), M(Q, this, $).call(this);
7686
7901
  }
7687
7902
  get renderItemBodyRubrics() {
7688
- return P(Yd, this);
7903
+ return P(Of, this);
7689
7904
  }
7690
7905
  set renderItemBodyRubrics(e) {
7691
- N(Yd, this, e !== !1), M(Q, this, $).call(this);
7906
+ N(Of, this, e !== !1), M(Q, this, $).call(this);
7692
7907
  }
7693
7908
  get typeset() {
7694
- return P(Xd, this);
7909
+ return P(kf, this);
7695
7910
  }
7696
7911
  set typeset(e) {
7697
- N(Xd, this, e), M(Q, this, $).call(this);
7912
+ N(kf, this, e), M(Q, this, $).call(this);
7698
7913
  }
7699
7914
  get i18n() {
7700
- return P(Zd, this);
7915
+ return P(Af, this);
7701
7916
  }
7702
7917
  set i18n(e) {
7703
- N(Zd, this, e), M(Q, this, $).call(this);
7918
+ N(Af, this, e), M(Q, this, $).call(this);
7704
7919
  }
7705
7920
  get security() {
7706
- return P(Qd, this);
7921
+ return P(jf, this);
7707
7922
  }
7708
7923
  set security(e) {
7709
- N(Qd, this, e), M(Q, this, $).call(this);
7924
+ N(jf, this, e), M(Q, this, $).call(this);
7710
7925
  }
7711
7926
  get pnp() {
7712
- return P($d, this);
7927
+ return P(Mf, this);
7713
7928
  }
7714
7929
  set pnp(e) {
7715
- N($d, this, e), M(Q, this, $).call(this);
7930
+ N(Mf, this, e), M(Q, this, $).call(this);
7716
7931
  }
7717
7932
  get deliveryContext() {
7718
- return P(ef, this);
7933
+ return P(Nf, this);
7719
7934
  }
7720
7935
  set deliveryContext(e) {
7721
- N(ef, this, e), M(Q, this, $).call(this);
7936
+ N(Nf, this, e), M(Q, this, $).call(this);
7722
7937
  }
7723
7938
  get pci() {
7724
- return P(rf, this);
7939
+ return P(If, this);
7725
7940
  }
7726
7941
  set pci(e) {
7727
- N(rf, this, e), M(Q, this, $).call(this);
7942
+ N(If, this, e), M(Q, this, $).call(this);
7728
7943
  }
7729
7944
  get plugins() {
7730
- return P(af, this);
7945
+ return P(Lf, this);
7731
7946
  }
7732
7947
  set plugins(e) {
7733
- N(af, this, e ? Object.freeze([...e]) : void 0), M(Q, this, $).call(this);
7948
+ N(Lf, this, e ? Object.freeze([...e]) : void 0), M(Q, this, $).call(this);
7734
7949
  }
7735
7950
  get resolveProcessingFragment() {
7736
- return P(tf, this);
7951
+ return P(Pf, this);
7737
7952
  }
7738
7953
  set resolveProcessingFragment(e) {
7739
- N(tf, this, e), M(Q, this, $).call(this);
7954
+ N(Pf, this, e), M(Q, this, $).call(this);
7740
7955
  }
7741
7956
  get processingFragmentLimits() {
7742
- return P(nf, this);
7957
+ return P(Ff, this);
7743
7958
  }
7744
7959
  set processingFragmentLimits(e) {
7745
- N(nf, this, e), M(Q, this, $).call(this);
7960
+ N(Ff, this, e), M(Q, this, $).call(this);
7746
7961
  }
7747
7962
  get responses() {
7748
- return P(sf, this);
7963
+ return P(zf, this);
7749
7964
  }
7750
7965
  get session() {
7751
- return P(of, this);
7966
+ return P(Rf, this);
7752
7967
  }
7753
7968
  set session(e) {
7754
- N(of, this, e), M(Q, this, $).call(this);
7969
+ N(Rf, this, e), M(Q, this, $).call(this);
7755
7970
  }
7756
7971
  set responses(e) {
7757
- N(sf, this, e ? { ...e } : void 0), M(Q, this, $).call(this);
7972
+ N(zf, this, e ? { ...e } : void 0), M(Q, this, $).call(this);
7758
7973
  }
7759
7974
  connectedCallback() {
7760
- P(Wd, this).mountOrUpdate(M(Q, this, uf).call(this)), queueMicrotask(() => {
7975
+ P(Cf, this).mountOrUpdate(M(Q, this, Hf).call(this)), queueMicrotask(() => {
7761
7976
  this.isConnected && this.dispatchEvent(new CustomEvent("ready", {
7762
7977
  bubbles: !0,
7763
7978
  composed: !0
@@ -7765,50 +7980,50 @@ var Ud = globalThis.HTMLElement ?? class {}, Wd = /* @__PURE__ */ new WeakMap(),
7765
7980
  });
7766
7981
  }
7767
7982
  disconnectedCallback() {
7768
- P(Wd, this).teardown({ removeContainer: !0 });
7983
+ P(Cf, this).teardown({ removeContainer: !0 });
7769
7984
  }
7770
7985
  attributeChangedCallback(e, t, n) {
7771
- e === "item-xml" ? N(Gd, this, n ?? "") : e === "role" ? N(Kd, this, n ?? "candidate") : e === "disabled" ? N(qd, this, n !== null) : e === "locale" && N(Jd, this, n ?? void 0), M(Q, this, $).call(this);
7986
+ e === "item-xml" ? N(wf, this, n ?? "") : e === "role" ? N(Tf, this, n ?? "candidate") : e === "disabled" ? N(Ef, this, n !== null) : e === "locale" && N(Df, this, n ?? void 0), M(Q, this, $).call(this);
7772
7987
  }
7773
7988
  submit(e = !0) {
7774
- return P(Wd, this).instance?.submit(e);
7989
+ return P(Cf, this).instance?.submit(e);
7775
7990
  }
7776
7991
  addEventListener(e, t, n) {
7777
7992
  super.addEventListener(e, t, n);
7778
7993
  }
7779
7994
  };
7780
- function lf() {
7781
- return !P(Zd, this) || !P(Jd, this) ? P(Zd, this) : P(Zd, this).withLocale?.(P(Jd, this)) ?? P(Zd, this);
7995
+ function Vf() {
7996
+ return !P(Af, this) || !P(Df, this) ? P(Af, this) : P(Af, this).withLocale?.(P(Df, this)) ?? P(Af, this);
7782
7997
  }
7783
- function uf() {
7998
+ function Hf() {
7784
7999
  return {
7785
- itemXml: P(Gd, this),
7786
- session: P(of, this),
7787
- role: P(Kd, this),
7788
- disabled: P(qd, this),
7789
- renderItemBodyRubrics: P(Yd, this),
7790
- typeset: P(Xd, this),
7791
- i18n: M(Q, this, lf).call(this),
8000
+ itemXml: P(wf, this),
8001
+ session: P(Rf, this),
8002
+ role: P(Tf, this),
8003
+ disabled: P(Ef, this),
8004
+ renderItemBodyRubrics: P(Of, this),
8005
+ typeset: P(kf, this),
8006
+ i18n: M(Q, this, Vf).call(this),
7792
8007
  security: {
7793
- ...P(Qd, this) ?? {},
8008
+ ...P(jf, this) ?? {},
7794
8009
  parsingLimits: {
7795
8010
  enabled: !0,
7796
- ...P(Qd, this)?.parsingLimits ?? {}
8011
+ ...P(jf, this)?.parsingLimits ?? {}
7797
8012
  }
7798
8013
  },
7799
- pnp: P($d, this),
7800
- deliveryContext: P(ef, this),
7801
- resolveProcessingFragment: P(tf, this),
7802
- processingFragmentLimits: P(nf, this),
7803
- pci: P(rf, this),
7804
- plugins: P(af, this),
7805
- responses: P(sf, this),
8014
+ pnp: P(Mf, this),
8015
+ deliveryContext: P(Nf, this),
8016
+ resolveProcessingFragment: P(Pf, this),
8017
+ processingFragmentLimits: P(Ff, this),
8018
+ pci: P(If, this),
8019
+ plugins: P(Lf, this),
8020
+ responses: P(zf, this),
7806
8021
  onResponseChange: (e, t) => {
7807
- let n = P(of, this) ? { ...P(of, this).state().responses } : {
7808
- ...P(sf, this) ?? {},
8022
+ let n = P(Rf, this) ? { ...P(Rf, this).state().responses } : {
8023
+ ...P(zf, this) ?? {},
7809
8024
  [e]: t
7810
8025
  };
7811
- N(sf, this, n), this.dispatchEvent(new CustomEvent("response-change", {
8026
+ N(zf, this, n), this.dispatchEvent(new CustomEvent("response-change", {
7812
8027
  detail: {
7813
8028
  responseId: e,
7814
8029
  value: t,
@@ -7820,7 +8035,7 @@ function uf() {
7820
8035
  },
7821
8036
  onSubmit: (e, t) => {
7822
8037
  let n = { ...e };
7823
- N(sf, this, n), this.dispatchEvent(new CustomEvent("submit", {
8038
+ N(zf, this, n), this.dispatchEvent(new CustomEvent("submit", {
7824
8039
  detail: {
7825
8040
  responses: n,
7826
8041
  result: t
@@ -7840,9 +8055,9 @@ function uf() {
7840
8055
  };
7841
8056
  }
7842
8057
  function $() {
7843
- P(Wd, this).update(M(Q, this, uf).call(this));
8058
+ P(Cf, this).update(M(Q, this, Hf).call(this));
7844
8059
  }
7845
8060
  //#endregion
7846
- export { cf as t };
8061
+ export { Bf as t };
7847
8062
 
7848
- //# sourceMappingURL=element-class-DBV-1lkb.js.map
8063
+ //# sourceMappingURL=element-class-DQy2cIPM.js.map