@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
@@ -1,34 +1,27 @@
1
- import {
2
- o
3
- } from "./chunk-X3E5HXG2.js";
4
1
  import {
5
2
  watch
6
- } from "./chunk-64XSIBGO.js";
3
+ } from "./chunk-4DB4SC5K.js";
7
4
  import {
8
5
  qtiTransformItem
9
6
  } from "./chunk-IJD53WY6.js";
10
7
  import {
11
8
  QtiFeedback,
12
9
  QtiVariableDeclaration,
13
- T,
14
- c,
15
- e,
16
- i,
17
- i2,
18
10
  itemContext,
19
- itemContextVariables,
20
- n2 as n,
21
- r
22
- } from "./chunk-H3J7LFRO.js";
11
+ itemContextVariables
12
+ } from "./chunk-HQESINXH.js";
23
13
 
24
14
  // ../qti-elements/dist/components/qti-assessment-item/qti-assessment-item.js
15
+ import { provide } from "@lit/context";
16
+ import { LitElement, html } from "lit";
17
+ import { property } from "lit/decorators.js";
25
18
  var __decorate = function(decorators, target, key, desc) {
26
- var c2 = arguments.length, r2 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
27
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
28
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c2 < 3 ? d(r2) : c2 > 3 ? d(target, key, r2) : d(target, key)) || r2;
29
- return c2 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ 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;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
30
23
  };
31
- var QtiAssessmentItem = class extends i2 {
24
+ var QtiAssessmentItem = class extends LitElement {
32
25
  constructor() {
33
26
  super(...arguments);
34
27
  this.#templateProcessing = null;
@@ -45,60 +38,60 @@ var QtiAssessmentItem = class extends i2 {
45
38
  this.#initialContext = { ...this._context, variables: this._context.variables };
46
39
  this.#feedbackElements = [];
47
40
  this.interactionElements = [];
48
- this.#handleRegisterVariable = (e2) => {
49
- e2.stopImmediatePropagation();
50
- this._context = { ...this._context, variables: [...this._context.variables, e2.detail.variable] };
41
+ this.#handleRegisterVariable = (e) => {
42
+ e.stopImmediatePropagation();
43
+ this._context = { ...this._context, variables: [...this._context.variables, e.detail.variable] };
51
44
  this.#initialContext = this._context;
52
- e2.stopPropagation();
45
+ e.stopPropagation();
53
46
  };
54
- this.#handleRegisterFeedback = (e2) => {
55
- e2.stopImmediatePropagation();
56
- const feedbackElement = e2.detail;
47
+ this.#handleRegisterFeedback = (e) => {
48
+ e.stopImmediatePropagation();
49
+ const feedbackElement = e.detail;
57
50
  this.#feedbackElements.push(feedbackElement);
58
51
  const numAttempts = Number(this._context.variables.find((v) => v.identifier === "numAttempts")?.value) || 0;
59
52
  if (numAttempts > 0) {
60
53
  feedbackElement.checkShowFeedback(feedbackElement.outcomeIdentifier);
61
54
  }
62
55
  };
63
- this.#handleRegisterInteraction = (e2) => {
64
- e2.stopImmediatePropagation();
65
- this.interactionElements.push(e2.detail.interactionElement);
56
+ this.#handleRegisterInteraction = (e) => {
57
+ e.stopImmediatePropagation();
58
+ this.interactionElements.push(e.detail.interactionElement);
66
59
  };
67
- this.#handleEndAttempt = (e2) => {
68
- e2.stopImmediatePropagation();
69
- const { responseIdentifier, countAttempt } = e2.detail;
60
+ this.#handleEndAttempt = (e) => {
61
+ e.stopImmediatePropagation();
62
+ const { responseIdentifier, countAttempt } = e.detail;
70
63
  this.validate();
71
64
  this.updateResponseVariable(responseIdentifier, "true");
72
65
  this.processResponse(countAttempt);
73
66
  };
74
- this.#handleSetOutcomeValue = (e2) => {
75
- e2.stopImmediatePropagation();
76
- const { outcomeIdentifier, value } = e2.detail;
67
+ this.#handleSetOutcomeValue = (e) => {
68
+ e.stopImmediatePropagation();
69
+ const { outcomeIdentifier, value } = e.detail;
77
70
  this.updateOutcomeVariable(outcomeIdentifier, value);
78
- e2.stopPropagation();
71
+ e.stopPropagation();
79
72
  };
80
- this.#handleSetTemplateValue = (e2) => {
81
- e2.stopImmediatePropagation();
82
- const { templateIdentifier, value } = e2.detail;
73
+ this.#handleSetTemplateValue = (e) => {
74
+ e.stopImmediatePropagation();
75
+ const { templateIdentifier, value } = e.detail;
83
76
  this.updateTemplateVariable(templateIdentifier, value ?? void 0);
84
- e2.stopPropagation();
77
+ e.stopPropagation();
85
78
  };
86
- this.#handleSetCorrectResponse = (e2) => {
87
- e2.stopImmediatePropagation();
88
- const { responseIdentifier, value } = e2.detail;
79
+ this.#handleSetCorrectResponse = (e) => {
80
+ e.stopImmediatePropagation();
81
+ const { responseIdentifier, value } = e.detail;
89
82
  this.updateCorrectResponse(responseIdentifier, value ?? void 0);
90
- e2.stopPropagation();
83
+ e.stopPropagation();
91
84
  };
92
- this.#handleUpdateResponseVariable = (e2) => {
93
- e2.stopImmediatePropagation();
94
- const { responseIdentifier, response, state } = e2.detail;
85
+ this.#handleUpdateResponseVariable = (e) => {
86
+ e.stopImmediatePropagation();
87
+ const { responseIdentifier, response, state: state5 } = e.detail;
95
88
  this.updateResponseVariable(responseIdentifier, response);
96
- if (state !== void 0) {
89
+ if (state5 !== void 0) {
97
90
  this._context = {
98
91
  ...this._context,
99
92
  state: {
100
93
  ...this._context.state || {},
101
- [responseIdentifier]: state
94
+ [responseIdentifier]: state5
102
95
  }
103
96
  };
104
97
  }
@@ -191,7 +184,7 @@ var QtiAssessmentItem = class extends i2 {
191
184
  if (responseVariable) {
192
185
  this.updateResponseVariable(response.responseIdentifier, response.response);
193
186
  }
194
- const interaction = this.interactionElements.find((i3) => i3.getAttribute("response-identifier") === response.responseIdentifier);
187
+ const interaction = this.interactionElements.find((i) => i.getAttribute("response-identifier") === response.responseIdentifier);
195
188
  if (interaction) {
196
189
  interaction.response = response.response;
197
190
  }
@@ -199,7 +192,7 @@ var QtiAssessmentItem = class extends i2 {
199
192
  }
200
193
  }
201
194
  render() {
202
- return T`<slot></slot>`;
195
+ return html`<slot></slot>`;
203
196
  }
204
197
  connectedCallback() {
205
198
  this.#attachEventListeners();
@@ -462,39 +455,41 @@ var QtiAssessmentItem = class extends i2 {
462
455
  }
463
456
  };
464
457
  __decorate([
465
- n({ type: String })
458
+ property({ type: String })
466
459
  ], QtiAssessmentItem.prototype, "identifier", void 0);
467
460
  __decorate([
468
- n({ type: String })
461
+ property({ type: String })
469
462
  ], QtiAssessmentItem.prototype, "adaptive", void 0);
470
463
  __decorate([
471
- n({ type: String })
464
+ property({ type: String })
472
465
  ], QtiAssessmentItem.prototype, "timeDependent", void 0);
473
466
  __decorate([
474
- n({ type: String })
467
+ property({ type: String })
475
468
  ], QtiAssessmentItem.prototype, "title", null);
476
469
  __decorate([
477
- n({ type: Boolean })
470
+ property({ type: Boolean })
478
471
  ], QtiAssessmentItem.prototype, "disabled", void 0);
479
472
  __decorate([
480
473
  watch("disabled", { waitUntilFirstUpdate: true })
481
474
  ], QtiAssessmentItem.prototype, "_handleDisabledChange", void 0);
482
475
  __decorate([
483
- n({ type: Boolean })
476
+ property({ type: Boolean })
484
477
  ], QtiAssessmentItem.prototype, "readonly", void 0);
485
478
  __decorate([
486
479
  watch("readonly", { waitUntilFirstUpdate: true })
487
480
  ], QtiAssessmentItem.prototype, "_handleReadonlyChange", void 0);
488
481
  __decorate([
489
- e({ context: itemContext })
482
+ provide({ context: itemContext })
490
483
  ], QtiAssessmentItem.prototype, "_context", void 0);
491
484
 
492
485
  // ../qti-elements/dist/components/qti-assessment-stimulus-ref/qti-assessment-stimulus-ref.js
486
+ import { LitElement as LitElement2 } from "lit";
487
+ import { property as property2 } from "lit/decorators.js";
493
488
  var __decorate2 = function(decorators, target, key, desc) {
494
- var c2 = arguments.length, r2 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
495
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
496
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c2 < 3 ? d(r2) : c2 > 3 ? d(target, key, r2) : d(target, key)) || r2;
497
- return c2 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
489
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
490
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
491
+ 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;
492
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
498
493
  };
499
494
  var QtiAssessmentStimulusRefConnectedEvent = class _QtiAssessmentStimulusRefConnectedEvent extends Event {
500
495
  static {
@@ -506,7 +501,7 @@ var QtiAssessmentStimulusRefConnectedEvent = class _QtiAssessmentStimulusRefConn
506
501
  this.item = item;
507
502
  }
508
503
  };
509
- var QtiAssessmentStimulusRef = class extends i2 {
504
+ var QtiAssessmentStimulusRef = class extends LitElement2 {
510
505
  constructor() {
511
506
  super(...arguments);
512
507
  this.identifier = "";
@@ -542,26 +537,30 @@ var QtiAssessmentStimulusRef = class extends i2 {
542
537
  }
543
538
  };
544
539
  __decorate2([
545
- n({ type: String })
540
+ property2({ type: String })
546
541
  ], QtiAssessmentStimulusRef.prototype, "identifier", void 0);
547
542
  __decorate2([
548
- n({ type: String })
543
+ property2({ type: String })
549
544
  ], QtiAssessmentStimulusRef.prototype, "href", void 0);
550
545
 
551
546
  // ../qti-elements/dist/components/qti-companion-materials-info/qti-companion-materials-info.js
552
- var QtiCompanionMaterialsInfo = class extends i2 {
547
+ import { LitElement as LitElement3 } from "lit";
548
+ var QtiCompanionMaterialsInfo = class extends LitElement3 {
553
549
  };
554
550
 
555
551
  // ../qti-elements/dist/components/qti-content-body/qti-content-body.js
552
+ import { consume } from "@lit/context";
553
+ import { LitElement as LitElement4, html as html2 } from "lit";
554
+ import { state } from "lit/decorators.js";
556
555
  var __decorate3 = function(decorators, target, key, desc) {
557
- var c2 = arguments.length, r2 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
558
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
559
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c2 < 3 ? d(r2) : c2 > 3 ? d(target, key, r2) : d(target, key)) || r2;
560
- return c2 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
556
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
557
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
558
+ 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;
559
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
561
560
  };
562
- var QtiContentBody = class extends i2 {
561
+ var QtiContentBody = class extends LitElement4 {
563
562
  render() {
564
- return T`<slot @slotchange=${this.#expandMathVariables}></slot>`;
563
+ return html2`<slot @slotchange=${this.#expandMathVariables}></slot>`;
565
564
  }
566
565
  connectedCallback() {
567
566
  super.connectedCallback();
@@ -611,18 +610,20 @@ var QtiContentBody = class extends i2 {
611
610
  }
612
611
  };
613
612
  __decorate3([
614
- c({ context: itemContext, subscribe: true }),
615
- r()
613
+ consume({ context: itemContext, subscribe: true }),
614
+ state()
616
615
  ], QtiContentBody.prototype, "context", void 0);
617
616
 
618
617
  // ../qti-elements/dist/components/qti-context-declaration/qti-context-declaration.js
618
+ import { css, LitElement as LitElement5, html as html3 } from "lit";
619
+ import { property as property3 } from "lit/decorators.js";
619
620
  var __decorate4 = function(decorators, target, key, desc) {
620
- var c2 = arguments.length, r2 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
621
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
622
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c2 < 3 ? d(r2) : c2 > 3 ? d(target, key, r2) : d(target, key)) || r2;
623
- return c2 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
621
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
622
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
623
+ 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;
624
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
624
625
  };
625
- var QtiContextDeclaration = class extends i2 {
626
+ var QtiContextDeclaration = class extends LitElement5 {
626
627
  constructor() {
627
628
  super(...arguments);
628
629
  this.identifier = "";
@@ -630,7 +631,7 @@ var QtiContextDeclaration = class extends i2 {
630
631
  }
631
632
  static {
632
633
  this.styles = [
633
- i`
634
+ css`
634
635
  :host {
635
636
  display: none;
636
637
  }
@@ -638,35 +639,38 @@ var QtiContextDeclaration = class extends i2 {
638
639
  ];
639
640
  }
640
641
  render() {
641
- return T`<slot></slot>`;
642
+ return html3`<slot></slot>`;
642
643
  }
643
644
  };
644
645
  __decorate4([
645
- n({ type: String })
646
+ property3({ type: String })
646
647
  ], QtiContextDeclaration.prototype, "identifier", void 0);
647
648
  __decorate4([
648
- n({ type: String })
649
+ property3({ type: String })
649
650
  ], QtiContextDeclaration.prototype, "cardinality", void 0);
650
651
 
651
652
  // ../qti-elements/dist/components/qti-custom-operator/qti-custom-operator.js
653
+ import { consume as consume2 } from "@lit/context";
654
+ import { LitElement as LitElement6, html as html4 } from "lit";
655
+ import { state as state2 } from "lit/decorators.js";
652
656
  var __decorate5 = function(decorators, target, key, desc) {
653
- var c2 = arguments.length, r2 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
654
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
655
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c2 < 3 ? d(r2) : c2 > 3 ? d(target, key, r2) : d(target, key)) || r2;
656
- return c2 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
657
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
658
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
659
+ 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;
660
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
657
661
  };
658
- var QtiCustomOperator = class extends i2 {
662
+ var QtiCustomOperator = class extends LitElement6 {
659
663
  // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
660
664
  #operatorFunction;
661
665
  render() {
662
- return T`<slot @slotchange=${this.handleSlotChange}></slot>`;
666
+ return html4`<slot @slotchange=${this.handleSlotChange}></slot>`;
663
667
  }
664
668
  handleSlotChange() {
665
669
  const commentNode = Array.from(this.firstElementChild?.childNodes ?? []).find((node) => node.nodeType === Node.COMMENT_NODE);
666
670
  try {
667
671
  this.#operatorFunction = new Function("context", "fn", "item", commentNode?.textContent ?? "");
668
- } catch (e2) {
669
- console.error("custom-operator contains invalid javascript code", e2);
672
+ } catch (e) {
673
+ console.error("custom-operator contains invalid javascript code", e);
670
674
  }
671
675
  }
672
676
  calculate() {
@@ -701,14 +705,15 @@ var QtiCustomOperator = class extends i2 {
701
705
  }
702
706
  };
703
707
  __decorate5([
704
- c({ context: itemContext, subscribe: true }),
705
- r()
708
+ consume2({ context: itemContext, subscribe: true }),
709
+ state2()
706
710
  ], QtiCustomOperator.prototype, "_context", void 0);
707
711
 
708
712
  // ../qti-elements/dist/components/qti-feedback-block/qti-feedback-block.js
713
+ import { css as css2, html as html5 } from "lit";
709
714
  var QtiFeedbackBlock = class extends QtiFeedback {
710
715
  static {
711
- this.styles = i`
716
+ this.styles = css2`
712
717
  :host {
713
718
  display: block;
714
719
  }
@@ -721,7 +726,7 @@ var QtiFeedbackBlock = class extends QtiFeedback {
721
726
  `;
722
727
  }
723
728
  render() {
724
- return T` <slot part="feedback" class="feedback ${this.showStatus}"></slot> `;
729
+ return html5` <slot part="feedback" class="feedback ${this.showStatus}"></slot> `;
725
730
  }
726
731
  connectedCallback() {
727
732
  super.connectedCallback();
@@ -730,13 +735,15 @@ var QtiFeedbackBlock = class extends QtiFeedback {
730
735
  };
731
736
 
732
737
  // ../qti-elements/dist/components/qti-feedback-inline/qti-feedback-inline.js
738
+ import { css as css3, html as html6 } from "lit";
739
+ import { ifDefined } from "lit/directives/if-defined.js";
733
740
  var QtiFeedbackInline = class extends QtiFeedback {
734
741
  constructor() {
735
742
  super(...arguments);
736
- this.render = () => T` <slot part="feedback" class="${o(this.showStatus)}"></slot> `;
743
+ this.render = () => html6` <slot part="feedback" class="${ifDefined(this.showStatus)}"></slot> `;
737
744
  }
738
745
  static {
739
- this.styles = i`
746
+ this.styles = css3`
740
747
  .on {
741
748
  display: inline-block;
742
749
  }
@@ -751,27 +758,32 @@ var QtiFeedbackInline = class extends QtiFeedback {
751
758
  }
752
759
  };
753
760
 
761
+ // ../qti-elements/dist/components/qti-item-body/qti-item-body.js
762
+ import { html as html7, LitElement as LitElement7 } from "lit";
763
+
754
764
  // ../qti-elements/dist/components/qti-item-body/qti-item-body.styles.js
755
- var qti_item_body_styles_default = i`
765
+ import { css as css4 } from "lit";
766
+ var qti_item_body_styles_default = css4`
756
767
  :host {
757
768
  display: block;
758
769
  }
759
770
  `;
760
771
 
761
772
  // ../qti-elements/dist/components/qti-item-body/qti-item-body.js
762
- var QtiItemBody = class extends i2 {
773
+ var QtiItemBody = class extends LitElement7 {
763
774
  static {
764
775
  this.styles = qti_item_body_styles_default;
765
776
  }
766
777
  render() {
767
- return T`<slot part="qti-rubric-blocks" name="qti-rubric-block"></slot><slot></slot>`;
778
+ return html7`<slot part="qti-rubric-blocks" name="qti-rubric-block"></slot><slot></slot>`;
768
779
  }
769
780
  };
770
781
 
771
782
  // ../qti-elements/dist/components/qti-modal-feedback/qti-modal-feedback.js
783
+ import { css as css5, html as html8 } from "lit";
772
784
  var QtiModalFeedback = class extends QtiFeedback {
773
785
  static {
774
- this.styles = i`
786
+ this.styles = css5`
775
787
  .cito-dialog {
776
788
  background: var(--qti-bg);
777
789
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
@@ -812,7 +824,7 @@ var QtiModalFeedback = class extends QtiFeedback {
812
824
  `;
813
825
  }
814
826
  render() {
815
- return T`
827
+ return html8`
816
828
  <dialog class="cito-dialog" part="feedback" ?open="${this.showStatus === "on"}">
817
829
  <slot></slot>
818
830
  <div style="margin-top: var(--qti-gap); text-align: center;">
@@ -852,11 +864,14 @@ var QtiModalFeedback = class extends QtiFeedback {
852
864
  };
853
865
 
854
866
  // ../qti-elements/dist/components/qti-outcome-declaration/qti-outcome-declaration.js
867
+ import { consume as consume3 } from "@lit/context";
868
+ import { css as css6, html as html9 } from "lit";
869
+ import { property as property4, state as state3 } from "lit/decorators.js";
855
870
  var __decorate6 = function(decorators, target, key, desc) {
856
- var c2 = arguments.length, r2 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
857
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
858
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c2 < 3 ? d(r2) : c2 > 3 ? d(target, key, r2) : d(target, key)) || r2;
859
- return c2 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
871
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
872
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
873
+ 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;
874
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
860
875
  };
861
876
  var QtiOutcomeDeclaration = class extends QtiVariableDeclaration {
862
877
  constructor() {
@@ -865,7 +880,7 @@ var QtiOutcomeDeclaration = class extends QtiVariableDeclaration {
865
880
  }
866
881
  static {
867
882
  this.styles = [
868
- i`
883
+ css6`
869
884
  :host {
870
885
  display: none;
871
886
  }
@@ -874,7 +889,7 @@ var QtiOutcomeDeclaration = class extends QtiVariableDeclaration {
874
889
  }
875
890
  render() {
876
891
  const value = this.itemContext?.variables.find((v) => v.identifier === this.identifier)?.value;
877
- return T`${JSON.stringify(value, null, 2)}`;
892
+ return html9`${JSON.stringify(value, null, 2)}`;
878
893
  }
879
894
  get interpolationTable() {
880
895
  const table = this.querySelector("qti-interpolation-table");
@@ -920,33 +935,36 @@ var QtiOutcomeDeclaration = class extends QtiVariableDeclaration {
920
935
  }
921
936
  };
922
937
  __decorate6([
923
- n({ type: String, attribute: "base-type" })
938
+ property4({ type: String, attribute: "base-type" })
924
939
  ], QtiOutcomeDeclaration.prototype, "baseType", void 0);
925
940
  __decorate6([
926
- n({ type: String, attribute: "external-scored" })
941
+ property4({ type: String, attribute: "external-scored" })
927
942
  ], QtiOutcomeDeclaration.prototype, "externalScored", void 0);
928
943
  __decorate6([
929
- n({ type: String })
944
+ property4({ type: String })
930
945
  ], QtiOutcomeDeclaration.prototype, "identifier", void 0);
931
946
  __decorate6([
932
- n({ type: String })
947
+ property4({ type: String })
933
948
  ], QtiOutcomeDeclaration.prototype, "cardinality", void 0);
934
949
  __decorate6([
935
- c({ context: itemContext, subscribe: true }),
936
- r()
950
+ consume3({ context: itemContext, subscribe: true }),
951
+ state3()
937
952
  ], QtiOutcomeDeclaration.prototype, "itemContext", void 0);
938
953
 
939
954
  // ../qti-elements/dist/components/qti-response-declaration/qti-response-declaration.js
955
+ import { consume as consume4 } from "@lit/context";
956
+ import { css as css7, html as html10 } from "lit";
957
+ import { property as property5, state as state4 } from "lit/decorators.js";
940
958
  var __decorate7 = function(decorators, target, key, desc) {
941
- var c2 = arguments.length, r2 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
942
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
943
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c2 < 3 ? d(r2) : c2 > 3 ? d(target, key, r2) : d(target, key)) || r2;
944
- return c2 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
959
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
960
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
961
+ 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;
962
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
945
963
  };
946
964
  var QtiResponseDeclaration = class extends QtiVariableDeclaration {
947
965
  static {
948
966
  this.styles = [
949
- i`
967
+ css7`
950
968
  :host {
951
969
  display: none;
952
970
  }
@@ -955,7 +973,7 @@ var QtiResponseDeclaration = class extends QtiVariableDeclaration {
955
973
  }
956
974
  render() {
957
975
  const value = this.itemContext?.variables.find((v) => v.identifier === this.identifier)?.value;
958
- return T`${JSON.stringify(value, null, 2)}`;
976
+ return html10`${JSON.stringify(value, null, 2)}`;
959
977
  }
960
978
  connectedCallback() {
961
979
  super.connectedCallback();
@@ -989,9 +1007,9 @@ var QtiResponseDeclaration = class extends QtiVariableDeclaration {
989
1007
  values[0].remove();
990
1008
  } else if (this.cardinality !== "single") {
991
1009
  result = [];
992
- for (let i3 = 0; i3 < values.length; i3++) {
993
- result.push(values[i3].textContent.trim());
994
- values[i3].remove();
1010
+ for (let i = 0; i < values.length; i++) {
1011
+ result.push(values[i].textContent.trim());
1012
+ values[i].remove();
995
1013
  }
996
1014
  }
997
1015
  }
@@ -1033,19 +1051,22 @@ var QtiResponseDeclaration = class extends QtiVariableDeclaration {
1033
1051
  }
1034
1052
  };
1035
1053
  __decorate7([
1036
- n({ type: String, attribute: "base-type" })
1054
+ property5({ type: String, attribute: "base-type" })
1037
1055
  ], QtiResponseDeclaration.prototype, "baseType", void 0);
1038
1056
  __decorate7([
1039
- n({ type: String })
1057
+ property5({ type: String })
1040
1058
  ], QtiResponseDeclaration.prototype, "identifier", void 0);
1041
1059
  __decorate7([
1042
- n({ type: String })
1060
+ property5({ type: String })
1043
1061
  ], QtiResponseDeclaration.prototype, "cardinality", void 0);
1044
1062
  __decorate7([
1045
- c({ context: itemContext, subscribe: true }),
1046
- r()
1063
+ consume4({ context: itemContext, subscribe: true }),
1064
+ state4()
1047
1065
  ], QtiResponseDeclaration.prototype, "itemContext", void 0);
1048
1066
 
1067
+ // ../qti-elements/dist/components/qti-response-processing/qti-response-processing.js
1068
+ import { css as css8, html as html11, LitElement as LitElement8 } from "lit";
1069
+
1049
1070
  // ../qti-elements/dist/internal/template-strings.js
1050
1071
  var matchCorrect = `<qti-response-processing>
1051
1072
  <qti-response-condition>
@@ -1101,10 +1122,10 @@ var mapResponsePoint = `<qti-response-processing>
1101
1122
  </qti-response-processing>`;
1102
1123
 
1103
1124
  // ../qti-elements/dist/components/qti-response-processing/qti-response-processing.js
1104
- var QtiResponseProcessing = class extends i2 {
1125
+ var QtiResponseProcessing = class extends LitElement8 {
1105
1126
  static {
1106
1127
  this.styles = [
1107
- i`
1128
+ css8`
1108
1129
  :host {
1109
1130
  display: none;
1110
1131
  }
@@ -1112,7 +1133,7 @@ var QtiResponseProcessing = class extends i2 {
1112
1133
  ];
1113
1134
  }
1114
1135
  render() {
1115
- return T`<slot></slot>`;
1136
+ return html11`<slot></slot>`;
1116
1137
  }
1117
1138
  process() {
1118
1139
  const assessmentItem = this.closest("qti-assessment-item");
@@ -1149,13 +1170,15 @@ var QtiResponseProcessing = class extends i2 {
1149
1170
  };
1150
1171
 
1151
1172
  // ../qti-elements/dist/components/qti-rubric-block/qti-rubric-block.js
1173
+ import { LitElement as LitElement9, css as css9, html as html12 } from "lit";
1174
+ import { property as property6 } from "lit/decorators.js";
1152
1175
  var __decorate8 = function(decorators, target, key, desc) {
1153
- var c2 = arguments.length, r2 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1154
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
1155
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c2 < 3 ? d(r2) : c2 > 3 ? d(target, key, r2) : d(target, key)) || r2;
1156
- return c2 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
1176
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1177
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1178
+ 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;
1179
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1157
1180
  };
1158
- var QtiRubricBlock = class extends i2 {
1181
+ var QtiRubricBlock = class extends LitElement9 {
1159
1182
  handleclassNamesChange() {
1160
1183
  const classNames = this.classNames.split(" ");
1161
1184
  classNames.forEach((className) => {
@@ -1183,34 +1206,35 @@ var QtiRubricBlock = class extends i2 {
1183
1206
  });
1184
1207
  }
1185
1208
  static {
1186
- this.styles = i`
1209
+ this.styles = css9`
1187
1210
  :host {
1188
1211
  display: block;
1189
1212
  }
1190
1213
  `;
1191
1214
  }
1192
1215
  render() {
1193
- return T`<slot></slot>`;
1216
+ return html12`<slot></slot>`;
1194
1217
  }
1195
1218
  };
1196
1219
  __decorate8([
1197
- n({ type: String })
1220
+ property6({ type: String })
1198
1221
  ], QtiRubricBlock.prototype, "id", void 0);
1199
1222
  __decorate8([
1200
- n({ type: String })
1223
+ property6({ type: String })
1201
1224
  ], QtiRubricBlock.prototype, "use", void 0);
1202
1225
  __decorate8([
1203
- n({ type: String })
1226
+ property6({ type: String })
1204
1227
  ], QtiRubricBlock.prototype, "view", void 0);
1205
1228
  __decorate8([
1206
- n({ type: String, attribute: "class" })
1229
+ property6({ type: String, attribute: "class" })
1207
1230
  ], QtiRubricBlock.prototype, "classNames", void 0);
1208
1231
  __decorate8([
1209
1232
  watch("classNames", { waitUntilFirstUpdate: true })
1210
1233
  ], QtiRubricBlock.prototype, "handleclassNamesChange", null);
1211
1234
 
1212
1235
  // ../qti-elements/dist/components/qti-stylesheet/qti-stylesheet.js
1213
- var QtiStylesheet = class extends i2 {
1236
+ import { LitElement as LitElement10 } from "lit";
1237
+ var QtiStylesheet = class extends LitElement10 {
1214
1238
  #styleElement = null;
1215
1239
  firstUpdated(_changedProperties) {
1216
1240
  super.firstUpdated(_changedProperties);
@@ -1258,9 +1282,10 @@ var QtiStylesheet = class extends i2 {
1258
1282
  };
1259
1283
 
1260
1284
  // ../qti-elements/dist/components/qti-template-constraint/qti-template-constraint.js
1261
- var QtiTemplateConstraint = class extends i2 {
1285
+ import { LitElement as LitElement11, html as html13 } from "lit";
1286
+ var QtiTemplateConstraint = class extends LitElement11 {
1262
1287
  render() {
1263
- return T`<slot></slot>`;
1288
+ return html13`<slot></slot>`;
1264
1289
  }
1265
1290
  /**
1266
1291
  * Evaluates the constraint condition
@@ -1300,13 +1325,15 @@ var QtiTemplateConstraint = class extends i2 {
1300
1325
  };
1301
1326
 
1302
1327
  // ../qti-elements/dist/components/qti-template-declaration/qti-template-declaration.js
1328
+ import { css as css10, LitElement as LitElement12, html as html14 } from "lit";
1329
+ import { property as property7 } from "lit/decorators.js";
1303
1330
  var __decorate9 = function(decorators, target, key, desc) {
1304
- var c2 = arguments.length, r2 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1305
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
1306
- else for (var i3 = decorators.length - 1; i3 >= 0; i3--) if (d = decorators[i3]) r2 = (c2 < 3 ? d(r2) : c2 > 3 ? d(target, key, r2) : d(target, key)) || r2;
1307
- return c2 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
1331
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1332
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1333
+ 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;
1334
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1308
1335
  };
1309
- var QtiTemplateDeclaration = class extends i2 {
1336
+ var QtiTemplateDeclaration = class extends LitElement12 {
1310
1337
  constructor() {
1311
1338
  super(...arguments);
1312
1339
  this.identifier = "";
@@ -1319,7 +1346,7 @@ var QtiTemplateDeclaration = class extends i2 {
1319
1346
  #defaultValue;
1320
1347
  static {
1321
1348
  this.styles = [
1322
- i`
1349
+ css10`
1323
1350
  :host {
1324
1351
  display: none;
1325
1352
  }
@@ -1327,7 +1354,7 @@ var QtiTemplateDeclaration = class extends i2 {
1327
1354
  ];
1328
1355
  }
1329
1356
  render() {
1330
- return T`<slot></slot>`;
1357
+ return html14`<slot></slot>`;
1331
1358
  }
1332
1359
  connectedCallback() {
1333
1360
  super.connectedCallback();
@@ -1403,26 +1430,27 @@ var QtiTemplateDeclaration = class extends i2 {
1403
1430
  }
1404
1431
  };
1405
1432
  __decorate9([
1406
- n({ type: String })
1433
+ property7({ type: String })
1407
1434
  ], QtiTemplateDeclaration.prototype, "identifier", void 0);
1408
1435
  __decorate9([
1409
- n({ type: String })
1436
+ property7({ type: String })
1410
1437
  ], QtiTemplateDeclaration.prototype, "cardinality", void 0);
1411
1438
  __decorate9([
1412
- n({ type: String, attribute: "base-type" })
1439
+ property7({ type: String, attribute: "base-type" })
1413
1440
  ], QtiTemplateDeclaration.prototype, "baseType", void 0);
1414
1441
  __decorate9([
1415
- n({ type: Boolean, attribute: "math-variable" })
1442
+ property7({ type: Boolean, attribute: "math-variable" })
1416
1443
  ], QtiTemplateDeclaration.prototype, "mathVariable", void 0);
1417
1444
  __decorate9([
1418
- n({ type: Boolean, attribute: "param-variable" })
1445
+ property7({ type: Boolean, attribute: "param-variable" })
1419
1446
  ], QtiTemplateDeclaration.prototype, "paramVariable", void 0);
1420
1447
 
1421
1448
  // ../qti-elements/dist/components/qti-template-processing/qti-template-processing.js
1422
- var QtiTemplateProcessing = class extends i2 {
1449
+ import { css as css11, html as html15, LitElement as LitElement13 } from "lit";
1450
+ var QtiTemplateProcessing = class extends LitElement13 {
1423
1451
  static {
1424
1452
  this.styles = [
1425
- i`
1453
+ css11`
1426
1454
  :host {
1427
1455
  display: none;
1428
1456
  }
@@ -1432,7 +1460,7 @@ var QtiTemplateProcessing = class extends i2 {
1432
1460
  #maxIterations = 100;
1433
1461
  // Prevent infinite loops in template constraints
1434
1462
  render() {
1435
- return T`<slot></slot>`;
1463
+ return html15`<slot></slot>`;
1436
1464
  }
1437
1465
  /**
1438
1466
  * Process template rules to set template variable values
@@ -1527,4 +1555,4 @@ export {
1527
1555
  QtiTemplateProcessing,
1528
1556
  qtiContentElements
1529
1557
  };
1530
- //# sourceMappingURL=chunk-WVVMNF74.js.map
1558
+ //# sourceMappingURL=chunk-7AVWRQIS.js.map