@citolab/qti-components 8.0.0 → 8.0.2

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.
Files changed (77) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +690 -316
  3. package/dist/base.d.ts +135 -9
  4. package/dist/base.js +1 -1
  5. package/dist/chunk-4DB4SC5K.js +100 -0
  6. package/dist/chunk-4DB4SC5K.js.map +1 -0
  7. package/dist/{chunk-WVVMNF74.js → chunk-7AVWRQIS.js} +188 -160
  8. package/dist/{chunk-WVVMNF74.js.map → chunk-7AVWRQIS.js.map} +1 -1
  9. package/dist/{chunk-MGF5F3S2.js → chunk-BQFWCZFH.js} +2 -2
  10. package/dist/{chunk-5QYII4OZ.js → chunk-CK7AV2UJ.js} +147 -101
  11. package/dist/chunk-CK7AV2UJ.js.map +1 -0
  12. package/dist/chunk-G6GFQDVN.js +7 -0
  13. package/dist/chunk-G6GFQDVN.js.map +1 -0
  14. package/dist/{chunk-LZJHHZQ2.js → chunk-HBSWJC3B.js} +643 -553
  15. package/dist/chunk-HBSWJC3B.js.map +1 -0
  16. package/dist/chunk-HQESINXH.js +834 -0
  17. package/dist/chunk-HQESINXH.js.map +1 -0
  18. package/dist/{chunk-KYEZRYO6.js → chunk-J5SQLKNP.js} +145 -119
  19. package/dist/{chunk-KYEZRYO6.js.map → chunk-J5SQLKNP.js.map} +1 -1
  20. package/dist/{chunk-V5G7X53Y.js → chunk-NJQHUUTN.js} +2 -2
  21. package/dist/{chunk-W4QZPCNC.js → chunk-RSVRS5AK.js} +59 -58
  22. package/dist/chunk-RSVRS5AK.js.map +1 -0
  23. package/dist/{chunk-5SJS36BI.js → chunk-TWPXES3S.js} +642 -673
  24. package/dist/chunk-TWPXES3S.js.map +1 -0
  25. package/dist/{chunk-NA2N2WSG.js → chunk-VAE6HBKR.js} +176 -152
  26. package/dist/{chunk-NA2N2WSG.js.map → chunk-VAE6HBKR.js.map} +1 -1
  27. package/dist/{chunk-MJVPNN7W.js → chunk-ZII6M3SN.js} +2 -2
  28. package/dist/computed-item.types.d-BKZdSLLJ.d.ts +19 -0
  29. package/dist/computed.types.d-DpKIYO6e.d.ts +44 -0
  30. package/dist/config.context.d-BvU9r-Mg.d.ts +91 -0
  31. package/dist/corrections.d.ts +415 -1
  32. package/dist/corrections.js +8 -9
  33. package/dist/elements.d.ts +393 -1
  34. package/dist/elements.js +4 -5
  35. package/dist/index.d.ts +27 -9
  36. package/dist/index.js +21 -14
  37. package/dist/interaction.d-CJiMv8H7.d.ts +126 -0
  38. package/dist/interaction.interface.d-CvjHM2bi.d.ts +46 -0
  39. package/dist/interactions.d.ts +281 -1
  40. package/dist/interactions.js +4 -5
  41. package/dist/item.css +588 -214
  42. package/dist/item.d.ts +92 -1
  43. package/dist/item.js +5 -5
  44. package/dist/item.types.d-QU7LljEK.d.ts +82 -0
  45. package/dist/loader.d.ts +22 -1
  46. package/dist/processing.d.ts +730 -1
  47. package/dist/processing.js +2 -2
  48. package/dist/qti-components-jsx.d.ts +854 -844
  49. package/dist/qti-components-jsx.js +1 -0
  50. package/dist/qti-condition-expression.d-aMvBvpc6.d.ts +8 -0
  51. package/dist/qti-expression.d-BietT_8b.d.ts +31 -0
  52. package/dist/qti-feedback.d-DZbad0RN.d.ts +21 -0
  53. package/dist/qti-rule-base.d-ajOnfGXY.d.ts +16 -0
  54. package/dist/qti-test.d-_YAlhDbt.d.ts +702 -0
  55. package/dist/qti-text-entry-interaction.d-BGdfV9qG.d.ts +1567 -0
  56. package/dist/qti-transform-test.d-BL7GGFJj.d.ts +70 -0
  57. package/dist/qti.context.d-CejJMlfZ.d.ts +50 -0
  58. package/dist/response.d-_8y4kjGP.d.ts +106 -0
  59. package/dist/test.d.ts +32 -1
  60. package/dist/test.js +14 -7
  61. package/dist/transformers.d.ts +18 -1
  62. package/package.json +15 -11
  63. package/dist/chunk-5QYII4OZ.js.map +0 -1
  64. package/dist/chunk-5SJS36BI.js.map +0 -1
  65. package/dist/chunk-64XSIBGO.js +0 -241
  66. package/dist/chunk-64XSIBGO.js.map +0 -1
  67. package/dist/chunk-H3J7LFRO.js +0 -2243
  68. package/dist/chunk-H3J7LFRO.js.map +0 -1
  69. package/dist/chunk-LZJHHZQ2.js.map +0 -1
  70. package/dist/chunk-W4QZPCNC.js.map +0 -1
  71. package/dist/chunk-WCQ26LV7.js +0 -102
  72. package/dist/chunk-WCQ26LV7.js.map +0 -1
  73. package/dist/chunk-X3E5HXG2.js +0 -20
  74. package/dist/chunk-X3E5HXG2.js.map +0 -1
  75. /package/dist/{chunk-MGF5F3S2.js.map → chunk-BQFWCZFH.js.map} +0 -0
  76. /package/dist/{chunk-V5G7X53Y.js.map → chunk-NJQHUUTN.js.map} +0 -0
  77. /package/dist/{chunk-MJVPNN7W.js.map → chunk-ZII6M3SN.js.map} +0 -0
@@ -5,7 +5,6 @@ import {
5
5
  QtiHottext,
6
6
  QtiSimpleAssociableChoice,
7
7
  QtiSimpleChoice,
8
- c as c2,
9
8
  dragDropContext,
10
9
  elements,
11
10
  elements10,
@@ -23,25 +22,26 @@ import {
23
22
  elements7,
24
23
  elements8,
25
24
  elements9
26
- } from "./chunk-5SJS36BI.js";
25
+ } from "./chunk-TWPXES3S.js";
27
26
  import {
28
27
  Interaction,
29
- T,
30
28
  boxSizing,
31
- c,
32
29
  dropRegion,
33
- i,
34
- i2,
35
- n2 as n,
36
- r,
37
30
  removeDoubleSlashes
38
- } from "./chunk-H3J7LFRO.js";
31
+ } from "./chunk-HQESINXH.js";
32
+
33
+ // ../interactions/core/dist/elements/qti-associable-hotspot/qti-associable-hotspot.js
34
+ import { LitElement, html } from "lit";
35
+ import { property, state } from "lit/decorators.js";
36
+ import { repeat } from "lit/directives/repeat.js";
37
+ import { consume } from "@lit/context";
39
38
 
40
39
  // ../interactions/core/dist/elements/qti-associable-hotspot/qti-associable-hotspot.styles.js
40
+ import { css } from "lit";
41
41
  var qti_associable_hotspot_styles_default = [
42
42
  boxSizing,
43
43
  dropRegion,
44
- i`
44
+ css`
45
45
  /* A drop target — see qti-gap.styles.ts. The interaction publishes the chip measurements as
46
46
  custom properties on its host; the properties themselves live here. */
47
47
  :host {
@@ -64,12 +64,12 @@ var qti_associable_hotspot_styles_default = [
64
64
 
65
65
  // ../interactions/core/dist/elements/qti-associable-hotspot/qti-associable-hotspot.js
66
66
  var __decorate = function(decorators, target, key, desc) {
67
- var c3 = arguments.length, r2 = c3 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
68
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
69
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c3 < 3 ? d(r2) : c3 > 3 ? d(target, key, r2) : d(target, key)) || r2;
70
- return c3 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
67
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
68
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
69
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
70
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
71
71
  };
72
- var QtiAssociableHotspot = class extends i2 {
72
+ var QtiAssociableHotspot = class extends LitElement {
73
73
  constructor() {
74
74
  super(...arguments);
75
75
  this.internals = this.attachInternals();
@@ -91,24 +91,31 @@ var QtiAssociableHotspot = class extends i2 {
91
91
  }));
92
92
  }
93
93
  render() {
94
- return T`<div part="drop">
95
- ${c2(this.drags, (node) => node.getAttribute("identifier"), (node) => node)}
94
+ return html`<div part="drop">
95
+ ${repeat(this.drags, (node) => node.getAttribute("identifier"), (node) => node)}
96
96
  </div>`;
97
97
  }
98
98
  };
99
99
  __decorate([
100
- n({ type: String, reflect: true })
100
+ property({ type: String, reflect: true })
101
101
  ], QtiAssociableHotspot.prototype, "identifier", void 0);
102
102
  __decorate([
103
- c({ context: dragDropContext, subscribe: true }),
104
- r()
103
+ consume({ context: dragDropContext, subscribe: true }),
104
+ state()
105
105
  ], QtiAssociableHotspot.prototype, "_dragDrop", void 0);
106
106
 
107
+ // ../interactions/core/dist/elements/qti-gap/qti-gap.js
108
+ import { html as html2, LitElement as LitElement2 } from "lit";
109
+ import { property as property2, state as state2 } from "lit/decorators.js";
110
+ import { repeat as repeat2 } from "lit/directives/repeat.js";
111
+ import { consume as consume2 } from "@lit/context";
112
+
107
113
  // ../interactions/core/dist/elements/qti-gap/qti-gap.styles.js
114
+ import { css as css2 } from "lit";
108
115
  var qti_gap_styles_default = [
109
116
  boxSizing,
110
117
  dropRegion,
111
- i`
118
+ css2`
112
119
  /*
113
120
  * A drop target. The interaction measures its chips and publishes the result as custom
114
121
  * properties on its own host; the actual CSS properties live here, not in a style attribute.
@@ -158,12 +165,12 @@ var qti_gap_styles_default = [
158
165
 
159
166
  // ../interactions/core/dist/elements/qti-gap/qti-gap.js
160
167
  var __decorate2 = function(decorators, target, key, desc) {
161
- var c3 = arguments.length, r2 = c3 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
162
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
163
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c3 < 3 ? d(r2) : c3 > 3 ? d(target, key, r2) : d(target, key)) || r2;
164
- return c3 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
168
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
169
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
170
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
171
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
165
172
  };
166
- var QtiGap = class extends i2 {
173
+ var QtiGap = class extends LitElement2 {
167
174
  constructor() {
168
175
  super(...arguments);
169
176
  this.internals = this.attachInternals();
@@ -178,26 +185,31 @@ var QtiGap = class extends i2 {
178
185
  return this._dragDrop?.nodesByTarget?.[this.identifier] ?? [];
179
186
  }
180
187
  render() {
181
- return T`<div part="drop">
182
- ${c2(this.drags, (node) => node.getAttribute("identifier"), (node) => node)}
188
+ return html2`<div part="drop">
189
+ ${repeat2(this.drags, (node) => node.getAttribute("identifier"), (node) => node)}
183
190
  </div>`;
184
191
  }
185
192
  };
186
193
  __decorate2([
187
- n({ type: Number, reflect: true })
194
+ property2({ type: Number, reflect: true })
188
195
  ], QtiGap.prototype, "tabindex", void 0);
189
196
  __decorate2([
190
- n({ type: String, reflect: true })
197
+ property2({ type: String, reflect: true })
191
198
  ], QtiGap.prototype, "identifier", void 0);
192
199
  __decorate2([
193
- c({ context: dragDropContext, subscribe: true }),
194
- r()
200
+ consume2({ context: dragDropContext, subscribe: true }),
201
+ state2()
195
202
  ], QtiGap.prototype, "_dragDrop", void 0);
196
203
 
204
+ // ../interactions/core/dist/elements/qti-gap-img/qti-gap-img.js
205
+ import { LitElement as LitElement3 } from "lit";
206
+ import { property as property3 } from "lit/decorators.js";
207
+
197
208
  // ../interactions/core/dist/elements/qti-gap-img/qti-gap-img.styles.js
209
+ import { css as css3 } from "lit";
198
210
  var qti_gap_img_styles_default = [
199
211
  boxSizing,
200
- i`
212
+ css3`
201
213
  /* Centred, because a gap-img is a picture inside a drop the same size as it. Was in the theme's
202
214
  graphic-gap-match rules, on the host from the document. */
203
215
  :host {
@@ -211,12 +223,12 @@ var qti_gap_img_styles_default = [
211
223
 
212
224
  // ../interactions/core/dist/elements/qti-gap-img/qti-gap-img.js
213
225
  var __decorate3 = function(decorators, target, key, desc) {
214
- var c3 = arguments.length, r2 = c3 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
215
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
216
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c3 < 3 ? d(r2) : c3 > 3 ? d(target, key, r2) : d(target, key)) || r2;
217
- return c3 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
226
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
227
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
228
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
229
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
218
230
  };
219
- var QtiGapImg = class extends i2 {
231
+ var QtiGapImg = class extends LitElement3 {
220
232
  constructor() {
221
233
  super(...arguments);
222
234
  this.tabindex = 0;
@@ -230,11 +242,16 @@ var QtiGapImg = class extends i2 {
230
242
  }
231
243
  };
232
244
  __decorate3([
233
- n({ type: Number, reflect: true })
245
+ property3({ type: Number, reflect: true })
234
246
  ], QtiGapImg.prototype, "tabindex", void 0);
235
247
 
248
+ // ../interactions/core/dist/elements/qti-inline-choice/qti-inline-choice.js
249
+ import { html as html3, LitElement as LitElement4 } from "lit";
250
+ import { property as property4 } from "lit/decorators.js";
251
+
236
252
  // ../interactions/core/dist/elements/qti-inline-choice/qti-inline-choice.styles.js
237
- var styles = i`
253
+ import { css as css4 } from "lit";
254
+ var styles = css4`
238
255
  /*
239
256
  * An option row: one line, clipped, with its text centred against the row's min-height. All four
240
257
  * were in the theme, set on this host from the document — which is also why the 'display: block'
@@ -256,12 +273,12 @@ var qti_inline_choice_styles_default = styles;
256
273
 
257
274
  // ../interactions/core/dist/elements/qti-inline-choice/qti-inline-choice.js
258
275
  var __decorate4 = function(decorators, target, key, desc) {
259
- var c3 = arguments.length, r2 = c3 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
260
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
261
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c3 < 3 ? d(r2) : c3 > 3 ? d(target, key, r2) : d(target, key)) || r2;
262
- return c3 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
276
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
277
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
278
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
279
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
263
280
  };
264
- var QtiInlineChoice = class extends ActiveElementMixin(i2, "qti-inline-choice") {
281
+ var QtiInlineChoice = class extends ActiveElementMixin(LitElement4, "qti-inline-choice") {
265
282
  static {
266
283
  this.styles = qti_inline_choice_styles_default;
267
284
  }
@@ -278,7 +295,7 @@ var QtiInlineChoice = class extends ActiveElementMixin(i2, "qti-inline-choice")
278
295
  this.removeEventListener("click", this.#onSelectInlineChoice);
279
296
  }
280
297
  render() {
281
- return T` <slot></slot> `;
298
+ return html3` <slot></slot> `;
282
299
  }
283
300
  #onSelectInlineChoice() {
284
301
  this.dispatchEvent(new CustomEvent("qti-inline-choice-select", {
@@ -290,13 +307,17 @@ var QtiInlineChoice = class extends ActiveElementMixin(i2, "qti-inline-choice")
290
307
  }
291
308
  };
292
309
  __decorate4([
293
- n({ type: String })
310
+ property4({ type: String })
294
311
  ], QtiInlineChoice.prototype, "identifier", void 0);
295
312
 
313
+ // ../interactions/core/dist/elements/qti-prompt/qti-prompt.js
314
+ import { html as html4, LitElement as LitElement5 } from "lit";
315
+
296
316
  // ../interactions/core/dist/elements/qti-prompt/qti-prompt.styles.js
317
+ import { css as css5 } from "lit";
297
318
  var qti_prompt_styles_default = [
298
319
  boxSizing,
299
- i`
320
+ css5`
300
321
  :host {
301
322
  display: block;
302
323
  margin: var(--qti-gap) 0;
@@ -306,12 +327,12 @@ var qti_prompt_styles_default = [
306
327
  ];
307
328
 
308
329
  // ../interactions/core/dist/elements/qti-prompt/qti-prompt.js
309
- var QtiPrompt = class extends i2 {
330
+ var QtiPrompt = class extends LitElement5 {
310
331
  static {
311
332
  this.styles = qti_prompt_styles_default;
312
333
  }
313
334
  render() {
314
- return T`<slot></slot>`;
335
+ return html4`<slot></slot>`;
315
336
  }
316
337
  connectedCallback() {
317
338
  super.connectedCallback();
@@ -322,10 +343,15 @@ var QtiPrompt = class extends i2 {
322
343
  }
323
344
  };
324
345
 
346
+ // ../interactions/custom-interaction/dist/qti-custom-interaction.js
347
+ import { html as html5 } from "lit";
348
+ import { property as property5, state as state3 } from "lit/decorators.js";
349
+
325
350
  // ../interactions/custom-interaction/dist/qti-custom-interaction.styles.js
351
+ import { css as css6 } from "lit";
326
352
  var qti_custom_interaction_styles_default = [
327
353
  boxSizing,
328
- i`
354
+ css6`
329
355
  /* The box this element already had. See the note in qti-match-interaction.styles.ts. */
330
356
  :host {
331
357
  display: block;
@@ -335,10 +361,10 @@ var qti_custom_interaction_styles_default = [
335
361
 
336
362
  // ../interactions/custom-interaction/dist/qti-custom-interaction.js
337
363
  var __decorate5 = function(decorators, target, key, desc) {
338
- var c3 = arguments.length, r2 = c3 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
339
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
340
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c3 < 3 ? d(r2) : c3 > 3 ? d(target, key, r2) : d(target, key)) || r2;
341
- return c3 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
364
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
365
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
366
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
367
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
342
368
  };
343
369
  var registerCES = `
344
370
  const postToParentWindows = (type, data) => {
@@ -559,18 +585,18 @@ var QtiCustomInteraction = class extends Interaction {
559
585
  this.#resourceBaseUrl = indexResolved.baseUrl;
560
586
  }
561
587
  if (indexResolved.text) {
562
- let html = indexResolved.text;
563
- const alreadyModified = html.includes("postToParentWindows") || html.includes("window.CES");
588
+ let html11 = indexResolved.text;
589
+ const alreadyModified = html11.includes("postToParentWindows") || html11.includes("window.CES");
564
590
  if (!alreadyModified) {
565
591
  const cesScript = "<script>" + registerCES + "</script>";
566
- const headIndex = html.indexOf("<head>");
592
+ const headIndex = html11.indexOf("<head>");
567
593
  if (headIndex !== -1) {
568
- html = html.slice(0, headIndex + 6) + cesScript + html.slice(headIndex + 6);
594
+ html11 = html11.slice(0, headIndex + 6) + cesScript + html11.slice(headIndex + 6);
569
595
  } else {
570
- html = cesScript + html;
596
+ html11 = cesScript + html11;
571
597
  }
572
598
  }
573
- const blob = new Blob([html], { type: "text/html" });
599
+ const blob = new Blob([html11], { type: "text/html" });
574
600
  this.#contentBlobUrl = URL.createObjectURL(blob);
575
601
  }
576
602
  } else {
@@ -585,18 +611,18 @@ var QtiCustomInteraction = class extends Interaction {
585
611
  this.#resourceBaseUrl = indexResolved.baseUrl;
586
612
  }
587
613
  if (indexResolved.text) {
588
- let html = indexResolved.text;
589
- const alreadyModified = html.includes("postToParentWindows") || html.includes("window.CES");
614
+ let html11 = indexResolved.text;
615
+ const alreadyModified = html11.includes("postToParentWindows") || html11.includes("window.CES");
590
616
  if (!alreadyModified) {
591
617
  const cesScript = "<script>" + registerCES + "</script>";
592
- const headIndex = html.indexOf("<head>");
618
+ const headIndex = html11.indexOf("<head>");
593
619
  if (headIndex !== -1) {
594
- html = html.slice(0, headIndex + 6) + cesScript + html.slice(headIndex + 6);
620
+ html11 = html11.slice(0, headIndex + 6) + cesScript + html11.slice(headIndex + 6);
595
621
  } else {
596
- html = cesScript + html;
622
+ html11 = cesScript + html11;
597
623
  }
598
624
  }
599
- const blob = new Blob([html], { type: "text/html" });
625
+ const blob = new Blob([html11], { type: "text/html" });
600
626
  this.#contentBlobUrl = URL.createObjectURL(blob);
601
627
  }
602
628
  }
@@ -604,18 +630,18 @@ var QtiCustomInteraction = class extends Interaction {
604
630
  try {
605
631
  const indexResponse = await fetch(indexUrl);
606
632
  if (indexResponse.ok) {
607
- let html = await indexResponse.text();
608
- const alreadyModified = html.includes("postToParentWindows") || html.includes("window.CES");
633
+ let html11 = await indexResponse.text();
634
+ const alreadyModified = html11.includes("postToParentWindows") || html11.includes("window.CES");
609
635
  if (!alreadyModified) {
610
636
  const cesScript = "<script>" + registerCES + "</script>";
611
- const headIndex = html.indexOf("<head>");
637
+ const headIndex = html11.indexOf("<head>");
612
638
  if (headIndex !== -1) {
613
- html = html.slice(0, headIndex + 6) + cesScript + html.slice(headIndex + 6);
639
+ html11 = html11.slice(0, headIndex + 6) + cesScript + html11.slice(headIndex + 6);
614
640
  } else {
615
- html = cesScript + html;
641
+ html11 = cesScript + html11;
616
642
  }
617
643
  }
618
- const blob = new Blob([html], { type: "text/html" });
644
+ const blob = new Blob([html11], { type: "text/html" });
619
645
  this.#contentBlobUrl = URL.createObjectURL(blob);
620
646
  } else {
621
647
  console.error(`Failed to fetch index.html: ${indexResponse.status}`);
@@ -769,7 +795,7 @@ var QtiCustomInteraction = class extends Interaction {
769
795
  super.disconnectedCallback();
770
796
  }
771
797
  render() {
772
- return T`<iframe
798
+ return html5`<iframe
773
799
  width=${this.getAttribute("width")}
774
800
  height=${this.getAttribute("height")}
775
801
  frameborder="0"
@@ -777,7 +803,7 @@ var QtiCustomInteraction = class extends Interaction {
777
803
  id="pciContainer"
778
804
  >
779
805
  </iframe>
780
- ${this._errorMessage && T`<div style="color:red">
806
+ ${this._errorMessage && html5`<div style="color:red">
781
807
  <h1>Error</h1>
782
808
  ${this._errorMessage}
783
809
  </div>`}`;
@@ -829,32 +855,36 @@ var QtiCustomInteraction = class extends Interaction {
829
855
  }
830
856
  };
831
857
  __decorate5([
832
- n({ type: String, attribute: "data" })
858
+ property5({ type: String, attribute: "data" })
833
859
  ], QtiCustomInteraction.prototype, "data", void 0);
834
860
  __decorate5([
835
- n({ type: String, attribute: "data-base-item" })
861
+ property5({ type: String, attribute: "data-base-item" })
836
862
  ], QtiCustomInteraction.prototype, "baseItemUrl", void 0);
837
863
  __decorate5([
838
- n({ type: String, attribute: "data-base-ref" })
864
+ property5({ type: String, attribute: "data-base-ref" })
839
865
  ], QtiCustomInteraction.prototype, "baseRefUrl", void 0);
840
866
  __decorate5([
841
- n({ type: String, attribute: "id" })
867
+ property5({ type: String, attribute: "id" })
842
868
  ], QtiCustomInteraction.prototype, "id", void 0);
843
869
  __decorate5([
844
- r()
870
+ state3()
845
871
  ], QtiCustomInteraction.prototype, "_errorMessage", void 0);
846
872
 
873
+ // ../interactions/end-attempt-interaction/dist/qti-end-attempt-interaction.js
874
+ import { html as html6, LitElement as LitElement6 } from "lit";
875
+ import { property as property6 } from "lit/decorators.js";
876
+
847
877
  // ../interactions/end-attempt-interaction/dist/qti-end-attempt-interaction.styles.js
848
878
  var qti_end_attempt_interaction_styles_default = [boxSizing];
849
879
 
850
880
  // ../interactions/end-attempt-interaction/dist/qti-end-attempt-interaction.js
851
881
  var __decorate6 = function(decorators, target, key, desc) {
852
- var c3 = arguments.length, r2 = c3 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
853
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
854
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c3 < 3 ? d(r2) : c3 > 3 ? d(target, key, r2) : d(target, key)) || r2;
855
- return c3 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
882
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
883
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
884
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
885
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
856
886
  };
857
- var QtiEndAttemptInteraction = class extends i2 {
887
+ var QtiEndAttemptInteraction = class extends LitElement6 {
858
888
  constructor() {
859
889
  super(...arguments);
860
890
  this.disabled = false;
@@ -865,7 +895,7 @@ var QtiEndAttemptInteraction = class extends i2 {
865
895
  this.styles = qti_end_attempt_interaction_styles_default;
866
896
  }
867
897
  render() {
868
- return T`<button ?disabled=${this.disabled} part="button" @click=${this.endAttempt}>${this.title}</button>`;
898
+ return html6`<button ?disabled=${this.disabled} part="button" @click=${this.endAttempt}>${this.title}</button>`;
869
899
  }
870
900
  endAttempt(_) {
871
901
  this.dispatchEvent(new CustomEvent("end-attempt", {
@@ -876,22 +906,26 @@ var QtiEndAttemptInteraction = class extends i2 {
876
906
  }
877
907
  };
878
908
  __decorate6([
879
- n({ type: String, attribute: "response-identifier" })
909
+ property6({ type: String, attribute: "response-identifier" })
880
910
  ], QtiEndAttemptInteraction.prototype, "responseIdentifier", void 0);
881
911
  __decorate6([
882
- n({ reflect: true, type: Boolean })
912
+ property6({ reflect: true, type: Boolean })
883
913
  ], QtiEndAttemptInteraction.prototype, "disabled", void 0);
884
914
  __decorate6([
885
- n({ type: String, attribute: "count-attempt" })
915
+ property6({ type: String, attribute: "count-attempt" })
886
916
  ], QtiEndAttemptInteraction.prototype, "countAttempt", void 0);
887
917
  __decorate6([
888
- n({ type: String })
918
+ property6({ type: String })
889
919
  ], QtiEndAttemptInteraction.prototype, "title", void 0);
890
920
 
921
+ // ../interactions/media-interaction/dist/qti-media-interaction.js
922
+ import { html as html7 } from "lit";
923
+
891
924
  // ../interactions/media-interaction/dist/qti-media-interaction.styles.js
925
+ import { css as css7 } from "lit";
892
926
  var qti_media_interaction_styles_default = [
893
927
  boxSizing,
894
- i`
928
+ css7`
895
929
  /* The box this element already had. See the note in qti-match-interaction.styles.ts. */
896
930
  :host {
897
931
  display: block;
@@ -937,7 +971,7 @@ var QtiMediaInteraction = class extends Interaction {
937
971
  };
938
972
  }
939
973
  render() {
940
- return T` <slot name="prompt"></slot>
974
+ return html7` <slot name="prompt"></slot>
941
975
  <slot></slot>`;
942
976
  }
943
977
  constructor() {
@@ -955,10 +989,14 @@ var QtiMediaInteraction = class extends Interaction {
955
989
  }
956
990
  };
957
991
 
992
+ // ../interactions/position-object-interaction/dist/qti-position-object-interaction.js
993
+ import { LitElement as LitElement7, html as html8 } from "lit";
994
+
958
995
  // ../interactions/position-object-interaction/dist/qti-position-object-interaction.styles.js
996
+ import { css as css8 } from "lit";
959
997
  var qti_position_object_interaction_styles_default = [
960
998
  boxSizing,
961
- i`
999
+ css8`
962
1000
  :host {
963
1001
  display: block;
964
1002
  }
@@ -973,19 +1011,23 @@ var qti_position_object_interaction_styles_default = [
973
1011
  ];
974
1012
 
975
1013
  // ../interactions/position-object-interaction/dist/qti-position-object-interaction.js
976
- var QtiPositionObjectInteraction = class extends i2 {
1014
+ var QtiPositionObjectInteraction = class extends LitElement7 {
977
1015
  static {
978
1016
  this.styles = qti_position_object_interaction_styles_default;
979
1017
  }
980
1018
  render() {
981
- return T`<slot></slot>`;
1019
+ return html8`<slot></slot>`;
982
1020
  }
983
1021
  };
984
1022
 
1023
+ // ../interactions/position-object-interaction/dist/qti-position-object-stage.js
1024
+ import { LitElement as LitElement8, html as html9 } from "lit";
1025
+
985
1026
  // ../interactions/position-object-interaction/dist/qti-position-object-stage.styles.js
1027
+ import { css as css9 } from "lit";
986
1028
  var qti_position_object_stage_styles_default = [
987
1029
  boxSizing,
988
- i`
1030
+ css9`
989
1031
  :host {
990
1032
  display: inline-block;
991
1033
  position: relative;
@@ -994,12 +1036,12 @@ var qti_position_object_stage_styles_default = [
994
1036
  ];
995
1037
 
996
1038
  // ../interactions/position-object-interaction/dist/qti-position-object-stage.js
997
- var QtiPositionObjectStage = class extends i2 {
1039
+ var QtiPositionObjectStage = class extends LitElement8 {
998
1040
  static {
999
1041
  this.styles = qti_position_object_stage_styles_default;
1000
1042
  }
1001
1043
  render() {
1002
- return T`<slot></slot>`;
1044
+ return html9`<slot></slot>`;
1003
1045
  }
1004
1046
  constructor() {
1005
1047
  super();
@@ -1038,10 +1080,14 @@ var QtiPositionObjectStage = class extends i2 {
1038
1080
  }
1039
1081
  };
1040
1082
 
1083
+ // ../interactions/upload-interaction/dist/qti-upload-interaction.js
1084
+ import { html as html10 } from "lit";
1085
+
1041
1086
  // ../interactions/upload-interaction/dist/qti-upload-interaction.styles.js
1087
+ import { css as css10 } from "lit";
1042
1088
  var qti_upload_interaction_styles_default = [
1043
1089
  boxSizing,
1044
- i`
1090
+ css10`
1045
1091
  :host {
1046
1092
  display: block;
1047
1093
  margin: 1em 0;
@@ -1087,7 +1133,7 @@ var QtiUploadInteraction = class extends Interaction {
1087
1133
  };
1088
1134
  }
1089
1135
  render() {
1090
- return T`
1136
+ return html10`
1091
1137
  <div>
1092
1138
  <slot name="prompt"></slot>
1093
1139
  <input type="file" @change="${this.#onFileChange}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" />
@@ -1371,4 +1417,4 @@ export {
1371
1417
  QtiUploadInteraction,
1372
1418
  qtiInteractionElements
1373
1419
  };
1374
- //# sourceMappingURL=chunk-5QYII4OZ.js.map
1420
+ //# sourceMappingURL=chunk-CK7AV2UJ.js.map