@citolab/qti-components 8.0.0 → 8.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +591 -217
  3. package/dist/base.d.ts +135 -9
  4. package/dist/{chunk-MJVPNN7W.js → chunk-3AJOQCDU.js} +2 -2
  5. package/dist/chunk-7HC5SMCU.js +102 -0
  6. package/dist/chunk-7HC5SMCU.js.map +1 -0
  7. package/dist/{chunk-MGF5F3S2.js → chunk-CAO4JRLY.js} +2 -2
  8. package/dist/{chunk-5SJS36BI.js → chunk-F4BNJWYN.js} +1 -1
  9. package/dist/{chunk-5SJS36BI.js.map → chunk-F4BNJWYN.js.map} +1 -1
  10. package/dist/{chunk-5QYII4OZ.js → chunk-LVBIQDPM.js} +2 -2
  11. package/dist/{chunk-W4QZPCNC.js → chunk-QECOPVPO.js} +2 -2
  12. package/dist/{chunk-LZJHHZQ2.js → chunk-RXGDQDOV.js} +177 -173
  13. package/dist/chunk-RXGDQDOV.js.map +1 -0
  14. package/dist/{chunk-KYEZRYO6.js → chunk-XU7HNT4F.js} +4 -4
  15. package/dist/computed-item.types.d-BKZdSLLJ.d.ts +19 -0
  16. package/dist/computed.types.d-rKLSPvVG.d.ts +42 -0
  17. package/dist/config.context.d-BvU9r-Mg.d.ts +91 -0
  18. package/dist/corrections.d.ts +432 -1
  19. package/dist/corrections.js +5 -5
  20. package/dist/elements.d.ts +393 -1
  21. package/dist/index.d.ts +58 -9
  22. package/dist/index.js +16 -8
  23. package/dist/interaction.d-D4MstYRz.d.ts +115 -0
  24. package/dist/interaction.interface.d-CvjHM2bi.d.ts +46 -0
  25. package/dist/interactions.d.ts +1569 -1
  26. package/dist/interactions.js +2 -2
  27. package/dist/item.css +588 -214
  28. package/dist/item.d.ts +92 -1
  29. package/dist/item.js +3 -3
  30. package/dist/item.types.d-QU7LljEK.d.ts +82 -0
  31. package/dist/loader.d.ts +22 -1
  32. package/dist/processing.d.ts +730 -1
  33. package/dist/qti-components-jsx.d.ts +221 -231
  34. package/dist/qti-components-jsx.js +1 -0
  35. package/dist/qti-condition-expression.d-aMvBvpc6.d.ts +8 -0
  36. package/dist/qti-expression.d-BietT_8b.d.ts +31 -0
  37. package/dist/qti-feedback.d-DZbad0RN.d.ts +21 -0
  38. package/dist/qti-rule-base.d-ajOnfGXY.d.ts +16 -0
  39. package/dist/qti-transform-test.d-BL7GGFJj.d.ts +70 -0
  40. package/dist/qti.context.d-CejJMlfZ.d.ts +50 -0
  41. package/dist/response.d-_8y4kjGP.d.ts +106 -0
  42. package/dist/test.d.ts +699 -1
  43. package/dist/test.js +11 -3
  44. package/dist/transformers.d.ts +18 -1
  45. package/package.json +11 -8
  46. package/dist/chunk-LZJHHZQ2.js.map +0 -1
  47. package/dist/chunk-WCQ26LV7.js +0 -102
  48. package/dist/chunk-WCQ26LV7.js.map +0 -1
  49. /package/dist/{chunk-MJVPNN7W.js.map → chunk-3AJOQCDU.js.map} +0 -0
  50. /package/dist/{chunk-MGF5F3S2.js.map → chunk-CAO4JRLY.js.map} +0 -0
  51. /package/dist/{chunk-5QYII4OZ.js.map → chunk-LVBIQDPM.js.map} +0 -0
  52. /package/dist/{chunk-W4QZPCNC.js.map → chunk-QECOPVPO.js.map} +0 -0
  53. /package/dist/{chunk-KYEZRYO6.js.map → chunk-XU7HNT4F.js.map} +0 -0
package/cdn/index.js CHANGED
@@ -234,10 +234,23 @@ Make sure to test your application with a production build as repeat registratio
234
234
  :host([disabled]) {
235
235
  ${fe};
236
236
  }
237
- `}constructor(){super(),this.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("test-end-attempt",{bubbles:!0}));let t=this.closest("qti-test").querySelector("test-container");Array.from(t.shadowRoot.querySelectorAll("[view]")).forEach(i=>{i.classList.toggle("show",!0)})})}render(){return b` <slot></slot> `}};var Mo=class{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}},Do=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(e=>this.Z=e)}resume(){this.Z?.(),this.Y=this.Z=void 0}};var kc=n=>!Wl(n)&&typeof n.then=="function",Sc=1073741823,ma=class extends pt{constructor(){super(...arguments),this._$Cwt=Sc,this._$Cbt=[],this._$CK=new Mo(this),this._$CX=new Do}render(...e){return e.find(t=>!kc(t))??Z}update(e,t){let r=this._$Cbt,i=r.length;this._$Cbt=t;let o=this._$CK,s=this._$CX;this.isConnected||this.disconnected();for(let a=0;a<t.length&&!(a>this._$Cwt);a++){let l=t[a];if(!kc(l))return this._$Cwt=a,l;a<i&&l===r[a]||(this._$Cwt=Sc,i=0,Promise.resolve(l).then(async c=>{for(;s.get();)await s.get();let d=o.deref();if(d!==void 0){let h=d._$Cbt.indexOf(l);h>-1&&h<d._$Cwt&&(d._$Cwt=h,d.setValue(c))}}))}return Z}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}},No=qe(ma);var $o=`@layer qti-base, qti-components, qti-utilities, qti-variants, qti-extended;
237
+ `}constructor(){super(),this.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("test-end-attempt",{bubbles:!0}));let t=this.closest("qti-test").querySelector("test-container");Array.from(t.shadowRoot.querySelectorAll("[view]")).forEach(i=>{i.classList.toggle("show",!0)})})}render(){return b` <slot></slot> `}};var Mo=class{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}},Do=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(e=>this.Z=e)}resume(){this.Z?.(),this.Y=this.Z=void 0}};var kc=n=>!Wl(n)&&typeof n.then=="function",Sc=1073741823,ma=class extends pt{constructor(){super(...arguments),this._$Cwt=Sc,this._$Cbt=[],this._$CK=new Mo(this),this._$CX=new Do}render(...e){return e.find(t=>!kc(t))??Z}update(e,t){let r=this._$Cbt,i=r.length;this._$Cbt=t;let o=this._$CK,s=this._$CX;this.isConnected||this.disconnected();for(let a=0;a<t.length&&!(a>this._$Cwt);a++){let l=t[a];if(!kc(l))return this._$Cwt=a,l;a<i&&l===r[a]||(this._$Cwt=Sc,i=0,Promise.resolve(l).then(async c=>{for(;s.get();)await s.get();let d=o.deref();if(d!==void 0){let h=d._$Cbt.indexOf(l);h>-1&&h<d._$Cwt&&(d._$Cwt=h,d.setValue(c))}}))}return Z}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}},No=qe(ma);var $o=`
238
+ @layer qti-base, qti-components, qti-extended;
238
239
  @layer qti-components.reset, qti-components.global, qti-components.interactions.base,
239
- qti-components.interactions.brand, qti-components.interactions.states,
240
- qti-components.interactions.corrections, qti-components.elements, qti-components.overrides;
240
+ qti-components.interactions.brand, qti-components.interactions.states,
241
+ qti-components.interactions.corrections, qti-components.elements, qti-components.overrides;
242
+ /*
243
+ * Layer order, weakest first.
244
+ *
245
+ * qti-base the QTI 3.0 shared class vocabulary and its layout overrides
246
+ * qti-components everything this theme paints (sublayers declared in styles/qti-theme/index.css)
247
+ * qti-extended reserved for the consumer \u2014 empty here, and it beats everything above
248
+ *
249
+ * Every stylesheet below is assigned a layer, at its import wherever the file belongs to just one.
250
+ * Nothing is left unlayered: unlayered CSS outranks every layer, so a single stray rule here would
251
+ * sit above the whole theme AND above the \`qti-extended\` slot consumers are told to author in.
252
+ */
253
+ @layer qti-base{
241
254
  /* https://www.imsglobal.org/sites/default/files/spec/qti/v3/guide/img/qti3p0.css */
242
255
  /* ============================
243
256
  QTI 3 shared css
@@ -254,51 +267,66 @@ Make sure to test your application with a production build as repeat registratio
254
267
  11. Layout
255
268
  12. Other QTI 3 presentation utilities
256
269
  ============================ */
270
+
257
271
  /* ==========
258
272
  Display css
259
273
  =========== */
274
+
260
275
  .qti-display-inline {
261
276
  display: inline;
262
277
  }
278
+
263
279
  .qti-display-inline-block {
264
280
  display: inline-block;
265
281
  }
282
+
266
283
  .qti-display-block {
267
284
  display: block;
268
285
  }
286
+
269
287
  .qti-display-flex {
270
288
  display: flex;
271
289
  }
290
+
272
291
  .qti-display-inline-flex {
273
292
  display: inline-flex;
274
293
  }
294
+
275
295
  .qti-display-grid {
276
296
  display: grid;
277
297
  }
298
+
278
299
  .qti-display-inline-grid {
279
300
  display: inline-grid;
280
301
  }
302
+
281
303
  .qti-display-table {
282
304
  display: table;
283
305
  }
306
+
284
307
  .qti-display-table-cell {
285
308
  display: table-cell;
286
309
  }
310
+
287
311
  .qti-display-table-row {
288
312
  display: table-row;
289
313
  }
314
+
290
315
  .qti-display-list-item {
291
316
  display: list-item;
292
317
  }
318
+
293
319
  .qti-display-inherit {
294
320
  display: inherit;
295
321
  }
322
+
296
323
  /*
297
324
  * hidden to screen readers and sighted
298
325
  */
299
326
  .qti-hidden {
300
327
  display: none;
301
328
  }
329
+
302
330
  /*
303
331
  * visible to screen readers, hidden to sighted
304
332
  */
@@ -311,48 +339,62 @@ Make sure to test your application with a production build as repeat registratio
311
339
  border: 0;
312
340
  margin: -1px;
313
341
  }
342
+
314
343
  /* =============================
315
344
  Special flex styles
316
345
  ============================= */
346
+
317
347
  .qti-flex-direction-column {
318
348
  flex-direction: column;
319
349
  }
350
+
320
351
  .qti-flex-direction-row {
321
352
  flex-direction: row;
322
353
  }
354
+
323
355
  .qti-flex-grow-1 {
324
356
  flex-grow: 1;
325
357
  }
358
+
326
359
  .qti-flex-grow-0 {
327
360
  flex-grow: 0;
328
361
  }
362
+
329
363
  /* =========
330
364
  Margin css
331
365
  ========== */
366
+
332
367
  /**
333
368
  * For margin Top and Bottom and Left and Right
334
369
  */
335
370
  .qti-margin-0 {
336
371
  margin: 0 !important;
337
372
  }
373
+
338
374
  .qti-margin-1 {
339
375
  margin: 0.25rem !important;
340
376
  }
377
+
341
378
  .qti-margin-2 {
342
379
  margin: 0.5rem !important;
343
380
  }
381
+
344
382
  .qti-margin-3 {
345
383
  margin: 1rem !important;
346
384
  }
385
+
347
386
  .qti-margin-4 {
348
387
  margin: 1.5rem !important;
349
388
  }
389
+
350
390
  .qti-margin-5 {
351
391
  margin: 3rem !important;
352
392
  }
393
+
353
394
  .qti-margin-auto {
354
395
  margin: auto !important;
355
396
  }
397
+
356
398
  /*
357
399
  For margin Left and Right
358
400
  */
@@ -360,30 +402,37 @@ Make sure to test your application with a production build as repeat registratio
360
402
  margin-right: 0 !important;
361
403
  margin-left: 0 !important;
362
404
  }
405
+
363
406
  .qti-margin-x-1 {
364
407
  margin-right: 0.25rem !important;
365
408
  margin-left: 0.25rem !important;
366
409
  }
410
+
367
411
  .qti-margin-x-2 {
368
412
  margin-right: 0.5rem !important;
369
413
  margin-left: 0.5rem !important;
370
414
  }
415
+
371
416
  .qti-margin-x-3 {
372
417
  margin-right: 1rem !important;
373
418
  margin-left: 1rem !important;
374
419
  }
420
+
375
421
  .qti-margin-x-4 {
376
422
  margin-right: 1.5rem !important;
377
423
  margin-left: 1.5rem !important;
378
424
  }
425
+
379
426
  .qti-margin-x-5 {
380
427
  margin-right: 3rem !important;
381
428
  margin-left: 3rem !important;
382
429
  }
430
+
383
431
  .qti-margin-x-auto {
384
432
  margin-right: auto !important;
385
433
  margin-left: auto !important;
386
434
  }
435
+
387
436
  /*
388
437
  For margin Top and Bottom
389
438
  */
@@ -391,150 +440,192 @@ Make sure to test your application with a production build as repeat registratio
391
440
  margin-top: 0 !important;
392
441
  margin-bottom: 0 !important;
393
442
  }
443
+
394
444
  .qti-margin-y-1 {
395
445
  margin-top: 0.25rem !important;
396
446
  margin-bottom: 0.25rem !important;
397
447
  }
448
+
398
449
  .qti-margin-y-2 {
399
450
  margin-top: 0.5rem !important;
400
451
  margin-bottom: 0.5rem !important;
401
452
  }
453
+
402
454
  .qti-margin-y-3 {
403
455
  margin-top: 1rem !important;
404
456
  margin-bottom: 1rem !important;
405
457
  }
458
+
406
459
  .qti-margin-y-4 {
407
460
  margin-top: 1.5rem !important;
408
461
  margin-bottom: 1.5rem !important;
409
462
  }
463
+
410
464
  .qti-margin-y-5 {
411
465
  margin-top: 3rem !important;
412
466
  margin-bottom: 3rem !important;
413
467
  }
468
+
414
469
  .qti-margin-y-auto {
415
470
  margin-top: auto !important;
416
471
  margin-bottom: auto !important;
417
472
  }
473
+
418
474
  /*
419
475
  For margin Top
420
476
  */
421
477
  .qti-margin-t-0 {
422
478
  margin-top: 0 !important;
423
479
  }
480
+
424
481
  .qti-margin-t-1 {
425
482
  margin-top: 0.25rem !important;
426
483
  }
484
+
427
485
  .qti-margin-t-2 {
428
486
  margin-top: 0.5rem !important;
429
487
  }
488
+
430
489
  .qti-margin-t-3 {
431
490
  margin-top: 1rem !important;
432
491
  }
492
+
433
493
  .qti-margin-t-4 {
434
494
  margin-top: 1.5rem !important;
435
495
  }
496
+
436
497
  .qti-margin-t-5 {
437
498
  margin-top: 3rem !important;
438
499
  }
500
+
439
501
  .qti-margin-t-auto {
440
502
  margin-top: auto !important;
441
503
  }
504
+
442
505
  /*
443
506
  For margin Bottom
444
507
  */
445
508
  .qti-margin-b-0 {
446
509
  margin-bottom: 0 !important;
447
510
  }
511
+
448
512
  .qti-margin-b-1 {
449
513
  margin-bottom: 0.25rem !important;
450
514
  }
515
+
451
516
  .qti-margin-b-2 {
452
517
  margin-bottom: 0.5rem !important;
453
518
  }
519
+
454
520
  .qti-margin-b-3 {
455
521
  margin-bottom: 1rem !important;
456
522
  }
523
+
457
524
  .qti-margin-b-4 {
458
525
  margin-bottom: 1.5rem !important;
459
526
  }
527
+
460
528
  .qti-margin-b-5 {
461
529
  margin-bottom: 3rem !important;
462
530
  }
531
+
463
532
  .qti-margin-b-auto {
464
533
  margin-bottom: auto !important;
465
534
  }
535
+
466
536
  /*
467
537
  For margin Start LTR
468
538
  */
469
539
  .qti-margin-s-0 {
470
540
  margin-left: 0 !important;
471
541
  }
542
+
472
543
  .qti-margin-s-1 {
473
544
  margin-left: 0.25rem !important;
474
545
  }
546
+
475
547
  .qti-margin-s-2 {
476
548
  margin-left: 0.5rem !important;
477
549
  }
550
+
478
551
  .qti-margin-s-3 {
479
552
  margin-left: 1rem !important;
480
553
  }
554
+
481
555
  .qti-margin-s-4 {
482
556
  margin-left: 1.5rem !important;
483
557
  }
558
+
484
559
  .qti-margin-s-5 {
485
560
  margin-left: 3rem !important;
486
561
  }
562
+
487
563
  .qti-margin-s-auto {
488
564
  margin-left: auto !important;
489
565
  }
566
+
490
567
  /*
491
568
  For margin End LTR
492
569
  */
493
570
  .qti-margin-e-0 {
494
571
  margin-right: 0 !important;
495
572
  }
573
+
496
574
  .qti-margin-e-1 {
497
575
  margin-right: 0.25rem !important;
498
576
  }
577
+
499
578
  .qti-margin-e-2 {
500
579
  margin-right: 0.5rem !important;
501
580
  }
581
+
502
582
  .qti-margin-e-3 {
503
583
  margin-right: 1rem !important;
504
584
  }
585
+
505
586
  .qti-margin-e-4 {
506
587
  margin-right: 1.5rem !important;
507
588
  }
589
+
508
590
  .qti-margin-e-5 {
509
591
  margin-right: 3rem !important;
510
592
  }
593
+
511
594
  .qti-margin-e-auto {
512
595
  margin-right: auto !important;
513
596
  }
597
+
514
598
  /* =========
515
599
  Padding css
516
600
  ========== */
601
+
517
602
  /*
518
603
  For padding Top and Bottom and Left and Right
519
604
  */
520
605
  .qti-padding-0 {
521
606
  padding: 0 !important;
522
607
  }
608
+
523
609
  .qti-padding-1 {
524
610
  padding: 0.25rem !important;
525
611
  }
612
+
526
613
  .qti-padding-2 {
527
614
  padding: 0.5rem !important;
528
615
  }
616
+
529
617
  .qti-padding-3 {
530
618
  padding: 1rem !important;
531
619
  }
620
+
532
621
  .qti-padding-4 {
533
622
  padding: 1.5rem !important;
534
623
  }
624
+
535
625
  .qti-padding-5 {
536
626
  padding: 3rem !important;
537
627
  }
628
+
538
629
  /*
539
630
  For padding Left and Right
540
631
  */
@@ -542,26 +633,32 @@ Make sure to test your application with a production build as repeat registratio
542
633
  padding-right: 0 !important;
543
634
  padding-left: 0 !important;
544
635
  }
636
+
545
637
  .qti-padding-x-1 {
546
638
  padding-right: 0.25rem !important;
547
639
  padding-left: 0.25rem !important;
548
640
  }
641
+
549
642
  .qti-padding-x-2 {
550
643
  padding-right: 0.5rem !important;
551
644
  padding-left: 0.5rem !important;
552
645
  }
646
+
553
647
  .qti-padding-x-3 {
554
648
  padding-right: 1rem !important;
555
649
  padding-left: 1rem !important;
556
650
  }
651
+
557
652
  .qti-padding-x-4 {
558
653
  padding-right: 1.5rem !important;
559
654
  padding-left: 1.5rem !important;
560
655
  }
656
+
561
657
  .qti-padding-x-5 {
562
658
  padding-right: 3rem !important;
563
659
  padding-left: 3rem !important;
564
660
  }
661
+
565
662
  /*
566
663
  For padding Top and Bottom
567
664
  */
@@ -569,727 +666,962 @@ Make sure to test your application with a production build as repeat registratio
569
666
  padding-top: 0 !important;
570
667
  padding-bottom: 0 !important;
571
668
  }
669
+
572
670
  .qti-padding-y-1 {
573
671
  padding-top: 0.25rem !important;
574
672
  padding-bottom: 0.25rem !important;
575
673
  }
674
+
576
675
  .qti-padding-y-2 {
577
676
  padding-top: 0.5rem !important;
578
677
  padding-bottom: 0.5rem !important;
579
678
  }
679
+
580
680
  .qti-padding-y-3 {
581
681
  padding-top: 1rem !important;
582
682
  padding-bottom: 1rem !important;
583
683
  }
684
+
584
685
  .qti-padding-y-4 {
585
686
  padding-top: 1.5rem !important;
586
687
  padding-bottom: 1.5rem !important;
587
688
  }
689
+
588
690
  .qti-padding-y-5 {
589
691
  padding-top: 3rem !important;
590
692
  padding-bottom: 3rem !important;
591
693
  }
694
+
592
695
  /*
593
696
  For padding Top
594
697
  */
595
698
  .qti-padding-t-0 {
596
699
  padding-top: 0 !important;
597
700
  }
701
+
598
702
  .qti-padding-t-1 {
599
703
  padding-top: 0.25rem !important;
600
704
  }
705
+
601
706
  .qti-padding-t-2 {
602
707
  padding-top: 0.5rem !important;
603
708
  }
709
+
604
710
  .qti-padding-t-3 {
605
711
  padding-top: 1rem !important;
606
712
  }
713
+
607
714
  .qti-padding-t-4 {
608
715
  padding-top: 1.5rem !important;
609
716
  }
717
+
610
718
  .qti-padding-t-5 {
611
719
  padding-top: 3rem !important;
612
720
  }
721
+
613
722
  /*
614
723
  For padding Bottom
615
724
  */
616
725
  .qti-padding-b-0 {
617
726
  padding-bottom: 0 !important;
618
727
  }
728
+
619
729
  .qti-padding-b-1 {
620
730
  padding-bottom: 0.25rem !important;
621
731
  }
732
+
622
733
  .qti-padding-b-2 {
623
734
  padding-bottom: 0.5rem !important;
624
735
  }
736
+
625
737
  .qti-padding-b-3 {
626
738
  padding-bottom: 1rem !important;
627
739
  }
740
+
628
741
  .qti-padding-b-4 {
629
742
  padding-bottom: 1.5rem !important;
630
743
  }
744
+
631
745
  .qti-padding-b-5 {
632
746
  padding-bottom: 3rem !important;
633
747
  }
748
+
634
749
  /*
635
750
  For padding Start LTR
636
751
  */
637
752
  .qti-padding-s-0 {
638
753
  padding-left: 0 !important;
639
754
  }
755
+
640
756
  .qti-padding-s-1 {
641
757
  padding-left: 0.25rem !important;
642
758
  }
759
+
643
760
  .qti-padding-s-2 {
644
761
  padding-left: 0.5rem !important;
645
762
  }
763
+
646
764
  .qti-padding-s-3 {
647
765
  padding-left: 1rem !important;
648
766
  }
767
+
649
768
  .qti-padding-s-4 {
650
769
  padding-left: 1.5rem !important;
651
770
  }
771
+
652
772
  .qti-padding-s-5 {
653
773
  padding-left: 3rem !important;
654
774
  }
775
+
655
776
  /*
656
777
  For padding End LTR
657
778
  */
658
779
  .qti-padding-e-0 {
659
780
  padding-right: 0 !important;
660
781
  }
782
+
661
783
  .qti-padding-e-1 {
662
784
  padding-right: 0.25rem !important;
663
785
  }
786
+
664
787
  .qti-padding-e-2 {
665
788
  padding-right: 0.5rem !important;
666
789
  }
790
+
667
791
  .qti-padding-e-3 {
668
792
  padding-right: 1rem !important;
669
793
  }
794
+
670
795
  .qti-padding-e-4 {
671
796
  padding-right: 1.5rem !important;
672
797
  }
798
+
673
799
  .qti-padding-e-5 {
674
800
  padding-right: 3rem !important;
675
801
  }
802
+
676
803
  /* ====================
677
804
  Horizontal alignment
678
805
  ==================== */
806
+
679
807
  .qti-align-left {
680
808
  text-align: left;
681
809
  }
810
+
682
811
  .qti-align-center {
683
812
  text-align: center;
684
813
  }
814
+
685
815
  .qti-align-right {
686
816
  text-align: right;
687
817
  }
818
+
688
819
  /* ==================
689
820
  Vertical alignment
690
821
  ================== */
822
+
691
823
  .qti-valign-top {
692
824
  vertical-align: top;
693
825
  }
826
+
694
827
  .qti-valign-middle {
695
828
  vertical-align: middle;
696
829
  }
830
+
697
831
  .qti-valign-baseline {
698
832
  vertical-align: baseline;
699
833
  }
834
+
700
835
  .qti-valign-bottom {
701
836
  vertical-align: bottom;
702
837
  }
838
+
703
839
  /* =============
704
840
  Height styles
705
841
  ============= */
842
+
706
843
  .qti-height-0 {
707
844
  height: 0;
708
845
  }
846
+
709
847
  .qti-height-px {
710
848
  height: 1px;
711
849
  }
850
+
712
851
  .qti-height-0p5 {
713
852
  height: 0.125rem;
714
853
  }
854
+
715
855
  .qti-height-1 {
716
856
  height: 0.25rem;
717
857
  }
858
+
718
859
  .qti-height-1p5 {
719
860
  height: 0.375rem;
720
861
  }
862
+
721
863
  .qti-height-2 {
722
864
  height: 0.5rem;
723
865
  }
866
+
724
867
  .qti-height-2p5 {
725
868
  height: 0.625rem;
726
869
  }
870
+
727
871
  .qti-height-3 {
728
872
  height: 0.75rem;
729
873
  }
874
+
730
875
  .qti-height-3p5 {
731
876
  height: 0.875rem;
732
877
  }
878
+
733
879
  .qti-height-4 {
734
880
  height: 1rem;
735
881
  }
882
+
736
883
  .qti-height-5 {
737
884
  height: 1.25rem;
738
885
  }
886
+
739
887
  .qti-height-6 {
740
888
  height: 1.5rem;
741
889
  }
890
+
742
891
  .qti-height-7 {
743
892
  height: 1.75rem;
744
893
  }
894
+
745
895
  .qti-height-8 {
746
896
  height: 2rem;
747
897
  }
898
+
748
899
  .qti-height-9 {
749
900
  height: 2.25rem;
750
901
  }
902
+
751
903
  .qti-height-10 {
752
904
  height: 2.5rem;
753
905
  }
906
+
754
907
  .qti-height-11 {
755
908
  height: 2.75rem;
756
909
  }
910
+
757
911
  .qti-height-12 {
758
912
  height: 3rem;
759
913
  }
914
+
760
915
  .qti-height-14 {
761
916
  height: 3.5rem;
762
917
  }
918
+
763
919
  .qti-height-16 {
764
920
  height: 4rem;
765
921
  }
922
+
766
923
  .qti-height-20 {
767
924
  height: 5rem;
768
925
  }
926
+
769
927
  .qti-height-24 {
770
928
  height: 6rem;
771
929
  }
930
+
772
931
  .qti-height-28 {
773
932
  height: 7rem;
774
933
  }
934
+
775
935
  .qti-height-32 {
776
936
  height: 8rem;
777
937
  }
938
+
778
939
  .qti-height-36 {
779
940
  height: 9rem;
780
941
  }
942
+
781
943
  .qti-height-40 {
782
944
  height: 10rem;
783
945
  }
946
+
784
947
  .qti-height-44 {
785
948
  height: 11rem;
786
949
  }
950
+
787
951
  .qti-height-48 {
788
952
  height: 12rem;
789
953
  }
954
+
790
955
  .qti-height-52 {
791
956
  height: 13rem;
792
957
  }
958
+
793
959
  .qti-height-56 {
794
960
  height: 14rem;
795
961
  }
962
+
796
963
  .qti-height-60 {
797
964
  height: 15rem;
798
965
  }
966
+
799
967
  .qti-height-64 {
800
968
  height: 16rem;
801
969
  }
970
+
802
971
  .qti-height-72 {
803
972
  height: 18rem;
804
973
  }
974
+
805
975
  .qti-height-80 {
806
976
  height: 20rem;
807
977
  }
978
+
808
979
  .qti-height-96 {
809
980
  height: 24rem;
810
981
  }
982
+
811
983
  .qti-height-1-2 {
812
984
  height: 50%;
813
985
  }
986
+
814
987
  .qti-height-1-3 {
815
988
  height: 33.3333%;
816
989
  }
990
+
817
991
  .qti-height-2-3 {
818
992
  height: 66.6667%;
819
993
  }
994
+
820
995
  .qti-height-1-4 {
821
996
  height: 25%;
822
997
  }
998
+
823
999
  .qti-height-2-4 {
824
1000
  height: 50%;
825
1001
  }
1002
+
826
1003
  .qti-height-3-4 {
827
1004
  height: 75%;
828
1005
  }
1006
+
829
1007
  .qti-height-1-5 {
830
1008
  height: 20%;
831
1009
  }
1010
+
832
1011
  .qti-height-2-5 {
833
1012
  height: 40%;
834
1013
  }
1014
+
835
1015
  .qti-height-3-5 {
836
1016
  height: 60%;
837
1017
  }
1018
+
838
1019
  .qti-height-4-5 {
839
1020
  height: 80%;
840
1021
  }
1022
+
841
1023
  .qti-height-1-6 {
842
1024
  height: 16.6667%;
843
1025
  }
1026
+
844
1027
  .qti-height-2-6 {
845
1028
  height: 33.3333%;
846
1029
  }
1030
+
847
1031
  .qti-height-3-6 {
848
1032
  height: 50%;
849
1033
  }
1034
+
850
1035
  .qti-height-4-6 {
851
1036
  height: 66.6667%;
852
1037
  }
1038
+
853
1039
  .qti-height-5-6 {
854
1040
  height: 83.3333%;
855
1041
  }
1042
+
856
1043
  .qti-height-auto {
857
1044
  height: auto;
858
1045
  }
1046
+
859
1047
  .qti-height-full {
860
1048
  height: 100%;
861
1049
  }
1050
+
862
1051
  /* ============
863
1052
  Width styles
864
1053
  ============ */
1054
+
865
1055
  .qti-width-0 {
866
1056
  width: 0;
867
1057
  }
1058
+
868
1059
  .qti-width-px {
869
1060
  width: 1px;
870
1061
  }
1062
+
871
1063
  .qti-width-0p5 {
872
1064
  width: 0.125rem;
873
1065
  }
1066
+
874
1067
  .qti-width-1 {
875
1068
  width: 0.25rem;
876
1069
  }
1070
+
877
1071
  .qti-width-1p5 {
878
1072
  width: 0.375rem;
879
1073
  }
1074
+
880
1075
  .qti-width-2 {
881
1076
  width: 0.5rem;
882
1077
  }
1078
+
883
1079
  .qti-width-2p5 {
884
1080
  width: 0.625rem;
885
1081
  }
1082
+
886
1083
  .qti-width-3 {
887
1084
  width: 0.75rem;
888
1085
  }
1086
+
889
1087
  .qti-width-3p5 {
890
1088
  width: 0.875rem;
891
1089
  }
1090
+
892
1091
  .qti-width-4 {
893
1092
  width: 1rem;
894
1093
  }
1094
+
895
1095
  .qti-width-5 {
896
1096
  width: 1.25rem;
897
1097
  }
1098
+
898
1099
  .qti-width-6 {
899
1100
  width: 1.5rem;
900
1101
  }
1102
+
901
1103
  .qti-width-7 {
902
1104
  width: 1.75rem;
903
1105
  }
1106
+
904
1107
  .qti-width-8 {
905
1108
  width: 2rem;
906
1109
  }
1110
+
907
1111
  .qti-width-9 {
908
1112
  width: 2.25rem;
909
1113
  }
1114
+
910
1115
  .qti-width-10 {
911
1116
  width: 2.5rem;
912
1117
  }
1118
+
913
1119
  .qti-width-11 {
914
1120
  width: 2.75rem;
915
1121
  }
1122
+
916
1123
  .qti-width-12 {
917
1124
  width: 3rem;
918
1125
  }
1126
+
919
1127
  .qti-width-14 {
920
1128
  width: 3.5rem;
921
1129
  }
1130
+
922
1131
  .qti-width-16 {
923
1132
  width: 4rem;
924
1133
  }
1134
+
925
1135
  .qti-width-20 {
926
1136
  width: 5rem;
927
1137
  }
1138
+
928
1139
  .qti-width-24 {
929
1140
  width: 6rem;
930
1141
  }
1142
+
931
1143
  .qti-width-28 {
932
1144
  width: 7rem;
933
1145
  }
1146
+
934
1147
  .qti-width-32 {
935
1148
  width: 8rem;
936
1149
  }
1150
+
937
1151
  .qti-width-36 {
938
1152
  width: 9rem;
939
1153
  }
1154
+
940
1155
  .qti-width-40 {
941
1156
  width: 10rem;
942
1157
  }
1158
+
943
1159
  .qti-width-44 {
944
1160
  width: 11rem;
945
1161
  }
1162
+
946
1163
  .qti-width-48 {
947
1164
  width: 12rem;
948
1165
  }
1166
+
949
1167
  .qti-width-52 {
950
1168
  width: 13rem;
951
1169
  }
1170
+
952
1171
  .qti-width-56 {
953
1172
  width: 14rem;
954
1173
  }
1174
+
955
1175
  .qti-width-60 {
956
1176
  width: 15rem;
957
1177
  }
1178
+
958
1179
  .qti-width-64 {
959
1180
  width: 16rem;
960
1181
  }
1182
+
961
1183
  .qti-width-72 {
962
1184
  width: 18rem;
963
1185
  }
1186
+
964
1187
  .qti-width-80 {
965
1188
  width: 20rem;
966
1189
  }
1190
+
967
1191
  .qti-width-96 {
968
1192
  width: 24rem;
969
1193
  }
1194
+
970
1195
  .qti-width-auto {
971
1196
  width: auto;
972
1197
  }
1198
+
973
1199
  .qti-width-1-2 {
974
1200
  width: 50%;
975
1201
  }
1202
+
976
1203
  .qti-width-1-3 {
977
1204
  width: 33.3333%;
978
1205
  }
1206
+
979
1207
  .qti-width-2-3 {
980
1208
  width: 66.6667%;
981
1209
  }
1210
+
982
1211
  .qti-width-1-4 {
983
1212
  width: 25%;
984
1213
  }
1214
+
985
1215
  .qti-width-2-4 {
986
1216
  width: 50%;
987
1217
  }
1218
+
988
1219
  .qti-width-3-4 {
989
1220
  width: 75%;
990
1221
  }
1222
+
991
1223
  .qti-width-1-5 {
992
1224
  width: 20%;
993
1225
  }
1226
+
994
1227
  .qti-width-2-5 {
995
1228
  width: 40%;
996
1229
  }
1230
+
997
1231
  .qti-width-3-5 {
998
1232
  width: 60%;
999
1233
  }
1234
+
1000
1235
  .qti-width-4-5 {
1001
1236
  width: 80%;
1002
1237
  }
1238
+
1003
1239
  .qti-width-1-6 {
1004
1240
  width: 16.6667%;
1005
1241
  }
1242
+
1006
1243
  .qti-width-2-6 {
1007
1244
  width: 33.3333%;
1008
1245
  }
1246
+
1009
1247
  .qti-width-3-6 {
1010
1248
  width: 50%;
1011
1249
  }
1250
+
1012
1251
  .qti-width-4-6 {
1013
1252
  width: 66.6667%;
1014
1253
  }
1254
+
1015
1255
  .qti-width-5-6 {
1016
1256
  width: 83.3333%;
1017
1257
  }
1258
+
1018
1259
  .qti-width-1-12 {
1019
1260
  width: 8.3333%;
1020
1261
  }
1262
+
1021
1263
  .qti-width-2-12 {
1022
1264
  width: 16.6667%;
1023
1265
  }
1266
+
1024
1267
  .qti-width-3-12 {
1025
1268
  width: 25%;
1026
1269
  }
1270
+
1027
1271
  .qti-width-4-12 {
1028
1272
  width: 33.3333%;
1029
1273
  }
1274
+
1030
1275
  .qti-width-5-12 {
1031
1276
  width: 41.6667%;
1032
1277
  }
1278
+
1033
1279
  .qti-width-6-12 {
1034
1280
  width: 50%;
1035
1281
  }
1282
+
1036
1283
  .qti-width-7-12 {
1037
1284
  width: 58.3333%;
1038
1285
  }
1286
+
1039
1287
  .qti-width-8-12 {
1040
1288
  width: 66.6667%;
1041
1289
  }
1290
+
1042
1291
  .qti-width-9-12 {
1043
1292
  width: 75%;
1044
1293
  }
1294
+
1045
1295
  .qti-width-10-12 {
1046
1296
  width: 83.3333%;
1047
1297
  }
1298
+
1048
1299
  .qti-width-11-12 {
1049
1300
  width: 91.6667%;
1050
1301
  }
1302
+
1051
1303
  .qti-width-full,
1052
1304
  .qti-fullwidth {
1053
1305
  width: 100%;
1054
1306
  }
1307
+
1055
1308
  /* ==================
1056
1309
  Text Indent styles
1057
1310
  ================== */
1311
+
1058
1312
  .qti-text-indent-0 {
1059
1313
  text-indent: 0;
1060
1314
  }
1315
+
1061
1316
  .qti-text-indent-px {
1062
1317
  text-indent: 1px;
1063
1318
  }
1319
+
1064
1320
  .qti-text-indent-0p5 {
1065
1321
  text-indent: 0.125rem;
1066
1322
  }
1323
+
1067
1324
  .qti-text-indent-1 {
1068
1325
  text-indent: 0.25rem;
1069
1326
  }
1327
+
1070
1328
  .qti-text-indent-1p5 {
1071
1329
  text-indent: 0.375rem;
1072
1330
  }
1331
+
1073
1332
  .qti-text-indent-2 {
1074
1333
  text-indent: 0.5rem;
1075
1334
  }
1335
+
1076
1336
  .qti-text-indent-2p5 {
1077
1337
  text-indent: 0.625rem;
1078
1338
  }
1339
+
1079
1340
  .qti-text-indent-3 {
1080
1341
  text-indent: 0.75rem;
1081
1342
  }
1343
+
1082
1344
  .qti-text-indent-3p5 {
1083
1345
  text-indent: 0.875rem;
1084
1346
  }
1347
+
1085
1348
  .qti-text-indent-4 {
1086
1349
  text-indent: 1rem;
1087
1350
  }
1351
+
1088
1352
  .qti-text-indent-5 {
1089
1353
  text-indent: 1.25rem;
1090
1354
  }
1355
+
1091
1356
  .qti-text-indent-6 {
1092
1357
  text-indent: 1.5rem;
1093
1358
  }
1359
+
1094
1360
  .qti-text-indent-7 {
1095
1361
  text-indent: 1.75rem;
1096
1362
  }
1363
+
1097
1364
  .qti-text-indent-8 {
1098
1365
  text-indent: 2rem;
1099
1366
  }
1367
+
1100
1368
  .qti-text-indent-12 {
1101
1369
  text-indent: 3rem;
1102
1370
  }
1371
+
1103
1372
  .qti-text-indent-16 {
1104
1373
  text-indent: 4rem;
1105
1374
  }
1375
+
1106
1376
  .qti-text-indent-20 {
1107
1377
  text-indent: 5rem;
1108
1378
  }
1379
+
1109
1380
  .qti-text-indent-24 {
1110
1381
  text-indent: 6rem;
1111
1382
  }
1383
+
1112
1384
  .qti-text-indent-28 {
1113
1385
  text-indent: 7rem;
1114
1386
  }
1387
+
1115
1388
  .qti-text-indent-32 {
1116
1389
  text-indent: 8rem;
1117
1390
  }
1391
+
1118
1392
  /* =================
1119
1393
  List Style styles
1120
1394
  ================= */
1395
+
1121
1396
  .qti-list-style-type-none {
1122
1397
  list-style-type: none;
1123
1398
  }
1399
+
1124
1400
  .qti-list-style-type-disc {
1125
1401
  list-style-type: disc;
1126
1402
  }
1403
+
1127
1404
  .qti-list-style-type-circle {
1128
1405
  list-style-type: circle;
1129
1406
  }
1407
+
1130
1408
  .qti-list-style-type-square {
1131
1409
  list-style-type: square;
1132
1410
  }
1411
+
1133
1412
  .qti-list-style-type-decimal {
1134
1413
  list-style-type: decimal;
1135
1414
  }
1415
+
1136
1416
  .qti-list-style-type-decimal-leading-zero {
1137
1417
  list-style-type: decimal-leading-zero;
1138
1418
  }
1419
+
1139
1420
  .qti-list-style-type-lower-alpha {
1140
1421
  list-style-type: lower-alpha;
1141
1422
  }
1423
+
1142
1424
  .qti-list-style-type-upper-alpha {
1143
1425
  list-style-type: upper-alpha;
1144
1426
  }
1427
+
1145
1428
  .qti-list-style-type-lower-roman {
1146
1429
  list-style-type: lower-roman;
1147
1430
  }
1431
+
1148
1432
  .qti-list-style-type-upper-roman {
1149
1433
  list-style-type: upper-roman;
1150
1434
  }
1435
+
1151
1436
  .qti-list-style-type-lower-latin {
1152
1437
  list-style-type: lower-latin;
1153
1438
  }
1439
+
1154
1440
  .qti-list-style-type-upper-latin {
1155
1441
  list-style-type: upper-latin;
1156
1442
  }
1443
+
1157
1444
  .qti-list-style-type-lower-greek {
1158
1445
  list-style-type: lower-greek;
1159
1446
  }
1447
+
1160
1448
  .qti-list-style-type-arabic-indic {
1161
1449
  list-style-type: arabic-indic;
1162
1450
  }
1451
+
1163
1452
  .qti-list-style-type-armenian {
1164
1453
  list-style-type: armenian;
1165
1454
  }
1455
+
1166
1456
  .qti-list-style-type-lower-armenian {
1167
1457
  list-style-type: lower-armenian;
1168
1458
  }
1459
+
1169
1460
  .qti-list-style-type-upper-armenian {
1170
1461
  list-style-type: upper-armenian;
1171
1462
  }
1463
+
1172
1464
  .qti-list-style-type-bengali {
1173
1465
  list-style-type: bengali;
1174
1466
  }
1467
+
1175
1468
  .qti-list-style-type-cambodian {
1176
1469
  list-style-type: cambodian;
1177
1470
  }
1471
+
1178
1472
  .qti-list-style-type-simp-chinese-formal {
1179
1473
  list-style-type: simp-chinese-formal;
1180
1474
  }
1475
+
1181
1476
  .qti-list-style-type-simp-chinese-informal {
1182
1477
  list-style-type: simp-chinese-informal;
1183
1478
  }
1479
+
1184
1480
  .qti-list-style-type-trad-chinese-formal {
1185
1481
  list-style-type: trad-chinese-formal;
1186
1482
  }
1483
+
1187
1484
  .qti-list-style-type-trad-chinese-informal {
1188
1485
  list-style-type: trad-chinese-informal;
1189
1486
  }
1487
+
1190
1488
  .qti-list-style-type-cjk-ideographic {
1191
1489
  list-style-type: cjk-ideographic;
1192
1490
  }
1491
+
1193
1492
  .qti-list-style-type-cjk-heavenly-stem {
1194
1493
  list-style-type: cjk-heavenly-stem;
1195
1494
  }
1495
+
1196
1496
  .qti-list-style-type-cjk-earthly-branch {
1197
1497
  list-style-type: cjk-earthly-branch;
1198
1498
  }
1499
+
1199
1500
  .qti-list-style-type-devanagari {
1200
1501
  list-style-type: devanagari;
1201
1502
  }
1503
+
1202
1504
  .qti-list-style-type-ethiopic-halehame-ti-er {
1203
1505
  list-style-type: ethiopic-halehame-ti-er;
1204
1506
  }
1507
+
1205
1508
  .qti-list-style-type-ethiopic-halehame-ti-et {
1206
1509
  list-style-type: ethiopic-halehame-ti-et;
1207
1510
  }
1511
+
1208
1512
  .qti-list-style-type-ethiopic-halehame-am {
1209
1513
  list-style-type: ethiopic-halehame-am;
1210
1514
  }
1515
+
1211
1516
  .qti-list-style-type-ethiopic-halehame {
1212
1517
  list-style-type: ethiopic-halehame;
1213
1518
  }
1519
+
1214
1520
  .qti-list-style-type-georgian {
1215
1521
  list-style-type: georgian;
1216
1522
  }
1523
+
1217
1524
  .qti-list-style-type-gujarati {
1218
1525
  list-style-type: gujarati;
1219
1526
  }
1527
+
1220
1528
  .qti-list-style-type-gurmukhi {
1221
1529
  list-style-type: gurmukhi;
1222
1530
  }
1531
+
1223
1532
  .qti-list-style-type-hangul {
1224
1533
  list-style-type: hangul;
1225
1534
  }
1535
+
1226
1536
  .qti-list-style-type-hangul-consonant {
1227
1537
  list-style-type: hangul-consonant;
1228
1538
  }
1539
+
1229
1540
  .qti-list-style-type-hebrew {
1230
1541
  list-style-type: hebrew;
1231
1542
  }
1543
+
1232
1544
  .qti-list-style-type-hiragana {
1233
1545
  list-style-type: hiragana;
1234
1546
  }
1547
+
1235
1548
  .qti-list-style-type-hiragana-iroha {
1236
1549
  list-style-type: hiragana-iroha;
1237
1550
  }
1551
+
1238
1552
  .qti-list-style-type-khmer {
1239
1553
  list-style-type: khmer;
1240
1554
  }
1555
+
1241
1556
  .qti-list-style-type-korean-hangul-formal {
1242
1557
  list-style-type: korean-hangul-formal;
1243
1558
  }
1559
+
1244
1560
  .qti-list-style-type-korean-hanja-formal {
1245
1561
  list-style-type: korean-hanja-formal;
1246
1562
  }
1563
+
1247
1564
  .qti-list-style-type-korean-hanja-informal {
1248
1565
  list-style-type: korean-hanja-informal;
1249
1566
  }
1567
+
1250
1568
  .qti-list-style-type-lao {
1251
1569
  list-style-type: lao;
1252
1570
  }
1571
+
1253
1572
  .qti-list-style-type-malayalam {
1254
1573
  list-style-type: malayalam;
1255
1574
  }
1575
+
1256
1576
  .qti-list-style-type-mongolian {
1257
1577
  list-style-type: mongolian;
1258
1578
  }
1579
+
1259
1580
  .qti-list-style-type-myanmar {
1260
1581
  list-style-type: myanmar;
1261
1582
  }
1583
+
1262
1584
  .qti-list-style-type-oriya {
1263
1585
  list-style-type: oriya;
1264
1586
  }
1587
+
1265
1588
  .qti-list-style-type-persian {
1266
1589
  list-style-type: persian;
1267
1590
  }
1591
+
1268
1592
  .qti-list-style-type-thai {
1269
1593
  list-style-type: thai;
1270
1594
  }
1595
+
1271
1596
  .qti-list-style-type-tibetan {
1272
1597
  list-style-type: tibetan;
1273
1598
  }
1599
+
1274
1600
  .qti-list-style-type-telugu {
1275
1601
  list-style-type: telugu;
1276
1602
  }
1603
+
1277
1604
  .qti-list-style-type-urdu {
1278
1605
  list-style-type: urdu;
1279
1606
  }
1607
+
1280
1608
  /* =========================
1281
1609
  Other QTI 3 Presentation Utilities
1282
1610
  ========================= */
1611
+
1283
1612
  .qti-bordered {
1284
1613
  border: 1px solid var(--table-border-color);
1285
1614
  }
1615
+
1286
1616
  .qti-underline {
1287
1617
  text-decoration: underline;
1288
1618
  text-decoration-color: var(--foreground);
1289
1619
  }
1620
+
1290
1621
  .qti-italic {
1291
1622
  font-style: italic;
1292
1623
  }
1624
+
1293
1625
  .qti-well {
1294
1626
  min-height: 20px;
1295
1627
  padding: 19px;
@@ -1299,33 +1631,40 @@ Make sure to test your application with a production build as repeat registratio
1299
1631
  border-radius: 4px;
1300
1632
  box-shadow: var(--well-box-shadow);
1301
1633
  }
1634
+
1302
1635
  /* Set writing-mode to vertical-rl
1303
1636
  Typical for CJK vertical text */
1304
1637
  .qti-writing-mode-vertical-rl {
1305
1638
  writing-mode: vertical-rl;
1306
1639
  }
1640
+
1307
1641
  /* Set writing-mode to vertical-lr
1308
1642
  Typical for Mongolian vertical text */
1309
1643
  .qti-writing-mode-vertical-lr {
1310
1644
  writing-mode: vertical-lr;
1311
1645
  }
1646
+
1312
1647
  /* Set writing-mode to horizontal-tb
1313
1648
  Browser default */
1314
1649
  .qti-writing-mode-horizontal-tb {
1315
1650
  writing-mode: horizontal-tb;
1316
1651
  }
1652
+
1317
1653
  /* Float an element left */
1318
1654
  .qti-float-left {
1319
1655
  float: left;
1320
1656
  }
1657
+
1321
1658
  /* Float an element right */
1322
1659
  .qti-float-right {
1323
1660
  float: right;
1324
1661
  }
1662
+
1325
1663
  /* Remove a float */
1326
1664
  .qti-float-none {
1327
1665
  float: none;
1328
1666
  }
1667
+
1329
1668
  /* Clearfix Hack to apply to a container of
1330
1669
  floated content that overflows the container. */
1331
1670
  .qti-float-clearfix::after {
@@ -1333,6 +1672,7 @@ Make sure to test your application with a production build as repeat registratio
1333
1672
  clear: both;
1334
1673
  display: table;
1335
1674
  }
1675
+
1336
1676
  .qti-float-clear-left
1337
1677
  .qti-float-clear-right
1338
1678
  .qti-float-clear-both
@@ -1341,121 +1681,138 @@ Make sure to test your application with a production build as repeat registratio
1341
1681
  .qti-text-orientation-upright {
1342
1682
  text-orientation: upright;
1343
1683
  }
1344
- @layer qti-base {
1345
- .qti-layout-row {
1346
- display: flex;
1347
- flex-wrap: wrap;
1348
- width: 100%;
1349
- gap: 2.1276595745%;
1350
- }
1684
+ }
1685
+ @layer qti-base{
1351
1686
 
1352
- .qti-layout-row [class*='qti-layout-col']:not(:empty) {
1353
- box-sizing: border-box;
1354
- }
1687
+ .qti-layout-row {
1688
+ display: flex;
1689
+ flex-wrap: wrap;
1690
+ width: 100%;
1691
+ gap: 2.1276595745%;
1692
+ }
1355
1693
 
1356
- .qti-layout-row [class*='qti-layout-col']:empty {
1357
- width: 0;
1358
- overflow: hidden; /* to fully collapse if there\u2019s padding or borders */
1359
- }
1694
+ .qti-layout-row [class*='qti-layout-col']:not(:empty) {
1695
+ box-sizing: border-box;
1696
+ }
1360
1697
 
1361
- .qti-layout-col1 {
1362
- width: 6.3829787234%;
1363
- }
1698
+ .qti-layout-row [class*='qti-layout-col']:empty {
1699
+ width: 0;
1700
+ overflow: hidden; /* to fully collapse if there\u2019s padding or borders */
1701
+ }
1364
1702
 
1365
- .qti-layout-col2 {
1366
- width: 14.8936170213%;
1367
- }
1703
+ .qti-layout-col1 {
1704
+ width: 6.3829787234%;
1705
+ }
1368
1706
 
1369
- .qti-layout-col3 {
1370
- width: 23.4042553191%;
1371
- }
1707
+ .qti-layout-col2 {
1708
+ width: 14.8936170213%;
1709
+ }
1372
1710
 
1373
- .qti-layout-col4 {
1374
- width: 31.914893617%;
1375
- }
1711
+ .qti-layout-col3 {
1712
+ width: 23.4042553191%;
1713
+ }
1376
1714
 
1377
- .qti-layout-col5 {
1378
- width: 40.4255319149%;
1379
- }
1715
+ .qti-layout-col4 {
1716
+ width: 31.914893617%;
1717
+ }
1380
1718
 
1381
- .qti-layout-col6 {
1382
- width: 48.9361702128%;
1383
- }
1719
+ .qti-layout-col5 {
1720
+ width: 40.4255319149%;
1721
+ }
1384
1722
 
1385
- .qti-layout-col7 {
1386
- width: 57.4468085106%;
1387
- }
1723
+ .qti-layout-col6 {
1724
+ width: 48.9361702128%;
1725
+ }
1388
1726
 
1389
- .qti-layout-col8 {
1390
- width: 65.9574468085%;
1391
- }
1727
+ .qti-layout-col7 {
1728
+ width: 57.4468085106%;
1729
+ }
1392
1730
 
1393
- .qti-layout-col9 {
1394
- width: 74.4680851064%;
1395
- }
1731
+ .qti-layout-col8 {
1732
+ width: 65.9574468085%;
1733
+ }
1396
1734
 
1397
- .qti-layout-col10 {
1398
- width: 82.9787234043%;
1399
- }
1735
+ .qti-layout-col9 {
1736
+ width: 74.4680851064%;
1737
+ }
1400
1738
 
1401
- .qti-layout-col11 {
1402
- width: 91.4893617021%;
1403
- }
1739
+ .qti-layout-col10 {
1740
+ width: 82.9787234043%;
1741
+ }
1404
1742
 
1405
- .qti-layout-col12 {
1406
- width: 100%;
1407
- }
1743
+ .qti-layout-col11 {
1744
+ width: 91.4893617021%;
1745
+ }
1408
1746
 
1409
- .qti-layout-offset1 {
1410
- margin-left: 8.5106382979%;
1411
- }
1747
+ .qti-layout-col12 {
1748
+ width: 100%;
1749
+ }
1412
1750
 
1413
- .qti-layout-offset2 {
1414
- margin-left: 17.0212765957%;
1415
- }
1751
+ .qti-layout-offset1 {
1752
+ margin-left: 8.5106382979%;
1753
+ }
1416
1754
 
1417
- .qti-layout-offset3 {
1418
- margin-left: 25.5319148936%;
1419
- }
1755
+ .qti-layout-offset2 {
1756
+ margin-left: 17.0212765957%;
1757
+ }
1420
1758
 
1421
- .qti-layout-offset4 {
1422
- margin-left: 34.0425531915%;
1423
- }
1759
+ .qti-layout-offset3 {
1760
+ margin-left: 25.5319148936%;
1761
+ }
1424
1762
 
1425
- .qti-layout-offset5 {
1426
- margin-left: 42.5531914894%;
1427
- }
1763
+ .qti-layout-offset4 {
1764
+ margin-left: 34.0425531915%;
1765
+ }
1428
1766
 
1429
- .qti-layout-offset6 {
1430
- margin-left: 51.0638297872%;
1431
- }
1767
+ .qti-layout-offset5 {
1768
+ margin-left: 42.5531914894%;
1769
+ }
1432
1770
 
1433
- .qti-layout-offset7 {
1434
- margin-left: 59.5744680851%;
1435
- }
1771
+ .qti-layout-offset6 {
1772
+ margin-left: 51.0638297872%;
1773
+ }
1436
1774
 
1437
- .qti-layout-offset8 {
1438
- margin-left: 68.085106383%;
1439
- }
1775
+ .qti-layout-offset7 {
1776
+ margin-left: 59.5744680851%;
1777
+ }
1440
1778
 
1441
- .qti-layout-offset9 {
1442
- margin-left: 76.5957446809%;
1443
- }
1779
+ .qti-layout-offset8 {
1780
+ margin-left: 68.085106383%;
1781
+ }
1444
1782
 
1445
- .qti-layout-offset10 {
1446
- margin-left: 85.1063829787%;
1447
- }
1783
+ .qti-layout-offset9 {
1784
+ margin-left: 76.5957446809%;
1785
+ }
1448
1786
 
1449
- .qti-layout-offset11 {
1450
- margin-left: 93.6170212766%;
1451
- }
1787
+ .qti-layout-offset10 {
1788
+ margin-left: 85.1063829787%;
1789
+ }
1452
1790
 
1453
- @media (width <= 767px) {
1454
- [class*='qti-layout-col'] {
1455
- width: 100%;
1456
- }
1791
+ .qti-layout-offset11 {
1792
+ margin-left: 93.6170212766%;
1793
+ }
1794
+
1795
+ @media (width <= 767px) {
1796
+ [class*='qti-layout-col'] {
1797
+ width: 100%;
1457
1798
  }
1458
1799
  }
1800
+ }
1801
+ /**
1802
+ * Layer order for everything the theme ships, and the imports that fill it.
1803
+ *
1804
+ * A file is assigned its layer HERE, at its import, wherever it belongs to exactly one layer \u2014
1805
+ * so the ordering is readable in one place and the file itself stays free of wrapper blocks.
1806
+ * The files imported without \`layer()\` below span several layers internally and declare their
1807
+ * own \`@layer\` blocks; splitting them per layer is the only way to import-assign them, and is
1808
+ * not worth the file count.
1809
+ *
1810
+ * \`interactions.brand\` and \`overrides\` hold nothing here ON PURPOSE \u2014 they are the extension points
1811
+ * a brand sheet writes into (apps/e2e/src/stories/kennisnet/kennisnet.css uses \`interactions.brand\`).
1812
+ * They must stay DECLARED even while empty: a layer first created by a consumer's own \`@layer\`
1813
+ * block is appended after every declared layer, which would put brand paint above the state and
1814
+ * correction paint it is meant to sit under. Deleting the two names moved 7 of the 17 VRT baselines.
1815
+ */
1459
1816
  @layer qti-components.reset{
1460
1817
  @scope (qti-item-body, .ProseMirror) {
1461
1818
  :scope,
@@ -1507,7 +1864,8 @@ Make sure to test your application with a production build as repeat registratio
1507
1864
  }
1508
1865
  }
1509
1866
  }
1510
- /* Plain HTML author markup (tables, lists, rules). Sibling to reset.css, same @scope. */
1867
+ @layer qti-components.elements{
1868
+
1511
1869
  /**
1512
1870
  * Prose \u2014 plain HTML author markup: tables, lists, headings, rules.
1513
1871
  *
@@ -1531,40 +1889,41 @@ Make sure to test your application with a production build as repeat registratio
1531
1889
  * Values route through the theme tokens with a literal fallback, so prose tracks a brand for free.
1532
1890
  * The --qti-prose-* names are the override surface.
1533
1891
  */
1534
- @layer qti-components.elements {
1535
- /*
1536
- * Shared \u2014 rendered item bodies AND editor documents.
1537
- *
1538
- * Intentionally empty. Every candidate rule so far (border-collapse, cell padding) moves rendered
1539
- * items, which is a product decision rather than a styling gap. Add here only with that in mind.
1540
- */
1541
1892
 
1542
- /*
1543
- * Authoring only \u2014 the editor's document.
1544
- */
1545
- @scope (.ProseMirror) {
1546
- :scope table {
1547
- border-collapse: collapse;
1548
- margin: var(--qti-prose-table-margin, 0.5rem 0);
1549
- }
1893
+ /*
1894
+ * Shared \u2014 rendered item bodies AND editor documents.
1895
+ *
1896
+ * Intentionally empty. Every candidate rule so far (border-collapse, cell padding) moves rendered
1897
+ * items, which is a product decision rather than a styling gap. Add here only with that in mind.
1898
+ */
1550
1899
 
1551
- :scope th,
1552
- :scope td {
1553
- border: var(--qti-prose-table-border-width, var(--qti-border-thickness, 1px))
1554
- var(--qti-prose-table-border-style, var(--qti-border-style, solid))
1555
- var(--qti-prose-table-border-color, var(--qti-border-color, #c6cad0));
1556
- padding: var(--qti-prose-table-cell-padding, 0.25rem 0.5rem);
1557
- text-align: left;
1558
- /* No vertical-align here: that is layout, and the theme does not do layout (CONTRACT.md \xA77,
1559
- enforced by qti/no-layout-in-theme). Cells keep the UA default. */
1560
- }
1900
+ /*
1901
+ * Authoring only \u2014 the editor's document.
1902
+ */
1903
+ @scope (.ProseMirror) {
1904
+ :scope table {
1905
+ border-collapse: collapse;
1906
+ margin: var(--qti-prose-table-margin, 0.5rem 0);
1907
+ }
1908
+
1909
+ :scope th,
1910
+ :scope td {
1911
+ border: var(--qti-prose-table-border-width, var(--qti-border-thickness, 1px))
1912
+ var(--qti-prose-table-border-style, var(--qti-border-style, solid))
1913
+ var(--qti-prose-table-border-color, var(--qti-border-color, #c6cad0));
1914
+ padding: var(--qti-prose-table-cell-padding, 0.25rem 0.5rem);
1915
+ text-align: left;
1916
+ /* No vertical-align here: that is layout, and the theme does not do layout (CONTRACT.md \xA77,
1917
+ enforced by qti/no-layout-in-theme). Cells keep the UA default. */
1918
+ }
1561
1919
 
1562
- :scope th {
1563
- background: var(--qti-prose-table-header-bg, var(--qti-bg-active, #f6f8fa));
1564
- font-weight: 600;
1565
- }
1920
+ :scope th {
1921
+ background: var(--qti-prose-table-header-bg, var(--qti-bg-active, #f6f8fa));
1922
+ font-weight: 600;
1566
1923
  }
1567
1924
  }
1925
+ }
1926
+ /* Multi-layer: declares global + interactions.{base,states,corrections} internally. */
1568
1927
  /* QTI base \u2014 design variables. The theme's tokens; a substrate overrides their VALUES to
1569
1928
  * express its look (value first). Split from qti-base.css. See also qti-mixins.css.
1570
1929
  *
@@ -2007,6 +2366,7 @@ Make sure to test your application with a production build as repeat registratio
2007
2366
  --qti-answer-border: var(--qti-info);
2008
2367
  }
2009
2368
  }
2369
+ /* Mixin definitions only \u2014 emits nothing on its own, so it takes no layer. */
2010
2370
  /* QTI base \u2014 shared theme utilities and semantic mixins. Only styles >=2 interactions share.
2011
2371
  * They read the variables in qti-variables.css; a substrate re-colours by overriding those, not
2012
2372
  * by editing these. Split from qti-base.css. */
@@ -2232,6 +2592,7 @@ Make sure to test your application with a production build as repeat registratio
2232
2592
  * hotspots and choices alike where no single rule suited all of them. This one is called from drags
2233
2593
  * only.
2234
2594
  */
2595
+ /* Per-interaction sheets; each import carries its layer where the file has just one. */
2235
2596
  @layer qti-components.interactions.base {
2236
2597
  qti-choice-interaction {
2237
2598
  /* A choice hugs its text here, unlike order-interaction, which uses the same element as a chip.
@@ -5764,11 +6125,11 @@ Make sure to test your application with a production build as repeat registratio
5764
6125
  }
5765
6126
  }
5766
6127
  }
5767
- @layer qti-components.interactions.base {
5768
- qti-slider-interaction {
5769
- --qti-tick-color: rgb(229 231 235 / 100%);
5770
- --qti-tick-width: 1px;
5771
- }
6128
+ @layer qti-components.interactions.base{
6129
+ qti-slider-interaction {
6130
+ --qti-tick-color: rgb(229 231 235 / 100%);
6131
+ --qti-tick-width: 1px;
6132
+ }
5772
6133
  }
5773
6134
  @layer qti-components.interactions.base {
5774
6135
  qti-select-point-interaction {
@@ -5807,16 +6168,17 @@ Make sure to test your application with a production build as repeat registratio
5807
6168
  }
5808
6169
  }
5809
6170
  }
5810
- @layer qti-components.interactions.base {
5811
- qti-position-object-stage {
5812
- & qti-position-object-interaction {
5813
- /* no styles necessary, only layout styles, defined in the component */
5814
- }
6171
+ @layer qti-components.interactions.base{
6172
+ qti-position-object-stage {
6173
+ & qti-position-object-interaction {
6174
+ /* no styles necessary, only layout styles, defined in the component */
5815
6175
  }
5816
6176
  }
5817
- @layer qti-components.interactions.base {
5818
- /* \`display: block\` lives in qti-prompt.styles.ts, which already declares it on :host. */
5819
6177
  }
6178
+ @layer qti-components.interactions.base{
6179
+ /* \`display: block\` lives in qti-prompt.styles.ts, which already declares it on :host. */
6180
+ }
6181
+ @layer qti-components.interactions.corrections{
5820
6182
  /*
5821
6183
  * What is LEFT here is what the base class owns.
5822
6184
  *
@@ -5838,58 +6200,54 @@ Make sure to test your application with a production build as repeat registratio
5838
6200
  * never rendered, because the shared rule declared \`background-color\` directly and outranked the
5839
6201
  * binding that reads them. Deleted with the rule that was hiding them.
5840
6202
  */
5841
- @layer qti-components.interactions.corrections {
5842
- /*
5843
- * The candidate-correction badge, \`part="correction"\` on every corrected element.
5844
- *
5845
- * A token list, so \`::part(correction-correct)\` reaches the badge in the drag bank, on the
5846
- * floating clone, and inside a drop target's shadow root \u2014 a token survives \`exportparts\`,
5847
- * where a chained \`::part()\` would not.
5848
- */
5849
- ::part(correction-correct) {
5850
- background-color: var(--qti-correct);
5851
- mask: var(--qti-check-mask) no-repeat center / contain;
5852
- -webkit-mask: var(--qti-check-mask) no-repeat center / contain;
5853
- }
5854
-
5855
- ::part(correction-incorrect) {
5856
- background-color: var(--qti-incorrect);
5857
- mask: var(--qti-times-mask) no-repeat center / contain;
5858
- -webkit-mask: var(--qti-times-mask) no-repeat center / contain;
5859
- }
5860
-
5861
-
6203
+ /*
6204
+ * The candidate-correction badge, \`part="correction"\` on every corrected element.
6205
+ *
6206
+ * A token list, so \`::part(correction-correct)\` reaches the badge in the drag bank, on the
6207
+ * floating clone, and inside a drop target's shadow root \u2014 a token survives \`exportparts\`,
6208
+ * where a chained \`::part()\` would not.
6209
+ */
6210
+ ::part(correction-correct) {
6211
+ background-color: var(--qti-correct);
6212
+ mask: var(--qti-check-mask) no-repeat center / contain;
6213
+ -webkit-mask: var(--qti-check-mask) no-repeat center / contain;
6214
+ }
5862
6215
 
5863
- /*
5864
- * The third verdict. correction.styles.ts has always SIZED \`correction-partially-correct\` beside
5865
- * its two siblings, but no rule anywhere ever painted it \u2014 so a partially-correct badge has been
5866
- * an invisible 1em gap in every interaction, not just extended-text. This is repo-wide, and the
5867
- * reason it went unnoticed is that partial credit needs a mapping to arise at all.
5868
- */
5869
- ::part(correction-partially-correct) {
5870
- background-color: var(--qti-partially-correct);
5871
- mask: var(--qti-partial-mask) no-repeat center / contain;
5872
- -webkit-mask: var(--qti-partial-mask) no-repeat center / contain;
5873
- }
6216
+ ::part(correction-incorrect) {
6217
+ background-color: var(--qti-incorrect);
6218
+ mask: var(--qti-times-mask) no-repeat center / contain;
6219
+ -webkit-mask: var(--qti-times-mask) no-repeat center / contain;
6220
+ }
5874
6221
 
6222
+ /*
6223
+ * The third verdict. correction.styles.ts has always SIZED \`correction-partially-correct\` beside
6224
+ * its two siblings, but no rule anywhere ever painted it \u2014 so a partially-correct badge has been
6225
+ * an invisible 1em gap in every interaction, not just extended-text. This is repo-wide, and the
6226
+ * reason it went unnoticed is that partial credit needs a mapping to arise at all.
6227
+ */
6228
+ ::part(correction-partially-correct) {
6229
+ background-color: var(--qti-partially-correct);
6230
+ mask: var(--qti-partial-mask) no-repeat center / contain;
6231
+ -webkit-mask: var(--qti-partial-mask) no-repeat center / contain;
6232
+ }
5875
6233
 
5876
- /* A cloned interaction presents the answer key rather than a candidate judgement. What is left
5877
- here is the part no interaction owns: any chip, anywhere. The text-entry and inline-choice
5878
- halves moved into their own files \u2014 those name one interaction each, so they belong to it. */
5879
- .full-correct-response :state(drag),
5880
- .full-correct-response ::part(drag) {
5881
- background-color: var(--qti-answer-bg);
5882
- color: var(--qti-answer-fg);
5883
- border-color: var(--qti-answer-border);
5884
- }
6234
+ /* A cloned interaction presents the answer key rather than a candidate judgement. What is left
6235
+ here is the part no interaction owns: any chip, anywhere. The text-entry and inline-choice
6236
+ halves moved into their own files \u2014 those name one interaction each, so they belong to it. */
6237
+ .full-correct-response :state(drag),
6238
+ .full-correct-response ::part(drag) {
6239
+ background-color: var(--qti-answer-bg);
6240
+ color: var(--qti-answer-fg);
6241
+ border-color: var(--qti-answer-border);
6242
+ }
5885
6243
 
5886
- .full-correct-response :state(drag)::part(control)::before,
5887
- .full-correct-response ::part(drag-control)::before {
5888
- content: '';
5889
- background-color: var(--qti-answer-fg);
5890
- mask: var(--qti-check-mask) no-repeat center / contain;
5891
- -webkit-mask: var(--qti-check-mask) no-repeat center / contain;
5892
- }
6244
+ .full-correct-response :state(drag)::part(control)::before,
6245
+ .full-correct-response ::part(drag-control)::before {
6246
+ content: '';
6247
+ background-color: var(--qti-answer-fg);
6248
+ mask: var(--qti-check-mask) no-repeat center / contain;
6249
+ -webkit-mask: var(--qti-check-mask) no-repeat center / contain;
6250
+ }
5893
6251
  }
5894
6252
  @layer qti-components.elements{
5895
6253
  /* \`display: block\` is declared by the element itself, in qti-rubric-block.ts. */
@@ -5927,6 +6285,7 @@ qti-feedback-block::part(feedback) {
5927
6285
  margin-top: var(--qti-gap);
5928
6286
  }
5929
6287
  }
6288
+ @layer qti-components.global{
5930
6289
  /*
5931
6290
  * Cross-interaction custom states.
5932
6291
  *
@@ -5948,63 +6307,78 @@ qti-feedback-block::part(feedback) {
5948
6307
  * third and fourth time in the Kennisnet overlay. Declared per interaction the rule is an opt-in:
5949
6308
  * graphic-gap-match simply never states one, and there is no exception to write down anywhere.
5950
6309
  */
5951
- @layer qti-components.global {
5952
- ::part(message) {
5953
- color: var(--qti-fg);
5954
- background-color: color-mix(in srgb, var(--qti-warning) 5%, white);
5955
- padding: var(--qti-padding-box);
5956
- border: var(--qti-border-thickness) solid var(--qti-warning);
5957
- border-radius: var(--qti-border-radius);
5958
- margin-top: var(--qti-gap);
5959
- }
6310
+ ::part(message) {
6311
+ color: var(--qti-fg);
6312
+ background-color: color-mix(in srgb, var(--qti-warning) 5%, white);
6313
+ padding: var(--qti-padding-box);
6314
+ border: var(--qti-border-thickness) solid var(--qti-warning);
6315
+ border-radius: var(--qti-border-radius);
6316
+ margin-top: var(--qti-gap);
6317
+ }
5960
6318
 
5961
- /*
5962
- * The interaction is presenting the answer key rather than the candidate's own response.
5963
- * Set on the interaction host by \`Interaction.toggleInternalCorrectResponse\`.
5964
- *
5965
- * Reaches the host wherever that base implementation runs, which is more than it looks: besides
5966
- * \`qti-extended-text-interaction\`, both \`ChoiceCorrectionMixin\` and most per-interaction overrides
5967
- * call \`super\`, so choice, hottext, select-point, slider, graphic-order and the rest set the host
5968
- * state AND mark their individual choices with \`correct-response\` / \`incorrect-response\`.
5969
- *
5970
- * Three do not, and so never paint this outline: the drag-drop mixin replaces the implementation
5971
- * outright, and the two inline interactions \u2014 text-entry and inline-choice \u2014 hand internal mode to
5972
- * the full correct response, which presents the key in a sibling wrapper rather than on the host.
5973
- *
5974
- * The outline went unseen on hottext until its host stopped being an inline box (see the note in
5975
- * qti-match-interaction.styles.ts) \u2014 an inline box whose children are all block has no area to
5976
- * paint. If the double indication ever reads as too much, the fix is here or in the mixin, not
5977
- * a display value.
5978
- */
5979
- :state(show-correct-response) {
5980
- outline: var(--qti-border-thickness) dashed var(--qti-correct);
5981
- outline-offset: 0.25rem;
5982
- }
6319
+ /*
6320
+ * The interaction is presenting the answer key rather than the candidate's own response.
6321
+ * Set on the interaction host by \`Interaction.toggleInternalCorrectResponse\`.
6322
+ *
6323
+ * Reaches the host wherever that base implementation runs, which is more than it looks: besides
6324
+ * \`qti-extended-text-interaction\`, both \`ChoiceCorrectionMixin\` and most per-interaction overrides
6325
+ * call \`super\`, so choice, hottext, select-point, slider, graphic-order and the rest set the host
6326
+ * state AND mark their individual choices with \`correct-response\` / \`incorrect-response\`.
6327
+ *
6328
+ * Three do not, and so never paint this outline: the drag-drop mixin replaces the implementation
6329
+ * outright, and the two inline interactions \u2014 text-entry and inline-choice \u2014 hand internal mode to
6330
+ * the full correct response, which presents the key in a sibling wrapper rather than on the host.
6331
+ *
6332
+ * The outline went unseen on hottext until its host stopped being an inline box (see the note in
6333
+ * qti-match-interaction.styles.ts) \u2014 an inline box whose children are all block has no area to
6334
+ * paint. If the double indication ever reads as too much, the fix is here or in the mixin, not
6335
+ * a display value.
6336
+ */
6337
+ :state(show-correct-response) {
6338
+ outline: var(--qti-border-thickness) dashed var(--qti-correct);
6339
+ outline-offset: 0.25rem;
5983
6340
  }
6341
+ }
6342
+ /* Item-shell structure (what is shown, what is hidden). Kept out of styles/qti-theme/ because it is
6343
+ structure rather than paint \u2014 that directory is where the no-layout-in-theme lint rule applies. */
6344
+ @layer qti-components.global{
6345
+
6346
+ /**
6347
+ * Structural rules for the item shell itself \u2014 what is shown and what is hidden.
6348
+ *
6349
+ * Lives in a file of its own so it can be assigned a layer at its import (see index.css). Rules
6350
+ * written straight into item.css would be unlayered, and unlayered CSS outranks every layer,
6351
+ * including the \`qti-extended\` slot consumers are told to author in.
6352
+ */
6353
+
5984
6354
  [view],
5985
6355
  qti-outcome-declaration,
5986
6356
  qti-response-declaration {
5987
6357
  display: none;
5988
6358
  }
6359
+
5989
6360
  [view].show {
5990
6361
  display: block;
5991
6362
  }
6363
+
5992
6364
  :host {
5993
6365
  box-sizing: border-box;
5994
6366
  }
6367
+
5995
6368
  qti-test-part:not(:has(qti-assessment-item)),
5996
6369
  qti-assessment-section:not(:has(qti-assessment-item)),
5997
6370
  qti-assessment-item-ref:not(:has(qti-assessment-item)) {
5998
6371
  display: none;
5999
6372
  }
6000
- div.full-correct-response {
6001
- }
6373
+
6002
6374
  div.full-correct-response-block {
6003
6375
  display: block;
6004
6376
  }
6377
+
6005
6378
  div.full-correct-response-inline {
6006
6379
  display: inline-block;
6007
6380
  }
6381
+ }
6008
6382
  `;var Vt=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Ce=class extends C{constructor(){super(...arguments),this.customElementRegistry=null,this.testURL=null,this.testDoc=null,this.testXML=null,this.qtiContext={QTI_CONTEXT:{testIdentifier:"",candidateIdentifier:"",environmentIdentifier:"default"}},this.#e=null,this.#t=null}#e;#t;createRenderRoot(){let e=this.customElementRegistry;return this.#t=e,this.shadowRoot??this.attachShadow({...this.constructor.shadowRootOptions,...e?{customElementRegistry:e}:{}})}async handleTestURLChange(){if(this.testURL)try{let e=this.qtiContext?.QTI_CONTEXT?.seed,t=(await vr().load(this.testURL)).shuffleOrdering(e),r=this.closest("qti-test");if(r?.postLoadTestTransformCallback){let o=t.htmlDoc(this.#t??void 0).querySelector("qti-assessment-test");o&&(t=await r.postLoadTestTransformCallback(t,o))}this.testDoc=t.htmlDoc(this.#t??void 0)}catch(e){console.error("Error loading or parsing XML:",e)}}handleTestXMLChange(){if(this.testXML)try{let e=this.qtiContext?.QTI_CONTEXT?.seed;this.testDoc=vr().parse(this.testXML).shuffleOrdering(e).htmlDoc(this.#t??void 0)}catch(e){console.error("Error parsing XML:",e)}}async connectedCallback(){super.connectedCallback(),this.#r(),this.#i(),this.testURL&&this.handleTestURLChange(),this.testXML&&this.handleTestXMLChange()}#r(){let e=this.querySelector("template");this.#e=e?e.content:b``}#i(){let e=new CSSStyleSheet;e.replaceSync($o),this.shadowRoot.adoptedStyleSheets=[e]}render(){return b`
6009
6383
  ${this.#e}
6010
6384
  <slot></slot>
@@ -9022,7 +9396,7 @@ CES.load();
9022
9396
  ${this.renderRailSupplement()}
9023
9397
  </div>
9024
9398
  </div>
9025
- `}#r(e){this.#n(e.pageX);let t=i=>this.#o(i.pageX),r=()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",r),this.#s()};document.addEventListener("mousemove",t),document.addEventListener("mouseup",r)}#i(e){this.#n(e.touches[0].pageX);let t=i=>this.#o(i.touches[0].pageX),r=()=>{document.removeEventListener("touchmove",t),document.removeEventListener("touchend",r),this.#s()};document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",r)}#n(e){this.#o(e)}#o(e){let t=this._rail.getBoundingClientRect(),r=e-t.left,i=Math.min(1,Math.max(0,r/t.width)),o=this.min+Math.round(i*(this.max-this.min)/this.step)*this.step;this.#t(o)}#s(){this.dispatchEvent(new Event("change",{bubbles:!0}))}};Vi([sr("#rail")],ve.prototype,"_rail",void 0);Vi([p({type:Number,attribute:"lower-bound"})],ve.prototype,"min",void 0);Vi([p({type:Number,attribute:"upper-bound"})],ve.prototype,"max",void 0);Vi([p({type:Number,attribute:"step"})],ve.prototype,"step",void 0);Vi([p({attribute:"response",reflect:!1,noAccessor:!0})],ve.prototype,"response",null);var Ln=[{tag:"qti-slider-interaction",ctor:ve}];var eh=()=>new Fa,Fa=class{},ja=new WeakMap,MR=qe(class extends pt{render(n){return P}update(n,[e]){let t=e!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=e,this.ht=n.options?.host,this.rt(this.ct=n.element)),P}rt(n){if(this.isConnected||(n=void 0),typeof this.G=="function"){let e=this.ht??globalThis,t=ja.get(e);t===void 0&&(t=new WeakMap,ja.set(e,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,n),n!==void 0&&this.G.call(this.ht,n)}else this.G.value=n}get lt(){return typeof this.G=="function"?ja.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var th=[R,q`
9399
+ `}#r(e){this.#n(e.pageX);let t=i=>this.#o(i.pageX),r=()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",r),this.#s()};document.addEventListener("mousemove",t),document.addEventListener("mouseup",r)}#i(e){this.#n(e.touches[0].pageX);let t=i=>this.#o(i.touches[0].pageX),r=()=>{document.removeEventListener("touchmove",t),document.removeEventListener("touchend",r),this.#s()};document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",r)}#n(e){this.#o(e)}#o(e){let t=this._rail.getBoundingClientRect(),r=e-t.left,i=Math.min(1,Math.max(0,r/t.width)),o=this.min+Math.round(i*(this.max-this.min)/this.step)*this.step;this.#t(o)}#s(){this.dispatchEvent(new Event("change",{bubbles:!0}))}};Vi([sr("#rail")],ve.prototype,"_rail",void 0);Vi([p({type:Number,attribute:"lower-bound"})],ve.prototype,"min",void 0);Vi([p({type:Number,attribute:"upper-bound"})],ve.prototype,"max",void 0);Vi([p({type:Number,attribute:"step"})],ve.prototype,"step",void 0);Vi([p({attribute:"response",reflect:!1,noAccessor:!0})],ve.prototype,"response",null);var Ln=[{tag:"qti-slider-interaction",ctor:ve}];var eh=()=>new Fa,Fa=class{},ja=new WeakMap,NR=qe(class extends pt{render(n){return P}update(n,[e]){let t=e!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=e,this.ht=n.options?.host,this.rt(this.ct=n.element)),P}rt(n){if(this.isConnected||(n=void 0),typeof this.G=="function"){let e=this.ht??globalThis,t=ja.get(e);t===void 0&&(t=new WeakMap,ja.set(e,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,n),n!==void 0&&this.G.call(this.ht,n)}else this.G.value=n}get lt(){return typeof this.G=="function"?ja.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var th=[R,q`
9026
9400
  :host {
9027
9401
  display: inline-flex;
9028
9402
  align-items: center;
@@ -9141,7 +9515,7 @@ CES.load();
9141
9515
  <slot name="prompt"></slot>
9142
9516
  <input type="file" @change="${this.#r}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" />
9143
9517
  </div>
9144
- `}async#r(e){let t=e.target;t.files&&t.files.length>0&&(this.#e=t.files[0],this.#t=await this.#i(this.#e),this.saveResponse(this.#t),this.dispatchEvent(new CustomEvent("qti-interaction-response",{detail:{response:this.#t}})))}#i(e){return new Promise((t,r)=>{let i=new FileReader;i.onload=()=>t(i.result),i.onerror=()=>r(i.error),i.readAsDataURL(e)})}};var jn=[{tag:"qti-upload-interaction",ctor:zn}];var ih=[...dd,...mn,...fn,...gn,...yn,...vn,...wn,...xn,...qn,...Cn,...En,...kn,...Sn,...An,..._n,...Tn,...On,...Dn,...$n,...Ln,...Vn,...jn];for(let{tag:n,ctor:e}of ih)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of mn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of fn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of gn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of yn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of vn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of wn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of xn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of qn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Cn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of En)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of kn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Sn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of An)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of _n)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Tn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of On)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Dn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of $n)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Ln)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Vn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of jn)customElements.get(n)||customElements.define(n,e);var dM=async n=>{let e=n.substring(0,n.lastIndexOf("/")),t=await ac().load(`${n}`).then(a=>a.assessmentTest()),r=await vr().load(`${e}/${t.href}`).then(a=>a.htmlDoc()),i=await vr().load(`${e}/${t.href}`).then(a=>a.items()),o=`${e}/${t.href}`,s=`${e}/${t.href.substring(0,t.href.lastIndexOf("/"))}`;return{testHTMLDoc:r,testURI:s,testURL:o,items:i,testIdentifier:t.identifier}},hM=async n=>Ve().load(n).then(e=>e.htmlDoc().firstElementChild);var Fn=class extends pu(ue){calculate(){return this.calculateChildren(Array.from(this.children))}};function pu(n){return class extends n{calculateChildren(t){return t.map(i=>{let o=i;if(!o.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let s=o.calculate(),a=!1;if(typeof s=="string")if(s==="true")a=!0;else if(s==="false")a=!1;else return console.error("unexpected val in qti-or, expected boolean"),null;else typeof s=="boolean"&&(a=s);return a}).every(i=>typeof i=="boolean"&&i)}}}var oh=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Nr=class extends k{constructor(){super(...arguments),this.min=0,this.max=1/0}getResult(){let e=this.getVariables();if(!e||e.length===0)return console.error("qti-any-n requires at least one child expression"),null;if(this.min<0||this.max<this.min)return console.error("qti-any-n requires 0 <= min <= max"),null;let t=0;for(let r of e){if(r.cardinality!=="single"||Array.isArray(r.value))return console.error("qti-any-n requires single cardinality boolean expressions"),null;if(r.baseType!=="boolean")return console.error("qti-any-n requires boolean base-type"),null;if(r.value===null||r.value===void 0)return null;r.value==="true"&&t++}return t>=this.min&&t<=this.max}};oh([p({type:Number})],Nr.prototype,"min",void 0);oh([p({type:Number})],Nr.prototype,"max",void 0);var uu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},zi=class extends k{constructor(){super(...arguments),this.baseType="string"}getResult(){return this.textContent.trim()}};uu([p({type:String,attribute:"base-type"})],zi.prototype,"baseType",void 0);var Bn=class extends k{getResult(){if(this.children?.length!==1)return console.error("qti-container-size must have exactly one child expression"),0;let e=this.getVariables();if(!e||e?.length===0)return 0;let t=e[0];return t.value===null||t.value===void 0?0:t.cardinality!=="multiple"&&t.cardinality!=="ordered"?(console.error("qti-container-size requires multiple or ordered cardinality"),0):Array.isArray(t.value)?t.value.length:(console.error("qti-container-size: expected array value for multiple/ordered cardinality"),0)}};var Un=class extends ue{getResult(){let e=this.getVariables();if(this.children.length===2){let t=e[0],r=e[1];if(t.baseType==="directedPair"&&r.baseType==="directedPair"&&t.cardinality==="multiple"){let i=t.value,o=r.value;return i.filter(l=>o.includes(l)).length>0}else if(t.baseType==="directedPair"&&r.baseType==="directedPair"&&t.cardinality==="single"){let i=t.value;return r.value.includes(i)}else console.error("unsupported baseType or cardinality in qti contains, only baseType: directedPair and cardinality: multiple is supported")}else console.error("unexpected number of children in qti contains");return!1}};var Hn=class extends k{get interpretation(){return this.getAttribute("interpretation")||""}getResult(){let e=this.getAttribute("identifier")||"",t=this.context.variables.find(r=>r.identifier===e)||null;return t.cardinality!=="single"?t.correctResponse.length>0?t.correctResponse[0]:"":t.correctResponse}};var Ba=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},tr=class extends k{constructor(){super(...arguments),this.identifier=""}getResult(){if(!this.identifier)return console.error("qti-default requires an identifier attribute"),null;let e=this.identifier.split("."),t=null,r;if(e.length===2)t=e[0],r=e[1];else if(e.length===1)r=e[0];else return console.error("qti-default: invalid identifier format"),null;if(t){let o=this._testContext.items.find(a=>a.identifier===t);if(console.debug(`itemContext: ${JSON.stringify(o)}`),!this._testContext||!o)return console.warn(`qti-default: item "${t}" not found in test context`),null;let s=this._testContext.items.find(a=>a.identifier===t)?.variables.find(a=>a.identifier===r);return s?s.defaultValue||null:(console.warn(`qti-default: variable "${r}" not found in item "${t}"`),null)}if(!this.context?.variables)return console.warn("qti-default: no variables found in item context"),null;let i=this.context.variables.find(o=>o.identifier===r);return i?i.defaultValue||null:(console.warn(`qti-default: variable "${r}" not found in item context`),null)}};Ba([p({type:String})],tr.prototype,"identifier",void 0);Ba([T({context:j,subscribe:!0}),_()],tr.prototype,"context",void 0);Ba([_(),T({context:pe,subscribe:!0})],tr.prototype,"_testContext",void 0);var Wn=class extends k{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];return t.cardinality!=="single"||!Array.isArray(r.value)?(console.error("unexpected cardinality in qti equal"),null):e[0].baseType!==e[1].baseType?(console.error("The baseType of the two variables is different"),null):r.value.filter(o=>!t.value.includes(o))}return null}};var Qn=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length!==2?(console.warn("qti-divide: expected exactly 2 numeric values"),null):e[1]===0?(console.warn("qti-divide: division by zero"),null):e[0]/e[1]}#e(e){let t=[];for(let r of e){if(!r)continue;let i=o=>{if(o==null)return;let s=parseFloat(o.toString());if(Number.isNaN(s)){console.warn("qti-divide: non-numeric value encountered");return}t.push(s)};if(Array.isArray(r.value)){r.value.forEach(o=>i(o));continue}i(r.value)}return t}};var Gn=class extends k{getResult(){let e=this.#e();return e?e[0]>=e[1]:null}#e(){let e=this.getVariables();if(e.length!==2)return console.error("qti-duration-gte requires exactly 2 duration expressions"),null;let t=e.map(r=>this.#t(r));return t.some(r=>r===null)?null:t}#t(e){if(e.cardinality!=="single"||Array.isArray(e.value))return console.error("qti-duration-gte requires single cardinality"),null;if(e.baseType!=="duration")return console.error("qti-duration-gte requires duration base-type"),null;if(e.value===null||e.value===void 0)return null;let t=Number.parseFloat(e.value.toString());return Number.isNaN(t)?(console.error(`qti-duration-gte requires duration values expressed in seconds, got "${e.value.toString()}"`),null):t}};var Xn=class extends k{getResult(){let e=this.#e();return e?e[0]<e[1]:null}#e(){let e=this.getVariables();if(e.length!==2)return console.error("qti-duration-lt requires exactly 2 duration expressions"),null;let t=e.map(r=>this.#t(r));return t.some(r=>r===null)?null:t}#t(e){if(e.cardinality!=="single"||Array.isArray(e.value))return console.error("qti-duration-lt requires single cardinality"),null;if(e.baseType!=="duration")return console.error("qti-duration-lt requires duration base-type"),null;if(e.value===null||e.value===void 0)return null;let t=Number.parseFloat(e.value.toString());return Number.isNaN(t)?(console.error(`qti-duration-lt requires duration values expressed in seconds, got "${e.value.toString()}"`),null):t}};var mu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},ji=class extends k{constructor(){super(...arguments),this.roundingMode="significantFigures"}get figures(){if(!this.getAttribute("figures"))return console.error("figures attribute is missing"),null;let t=parseInt(this.getAttribute("figures")||"0");return isNaN(t)?(console.error("figures attribute is not a number"),null):t<0?(console.error("figures attribute is negative"),null):t<1&&this.roundingMode==="significantFigures"?(console.error("figures cannot be smaller than 1 for RoundingMode significantFigures"),null):t}getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];if(this.roundingMode===null)return null;if(t.cardinality!=="single"||r.cardinality!=="single"||Array.isArray(t.value)||Array.isArray(r.value))return console.error("unexpected cardinality in qti equal"),!1;switch(e[0].baseType){case"integer":case"float":{let i=parseFloat(t.value),o=parseFloat(r.value);if(!isNaN(i)&&!isNaN(o))return this.roundingMode==="significantFigures"?i.toPrecision(this.figures)===o.toPrecision(this.figures):Math.round(i*Math.pow(10,this.figures))/Math.pow(10,this.figures)===Math.round(o*Math.pow(10,this.figures))/Math.pow(10,this.figures);console.error(`value cannot be casted to numeric value in equalRounded operator: ${i}, ${o}`);break}default:{console.error("values other than float and int cannot be used in equalRounded operator.");break}}return!1}return console.error("unexpected number of children in qti-equal-rounded"),null}};mu([p({type:String})],ji.prototype,"roundingMode",void 0);var fu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Fi=class extends k{constructor(){super(...arguments),this.toleranceMode="exact"}getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];return!t||!r?null:this.toleranceMode!=="exact"?(console.error("toleranceMode is not supported yet"),!1):t.cardinality!=="single"||r.cardinality!=="single"||Array.isArray(t.value)||Array.isArray(r.value)?(console.error("unexpected cardinality in qti equal"),!1):t.value===null||r.value===null||t.value===void 0||r.value===void 0?null:J.compareSingleValues(t.value,r.value,t.baseType)}return console.error("unexpected number of children in qti-equal"),null}};fu([p({type:String})],Fi.prototype,"toleranceMode",void 0);var Yn=class extends k{getResult(){let e=this.getAttribute("field-identifier");if(!e)throw new Error("field-identifier attribute is required");if(Array.from(this.children).length!==1)throw new Error("qti-field-value must have exactly one child expression");let r=this.getVariables()[0];if(r.baseType!=="record"||r.value===null)throw new Error("qti-field-value child expression must return a record");let i=r.value[e];if(i===void 0)throw new Error(`Field "${e}" not found in record`);return i}};var Kn=class extends k{getResult(){if(this.children.length===0)return console.error("qti-gcd must have at least one child expression"),null;let e=this.getVariables();if(!e||e.length===0)return null;let t=[];for(let r of e){if(r.baseType!=="integer")return console.error("qti-gcd requires integer base-type"),null;if(r.value===null||r.value===void 0)return null;if(r.cardinality==="single"){if(Array.isArray(r.value))return console.error("qti-gcd unexpected array value for single cardinality"),null;let i=parseInt(r.value,10);if(isNaN(i))return console.error("qti-gcd non-numerical value"),null;t.push(i)}else if(r.cardinality==="multiple"||r.cardinality==="ordered"){if(!Array.isArray(r.value))return console.error("qti-gcd expected array value for multiple/ordered cardinality"),null;for(let i of r.value){if(i==null)return null;let o=parseInt(i,10);if(isNaN(o))return console.error("qti-gcd non-numerical value"),null;t.push(o)}}else return console.error("qti-gcd unsupported cardinality"),null}return t.length===0?null:this.#e(t)}#e(e){if(e.length===0)return 0;if(e.length===1)return Math.abs(e[0]);let t=Math.abs(e[0]);for(let r=1;r<e.length&&(t=this.#t(t,Math.abs(e[r])),t!==1);r++);return t}#t(e,t){if(e===0&&t===0)return 0;if(e===0)return t;if(t===0)return e;for(;t!==0;){let r=t;t=e%t,e=r}return e}};var Jn=class extends k{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];if((t.baseType==="integer"||t.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float"))return+t.value>+r.value;console.error("unexpected baseType or cardinality in qti gt")}return console.error("unexpected number of children in qt"),null}};var Zn=class extends ue{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];return(t.baseType==="integer"||t.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float")?+t.value>=+r.value:(console.error("unexpected baseType or cardinality in qti gte"),null)}return console.log("unexpected number of children in qte"),null}};var gu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Bi=class extends k{getResult(){if(!this.n)return console.error('qti-index: missing required attribute "n"'),null;if(this.children.length!==1)return console.error("qti-index: must have exactly one child container element"),null;let e=this.getVariables()[0];if(!e)return console.error("qti-index: missing container"),null;let t;if(!isNaN(Number(this.n)))t=Number(this.n);else{let r=this.#e(this.n);if(r===null)return console.error(`qti-index: variable "${this.n}" is not a valid number`),null;t=Number(r)}if(t<=0||!Number.isInteger(t))return console.error("qti-index: index must be a positive integer"),null;if(e.cardinality==="ordered"){let r=Array.isArray(e.value)?e.value:[e.value];return e.value===null||t>r.length?null:r[t-1]}else return console.error("qti-index: child must have ordered cardinality"),null}#e(e){let t=this.context.variables.find(r=>r.identifier===e)?.value;return t===null||isNaN(Number(t))?null:Number(t)}};gu([p({type:String})],Bi.prototype,"n",void 0);var nh=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},$r=class extends k{constructor(){super(...arguments),this.shape="",this.coords=""}getResult(){let e=this.getVariables();if(e.length!==1)return console.error("qti-inside requires exactly one point expression"),null;let t=e[0];if(t.cardinality!=="single"||Array.isArray(t.value))return console.error("qti-inside requires single cardinality"),null;if(t.value===null||t.value===void 0)return null;if(!this.shape||!this.coords)return console.error("qti-inside requires shape and coords attributes"),null;let r=this.#e(t.value.toString()),i=this.#t(this.coords);if(!r||i.length===0)return null;switch(this.shape.toLowerCase()){case"circle":return this.#r(r,i);case"rect":return this.#i(r,i);case"ellipse":return this.#n(r,i);case"poly":case"polygon":return this.#o(r,i);default:return console.error(`qti-inside does not support shape "${this.shape}"`),null}}#e(e){let t=e.split(/[,\s]+/).map(o=>o.trim()).filter(Boolean);if(t.length!==2)return console.error('qti-inside requires a point value formatted as "x y" or "x,y"'),null;let r=Number.parseFloat(t[0]),i=Number.parseFloat(t[1]);return Number.isNaN(r)||Number.isNaN(i)?(console.error("qti-inside requires numeric point coordinates"),null):{x:r,y:i}}#t(e){let t=e.split(",").map(r=>r.trim()).filter(Boolean).map(r=>Number.parseFloat(r));return t.some(r=>Number.isNaN(r))?(console.error("qti-inside requires numeric coords"),[]):t}#r(e,t){if(t.length!==3)return console.error("qti-inside circle requires x,y,r"),null;let[r,i,o]=t;return(e.x-r)**2+(e.y-i)**2<=o**2}#i(e,t){if(t.length!==4)return console.error("qti-inside rect requires left,top,right,bottom"),null;let[r,i,o,s]=t,a=Math.min(r,o),l=Math.max(r,o),c=Math.min(i,s),d=Math.max(i,s);return e.x>=a&&e.x<=l&&e.y>=c&&e.y<=d}#n(e,t){if(t.length!==4)return console.error("qti-inside ellipse requires centerX,centerY,radiusX,radiusY"),null;let[r,i,o,s]=t;return o===0||s===0?!1:(e.x-r)**2/o**2+(e.y-i)**2/s**2<=1}#o(e,t){if(t.length<6||t.length%2!==0)return console.error("qti-inside polygon requires at least 3 coordinate pairs"),null;let r=!1;for(let i=0,o=t.length-2;i<t.length;i+=2){let s=t[i],a=t[i+1],l=t[o],c=t[o+1];a>e.y!=c>e.y&&e.x<(l-s)*(e.y-a)/(c-a||Number.EPSILON)+s&&(r=!r),o=i}return r}};nh([p({type:String})],$r.prototype,"shape",void 0);nh([p({type:String})],$r.prototype,"coords",void 0);var es=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length!==2?(console.error("qti-integer-divide requires exactly 2 integer values"),null):e[1]===0?(console.error("qti-integer-divide: division by zero"),null):Math.floor(e[0]/e[1])}#e(e){let t=[];for(let r of e){if(r.baseType!=="integer")return console.error("qti-integer-divide requires integer base-type"),[];if(r.cardinality!=="single"||Array.isArray(r.value))return console.error("qti-integer-divide requires single cardinality"),[];if(r.value===null||r.value===void 0)return[];let i=Number.parseInt(r.value,10);if(Number.isNaN(i))return console.error("qti-integer-divide requires integer values"),[];t.push(i)}return t}};var ts=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length!==2?(console.error("qti-integer-modulus requires exactly 2 integer values"),null):e[1]===0?(console.error("qti-integer-modulus: division by zero"),null):e[0]%e[1]}#e(e){let t=[];for(let r of e){if(r.baseType!=="integer")return console.error("qti-integer-modulus requires integer base-type"),[];if(r.cardinality!=="single"||Array.isArray(r.value))return console.error("qti-integer-modulus requires single cardinality"),[];if(r.value===null||r.value===void 0)return[];let i=Number.parseInt(r.value,10);if(Number.isNaN(i))return console.error("qti-integer-modulus requires integer values"),[];t.push(i)}return t}};var rs=class extends k{getResult(){let e=this.getVariables();if(e.length!==1)return console.error("qti-integer-to-float requires exactly one child expression"),null;let t=e[0];if(t.baseType!=="integer")return console.error("qti-integer-to-float requires integer base-type"),null;if(t.cardinality!=="single"||Array.isArray(t.value))return console.error("qti-integer-to-float requires single cardinality"),null;if(t.value===null||t.value===void 0)return null;let r=Number.parseInt(t.value,10);return Number.isNaN(r)?(console.error("qti-integer-to-float requires an integer value"),null):r}};var is=class extends k{getResult(){if(this.children.length===1){let e=this.getVariables();if(!e)return!0;let t=e[0].value;return t==null||t==null||t===""}return console.error("unexpected number of children in qti Null"),null}};var os=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length===0?(console.error("qti-lcm requires at least one integer value"),null):e.reduce((t,r)=>this.#r(t,r))}#e(e){let t=[];for(let r of e){if(r.baseType!=="integer")return console.error("qti-lcm requires integer base-type"),[];if(r.value===null||r.value===void 0)return[];if(r.cardinality==="single"){if(Array.isArray(r.value))return console.error("qti-lcm unexpected array value for single cardinality"),[];let i=Number.parseInt(r.value,10);if(Number.isNaN(i))return console.error("qti-lcm requires integer values"),[];t.push(i);continue}if(r.cardinality!=="multiple"&&r.cardinality!=="ordered")return console.error("qti-lcm unsupported cardinality"),[];if(!Array.isArray(r.value))return console.error("qti-lcm expected array value for container cardinality"),[];for(let i of r.value){let o=Number.parseInt(i,10);if(Number.isNaN(o))return console.error("qti-lcm requires integer values"),[];t.push(o)}}return t}#t(e,t){let r=Math.abs(e),i=Math.abs(t);for(;i!==0;){let o=r%i;r=i,i=o}return r}#r(e,t){return e===0||t===0?0:Math.abs(e*t/this.#t(e,t))}};var se=class extends C{render(){return b`<slot></slot>`}process(){throw new Error("Not implemented")}};var sh=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Lr=class extends se{get childExpression(){return this.firstElementChild}process(){let e=this.getAttribute("identifier"),t=this.context.variables.find(i=>i.identifier===e)||null,r;return t.interpolationTable&&(r=t.interpolationTable.get(parseFloat(this.childExpression.calculate()))),r==null?(console.warn("lookupOutcomeValue: value is null or undefined"),0):(this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:this.identifier,value:xe(r)}})),r)}};sh([p({type:String})],Lr.prototype,"identifier",void 0);sh([T({context:j,subscribe:!0}),_()],Lr.prototype,"context",void 0);var ns=class extends k{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];if((t.baseType==="integer"||t.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float"))return+t.value<+r.value;console.error("unexpected baseType or cardinality in qti lt")}return console.error("unexpected number of children in lt"),null}};var ss=class extends ue{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];return(t.baseType==="integer"||t.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float")?+t.value<=+r.value:(console.error("unexpected baseType or cardinality in qti lte"),null)}return console.log("unexpected number of children in lte"),null}};var bu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Ui=class extends k{getResult(){let e=this.context.variables.find(s=>s.identifier===this.identifier);if(!e)return console.warn(`Response ${this.identifier} cannot be found`),null;let t=e.areaMapping;if(!t)return console.warn(`Area mapping not found for response ${this.identifier}`),null;let r=Array.isArray(e.value)?e.value:[e.value];if(!r||r.length===0)return console.warn(`No candidate responses for response ${this.identifier}`),null;let i=0,o=new Set;for(let s of r)for(let a of t.areaMapEntries){if(o.has(a.coords))continue;J.isPointInArea(s,`${a.shape},${a.coords}`,e.baseType)&&(i+=a.mappedValue??0,o.add(a.coords))}return o.size<r.length&&(i+=t.defaultValue),t.lowerBound!=null&&(i=Math.max(t.lowerBound,i)),t.upperBound!=null&&(i=Math.min(t.upperBound,i)),i}};bu([p({type:String})],Ui.prototype,"identifier",void 0);var yu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Hi=class extends k{getResult(){let e=this.context.variables.find(o=>o.identifier===this.identifier);if(!e||!e.mapping)return console.error(`Response ${this.identifier} can not be found`),null;let t=e.mapping,r=Array.isArray(e.value)?e.value:[e.value],i=0;for(let o of r){let s=t.mapEntries.filter(l=>e.baseType==="string"&&!l.caseSensitive?J.compareSingleValues(l.mapKey.toLowerCase(),o.toLowerCase(),e.baseType):J.compareSingleValues(l.mapKey,o,e.baseType)),a=s.reduce((l,c)=>l.mappedValue>c.mappedValue?l:c,s.length>0?s[0]:{mapKey:null,mappedValue:null});a===null||a.mappedValue==null?i+=t.defaultValue:i+=a.mappedValue}return t?.lowerBound!==null&&t?.lowerBound!==void 0&&(i=Math.max(t.lowerBound,i)),t?.upperBound!==null&&t?.upperBound!==void 0&&(i=Math.min(t.upperBound,i)),i}};yu([p({type:String})],Hi.prototype,"identifier",void 0);var as=class n extends k{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];return n.match(t,r)}return console.error("unexpected number of children in match"),null}static match(e,t){if(e.value===null)return!1;switch(t.cardinality){case"single":return Array.isArray(e.value)||Array.isArray(t.value)?(console.error("unexpected cardinality in qti match"),!1):J.compareSingleValues(e.value?.toString(),t.value.toString(),t.baseType);case"ordered":{if(!Array.isArray(e.value)||!Array.isArray(t.value))return console.error("unexpected cardinality in qti match"),!1;if(e.value.length!==t.value.length)return!1;for(let r=0;r<e.value.length;r++)if(!J.compareSingleValues(t.value[r],e.value[r],t.baseType))return!1;return!0}case"multiple":{if(!Array.isArray(e.value)||!Array.isArray(t.value))return console.error("unexpected cardinality in qti match"),!1;if(e.value.length!==t.value.length)return!1;let r=0;for(let i of t.value){let o=null,s=[...e.value];for(let a of s)if(J.compareSingleValues(i,a,t.baseType)){o=a;break}if(o!==null)s.splice(s.indexOf(o),1);else return!1;r++}return!0}default:return console.error("unexpected cardinality in qti match"),!1}}};var vu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Wi=class extends k{constructor(){super(...arguments),this.name=""}getResult(){if(!this.name)return console.error("qti-math-operator requires a name attribute"),null;let e=this.getVariables();if(!e||e.length===0)return null;let t=[];for(let r of e){if(r.cardinality!=="single")return console.error("qti-math-operator requires single cardinality"),null;if(Array.isArray(r.value))return console.error("qti-math-operator unexpected array value for single cardinality"),null;if(r.value===null||r.value===void 0)return null;if(r.baseType!=="integer"&&r.baseType!=="float")return console.error("qti-math-operator requires numerical base-type"),null;let i=parseFloat(r.value);if(isNaN(i))return console.error("qti-math-operator non-numerical value"),null;t.push(i)}return this.#e(this.name,t)}#e(e,t){try{switch(e.toLowerCase()){case"sin":return t.length!==1?null:Math.sin(t[0]);case"cos":return t.length!==1?null:Math.cos(t[0]);case"tan":return t.length!==1?null:Math.tan(t[0]);case"asin":return t.length!==1||t[0]<-1||t[0]>1?null:Math.asin(t[0]);case"acos":return t.length!==1||t[0]<-1||t[0]>1?null:Math.acos(t[0]);case"atan":return t.length!==1?null:Math.atan(t[0]);case"sinh":return t.length!==1?null:Math.sinh(t[0]);case"cosh":return t.length!==1?null:Math.cosh(t[0]);case"tanh":return t.length!==1?null:Math.tanh(t[0]);case"log":return t.length!==1||t[0]<=0?null:Math.log(t[0]);case"ln":return t.length!==1||t[0]<=0?null:Math.log(t[0]);case"log10":return t.length!==1||t[0]<=0?null:Math.log10(t[0]);case"exp":return t.length!==1?null:Math.exp(t[0]);case"abs":return t.length!==1?null:Math.abs(t[0]);case"sqrt":return t.length!==1||t[0]<0?null:Math.sqrt(t[0]);case"signum":return t.length!==1?null:Math.sign(t[0]);case"floor":return t.length!==1?null:Math.floor(t[0]);case"ceil":return t.length!==1?null:Math.ceil(t[0]);case"round":return t.length!==1?null:Math.round(t[0]);case"atan2":return t.length!==2?null:Math.atan2(t[0],t[1]);case"pow":{if(t.length!==2)return null;let r=t[0],i=t[1];return r===0&&i<=0||r<0&&!Number.isInteger(i)?null:Math.pow(r,i)}case"log_base":{if(t.length!==2)return null;let r=t[0],i=t[1];return r<=0||i<=0||i===1?null:Math.log(r)/Math.log(i)}case"mod":return t.length!==2||t[1]===0?null:t[0]%t[1];case"max":return t.length<1?null:Math.max(...t);case"min":return t.length<1?null:Math.min(...t);default:return console.error(`qti-math-operator: unknown operation "${e}"`),null}}catch(r){return console.error(`qti-math-operator: error performing operation "${e}":`,r),null}}};vu([p({type:String})],Wi.prototype,"name",void 0);var ls=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length===0?(console.warn("qti-max: no numeric values provided"),null):Math.max(...e)}#e(e){let t=[];for(let r of e){if(!r)continue;let i=o=>{if(o==null)return;let s=parseFloat(o.toString());if(Number.isNaN(s)){console.warn("qti-max: non-numeric value encountered");return}t.push(s)};if(Array.isArray(r.value)){r.value.forEach(o=>i(o));continue}i(r.value)}return t}};var cs=class extends k{getResult(){let e=this.getVariables();this.children.length!==2&&console.warn("The member operator takes two sub-expressions");let[t,r]=e;if(t.baseType===r.baseType||t.baseType==="integer"&&r.baseType==="float"||t.baseType==="float"&&r.baseType==="integer"||console.warn("Which must both have the same base-type"),r.cardinality==="multiple"||r.cardinality==="ordered"||console.warn("and the second must be a multiple or ordered container"),(t.baseType==="float"||r.baseType==="float")&&console.warn("The member operator should not be used on sub-expressions with a base-type of float"),(t.baseType==="duration"||r.baseType==="duration")&&console.warn("It must not be used on sub-expressions with a base-type of duration"),t.value===null||r.value===null)return null;let i=t.value;return r.value.includes(i)}};var ds=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length===0?(console.warn("qti-min: no numeric values provided"),null):Math.min(...e)}#e(e){let t=[];for(let r of e){if(!r)continue;let i=o=>{if(o==null)return;let s=parseFloat(o.toString());if(Number.isNaN(s)){console.warn("qti-min: non-numeric value encountered");return}t.push(s)};if(Array.isArray(r.value)){r.value.forEach(o=>i(o));continue}i(r.value)}return t}};var hs=class extends k{getResult(){console.debug("qti-multiple getResult called",this.innerHTML);let e=this.getVariables();if(e.length===0)return console.error("unexpected number of children in qti multiple"),null;for(let t of e)if(t.cardinality!=="multiple"&&t.cardinality!=="single")return console.error("unexpected cardinality in qti multiple"),[];return e}};var ps=class extends k{render(){return b`${super.render()}`}getResult(){return!this.firstElementChild.calculate()}};var us=class extends k{getResult(){return null}};var ms=class extends ue{getResult(){return Array.from(this.children).map(t=>{let r=t;if(!r.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let i=r.calculate(),o=!1;if(typeof i=="string")if(i==="true")o=!0;else if(i==="false")o=!1;else return console.error("unexpected val in qti-or, expected boolean"),null;else typeof i=="boolean"&&(o=i);return o}).some(t=>typeof t=="boolean"&&t)}};var fs=class extends k{getResult(){let e=this.getVariables();if(e.length===0)return console.error("unexpected number of children in qti multiple"),null;for(let t of e)if(t.cardinality!=="ordered"&&t.cardinality!=="single")return console.error("unexpected cardinality in qti ordered"),[];return e}};var wu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Qi=class extends k{constructor(){super(...arguments),this.pattern=""}getResult(){let e=this.getVariables();if(e.length!==1)return console.error("qti-pattern-match requires exactly one child expression"),null;if(!this.pattern)return console.error("qti-pattern-match requires a pattern attribute"),null;let t=e[0];if(t.cardinality!=="single"||Array.isArray(t.value))return console.error("qti-pattern-match requires single cardinality"),null;if(t.value===null||t.value===void 0)return null;try{return new RegExp(this.pattern).test(t.value.toString())}catch(r){return console.error("qti-pattern-match requires a valid regular expression",r),null}}};wu([p({type:String})],Qi.prototype,"pattern",void 0);var gs=class extends k{getResult(){if(this.children.length!==2)return console.error("qti-power must have exactly two child expressions"),null;let e=this.getVariables();if(!e||e.length!==2)return null;let[t,r]=e;if(t.cardinality!=="single"||r.cardinality!=="single")return console.error("qti-power requires single cardinality for both expressions"),null;if(Array.isArray(t.value)||Array.isArray(r.value))return console.error("qti-power unexpected array value for single cardinality"),null;if(t.value===null||t.value===void 0||r.value===null||r.value===void 0)return null;if(t.baseType!=="integer"&&t.baseType!=="float"||r.baseType!=="integer"&&r.baseType!=="float")return console.error("qti-power requires numerical base-types"),null;let i=parseFloat(t.value),o=parseFloat(r.value);if(isNaN(i)||isNaN(o))return console.error("qti-power: non-numerical values encountered"),null;if(i===0&&o<=0||i<0&&!Number.isInteger(o))return null;let s;try{s=Math.pow(i,o)}catch(a){return console.error("qti-power: error calculating power:",a),null}if(isNaN(s))return null;if(s===1/0||s===-1/0)return s;if(!isFinite(s)||Math.abs(s)>Number.MAX_VALUE||s!==0&&Math.abs(s)<Number.MIN_VALUE)return null;if(isFinite(s)&&s!==0){let a=Math.floor(Math.log10(Math.abs(s))),l=Math.max(0,14-a),c=Math.pow(10,l);s=Math.round(s*c)/c}return s}};var ah=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Vr=class extends C{render(){let e=this.context?.variables.find(t=>t.identifier===this.identifier)?.value;return e===null?P:b`${JSON.stringify(e,null,2)}`}calculate(){return this.context.variables.find(t=>t.identifier===this.identifier)||null}};ah([p({type:String})],Vr.prototype,"identifier",void 0);ah([T({context:j,subscribe:!0}),_()],Vr.prototype,"context",void 0);var bs=class extends k{getResult(){return this.getVariables().reduce((r,i)=>{if(i.baseType=="float"||i.baseType=="integer")try{return r*parseFloat(i.value.toString())}catch{console.warn("can not convert to number")}else console.warn(`has another baseType ${i.baseType}`);return r},1)}};var Ua=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},rr=class extends k{constructor(){super(...arguments),this.min=0,this.max=10,this.step=1}getResult(){if(this.min>this.max)return console.error("qti-random-integer: min cannot be greater than max"),this.min;if(this.step<=0)return console.error("qti-random-integer: step must be positive"),this.min;let e=[],t=0;for(;;){let i=this.min+this.step*t;if(i>this.max)break;Number.isInteger(i)&&e.push(i),t++}if(e.length===0)return console.warn("qti-random-integer: no valid integer values in range"),Number.isInteger(this.min)?this.min:Math.floor(this.min);let r=Math.floor(Math.random()*e.length);return e[r]}getPossibleValues(){let e=[];if(this.min>this.max||this.step<=0)return[Number.isInteger(this.min)?this.min:Math.floor(this.min)];let t=0;for(;;){let r=this.min+this.step*t;if(r>this.max)break;Number.isInteger(r)&&e.push(r),t++}return e.length>0?e:[Number.isInteger(this.min)?this.min:Math.floor(this.min)]}};Ua([p({type:Number})],rr.prototype,"min",void 0);Ua([p({type:Number})],rr.prototype,"max",void 0);Ua([p({type:Number})],rr.prototype,"step",void 0);var ys=class extends k{getResult(){let e=this.getVariables();if(e.length===1){let t=e[0].value;if(Array.isArray(t)){let r=Math.floor(Math.random()*t.length);return t[r]}return t}return console.error("unexpected number of children in match"),null}};var xu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Gi=class extends k{constructor(){super(...arguments),this.numberRepeats=""}getResult(){let e=this.#e();if(e<=0)return[];let t=this.firstElementChild;if(!t)return console.warn("qti-repeat: missing child expression"),[];let r=[];for(let i=0;i<e;i++){let o=t.calculate(),s=this.#t(o);s&&r.push(s)}return r}#e(){if(!this.numberRepeats)return console.warn("qti-repeat: missing number-repeats attribute"),0;let e=parseInt(this.numberRepeats,10);if(!Number.isNaN(e))return e;let t=this.numberRepeats,r=this.context?.variables?.find(s=>s.identifier===t);if(!r)return console.warn(`qti-repeat: unknown identifier "${t}"`),0;let i=Array.isArray(r.value)?r.value[0]:r.value,o=parseInt(i?.toString()??"",10);return Number.isNaN(o)?(console.warn(`qti-repeat: invalid repeat count from "${t}"`),0):o}#t(e){if(e==null)return null;if(typeof e=="number")return{identifier:"",cardinality:"single",baseType:Number.isInteger(e)?"integer":"float",value:e.toString(),type:"response"};if(typeof e=="string"){let t=parseFloat(e);if(!Number.isNaN(t))return{identifier:"",cardinality:"single",baseType:Number.isInteger(t)?"integer":"float",value:e.toString(),type:"response"}}if(e&&typeof e=="object"&&"value"in e){let t=e.value;return{identifier:"",cardinality:"single",baseType:e.baseType??"string",value:t!=null?t.toString():null,type:"response"}}return{identifier:"",cardinality:"single",baseType:"string",value:e.toString(),type:"response"}}};xu([p({type:String,attribute:"number-repeats"})],Gi.prototype,"numberRepeats",void 0);var vs=class extends se{render(){return b`<slot></slot>`}process(){let e=[...this.children];for(let t=0;t<e.length;t++){let r=e[t];if(r.calculate()){r.process();return}}}};var zr=class extends C{render(){return b`<slot></slot>`}calculate(){return!0}getSubRules(){return[...this.children]}process(){let e=this.getSubRules();for(let t=0;t<e.length;t++)e[t].process()}};var jr=class extends zr{calculate(){return this.firstElementChild.calculate()}getSubRules(){let e=[];for(let t=1;t<this.children.length;t++)e.push(this.children[t]);return e}};var ws=class extends jr{render(){return b`${super.render()}`}};var lh=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Fr=class extends k{constructor(){super(...arguments),this.roundingMode="significantFigures",this.figures=3}getResult(){if(this.children.length!==1)return console.error("qti-round-to must have exactly one child expression"),null;let e=this.getVariables();if(!e||e.length===0)return null;let t=e[0];if(t.cardinality!=="single")return console.error("qti-round-to requires single cardinality"),null;if(Array.isArray(t.value))return console.error("qti-round-to unexpected array value for single cardinality"),null;if(t.value===null||t.value===void 0)return null;if(t.baseType!=="integer"&&t.baseType!=="float")return console.error("qti-round-to requires numerical base-type"),null;let r=parseFloat(t.value);return isNaN(r)?null:isFinite(r)?this.figures<0?(console.error("qti-round-to: figures must be non-negative"),null):this.roundingMode==="significantFigures"&&this.figures<1?(console.error("qti-round-to: figures must be at least 1 for significantFigures mode"),null):this.roundingMode==="decimalPlaces"?this.#e(r,this.figures):this.#t(r,this.figures):r===1/0?1/0:r===-1/0?-1/0:null}#e(e,t){if(e===0)return 0;let r=Math.pow(10,t);return Math.round(e*r)/r}#t(e,t){if(e===0)return 0;let r=Math.floor(Math.log10(Math.abs(e))),i=Math.pow(10,t-r-1);return Math.round(e*i)/i}};lh([p({type:String,attribute:"rounding-mode"})],Fr.prototype,"roundingMode",void 0);lh([p({type:Number})],Fr.prototype,"figures",void 0);var xs=class extends k{getResult(){if(this.children.length!==1)return console.error("qti-round must have exactly one child expression"),null;let e=this.getVariables();if(!e||e.length===0)return null;let t=e[0];if(t.cardinality!=="single")return console.error("qti-round requires single cardinality"),null;if(Array.isArray(t.value))return console.error("qti-round unexpected array value for single cardinality"),null;if(t.value===null||t.value===void 0)return null;if(t.baseType!=="integer"&&t.baseType!=="float")return console.error("qti-round requires numerical base-type (integer or float)"),null;let r=parseFloat(t.value);return isNaN(r)?(console.warn("qti-round: NaN input results in NULL"),null):isFinite(r)?Math.floor(r+.5):r===1/0?1/0:r===-1/0?-1/0:null}};var qs=class extends se{process(){let e=this.getAttribute("identifier");if(!e){console.warn('QtiSetCorrectResponse: Missing "identifier" attribute.');return}let t=this.firstElementChild;if(!t){console.warn("QtiSetCorrectResponse: No expression found.");return}let i=new Ha(t).process();this.dispatchEvent(new CustomEvent("qti-set-correct-response",{bubbles:!0,composed:!0,detail:{responseIdentifier:e,value:this.#e(i)}}))}#e(e){return e==null?null:Array.isArray(e)?e.map(t=>xe(this.#t(t))):xe(this.#t(e))}#t(e){if(e&&typeof e=="object"&&"value"in e){let t=e.value;return t!=null?t.toString():""}return e?.toString()??""}},Ha=class{constructor(e){this.expression=e}process(){let e=this.expression.calculate()??null;return e===null&&console.warn("QtiSetCorrectResponseRule: Evaluated value is null."),Array.isArray(e)?e.map(t=>this.#e(t)):this.#e(e)}#e(e){return e&&typeof e=="object"&&"value"in e?e.value:e}};var Cs=class extends se{process(){let e=this.getAttribute("identifier");if(!e){console.warn('QtiSetOutcomeValue: Missing "identifier" attribute.');return}let t=this.firstElementChild;if(!t){console.warn("QtiSetOutcomeValue: No expression found.");return}let i=new Wa(t).process();this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:e,value:this.#e(i)}}))}#e(e){return Array.isArray(e)?e.map(xe):e!==null?xe(e):null}},Wa=class{constructor(e){this.expression=e}process(){let e=this.expression.calculate()??null;return e===null&&console.warn("QtiSetOutcomeValueRule: Evaluated value is null."),Array.isArray(e)?e.map(t=>t.value?t.value:t):e}};var Es=class extends se{process(){let e=this.getAttribute("identifier");if(!e){console.warn('QtiSetTemplateValue: Missing "identifier" attribute.');return}let t=this.firstElementChild;if(!t){console.warn("QtiSetTemplateValue: No expression found.");return}let i=new Qa(t).process();this.dispatchEvent(new CustomEvent("qti-set-template-value",{bubbles:!0,composed:!0,detail:{templateIdentifier:e,value:this.#e(i)}}))}#e(e){return e==null?null:Array.isArray(e)?e.map(t=>xe(this.#t(t))):xe(this.#t(e))}#t(e){if(e&&typeof e=="object"&&"value"in e){let t=e.value;return t!=null?t.toString():""}return e?.toString()??""}},Qa=class{constructor(e){this.expression=e}process(){let e=this.expression.calculate()??null;return e===null&&console.warn("QtiSetTemplateValueRule: Evaluated value is null."),Array.isArray(e)?e.map(t=>this.#e(t)):this.#e(e)}#e(e){return e&&typeof e=="object"&&"value"in e?e.value:e}};var qu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Xi=class extends k{constructor(){super(...arguments),this.name=""}getResult(){if(!this.name)return console.warn("qti-stats-operator: missing name attribute"),null;let e=this.#t(this.getVariables());if(e.length===0)return console.warn("qti-stats-operator: no numeric values provided"),null;switch(this.name.toLowerCase()){case"mean":return e.reduce((t,r)=>t+r,0)/e.length;case"popsd":return this.#e(e);default:return console.warn(`qti-stats-operator: unsupported operator "${this.name}"`),null}}#e(e){let t=e.reduce((i,o)=>i+o,0)/e.length,r=e.reduce((i,o)=>i+Math.pow(o-t,2),0)/e.length;return Math.sqrt(r)}#t(e){let t=[];for(let r of e){if(!r)continue;let i=o=>{if(o==null)return;let s=parseFloat(o.toString());if(Number.isNaN(s)){console.warn("qti-stats-operator: non-numeric value encountered");return}t.push(s)};if(Array.isArray(r.value)){r.value.forEach(o=>i(o));continue}i(r.value)}return t}};qu([p({type:String})],Xi.prototype,"name",void 0);var Cu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Yi=class extends k{constructor(){super(...arguments),this.caseSensitive="true"}getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];if(t.cardinality!=="single"||r.cardinality!=="single"||Array.isArray(t.value)||Array.isArray(r.value))return console.error("unexpected cardinality in qti string-match"),!1;let i=this.caseSensitive==="true"?t.value:t.value.toLowerCase(),o=this.caseSensitive==="true"?r.value:r.value.toLowerCase();return J.compareSingleValues(i,o,t.baseType)}return console.error("unexpected number of children in qti-string-match"),null}};Cu([p({type:String,attribute:"case-sensitive"})],Yi.prototype,"caseSensitive",void 0);var Eu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Ki=class extends k{constructor(){super(...arguments),this.caseSensitive="true"}getResult(){let e=this.getVariables();if(e.length!==2)return console.error("qti-substring requires exactly 2 child expressions"),null;let[t,r]=e;if(t.cardinality!=="single"||r.cardinality!=="single"||Array.isArray(t.value)||Array.isArray(r.value))return console.error("qti-substring requires single cardinality"),null;if(t.value===null||r.value===null||t.value===void 0||r.value===void 0)return null;let i=t.value.toString(),o=r.value.toString();return this.caseSensitive!=="true"?o.toLowerCase().includes(i.toLowerCase()):o.includes(i)}};Eu([p({type:String,attribute:"case-sensitive"})],Ki.prototype,"caseSensitive",void 0);var ks=class extends ku(k){getResult(){return this.calculateChildren(Array.from(this.children))}};function ku(n){return class extends n{calculateChildren(t){let r=t.map(i=>{if(!i.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let o=i.calculate();return Number.isNaN(o)?(console.error("Unexpected value in qti-subtract, expected number"),null):Number(o)});return r.some(i=>i===null)?(console.error("One or more child expressions returned invalid values"),0):r[0]-r[1]}}}var Ss=class extends k{getResult(){return new Ga(Array.from(this.children)).calculate()}},Ga=class{constructor(e){this.expressions=e}calculate(){return this.expressions.filter(r=>r.calculate!==void 0).some(r=>r.calculate()===null)?null:this.expressions.map(r=>{let i=r.calculate();return Number.isNaN(i)?(console.error("unexpected value in qti-sum, expected number"),null):Number(i)}).reduce((r,i)=>r+i,0)}};var As=class extends k{getResult(){let e=this.getVariables();if(e.length!==1)return console.error("qti-truncate requires exactly one child expression"),null;let t=e[0];if(t.cardinality!=="single"||Array.isArray(t.value))return console.error("qti-truncate requires single cardinality"),null;if(t.baseType!=="integer"&&t.baseType!=="float")return console.error("qti-truncate requires numerical base-type"),null;if(t.value===null||t.value===void 0)return null;let r=Number.parseFloat(t.value);return Number.isNaN(r)?(console.error("qti-truncate requires a numerical value"),null):Math.trunc(r)}};var Is=class extends k{getResult(){let e=this.getAttribute("identifier");return this.context.variables.find(r=>r.identifier===e).value}};var ch=[{tag:"qti-and",ctor:Fn},{tag:"qti-any-n",ctor:Nr},{tag:"qti-base-value",ctor:zi},{tag:"qti-container-size",ctor:Bn},{tag:"qti-contains",ctor:Un},{tag:"qti-correct",ctor:Hn},{tag:"qti-default",ctor:tr},{tag:"qti-delete",ctor:Wn},{tag:"qti-divide",ctor:Qn},{tag:"qti-duration-gte",ctor:Gn},{tag:"qti-duration-lt",ctor:Xn},{tag:"qti-equal",ctor:Fi},{tag:"qti-equal-rounded",ctor:ji},{tag:"qti-field-value",ctor:Yn},{tag:"qti-gcd",ctor:Kn},{tag:"qti-gt",ctor:Jn},{tag:"qti-gte",ctor:Zn},{tag:"qti-index",ctor:Bi},{tag:"qti-inside",ctor:$r},{tag:"qti-integer-divide",ctor:es},{tag:"qti-integer-modulus",ctor:ts},{tag:"qti-integer-to-float",ctor:rs},{tag:"qti-is-null",ctor:is},{tag:"qti-lcm",ctor:os},{tag:"qti-lookup-outcome-value",ctor:Lr},{tag:"qti-lt",ctor:ns},{tag:"qti-lte",ctor:ss},{tag:"qti-map-response",ctor:Hi},{tag:"qti-map-response-point",ctor:Ui},{tag:"qti-match",ctor:as},{tag:"qti-math-operator",ctor:Wi},{tag:"qti-max",ctor:ls},{tag:"qti-member",ctor:cs},{tag:"qti-min",ctor:ds},{tag:"qti-multiple",ctor:hs},{tag:"qti-not",ctor:ps},{tag:"qti-null",ctor:us},{tag:"qti-or",ctor:ms},{tag:"qti-ordered",ctor:fs},{tag:"qti-pattern-match",ctor:Qi},{tag:"qti-power",ctor:gs},{tag:"qti-printed-variable",ctor:Vr},{tag:"qti-product",ctor:bs},{tag:"qti-random",ctor:ys},{tag:"qti-random-integer",ctor:rr},{tag:"qti-repeat",ctor:Gi},{tag:"qti-response-condition",ctor:vs},{tag:"qti-response-else",ctor:zr},{tag:"qti-response-else-if",ctor:ws},{tag:"qti-response-if",ctor:jr},{tag:"qti-round",ctor:xs},{tag:"qti-round-to",ctor:Fr},{tag:"qti-rule",ctor:se},{tag:"qti-set-correct-response",ctor:qs},{tag:"qti-set-outcome-value",ctor:Cs},{tag:"qti-set-template-value",ctor:Es},{tag:"qti-stats-operator",ctor:Xi},{tag:"qti-string-match",ctor:Yi},{tag:"qti-substring",ctor:Ki},{tag:"qti-subtract",ctor:ks},{tag:"qti-sum",ctor:Ss},{tag:"qti-truncate",ctor:As},{tag:"qti-variable",ctor:Is}];for(let{tag:n,ctor:e}of ch)customElements.get(n)||customElements.define(n,e);var nt=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},X;(function(n){n.Correct="correct",n.PartiallyCorrect="partially-correct",n.Incorrect="incorrect"})(X||(X={}));var Xa=n=>{class e extends n{constructor(){super(...arguments),this.showCorrectResponse=!1,this._handleShowCorrectResponseChange=(r,i)=>{this.toggleInternalCorrectResponse(i)},this.showFullCorrectResponse=!1,this._handleShowFullCorrectResponseChange=(r,i)=>{this.toggleFullCorrectResponse(i)},this.showCandidateCorrection=!1,this._handleShowCandidateCorrectionChange=(r,i)=>{this.toggleCandidateCorrection(i)},this._correctResponse=null}set correctResponseAttr(r){this._correctResponse=r}get correctResponseAttr(){return this._correctResponse}get isFullCorrectResponse(){return this._isFullCorrectResponse}get registersWithItem(){return!this.isFullCorrectResponse&&super.registersWithItem}set isFullCorrectResponse(r){this._isFullCorrectResponse=r,r&&(this.setAttribute("inert",""),this.setAttribute("response-identifier",this.responseIdentifier+"_cr"),this.setAttribute("answer-key",""))}get correctResponse(){let r=this.responseVariable;return r?.correctResponse?r.correctResponse:this._correctResponse}set correctResponse(r){let i=this._correctResponse;this._correctResponse=r,r==null?this.removeAttribute("correct-response"):this.setAttribute("correct-response",Array.isArray(r)?r.join(","):r),this.requestUpdate("_correctResponse",i)}get correctness(){let r=this.correctResponse;if(!r)return null;let i=this.response;if(i==null||i===""||Array.isArray(i)&&i.length===0)return null;let o=Array.isArray(r)?r:[r],a=(Array.isArray(i)?i:[i]).filter(d=>d!=="");if(a.length===0)return null;let l=a.filter(d=>o.includes(d)).length,c=a.filter(d=>!o.includes(d)).length;return l===o.length&&c===0&&a.length===o.length?X.Correct:l>0&&(l<o.length||c>0)?X.PartiallyCorrect:X.Incorrect}get correctionPart(){return"correction"}toggleCorrectResponse(r){(this.configContext?.correctResponseMode||"internal")==="full"?this.toggleFullCorrectResponse(r):this.toggleInternalCorrectResponse(r)}get withholdsFullCorrectResponseWhenCorrect(){return this.configContext?.fullCorrectResponseOnlyWhenIncorrect!==!1}async toggleFullCorrectResponse(r){let i=this.nextSibling,o=i instanceof HTMLDivElement&&i?.classList.contains("full-correct-response"),s=this.correctResponse;if(!s)return;if(!(r&&(!this.withholdsFullCorrectResponseWhenCorrect||this.correctness!==X.Correct))){if(!o)return;this.parentElement?.removeChild(i);return}if(o)return;let l=this.cloneNode(!0);l.removeAttribute("show-full-correct-response"),l.removeAttribute("show-correct-response"),l.removeAttribute("show-candidate-correction");let c=document.createElement("div");c.classList.add("full-correct-response"),this.isInline?c.classList.add("full-correct-response-inline"):c.classList.add("full-correct-response-block"),c.role="full-correct-response",c.appendChild(l),l.isFullCorrectResponse=!0,this.parentElement?.insertBefore(c,this.nextSibling),await l.updateComplete,l.response=Array.isArray(s)?[...s]:s}toggleInternalCorrectResponse(r){this._internals.states.delete("show-correct-response"),r&&this.correctResponse&&this._internals.states.add("show-correct-response")}toggleCandidateCorrection(r){}firstUpdated(){super.firstUpdated(),!this.isFullCorrectResponse&&(this.showCorrectResponse&&this.toggleInternalCorrectResponse(!0),this.showFullCorrectResponse&&this.toggleFullCorrectResponse(!0))}}return nt([p({attribute:"correct-response",reflect:!0,converter:$e({emptyAs:null})})],e.prototype,"correctResponseAttr",null),nt([p({type:Boolean,attribute:"show-correct-response",reflect:!0})],e.prototype,"showCorrectResponse",void 0),nt([$("showCorrectResponse",{waitUntilFirstUpdate:!0})],e.prototype,"_handleShowCorrectResponseChange",void 0),nt([p({type:Boolean,attribute:"show-full-correct-response",reflect:!0})],e.prototype,"showFullCorrectResponse",void 0),nt([$("showFullCorrectResponse",{waitUntilFirstUpdate:!0})],e.prototype,"_handleShowFullCorrectResponseChange",void 0),nt([p({type:Boolean,attribute:"show-candidate-correction",reflect:!0})],e.prototype,"showCandidateCorrection",void 0),nt([$("showCandidateCorrection",{waitUntilFirstUpdate:!0})],e.prototype,"_handleShowCandidateCorrectionChange",void 0),nt([_()],e.prototype,"_isFullCorrectResponse",void 0),nt([_()],e.prototype,"_correctResponse",void 0),e};var re=q`
9518
+ `}async#r(e){let t=e.target;t.files&&t.files.length>0&&(this.#e=t.files[0],this.#t=await this.#i(this.#e),this.saveResponse(this.#t),this.dispatchEvent(new CustomEvent("qti-interaction-response",{detail:{response:this.#t}})))}#i(e){return new Promise((t,r)=>{let i=new FileReader;i.onload=()=>t(i.result),i.onerror=()=>r(i.error),i.readAsDataURL(e)})}};var jn=[{tag:"qti-upload-interaction",ctor:zn}];var ih=[...dd,...mn,...fn,...gn,...yn,...vn,...wn,...xn,...qn,...Cn,...En,...kn,...Sn,...An,..._n,...Tn,...On,...Dn,...$n,...Ln,...Vn,...jn];for(let{tag:n,ctor:e}of ih)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of mn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of fn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of gn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of yn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of vn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of wn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of xn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of qn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Cn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of En)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of kn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Sn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of An)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of _n)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Tn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of On)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Dn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of $n)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Ln)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of Vn)customElements.get(n)||customElements.define(n,e);for(let{tag:n,ctor:e}of jn)customElements.get(n)||customElements.define(n,e);var pM=async n=>{let e=n.substring(0,n.lastIndexOf("/")),t=await ac().load(`${n}`).then(a=>a.assessmentTest()),r=await vr().load(`${e}/${t.href}`).then(a=>a.htmlDoc()),i=await vr().load(`${e}/${t.href}`).then(a=>a.items()),o=`${e}/${t.href}`,s=`${e}/${t.href.substring(0,t.href.lastIndexOf("/"))}`;return{testHTMLDoc:r,testURI:s,testURL:o,items:i,testIdentifier:t.identifier}},uM=async n=>Ve().load(n).then(e=>e.htmlDoc().firstElementChild);var Fn=class extends pu(ue){calculate(){return this.calculateChildren(Array.from(this.children))}};function pu(n){return class extends n{calculateChildren(t){return t.map(i=>{let o=i;if(!o.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let s=o.calculate(),a=!1;if(typeof s=="string")if(s==="true")a=!0;else if(s==="false")a=!1;else return console.error("unexpected val in qti-or, expected boolean"),null;else typeof s=="boolean"&&(a=s);return a}).every(i=>typeof i=="boolean"&&i)}}}var oh=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Nr=class extends k{constructor(){super(...arguments),this.min=0,this.max=1/0}getResult(){let e=this.getVariables();if(!e||e.length===0)return console.error("qti-any-n requires at least one child expression"),null;if(this.min<0||this.max<this.min)return console.error("qti-any-n requires 0 <= min <= max"),null;let t=0;for(let r of e){if(r.cardinality!=="single"||Array.isArray(r.value))return console.error("qti-any-n requires single cardinality boolean expressions"),null;if(r.baseType!=="boolean")return console.error("qti-any-n requires boolean base-type"),null;if(r.value===null||r.value===void 0)return null;r.value==="true"&&t++}return t>=this.min&&t<=this.max}};oh([p({type:Number})],Nr.prototype,"min",void 0);oh([p({type:Number})],Nr.prototype,"max",void 0);var uu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},zi=class extends k{constructor(){super(...arguments),this.baseType="string"}getResult(){return this.textContent.trim()}};uu([p({type:String,attribute:"base-type"})],zi.prototype,"baseType",void 0);var Bn=class extends k{getResult(){if(this.children?.length!==1)return console.error("qti-container-size must have exactly one child expression"),0;let e=this.getVariables();if(!e||e?.length===0)return 0;let t=e[0];return t.value===null||t.value===void 0?0:t.cardinality!=="multiple"&&t.cardinality!=="ordered"?(console.error("qti-container-size requires multiple or ordered cardinality"),0):Array.isArray(t.value)?t.value.length:(console.error("qti-container-size: expected array value for multiple/ordered cardinality"),0)}};var Un=class extends ue{getResult(){let e=this.getVariables();if(this.children.length===2){let t=e[0],r=e[1];if(t.baseType==="directedPair"&&r.baseType==="directedPair"&&t.cardinality==="multiple"){let i=t.value,o=r.value;return i.filter(l=>o.includes(l)).length>0}else if(t.baseType==="directedPair"&&r.baseType==="directedPair"&&t.cardinality==="single"){let i=t.value;return r.value.includes(i)}else console.error("unsupported baseType or cardinality in qti contains, only baseType: directedPair and cardinality: multiple is supported")}else console.error("unexpected number of children in qti contains");return!1}};var Hn=class extends k{get interpretation(){return this.getAttribute("interpretation")||""}getResult(){let e=this.getAttribute("identifier")||"",t=this.context.variables.find(r=>r.identifier===e)||null;return t.cardinality!=="single"?t.correctResponse.length>0?t.correctResponse[0]:"":t.correctResponse}};var Ba=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},tr=class extends k{constructor(){super(...arguments),this.identifier=""}getResult(){if(!this.identifier)return console.error("qti-default requires an identifier attribute"),null;let e=this.identifier.split("."),t=null,r;if(e.length===2)t=e[0],r=e[1];else if(e.length===1)r=e[0];else return console.error("qti-default: invalid identifier format"),null;if(t){let o=this._testContext.items.find(a=>a.identifier===t);if(console.debug(`itemContext: ${JSON.stringify(o)}`),!this._testContext||!o)return console.warn(`qti-default: item "${t}" not found in test context`),null;let s=this._testContext.items.find(a=>a.identifier===t)?.variables.find(a=>a.identifier===r);return s?s.defaultValue||null:(console.warn(`qti-default: variable "${r}" not found in item "${t}"`),null)}if(!this.context?.variables)return console.warn("qti-default: no variables found in item context"),null;let i=this.context.variables.find(o=>o.identifier===r);return i?i.defaultValue||null:(console.warn(`qti-default: variable "${r}" not found in item context`),null)}};Ba([p({type:String})],tr.prototype,"identifier",void 0);Ba([T({context:j,subscribe:!0}),_()],tr.prototype,"context",void 0);Ba([_(),T({context:pe,subscribe:!0})],tr.prototype,"_testContext",void 0);var Wn=class extends k{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];return t.cardinality!=="single"||!Array.isArray(r.value)?(console.error("unexpected cardinality in qti equal"),null):e[0].baseType!==e[1].baseType?(console.error("The baseType of the two variables is different"),null):r.value.filter(o=>!t.value.includes(o))}return null}};var Qn=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length!==2?(console.warn("qti-divide: expected exactly 2 numeric values"),null):e[1]===0?(console.warn("qti-divide: division by zero"),null):e[0]/e[1]}#e(e){let t=[];for(let r of e){if(!r)continue;let i=o=>{if(o==null)return;let s=parseFloat(o.toString());if(Number.isNaN(s)){console.warn("qti-divide: non-numeric value encountered");return}t.push(s)};if(Array.isArray(r.value)){r.value.forEach(o=>i(o));continue}i(r.value)}return t}};var Gn=class extends k{getResult(){let e=this.#e();return e?e[0]>=e[1]:null}#e(){let e=this.getVariables();if(e.length!==2)return console.error("qti-duration-gte requires exactly 2 duration expressions"),null;let t=e.map(r=>this.#t(r));return t.some(r=>r===null)?null:t}#t(e){if(e.cardinality!=="single"||Array.isArray(e.value))return console.error("qti-duration-gte requires single cardinality"),null;if(e.baseType!=="duration")return console.error("qti-duration-gte requires duration base-type"),null;if(e.value===null||e.value===void 0)return null;let t=Number.parseFloat(e.value.toString());return Number.isNaN(t)?(console.error(`qti-duration-gte requires duration values expressed in seconds, got "${e.value.toString()}"`),null):t}};var Xn=class extends k{getResult(){let e=this.#e();return e?e[0]<e[1]:null}#e(){let e=this.getVariables();if(e.length!==2)return console.error("qti-duration-lt requires exactly 2 duration expressions"),null;let t=e.map(r=>this.#t(r));return t.some(r=>r===null)?null:t}#t(e){if(e.cardinality!=="single"||Array.isArray(e.value))return console.error("qti-duration-lt requires single cardinality"),null;if(e.baseType!=="duration")return console.error("qti-duration-lt requires duration base-type"),null;if(e.value===null||e.value===void 0)return null;let t=Number.parseFloat(e.value.toString());return Number.isNaN(t)?(console.error(`qti-duration-lt requires duration values expressed in seconds, got "${e.value.toString()}"`),null):t}};var mu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},ji=class extends k{constructor(){super(...arguments),this.roundingMode="significantFigures"}get figures(){if(!this.getAttribute("figures"))return console.error("figures attribute is missing"),null;let t=parseInt(this.getAttribute("figures")||"0");return isNaN(t)?(console.error("figures attribute is not a number"),null):t<0?(console.error("figures attribute is negative"),null):t<1&&this.roundingMode==="significantFigures"?(console.error("figures cannot be smaller than 1 for RoundingMode significantFigures"),null):t}getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];if(this.roundingMode===null)return null;if(t.cardinality!=="single"||r.cardinality!=="single"||Array.isArray(t.value)||Array.isArray(r.value))return console.error("unexpected cardinality in qti equal"),!1;switch(e[0].baseType){case"integer":case"float":{let i=parseFloat(t.value),o=parseFloat(r.value);if(!isNaN(i)&&!isNaN(o))return this.roundingMode==="significantFigures"?i.toPrecision(this.figures)===o.toPrecision(this.figures):Math.round(i*Math.pow(10,this.figures))/Math.pow(10,this.figures)===Math.round(o*Math.pow(10,this.figures))/Math.pow(10,this.figures);console.error(`value cannot be casted to numeric value in equalRounded operator: ${i}, ${o}`);break}default:{console.error("values other than float and int cannot be used in equalRounded operator.");break}}return!1}return console.error("unexpected number of children in qti-equal-rounded"),null}};mu([p({type:String})],ji.prototype,"roundingMode",void 0);var fu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Fi=class extends k{constructor(){super(...arguments),this.toleranceMode="exact"}getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];return!t||!r?null:this.toleranceMode!=="exact"?(console.error("toleranceMode is not supported yet"),!1):t.cardinality!=="single"||r.cardinality!=="single"||Array.isArray(t.value)||Array.isArray(r.value)?(console.error("unexpected cardinality in qti equal"),!1):t.value===null||r.value===null||t.value===void 0||r.value===void 0?null:J.compareSingleValues(t.value,r.value,t.baseType)}return console.error("unexpected number of children in qti-equal"),null}};fu([p({type:String})],Fi.prototype,"toleranceMode",void 0);var Yn=class extends k{getResult(){let e=this.getAttribute("field-identifier");if(!e)throw new Error("field-identifier attribute is required");if(Array.from(this.children).length!==1)throw new Error("qti-field-value must have exactly one child expression");let r=this.getVariables()[0];if(r.baseType!=="record"||r.value===null)throw new Error("qti-field-value child expression must return a record");let i=r.value[e];if(i===void 0)throw new Error(`Field "${e}" not found in record`);return i}};var Kn=class extends k{getResult(){if(this.children.length===0)return console.error("qti-gcd must have at least one child expression"),null;let e=this.getVariables();if(!e||e.length===0)return null;let t=[];for(let r of e){if(r.baseType!=="integer")return console.error("qti-gcd requires integer base-type"),null;if(r.value===null||r.value===void 0)return null;if(r.cardinality==="single"){if(Array.isArray(r.value))return console.error("qti-gcd unexpected array value for single cardinality"),null;let i=parseInt(r.value,10);if(isNaN(i))return console.error("qti-gcd non-numerical value"),null;t.push(i)}else if(r.cardinality==="multiple"||r.cardinality==="ordered"){if(!Array.isArray(r.value))return console.error("qti-gcd expected array value for multiple/ordered cardinality"),null;for(let i of r.value){if(i==null)return null;let o=parseInt(i,10);if(isNaN(o))return console.error("qti-gcd non-numerical value"),null;t.push(o)}}else return console.error("qti-gcd unsupported cardinality"),null}return t.length===0?null:this.#e(t)}#e(e){if(e.length===0)return 0;if(e.length===1)return Math.abs(e[0]);let t=Math.abs(e[0]);for(let r=1;r<e.length&&(t=this.#t(t,Math.abs(e[r])),t!==1);r++);return t}#t(e,t){if(e===0&&t===0)return 0;if(e===0)return t;if(t===0)return e;for(;t!==0;){let r=t;t=e%t,e=r}return e}};var Jn=class extends k{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];if((t.baseType==="integer"||t.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float"))return+t.value>+r.value;console.error("unexpected baseType or cardinality in qti gt")}return console.error("unexpected number of children in qt"),null}};var Zn=class extends ue{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];return(t.baseType==="integer"||t.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float")?+t.value>=+r.value:(console.error("unexpected baseType or cardinality in qti gte"),null)}return console.log("unexpected number of children in qte"),null}};var gu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Bi=class extends k{getResult(){if(!this.n)return console.error('qti-index: missing required attribute "n"'),null;if(this.children.length!==1)return console.error("qti-index: must have exactly one child container element"),null;let e=this.getVariables()[0];if(!e)return console.error("qti-index: missing container"),null;let t;if(!isNaN(Number(this.n)))t=Number(this.n);else{let r=this.#e(this.n);if(r===null)return console.error(`qti-index: variable "${this.n}" is not a valid number`),null;t=Number(r)}if(t<=0||!Number.isInteger(t))return console.error("qti-index: index must be a positive integer"),null;if(e.cardinality==="ordered"){let r=Array.isArray(e.value)?e.value:[e.value];return e.value===null||t>r.length?null:r[t-1]}else return console.error("qti-index: child must have ordered cardinality"),null}#e(e){let t=this.context.variables.find(r=>r.identifier===e)?.value;return t===null||isNaN(Number(t))?null:Number(t)}};gu([p({type:String})],Bi.prototype,"n",void 0);var nh=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},$r=class extends k{constructor(){super(...arguments),this.shape="",this.coords=""}getResult(){let e=this.getVariables();if(e.length!==1)return console.error("qti-inside requires exactly one point expression"),null;let t=e[0];if(t.cardinality!=="single"||Array.isArray(t.value))return console.error("qti-inside requires single cardinality"),null;if(t.value===null||t.value===void 0)return null;if(!this.shape||!this.coords)return console.error("qti-inside requires shape and coords attributes"),null;let r=this.#e(t.value.toString()),i=this.#t(this.coords);if(!r||i.length===0)return null;switch(this.shape.toLowerCase()){case"circle":return this.#r(r,i);case"rect":return this.#i(r,i);case"ellipse":return this.#n(r,i);case"poly":case"polygon":return this.#o(r,i);default:return console.error(`qti-inside does not support shape "${this.shape}"`),null}}#e(e){let t=e.split(/[,\s]+/).map(o=>o.trim()).filter(Boolean);if(t.length!==2)return console.error('qti-inside requires a point value formatted as "x y" or "x,y"'),null;let r=Number.parseFloat(t[0]),i=Number.parseFloat(t[1]);return Number.isNaN(r)||Number.isNaN(i)?(console.error("qti-inside requires numeric point coordinates"),null):{x:r,y:i}}#t(e){let t=e.split(",").map(r=>r.trim()).filter(Boolean).map(r=>Number.parseFloat(r));return t.some(r=>Number.isNaN(r))?(console.error("qti-inside requires numeric coords"),[]):t}#r(e,t){if(t.length!==3)return console.error("qti-inside circle requires x,y,r"),null;let[r,i,o]=t;return(e.x-r)**2+(e.y-i)**2<=o**2}#i(e,t){if(t.length!==4)return console.error("qti-inside rect requires left,top,right,bottom"),null;let[r,i,o,s]=t,a=Math.min(r,o),l=Math.max(r,o),c=Math.min(i,s),d=Math.max(i,s);return e.x>=a&&e.x<=l&&e.y>=c&&e.y<=d}#n(e,t){if(t.length!==4)return console.error("qti-inside ellipse requires centerX,centerY,radiusX,radiusY"),null;let[r,i,o,s]=t;return o===0||s===0?!1:(e.x-r)**2/o**2+(e.y-i)**2/s**2<=1}#o(e,t){if(t.length<6||t.length%2!==0)return console.error("qti-inside polygon requires at least 3 coordinate pairs"),null;let r=!1;for(let i=0,o=t.length-2;i<t.length;i+=2){let s=t[i],a=t[i+1],l=t[o],c=t[o+1];a>e.y!=c>e.y&&e.x<(l-s)*(e.y-a)/(c-a||Number.EPSILON)+s&&(r=!r),o=i}return r}};nh([p({type:String})],$r.prototype,"shape",void 0);nh([p({type:String})],$r.prototype,"coords",void 0);var es=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length!==2?(console.error("qti-integer-divide requires exactly 2 integer values"),null):e[1]===0?(console.error("qti-integer-divide: division by zero"),null):Math.floor(e[0]/e[1])}#e(e){let t=[];for(let r of e){if(r.baseType!=="integer")return console.error("qti-integer-divide requires integer base-type"),[];if(r.cardinality!=="single"||Array.isArray(r.value))return console.error("qti-integer-divide requires single cardinality"),[];if(r.value===null||r.value===void 0)return[];let i=Number.parseInt(r.value,10);if(Number.isNaN(i))return console.error("qti-integer-divide requires integer values"),[];t.push(i)}return t}};var ts=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length!==2?(console.error("qti-integer-modulus requires exactly 2 integer values"),null):e[1]===0?(console.error("qti-integer-modulus: division by zero"),null):e[0]%e[1]}#e(e){let t=[];for(let r of e){if(r.baseType!=="integer")return console.error("qti-integer-modulus requires integer base-type"),[];if(r.cardinality!=="single"||Array.isArray(r.value))return console.error("qti-integer-modulus requires single cardinality"),[];if(r.value===null||r.value===void 0)return[];let i=Number.parseInt(r.value,10);if(Number.isNaN(i))return console.error("qti-integer-modulus requires integer values"),[];t.push(i)}return t}};var rs=class extends k{getResult(){let e=this.getVariables();if(e.length!==1)return console.error("qti-integer-to-float requires exactly one child expression"),null;let t=e[0];if(t.baseType!=="integer")return console.error("qti-integer-to-float requires integer base-type"),null;if(t.cardinality!=="single"||Array.isArray(t.value))return console.error("qti-integer-to-float requires single cardinality"),null;if(t.value===null||t.value===void 0)return null;let r=Number.parseInt(t.value,10);return Number.isNaN(r)?(console.error("qti-integer-to-float requires an integer value"),null):r}};var is=class extends k{getResult(){if(this.children.length===1){let e=this.getVariables();if(!e)return!0;let t=e[0].value;return t==null||t==null||t===""}return console.error("unexpected number of children in qti Null"),null}};var os=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length===0?(console.error("qti-lcm requires at least one integer value"),null):e.reduce((t,r)=>this.#r(t,r))}#e(e){let t=[];for(let r of e){if(r.baseType!=="integer")return console.error("qti-lcm requires integer base-type"),[];if(r.value===null||r.value===void 0)return[];if(r.cardinality==="single"){if(Array.isArray(r.value))return console.error("qti-lcm unexpected array value for single cardinality"),[];let i=Number.parseInt(r.value,10);if(Number.isNaN(i))return console.error("qti-lcm requires integer values"),[];t.push(i);continue}if(r.cardinality!=="multiple"&&r.cardinality!=="ordered")return console.error("qti-lcm unsupported cardinality"),[];if(!Array.isArray(r.value))return console.error("qti-lcm expected array value for container cardinality"),[];for(let i of r.value){let o=Number.parseInt(i,10);if(Number.isNaN(o))return console.error("qti-lcm requires integer values"),[];t.push(o)}}return t}#t(e,t){let r=Math.abs(e),i=Math.abs(t);for(;i!==0;){let o=r%i;r=i,i=o}return r}#r(e,t){return e===0||t===0?0:Math.abs(e*t/this.#t(e,t))}};var se=class extends C{render(){return b`<slot></slot>`}process(){throw new Error("Not implemented")}};var sh=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Lr=class extends se{get childExpression(){return this.firstElementChild}process(){let e=this.getAttribute("identifier"),t=this.context.variables.find(i=>i.identifier===e)||null,r;return t.interpolationTable&&(r=t.interpolationTable.get(parseFloat(this.childExpression.calculate()))),r==null?(console.warn("lookupOutcomeValue: value is null or undefined"),0):(this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:this.identifier,value:xe(r)}})),r)}};sh([p({type:String})],Lr.prototype,"identifier",void 0);sh([T({context:j,subscribe:!0}),_()],Lr.prototype,"context",void 0);var ns=class extends k{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];if((t.baseType==="integer"||t.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float"))return+t.value<+r.value;console.error("unexpected baseType or cardinality in qti lt")}return console.error("unexpected number of children in lt"),null}};var ss=class extends ue{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];return(t.baseType==="integer"||t.baseType==="float")&&(r.baseType==="integer"||r.baseType==="float")?+t.value<=+r.value:(console.error("unexpected baseType or cardinality in qti lte"),null)}return console.log("unexpected number of children in lte"),null}};var bu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Ui=class extends k{getResult(){let e=this.context.variables.find(s=>s.identifier===this.identifier);if(!e)return console.warn(`Response ${this.identifier} cannot be found`),null;let t=e.areaMapping;if(!t)return console.warn(`Area mapping not found for response ${this.identifier}`),null;let r=Array.isArray(e.value)?e.value:[e.value];if(!r||r.length===0)return console.warn(`No candidate responses for response ${this.identifier}`),null;let i=0,o=new Set;for(let s of r)for(let a of t.areaMapEntries){if(o.has(a.coords))continue;J.isPointInArea(s,`${a.shape},${a.coords}`,e.baseType)&&(i+=a.mappedValue??0,o.add(a.coords))}return o.size<r.length&&(i+=t.defaultValue),t.lowerBound!=null&&(i=Math.max(t.lowerBound,i)),t.upperBound!=null&&(i=Math.min(t.upperBound,i)),i}};bu([p({type:String})],Ui.prototype,"identifier",void 0);var yu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Hi=class extends k{getResult(){let e=this.context.variables.find(o=>o.identifier===this.identifier);if(!e||!e.mapping)return console.error(`Response ${this.identifier} can not be found`),null;let t=e.mapping,r=Array.isArray(e.value)?e.value:[e.value],i=0;for(let o of r){let s=t.mapEntries.filter(l=>e.baseType==="string"&&!l.caseSensitive?J.compareSingleValues(l.mapKey.toLowerCase(),o.toLowerCase(),e.baseType):J.compareSingleValues(l.mapKey,o,e.baseType)),a=s.reduce((l,c)=>l.mappedValue>c.mappedValue?l:c,s.length>0?s[0]:{mapKey:null,mappedValue:null});a===null||a.mappedValue==null?i+=t.defaultValue:i+=a.mappedValue}return t?.lowerBound!==null&&t?.lowerBound!==void 0&&(i=Math.max(t.lowerBound,i)),t?.upperBound!==null&&t?.upperBound!==void 0&&(i=Math.min(t.upperBound,i)),i}};yu([p({type:String})],Hi.prototype,"identifier",void 0);var as=class n extends k{getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];return n.match(t,r)}return console.error("unexpected number of children in match"),null}static match(e,t){if(e.value===null)return!1;switch(t.cardinality){case"single":return Array.isArray(e.value)||Array.isArray(t.value)?(console.error("unexpected cardinality in qti match"),!1):J.compareSingleValues(e.value?.toString(),t.value.toString(),t.baseType);case"ordered":{if(!Array.isArray(e.value)||!Array.isArray(t.value))return console.error("unexpected cardinality in qti match"),!1;if(e.value.length!==t.value.length)return!1;for(let r=0;r<e.value.length;r++)if(!J.compareSingleValues(t.value[r],e.value[r],t.baseType))return!1;return!0}case"multiple":{if(!Array.isArray(e.value)||!Array.isArray(t.value))return console.error("unexpected cardinality in qti match"),!1;if(e.value.length!==t.value.length)return!1;let r=0;for(let i of t.value){let o=null,s=[...e.value];for(let a of s)if(J.compareSingleValues(i,a,t.baseType)){o=a;break}if(o!==null)s.splice(s.indexOf(o),1);else return!1;r++}return!0}default:return console.error("unexpected cardinality in qti match"),!1}}};var vu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Wi=class extends k{constructor(){super(...arguments),this.name=""}getResult(){if(!this.name)return console.error("qti-math-operator requires a name attribute"),null;let e=this.getVariables();if(!e||e.length===0)return null;let t=[];for(let r of e){if(r.cardinality!=="single")return console.error("qti-math-operator requires single cardinality"),null;if(Array.isArray(r.value))return console.error("qti-math-operator unexpected array value for single cardinality"),null;if(r.value===null||r.value===void 0)return null;if(r.baseType!=="integer"&&r.baseType!=="float")return console.error("qti-math-operator requires numerical base-type"),null;let i=parseFloat(r.value);if(isNaN(i))return console.error("qti-math-operator non-numerical value"),null;t.push(i)}return this.#e(this.name,t)}#e(e,t){try{switch(e.toLowerCase()){case"sin":return t.length!==1?null:Math.sin(t[0]);case"cos":return t.length!==1?null:Math.cos(t[0]);case"tan":return t.length!==1?null:Math.tan(t[0]);case"asin":return t.length!==1||t[0]<-1||t[0]>1?null:Math.asin(t[0]);case"acos":return t.length!==1||t[0]<-1||t[0]>1?null:Math.acos(t[0]);case"atan":return t.length!==1?null:Math.atan(t[0]);case"sinh":return t.length!==1?null:Math.sinh(t[0]);case"cosh":return t.length!==1?null:Math.cosh(t[0]);case"tanh":return t.length!==1?null:Math.tanh(t[0]);case"log":return t.length!==1||t[0]<=0?null:Math.log(t[0]);case"ln":return t.length!==1||t[0]<=0?null:Math.log(t[0]);case"log10":return t.length!==1||t[0]<=0?null:Math.log10(t[0]);case"exp":return t.length!==1?null:Math.exp(t[0]);case"abs":return t.length!==1?null:Math.abs(t[0]);case"sqrt":return t.length!==1||t[0]<0?null:Math.sqrt(t[0]);case"signum":return t.length!==1?null:Math.sign(t[0]);case"floor":return t.length!==1?null:Math.floor(t[0]);case"ceil":return t.length!==1?null:Math.ceil(t[0]);case"round":return t.length!==1?null:Math.round(t[0]);case"atan2":return t.length!==2?null:Math.atan2(t[0],t[1]);case"pow":{if(t.length!==2)return null;let r=t[0],i=t[1];return r===0&&i<=0||r<0&&!Number.isInteger(i)?null:Math.pow(r,i)}case"log_base":{if(t.length!==2)return null;let r=t[0],i=t[1];return r<=0||i<=0||i===1?null:Math.log(r)/Math.log(i)}case"mod":return t.length!==2||t[1]===0?null:t[0]%t[1];case"max":return t.length<1?null:Math.max(...t);case"min":return t.length<1?null:Math.min(...t);default:return console.error(`qti-math-operator: unknown operation "${e}"`),null}}catch(r){return console.error(`qti-math-operator: error performing operation "${e}":`,r),null}}};vu([p({type:String})],Wi.prototype,"name",void 0);var ls=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length===0?(console.warn("qti-max: no numeric values provided"),null):Math.max(...e)}#e(e){let t=[];for(let r of e){if(!r)continue;let i=o=>{if(o==null)return;let s=parseFloat(o.toString());if(Number.isNaN(s)){console.warn("qti-max: non-numeric value encountered");return}t.push(s)};if(Array.isArray(r.value)){r.value.forEach(o=>i(o));continue}i(r.value)}return t}};var cs=class extends k{getResult(){let e=this.getVariables();this.children.length!==2&&console.warn("The member operator takes two sub-expressions");let[t,r]=e;if(t.baseType===r.baseType||t.baseType==="integer"&&r.baseType==="float"||t.baseType==="float"&&r.baseType==="integer"||console.warn("Which must both have the same base-type"),r.cardinality==="multiple"||r.cardinality==="ordered"||console.warn("and the second must be a multiple or ordered container"),(t.baseType==="float"||r.baseType==="float")&&console.warn("The member operator should not be used on sub-expressions with a base-type of float"),(t.baseType==="duration"||r.baseType==="duration")&&console.warn("It must not be used on sub-expressions with a base-type of duration"),t.value===null||r.value===null)return null;let i=t.value;return r.value.includes(i)}};var ds=class extends k{getResult(){let e=this.#e(this.getVariables());return e.length===0?(console.warn("qti-min: no numeric values provided"),null):Math.min(...e)}#e(e){let t=[];for(let r of e){if(!r)continue;let i=o=>{if(o==null)return;let s=parseFloat(o.toString());if(Number.isNaN(s)){console.warn("qti-min: non-numeric value encountered");return}t.push(s)};if(Array.isArray(r.value)){r.value.forEach(o=>i(o));continue}i(r.value)}return t}};var hs=class extends k{getResult(){console.debug("qti-multiple getResult called",this.innerHTML);let e=this.getVariables();if(e.length===0)return console.error("unexpected number of children in qti multiple"),null;for(let t of e)if(t.cardinality!=="multiple"&&t.cardinality!=="single")return console.error("unexpected cardinality in qti multiple"),[];return e}};var ps=class extends k{render(){return b`${super.render()}`}getResult(){return!this.firstElementChild.calculate()}};var us=class extends k{getResult(){return null}};var ms=class extends ue{getResult(){return Array.from(this.children).map(t=>{let r=t;if(!r.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let i=r.calculate(),o=!1;if(typeof i=="string")if(i==="true")o=!0;else if(i==="false")o=!1;else return console.error("unexpected val in qti-or, expected boolean"),null;else typeof i=="boolean"&&(o=i);return o}).some(t=>typeof t=="boolean"&&t)}};var fs=class extends k{getResult(){let e=this.getVariables();if(e.length===0)return console.error("unexpected number of children in qti multiple"),null;for(let t of e)if(t.cardinality!=="ordered"&&t.cardinality!=="single")return console.error("unexpected cardinality in qti ordered"),[];return e}};var wu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Qi=class extends k{constructor(){super(...arguments),this.pattern=""}getResult(){let e=this.getVariables();if(e.length!==1)return console.error("qti-pattern-match requires exactly one child expression"),null;if(!this.pattern)return console.error("qti-pattern-match requires a pattern attribute"),null;let t=e[0];if(t.cardinality!=="single"||Array.isArray(t.value))return console.error("qti-pattern-match requires single cardinality"),null;if(t.value===null||t.value===void 0)return null;try{return new RegExp(this.pattern).test(t.value.toString())}catch(r){return console.error("qti-pattern-match requires a valid regular expression",r),null}}};wu([p({type:String})],Qi.prototype,"pattern",void 0);var gs=class extends k{getResult(){if(this.children.length!==2)return console.error("qti-power must have exactly two child expressions"),null;let e=this.getVariables();if(!e||e.length!==2)return null;let[t,r]=e;if(t.cardinality!=="single"||r.cardinality!=="single")return console.error("qti-power requires single cardinality for both expressions"),null;if(Array.isArray(t.value)||Array.isArray(r.value))return console.error("qti-power unexpected array value for single cardinality"),null;if(t.value===null||t.value===void 0||r.value===null||r.value===void 0)return null;if(t.baseType!=="integer"&&t.baseType!=="float"||r.baseType!=="integer"&&r.baseType!=="float")return console.error("qti-power requires numerical base-types"),null;let i=parseFloat(t.value),o=parseFloat(r.value);if(isNaN(i)||isNaN(o))return console.error("qti-power: non-numerical values encountered"),null;if(i===0&&o<=0||i<0&&!Number.isInteger(o))return null;let s;try{s=Math.pow(i,o)}catch(a){return console.error("qti-power: error calculating power:",a),null}if(isNaN(s))return null;if(s===1/0||s===-1/0)return s;if(!isFinite(s)||Math.abs(s)>Number.MAX_VALUE||s!==0&&Math.abs(s)<Number.MIN_VALUE)return null;if(isFinite(s)&&s!==0){let a=Math.floor(Math.log10(Math.abs(s))),l=Math.max(0,14-a),c=Math.pow(10,l);s=Math.round(s*c)/c}return s}};var ah=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Vr=class extends C{render(){let e=this.context?.variables.find(t=>t.identifier===this.identifier)?.value;return e===null?P:b`${JSON.stringify(e,null,2)}`}calculate(){return this.context.variables.find(t=>t.identifier===this.identifier)||null}};ah([p({type:String})],Vr.prototype,"identifier",void 0);ah([T({context:j,subscribe:!0}),_()],Vr.prototype,"context",void 0);var bs=class extends k{getResult(){return this.getVariables().reduce((r,i)=>{if(i.baseType=="float"||i.baseType=="integer")try{return r*parseFloat(i.value.toString())}catch{console.warn("can not convert to number")}else console.warn(`has another baseType ${i.baseType}`);return r},1)}};var Ua=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},rr=class extends k{constructor(){super(...arguments),this.min=0,this.max=10,this.step=1}getResult(){if(this.min>this.max)return console.error("qti-random-integer: min cannot be greater than max"),this.min;if(this.step<=0)return console.error("qti-random-integer: step must be positive"),this.min;let e=[],t=0;for(;;){let i=this.min+this.step*t;if(i>this.max)break;Number.isInteger(i)&&e.push(i),t++}if(e.length===0)return console.warn("qti-random-integer: no valid integer values in range"),Number.isInteger(this.min)?this.min:Math.floor(this.min);let r=Math.floor(Math.random()*e.length);return e[r]}getPossibleValues(){let e=[];if(this.min>this.max||this.step<=0)return[Number.isInteger(this.min)?this.min:Math.floor(this.min)];let t=0;for(;;){let r=this.min+this.step*t;if(r>this.max)break;Number.isInteger(r)&&e.push(r),t++}return e.length>0?e:[Number.isInteger(this.min)?this.min:Math.floor(this.min)]}};Ua([p({type:Number})],rr.prototype,"min",void 0);Ua([p({type:Number})],rr.prototype,"max",void 0);Ua([p({type:Number})],rr.prototype,"step",void 0);var ys=class extends k{getResult(){let e=this.getVariables();if(e.length===1){let t=e[0].value;if(Array.isArray(t)){let r=Math.floor(Math.random()*t.length);return t[r]}return t}return console.error("unexpected number of children in match"),null}};var xu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Gi=class extends k{constructor(){super(...arguments),this.numberRepeats=""}getResult(){let e=this.#e();if(e<=0)return[];let t=this.firstElementChild;if(!t)return console.warn("qti-repeat: missing child expression"),[];let r=[];for(let i=0;i<e;i++){let o=t.calculate(),s=this.#t(o);s&&r.push(s)}return r}#e(){if(!this.numberRepeats)return console.warn("qti-repeat: missing number-repeats attribute"),0;let e=parseInt(this.numberRepeats,10);if(!Number.isNaN(e))return e;let t=this.numberRepeats,r=this.context?.variables?.find(s=>s.identifier===t);if(!r)return console.warn(`qti-repeat: unknown identifier "${t}"`),0;let i=Array.isArray(r.value)?r.value[0]:r.value,o=parseInt(i?.toString()??"",10);return Number.isNaN(o)?(console.warn(`qti-repeat: invalid repeat count from "${t}"`),0):o}#t(e){if(e==null)return null;if(typeof e=="number")return{identifier:"",cardinality:"single",baseType:Number.isInteger(e)?"integer":"float",value:e.toString(),type:"response"};if(typeof e=="string"){let t=parseFloat(e);if(!Number.isNaN(t))return{identifier:"",cardinality:"single",baseType:Number.isInteger(t)?"integer":"float",value:e.toString(),type:"response"}}if(e&&typeof e=="object"&&"value"in e){let t=e.value;return{identifier:"",cardinality:"single",baseType:e.baseType??"string",value:t!=null?t.toString():null,type:"response"}}return{identifier:"",cardinality:"single",baseType:"string",value:e.toString(),type:"response"}}};xu([p({type:String,attribute:"number-repeats"})],Gi.prototype,"numberRepeats",void 0);var vs=class extends se{render(){return b`<slot></slot>`}process(){let e=[...this.children];for(let t=0;t<e.length;t++){let r=e[t];if(r.calculate()){r.process();return}}}};var zr=class extends C{render(){return b`<slot></slot>`}calculate(){return!0}getSubRules(){return[...this.children]}process(){let e=this.getSubRules();for(let t=0;t<e.length;t++)e[t].process()}};var jr=class extends zr{calculate(){return this.firstElementChild.calculate()}getSubRules(){let e=[];for(let t=1;t<this.children.length;t++)e.push(this.children[t]);return e}};var ws=class extends jr{render(){return b`${super.render()}`}};var lh=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Fr=class extends k{constructor(){super(...arguments),this.roundingMode="significantFigures",this.figures=3}getResult(){if(this.children.length!==1)return console.error("qti-round-to must have exactly one child expression"),null;let e=this.getVariables();if(!e||e.length===0)return null;let t=e[0];if(t.cardinality!=="single")return console.error("qti-round-to requires single cardinality"),null;if(Array.isArray(t.value))return console.error("qti-round-to unexpected array value for single cardinality"),null;if(t.value===null||t.value===void 0)return null;if(t.baseType!=="integer"&&t.baseType!=="float")return console.error("qti-round-to requires numerical base-type"),null;let r=parseFloat(t.value);return isNaN(r)?null:isFinite(r)?this.figures<0?(console.error("qti-round-to: figures must be non-negative"),null):this.roundingMode==="significantFigures"&&this.figures<1?(console.error("qti-round-to: figures must be at least 1 for significantFigures mode"),null):this.roundingMode==="decimalPlaces"?this.#e(r,this.figures):this.#t(r,this.figures):r===1/0?1/0:r===-1/0?-1/0:null}#e(e,t){if(e===0)return 0;let r=Math.pow(10,t);return Math.round(e*r)/r}#t(e,t){if(e===0)return 0;let r=Math.floor(Math.log10(Math.abs(e))),i=Math.pow(10,t-r-1);return Math.round(e*i)/i}};lh([p({type:String,attribute:"rounding-mode"})],Fr.prototype,"roundingMode",void 0);lh([p({type:Number})],Fr.prototype,"figures",void 0);var xs=class extends k{getResult(){if(this.children.length!==1)return console.error("qti-round must have exactly one child expression"),null;let e=this.getVariables();if(!e||e.length===0)return null;let t=e[0];if(t.cardinality!=="single")return console.error("qti-round requires single cardinality"),null;if(Array.isArray(t.value))return console.error("qti-round unexpected array value for single cardinality"),null;if(t.value===null||t.value===void 0)return null;if(t.baseType!=="integer"&&t.baseType!=="float")return console.error("qti-round requires numerical base-type (integer or float)"),null;let r=parseFloat(t.value);return isNaN(r)?(console.warn("qti-round: NaN input results in NULL"),null):isFinite(r)?Math.floor(r+.5):r===1/0?1/0:r===-1/0?-1/0:null}};var qs=class extends se{process(){let e=this.getAttribute("identifier");if(!e){console.warn('QtiSetCorrectResponse: Missing "identifier" attribute.');return}let t=this.firstElementChild;if(!t){console.warn("QtiSetCorrectResponse: No expression found.");return}let i=new Ha(t).process();this.dispatchEvent(new CustomEvent("qti-set-correct-response",{bubbles:!0,composed:!0,detail:{responseIdentifier:e,value:this.#e(i)}}))}#e(e){return e==null?null:Array.isArray(e)?e.map(t=>xe(this.#t(t))):xe(this.#t(e))}#t(e){if(e&&typeof e=="object"&&"value"in e){let t=e.value;return t!=null?t.toString():""}return e?.toString()??""}},Ha=class{constructor(e){this.expression=e}process(){let e=this.expression.calculate()??null;return e===null&&console.warn("QtiSetCorrectResponseRule: Evaluated value is null."),Array.isArray(e)?e.map(t=>this.#e(t)):this.#e(e)}#e(e){return e&&typeof e=="object"&&"value"in e?e.value:e}};var Cs=class extends se{process(){let e=this.getAttribute("identifier");if(!e){console.warn('QtiSetOutcomeValue: Missing "identifier" attribute.');return}let t=this.firstElementChild;if(!t){console.warn("QtiSetOutcomeValue: No expression found.");return}let i=new Wa(t).process();this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:e,value:this.#e(i)}}))}#e(e){return Array.isArray(e)?e.map(xe):e!==null?xe(e):null}},Wa=class{constructor(e){this.expression=e}process(){let e=this.expression.calculate()??null;return e===null&&console.warn("QtiSetOutcomeValueRule: Evaluated value is null."),Array.isArray(e)?e.map(t=>t.value?t.value:t):e}};var Es=class extends se{process(){let e=this.getAttribute("identifier");if(!e){console.warn('QtiSetTemplateValue: Missing "identifier" attribute.');return}let t=this.firstElementChild;if(!t){console.warn("QtiSetTemplateValue: No expression found.");return}let i=new Qa(t).process();this.dispatchEvent(new CustomEvent("qti-set-template-value",{bubbles:!0,composed:!0,detail:{templateIdentifier:e,value:this.#e(i)}}))}#e(e){return e==null?null:Array.isArray(e)?e.map(t=>xe(this.#t(t))):xe(this.#t(e))}#t(e){if(e&&typeof e=="object"&&"value"in e){let t=e.value;return t!=null?t.toString():""}return e?.toString()??""}},Qa=class{constructor(e){this.expression=e}process(){let e=this.expression.calculate()??null;return e===null&&console.warn("QtiSetTemplateValueRule: Evaluated value is null."),Array.isArray(e)?e.map(t=>this.#e(t)):this.#e(e)}#e(e){return e&&typeof e=="object"&&"value"in e?e.value:e}};var qu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Xi=class extends k{constructor(){super(...arguments),this.name=""}getResult(){if(!this.name)return console.warn("qti-stats-operator: missing name attribute"),null;let e=this.#t(this.getVariables());if(e.length===0)return console.warn("qti-stats-operator: no numeric values provided"),null;switch(this.name.toLowerCase()){case"mean":return e.reduce((t,r)=>t+r,0)/e.length;case"popsd":return this.#e(e);default:return console.warn(`qti-stats-operator: unsupported operator "${this.name}"`),null}}#e(e){let t=e.reduce((i,o)=>i+o,0)/e.length,r=e.reduce((i,o)=>i+Math.pow(o-t,2),0)/e.length;return Math.sqrt(r)}#t(e){let t=[];for(let r of e){if(!r)continue;let i=o=>{if(o==null)return;let s=parseFloat(o.toString());if(Number.isNaN(s)){console.warn("qti-stats-operator: non-numeric value encountered");return}t.push(s)};if(Array.isArray(r.value)){r.value.forEach(o=>i(o));continue}i(r.value)}return t}};qu([p({type:String})],Xi.prototype,"name",void 0);var Cu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Yi=class extends k{constructor(){super(...arguments),this.caseSensitive="true"}getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];if(t.cardinality!=="single"||r.cardinality!=="single"||Array.isArray(t.value)||Array.isArray(r.value))return console.error("unexpected cardinality in qti string-match"),!1;let i=this.caseSensitive==="true"?t.value:t.value.toLowerCase(),o=this.caseSensitive==="true"?r.value:r.value.toLowerCase();return J.compareSingleValues(i,o,t.baseType)}return console.error("unexpected number of children in qti-string-match"),null}};Cu([p({type:String,attribute:"case-sensitive"})],Yi.prototype,"caseSensitive",void 0);var Eu=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},Ki=class extends k{constructor(){super(...arguments),this.caseSensitive="true"}getResult(){let e=this.getVariables();if(e.length!==2)return console.error("qti-substring requires exactly 2 child expressions"),null;let[t,r]=e;if(t.cardinality!=="single"||r.cardinality!=="single"||Array.isArray(t.value)||Array.isArray(r.value))return console.error("qti-substring requires single cardinality"),null;if(t.value===null||r.value===null||t.value===void 0||r.value===void 0)return null;let i=t.value.toString(),o=r.value.toString();return this.caseSensitive!=="true"?o.toLowerCase().includes(i.toLowerCase()):o.includes(i)}};Eu([p({type:String,attribute:"case-sensitive"})],Ki.prototype,"caseSensitive",void 0);var ks=class extends ku(k){getResult(){return this.calculateChildren(Array.from(this.children))}};function ku(n){return class extends n{calculateChildren(t){let r=t.map(i=>{if(!i.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let o=i.calculate();return Number.isNaN(o)?(console.error("Unexpected value in qti-subtract, expected number"),null):Number(o)});return r.some(i=>i===null)?(console.error("One or more child expressions returned invalid values"),0):r[0]-r[1]}}}var Ss=class extends k{getResult(){return new Ga(Array.from(this.children)).calculate()}},Ga=class{constructor(e){this.expressions=e}calculate(){return this.expressions.filter(r=>r.calculate!==void 0).some(r=>r.calculate()===null)?null:this.expressions.map(r=>{let i=r.calculate();return Number.isNaN(i)?(console.error("unexpected value in qti-sum, expected number"),null):Number(i)}).reduce((r,i)=>r+i,0)}};var As=class extends k{getResult(){let e=this.getVariables();if(e.length!==1)return console.error("qti-truncate requires exactly one child expression"),null;let t=e[0];if(t.cardinality!=="single"||Array.isArray(t.value))return console.error("qti-truncate requires single cardinality"),null;if(t.baseType!=="integer"&&t.baseType!=="float")return console.error("qti-truncate requires numerical base-type"),null;if(t.value===null||t.value===void 0)return null;let r=Number.parseFloat(t.value);return Number.isNaN(r)?(console.error("qti-truncate requires a numerical value"),null):Math.trunc(r)}};var Is=class extends k{getResult(){let e=this.getAttribute("identifier");return this.context.variables.find(r=>r.identifier===e).value}};var ch=[{tag:"qti-and",ctor:Fn},{tag:"qti-any-n",ctor:Nr},{tag:"qti-base-value",ctor:zi},{tag:"qti-container-size",ctor:Bn},{tag:"qti-contains",ctor:Un},{tag:"qti-correct",ctor:Hn},{tag:"qti-default",ctor:tr},{tag:"qti-delete",ctor:Wn},{tag:"qti-divide",ctor:Qn},{tag:"qti-duration-gte",ctor:Gn},{tag:"qti-duration-lt",ctor:Xn},{tag:"qti-equal",ctor:Fi},{tag:"qti-equal-rounded",ctor:ji},{tag:"qti-field-value",ctor:Yn},{tag:"qti-gcd",ctor:Kn},{tag:"qti-gt",ctor:Jn},{tag:"qti-gte",ctor:Zn},{tag:"qti-index",ctor:Bi},{tag:"qti-inside",ctor:$r},{tag:"qti-integer-divide",ctor:es},{tag:"qti-integer-modulus",ctor:ts},{tag:"qti-integer-to-float",ctor:rs},{tag:"qti-is-null",ctor:is},{tag:"qti-lcm",ctor:os},{tag:"qti-lookup-outcome-value",ctor:Lr},{tag:"qti-lt",ctor:ns},{tag:"qti-lte",ctor:ss},{tag:"qti-map-response",ctor:Hi},{tag:"qti-map-response-point",ctor:Ui},{tag:"qti-match",ctor:as},{tag:"qti-math-operator",ctor:Wi},{tag:"qti-max",ctor:ls},{tag:"qti-member",ctor:cs},{tag:"qti-min",ctor:ds},{tag:"qti-multiple",ctor:hs},{tag:"qti-not",ctor:ps},{tag:"qti-null",ctor:us},{tag:"qti-or",ctor:ms},{tag:"qti-ordered",ctor:fs},{tag:"qti-pattern-match",ctor:Qi},{tag:"qti-power",ctor:gs},{tag:"qti-printed-variable",ctor:Vr},{tag:"qti-product",ctor:bs},{tag:"qti-random",ctor:ys},{tag:"qti-random-integer",ctor:rr},{tag:"qti-repeat",ctor:Gi},{tag:"qti-response-condition",ctor:vs},{tag:"qti-response-else",ctor:zr},{tag:"qti-response-else-if",ctor:ws},{tag:"qti-response-if",ctor:jr},{tag:"qti-round",ctor:xs},{tag:"qti-round-to",ctor:Fr},{tag:"qti-rule",ctor:se},{tag:"qti-set-correct-response",ctor:qs},{tag:"qti-set-outcome-value",ctor:Cs},{tag:"qti-set-template-value",ctor:Es},{tag:"qti-stats-operator",ctor:Xi},{tag:"qti-string-match",ctor:Yi},{tag:"qti-substring",ctor:Ki},{tag:"qti-subtract",ctor:ks},{tag:"qti-sum",ctor:Ss},{tag:"qti-truncate",ctor:As},{tag:"qti-variable",ctor:Is}];for(let{tag:n,ctor:e}of ch)customElements.get(n)||customElements.define(n,e);var nt=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},X;(function(n){n.Correct="correct",n.PartiallyCorrect="partially-correct",n.Incorrect="incorrect"})(X||(X={}));var Xa=n=>{class e extends n{constructor(){super(...arguments),this.showCorrectResponse=!1,this._handleShowCorrectResponseChange=(r,i)=>{this.toggleInternalCorrectResponse(i)},this.showFullCorrectResponse=!1,this._handleShowFullCorrectResponseChange=(r,i)=>{this.toggleFullCorrectResponse(i)},this.showCandidateCorrection=!1,this._handleShowCandidateCorrectionChange=(r,i)=>{this.toggleCandidateCorrection(i)},this._correctResponse=null}set correctResponseAttr(r){this._correctResponse=r}get correctResponseAttr(){return this._correctResponse}get isFullCorrectResponse(){return this._isFullCorrectResponse}get registersWithItem(){return!this.isFullCorrectResponse&&super.registersWithItem}set isFullCorrectResponse(r){this._isFullCorrectResponse=r,r&&(this.setAttribute("inert",""),this.setAttribute("response-identifier",this.responseIdentifier+"_cr"),this.setAttribute("answer-key",""))}get correctResponse(){let r=this.responseVariable;return r?.correctResponse?r.correctResponse:this._correctResponse}set correctResponse(r){let i=this._correctResponse;this._correctResponse=r,r==null?this.removeAttribute("correct-response"):this.setAttribute("correct-response",Array.isArray(r)?r.join(","):r),this.requestUpdate("_correctResponse",i)}get correctness(){let r=this.correctResponse;if(!r)return null;let i=this.response;if(i==null||i===""||Array.isArray(i)&&i.length===0)return null;let o=Array.isArray(r)?r:[r],a=(Array.isArray(i)?i:[i]).filter(d=>d!=="");if(a.length===0)return null;let l=a.filter(d=>o.includes(d)).length,c=a.filter(d=>!o.includes(d)).length;return l===o.length&&c===0&&a.length===o.length?X.Correct:l>0&&(l<o.length||c>0)?X.PartiallyCorrect:X.Incorrect}get correctionPart(){return"correction"}toggleCorrectResponse(r){(this.configContext?.correctResponseMode||"internal")==="full"?this.toggleFullCorrectResponse(r):this.toggleInternalCorrectResponse(r)}get withholdsFullCorrectResponseWhenCorrect(){return this.configContext?.fullCorrectResponseOnlyWhenIncorrect!==!1}async toggleFullCorrectResponse(r){let i=this.nextSibling,o=i instanceof HTMLDivElement&&i?.classList.contains("full-correct-response"),s=this.correctResponse;if(!s)return;if(!(r&&(!this.withholdsFullCorrectResponseWhenCorrect||this.correctness!==X.Correct))){if(!o)return;this.parentElement?.removeChild(i);return}if(o)return;let l=this.cloneNode(!0);l.removeAttribute("show-full-correct-response"),l.removeAttribute("show-correct-response"),l.removeAttribute("show-candidate-correction");let c=document.createElement("div");c.classList.add("full-correct-response"),this.isInline?c.classList.add("full-correct-response-inline"):c.classList.add("full-correct-response-block"),c.role="full-correct-response",c.appendChild(l),l.isFullCorrectResponse=!0,this.parentElement?.insertBefore(c,this.nextSibling),await l.updateComplete,l.response=Array.isArray(s)?[...s]:s}toggleInternalCorrectResponse(r){this._internals.states.delete("show-correct-response"),r&&this.correctResponse&&this._internals.states.add("show-correct-response")}toggleCandidateCorrection(r){}firstUpdated(){super.firstUpdated(),!this.isFullCorrectResponse&&(this.showCorrectResponse&&this.toggleInternalCorrectResponse(!0),this.showFullCorrectResponse&&this.toggleFullCorrectResponse(!0))}}return nt([p({attribute:"correct-response",reflect:!0,converter:$e({emptyAs:null})})],e.prototype,"correctResponseAttr",null),nt([p({type:Boolean,attribute:"show-correct-response",reflect:!0})],e.prototype,"showCorrectResponse",void 0),nt([$("showCorrectResponse",{waitUntilFirstUpdate:!0})],e.prototype,"_handleShowCorrectResponseChange",void 0),nt([p({type:Boolean,attribute:"show-full-correct-response",reflect:!0})],e.prototype,"showFullCorrectResponse",void 0),nt([$("showFullCorrectResponse",{waitUntilFirstUpdate:!0})],e.prototype,"_handleShowFullCorrectResponseChange",void 0),nt([p({type:Boolean,attribute:"show-candidate-correction",reflect:!0})],e.prototype,"showCandidateCorrection",void 0),nt([$("showCandidateCorrection",{waitUntilFirstUpdate:!0})],e.prototype,"_handleShowCandidateCorrectionChange",void 0),nt([_()],e.prototype,"_isFullCorrectResponse",void 0),nt([_()],e.prototype,"_correctResponse",void 0),e};var re=q`
9145
9519
  /* Nothing at all until the item judges this element. */
9146
9520
  [part~='correction'] {
9147
9521
  display: none;
@@ -9212,7 +9586,7 @@ CES.load();
9212
9586
  `,Ur=q`
9213
9587
  cursor: not-allowed;
9214
9588
  opacity: 0.8;
9215
- `,H2=q`
9589
+ `,Q2=q`
9216
9590
  ${fh};
9217
9591
  border: 1px solid gray;
9218
9592
  `;var Hr=function(n,e,t,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},At=class extends C{static{this.styles=q`
@@ -9390,7 +9764,7 @@ CES.load();
9390
9764
  ${this.renderAnswer()} ${this.renderInput()}
9391
9765
  <span part=${this.correctionPart} aria-hidden="true"></span>
9392
9766
  ${this.renderValidationMessage()}
9393
- `}};export{G as CandidateCorrectionMixin,ir as ChoiceCorrectionMixin,Xa as CorrectResponseMixin,X as Correctness,Ks as INITIAL_SESSION_CONTEXT,Js as INITIAL_TEST_CONTEXT,D as Interaction,ea as IsNullOrUndefined,Ee as ItemContainer,Ji as ItemCorrectResponseMode,Ti as ItemPrintVariables,At as ItemShowCandidateCorrection,It as ItemShowCorrectResponse,Fn as QtiAnd,Nr as QtiAnyN,te as QtiAssessmentItem,dh as QtiAssessmentItemCorrection,Pe as QtiAssessmentItemRef,Le as QtiAssessmentSection,wr as QtiAssessmentStimulusRef,ha as QtiAssessmentStimulusRefConnectedEvent,$t as QtiAssessmentTest,Sr as QtiAssociableHotspot,Jt as QtiAssociateInteraction,rl as QtiAssociateInteractionCorrection,zi as QtiBaseValue,Zt as QtiChoiceInteraction,il as QtiChoiceInteractionCorrection,qo as QtiCompanionMaterialsInfo,ue as QtiConditionExpression,Bn as QtiContainerSize,Un as QtiContains,pi as QtiContentBody,xr as QtiContextDeclaration,Hn as QtiCorrect,rt as QtiCustomInteraction,ui as QtiCustomOperator,tr as QtiDefault,Wn as QtiDelete,Qn as QtiDivide,Gn as QtiDurationGte,Xn as QtiDurationLt,Et as QtiEndAttemptInteraction,Fi as QtiEqual,ji as QtiEqualRounded,k as QtiExpression,Q as QtiExtendedTextInteraction,Ts as QtiExtendedTextInteractionCorrection,le as QtiFeedback,Co as QtiFeedbackBlock,Eo as QtiFeedbackInline,Yn as QtiFieldValue,Wt as QtiGap,Ri as QtiGapImg,Tr as QtiGapMatchInteraction,ol as QtiGapMatchInteractionCorrection,bt as QtiGapText,Ya as QtiGapTextCorrection,Kn as QtiGcd,Te as QtiGraphicAssociateInteraction,nl as QtiGraphicAssociateInteractionCorrection,Rr as QtiGraphicGapMatchInteraction,sl as QtiGraphicGapMatchInteractionCorrection,Or as QtiGraphicOrderInteraction,al as QtiGraphicOrderInteractionCorrection,Jn as QtiGt,Zn as QtiGte,Gt as QtiHotspotChoice,_s as QtiHotspotChoiceCorrection,Pr as QtiHotspotInteraction,ll as QtiHotspotInteractionCorrection,Xt as QtiHottext,Ka as QtiHottextCorrection,Mr as QtiHottextInteraction,cl as QtiHottextInteractionCorrection,Bi as QtiIndex,Oi as QtiInlineChoice,ee as QtiInlineChoiceInteraction,dl as QtiInlineChoiceInteractionCorrection,$r as QtiInside,es as QtiIntegerDivide,ts as QtiIntegerModulus,rs as QtiIntegerToFloat,is as QtiIsNull,et as QtiItem,ko as QtiItemBody,hh as QtiItemCorrection,os as QtiLcm,Lr as QtiLookupOutcomeValue,ns as QtiLt,ss as QtiLte,Hi as QtiMapResponse,Ui as QtiMapResponsePoint,as as QtiMatch,ot as QtiMatchInteraction,hl as QtiMatchInteractionCorrection,Wi as QtiMathOperator,ls as QtiMax,In as QtiMediaInteraction,cs as QtiMember,ds as QtiMin,qr as QtiModalFeedback,hs as QtiMultiple,ps as QtiNot,us as QtiNull,ms as QtiOr,St as QtiOrderInteraction,pl as QtiOrderInteractionCorrection,fs as QtiOrdered,Ye as QtiOutcomeDeclaration,Qi as QtiPatternMatch,W as QtiPortableCustomInteraction,ul as QtiPortableCustomInteractionCorrection,Pn as QtiPositionObjectInteraction,Mn as QtiPositionObjectStage,gs as QtiPower,Vr as QtiPrintedVariable,bs as QtiProduct,tn as QtiPrompt,ys as QtiRandom,rr as QtiRandomInteger,Gi as QtiRepeat,vs as QtiResponseCondition,ut as QtiResponseDeclaration,zr as QtiResponseElse,ws as QtiResponseElseIf,jr as QtiResponseIf,Ao as QtiResponseProcessing,xs as QtiRound,Fr as QtiRoundTo,Ke as QtiRubricBlock,Bl as QtiRuleElement,ce as QtiSelectPointInteraction,ml as QtiSelectPointInteractionCorrection,qs as QtiSetCorrectResponse,Ha as QtiSetCorrectResponseRule,Cs as QtiSetOutcomeValue,Wa as QtiSetOutcomeValueRule,Es as QtiSetTemplateValue,Qa as QtiSetTemplateValueRule,ke as QtiSimpleAssociableChoice,Ja as QtiSimpleAssociableChoiceCorrection,Se as QtiSimpleChoice,Za as QtiSimpleChoiceCorrection,ve as QtiSliderInteraction,fl as QtiSliderInteractionCorrection,Xi as QtiStatsOperator,Yi as QtiStringMatch,Io as QtiStylesheet,Ki as QtiSubstring,ks as QtiSubtract,Ss as QtiSum,Ga as QtiSumExpression,_o as QtiTemplateConstraint,Je as QtiTemplateDeclaration,To as QtiTemplateProcessing,Lt as QtiTest,uh as QtiTestCorrection,Ro as QtiTestFeedback,mt as QtiTestPart,ne as QtiTextEntryInteraction,gl as QtiTextEntryInteractionCorrection,As as QtiTruncate,zn as QtiUploadInteraction,Is as QtiVariable,hr as QtiVariableDeclaration,J as ScoringHelper,Er as TestCheckItem,mh as TestCheckItemCorrection,Ce as TestContainer,Lo as TestEndAttempt,yi as TestItemLink,zt as TestItemToSpeech,oe as TestNavigation,ph as TestNavigationCorrection,jt as TestNext,Ci as TestPagingButtonsStamp,Ft as TestPrev,Ei as TestPrintContext,ki as TestPrintVariables,Bt as TestScoringButtons,kr as TestScoringFeedback,Si as TestSectionButtonsStamp,Ai as TestSectionLink,_t as TestShowCorrectResponse,Ut as TestStamp,Wo as TestTtsNext,Fo as TestTtsPause,jo as TestTtsPlay,Ho as TestTtsPrev,Bo as TestTtsResume,Uo as TestTtsStop,Be as TestView,_i as TestViewToggle,Of as asSeed,R as boxSizing,F as computedContext,ct as computedItemContext,de as configContext,xe as convertNumberToUniversalFormat,re as correctionPart,Nh as decimalSeparator,Ne as dropRegion,hM as getItemByUri,dM as getManifestInfo,dr as interactionContext,Dh as isSeed,j as itemContext,Fl as itemContextVariables,mg as iterResponseValues,fg as parsePair,bg as parsePoint,ta as parseResponseAttribute,pu as qtiAndMixin,he as qtiContext,ih as qtiInteractionElements,ku as qtiSubtractMixin,Ve as qtiTransformItem,ac as qtiTransformManifest,vr as qtiTransformTest,mo as removeDoubleSlashes,$e as responseAttributeConverter,gg as serializePair,yg as serializePoint,ra as serializeResponseAttribute,De as sessionContext,pe as testContext,Ac as ttsContext,U as validationMessage};
9767
+ `}};export{G as CandidateCorrectionMixin,ir as ChoiceCorrectionMixin,Xa as CorrectResponseMixin,X as Correctness,Ks as INITIAL_SESSION_CONTEXT,Js as INITIAL_TEST_CONTEXT,D as Interaction,ea as IsNullOrUndefined,Ee as ItemContainer,Ji as ItemCorrectResponseMode,Ti as ItemPrintVariables,At as ItemShowCandidateCorrection,It as ItemShowCorrectResponse,Fn as QtiAnd,Nr as QtiAnyN,te as QtiAssessmentItem,dh as QtiAssessmentItemCorrection,Pe as QtiAssessmentItemRef,Le as QtiAssessmentSection,wr as QtiAssessmentStimulusRef,ha as QtiAssessmentStimulusRefConnectedEvent,$t as QtiAssessmentTest,Sr as QtiAssociableHotspot,Jt as QtiAssociateInteraction,rl as QtiAssociateInteractionCorrection,zi as QtiBaseValue,Zt as QtiChoiceInteraction,il as QtiChoiceInteractionCorrection,qo as QtiCompanionMaterialsInfo,ue as QtiConditionExpression,Bn as QtiContainerSize,Un as QtiContains,pi as QtiContentBody,xr as QtiContextDeclaration,Hn as QtiCorrect,rt as QtiCustomInteraction,ui as QtiCustomOperator,tr as QtiDefault,Wn as QtiDelete,Qn as QtiDivide,Gn as QtiDurationGte,Xn as QtiDurationLt,Et as QtiEndAttemptInteraction,Fi as QtiEqual,ji as QtiEqualRounded,k as QtiExpression,Q as QtiExtendedTextInteraction,Ts as QtiExtendedTextInteractionCorrection,le as QtiFeedback,Co as QtiFeedbackBlock,Eo as QtiFeedbackInline,Yn as QtiFieldValue,Wt as QtiGap,Ri as QtiGapImg,Tr as QtiGapMatchInteraction,ol as QtiGapMatchInteractionCorrection,bt as QtiGapText,Ya as QtiGapTextCorrection,Kn as QtiGcd,Te as QtiGraphicAssociateInteraction,nl as QtiGraphicAssociateInteractionCorrection,Rr as QtiGraphicGapMatchInteraction,sl as QtiGraphicGapMatchInteractionCorrection,Or as QtiGraphicOrderInteraction,al as QtiGraphicOrderInteractionCorrection,Jn as QtiGt,Zn as QtiGte,Gt as QtiHotspotChoice,_s as QtiHotspotChoiceCorrection,Pr as QtiHotspotInteraction,ll as QtiHotspotInteractionCorrection,Xt as QtiHottext,Ka as QtiHottextCorrection,Mr as QtiHottextInteraction,cl as QtiHottextInteractionCorrection,Bi as QtiIndex,Oi as QtiInlineChoice,ee as QtiInlineChoiceInteraction,dl as QtiInlineChoiceInteractionCorrection,$r as QtiInside,es as QtiIntegerDivide,ts as QtiIntegerModulus,rs as QtiIntegerToFloat,is as QtiIsNull,et as QtiItem,ko as QtiItemBody,hh as QtiItemCorrection,os as QtiLcm,Lr as QtiLookupOutcomeValue,ns as QtiLt,ss as QtiLte,Hi as QtiMapResponse,Ui as QtiMapResponsePoint,as as QtiMatch,ot as QtiMatchInteraction,hl as QtiMatchInteractionCorrection,Wi as QtiMathOperator,ls as QtiMax,In as QtiMediaInteraction,cs as QtiMember,ds as QtiMin,qr as QtiModalFeedback,hs as QtiMultiple,ps as QtiNot,us as QtiNull,ms as QtiOr,St as QtiOrderInteraction,pl as QtiOrderInteractionCorrection,fs as QtiOrdered,Ye as QtiOutcomeDeclaration,fo as QtiOutcomeProcessing,na as QtiOutcomeProcessingProcessor,Qi as QtiPatternMatch,W as QtiPortableCustomInteraction,ul as QtiPortableCustomInteractionCorrection,Pn as QtiPositionObjectInteraction,Mn as QtiPositionObjectStage,gs as QtiPower,Vr as QtiPrintedVariable,bs as QtiProduct,tn as QtiPrompt,ys as QtiRandom,rr as QtiRandomInteger,Gi as QtiRepeat,vs as QtiResponseCondition,ut as QtiResponseDeclaration,zr as QtiResponseElse,ws as QtiResponseElseIf,jr as QtiResponseIf,Ao as QtiResponseProcessing,xs as QtiRound,Fr as QtiRoundTo,Ke as QtiRubricBlock,Bl as QtiRuleElement,ce as QtiSelectPointInteraction,ml as QtiSelectPointInteractionCorrection,qs as QtiSetCorrectResponse,Ha as QtiSetCorrectResponseRule,Cs as QtiSetOutcomeValue,Wa as QtiSetOutcomeValueRule,Es as QtiSetTemplateValue,Qa as QtiSetTemplateValueRule,ke as QtiSimpleAssociableChoice,Ja as QtiSimpleAssociableChoiceCorrection,Se as QtiSimpleChoice,Za as QtiSimpleChoiceCorrection,ve as QtiSliderInteraction,fl as QtiSliderInteractionCorrection,Xi as QtiStatsOperator,Yi as QtiStringMatch,Io as QtiStylesheet,Ki as QtiSubstring,ks as QtiSubtract,Ss as QtiSum,Ga as QtiSumExpression,_o as QtiTemplateConstraint,Je as QtiTemplateDeclaration,To as QtiTemplateProcessing,Lt as QtiTest,uh as QtiTestCorrection,Ro as QtiTestFeedback,mt as QtiTestPart,bi as QtiTestVariables,pa as QtiTestVariablesExpression,ne as QtiTextEntryInteraction,gl as QtiTextEntryInteractionCorrection,As as QtiTruncate,zn as QtiUploadInteraction,Is as QtiVariable,hr as QtiVariableDeclaration,J as ScoringHelper,Er as TestCheckItem,mh as TestCheckItemCorrection,Ce as TestContainer,Lo as TestEndAttempt,yi as TestItemLink,zt as TestItemToSpeech,oe as TestNavigation,ph as TestNavigationCorrection,jt as TestNext,Ci as TestPagingButtonsStamp,Ft as TestPrev,Ei as TestPrintContext,ki as TestPrintVariables,Bt as TestScoringButtons,kr as TestScoringFeedback,Si as TestSectionButtonsStamp,Ai as TestSectionLink,_t as TestShowCorrectResponse,Ut as TestStamp,Wo as TestTtsNext,Fo as TestTtsPause,jo as TestTtsPlay,Ho as TestTtsPrev,Bo as TestTtsResume,Uo as TestTtsStop,Be as TestView,_i as TestViewToggle,Of as asSeed,R as boxSizing,F as computedContext,ct as computedItemContext,de as configContext,xe as convertNumberToUniversalFormat,re as correctionPart,Nh as decimalSeparator,Ne as dropRegion,uM as getItemByUri,pM as getManifestInfo,dr as interactionContext,Dh as isSeed,j as itemContext,Fl as itemContextVariables,mg as iterResponseValues,fg as parsePair,bg as parsePoint,ta as parseResponseAttribute,pu as qtiAndMixin,he as qtiContext,ih as qtiInteractionElements,ku as qtiSubtractMixin,Ve as qtiTransformItem,ac as qtiTransformManifest,vr as qtiTransformTest,mo as removeDoubleSlashes,$e as responseAttributeConverter,gg as serializePair,yg as serializePoint,ra as serializeResponseAttribute,De as sessionContext,pe as testContext,Ac as ttsContext,U as validationMessage};
9394
9768
  /*! Bundled license information:
9395
9769
 
9396
9770
  @lit-labs/ssr-dom-shim/lib/element-internals.js: