@citolab/qti-components 10.0.0-next.12 → 10.0.0-next.14

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 (62) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +447 -412
  3. package/dist/base.d.ts +3 -3
  4. package/dist/base.js +1 -1
  5. package/dist/{chunk-5K5JO7OG.js → chunk-6XRNX574.js} +363 -320
  6. package/dist/chunk-6XRNX574.js.map +1 -0
  7. package/dist/{chunk-AVZRY5SQ.js → chunk-BZPMN57E.js} +2 -2
  8. package/dist/{chunk-YOCOLMGB.js → chunk-C7SYDLMG.js} +197 -93
  9. package/dist/chunk-C7SYDLMG.js.map +1 -0
  10. package/dist/{chunk-OHRAG2UM.js → chunk-CCI3QMQA.js} +53 -16
  11. package/dist/chunk-CCI3QMQA.js.map +1 -0
  12. package/dist/{chunk-RWMY7KRT.js → chunk-HGKLF7SP.js} +2 -2
  13. package/dist/{chunk-AJ5U5KXR.js → chunk-LEF7AAYZ.js} +2 -2
  14. package/dist/{chunk-O76BOKAP.js → chunk-MP2SUN7J.js} +199 -90
  15. package/dist/chunk-MP2SUN7J.js.map +1 -0
  16. package/dist/{chunk-M7X6TWSX.js → chunk-NYNL5HSR.js} +2 -2
  17. package/dist/{chunk-T7YSBBAA.js → chunk-O2ENNGKV.js} +3 -2
  18. package/dist/chunk-O2ENNGKV.js.map +1 -0
  19. package/dist/chunk-Q4MJCEDE.js +7 -0
  20. package/dist/chunk-Q4MJCEDE.js.map +1 -0
  21. package/dist/{chunk-PLP3YX6C.js → chunk-S5GLISQA.js} +2 -2
  22. package/dist/{chunk-XXJAE6AP.js → chunk-SWNFCQ4G.js} +3 -3
  23. package/dist/{chunk-LCGPLQLE.js → chunk-TU34FFWF.js} +8 -3
  24. package/dist/chunk-TU34FFWF.js.map +1 -0
  25. package/dist/{config.context.d-BvU9r-Mg.d.ts → config.context.d-BniMHSBB.d.ts} +3 -2
  26. package/dist/corrections.d.ts +17 -7
  27. package/dist/corrections.js +8 -8
  28. package/dist/elements.d.ts +54 -12
  29. package/dist/elements.js +3 -3
  30. package/dist/index.d.ts +6 -6
  31. package/dist/index.js +15 -13
  32. package/dist/interactions.d.ts +17 -5
  33. package/dist/interactions.js +3 -3
  34. package/dist/item.css +69 -24
  35. package/dist/item.d.ts +3 -3
  36. package/dist/item.js +4 -4
  37. package/dist/loader.d.ts +1 -1
  38. package/dist/processing.d.ts +8 -4
  39. package/dist/processing.js +3 -3
  40. package/dist/qti-components-jsx.d.ts +323 -108
  41. package/dist/{qti-item.d-B1gffYCL.d.ts → qti-item.d-BqWYBdV2.d.ts} +1 -1
  42. package/dist/{qti-rule-base.d-Bdzg8eGH.d.ts → qti-rule-base.d-CeKP0Ooi.d.ts} +2 -2
  43. package/dist/{qti-test.d-D5C7W8Lg.d.ts → qti-test.d-C0I1BIdH.d.ts} +58 -6
  44. package/dist/{qti-text-entry-interaction.d-CU-fAAD1.d.ts → qti-text-entry-interaction.d-V4sWE9TO.d.ts} +37 -9
  45. package/dist/{record.d-wB9uYs-j.d.ts → record.d-C6m0Y4xr.d.ts} +1 -1
  46. package/dist/test.d.ts +8 -5
  47. package/dist/test.js +7 -5
  48. package/package.json +10 -10
  49. package/dist/chunk-5K5JO7OG.js.map +0 -1
  50. package/dist/chunk-LCGPLQLE.js.map +0 -1
  51. package/dist/chunk-O76BOKAP.js.map +0 -1
  52. package/dist/chunk-OHRAG2UM.js.map +0 -1
  53. package/dist/chunk-T7YSBBAA.js.map +0 -1
  54. package/dist/chunk-YKXVAXSI.js +0 -7
  55. package/dist/chunk-YKXVAXSI.js.map +0 -1
  56. package/dist/chunk-YOCOLMGB.js.map +0 -1
  57. /package/dist/{chunk-AVZRY5SQ.js.map → chunk-BZPMN57E.js.map} +0 -0
  58. /package/dist/{chunk-RWMY7KRT.js.map → chunk-HGKLF7SP.js.map} +0 -0
  59. /package/dist/{chunk-AJ5U5KXR.js.map → chunk-LEF7AAYZ.js.map} +0 -0
  60. /package/dist/{chunk-M7X6TWSX.js.map → chunk-NYNL5HSR.js.map} +0 -0
  61. /package/dist/{chunk-PLP3YX6C.js.map → chunk-S5GLISQA.js.map} +0 -0
  62. /package/dist/{chunk-XXJAE6AP.js.map → chunk-SWNFCQ4G.js.map} +0 -0
@@ -3,10 +3,10 @@ import {
3
3
  dispatchDeclared,
4
4
  listenDeclared,
5
5
  listenPublic
6
- } from "./chunk-YOCOLMGB.js";
6
+ } from "./chunk-C7SYDLMG.js";
7
7
  import {
8
8
  item_css_default
9
- } from "./chunk-YKXVAXSI.js";
9
+ } from "./chunk-Q4MJCEDE.js";
10
10
  import {
11
11
  watch
12
12
  } from "./chunk-4DB4SC5K.js";
@@ -25,7 +25,7 @@ import {
25
25
  qtiContext,
26
26
  sessionContext,
27
27
  testContext
28
- } from "./chunk-T7YSBBAA.js";
28
+ } from "./chunk-O2ENNGKV.js";
29
29
 
30
30
  // ../qti-test/dist/components/qti-assessment-item-ref/qti-assessment-item-ref.js
31
31
  import { LitElement, nothing as nothing2 } from "lit";
@@ -2542,7 +2542,7 @@ var TestBaseMixin = (superClass) => {
2542
2542
  * @param itemRefID The `qti-assessment-item-ref` identifier, not the item's own identifier.
2543
2543
  * @param state Opaque per-interaction state keyed by response identifier, e.g. a PCI's `getState()`.
2544
2544
  */
2545
- updateItemVariables(itemRefID, values, state9) {
2545
+ updateItemVariables(itemRefID, values, state10) {
2546
2546
  this.testContext = {
2547
2547
  ...this.testContext,
2548
2548
  items: this.testContext.items.map((item) => {
@@ -2562,15 +2562,15 @@ var TestBaseMixin = (superClass) => {
2562
2562
  else
2563
2563
  variables.push(updated);
2564
2564
  }
2565
- return { ...item, variables, ...state9 ? { state: { ...state9 } } : {} };
2565
+ return { ...item, variables, ...state10 ? { state: { ...state10 } } : {} };
2566
2566
  })
2567
2567
  };
2568
2568
  const assessmentItem = this._testElement?.querySelector(`qti-assessment-item-ref[identifier="${CSS.escape(itemRefID)}"]`)?.assessmentItem;
2569
2569
  if (!assessmentItem)
2570
2570
  return;
2571
2571
  assessmentItem.variables = [...this.testContext.items.find((i) => i.identifier === itemRefID)?.variables ?? []];
2572
- if (state9)
2573
- assessmentItem.state = state9;
2572
+ if (state10)
2573
+ assessmentItem.state = state10;
2574
2574
  }
2575
2575
  _initializeEventListeners() {
2576
2576
  this.addEventListener("qti-testdoc-loaded", () => {
@@ -2607,7 +2607,7 @@ var TestBaseMixin = (superClass) => {
2607
2607
  this._updateItemVariablesInTestContext(e.detail.itemContext.identifier, e.detail.itemContext.variables, e.detail.itemContext.state, e.detail.itemContext.valid);
2608
2608
  });
2609
2609
  }
2610
- _updateItemVariablesInTestContext(identifier, variables, state9, valid) {
2610
+ _updateItemVariablesInTestContext(identifier, variables, state10, valid) {
2611
2611
  this.testContext = {
2612
2612
  ...this.testContext,
2613
2613
  // Spread existing test context properties
@@ -2622,7 +2622,7 @@ var TestBaseMixin = (superClass) => {
2622
2622
  const matchingVariable = itemContext.variables.find((v) => v.identifier === variable.identifier);
2623
2623
  return matchingVariable ? { ...matchingVariable, ...variable } : variable;
2624
2624
  }),
2625
- ...state9 !== void 0 ? { state: state9 ? { ...state9 } : void 0 } : {},
2625
+ ...state10 !== void 0 ? { state: state10 ? { ...state10 } : void 0 } : {},
2626
2626
  ...valid !== void 0 ? { valid } : {}
2627
2627
  };
2628
2628
  })
@@ -2662,8 +2662,8 @@ var TestBase = class extends TestBaseMixin(LitElement9) {
2662
2662
  // ../qti-test/dist/mixins/test-state.mixin.js
2663
2663
  var copy = (value) => Array.isArray(value) ? [...value] : value ?? null;
2664
2664
  var isQtiTestState = (value) => {
2665
- const state9 = value;
2666
- return state9?.version === QTI_TEST_STATE_VERSION && Array.isArray(state9.test?.items) && Array.isArray(state9.test?.outcomes) && typeof state9.session === "object" && state9.session !== null;
2665
+ const state10 = value;
2666
+ return state10?.version === QTI_TEST_STATE_VERSION && Array.isArray(state10.test?.items) && Array.isArray(state10.test?.outcomes) && typeof state10.session === "object" && state10.session !== null;
2667
2667
  };
2668
2668
  var toState = (test, session) => ({
2669
2669
  version: QTI_TEST_STATE_VERSION,
@@ -2753,25 +2753,25 @@ var TestStateMixin = (superClass) => {
2753
2753
  super.updated(changed);
2754
2754
  if (!this.#ready || !(changed.has("testContext") || changed.has("sessionContext")))
2755
2755
  return;
2756
- const state9 = this.state;
2757
- const serialized = JSON.stringify(state9);
2756
+ const state10 = this.state;
2757
+ const serialized = JSON.stringify(state10);
2758
2758
  if (serialized === this.#lastEmitted)
2759
2759
  return;
2760
2760
  this.#lastEmitted = serialized;
2761
- dispatchPublic(this, "cito-test-state-changed", state9);
2761
+ dispatchPublic(this, "cito-test-state-changed", state10);
2762
2762
  }
2763
- #apply(state9) {
2764
- for (const saved of state9.test.items)
2763
+ #apply(state10) {
2764
+ for (const saved of state10.test.items)
2765
2765
  this.updateItemVariables(saved.identifier, saved.variables, saved.state);
2766
- const savedOutcomes = new Map(state9.test.outcomes.map((outcome) => [outcome.identifier, outcome.value]));
2766
+ const savedOutcomes = new Map(state10.test.outcomes.map((outcome) => [outcome.identifier, outcome.value]));
2767
2767
  this.testContext = {
2768
2768
  ...this.testContext,
2769
2769
  testOutcomeVariables: this.testContext.testOutcomeVariables?.map((v) => savedOutcomes.has(v.identifier) ? { ...v, value: copy(savedOutcomes.get(v.identifier)) } : v)
2770
2770
  };
2771
2771
  this.sessionContext = {
2772
2772
  ...this.sessionContext,
2773
- ...this.#validSession(state9.session),
2774
- plugins: state9.session.plugins && typeof state9.session.plugins === "object" ? { ...state9.session.plugins } : {}
2773
+ ...this.#validSession(state10.session),
2774
+ plugins: state10.session.plugins && typeof state10.session.plugins === "object" ? { ...state10.session.plugins } : {}
2775
2775
  };
2776
2776
  }
2777
2777
  /** A stored position may point at an item or section a revised test no longer has. */
@@ -3054,18 +3054,25 @@ __decorate13([
3054
3054
  ], TestContainer.prototype, "handleTestXMLChange", null);
3055
3055
 
3056
3056
  // ../qti-test/dist/components/test-end-attempt/test-end-attempt.js
3057
- import { css as css6, html as html11, LitElement as LitElement12 } from "lit";
3057
+ import { LitElement as LitElement12 } from "lit";
3058
3058
  import { property as property11 } from "lit/decorators.js";
3059
3059
  import { consume as consume7 } from "@lit/context";
3060
3060
 
3061
3061
  // ../qti-test/dist/components/styles.js
3062
- import { css as css5 } from "lit";
3062
+ import { css as css5, html as html11 } from "lit";
3063
3063
  var surface = css5`var(--qti-color-base-100, var(--cito-color-base-100, Canvas))`;
3064
3064
  var content = css5`var(--qti-color-base-content, var(--cito-color-base-content, CanvasText))`;
3065
3065
  var neutral = css5`var(--qti-color-neutral, var(--cito-color-neutral, CanvasText))`;
3066
3066
  var neutralContent = css5`var(--qti-color-neutral-content, var(--cito-color-neutral-content, Canvas))`;
3067
- var form = css5`
3067
+ var hostBox = css5`
3068
3068
  display: inline-flex;
3069
+ cursor: pointer;
3070
+ user-select: none;
3071
+ border-radius: var(--test-button-border-radius, var(--qti-radius-field, var(--cito-radius-field, 0.2rem)));
3072
+ `;
3073
+ var form = css5`
3074
+ display: flex;
3075
+ flex: 1 1 auto;
3069
3076
  align-items: center;
3070
3077
  justify-content: center;
3071
3078
  gap: 0.375em;
@@ -3126,6 +3133,45 @@ var ind = css5`
3126
3133
  ${form};
3127
3134
  border: var(--qti-border-width, var(--cito-border-width, 1px)) solid var(--qti-border-color, GrayText);
3128
3135
  `;
3136
+ var control = html11`<span class="control" part="button"><slot></slot></span>`;
3137
+ var button = css5`
3138
+ :host {
3139
+ ${hostBox};
3140
+ }
3141
+ .control {
3142
+ ${btn};
3143
+ }
3144
+ @media (hover: hover) and (pointer: fine) {
3145
+ :host(:hover:not([disabled])) .control {
3146
+ ${btnInteractive};
3147
+ }
3148
+ }
3149
+ :host(:active:not([disabled])) .control {
3150
+ ${btnActive};
3151
+ }
3152
+ :host(:focus-visible) {
3153
+ ${focusRing};
3154
+ }
3155
+ :host([disabled]) {
3156
+ ${dis};
3157
+ }
3158
+ :host([disabled]) .control {
3159
+ cursor: not-allowed;
3160
+ }
3161
+ `;
3162
+ var buttonPrimary = css5`
3163
+ .control {
3164
+ ${btnPrimary};
3165
+ }
3166
+ @media (hover: hover) and (pointer: fine) {
3167
+ :host(:hover:not([disabled])) .control {
3168
+ ${btnPrimaryInteractive};
3169
+ }
3170
+ }
3171
+ :host(:active:not([disabled])) .control {
3172
+ ${btnPrimaryActive};
3173
+ }
3174
+ `;
3129
3175
 
3130
3176
  // ../qti-test/dist/components/test-end-attempt/test-end-attempt.js
3131
3177
  var __decorate14 = function(decorators, target, key, desc) {
@@ -3134,6 +3180,13 @@ var __decorate14 = function(decorators, target, key, desc) {
3134
3180
  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;
3135
3181
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3136
3182
  };
3183
+ var itemRefOf = (element) => {
3184
+ const itemRef = element.closest("qti-assessment-item-ref");
3185
+ if (itemRef)
3186
+ return itemRef.getAttribute("identifier") ?? void 0;
3187
+ const root = element.getRootNode();
3188
+ return root instanceof ShadowRoot ? itemRefOf(root.host) : void 0;
3189
+ };
3137
3190
  var TestEndAttempt = class extends LitElement12 {
3138
3191
  _handleTestElementChange(_oldValue, newValue) {
3139
3192
  if (newValue) {
@@ -3141,46 +3194,34 @@ var TestEndAttempt = class extends LitElement12 {
3141
3194
  }
3142
3195
  }
3143
3196
  static {
3144
- this.styles = css6`
3145
- :host {
3146
- ${btn};
3147
- }
3148
- @media (hover: hover) and (pointer: fine) {
3149
- :host(:hover:not([disabled])) {
3150
- ${btnInteractive};
3151
- }
3152
- }
3153
- :host(:active:not([disabled])) {
3154
- ${btnActive};
3155
- }
3156
- :host(:focus-visible) {
3157
- ${focusRing};
3158
- }
3159
- :host([disabled]) {
3160
- ${dis};
3161
- }
3162
- `;
3197
+ this.styles = button;
3163
3198
  }
3164
3199
  constructor() {
3165
3200
  super();
3166
3201
  this._internalDisabled = false;
3202
+ this.requireAnswer = false;
3167
3203
  this.addEventListener("click", (e) => {
3168
3204
  e.preventDefault();
3169
3205
  if (!this._internalDisabled) {
3170
- dispatchPublic(this, "cito-test-end-attempt", {});
3206
+ const itemId = this.#ownItem;
3207
+ dispatchPublic(this, "cito-test-end-attempt", itemId ? { itemId } : {});
3171
3208
  }
3172
3209
  });
3173
3210
  }
3211
+ /** The item named by `item`, or else the item-ref it is stamped into. */
3212
+ get #ownItem() {
3213
+ return this.item || itemRefOf(this);
3214
+ }
3174
3215
  willUpdate(_changedProperties) {
3175
3216
  this.checkDisabled();
3176
3217
  }
3177
3218
  checkDisabled() {
3178
- const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
3179
- if (!testPart)
3219
+ const testParts = this.computedContext?.testParts;
3220
+ const ownItem = this.#ownItem;
3221
+ const testPart = testParts?.find((testPart2) => testPart2.active);
3222
+ if (!testParts || !ownItem && !testPart)
3180
3223
  return;
3181
- const sectionItems = testPart.sections.flatMap((section) => section.items);
3182
- const itemIndex = sectionItems.findIndex((item) => item.active);
3183
- const activeItem = sectionItems[itemIndex];
3224
+ const activeItem = ownItem ? testParts.flatMap((part) => part.sections.flatMap((section) => section.items)).find((i) => i.identifier === ownItem) : testPart.sections.flatMap((section) => section.items).find((item) => item.active);
3184
3225
  if (!activeItem) {
3185
3226
  this._internalDisabled = false;
3186
3227
  return;
@@ -3199,14 +3240,14 @@ var TestEndAttempt = class extends LitElement12 {
3199
3240
  this._internalDisabled = true;
3200
3241
  return;
3201
3242
  }
3202
- if (activeItem.allowSkipping === false) {
3243
+ if (this.requireAnswer || activeItem.allowSkipping === false) {
3203
3244
  this._internalDisabled = activeItem.valid === false || activeItem.isDefaultResponse;
3204
3245
  } else {
3205
3246
  this._internalDisabled = false;
3206
3247
  }
3207
3248
  }
3208
3249
  render() {
3209
- return html11` <slot></slot> `;
3250
+ return control;
3210
3251
  }
3211
3252
  };
3212
3253
  __decorate14([
@@ -3216,12 +3257,18 @@ __decorate14([
3216
3257
  __decorate14([
3217
3258
  property11({ type: Boolean, reflect: true, attribute: "disabled" })
3218
3259
  ], TestEndAttempt.prototype, "_internalDisabled", void 0);
3260
+ __decorate14([
3261
+ property11({ reflect: true })
3262
+ ], TestEndAttempt.prototype, "item", void 0);
3263
+ __decorate14([
3264
+ property11({ type: Boolean, reflect: true, attribute: "require-answer" })
3265
+ ], TestEndAttempt.prototype, "requireAnswer", void 0);
3219
3266
  __decorate14([
3220
3267
  watch("computedContext")
3221
3268
  ], TestEndAttempt.prototype, "_handleTestElementChange", null);
3222
3269
 
3223
3270
  // ../qti-test/dist/components/test-item-link/test-item-link.js
3224
- import { css as css7, html as html12, LitElement as LitElement13 } from "lit";
3271
+ import { LitElement as LitElement13 } from "lit";
3225
3272
  import { property as property12 } from "lit/decorators.js";
3226
3273
  var __decorate15 = function(decorators, target, key, desc) {
3227
3274
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -3231,25 +3278,7 @@ var __decorate15 = function(decorators, target, key, desc) {
3231
3278
  };
3232
3279
  var TestItemLink = class extends LitElement13 {
3233
3280
  static {
3234
- this.styles = css7`
3235
- :host {
3236
- ${btn};
3237
- }
3238
- @media (hover: hover) and (pointer: fine) {
3239
- :host(:hover:not([disabled])) {
3240
- ${btnInteractive};
3241
- }
3242
- }
3243
- :host(:active:not([disabled])) {
3244
- ${btnActive};
3245
- }
3246
- :host(:focus-visible) {
3247
- ${focusRing};
3248
- }
3249
- :host([disabled]) {
3250
- ${dis};
3251
- }
3252
- `;
3281
+ this.styles = button;
3253
3282
  }
3254
3283
  constructor() {
3255
3284
  super();
@@ -3260,7 +3289,7 @@ var TestItemLink = class extends LitElement13 {
3260
3289
  dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
3261
3290
  }
3262
3291
  render() {
3263
- return html12` <slot></slot> `;
3292
+ return control;
3264
3293
  }
3265
3294
  };
3266
3295
  __decorate15([
@@ -3269,7 +3298,7 @@ __decorate15([
3269
3298
 
3270
3299
  // ../qti-test/dist/components/test-navigation/test-navigation.js
3271
3300
  import { ContextConsumer, consume as consume8, provide as provide3 } from "@lit/context";
3272
- import { html as html13, LitElement as LitElement14 } from "lit";
3301
+ import { html as html12, LitElement as LitElement14 } from "lit";
3273
3302
  import { property as property13, state as state4 } from "lit/decorators.js";
3274
3303
  var __decorate16 = function(decorators, target, key, desc) {
3275
3304
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -3344,6 +3373,7 @@ var TestNavigation = class extends LitElement14 {
3344
3373
  this.autoScoreItems = false;
3345
3374
  this.#optimality = /* @__PURE__ */ new Map();
3346
3375
  this.#itemElement = (identifier) => this.#assessmentItemFor(identifier) ?? null;
3376
+ this.#lockedItems = /* @__PURE__ */ new WeakSet();
3347
3377
  listenPublic2(this, "cito-test-loaded", this.#handleTestConnected.bind(this));
3348
3378
  this.addEventListener("qti-assessment-item-connected", this.#handleItemConnected.bind(this));
3349
3379
  listenPublic(this, "cito-item-response-changed", this.#handleInteractionChanged.bind(this));
@@ -3399,13 +3429,12 @@ var TestNavigation = class extends LitElement14 {
3399
3429
  return this.#testElement.querySelector(`qti-assessment-item-ref[identifier="${this._sessionContext.navItemRefId}"]`)?.assessmentItem;
3400
3430
  }
3401
3431
  /**
3402
- * Handles the 'test-end-attempt' event.
3403
- * @private
3404
- * @listens TestNavigation#test-end-attempt
3405
- * @param {CustomEvent} event - The custom event object.
3432
+ * Ends an attempt: the item named by `detail.itemId` (a `test-end-attempt` stamped into an item, or
3433
+ * given an `item`), or else the item on screen.
3406
3434
  */
3407
- #handleTestEndAttempt(_event) {
3408
- const qtiAssessmentItemEl = this.activeAssessmentItem;
3435
+ #handleTestEndAttempt(event) {
3436
+ const itemId = event.detail?.itemId;
3437
+ const qtiAssessmentItemEl = itemId ? this.#assessmentItemFor(itemId) : this.activeAssessmentItem;
3409
3438
  if (!qtiAssessmentItemEl)
3410
3439
  return;
3411
3440
  const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;
@@ -3430,7 +3459,7 @@ var TestNavigation = class extends LitElement14 {
3430
3459
  }
3431
3460
  }
3432
3461
  render() {
3433
- return html13`<slot></slot>`;
3462
+ return html12`<slot></slot>`;
3434
3463
  }
3435
3464
  /* PK: on test connected we can build the computed context */
3436
3465
  #handleTestConnected(event) {
@@ -3622,7 +3651,7 @@ var TestNavigation = class extends LitElement14 {
3622
3651
  return {
3623
3652
  ...section,
3624
3653
  active: this._sessionContext?.navSectionId === section.identifier || false,
3625
- completed: section.items.every((item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"),
3654
+ completed: section.items.every((item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus")?.value === "completed"),
3626
3655
  items: section.items.map((item) => {
3627
3656
  const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
3628
3657
  const computedItem = {
@@ -3637,7 +3666,7 @@ var TestNavigation = class extends LitElement14 {
3637
3666
  const numAttempts = Number(computedItem.variables?.find((v) => v.identifier === "numAttempts")?.value) || 0;
3638
3667
  const active = this._sessionContext?.navItemRefId === computedItem.identifier || false;
3639
3668
  const valid = itemContext?.valid ?? true;
3640
- const responseVars = itemContext?.variables?.filter((v) => v.type === "response") || [];
3669
+ const responseVars = itemContext?.variables?.filter((v) => v.type === "response" && v.identifier !== "numAttempts") || [];
3641
3670
  const isDefaultResponse = responseVars.every((v) => {
3642
3671
  if (v.value === void 0 || v.value === null) {
3643
3672
  return true;
@@ -3712,6 +3741,53 @@ var TestNavigation = class extends LitElement14 {
3712
3741
  bubbles: true
3713
3742
  }));
3714
3743
  }
3744
+ updated(changedProperties) {
3745
+ super.updated(changedProperties);
3746
+ this.#lockUsedItems();
3747
+ }
3748
+ /** The items this navigation disabled because their attempts are used, so it releases only those. */
3749
+ #lockedItems;
3750
+ /**
3751
+ * Disables every rendered item whose attempts are used, from the computed context, so the
3752
+ * candidate cannot change the answer once the last attempt is ended. Runs after every update:
3753
+ * an item rendered later (another item, a section on screen, a restored state) is locked as it
3754
+ * arrives, and one whose attempts are back to zero (a new state) is released.
3755
+ *
3756
+ * Only `disabled = true` is ever set here, and only on an item that was not disabled already; a
3757
+ * host or view that disables or makes an item read-only itself keeps it so.
3758
+ */
3759
+ #lockUsedItems() {
3760
+ if (!this.#testElement || !this.computedContext)
3761
+ return;
3762
+ const items = new Map(this.computedContext.testParts.flatMap((part) => part.sections.flatMap((section) => (section.submissionMode || part.submissionMode) === "simultaneous" ? [] : section.items.map((item) => [item.identifier, item]))));
3763
+ for (const itemRef of this.#testElement.querySelectorAll("qti-assessment-item-ref")) {
3764
+ const element = itemRef.assessmentItem;
3765
+ if (!element)
3766
+ continue;
3767
+ const used = this.#attemptsUsed(items.get(itemRef.identifier), element);
3768
+ if (used && !element.disabled) {
3769
+ element.disabled = true;
3770
+ this.#lockedItems.add(element);
3771
+ } else if (!used && this.#lockedItems.has(element)) {
3772
+ this.#lockedItems.delete(element);
3773
+ element.disabled = false;
3774
+ }
3775
+ }
3776
+ }
3777
+ /**
3778
+ * The same rule as `test-end-attempt`'s max-attempts guard: a non-adaptive item with a
3779
+ * `max-attempts` above 0 whose attempts reached it. Adaptive items end themselves, and 0 is
3780
+ * unlimited. With `auto-score-items` every change is scored as an attempt, so the count is not
3781
+ * the candidate's and locks nothing.
3782
+ */
3783
+ #attemptsUsed(item, element) {
3784
+ if (!item || this.autoScoreItems)
3785
+ return false;
3786
+ if (item.adaptive || element.adaptive === "true")
3787
+ return false;
3788
+ const maxAttempts = item.maxAttempts ?? 1;
3789
+ return maxAttempts > 0 && (item.numAttempts ?? 0) >= maxAttempts;
3790
+ }
3715
3791
  /**
3716
3792
  * Decide whether an item should be treated as "the candidate is done with it"
3717
3793
  * for the purpose of gating forward navigation and further attempts.
@@ -3822,7 +3898,7 @@ __decorate16([
3822
3898
  ], TestNavigation.prototype, "autoScoreItems", void 0);
3823
3899
 
3824
3900
  // ../qti-test/dist/components/test-next/test-next.js
3825
- import { css as css8, html as html14, LitElement as LitElement15 } from "lit";
3901
+ import { LitElement as LitElement15 } from "lit";
3826
3902
  import { property as property14 } from "lit/decorators.js";
3827
3903
  import { consume as consume9 } from "@lit/context";
3828
3904
  var __decorate17 = function(decorators, target, key, desc) {
@@ -3838,26 +3914,7 @@ var TestNext = class extends LitElement15 {
3838
3914
  }
3839
3915
  }
3840
3916
  static {
3841
- this.styles = css8`
3842
- :host {
3843
- ${btn};
3844
- ${btnPrimary};
3845
- }
3846
- @media (hover: hover) and (pointer: fine) {
3847
- :host(:hover:not([disabled])) {
3848
- ${btnPrimaryInteractive};
3849
- }
3850
- }
3851
- :host(:active:not([disabled])) {
3852
- ${btnPrimaryActive};
3853
- }
3854
- :host(:focus-visible) {
3855
- ${focusRing};
3856
- }
3857
- :host([disabled]) {
3858
- ${dis};
3859
- }
3860
- `;
3917
+ this.styles = [button, buttonPrimary];
3861
3918
  }
3862
3919
  #internals;
3863
3920
  constructor() {
@@ -3901,7 +3958,7 @@ var TestNext = class extends LitElement15 {
3901
3958
  dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
3902
3959
  }
3903
3960
  render() {
3904
- return html14`<slot></slot>`;
3961
+ return control;
3905
3962
  }
3906
3963
  };
3907
3964
  __decorate17([
@@ -3915,7 +3972,7 @@ __decorate17([
3915
3972
  ], TestNext.prototype, "_handleTestElementChange", null);
3916
3973
 
3917
3974
  // ../qti-test/dist/components/test-prev/test-prev.js
3918
- import { css as css9, html as html15, LitElement as LitElement16 } from "lit";
3975
+ import { LitElement as LitElement16 } from "lit";
3919
3976
  import { property as property15 } from "lit/decorators.js";
3920
3977
  import { consume as consume10 } from "@lit/context";
3921
3978
  var __decorate18 = function(decorators, target, key, desc) {
@@ -3931,25 +3988,7 @@ var TestPrev = class extends LitElement16 {
3931
3988
  }
3932
3989
  }
3933
3990
  static {
3934
- this.styles = css9`
3935
- :host {
3936
- ${btn};
3937
- }
3938
- @media (hover: hover) and (pointer: fine) {
3939
- :host(:hover:not([disabled])) {
3940
- ${btnInteractive};
3941
- }
3942
- }
3943
- :host(:active:not([disabled])) {
3944
- ${btnActive};
3945
- }
3946
- :host(:focus-visible) {
3947
- ${focusRing};
3948
- }
3949
- :host([disabled]) {
3950
- ${dis};
3951
- }
3952
- `;
3991
+ this.styles = button;
3953
3992
  }
3954
3993
  constructor() {
3955
3994
  super();
@@ -3980,7 +4019,7 @@ var TestPrev = class extends LitElement16 {
3980
4019
  dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
3981
4020
  }
3982
4021
  render() {
3983
- return html15`<slot></slot>`;
4022
+ return control;
3984
4023
  }
3985
4024
  };
3986
4025
  __decorate18([
@@ -3994,7 +4033,7 @@ __decorate18([
3994
4033
  ], TestPrev.prototype, "_handleTestElementChange", null);
3995
4034
 
3996
4035
  // ../qti-test/dist/components/test-section-link/test-section-link.js
3997
- import { css as css10, html as html16, LitElement as LitElement17 } from "lit";
4036
+ import { LitElement as LitElement17 } from "lit";
3998
4037
  import { property as property16 } from "lit/decorators.js";
3999
4038
  var __decorate19 = function(decorators, target, key, desc) {
4000
4039
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -4004,25 +4043,7 @@ var __decorate19 = function(decorators, target, key, desc) {
4004
4043
  };
4005
4044
  var TestSectionLink = class extends LitElement17 {
4006
4045
  static {
4007
- this.styles = css10`
4008
- :host {
4009
- ${btn};
4010
- }
4011
- @media (hover: hover) and (pointer: fine) {
4012
- :host(:hover:not([disabled])) {
4013
- ${btnInteractive};
4014
- }
4015
- }
4016
- :host(:active:not([disabled])) {
4017
- ${btnActive};
4018
- }
4019
- :host(:focus-visible) {
4020
- ${focusRing};
4021
- }
4022
- :host([disabled]) {
4023
- ${dis};
4024
- }
4025
- `;
4046
+ this.styles = button;
4026
4047
  }
4027
4048
  #requestItem(identifier) {
4028
4049
  dispatchPublic(this, "cito-test-navigate", { type: "section", id: identifier });
@@ -4033,7 +4054,7 @@ var TestSectionLink = class extends LitElement17 {
4033
4054
  this.addEventListener("click", () => this.#requestItem(this.sectionId));
4034
4055
  }
4035
4056
  render() {
4036
- return html16` <slot></slot> `;
4057
+ return control;
4037
4058
  }
4038
4059
  };
4039
4060
  __decorate19([
@@ -4044,7 +4065,7 @@ __decorate19([
4044
4065
  var pluginState = (context, plugin) => context?.plugins?.[plugin];
4045
4066
 
4046
4067
  // ../qti-test/dist/components/test-bookmark/test-bookmark.js
4047
- import { css as css11, html as html17, LitElement as LitElement18 } from "lit";
4068
+ import { css as css6, html as html13, LitElement as LitElement18 } from "lit";
4048
4069
  import { consume as consume11 } from "@lit/context";
4049
4070
  import { property as property17 } from "lit/decorators.js";
4050
4071
  var __decorate20 = function(decorators, target, key, desc) {
@@ -4054,54 +4075,35 @@ var __decorate20 = function(decorators, target, key, desc) {
4054
4075
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4055
4076
  };
4056
4077
  var bookmarkedItems = (context) => pluginState(context, "bookmarks") ?? [];
4057
- var itemRefOf = (element) => {
4078
+ var itemRefOf2 = (element) => {
4058
4079
  const itemRef = element.closest("qti-assessment-item-ref");
4059
4080
  if (itemRef)
4060
4081
  return itemRef.getAttribute("identifier") ?? void 0;
4061
4082
  const root = element.getRootNode();
4062
- return root instanceof ShadowRoot ? itemRefOf(root.host) : void 0;
4083
+ return root instanceof ShadowRoot ? itemRefOf2(root.host) : void 0;
4063
4084
  };
4064
4085
  var TestBookmark = class extends LitElement18 {
4065
4086
  static {
4066
- this.styles = css11`
4067
- :host {
4068
- ${btn};
4069
- }
4070
- @media (hover: hover) and (pointer: fine) {
4071
- :host(:hover:not([disabled])) {
4072
- ${btnInteractive};
4087
+ this.styles = [
4088
+ button,
4089
+ css6`
4090
+ svg {
4091
+ width: 1.1em;
4092
+ height: 1.1em;
4093
+ flex: none;
4094
+ fill: none;
4095
+ stroke: currentColor;
4096
+ stroke-width: 2;
4097
+ stroke-linejoin: round;
4073
4098
  }
4074
- }
4075
- :host(:active:not([disabled])) {
4076
- ${btnActive};
4077
- }
4078
- :host {
4079
- display: inline-flex;
4080
- align-items: center;
4081
- gap: 0.4em;
4082
- }
4083
- svg {
4084
- width: 1.1em;
4085
- height: 1.1em;
4086
- flex: none;
4087
- fill: none;
4088
- stroke: currentColor;
4089
- stroke-width: 2;
4090
- stroke-linejoin: round;
4091
- }
4092
- :host([bookmarked]) {
4093
- color: var(--qti-bookmark-color, #b45309);
4094
- }
4095
- :host([bookmarked]) svg {
4096
- fill: currentColor;
4097
- }
4098
- :host(:focus-visible) {
4099
- ${focusRing};
4100
- }
4101
- :host([disabled]) {
4102
- ${dis};
4103
- }
4104
- `;
4099
+ :host([bookmarked]) {
4100
+ color: var(--qti-bookmark-color, #b45309);
4101
+ }
4102
+ :host([bookmarked]) svg {
4103
+ fill: currentColor;
4104
+ }
4105
+ `
4106
+ ];
4105
4107
  }
4106
4108
  constructor() {
4107
4109
  super();
@@ -4124,7 +4126,7 @@ var TestBookmark = class extends LitElement18 {
4124
4126
  }
4125
4127
  /** The item this button marks: its own, or else the one on screen. */
4126
4128
  get #activeItem() {
4127
- return this.item || (itemRefOf(this) ?? this.computedContext?.testParts?.flatMap((part) => part.sections.flatMap((section) => section.items)).find((item) => item.active)?.identifier);
4129
+ return this.item || (itemRefOf2(this) ?? this.computedContext?.testParts?.flatMap((part) => part.sections.flatMap((section) => section.items)).find((item) => item.active)?.identifier);
4128
4130
  }
4129
4131
  willUpdate() {
4130
4132
  const active = this.#activeItem;
@@ -4147,7 +4149,9 @@ var TestBookmark = class extends LitElement18 {
4147
4149
  });
4148
4150
  }
4149
4151
  render() {
4150
- return html17`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 3h12v18l-6-4.5L6 21z" /></svg><slot></slot>`;
4152
+ return html13`<span class="control" part="button"
4153
+ ><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 3h12v18l-6-4.5L6 21z" /></svg><slot></slot
4154
+ ></span>`;
4151
4155
  }
4152
4156
  };
4153
4157
  __decorate20([
@@ -4165,7 +4169,7 @@ __decorate20([
4165
4169
  ], TestBookmark.prototype, "disabled", void 0);
4166
4170
 
4167
4171
  // ../qti-test/dist/components/test-check-item/test-check-item.js
4168
- import { css as css12, html as html18, LitElement as LitElement19 } from "lit";
4172
+ import { LitElement as LitElement19 } from "lit";
4169
4173
  import { property as property18 } from "lit/decorators.js";
4170
4174
  var __decorate21 = function(decorators, target, key, desc) {
4171
4175
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -4175,25 +4179,7 @@ var __decorate21 = function(decorators, target, key, desc) {
4175
4179
  };
4176
4180
  var TestCheckItem = class extends LitElement19 {
4177
4181
  static {
4178
- this.styles = css12`
4179
- :host {
4180
- ${btn};
4181
- }
4182
- @media (hover: hover) and (pointer: fine) {
4183
- :host(:hover:not([disabled])) {
4184
- ${btnInteractive};
4185
- }
4186
- }
4187
- :host(:active:not([disabled])) {
4188
- ${btnActive};
4189
- }
4190
- :host(:focus-visible) {
4191
- ${focusRing};
4192
- }
4193
- :host([disabled]) {
4194
- ${dis};
4195
- }
4196
- `;
4182
+ this.styles = button;
4197
4183
  }
4198
4184
  constructor() {
4199
4185
  super();
@@ -4204,7 +4190,7 @@ var TestCheckItem = class extends LitElement19 {
4204
4190
  });
4205
4191
  }
4206
4192
  render() {
4207
- return html18` <slot></slot> `;
4193
+ return control;
4208
4194
  }
4209
4195
  };
4210
4196
  __decorate21([
@@ -4212,7 +4198,7 @@ __decorate21([
4212
4198
  ], TestCheckItem.prototype, "view", void 0);
4213
4199
 
4214
4200
  // ../qti-test/dist/components/test-print-context/test-print-context.js
4215
- import { html as html19, LitElement as LitElement20 } from "lit";
4201
+ import { html as html14, LitElement as LitElement20 } from "lit";
4216
4202
  import { consume as consume12 } from "@lit/context";
4217
4203
  import { state as state5 } from "lit/decorators.js";
4218
4204
  var __decorate22 = function(decorators, target, key, desc) {
@@ -4223,7 +4209,7 @@ var __decorate22 = function(decorators, target, key, desc) {
4223
4209
  };
4224
4210
  var TestPrintContext = class extends LitElement20 {
4225
4211
  render() {
4226
- return html19` <small><pre>${JSON.stringify(this.computedContext, null, 2)}</pre></small> `;
4212
+ return html14` <small><pre>${JSON.stringify(this.computedContext, null, 2)}</pre></small> `;
4227
4213
  }
4228
4214
  };
4229
4215
  __decorate22([
@@ -4232,7 +4218,7 @@ __decorate22([
4232
4218
  ], TestPrintContext.prototype, "computedContext", void 0);
4233
4219
 
4234
4220
  // ../qti-test/dist/components/test-print-item-variables/test-print-item-variables.js
4235
- import { html as html20, css as css13, LitElement as LitElement21 } from "lit";
4221
+ import { html as html15, css as css7, LitElement as LitElement21 } from "lit";
4236
4222
  import { consume as consume13 } from "@lit/context";
4237
4223
  var __decorate23 = function(decorators, target, key, desc) {
4238
4224
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -4252,7 +4238,7 @@ var formatVariableValue = (value) => {
4252
4238
  };
4253
4239
  var TestPrintVariables = class extends LitElement21 {
4254
4240
  static {
4255
- this.styles = css13`
4241
+ this.styles = css7`
4256
4242
  table {
4257
4243
  width: 100%;
4258
4244
  border-collapse: collapse;
@@ -4278,10 +4264,10 @@ var TestPrintVariables = class extends LitElement21 {
4278
4264
  render() {
4279
4265
  const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
4280
4266
  if (!activeItem || !activeItem.variables)
4281
- return html20``;
4267
+ return html15``;
4282
4268
  const responseVariables = activeItem.variables.filter((v) => v.type === "response");
4283
4269
  const outcomeVariables = activeItem.variables.filter((v) => v.type === "outcome");
4284
- const renderTable = (variables, title) => html20`
4270
+ const renderTable = (variables, title) => html15`
4285
4271
  <h3>${title}</h3>
4286
4272
  <table>
4287
4273
  <thead>
@@ -4298,7 +4284,7 @@ var TestPrintVariables = class extends LitElement21 {
4298
4284
  const correctResponse = formatVariableValue(v.correctResponse);
4299
4285
  const mapEntries = v.mapping?.mapEntries?.map((m) => `${m.mapKey}=${m.mappedValue}pt`).join(", ") || "";
4300
4286
  const areaMapEntries = v.areaMapping?.areaMapEntries?.map((m) => `${m.shape}(${m.coords})=${m.mappedValue}pt`).join(", ") || "";
4301
- return html20`
4287
+ return html15`
4302
4288
  <tr>
4303
4289
  <td>${v.identifier}</td>
4304
4290
  <td>${formatVariableValue(v.value)}</td>
@@ -4311,7 +4297,7 @@ var TestPrintVariables = class extends LitElement21 {
4311
4297
  </tbody>
4312
4298
  </table>
4313
4299
  `;
4314
- return html20`
4300
+ return html15`
4315
4301
  ${renderTable(responseVariables, "Response Variables")} ${renderTable(outcomeVariables, "Outcome Variables")}
4316
4302
  `;
4317
4303
  }
@@ -4320,17 +4306,91 @@ __decorate23([
4320
4306
  consume13({ context: computedContext, subscribe: true })
4321
4307
  ], TestPrintVariables.prototype, "computedContext", void 0);
4322
4308
 
4309
+ // ../qti-test/dist/components/test-print-state/test-print-state.js
4310
+ import { css as css8, html as html16, LitElement as LitElement22, nothing as nothing3 } from "lit";
4311
+ import { state as state6 } from "lit/decorators.js";
4312
+ var __decorate24 = function(decorators, target, key, desc) {
4313
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4314
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4315
+ 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;
4316
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
4317
+ };
4318
+ var TestPrintState = class extends LitElement22 {
4319
+ #test = null;
4320
+ static {
4321
+ this.styles = css8`
4322
+ :host {
4323
+ display: block;
4324
+ }
4325
+ ul {
4326
+ list-style: none;
4327
+ margin: 0;
4328
+ padding-inline-start: 1rem;
4329
+ }
4330
+ summary {
4331
+ cursor: pointer;
4332
+ }
4333
+ [part~='count'] {
4334
+ opacity: 0.7;
4335
+ }
4336
+ `;
4337
+ }
4338
+ #onStateChanged = (event) => {
4339
+ this.testState = event.detail;
4340
+ };
4341
+ connectedCallback() {
4342
+ super.connectedCallback();
4343
+ this.#test = this.closest("qti-test");
4344
+ this.#test?.addEventListener("cito-test-state-changed", this.#onStateChanged);
4345
+ this.testState = this.#test?.state;
4346
+ }
4347
+ disconnectedCallback() {
4348
+ super.disconnectedCallback();
4349
+ this.#test?.removeEventListener("cito-test-state-changed", this.#onStateChanged);
4350
+ this.#test = null;
4351
+ }
4352
+ render() {
4353
+ if (!this.testState)
4354
+ return nothing3;
4355
+ return html16`<ul>
4356
+ ${this.#renderNode("state", this.testState, 0)}
4357
+ </ul>`;
4358
+ }
4359
+ #renderNode(label, value, depth) {
4360
+ if (value === null || typeof value !== "object") {
4361
+ return html16`<li><span part="key">${label}</span>: <span part="value">${JSON.stringify(value)}</span></li>`;
4362
+ }
4363
+ const entries = Array.isArray(value) ? value.map((entry, index) => [entryLabel(entry, index), entry]) : Object.entries(value);
4364
+ const count = Array.isArray(value) ? `[${entries.length}]` : `{${entries.length}}`;
4365
+ return html16`<li>
4366
+ <details ?open=${depth < 2}>
4367
+ <summary><span part="key">${label}</span> <span part="count">${count}</span></summary>
4368
+ <ul>
4369
+ ${entries.map(([key, entry]) => this.#renderNode(key, entry, depth + 1))}
4370
+ </ul>
4371
+ </details>
4372
+ </li>`;
4373
+ }
4374
+ };
4375
+ __decorate24([
4376
+ state6()
4377
+ ], TestPrintState.prototype, "testState", void 0);
4378
+ var entryLabel = (entry, index) => {
4379
+ const identifier = entry?.identifier;
4380
+ return typeof identifier === "string" ? `${index} \xB7 ${identifier}` : String(index);
4381
+ };
4382
+
4323
4383
  // ../qti-test/dist/components/test-scoring-buttons/test-scoring-buttons.js
4324
- import { html as html21, LitElement as LitElement22, nothing as nothing3 } from "lit";
4384
+ import { html as html17, LitElement as LitElement23, nothing as nothing4 } from "lit";
4325
4385
  import { consume as consume14 } from "@lit/context";
4326
4386
  import { property as property19 } from "lit/decorators.js";
4327
- var __decorate24 = function(decorators, target, key, desc) {
4387
+ var __decorate25 = function(decorators, target, key, desc) {
4328
4388
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4329
4389
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4330
4390
  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;
4331
4391
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4332
4392
  };
4333
- var TestScoringButtons = class extends LitElement22 {
4393
+ var TestScoringButtons = class extends LitElement23 {
4334
4394
  createRenderRoot() {
4335
4395
  return this;
4336
4396
  }
@@ -4356,15 +4416,15 @@ var TestScoringButtons = class extends LitElement22 {
4356
4416
  render() {
4357
4417
  const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
4358
4418
  if (!activeItem || !activeItem.variables)
4359
- return html21``;
4419
+ return html17``;
4360
4420
  const maxScore = activeItem.variables.find((vr) => vr.identifier == "MAXSCORE")?.value;
4361
4421
  const scoreOutcome = activeItem.variables.find((vr) => vr.identifier == "SCORE");
4362
4422
  const score = scoreOutcome?.value;
4363
4423
  const disabled = !(scoreOutcome?.externalScored === "human");
4364
4424
  if (!maxScore || !scoreOutcome)
4365
- return nothing3;
4425
+ return nothing4;
4366
4426
  const scores = [...Array(Number(maxScore) + 1).keys()];
4367
- return html21`${this.myTemplate ? this.myTemplate({ scores, score, disabled }) : nothing3}`;
4427
+ return html17`${this.myTemplate ? this.myTemplate({ scores, score, disabled }) : nothing4}`;
4368
4428
  }
4369
4429
  constructor() {
4370
4430
  super();
@@ -4380,27 +4440,27 @@ var TestScoringButtons = class extends LitElement22 {
4380
4440
  });
4381
4441
  }
4382
4442
  };
4383
- __decorate24([
4443
+ __decorate25([
4384
4444
  property19({ type: String, attribute: "view" })
4385
4445
  ], TestScoringButtons.prototype, "view", void 0);
4386
- __decorate24([
4446
+ __decorate25([
4387
4447
  property19({ type: Boolean })
4388
4448
  ], TestScoringButtons.prototype, "disabled", void 0);
4389
- __decorate24([
4449
+ __decorate25([
4390
4450
  consume14({ context: computedContext, subscribe: true })
4391
4451
  ], TestScoringButtons.prototype, "computedContext", void 0);
4392
4452
 
4393
4453
  // ../qti-test/dist/components/test-scoring-feedback/test-scoring-feedback.js
4394
4454
  import { consume as consume15 } from "@lit/context";
4395
- import { html as html22, LitElement as LitElement23 } from "lit";
4455
+ import { html as html18, LitElement as LitElement24 } from "lit";
4396
4456
  import { property as property20 } from "lit/decorators.js";
4397
- var __decorate25 = function(decorators, target, key, desc) {
4457
+ var __decorate26 = function(decorators, target, key, desc) {
4398
4458
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4399
4459
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4400
4460
  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;
4401
4461
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4402
4462
  };
4403
- var TestScoringFeedback = class extends LitElement23 {
4463
+ var TestScoringFeedback = class extends LitElement24 {
4404
4464
  constructor() {
4405
4465
  super(...arguments);
4406
4466
  this.view = null;
@@ -4408,15 +4468,14 @@ var TestScoringFeedback = class extends LitElement23 {
4408
4468
  render() {
4409
4469
  const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
4410
4470
  if (!activeItem || !activeItem.variables)
4411
- return html22``;
4471
+ return html18``;
4412
4472
  if (activeItem["category"] === "dep-informational")
4413
- return html22`<div>${this.dataset.informational}</div>`;
4414
- const completionStatus = activeItem?.variables.find((v) => v.identifier === "completionStatus")?.value;
4473
+ return html18`<div>${this.dataset.informational}</div>`;
4415
4474
  const scoreOutcome = activeItem?.variables.find((vr) => vr.identifier == "SCORE");
4416
4475
  const score = parseFloat(scoreOutcome?.value);
4417
4476
  const externalScored = activeItem["externalScored"];
4418
4477
  const feedbackText = () => {
4419
- if (completionStatus !== "completed") {
4478
+ if (activeItem.valid === false || activeItem.isDefaultResponse) {
4420
4479
  return this.dataset.textNoResponse;
4421
4480
  }
4422
4481
  if (!externalScored && score !== void 0 && !Number.isNaN(score)) {
@@ -4430,27 +4489,27 @@ var TestScoringFeedback = class extends LitElement23 {
4430
4489
  }
4431
4490
  return this.dataset.inProgress;
4432
4491
  };
4433
- return html22`<div>${feedbackText()}</div>`;
4492
+ return html18`<div>${feedbackText()}</div>`;
4434
4493
  }
4435
4494
  };
4436
- __decorate25([
4495
+ __decorate26([
4437
4496
  consume15({ context: computedContext, subscribe: true })
4438
4497
  ], TestScoringFeedback.prototype, "computedContext", void 0);
4439
- __decorate25([
4498
+ __decorate26([
4440
4499
  property20({ type: String, attribute: "view" })
4441
4500
  ], TestScoringFeedback.prototype, "view", void 0);
4442
4501
 
4443
4502
  // ../qti-test/dist/components/test-stamp/test-stamp.js
4444
- import { html as html23, LitElement as LitElement24, nothing as nothing4 } from "lit";
4445
- import { property as property21, state as state6 } from "lit/decorators.js";
4503
+ import { html as html19, LitElement as LitElement25, nothing as nothing5 } from "lit";
4504
+ import { property as property21, state as state7 } from "lit/decorators.js";
4446
4505
  import { consume as consume16 } from "@lit/context";
4447
- var __decorate26 = function(decorators, target, key, desc) {
4506
+ var __decorate27 = function(decorators, target, key, desc) {
4448
4507
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4449
4508
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4450
4509
  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;
4451
4510
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4452
4511
  };
4453
- var TestStamp = class extends LitElement24 {
4512
+ var TestStamp = class extends LitElement25 {
4454
4513
  constructor() {
4455
4514
  super(...arguments);
4456
4515
  this.debug = false;
@@ -4516,66 +4575,48 @@ var TestStamp = class extends LitElement24 {
4516
4575
  }));
4517
4576
  }
4518
4577
  render() {
4519
- return html23` ${this.debug ? html23`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing4}
4520
- ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing4}`;
4578
+ return html19` ${this.debug ? html19`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing5}
4579
+ ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing5}`;
4521
4580
  }
4522
4581
  };
4523
- __decorate26([
4582
+ __decorate27([
4524
4583
  property21({ type: Boolean, reflect: true })
4525
4584
  ], TestStamp.prototype, "debug", void 0);
4526
- __decorate26([
4527
- state6(),
4585
+ __decorate27([
4586
+ state7(),
4528
4587
  consume16({ context: computedContext, subscribe: true })
4529
4588
  ], TestStamp.prototype, "computedContext", void 0);
4530
- __decorate26([
4531
- state6()
4589
+ __decorate27([
4590
+ state7()
4532
4591
  ], TestStamp.prototype, "stampContext", void 0);
4533
4592
 
4534
4593
  // ../qti-test/dist/components/test-submit/test-submit.js
4535
- import { css as css14, html as html24, LitElement as LitElement25 } from "lit";
4536
- var TestSubmit = class extends LitElement25 {
4594
+ import { LitElement as LitElement26 } from "lit";
4595
+ var TestSubmit = class extends LitElement26 {
4537
4596
  static {
4538
- this.styles = css14`
4539
- :host {
4540
- ${btn};
4541
- }
4542
- @media (hover: hover) and (pointer: fine) {
4543
- :host(:hover:not([disabled])) {
4544
- ${btnInteractive};
4545
- }
4546
- }
4547
- :host(:active:not([disabled])) {
4548
- ${btnActive};
4549
- }
4550
- :host(:focus-visible) {
4551
- ${focusRing};
4552
- }
4553
- :host([disabled]) {
4554
- ${dis};
4555
- }
4556
- `;
4597
+ this.styles = button;
4557
4598
  }
4558
4599
  constructor() {
4559
4600
  super();
4560
4601
  this.addEventListener("click", () => dispatchPublic(this, "cito-test-submit", {}));
4561
4602
  }
4562
4603
  render() {
4563
- return html24` <slot></slot> `;
4604
+ return control;
4564
4605
  }
4565
4606
  };
4566
4607
 
4567
4608
  // ../qti-test/dist/components/test-view-toggle/test-view.js
4568
- import { html as html25, LitElement as LitElement26 } from "lit";
4569
- import { property as property22, state as state7 } from "lit/decorators.js";
4609
+ import { html as html20, LitElement as LitElement27 } from "lit";
4610
+ import { property as property22, state as state8 } from "lit/decorators.js";
4570
4611
  import { consume as consume17 } from "@lit/context";
4571
- var __decorate27 = function(decorators, target, key, desc) {
4612
+ var __decorate28 = function(decorators, target, key, desc) {
4572
4613
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4573
4614
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4574
4615
  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;
4575
4616
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4576
4617
  };
4577
4618
  var _a;
4578
- var TestView = class extends LitElement26 {
4619
+ var TestView = class extends LitElement27 {
4579
4620
  constructor() {
4580
4621
  super(...arguments);
4581
4622
  this.label = "view";
@@ -4603,7 +4644,7 @@ var TestView = class extends LitElement26 {
4603
4644
  dispatchPublic(this, "cito-test-switch-view", view);
4604
4645
  }
4605
4646
  render() {
4606
- return html25`
4647
+ return html20`
4607
4648
  <label part="label" for="viewSelect">${this.label}</label>
4608
4649
  <select
4609
4650
  part="select"
@@ -4613,38 +4654,38 @@ var TestView = class extends LitElement26 {
4613
4654
  this._switchView(el.value);
4614
4655
  }}
4615
4656
  >
4616
- ${this._viewOptions.map((v) => html25`<option value="${v}" ?selected=${v === this.sessionContext.view}>${v}</option>`)}
4657
+ ${this._viewOptions.map((v) => html20`<option value="${v}" ?selected=${v === this.sessionContext.view}>${v}</option>`)}
4617
4658
  </select>
4618
4659
  `;
4619
4660
  }
4620
4661
  };
4621
4662
  _a = TestView;
4622
- __decorate27([
4663
+ __decorate28([
4623
4664
  consume17({ context: sessionContext, subscribe: true })
4624
4665
  ], TestView.prototype, "sessionContext", void 0);
4625
- __decorate27([
4666
+ __decorate28([
4626
4667
  property22({ type: String })
4627
4668
  ], TestView.prototype, "label", void 0);
4628
- __decorate27([
4669
+ __decorate28([
4629
4670
  property22({ type: String, attribute: "view-options" })
4630
4671
  ], TestView.prototype, "viewOptions", void 0);
4631
- __decorate27([
4672
+ __decorate28([
4632
4673
  watch("viewOptions", { waitUntilFirstUpdate: true })
4633
4674
  ], TestView.prototype, "_handleViewOptionsChange", void 0);
4634
- __decorate27([
4635
- state7()
4675
+ __decorate28([
4676
+ state8()
4636
4677
  ], TestView.prototype, "_viewOptions", void 0);
4637
4678
 
4638
4679
  // ../qti-test/dist/components/test-view-toggle/test-view-toggle.js
4639
4680
  import { consume as consume18 } from "@lit/context";
4640
- import { html as html26, LitElement as LitElement27, nothing as nothing5 } from "lit";
4641
- var __decorate28 = function(decorators, target, key, desc) {
4681
+ import { html as html21, LitElement as LitElement28, nothing as nothing6 } from "lit";
4682
+ var __decorate29 = function(decorators, target, key, desc) {
4642
4683
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4643
4684
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4644
4685
  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;
4645
4686
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4646
4687
  };
4647
- var TestViewToggle = class extends LitElement27 {
4688
+ var TestViewToggle = class extends LitElement28 {
4648
4689
  createRenderRoot() {
4649
4690
  return this;
4650
4691
  }
@@ -4670,21 +4711,21 @@ var TestViewToggle = class extends LitElement27 {
4670
4711
  });
4671
4712
  }
4672
4713
  render() {
4673
- return html26`${this.myTemplate ? this.myTemplate({
4714
+ return html21`${this.myTemplate ? this.myTemplate({
4674
4715
  view: this.sessionContext?.view
4675
- }) : nothing5}`;
4716
+ }) : nothing6}`;
4676
4717
  }
4677
4718
  };
4678
- __decorate28([
4719
+ __decorate29([
4679
4720
  consume18({ context: sessionContext, subscribe: true })
4680
4721
  ], TestViewToggle.prototype, "sessionContext", void 0);
4681
4722
 
4682
4723
  // ../qti-test/dist/tts/test-item-to-speech.js
4683
- import { html as html27, LitElement as LitElement28, css as css15 } from "lit";
4724
+ import { html as html22, LitElement as LitElement29, css as css9 } from "lit";
4684
4725
  import { consume as consume19, provide as provide4, createContext as createContext2 } from "@lit/context";
4685
- import { property as property23, state as state8 } from "lit/decorators.js";
4726
+ import { property as property23, state as state9 } from "lit/decorators.js";
4686
4727
  import { ifDefined } from "lit/directives/if-defined.js";
4687
- var __decorate29 = function(decorators, target, key, desc) {
4728
+ var __decorate30 = function(decorators, target, key, desc) {
4688
4729
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4689
4730
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4690
4731
  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;
@@ -4719,14 +4760,14 @@ var ICONS = {
4719
4760
  pick: "M5 3l13 7-5.5 1.6 3.4 6.6-2.4 1.3-3.4-6.7L6 17z"
4720
4761
  };
4721
4762
  var iconContent = (icon, label) => {
4722
- const svg = html27`<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
4763
+ const svg = html22`<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
4723
4764
  <path d="${ICONS[icon]}"></path>
4724
4765
  </svg>`;
4725
- return html27`${svg}<span class="label">${label}</span>`;
4766
+ return html22`${svg}<span class="label">${label}</span>`;
4726
4767
  };
4727
- var TtsButtonBase = class extends LitElement28 {
4768
+ var TtsButtonBase = class extends LitElement29 {
4728
4769
  static {
4729
- this.styles = css15`
4770
+ this.styles = css9`
4730
4771
  :host {
4731
4772
  display: inline-flex;
4732
4773
  }
@@ -4782,28 +4823,28 @@ var TtsButtonBase = class extends LitElement28 {
4782
4823
  #mirroredState;
4783
4824
  #mirroredPicking = false;
4784
4825
  updated(_changed) {
4785
- const state9 = this._tts?.state;
4826
+ const state10 = this._tts?.state;
4786
4827
  const picking = this._tts?.picking ?? false;
4787
- if (state9 === this.#mirroredState && picking === this.#mirroredPicking)
4828
+ if (state10 === this.#mirroredState && picking === this.#mirroredPicking)
4788
4829
  return;
4789
- this.#mirroredState = state9;
4830
+ this.#mirroredState = state10;
4790
4831
  this.#mirroredPicking = picking;
4791
4832
  this.#internals.states.clear();
4792
- if (state9)
4793
- this.#internals.states.add(state9);
4833
+ if (state10)
4834
+ this.#internals.states.add(state10);
4794
4835
  if (picking)
4795
4836
  this.#internals.states.add("picking");
4796
4837
  }
4797
4838
  };
4798
- __decorate29([
4839
+ __decorate30([
4799
4840
  property23({ type: String })
4800
4841
  ], TtsButtonBase.prototype, "label", void 0);
4801
- __decorate29([
4842
+ __decorate30([
4802
4843
  consume19({ context: ttsContext, subscribe: true })
4803
4844
  ], TtsButtonBase.prototype, "_tts", void 0);
4804
- var TestItemToSpeech = class extends LitElement28 {
4845
+ var TestItemToSpeech = class extends LitElement29 {
4805
4846
  static {
4806
- this.styles = css15`
4847
+ this.styles = css9`
4807
4848
  :host {
4808
4849
  display: inline-flex;
4809
4850
  flex-wrap: wrap;
@@ -4961,7 +5002,7 @@ var TestItemToSpeech = class extends LitElement28 {
4961
5002
  this.#contentMode = false;
4962
5003
  }
4963
5004
  render() {
4964
- return html27`<slot></slot>`;
5005
+ return html22`<slot></slot>`;
4965
5006
  }
4966
5007
  /** Item-ref mode: our item rendered again, so the elements collected earlier are detached. */
4967
5008
  #handleItemConnected() {
@@ -5036,12 +5077,12 @@ var TestItemToSpeech = class extends LitElement28 {
5036
5077
  return item ? this._computedContext?.itemElement?.(item) ?? null : null;
5037
5078
  }
5038
5079
  /** Update speech state on both the context (notifies children) and the host's CSS custom states. */
5039
- #setSpeechState(state9) {
5040
- this._ttsContext = { ...this._ttsContext, state: state9 };
5080
+ #setSpeechState(state10) {
5081
+ this._ttsContext = { ...this._ttsContext, state: state10 };
5041
5082
  this.#internals.states.delete("idle");
5042
5083
  this.#internals.states.delete("playing");
5043
5084
  this.#internals.states.delete("paused");
5044
- this.#internals.states.add(state9);
5085
+ this.#internals.states.add(state10);
5045
5086
  }
5046
5087
  /** Push currentElementIndex and elementCount into context so children can react. */
5047
5088
  #updateContext() {
@@ -5370,14 +5411,14 @@ var TestItemToSpeech = class extends LitElement28 {
5370
5411
  }
5371
5412
  }
5372
5413
  };
5373
- __decorate29([
5414
+ __decorate30([
5374
5415
  property23({ type: String })
5375
5416
  ], TestItemToSpeech.prototype, "language", void 0);
5376
- __decorate29([
5417
+ __decorate30([
5377
5418
  consume19({ context: computedContext, subscribe: true })
5378
5419
  ], TestItemToSpeech.prototype, "_computedContext", void 0);
5379
- __decorate29([
5380
- state8(),
5420
+ __decorate30([
5421
+ state9(),
5381
5422
  provide4({ context: ttsContext })
5382
5423
  ], TestItemToSpeech.prototype, "_ttsContext", void 0);
5383
5424
  var TestTtsPlay = class extends TtsButtonBase {
@@ -5393,19 +5434,19 @@ var TestTtsPlay = class extends TtsButtonBase {
5393
5434
  }
5394
5435
  render() {
5395
5436
  const playing = this._tts?.state === "playing";
5396
- return html27`
5437
+ return html22`
5397
5438
  <button part="button" aria-label=${ifDefined(playing ? this.pauseLabel : this.label)} @click=${this.#toggle}>
5398
- ${playing ? html27`<slot name="pause">${iconContent("pause", this.pauseLabel ?? "Pause")}</slot>` : html27`<slot name="play">${iconContent("play", this.label ?? "Play")}</slot>`}
5439
+ ${playing ? html22`<slot name="pause">${iconContent("pause", this.pauseLabel ?? "Pause")}</slot>` : html22`<slot name="play">${iconContent("play", this.label ?? "Play")}</slot>`}
5399
5440
  </button>
5400
5441
  `;
5401
5442
  }
5402
5443
  };
5403
- __decorate29([
5444
+ __decorate30([
5404
5445
  property23({ type: String, attribute: "pause-label" })
5405
5446
  ], TestTtsPlay.prototype, "pauseLabel", void 0);
5406
5447
  var TestTtsPause = class extends TtsButtonBase {
5407
5448
  render() {
5408
- return html27`
5449
+ return html22`
5409
5450
  <button
5410
5451
  part="button"
5411
5452
  aria-label=${ifDefined(this.label)}
@@ -5419,7 +5460,7 @@ var TestTtsPause = class extends TtsButtonBase {
5419
5460
  };
5420
5461
  var TestTtsResume = class extends TtsButtonBase {
5421
5462
  render() {
5422
- return html27`
5463
+ return html22`
5423
5464
  <button
5424
5465
  part="button"
5425
5466
  aria-label=${ifDefined(this.label)}
@@ -5434,7 +5475,7 @@ var TestTtsResume = class extends TtsButtonBase {
5434
5475
  var TestTtsStop = class extends TtsButtonBase {
5435
5476
  render() {
5436
5477
  const idle = this._tts?.state === "idle" && !this._tts?.picking;
5437
- return html27`
5478
+ return html22`
5438
5479
  <button part="button" aria-label=${ifDefined(this.label)} ?disabled=${idle} @click=${() => this._tts?.stop()}>
5439
5480
  <slot>${iconContent("stop", this.label ?? "Stop")}</slot>
5440
5481
  </button>
@@ -5445,7 +5486,7 @@ var TestTtsPrev = class extends TtsButtonBase {
5445
5486
  render() {
5446
5487
  const collected = (this._tts?.elementCount ?? 0) > 0;
5447
5488
  const atStart = (this._tts?.currentElementIndex ?? 0) === 0;
5448
- return html27`
5489
+ return html22`
5449
5490
  <button
5450
5491
  part="button"
5451
5492
  aria-label=${ifDefined(this.label)}
@@ -5461,7 +5502,7 @@ var TestTtsNext = class extends TtsButtonBase {
5461
5502
  render() {
5462
5503
  const count = this._tts?.elementCount ?? 0;
5463
5504
  const atEnd = count > 0 && (this._tts?.currentElementIndex ?? 0) >= count - 1;
5464
- return html27`
5505
+ return html22`
5465
5506
  <button
5466
5507
  part="button"
5467
5508
  aria-label=${ifDefined(this.label)}
@@ -5475,7 +5516,7 @@ var TestTtsNext = class extends TtsButtonBase {
5475
5516
  };
5476
5517
  var TestTtsPick = class extends TtsButtonBase {
5477
5518
  render() {
5478
- return html27`
5519
+ return html22`
5479
5520
  <button
5480
5521
  part="button"
5481
5522
  aria-label=${ifDefined(this.label)}
@@ -5506,6 +5547,7 @@ var pluginElements = [
5506
5547
  { tag: "test-bookmark", ctor: TestBookmark },
5507
5548
  { tag: "test-print-context", ctor: TestPrintContext },
5508
5549
  { tag: "test-print-item-variables", ctor: TestPrintVariables },
5550
+ { tag: "test-print-state", ctor: TestPrintState },
5509
5551
  { tag: "test-scoring-buttons", ctor: TestScoringButtons },
5510
5552
  { tag: "test-scoring-feedback", ctor: TestScoringFeedback },
5511
5553
  { tag: "test-stamp", ctor: TestStamp },
@@ -5570,6 +5612,7 @@ export {
5570
5612
  TestCheckItem,
5571
5613
  TestPrintContext,
5572
5614
  TestPrintVariables,
5615
+ TestPrintState,
5573
5616
  TestScoringButtons,
5574
5617
  TestScoringFeedback,
5575
5618
  TestStamp,
@@ -5600,4 +5643,4 @@ export {
5600
5643
  * Portions Copyright (c) 2013, the Dart project authors.
5601
5644
  *)
5602
5645
  */
5603
- //# sourceMappingURL=chunk-5K5JO7OG.js.map
5646
+ //# sourceMappingURL=chunk-6XRNX574.js.map