@citolab/qti-components 6.7.1-60 → 6.7.1-61

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.
@@ -96,65 +96,6 @@
96
96
  }
97
97
  ]
98
98
  },
99
- {
100
- "kind": "javascript-module",
101
- "path": "src/lib/qti-transformers/index.ts",
102
- "declarations": [],
103
- "exports": [
104
- {
105
- "kind": "js",
106
- "name": "*",
107
- "declaration": {
108
- "name": "*",
109
- "package": "./qti-transformers"
110
- }
111
- }
112
- ]
113
- },
114
- {
115
- "kind": "javascript-module",
116
- "path": "src/lib/qti-transformers/qti-transformers.ts",
117
- "declarations": [
118
- {
119
- "kind": "function",
120
- "name": "qtiTransformItem",
121
- "return": {
122
- "type": {
123
- "text": ""
124
- }
125
- },
126
- "description": "Browser based QTI-XML to HTML transformer.\nReturns an object with methods to load, parse, transform and serialize QTI XML items."
127
- },
128
- {
129
- "kind": "function",
130
- "name": "qtiTransformTest",
131
- "return": {
132
- "type": {
133
- "text": ""
134
- }
135
- },
136
- "description": "Returns an object with methods to load, parse and transform QTI tests."
137
- }
138
- ],
139
- "exports": [
140
- {
141
- "kind": "js",
142
- "name": "qtiTransformItem",
143
- "declaration": {
144
- "name": "qtiTransformItem",
145
- "module": "src/lib/qti-transformers/qti-transformers.ts"
146
- }
147
- },
148
- {
149
- "kind": "js",
150
- "name": "qtiTransformTest",
151
- "declaration": {
152
- "name": "qtiTransformTest",
153
- "module": "src/lib/qti-transformers/qti-transformers.ts"
154
- }
155
- }
156
- ]
157
- },
158
99
  {
159
100
  "kind": "javascript-module",
160
101
  "path": "src/lib/qti-components/index.ts",
@@ -578,6 +519,65 @@
578
519
  }
579
520
  ]
580
521
  },
522
+ {
523
+ "kind": "javascript-module",
524
+ "path": "src/lib/qti-transformers/index.ts",
525
+ "declarations": [],
526
+ "exports": [
527
+ {
528
+ "kind": "js",
529
+ "name": "*",
530
+ "declaration": {
531
+ "name": "*",
532
+ "package": "./qti-transformers"
533
+ }
534
+ }
535
+ ]
536
+ },
537
+ {
538
+ "kind": "javascript-module",
539
+ "path": "src/lib/qti-transformers/qti-transformers.ts",
540
+ "declarations": [
541
+ {
542
+ "kind": "function",
543
+ "name": "qtiTransformItem",
544
+ "return": {
545
+ "type": {
546
+ "text": ""
547
+ }
548
+ },
549
+ "description": "Browser based QTI-XML to HTML transformer.\nReturns an object with methods to load, parse, transform and serialize QTI XML items."
550
+ },
551
+ {
552
+ "kind": "function",
553
+ "name": "qtiTransformTest",
554
+ "return": {
555
+ "type": {
556
+ "text": ""
557
+ }
558
+ },
559
+ "description": "Returns an object with methods to load, parse and transform QTI tests."
560
+ }
561
+ ],
562
+ "exports": [
563
+ {
564
+ "kind": "js",
565
+ "name": "qtiTransformItem",
566
+ "declaration": {
567
+ "name": "qtiTransformItem",
568
+ "module": "src/lib/qti-transformers/qti-transformers.ts"
569
+ }
570
+ },
571
+ {
572
+ "kind": "js",
573
+ "name": "qtiTransformTest",
574
+ "declaration": {
575
+ "name": "qtiTransformTest",
576
+ "module": "src/lib/qti-transformers/qti-transformers.ts"
577
+ }
578
+ }
579
+ ]
580
+ },
581
581
  {
582
582
  "kind": "javascript-module",
583
583
  "path": "src/lib/qti-components/internal/event-types.ts",
@@ -703,62 +703,6 @@
703
703
  "declarations": [],
704
704
  "exports": []
705
705
  },
706
- {
707
- "kind": "javascript-module",
708
- "path": "src/lib/qti-components/qti-assessment-stimulus-ref/qti-assessment-stimulus-ref.ts",
709
- "declarations": [
710
- {
711
- "kind": "class",
712
- "description": "Represents a custom element for referencing an assessment stimulus.",
713
- "name": "QtiAssessmentStimulusRef",
714
- "members": [],
715
- "attributes": [
716
- {
717
- "name": "identifier",
718
- "type": {
719
- "text": "string"
720
- },
721
- "default": "''",
722
- "description": "The identifier of the stimulus.",
723
- "fieldName": "identifier"
724
- },
725
- {
726
- "name": "href",
727
- "type": {
728
- "text": "string"
729
- },
730
- "default": "''",
731
- "description": "The href of the stimulus.",
732
- "fieldName": "href"
733
- }
734
- ],
735
- "superclass": {
736
- "name": "LitElement",
737
- "package": "lit"
738
- },
739
- "tagName": "qti-assessment-stimulus-ref",
740
- "customElement": true
741
- }
742
- ],
743
- "exports": [
744
- {
745
- "kind": "js",
746
- "name": "QtiAssessmentStimulusRef",
747
- "declaration": {
748
- "name": "QtiAssessmentStimulusRef",
749
- "module": "src/lib/qti-components/qti-assessment-stimulus-ref/qti-assessment-stimulus-ref.ts"
750
- }
751
- },
752
- {
753
- "kind": "custom-element-definition",
754
- "name": "qti-assessment-stimulus-ref",
755
- "declaration": {
756
- "name": "QtiAssessmentStimulusRef",
757
- "module": "src/lib/qti-components/qti-assessment-stimulus-ref/qti-assessment-stimulus-ref.ts"
758
- }
759
- }
760
- ]
761
- },
762
706
  {
763
707
  "kind": "javascript-module",
764
708
  "path": "src/lib/qti-components/qti-assessment-item/item-print-variables.ts",
@@ -938,6 +882,62 @@
938
882
  }
939
883
  ]
940
884
  },
885
+ {
886
+ "kind": "javascript-module",
887
+ "path": "src/lib/qti-components/qti-assessment-stimulus-ref/qti-assessment-stimulus-ref.ts",
888
+ "declarations": [
889
+ {
890
+ "kind": "class",
891
+ "description": "Represents a custom element for referencing an assessment stimulus.",
892
+ "name": "QtiAssessmentStimulusRef",
893
+ "members": [],
894
+ "attributes": [
895
+ {
896
+ "name": "identifier",
897
+ "type": {
898
+ "text": "string"
899
+ },
900
+ "default": "''",
901
+ "description": "The identifier of the stimulus.",
902
+ "fieldName": "identifier"
903
+ },
904
+ {
905
+ "name": "href",
906
+ "type": {
907
+ "text": "string"
908
+ },
909
+ "default": "''",
910
+ "description": "The href of the stimulus.",
911
+ "fieldName": "href"
912
+ }
913
+ ],
914
+ "superclass": {
915
+ "name": "LitElement",
916
+ "package": "lit"
917
+ },
918
+ "tagName": "qti-assessment-stimulus-ref",
919
+ "customElement": true
920
+ }
921
+ ],
922
+ "exports": [
923
+ {
924
+ "kind": "js",
925
+ "name": "QtiAssessmentStimulusRef",
926
+ "declaration": {
927
+ "name": "QtiAssessmentStimulusRef",
928
+ "module": "src/lib/qti-components/qti-assessment-stimulus-ref/qti-assessment-stimulus-ref.ts"
929
+ }
930
+ },
931
+ {
932
+ "kind": "custom-element-definition",
933
+ "name": "qti-assessment-stimulus-ref",
934
+ "declaration": {
935
+ "name": "QtiAssessmentStimulusRef",
936
+ "module": "src/lib/qti-components/qti-assessment-stimulus-ref/qti-assessment-stimulus-ref.ts"
937
+ }
938
+ }
939
+ ]
940
+ },
941
941
  {
942
942
  "kind": "javascript-module",
943
943
  "path": "src/lib/qti-components/qti-companion-materials-info/qti-companion-materials-info.ts",
@@ -1618,14 +1618,118 @@
1618
1618
  },
1619
1619
  "default": "false",
1620
1620
  "fieldName": "fixed"
1621
+ },
1622
+ {
1623
+ "name": "identifier",
1624
+ "type": {
1625
+ "text": "string"
1626
+ },
1627
+ "fieldName": "identifier",
1628
+ "inheritedFrom": {
1629
+ "name": "QtiChoice",
1630
+ "module": "src/lib/qti-components/qti-interaction/internal/choice/qti-choice.ts"
1631
+ }
1632
+ },
1633
+ {
1634
+ "name": "tabindex",
1635
+ "type": {
1636
+ "text": "number | undefined"
1637
+ },
1638
+ "default": "0",
1639
+ "fieldName": "tabindex",
1640
+ "inheritedFrom": {
1641
+ "name": "QtiChoice",
1642
+ "module": "src/lib/qti-components/qti-interaction/internal/choice/qti-choice.ts"
1643
+ }
1644
+ },
1645
+ {
1646
+ "name": "aria-disabled",
1647
+ "type": {
1648
+ "text": "boolean"
1649
+ },
1650
+ "default": "false",
1651
+ "fieldName": "disabled",
1652
+ "inheritedFrom": {
1653
+ "name": "QtiChoice",
1654
+ "module": "src/lib/qti-components/qti-interaction/internal/choice/qti-choice.ts"
1655
+ }
1656
+ },
1657
+ {
1658
+ "name": "aria-readonly",
1659
+ "type": {
1660
+ "text": "boolean"
1661
+ },
1662
+ "default": "false",
1663
+ "fieldName": "readonly",
1664
+ "inheritedFrom": {
1665
+ "name": "QtiChoice",
1666
+ "module": "src/lib/qti-components/qti-interaction/internal/choice/qti-choice.ts"
1667
+ }
1668
+ },
1669
+ {
1670
+ "name": "aria-checked",
1671
+ "type": {
1672
+ "text": "boolean"
1673
+ },
1674
+ "default": "false",
1675
+ "fieldName": "checked",
1676
+ "inheritedFrom": {
1677
+ "name": "QtiChoice",
1678
+ "module": "src/lib/qti-components/qti-interaction/internal/choice/qti-choice.ts"
1679
+ }
1621
1680
  }
1622
1681
  ],
1623
1682
  "superclass": {
1624
- "name": "LitElement",
1625
- "package": "lit"
1683
+ "name": "QtiChoice",
1684
+ "module": "/src/lib/qti-components/qti-interaction/internal/choice/qti-choice"
1626
1685
  },
1627
1686
  "tagName": "qti-simple-associable-choice",
1628
- "customElement": true
1687
+ "customElement": true,
1688
+ "slots": [
1689
+ {
1690
+ "description": "The choices slot element",
1691
+ "name": "",
1692
+ "inheritedFrom": {
1693
+ "name": "QtiChoice",
1694
+ "module": "src/lib/qti-components/qti-interaction/internal/choice/qti-choice.ts"
1695
+ }
1696
+ }
1697
+ ],
1698
+ "events": [
1699
+ {
1700
+ "name": "qti-register-choice",
1701
+ "type": {
1702
+ "text": "CustomEvent"
1703
+ },
1704
+ "description": "register itselves on a qti-choice-interaction element.",
1705
+ "inheritedFrom": {
1706
+ "name": "QtiChoice",
1707
+ "module": "src/lib/qti-components/qti-interaction/internal/choice/qti-choice.ts"
1708
+ }
1709
+ },
1710
+ {
1711
+ "name": "qti-loose-choice",
1712
+ "type": {
1713
+ "text": "CustomEvent"
1714
+ },
1715
+ "description": "de-register itselves on a qti-choice-interaction element.",
1716
+ "inheritedFrom": {
1717
+ "name": "QtiChoice",
1718
+ "module": "src/lib/qti-components/qti-interaction/internal/choice/qti-choice.ts"
1719
+ }
1720
+ },
1721
+ {
1722
+ "name": "qti-choice-element-selected",
1723
+ "type": {
1724
+ "text": "CustomEvent"
1725
+ },
1726
+ "description": "Emitted when the choice is selected.",
1727
+ "inheritedFrom": {
1728
+ "name": "QtiChoice",
1729
+ "module": "src/lib/qti-components/qti-interaction/internal/choice/qti-choice.ts"
1730
+ }
1731
+ }
1732
+ ]
1629
1733
  }
1630
1734
  ],
1631
1735
  "exports": [
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ var $r=Object.defineProperty,$s=Object.defineProperties,Ss=Object.getOwnProperty
22
22
  <xsl:apply-templates/>
23
23
  </xsl:element>
24
24
  </xsl:template>
25
- </xsl:stylesheet>`;function Js(i){let t=[];return i.querySelectorAll("qti-assessment-item-ref").forEach(e=>{let r=e.getAttribute("identifier"),s=e.getAttribute("href"),n=e.getAttribute("category");t.push({identifier:r,href:s,category:n})}),t}var er=null;function ls(i,t=!0){return t&&er!==null&&er.abort(),new Promise((e,r)=>{let s=new XMLHttpRequest;er=s,s.open("GET",i,!0),s.responseType="document",s.onload=()=>{s.status>=200&&s.status<300?e(s.responseXML):r(s.statusText)},s.onerror=()=>{r(s.statusText)},s.send()})}function cs(i){return new DOMParser().parseFromString(i,"text/xml")}function xt(i){let t=new XSLTProcessor,e=new DOMParser().parseFromString(Ks,"text/xml");return t.importStylesheet(e),t.transformToFragment(i,document)}function Zs(i,t){t.endsWith("/")||(t+="/"),i.querySelectorAll("[src],[href]").forEach(e=>{var n;let r="";e.getAttribute("src")&&(r="src"),e.getAttribute("href")&&(r="href");let s=(n=e.getAttribute(r))==null?void 0:n.trim();if(!s.startsWith("data:")&&!s.startsWith("http")){let o=t+encodeURI(s);e.setAttribute(r,o)}})}function Gs(i){i.querySelectorAll('qti-custom-operator[class="js.org"] > qti-base-value').forEach(e=>{let r=document.createComment(e.textContent);e.replaceChild(r,e.firstChild)})}function Qs(i){i.querySelectorAll("qti-stylesheet").forEach(t=>t.remove())}var Ee=class extends g{constructor(){super(...arguments);this.identifier="";this.href=""}async connectedCallback(){super.connectedCallback();let e=new Event("qti-assessment-stimulus-ref-connected",{cancelable:!0,bubbles:!0});if(this.dispatchEvent(e)){let n=this.closest("qti-assessment-item").querySelector(`[data-stimulus-idref=${this.identifier}]`);n?await this.loadAndAppendStimulus(n):console.warn(`Stimulus with data-stimulus-idref ${this.identifier} not found`)}}async loadAndAppendStimulus(e){let r=this.href.substring(0,this.href.lastIndexOf("/")),s=await as().load(this.href).then(n=>n.path(r).htmldoc());if(s){let n=s.querySelectorAll("qti-stimulus-body, qti-stylesheet");e.append(...n)}}};a([p({type:String})],Ee.prototype,"identifier",2),a([p({type:String})],Ee.prototype,"href",2),Ee=a([m("qti-assessment-stimulus-ref")],Ee);var ei={SPACE:32},M=class extends g{constructor(){super(...arguments);this.tabindex=0;this.disabled=!1;this.readonly=!1;this.checked=!1}handleDisabledChange(e,r){r?(this.tabindex=void 0,this.blur()):this.tabIndex=0}connectedCallback(){super.connectedCallback(),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent("qti-register-choice",{bubbles:!0,cancelable:!1,composed:!0}))}disconnectedCallback(){this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent("qti-loose-choice",{bubbles:!0,cancelable:!1,composed:!0}))}reset(){this.checked=!1,this.disabled=!1}_onKeyUp(e){if(!e.altKey)switch(e.keyCode){case ei.SPACE:e.preventDefault(),this._toggleChecked();break;default:}}_onClick(){this._toggleChecked()}_toggleChecked(){this.disabled||this.readonly||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("qti-choice-element-selected",{bubbles:!0,cancelable:!1,composed:!0,detail:{identifier:this.identifier,checked:this.checked}})))}validateAllProps(){return!!this.getAttribute("identifier")}render(){return this.validateAllProps()||console.warn(`Invalid props for ${this.outerHTML}`,"missing identifier"),d` <slot></slot> `}};a([p({type:String})],M.prototype,"identifier",2),a([p({type:Number,reflect:!0})],M.prototype,"tabindex",2),a([p({reflect:!0,type:Boolean,attribute:"aria-disabled",converter:{toAttribute:e=>e}})],M.prototype,"disabled",2),a([p({reflect:!0,type:Boolean,attribute:"aria-readonly",converter:{toAttribute:e=>e}})],M.prototype,"readonly",2),a([p({reflect:!0,type:Boolean,attribute:"aria-checked",converter:{toAttribute:e=>e}})],M.prototype,"checked",2),a([$("disabled",{waitUntilFirstUpdate:!0})],M.prototype,"handleDisabledChange",1);var ps=b`
25
+ </xsl:stylesheet>`;function Js(i){let t=[];return i.querySelectorAll("qti-assessment-item-ref").forEach(e=>{let r=e.getAttribute("identifier"),s=e.getAttribute("href"),n=e.getAttribute("category");t.push({identifier:r,href:s,category:n})}),t}var er=null;function ls(i,t=!0){return t&&er!==null&&er.abort(),new Promise((e,r)=>{let s=new XMLHttpRequest;er=s,s.open("GET",i,!0),s.responseType="document",s.onload=()=>{s.status>=200&&s.status<300?e(s.responseXML):r(s.statusText)},s.onerror=()=>{r(s.statusText)},s.send()})}function cs(i){return new DOMParser().parseFromString(i,"text/xml")}function xt(i){let t=new XSLTProcessor,e=new DOMParser().parseFromString(Ks,"text/xml");return t.importStylesheet(e),t.transformToFragment(i,document)}function Zs(i,t){t.endsWith("/")||(t+="/"),i.querySelectorAll("[src],[href]").forEach(e=>{var n;let r="";e.getAttribute("src")&&(r="src"),e.getAttribute("href")&&(r="href");let s=(n=e.getAttribute(r))==null?void 0:n.trim();if(!s.startsWith("data:")&&!s.startsWith("http")){let o=t+encodeURI(s);e.setAttribute(r,o)}})}function Gs(i){i.querySelectorAll('qti-custom-operator[class="js.org"] > qti-base-value').forEach(e=>{let r=document.createComment(e.textContent);e.replaceChild(r,e.firstChild)})}function Qs(i){i.querySelectorAll("qti-stylesheet").forEach(t=>t.remove())}var Ee=class extends g{constructor(){super(...arguments);this.identifier="";this.href=""}async connectedCallback(){super.connectedCallback();let e=new Event("qti-assessment-stimulus-ref-connected",{cancelable:!0,bubbles:!0});if(this.dispatchEvent(e)){let n=this.closest("qti-assessment-item").querySelector(`[data-stimulus-idref=${this.identifier}]`);n?await this.loadAndAppendStimulus(n):console.warn(`Stimulus with data-stimulus-idref ${this.identifier} not found`)}}async loadAndAppendStimulus(e){let r=this.href.substring(0,this.href.lastIndexOf("/")),s=await as().load(this.href).then(n=>n.path(r).htmldoc());if(s){let n=s.querySelectorAll("qti-stimulus-body, qti-stylesheet");e.append(...n)}}};a([p({type:String})],Ee.prototype,"identifier",2),a([p({type:String})],Ee.prototype,"href",2),Ee=a([m("qti-assessment-stimulus-ref")],Ee);var ei={SPACE:32},R=class extends g{constructor(){super(...arguments);this.tabindex=0;this.disabled=!1;this.readonly=!1;this.checked=!1}handleDisabledChange(e,r){r?(this.tabindex=void 0,this.blur()):this.tabIndex=0}connectedCallback(){super.connectedCallback(),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent("qti-register-choice",{bubbles:!0,cancelable:!1,composed:!0}))}disconnectedCallback(){this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent("qti-loose-choice",{bubbles:!0,cancelable:!1,composed:!0}))}reset(){this.checked=!1,this.disabled=!1}_onKeyUp(e){if(!e.altKey)switch(e.keyCode){case ei.SPACE:e.preventDefault(),this._toggleChecked();break;default:}}_onClick(){this._toggleChecked()}_toggleChecked(){this.disabled||this.readonly||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("qti-choice-element-selected",{bubbles:!0,cancelable:!1,composed:!0,detail:{identifier:this.identifier,checked:this.checked}})))}validateAllProps(){return!!this.getAttribute("identifier")}render(){return this.validateAllProps()||console.warn(`Invalid props for ${this.outerHTML}`,"missing identifier"),d` <slot></slot> `}};a([p({type:String})],R.prototype,"identifier",2),a([p({type:Number,reflect:!0})],R.prototype,"tabindex",2),a([p({reflect:!0,type:Boolean,attribute:"aria-disabled",converter:{toAttribute:e=>e}})],R.prototype,"disabled",2),a([p({reflect:!0,type:Boolean,attribute:"aria-readonly",converter:{toAttribute:e=>e}})],R.prototype,"readonly",2),a([p({reflect:!0,type:Boolean,attribute:"aria-checked",converter:{toAttribute:e=>e}})],R.prototype,"checked",2),a([$("disabled",{waitUntilFirstUpdate:!0})],R.prototype,"handleDisabledChange",1);var ps=b`
26
26
  :host {
27
27
  display: block;
28
28
  }
@@ -110,7 +110,7 @@ var $r=Object.defineProperty,$s=Object.defineProperties,Ss=Object.getOwnProperty
110
110
  ?disabled="${this.disabled}"
111
111
  ?readonly="${this.readonly}"
112
112
  />
113
- `}textChanged(e){if(this.disabled||this.readonly)return;let r=e.target;this.setEmptyAttribute(r.value),this._value!==r.value&&(this._value=r.value,this.saveResponse(r.value))}reset(){this._value=""}setEmptyAttribute(e){this.setAttribute("empty",e===""?"true":"false")}};a([p({type:Number,attribute:"expected-length"})],P.prototype,"expectedLength",2),a([p({type:String,attribute:"pattern-mask"})],P.prototype,"patternMask",2),a([p({type:String,attribute:"placeholder-text"})],P.prototype,"placeholderText",2),a([C()],P.prototype,"_value",2),a([C()],P.prototype,"_correctValue",2),a([C()],P.prototype,"_size",2),a([p({type:String,attribute:"class"})],P.prototype,"classNames",2),a([$("classNames")],P.prototype,"handleclassNamesChange",1),P=a([m("qti-text-entry-interaction")],P);var R=class extends w{constructor(){super();this._choiceElements=[];this.minChoices=0;this.maxChoices=1;this._handleDisabledChange=(e,r)=>this._choiceElements.forEach(s=>s.disabled=r);this._handleReadonlyChange=(e,r)=>this._choiceElements.forEach(s=>s.readonly=r);this._handleMaxChoicesChange=()=>this._determineInputType();this.addEventListener("qti-register-choice",this._registerChoiceElement),this.addEventListener("qti-loose-choice",this._looseChoiceElement)}validate(){return this._choiceElements.reduce((r,s)=>r+(s.checked?1:0),0)>=this.minChoices}set response(e){let r=Array.isArray(e)?e:[e];this._choiceElements.forEach(s=>{s.checked=!!r.find(n=>n===s.identifier)})}set correctResponse(e){let r=Array.isArray(e)?e:[e];if(e==""){this._choiceElements.forEach(s=>{s.removeAttribute("data-correct-response")});return}this._choiceElements.forEach(s=>{s.setAttribute("data-correct-response",r.find(n=>n===s.identifier)?"true":"false")})}connectedCallback(){super.connectedCallback(),this.addEventListener("qti-choice-element-selected",this._choiceElementSelectedHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("qti-choice-element-selected",this._choiceElementSelectedHandler),this.removeEventListener("qti-register-choice",this._registerChoiceElement)}_registerChoiceElement(e){e.stopPropagation();let r=e.target;this._choiceElements.push(r),this._setInputType(r)}_looseChoiceElement(e){e.stopPropagation();let r=e.target;this._choiceElements.push(r),this._choiceElements=this._choiceElements.filter(s=>s!==r)}_determineInputType(){this._choiceElements.forEach(e=>{this._setInputType(e)})}_setInputType(e){this.maxChoices===1?e.setAttribute("role","radio"):e.setAttribute("role","checkbox")}_choiceElementSelectedHandler(e){this.maxChoices===1&&this._choiceElements.filter(r=>r.identifier!==e.detail.identifier).forEach(r=>{r.checked=!1}),this._choiceElementSelected()}_choiceElementSelected(){let e=this._choiceElements.filter(s=>s.checked).map(s=>s.identifier);this.maxChoices>1&&(this.maxChoices===e.length?this._choiceElements.forEach(s=>s.disabled=!s.checked):this._choiceElements.forEach(s=>s.disabled=!1));let r;this.maxChoices===1?r=e.length>0?e[0]:void 0:r=e,this.saveResponse(r)}};a([p({type:Number,attribute:"min-choices"})],R.prototype,"minChoices",2),a([p({type:Number,attribute:"max-choices"})],R.prototype,"maxChoices",2),a([$("disabled",{waitUntilFirstUpdate:!0})],R.prototype,"_handleDisabledChange",2),a([$("readonly",{waitUntilFirstUpdate:!0})],R.prototype,"_handleReadonlyChange",2),a([$("maxChoices",{waitUntilFirstUpdate:!0})],R.prototype,"_handleMaxChoicesChange",2);var St=class extends R{constructor(){super(...arguments);this.render=()=>d`<slot></slot>`}connectedCallback(){super.connectedCallback(),this.setAttribute("qti-hottext-interaction","")}};St=a([m("qti-hottext-interaction")],St);var Ye=class extends X{constructor(t){if(super(t),this.it=_,t.type!==ie.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===_||t==null)return this._t=void 0,this.it=t;if(t===L)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Ye.directiveName="unsafeHTML",Ye.resultType=1;var qe=Q(Ye);var oe=class extends w{constructor(){super(...arguments);this.options=[];this.correctOption="";this.dataPrompt="select"}static get styles(){return[b`
113
+ `}textChanged(e){if(this.disabled||this.readonly)return;let r=e.target;this.setEmptyAttribute(r.value),this._value!==r.value&&(this._value=r.value,this.saveResponse(r.value))}reset(){this._value=""}setEmptyAttribute(e){this.setAttribute("empty",e===""?"true":"false")}};a([p({type:Number,attribute:"expected-length"})],P.prototype,"expectedLength",2),a([p({type:String,attribute:"pattern-mask"})],P.prototype,"patternMask",2),a([p({type:String,attribute:"placeholder-text"})],P.prototype,"placeholderText",2),a([C()],P.prototype,"_value",2),a([C()],P.prototype,"_correctValue",2),a([C()],P.prototype,"_size",2),a([p({type:String,attribute:"class"})],P.prototype,"classNames",2),a([$("classNames")],P.prototype,"handleclassNamesChange",1),P=a([m("qti-text-entry-interaction")],P);var k=class extends w{constructor(){super();this._choiceElements=[];this.minChoices=0;this.maxChoices=1;this._handleDisabledChange=(e,r)=>this._choiceElements.forEach(s=>s.disabled=r);this._handleReadonlyChange=(e,r)=>this._choiceElements.forEach(s=>s.readonly=r);this._handleMaxChoicesChange=()=>this._determineInputType();this.addEventListener("qti-register-choice",this._registerChoiceElement),this.addEventListener("qti-loose-choice",this._looseChoiceElement)}validate(){return this._choiceElements.reduce((r,s)=>r+(s.checked?1:0),0)>=this.minChoices}set response(e){let r=Array.isArray(e)?e:[e];this._choiceElements.forEach(s=>{s.checked=!!r.find(n=>n===s.identifier)})}set correctResponse(e){let r=Array.isArray(e)?e:[e];if(e==""){this._choiceElements.forEach(s=>{s.removeAttribute("data-correct-response")});return}this._choiceElements.forEach(s=>{s.setAttribute("data-correct-response",r.find(n=>n===s.identifier)?"true":"false")})}connectedCallback(){super.connectedCallback(),this.addEventListener("qti-choice-element-selected",this._choiceElementSelectedHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("qti-choice-element-selected",this._choiceElementSelectedHandler),this.removeEventListener("qti-register-choice",this._registerChoiceElement)}_registerChoiceElement(e){e.stopPropagation();let r=e.target;this._choiceElements.push(r),this._setInputType(r)}_looseChoiceElement(e){e.stopPropagation();let r=e.target;this._choiceElements.push(r),this._choiceElements=this._choiceElements.filter(s=>s!==r)}_determineInputType(){this._choiceElements.forEach(e=>{this._setInputType(e)})}_setInputType(e){this.maxChoices===1?e.setAttribute("role","radio"):e.setAttribute("role","checkbox")}_choiceElementSelectedHandler(e){this.maxChoices===1&&this._choiceElements.filter(r=>r.identifier!==e.detail.identifier).forEach(r=>{r.checked=!1}),this._choiceElementSelected()}_choiceElementSelected(){let e=this._choiceElements.filter(s=>s.checked).map(s=>s.identifier);this.maxChoices>1&&(this.maxChoices===e.length?this._choiceElements.forEach(s=>s.disabled=!s.checked):this._choiceElements.forEach(s=>s.disabled=!1));let r;this.maxChoices===1?r=e.length>0?e[0]:void 0:r=e,this.saveResponse(r)}};a([p({type:Number,attribute:"min-choices"})],k.prototype,"minChoices",2),a([p({type:Number,attribute:"max-choices"})],k.prototype,"maxChoices",2),a([$("disabled",{waitUntilFirstUpdate:!0})],k.prototype,"_handleDisabledChange",2),a([$("readonly",{waitUntilFirstUpdate:!0})],k.prototype,"_handleReadonlyChange",2),a([$("maxChoices",{waitUntilFirstUpdate:!0})],k.prototype,"_handleMaxChoicesChange",2);var St=class extends k{constructor(){super(...arguments);this.render=()=>d`<slot></slot>`}connectedCallback(){super.connectedCallback(),this.setAttribute("qti-hottext-interaction","")}};St=a([m("qti-hottext-interaction")],St);var Ye=class extends X{constructor(t){if(super(t),this.it=_,t.type!==ie.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===_||t==null)return this._t=void 0,this.it=t;if(t===L)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Ye.directiveName="unsafeHTML",Ye.resultType=1;var qe=Q(Ye);var oe=class extends w{constructor(){super(...arguments);this.options=[];this.correctOption="";this.dataPrompt="select"}static get styles(){return[b`
114
114
  :host {
115
115
  display: inline-block;
116
116
  }
@@ -128,7 +128,7 @@ var $r=Object.defineProperty,$s=Object.defineProperties,Ss=Object.getOwnProperty
128
128
  flex-direction: column;
129
129
  // align-items: flex-start;
130
130
  }
131
- `;var Ae=class extends R{render(){return d` <slot name="prompt"></slot><slot part="slot"></slot>`}};Ae.styles=vs,a([p({type:String})],Ae.prototype,"orientation",2),Ae=a([m("qti-choice-interaction")],Ae);var ze=class extends g{render(){return d`<slot></slot>`}process(){let t=new ir,e=[...this.children];t.process(e)}};ze.styles=[b`
131
+ `;var Ae=class extends k{render(){return d` <slot name="prompt"></slot><slot part="slot"></slot>`}};Ae.styles=vs,a([p({type:String})],Ae.prototype,"orientation",2),Ae=a([m("qti-choice-interaction")],Ae);var ze=class extends g{render(){return d`<slot></slot>`}process(){let t=new ir,e=[...this.children];t.process(e)}};ze.styles=[b`
132
132
  :host {
133
133
  display: none;
134
134
  }
@@ -297,7 +297,7 @@ var $r=Object.defineProperty,$s=Object.defineProperties,Ss=Object.getOwnProperty
297
297
  display: flex;
298
298
  gap: 1rem;
299
299
  }
300
- `,Ge=a([m("qti-graphic-gap-match-interaction")],Ge);var Qe=class extends R{render(){return d`
300
+ `,Ge=a([m("qti-graphic-gap-match-interaction")],Ge);var Qe=class extends k{render(){return d`
301
301
  <slot name="prompt"></slot>
302
302
  <!-- slot for the prompt -->
303
303
  <slot></slot>
@@ -313,7 +313,7 @@ var $r=Object.defineProperty,$s=Object.defineProperties,Ss=Object.getOwnProperty
313
313
  pointer-events: none;
314
314
  user-select: none;
315
315
  }
316
- `],Qe=a([m("qti-graphic-order-interaction")],Qe);var et=class extends R{render(){return d`
316
+ `],Qe=a([m("qti-graphic-order-interaction")],Qe);var et=class extends k{render(){return d`
317
317
  <slot name="prompt"></slot>
318
318
  <!-- slot for the prompt -->
319
319
  <slot></slot>
@@ -330,7 +330,7 @@ var $r=Object.defineProperty,$s=Object.defineProperties,Ss=Object.getOwnProperty
330
330
  user-select: none;
331
331
  /* width:100%; */
332
332
  }
333
- `],et=a([m("qti-hotspot-interaction")],et);var me=class extends g{constructor(){super(...arguments);this.matchMin=0;this.matchMax=1;this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","qti-simple-associable-choice"),this.setAttribute("part","qti-simple-associable-choice")}render(){return d`
333
+ `],et=a([m("qti-hotspot-interaction")],et);var me=class extends R{constructor(){super(...arguments);this.matchMin=0;this.matchMax=1;this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","qti-simple-associable-choice"),this.setAttribute("part","qti-simple-associable-choice")}render(){return d`
334
334
  <slot></slot>
335
335
  <slot name="qti-simple-associable-choice"></slot>
336
336
  `}};a([p({type:Number,attribute:"match-min"})],me.prototype,"matchMin",2),a([p({type:Number,attribute:"match-max"})],me.prototype,"matchMax",2),a([p({type:Boolean,attribute:"fixed"})],me.prototype,"fixed",2),me=a([m("qti-simple-associable-choice")],me);var he=class extends z(g,"qti-simple-match-set:first-of-type qti-simple-associable-choice",!1,"qti-simple-match-set:last-of-type qti-simple-associable-choice"){constructor(){super(...arguments);this.response=[];this.responseIdentifier=""}connectedCallback(){super.connectedCallback(),this.rows=Array.from(this.querySelectorAll("qti-simple-match-set:first-of-type qti-simple-associable-choice")),this.cols=Array.from(this.querySelectorAll("qti-simple-match-set:last-of-type qti-simple-associable-choice")),this.response=[]}render(){return this.classList.contains("qti-match-tabular")?d`
@@ -345,6 +345,8 @@ var $r=Object.defineProperty,$s=Object.defineProperties,Ss=Object.getOwnProperty
345
345
  ${this.cols.map((s,n)=>{let o=e.getAttribute("identifier"),l=s.getAttribute("identifier"),c=`${o} ${l}`,u=this.response.filter(y=>y.split(" ")[0]===o).length||0,h=this.response.includes(c),f=e.matchMax===1?!1:u>=e.matchMax&&!h;return d`<td>
346
346
  <input
347
347
  type=${e.matchMax===1?"radio":"checkbox"}
348
+ id=${c}
349
+ name=${o}
348
350
  value=${c}
349
351
  .disabled=${f}
350
352
  .checked=${h}
@@ -443,7 +445,7 @@ var $r=Object.defineProperty,$s=Object.defineProperties,Ss=Object.getOwnProperty
443
445
  display: block;
444
446
  position: relative;
445
447
  }
446
- `],a([p({type:Number,attribute:"max-choices"})],ne.prototype,"maxChoices",2),a([p({type:Number,attribute:"min-choices"})],ne.prototype,"minChoices",2),a([C()],ne.prototype,"_points",2),ne=a([m("qti-select-point-interaction")],ne);var k=class extends w{constructor(){super();this.stepLabel=!1;this.reverse=!1;this._handleDisabledChange=(e,r)=>{};this._handleReadonlyChange=(e,r)=>{};this.csLive=getComputedStyle(this)}set min(e){this._min=e,this.value=e,this.style.setProperty("--min",`${this._min}`)}get min(){return this._min}set max(e){this._max=e,this.style.setProperty("--max",`${this._max}`)}get max(){return this._max}set step(e){this._step=e,this.style.setProperty("--step",`${this._step}`)}get step(){return this._step}reset(){}validate(){return!0}set response(e){if(Array.isArray(e)){console.error("QtiSliderInteraction: response is an array, but should be a single value");return}let r=parseInt(e);if(Number.isNaN(r)){console.error("QtiSliderInteraction: response is not a number");return}this.value=r}render(){this.value<this.min&&(this.value=this.min),this.value>this.max&&(this.value=this.max);let e=(this.value-this.min)/(this.max-this.min)*100;return this.style.setProperty("--value-percentage",`${e}%`),this.setAttribute("aria-valuenow",this.value.toString()),d`<slot name="prompt"></slot>
448
+ `],a([p({type:Number,attribute:"max-choices"})],ne.prototype,"maxChoices",2),a([p({type:Number,attribute:"min-choices"})],ne.prototype,"minChoices",2),a([C()],ne.prototype,"_points",2),ne=a([m("qti-select-point-interaction")],ne);var M=class extends w{constructor(){super();this.stepLabel=!1;this.reverse=!1;this._handleDisabledChange=(e,r)=>{};this._handleReadonlyChange=(e,r)=>{};this.csLive=getComputedStyle(this)}set min(e){this._min=e,this.value=e,this.style.setProperty("--min",`${this._min}`)}get min(){return this._min}set max(e){this._max=e,this.style.setProperty("--max",`${this._max}`)}get max(){return this._max}set step(e){this._step=e,this.style.setProperty("--step",`${this._step}`)}get step(){return this._step}reset(){}validate(){return!0}set response(e){if(Array.isArray(e)){console.error("QtiSliderInteraction: response is an array, but should be a single value");return}let r=parseInt(e);if(Number.isNaN(r)){console.error("QtiSliderInteraction: response is not a number");return}this.value=r}render(){this.value<this.min&&(this.value=this.min),this.value>this.max&&(this.value=this.max);let e=(this.value-this.min)/(this.max-this.min)*100;return this.style.setProperty("--value-percentage",`${e}%`),this.setAttribute("aria-valuenow",this.value.toString()),d`<slot name="prompt"></slot>
447
449
  <div id="slider" part="slider">
448
450
  ${this.csLive.getPropertyValue("--show-bounds")=="true"?d`<div id="bounds" part="bounds">
449
451
  <div>${this._min}</div>
@@ -455,16 +457,16 @@ var $r=Object.defineProperty,$s=Object.defineProperties,Ss=Object.getOwnProperty
455
457
  ${this.csLive.getPropertyValue("--show-value")=="true"?d`<div id="value" part="value">${this.value}</div>`:_}
456
458
  </div>
457
459
  </div>
458
- </div>`}connectedCallback(){super.connectedCallback(),this.step=1,this.setAttribute("tabindex","0"),this.setAttribute("role","slider")}_onTouchMove(e){let r=l=>{let{x:c}=this.getPositionFromEvent(l),u=c-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(u),l.stopPropagation()},s=()=>{document.removeEventListener("touchmove",r),document.removeEventListener("touchend",s),this.saveResponse(this.value.toString())};document.addEventListener("touchmove",r),document.addEventListener("touchend",s);let{x:n}=this.getPositionFromEvent(e),o=n-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(o),e.stopPropagation()}_onMouseDown(e){let r=o=>{let l=o.pageX-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(l),o.preventDefault(),o.stopPropagation()},s=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",s),this.saveResponse(this.value.toString())};document.addEventListener("mousemove",r),document.addEventListener("mouseup",s);let n=e.pageX-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(n),e.preventDefault(),e.stopPropagation()}calculateValue(e){let r=this.min+(this.max-this.min)*e/this._rail.getBoundingClientRect().width,s=this.min+Math.round((r-this.min)/this._step)*this._step;this.value=s}getPositionFromEvent(e){let r;if(e.type=="touchstart"||e.type=="touchmove"||e.type=="touchend"||e.type=="touchcancel"){let s=typeof e.originalEvent=="undefined"?e:e.originalEvent,n=s.touches[0]||s.changedTouches[0];r={x:n.pageX,y:n.pageY}}else(e.type=="mousedown"||e.type=="mouseup"||e.type=="mousemove"||e.type=="mouseover"||e.type=="mouseout"||e.type=="mouseenter"||e.type=="mouseleave")&&(r={x:e.clientX,y:e.clientY});return r}};k.styles=[b``],a([Ue("#knob")],k.prototype,"_knob",2),a([Ue("#rail")],k.prototype,"_rail",2),a([p({type:Number})],k.prototype,"value",2),a([p({type:Boolean,attribute:"step-label"})],k.prototype,"stepLabel",2),a([p({type:Boolean})],k.prototype,"reverse",2),a([p({type:Number,attribute:"lower-bound"})],k.prototype,"min",1),a([p({type:Number,attribute:"upper-bound"})],k.prototype,"max",1),a([p({type:Number,attribute:"step"})],k.prototype,"step",1),a([$("disabled",{waitUntilFirstUpdate:!0})],k.prototype,"_handleDisabledChange",2),a([$("readonly",{waitUntilFirstUpdate:!0})],k.prototype,"_handleReadonlyChange",2),k=a([m("qti-slider-interaction")],k);var st=class extends g{render(){return d`<slot @slotchange=${this.handleSlotChange}></slot>`}handleSlotChange(t){var r,s,n;let e=Array.from((s=(r=this.firstElementChild)==null?void 0:r.childNodes)!=null?s:[]).find(o=>o.nodeType===Node.COMMENT_NODE);try{this.operatorFunction=new Function("context","fn","item",(n=e.textContent)!=null?n:"")}catch(o){console.error("custom-operator contains invalid javascript code",o)}}calculate(){let t={variable:r=>{var s,n,o;return(o=(n=(s=this._context)==null?void 0:s.variables.find(l=>l.identifier===r))==null?void 0:n.value)!=null?o:""},correct:r=>{var s,n,o;return(o=(n=(s=this._context)==null?void 0:s.variables.find(l=>l.identifier===r))==null?void 0:n.correctResponse)!=null?o:""}},e={getVariable:r=>{var s;return(s=this._context)==null?void 0:s.variables.find(n=>n.identifier===r)},updateOutcomeVariable:(r,s)=>{this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:r,value:s}}))}};return this.operatorFunction(this._context,t,e)}};a([K({context:U,subscribe:!0}),C()],st.prototype,"_context",2),st=a([m("qti-custom-operator")],st);var it=class extends g{connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("qti-register-hotspot",{bubbles:!0,cancelable:!1,composed:!0}))}render(){return d` <slot name="qti-gap-img"></slot> `}};it.styles=b`
460
+ </div>`}connectedCallback(){super.connectedCallback(),this.step=1,this.setAttribute("tabindex","0"),this.setAttribute("role","slider")}_onTouchMove(e){let r=l=>{let{x:c}=this.getPositionFromEvent(l),u=c-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(u),l.stopPropagation()},s=()=>{document.removeEventListener("touchmove",r),document.removeEventListener("touchend",s),this.saveResponse(this.value.toString())};document.addEventListener("touchmove",r),document.addEventListener("touchend",s);let{x:n}=this.getPositionFromEvent(e),o=n-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(o),e.stopPropagation()}_onMouseDown(e){let r=o=>{let l=o.pageX-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(l),o.preventDefault(),o.stopPropagation()},s=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",s),this.saveResponse(this.value.toString())};document.addEventListener("mousemove",r),document.addEventListener("mouseup",s);let n=e.pageX-this._rail.getBoundingClientRect().left-document.documentElement.scrollLeft;this.calculateValue(n),e.preventDefault(),e.stopPropagation()}calculateValue(e){let r=this.min+(this.max-this.min)*e/this._rail.getBoundingClientRect().width,s=this.min+Math.round((r-this.min)/this._step)*this._step;this.value=s}getPositionFromEvent(e){let r;if(e.type=="touchstart"||e.type=="touchmove"||e.type=="touchend"||e.type=="touchcancel"){let s=typeof e.originalEvent=="undefined"?e:e.originalEvent,n=s.touches[0]||s.changedTouches[0];r={x:n.pageX,y:n.pageY}}else(e.type=="mousedown"||e.type=="mouseup"||e.type=="mousemove"||e.type=="mouseover"||e.type=="mouseout"||e.type=="mouseenter"||e.type=="mouseleave")&&(r={x:e.clientX,y:e.clientY});return r}};M.styles=[b``],a([Ue("#knob")],M.prototype,"_knob",2),a([Ue("#rail")],M.prototype,"_rail",2),a([p({type:Number})],M.prototype,"value",2),a([p({type:Boolean,attribute:"step-label"})],M.prototype,"stepLabel",2),a([p({type:Boolean})],M.prototype,"reverse",2),a([p({type:Number,attribute:"lower-bound"})],M.prototype,"min",1),a([p({type:Number,attribute:"upper-bound"})],M.prototype,"max",1),a([p({type:Number,attribute:"step"})],M.prototype,"step",1),a([$("disabled",{waitUntilFirstUpdate:!0})],M.prototype,"_handleDisabledChange",2),a([$("readonly",{waitUntilFirstUpdate:!0})],M.prototype,"_handleReadonlyChange",2),M=a([m("qti-slider-interaction")],M);var st=class extends g{render(){return d`<slot @slotchange=${this.handleSlotChange}></slot>`}handleSlotChange(t){var r,s,n;let e=Array.from((s=(r=this.firstElementChild)==null?void 0:r.childNodes)!=null?s:[]).find(o=>o.nodeType===Node.COMMENT_NODE);try{this.operatorFunction=new Function("context","fn","item",(n=e.textContent)!=null?n:"")}catch(o){console.error("custom-operator contains invalid javascript code",o)}}calculate(){let t={variable:r=>{var s,n,o;return(o=(n=(s=this._context)==null?void 0:s.variables.find(l=>l.identifier===r))==null?void 0:n.value)!=null?o:""},correct:r=>{var s,n,o;return(o=(n=(s=this._context)==null?void 0:s.variables.find(l=>l.identifier===r))==null?void 0:n.correctResponse)!=null?o:""}},e={getVariable:r=>{var s;return(s=this._context)==null?void 0:s.variables.find(n=>n.identifier===r)},updateOutcomeVariable:(r,s)=>{this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:r,value:s}}))}};return this.operatorFunction(this._context,t,e)}};a([K({context:U,subscribe:!0}),C()],st.prototype,"_context",2),st=a([m("qti-custom-operator")],st);var it=class extends g{connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("qti-register-hotspot",{bubbles:!0,cancelable:!1,composed:!0}))}render(){return d` <slot name="qti-gap-img"></slot> `}};it.styles=b`
459
461
  :host {
460
462
  position: absolute;
461
463
  }
462
- `,it=a([m("qti-associable-hotspot")],it);var ot=class extends g{constructor(){super(...arguments);this.tabindex=0}render(){return d` <slot name="qti-gap-text"></slot>`}};a([p({type:Number,reflect:!0})],ot.prototype,"tabindex",2),ot=a([m("qti-gap")],ot);var nt=class extends g{constructor(){super(...arguments);this.tabindex=0}connectedCallback(){this.setAttribute("slot","qti-gap-img")}};a([p({type:Number,reflect:!0})],nt.prototype,"tabindex",2),nt=a([m("qti-gap-img")],nt);var at=class extends g{constructor(){super(...arguments);this.tabindex=0}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","qti-gap-text")}render(){return d`<slot></slot>`}};a([p({type:Number,reflect:!0})],at.prototype,"tabindex",2),at=a([m("qti-gap-text")],at);var Re=class extends M{};Re.styles=b`
464
+ `,it=a([m("qti-associable-hotspot")],it);var ot=class extends g{constructor(){super(...arguments);this.tabindex=0}render(){return d` <slot name="qti-gap-text"></slot>`}};a([p({type:Number,reflect:!0})],ot.prototype,"tabindex",2),ot=a([m("qti-gap")],ot);var nt=class extends g{constructor(){super(...arguments);this.tabindex=0}connectedCallback(){this.setAttribute("slot","qti-gap-img")}};a([p({type:Number,reflect:!0})],nt.prototype,"tabindex",2),nt=a([m("qti-gap-img")],nt);var at=class extends g{constructor(){super(...arguments);this.tabindex=0}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","qti-gap-text")}render(){return d`<slot></slot>`}};a([p({type:Number,reflect:!0})],at.prototype,"tabindex",2),at=a([m("qti-gap-text")],at);var Re=class extends R{};Re.styles=b`
463
465
  :host {
464
466
  position: absolute;
465
467
  }
466
- `,a([p({attribute:"aria-ordervalue",type:Number,reflect:!0})],Re.prototype,"order",2),Re=a([m("qti-hotspot-choice")],Re);var It=class extends M{render(){return d`<div part="ch"><div part="cha"></div></div>
467
- <slot></slot> `}};It=a([m("qti-hottext")],It);var Ft=class extends g{};Ft=a([m("qti-inline-choice")],Ft);var lt=class extends M{render(){return d`<div part="ch"><div part="cha"></div></div>
468
+ `,a([p({attribute:"aria-ordervalue",type:Number,reflect:!0})],Re.prototype,"order",2),Re=a([m("qti-hotspot-choice")],Re);var It=class extends R{render(){return d`<div part="ch"><div part="cha"></div></div>
469
+ <slot></slot> `}};It=a([m("qti-hottext")],It);var Ft=class extends g{};Ft=a([m("qti-inline-choice")],Ft);var lt=class extends R{render(){return d`<div part="ch"><div part="cha"></div></div>
468
470
  <slot part="slot"></slot> `}};lt.styles=b`
469
471
  :host {
470
472
  display: flex;
@@ -473,7 +475,7 @@ var $r=Object.defineProperty,$s=Object.defineProperties,Ss=Object.getOwnProperty
473
475
  width: 100%;
474
476
  display: block;
475
477
  }
476
- `,lt=a([m("qti-simple-choice")],lt);console.log("%cC\xBFTO%cLab%c: qti-components loaded","font-weight:bold; color:green",'font-family: "PT Sans", font-weight:bold; color:green; font-size: smaller;vertical-align: sub',"font-weight:unset");export{w as Interaction,Je as QtPrintedVariable,kt as QtiAnd,N as QtiAssessmentItem,Ee as QtiAssessmentStimulusRef,it as QtiAssociableHotspot,Te as QtiAssociateInteraction,Mt as QtiBaseValue,M as QtiChoice,Ae as QtiChoiceInteraction,Ct as QtiCompanionMaterialsInfo,V as QtiConditionExpression,cr as QtiContains,qt as QtiContentBody,pr as QtiCorrect,st as QtiCustomOperator,$e as QtiEndAttemptInteraction,Nt as QtiEqual,Lt as QtiEqualRounded,x as QtiExpression,j as QtiExtendedTextInteraction,Fe as QtiFeedbackBlock,Be as QtiFeedbackInline,ot as QtiGap,nt as QtiGapImg,Ze as QtiGapMatchInteraction,at as QtiGapText,W as QtiGraphicAssociateInteraction,Ge as QtiGraphicGapMatchInteraction,Qe as QtiGraphicOrderInteraction,dr as QtiGt,ur as QtiGte,Re as QtiHotspotChoice,et as QtiHotspotInteraction,It as QtiHottext,St as QtiHottextInteraction,Ft as QtiInlineChoice,oe as QtiInlineChoiceInteraction,mr as QtiIsNull,Rt as QtiLookupOutcomeValue,hr as QtiLt,fr as QtiLte,Ht as QtiMapResponse,we as QtiMapping,gr as QtiMatch,he as QtiMatchInteraction,tt as QtiMediaInteraction,br as QtiMember,Xe as QtiModalFeedback,vr as QtiMultiple,yr as QtiNot,xr as QtiOr,fe as QtiOrderInteraction,Er as QtiOrdered,I as QtiOutcomeDeclaration,ze as QtiOutcomeProcessing,ir as QtiOutcomeProcessingProcessor,Vt as QtiPortableCustomInteraction,rt as QtiPositionObjectStage,_r as QtiProduct,Et as QtiPrompt,or as QtiResponseCondition,G as QtiResponseDeclaration,We as QtiResponseElse,lr as QtiResponseElseIf,Ke as QtiResponseIf,ue as QtiResponseProcessing,F as QtiRubricBlock,Y as QtiRule,Ut as QtiSPositionObjectInteraction,ne as QtiSelectPointInteraction,nr as QtiSetOutcomeValue,ar as QtiSetOutcomeValueRule,me as QtiSimpleAssociableChoice,lt as QtiSimpleChoice,k as QtiSliderInteraction,Pt as QtiStringMatch,_t as QtiStylesheet,Cr as QtiSum,qr as QtiSumExpression,P as QtiTextEntryInteraction,Ar as QtiVariable,U as itemContext,ns as itemContextVariables,ai as qtiAndMixin,as as qtiTransformItem,nn as qtiTransformTest};
478
+ `,lt=a([m("qti-simple-choice")],lt);console.log("%cC\xBFTO%cLab%c: qti-components loaded","font-weight:bold; color:green",'font-family: "PT Sans", font-weight:bold; color:green; font-size: smaller;vertical-align: sub',"font-weight:unset");export{w as Interaction,Je as QtPrintedVariable,kt as QtiAnd,N as QtiAssessmentItem,Ee as QtiAssessmentStimulusRef,it as QtiAssociableHotspot,Te as QtiAssociateInteraction,Mt as QtiBaseValue,R as QtiChoice,Ae as QtiChoiceInteraction,Ct as QtiCompanionMaterialsInfo,V as QtiConditionExpression,cr as QtiContains,qt as QtiContentBody,pr as QtiCorrect,st as QtiCustomOperator,$e as QtiEndAttemptInteraction,Nt as QtiEqual,Lt as QtiEqualRounded,x as QtiExpression,j as QtiExtendedTextInteraction,Fe as QtiFeedbackBlock,Be as QtiFeedbackInline,ot as QtiGap,nt as QtiGapImg,Ze as QtiGapMatchInteraction,at as QtiGapText,W as QtiGraphicAssociateInteraction,Ge as QtiGraphicGapMatchInteraction,Qe as QtiGraphicOrderInteraction,dr as QtiGt,ur as QtiGte,Re as QtiHotspotChoice,et as QtiHotspotInteraction,It as QtiHottext,St as QtiHottextInteraction,Ft as QtiInlineChoice,oe as QtiInlineChoiceInteraction,mr as QtiIsNull,Rt as QtiLookupOutcomeValue,hr as QtiLt,fr as QtiLte,Ht as QtiMapResponse,we as QtiMapping,gr as QtiMatch,he as QtiMatchInteraction,tt as QtiMediaInteraction,br as QtiMember,Xe as QtiModalFeedback,vr as QtiMultiple,yr as QtiNot,xr as QtiOr,fe as QtiOrderInteraction,Er as QtiOrdered,I as QtiOutcomeDeclaration,ze as QtiOutcomeProcessing,ir as QtiOutcomeProcessingProcessor,Vt as QtiPortableCustomInteraction,rt as QtiPositionObjectStage,_r as QtiProduct,Et as QtiPrompt,or as QtiResponseCondition,G as QtiResponseDeclaration,We as QtiResponseElse,lr as QtiResponseElseIf,Ke as QtiResponseIf,ue as QtiResponseProcessing,F as QtiRubricBlock,Y as QtiRule,Ut as QtiSPositionObjectInteraction,ne as QtiSelectPointInteraction,nr as QtiSetOutcomeValue,ar as QtiSetOutcomeValueRule,me as QtiSimpleAssociableChoice,lt as QtiSimpleChoice,M as QtiSliderInteraction,Pt as QtiStringMatch,_t as QtiStylesheet,Cr as QtiSum,qr as QtiSumExpression,P as QtiTextEntryInteraction,Ar as QtiVariable,U as itemContext,ns as itemContextVariables,ai as qtiAndMixin,as as qtiTransformItem,nn as qtiTransformTest};
477
479
  /*! Bundled license information:
478
480
 
479
481
  @lit/context/lib/context-request-event.js:
@@ -1008,7 +1008,7 @@ declare global {
1008
1008
  }
1009
1009
  }
1010
1010
 
1011
- declare class QtiSimpleAssociableChoice extends LitElement {
1011
+ declare class QtiSimpleAssociableChoice extends QtiChoice {
1012
1012
  /** the minimal number of selections a candidate must make */
1013
1013
  matchMin: number;
1014
1014
  /** the maximum number of selections a candidate must make, the other options will be disabled when max options is checked */