@citolab/qti-components 7.0.3 → 7.0.5

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 (283) hide show
  1. package/cdn/chunks/chunk-4UJBK6JO.js +1 -0
  2. package/cdn/chunks/chunk-5FCXUJAG.js +23 -0
  3. package/cdn/chunks/chunk-5O3Z7TDV.js +1 -0
  4. package/cdn/chunks/chunk-65LFT33L.js +8 -0
  5. package/cdn/chunks/chunk-6D25UFJR.js +8 -0
  6. package/cdn/chunks/chunk-6DMSHH5X.js +0 -0
  7. package/cdn/chunks/chunk-6UGPNL7M.js +1 -0
  8. package/cdn/chunks/chunk-CFXQCNG6.js +3523 -0
  9. package/cdn/chunks/chunk-CSUKVUZF.js +3 -0
  10. package/cdn/chunks/chunk-CSY3WI5A.js +1 -0
  11. package/cdn/chunks/chunk-DAZR7RUI.js +0 -0
  12. package/cdn/chunks/chunk-EHK76KRT.js +1 -0
  13. package/cdn/chunks/chunk-EOPEMJS3.js +0 -0
  14. package/cdn/chunks/chunk-G5O7EN45.js +5 -0
  15. package/cdn/chunks/chunk-GEFUIFM7.js +0 -0
  16. package/cdn/chunks/chunk-JLNHEMQG.js +1 -0
  17. package/cdn/chunks/chunk-LPWIM7QJ.js +902 -0
  18. package/cdn/chunks/chunk-M3YRM3AV.js +1 -0
  19. package/cdn/chunks/chunk-M6BOWL2U.js +1 -0
  20. package/cdn/chunks/chunk-P5IE36FO.js +8 -0
  21. package/cdn/chunks/chunk-PXH5KN5O.js +1 -0
  22. package/cdn/chunks/chunk-RBEI6NIF.js +1 -0
  23. package/cdn/chunks/chunk-SMKIYFFI.js +1 -0
  24. package/cdn/chunks/chunk-SRLMW23F.js +0 -0
  25. package/cdn/chunks/chunk-T3YDLD2H.js +11 -0
  26. package/cdn/chunks/chunk-T4HD2C4F.js +1 -0
  27. package/cdn/chunks/chunk-T6IXJ4W4.js +1 -0
  28. package/cdn/chunks/chunk-TFAUBGP2.js +0 -0
  29. package/cdn/chunks/chunk-UIEC4LXR.js +17 -0
  30. package/cdn/chunks/chunk-V44O3GTW.js +0 -0
  31. package/cdn/chunks/chunk-V6B54FQW.js +5 -0
  32. package/cdn/chunks/chunk-V6KX6BQN.js +1 -0
  33. package/cdn/chunks/chunk-VYANBI35.js +1 -0
  34. package/cdn/chunks/chunk-XUJ7TXHW.js +1 -0
  35. package/cdn/chunks/chunk-ZIZLFFSG.js +0 -0
  36. package/cdn/index.css +1 -0
  37. package/cdn/index.global.js +45 -45
  38. package/cdn/index.js +354 -4148
  39. package/cdn/qti-components/index.global.js +226 -0
  40. package/cdn/qti-components/index.js +924 -0
  41. package/cdn/qti-item/components/index.css +1 -0
  42. package/cdn/qti-item/components/index.global.js +149 -0
  43. package/cdn/qti-item/components/index.js +3549 -0
  44. package/cdn/qti-item/components/item-container.css +1 -0
  45. package/cdn/qti-item/components/item-container.global.js +149 -0
  46. package/cdn/qti-item/components/item-container.js +3549 -0
  47. package/cdn/qti-item/index.css +1 -0
  48. package/cdn/qti-item/index.global.js +149 -0
  49. package/cdn/qti-item/index.js +3549 -0
  50. package/cdn/qti-item/qti-item.global.js +114 -0
  51. package/cdn/qti-item/qti-item.js +1 -0
  52. package/cdn/qti-loader/index.global.js +1 -0
  53. package/cdn/qti-loader/index.js +23 -0
  54. package/cdn/qti-test/components/index.css +1 -0
  55. package/cdn/qti-test/components/index.global.js +242 -0
  56. package/cdn/qti-test/components/index.js +3598 -0
  57. package/cdn/qti-test/components/styles.global.js +44 -0
  58. package/cdn/qti-test/components/styles.js +17 -0
  59. package/cdn/qti-test/components/test-component.abstract.global.js +170 -0
  60. package/cdn/qti-test/components/test-component.abstract.js +1 -0
  61. package/cdn/qti-test/components/test-container.css +1 -0
  62. package/cdn/qti-test/components/test-container.global.js +149 -0
  63. package/cdn/qti-test/components/test-container.js +3549 -0
  64. package/cdn/qti-test/components/test-item-link.global.js +170 -0
  65. package/cdn/qti-test/components/test-item-link.js +24 -0
  66. package/cdn/qti-test/components/test-next.global.js +170 -0
  67. package/cdn/qti-test/components/test-next.js +24 -0
  68. package/cdn/qti-test/components/test-next.spec.css +1 -0
  69. package/cdn/qti-test/components/test-next.spec.global.js +297 -0
  70. package/cdn/qti-test/components/test-next.spec.js +5215 -0
  71. package/cdn/qti-test/components/test-paging-buttons-stamp.global.js +207 -0
  72. package/cdn/qti-test/components/test-paging-buttons-stamp.js +3 -0
  73. package/cdn/qti-test/components/test-prev.global.js +170 -0
  74. package/cdn/qti-test/components/test-prev.js +24 -0
  75. package/cdn/qti-test/components/test-view.global.js +170 -0
  76. package/cdn/qti-test/components/test-view.js +11 -0
  77. package/cdn/qti-test/context/index.global.js +58 -0
  78. package/cdn/qti-test/context/index.js +1 -0
  79. package/cdn/qti-test/context/test.context.global.js +58 -0
  80. package/cdn/qti-test/context/test.context.js +1 -0
  81. package/cdn/qti-test/index.css +1 -0
  82. package/cdn/qti-test/index.global.js +242 -0
  83. package/cdn/qti-test/index.js +3598 -0
  84. package/cdn/qti-test/mixins/index.global.js +1 -0
  85. package/cdn/qti-test/mixins/index.js +23 -0
  86. package/cdn/qti-test/mixins/test-loader.mixin.global.js +1 -0
  87. package/cdn/qti-test/mixins/test-loader.mixin.js +23 -0
  88. package/cdn/qti-test/mixins/test-navigation.mixin.global.js +1 -0
  89. package/cdn/qti-test/mixins/test-navigation.mixin.js +1 -0
  90. package/cdn/qti-test/mixins/test-view.mixin.global.js +1 -0
  91. package/cdn/qti-test/mixins/test-view.mixin.js +1 -0
  92. package/cdn/qti-test/qti-assessment-test/index.global.js +170 -0
  93. package/cdn/qti-test/qti-assessment-test/index.js +1 -0
  94. package/cdn/qti-test/qti-assessment-test/qti-assessment-item-ref.global.js +170 -0
  95. package/cdn/qti-test/qti-assessment-test/qti-assessment-item-ref.js +1 -0
  96. package/cdn/qti-test/qti-assessment-test/qti-assessment-section.global.js +170 -0
  97. package/cdn/qti-test/qti-assessment-test/qti-assessment-section.js +1 -0
  98. package/cdn/qti-test/qti-assessment-test/qti-assessment-test.global.js +170 -0
  99. package/cdn/qti-test/qti-assessment-test/qti-assessment-test.js +1 -0
  100. package/cdn/qti-test/qti-assessment-test/qti-test-part.global.js +114 -0
  101. package/cdn/qti-test/qti-assessment-test/qti-test-part.js +1 -0
  102. package/cdn/qti-test/qti-test.global.js +170 -0
  103. package/cdn/qti-test/qti-test.js +23 -0
  104. package/cdn/qti-test/test-base.global.js +170 -0
  105. package/cdn/qti-test/test-base.js +1 -0
  106. package/cdn/qti-transformers/index.global.js +1 -0
  107. package/cdn/qti-transformers/index.js +23 -0
  108. package/dist/chunks/chunk-3G2DDBJW.js +44 -0
  109. package/dist/chunks/chunk-3G2DDBJW.js.map +1 -0
  110. package/dist/chunks/chunk-3NLCJYSX.js +1 -0
  111. package/dist/chunks/chunk-3NLCJYSX.js.map +1 -0
  112. package/dist/chunks/chunk-3OXGDCSU.js +6253 -0
  113. package/dist/chunks/chunk-3OXGDCSU.js.map +1 -0
  114. package/dist/chunks/chunk-3ROZMGAN.js +43 -0
  115. package/dist/chunks/chunk-3ROZMGAN.js.map +1 -0
  116. package/dist/chunks/chunk-4O5F7WV7.js +30 -0
  117. package/dist/chunks/chunk-4O5F7WV7.js.map +1 -0
  118. package/dist/chunks/chunk-6YE2KJ4C.js +55 -0
  119. package/dist/chunks/chunk-6YE2KJ4C.js.map +1 -0
  120. package/dist/chunks/chunk-AAQCM2FP.js +56 -0
  121. package/dist/chunks/chunk-AAQCM2FP.js.map +1 -0
  122. package/dist/chunks/chunk-D3RGDWKP.js +37 -0
  123. package/dist/chunks/chunk-D3RGDWKP.js.map +1 -0
  124. package/dist/chunks/chunk-DJLE6EV2.js +36 -0
  125. package/dist/chunks/chunk-DJLE6EV2.js.map +1 -0
  126. package/dist/chunks/chunk-ELDMXTUQ.js +31 -0
  127. package/dist/chunks/chunk-ELDMXTUQ.js.map +1 -0
  128. package/dist/chunks/chunk-EW5CTHAD.js +1 -0
  129. package/dist/chunks/chunk-EW5CTHAD.js.map +1 -0
  130. package/dist/chunks/chunk-HWA4A3SR.js +50 -0
  131. package/dist/chunks/chunk-HWA4A3SR.js.map +1 -0
  132. package/dist/chunks/chunk-IKZWK2C5.js +1 -0
  133. package/dist/chunks/chunk-IKZWK2C5.js.map +1 -0
  134. package/dist/chunks/chunk-IP7JSYO6.js +1 -0
  135. package/dist/chunks/chunk-IP7JSYO6.js.map +1 -0
  136. package/dist/chunks/chunk-JE6BMXZU.js +94 -0
  137. package/dist/chunks/chunk-JE6BMXZU.js.map +1 -0
  138. package/dist/chunks/chunk-JSPJGWGT.js +20 -0
  139. package/dist/chunks/chunk-JSPJGWGT.js.map +1 -0
  140. package/dist/chunks/chunk-LKINC6JO.js +118 -0
  141. package/dist/chunks/chunk-LKINC6JO.js.map +1 -0
  142. package/dist/chunks/chunk-LROTNPC2.js +94 -0
  143. package/dist/chunks/chunk-LROTNPC2.js.map +1 -0
  144. package/dist/chunks/chunk-MTMT2RMF.js +63 -0
  145. package/dist/chunks/chunk-MTMT2RMF.js.map +1 -0
  146. package/dist/chunks/chunk-NDJZGJUR.js +65 -0
  147. package/dist/chunks/chunk-NDJZGJUR.js.map +1 -0
  148. package/dist/chunks/chunk-OE2LFIH2.js +1 -0
  149. package/dist/chunks/chunk-OE2LFIH2.js.map +1 -0
  150. package/dist/chunks/chunk-OJ2XGDWK.js +1 -0
  151. package/dist/chunks/chunk-OJ2XGDWK.js.map +1 -0
  152. package/dist/chunks/chunk-PUBGXXTM.js +50 -0
  153. package/dist/chunks/chunk-PUBGXXTM.js.map +1 -0
  154. package/dist/chunks/chunk-QRCUNRP5.js +75 -0
  155. package/dist/chunks/chunk-QRCUNRP5.js.map +1 -0
  156. package/dist/chunks/chunk-S6JJYCO7.js +51 -0
  157. package/dist/chunks/chunk-S6JJYCO7.js.map +1 -0
  158. package/dist/chunks/chunk-U3AALKEP.js +1 -0
  159. package/dist/chunks/chunk-U3AALKEP.js.map +1 -0
  160. package/dist/chunks/chunk-UCQFSRYF.js +34 -0
  161. package/dist/chunks/chunk-UCQFSRYF.js.map +1 -0
  162. package/dist/chunks/chunk-URGVQ64M.js +1 -0
  163. package/dist/chunks/chunk-URGVQ64M.js.map +1 -0
  164. package/dist/chunks/chunk-V4FXK4TP.js +128 -0
  165. package/dist/chunks/chunk-V4FXK4TP.js.map +1 -0
  166. package/dist/chunks/chunk-W4B23OIP.js +72 -0
  167. package/dist/chunks/chunk-W4B23OIP.js.map +1 -0
  168. package/dist/chunks/chunk-XDFXD3BI.js +10 -0
  169. package/dist/chunks/chunk-XDFXD3BI.js.map +1 -0
  170. package/dist/chunks/chunk-XDMSEAYC.js +294 -0
  171. package/dist/chunks/chunk-XDMSEAYC.js.map +1 -0
  172. package/dist/chunks/chunk-XPDS72XY.js +29 -0
  173. package/dist/chunks/chunk-XPDS72XY.js.map +1 -0
  174. package/dist/chunks/chunk-Y6UWSECL.js +3529 -0
  175. package/dist/chunks/chunk-Y6UWSECL.js.map +1 -0
  176. package/dist/chunks/chunk-ZEFOMZNY.js +78 -0
  177. package/dist/chunks/chunk-ZEFOMZNY.js.map +1 -0
  178. package/dist/index-Cvrd4KQA.d.ts +109 -0
  179. package/dist/index.d.ts +18 -469
  180. package/dist/index.js +2717 -8728
  181. package/dist/index.js.map +1 -1
  182. package/dist/item.css +10 -78
  183. package/dist/qti-components/index.d.ts +150 -0
  184. package/dist/qti-components/index.js +6525 -0
  185. package/dist/qti-components/index.js.map +1 -0
  186. package/dist/qti-components-jsx.d.ts +159 -184
  187. package/dist/qti-item/components/index.d.ts +3 -0
  188. package/dist/qti-item/components/index.js +3856 -0
  189. package/dist/qti-item/components/index.js.map +1 -0
  190. package/dist/qti-item/components/item-container.d.ts +40 -0
  191. package/dist/qti-item/components/item-container.js +3856 -0
  192. package/dist/qti-item/components/item-container.js.map +1 -0
  193. package/dist/qti-item/index.d.ts +4 -0
  194. package/dist/qti-item/index.js +3869 -0
  195. package/dist/qti-item/index.js.map +1 -0
  196. package/dist/qti-item/qti-item.d.ts +25 -0
  197. package/dist/qti-item/qti-item.js +26 -0
  198. package/dist/qti-item/qti-item.js.map +1 -0
  199. package/dist/{loader → qti-loader}/index.d.ts +1 -1
  200. package/dist/{loader → qti-loader}/index.js +5 -0
  201. package/dist/{loader → qti-loader}/index.js.map +1 -1
  202. package/dist/{qti-simple-choice-UTrFa_RQ.d.ts → qti-simple-choice-DxWcdKHi.d.ts} +71 -90
  203. package/dist/qti-test/components/index.d.ts +13 -0
  204. package/dist/qti-test/components/index.js +4144 -0
  205. package/dist/qti-test/components/index.js.map +1 -0
  206. package/dist/qti-test/components/styles.d.ts +8 -0
  207. package/dist/qti-test/components/styles.js +29 -0
  208. package/dist/qti-test/components/styles.js.map +1 -0
  209. package/dist/qti-test/components/test-component.abstract.d.ts +23 -0
  210. package/dist/qti-test/components/test-component.abstract.js +149 -0
  211. package/dist/qti-test/components/test-component.abstract.js.map +1 -0
  212. package/dist/qti-test/components/test-container.d.ts +37 -0
  213. package/dist/qti-test/components/test-container.js +3782 -0
  214. package/dist/qti-test/components/test-container.js.map +1 -0
  215. package/dist/qti-test/components/test-item-link.d.ts +21 -0
  216. package/dist/qti-test/components/test-item-link.js +202 -0
  217. package/dist/qti-test/components/test-item-link.js.map +1 -0
  218. package/dist/qti-test/components/test-next.d.ts +32 -0
  219. package/dist/qti-test/components/test-next.js +209 -0
  220. package/dist/qti-test/components/test-next.js.map +1 -0
  221. package/dist/qti-test/components/test-next.spec.d.ts +16 -0
  222. package/dist/qti-test/components/test-next.spec.js +56915 -0
  223. package/dist/qti-test/components/test-next.spec.js.map +1 -0
  224. package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +22 -0
  225. package/dist/qti-test/components/test-paging-buttons-stamp.js +218 -0
  226. package/dist/qti-test/components/test-paging-buttons-stamp.js.map +1 -0
  227. package/dist/qti-test/components/test-prev.d.ts +32 -0
  228. package/dist/qti-test/components/test-prev.js +209 -0
  229. package/dist/qti-test/components/test-prev.js.map +1 -0
  230. package/dist/qti-test/components/test-view.d.ts +27 -0
  231. package/dist/qti-test/components/test-view.js +209 -0
  232. package/dist/qti-test/components/test-view.js.map +1 -0
  233. package/dist/qti-test/context/index.d.ts +6 -0
  234. package/dist/qti-test/context/index.js +9 -0
  235. package/dist/qti-test/context/index.js.map +1 -0
  236. package/dist/qti-test/context/test.context.d.ts +6 -0
  237. package/dist/qti-test/context/test.context.js +9 -0
  238. package/dist/qti-test/context/test.context.js.map +1 -0
  239. package/dist/qti-test/index.d.ts +14 -0
  240. package/dist/qti-test/index.js +4746 -0
  241. package/dist/qti-test/index.js.map +1 -0
  242. package/dist/qti-test/mixins/index.d.ts +8 -0
  243. package/dist/qti-test/mixins/index.js +350 -0
  244. package/dist/qti-test/mixins/index.js.map +1 -0
  245. package/dist/qti-test/mixins/test-loader.mixin.d.ts +8 -0
  246. package/dist/qti-test/mixins/test-loader.mixin.js +240 -0
  247. package/dist/qti-test/mixins/test-loader.mixin.js.map +1 -0
  248. package/dist/qti-test/mixins/test-navigation.mixin.d.ts +22 -0
  249. package/dist/qti-test/mixins/test-navigation.mixin.js +64 -0
  250. package/dist/qti-test/mixins/test-navigation.mixin.js.map +1 -0
  251. package/dist/qti-test/mixins/test-view.mixin.d.ts +6 -0
  252. package/dist/qti-test/mixins/test-view.mixin.js +50 -0
  253. package/dist/qti-test/mixins/test-view.mixin.js.map +1 -0
  254. package/dist/qti-test/qti-assessment-test/index.d.ts +6 -0
  255. package/dist/qti-test/qti-assessment-test/index.js +221 -0
  256. package/dist/qti-test/qti-assessment-test/index.js.map +1 -0
  257. package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.d.ts +6 -0
  258. package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.js +85 -0
  259. package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.js.map +1 -0
  260. package/dist/qti-test/qti-assessment-test/qti-assessment-section.d.ts +6 -0
  261. package/dist/qti-test/qti-assessment-test/qti-assessment-section.js +73 -0
  262. package/dist/qti-test/qti-assessment-test/qti-assessment-section.js.map +1 -0
  263. package/dist/qti-test/qti-assessment-test/qti-assessment-test.d.ts +6 -0
  264. package/dist/qti-test/qti-assessment-test/qti-assessment-test.js +54 -0
  265. package/dist/qti-test/qti-assessment-test/qti-assessment-test.js.map +1 -0
  266. package/dist/qti-test/qti-assessment-test/qti-test-part.d.ts +19 -0
  267. package/dist/qti-test/qti-assessment-test/qti-test-part.js +62 -0
  268. package/dist/qti-test/qti-assessment-test/qti-test-part.js.map +1 -0
  269. package/dist/qti-test/qti-test.d.ts +68 -0
  270. package/dist/qti-test/qti-test.js +500 -0
  271. package/dist/qti-test/qti-test.js.map +1 -0
  272. package/dist/qti-test/test-base.d.ts +6 -0
  273. package/dist/qti-test/test-base.js +137 -0
  274. package/dist/qti-test/test-base.js.map +1 -0
  275. package/dist/{transformers → qti-transformers}/index.d.ts +1 -0
  276. package/dist/{transformers → qti-transformers}/index.js +5 -0
  277. package/dist/{transformers → qti-transformers}/index.js.map +1 -1
  278. package/dist/test-base-BJwG9Ie8.d.ts +109 -0
  279. package/dist/vscode.css-custom-data.json +1 -37
  280. package/dist/vscode.html-custom-data.json +70 -45
  281. package/package.json +29 -51
  282. package/dist/custom-element-eslint-rules.js +0 -337
  283. package/dist/custom-elements.json +0 -27271
@@ -0,0 +1,4746 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+
12
+ // src/lib/qti-test/qti-test.ts
13
+ import { html } from "lit";
14
+ import { customElement } from "lit/decorators.js";
15
+
16
+ // src/lib/qti-transformers/qti-transformers.ts
17
+ var xml = String.raw;
18
+ var xmlToHTML = xml`<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
19
+ <xsl:output method="html" version="5.0" encoding="UTF-8" indent="yes" />
20
+ <xsl:template match="@*|node()">
21
+ <xsl:copy>
22
+ <xsl:apply-templates select="@*|node()"/>
23
+ </xsl:copy>
24
+ </xsl:template>
25
+
26
+ <!-- remove existing namespaces -->
27
+ <xsl:template match="*">
28
+ <!-- remove element prefix -->
29
+ <xsl:element name="{local-name()}">
30
+ <!-- process attributes -->
31
+ <xsl:for-each select="@*">
32
+ <!-- remove attribute prefix -->
33
+ <xsl:attribute name="{local-name()}">
34
+ <xsl:value-of select="."/>
35
+ </xsl:attribute>
36
+ </xsl:for-each>
37
+ <xsl:apply-templates/>
38
+ </xsl:element>
39
+ </xsl:template>
40
+ </xsl:stylesheet>`;
41
+ function extendElementName(xmlFragment, tagName, extension) {
42
+ xmlFragment.querySelectorAll(tagName).forEach((element) => {
43
+ const newTagName = `${tagName}-${extension}`;
44
+ const newElement = createElementWithNewTagName(element, newTagName);
45
+ element.replaceWith(newElement);
46
+ });
47
+ }
48
+ function extendElementsWithClass(xmlFragment, classNamePattern) {
49
+ xmlFragment.querySelectorAll("*").forEach((element) => {
50
+ const classList = element.classList;
51
+ if (classList) {
52
+ classList.forEach((className) => {
53
+ if (className.startsWith(`${classNamePattern}:`)) {
54
+ const suffix = className.slice(`${classNamePattern}:`.length);
55
+ const newTagName = `${element.nodeName}-${suffix}`;
56
+ const newElement = createElementWithNewTagName(element, newTagName);
57
+ element.replaceWith(newElement);
58
+ }
59
+ });
60
+ }
61
+ });
62
+ }
63
+ function createElementWithNewTagName(element, newTagName) {
64
+ const newElement = document.createElement(newTagName);
65
+ for (const attr of element.attributes) {
66
+ newElement.setAttribute(attr.name, attr.value);
67
+ }
68
+ while (element.firstChild) {
69
+ newElement.appendChild(element.firstChild);
70
+ }
71
+ return newElement;
72
+ }
73
+ function itemsFromTest(xmlFragment) {
74
+ const items = [];
75
+ xmlFragment.querySelectorAll("qti-assessment-item-ref").forEach((el) => {
76
+ const identifier = el.getAttribute("identifier");
77
+ const href = el.getAttribute("href");
78
+ const category = el.getAttribute("category");
79
+ items.push({ identifier, href, category });
80
+ });
81
+ return items;
82
+ }
83
+ var currentRequest = null;
84
+ function loadXML(url, cancelPreviousRequest = false) {
85
+ if (cancelPreviousRequest && currentRequest !== null) {
86
+ currentRequest.abort();
87
+ }
88
+ return new Promise((resolve, reject) => {
89
+ const xhr = new XMLHttpRequest();
90
+ currentRequest = xhr;
91
+ xhr.open("GET", url, true);
92
+ xhr.responseType = "document";
93
+ xhr.onload = () => {
94
+ if (xhr.status >= 200 && xhr.status < 300) {
95
+ resolve(xhr.responseXML);
96
+ } else {
97
+ reject(xhr.statusText);
98
+ }
99
+ };
100
+ xhr.onerror = () => {
101
+ reject(xhr.statusText);
102
+ };
103
+ xhr.send();
104
+ });
105
+ }
106
+ function parseXML(xmlDocument) {
107
+ const parser = new DOMParser();
108
+ const xmlFragment = parser.parseFromString(xmlDocument, "text/xml");
109
+ return xmlFragment;
110
+ }
111
+ function toHTML(xmlFragment) {
112
+ const processor = new XSLTProcessor();
113
+ const xsltDocument = new DOMParser().parseFromString(xmlToHTML, "text/xml");
114
+ processor.importStylesheet(xsltDocument);
115
+ const itemHTMLFragment = processor.transformToFragment(xmlFragment, document);
116
+ return itemHTMLFragment;
117
+ }
118
+ function setLocation(xmlFragment, location) {
119
+ if (!location.endsWith("/")) {
120
+ location += "/";
121
+ }
122
+ xmlFragment.querySelectorAll("[src],[href],[primary-path]").forEach((elWithSrc) => {
123
+ let attr = "";
124
+ if (elWithSrc.getAttribute("src")) {
125
+ attr = "src";
126
+ }
127
+ if (elWithSrc.getAttribute("href")) {
128
+ attr = "href";
129
+ }
130
+ if (elWithSrc.getAttribute("primary-path")) {
131
+ attr = "primary-path";
132
+ }
133
+ const attrValue = elWithSrc.getAttribute(attr)?.trim();
134
+ if (!attrValue.startsWith("data:") && !attrValue.startsWith("http")) {
135
+ const newSrcValue = location + encodeURI(attrValue);
136
+ elWithSrc.setAttribute(attr, newSrcValue);
137
+ }
138
+ });
139
+ }
140
+ function convertCDATAtoComment(xmlFragment) {
141
+ const cdataElements = xmlFragment.querySelectorAll('qti-custom-operator[class="js.org"] > qti-base-value');
142
+ cdataElements.forEach((element) => {
143
+ const commentText = document.createComment(element.textContent);
144
+ element.replaceChild(commentText, element.firstChild);
145
+ });
146
+ }
147
+ function stripStyleSheets(xmlFragment) {
148
+ xmlFragment.querySelectorAll("qti-stylesheet").forEach((stylesheet) => stylesheet.remove());
149
+ }
150
+
151
+ // src/lib/qti-transformers/qti-transform-item.ts
152
+ var qtiTransformItem = () => {
153
+ let xmlFragment;
154
+ const api = {
155
+ async load(uri, cancelPreviousRequest = false) {
156
+ return new Promise((resolve) => {
157
+ loadXML(uri, cancelPreviousRequest).then((xml2) => {
158
+ xmlFragment = xml2;
159
+ api.path(uri.substring(0, uri.lastIndexOf("/")));
160
+ return resolve(api);
161
+ });
162
+ });
163
+ },
164
+ parse(xmlString) {
165
+ xmlFragment = parseXML(xmlString);
166
+ return api;
167
+ },
168
+ path: (location) => {
169
+ setLocation(xmlFragment, location);
170
+ return api;
171
+ },
172
+ fn(fn) {
173
+ fn(xmlFragment);
174
+ return api;
175
+ },
176
+ pciHooks(uri) {
177
+ const attributes = ["hook", "module"];
178
+ const documentPath = uri.substring(0, uri.lastIndexOf("/"));
179
+ for (const attribute of attributes) {
180
+ const srcAttributes = xmlFragment.querySelectorAll("[" + attribute + "]");
181
+ srcAttributes.forEach((node) => {
182
+ const srcValue = node.getAttribute(attribute);
183
+ if (!srcValue.startsWith("data:") && !srcValue.startsWith("http")) {
184
+ node.setAttribute("base-url", uri);
185
+ node.setAttribute(
186
+ "module",
187
+ documentPath + "/" + encodeURI(srcValue + (srcValue.endsWith(".js") ? "" : ".js"))
188
+ );
189
+ }
190
+ });
191
+ }
192
+ return api;
193
+ },
194
+ extendElementName: (tagName, extension) => {
195
+ extendElementName(xmlFragment, tagName, extension);
196
+ return api;
197
+ },
198
+ extendElementsWithClass: (param = "extend") => {
199
+ extendElementsWithClass(xmlFragment, param);
200
+ return api;
201
+ },
202
+ customInteraction(baseRef, baseItem) {
203
+ const qtiCustomInteraction = xmlFragment.querySelector("qti-custom-interaction");
204
+ const qtiCustomInteractionObject = qtiCustomInteraction.querySelector("object");
205
+ qtiCustomInteraction.setAttribute("data-base-ref", baseRef);
206
+ qtiCustomInteraction.setAttribute("data-base-item", baseRef + baseItem);
207
+ qtiCustomInteraction.setAttribute("data", qtiCustomInteractionObject.getAttribute("data"));
208
+ qtiCustomInteraction.setAttribute("width", qtiCustomInteractionObject.getAttribute("width"));
209
+ qtiCustomInteraction.setAttribute("height", qtiCustomInteractionObject.getAttribute("height"));
210
+ qtiCustomInteraction.removeChild(qtiCustomInteractionObject);
211
+ return api;
212
+ },
213
+ convertCDATAtoComment() {
214
+ convertCDATAtoComment(xmlFragment);
215
+ return api;
216
+ },
217
+ stripStyleSheets() {
218
+ stripStyleSheets(xmlFragment);
219
+ return api;
220
+ },
221
+ html() {
222
+ return new XMLSerializer().serializeToString(toHTML(xmlFragment));
223
+ },
224
+ xml() {
225
+ return new XMLSerializer().serializeToString(xmlFragment);
226
+ },
227
+ htmlDoc() {
228
+ return toHTML(xmlFragment);
229
+ },
230
+ xmlDoc() {
231
+ return xmlFragment;
232
+ }
233
+ };
234
+ return api;
235
+ };
236
+
237
+ // src/lib/qti-transformers/qti-transform-test.ts
238
+ var qtiTransformTest = () => {
239
+ let xmlFragment;
240
+ const api = {
241
+ async load(uri) {
242
+ return new Promise((resolve, _) => {
243
+ loadXML(uri).then((xml2) => {
244
+ xmlFragment = xml2;
245
+ api.path(uri.substring(0, uri.lastIndexOf("/")));
246
+ return resolve(api);
247
+ });
248
+ });
249
+ },
250
+ parse(xmlString) {
251
+ xmlFragment = parseXML(xmlString);
252
+ return api;
253
+ },
254
+ path: (location) => {
255
+ setLocation(xmlFragment, location);
256
+ return api;
257
+ },
258
+ fn(fn) {
259
+ fn(xmlFragment);
260
+ return api;
261
+ },
262
+ items() {
263
+ return itemsFromTest(xmlFragment);
264
+ },
265
+ html() {
266
+ return new XMLSerializer().serializeToString(toHTML(xmlFragment));
267
+ },
268
+ xml() {
269
+ return new XMLSerializer().serializeToString(xmlFragment);
270
+ },
271
+ htmlDoc() {
272
+ return toHTML(xmlFragment);
273
+ },
274
+ xmlDoc() {
275
+ return xmlFragment;
276
+ }
277
+ };
278
+ return api;
279
+ };
280
+
281
+ // src/lib/qti-test/mixins/test-loader.mixin.ts
282
+ var TestLoaderMixin = (superClass) => {
283
+ class TestLoaderClass extends superClass {
284
+ // private testURL = '';
285
+ constructor(...args) {
286
+ super(...args);
287
+ this.addEventListener("qti-assessment-test-connected", () => {
288
+ });
289
+ this.addEventListener("qti-load-item-request", ({ detail }) => {
290
+ detail.promise = (async () => {
291
+ const api = await qtiTransformItem().load(
292
+ `${detail.href}`,
293
+ detail.cancelPreviousRequest
294
+ );
295
+ return api.htmlDoc();
296
+ })();
297
+ });
298
+ this.addEventListener("qti-interaction-changed", (_e) => {
299
+ });
300
+ this.addEventListener("qti-outcome-changed", () => {
301
+ });
302
+ }
303
+ }
304
+ return TestLoaderClass;
305
+ };
306
+
307
+ // src/lib/qti-test/mixins/test-navigation.mixin.ts
308
+ var TestNavigationMixin = (superClass) => {
309
+ class TestNavigationClass extends superClass {
310
+ constructor(...args) {
311
+ super(...args);
312
+ this.addEventListener("qti-request-test-item", ({ detail: navItemId }) => {
313
+ if (!navItemId) return;
314
+ this._clearLoadedItems();
315
+ const itemRefEl = this.testElement.el.querySelector(
316
+ `qti-assessment-item-ref[identifier="${navItemId}"]`
317
+ );
318
+ const promise = this._loadItemRequest(itemRefEl.href, false);
319
+ const navPartId = itemRefEl.closest("qti-test-part").identifier;
320
+ const navSectionId = itemRefEl.closest("qti-assessment-section").identifier;
321
+ this._testContext = { ...this._testContext, navPartId, navSectionId, navItemId, navItemLoading: true };
322
+ if (promise) {
323
+ promise.then((doc) => {
324
+ itemRefEl.xmlDoc = doc;
325
+ requestAnimationFrame(
326
+ () => this.dispatchEvent(new CustomEvent("qti-item-connected", { bubbles: true, composed: true }))
327
+ );
328
+ this._testContext = { ...this._testContext, navItemLoading: false };
329
+ }).catch((error) => console.error("Failed to load item:", error));
330
+ } else {
331
+ console.info("Load item request was not handled:", itemRefEl.href);
332
+ }
333
+ });
334
+ this.addEventListener("qti-assessment-test-connected", () => {
335
+ let navItemId = this._testContext.navItemId;
336
+ if (!navItemId) {
337
+ const itemRefEl = this.testElement.el.querySelector("qti-assessment-item-ref");
338
+ navItemId = itemRefEl.identifier;
339
+ }
340
+ this.dispatchEvent(
341
+ new CustomEvent("qti-request-test-item", { detail: navItemId, bubbles: true, composed: true })
342
+ );
343
+ });
344
+ }
345
+ _clearLoadedItems() {
346
+ const itemRefEls = this.testElement.el.querySelectorAll(`qti-assessment-test qti-assessment-item-ref`);
347
+ Array.from(itemRefEls).forEach((itemElement) => {
348
+ itemElement.xmlDoc = null;
349
+ });
350
+ }
351
+ _loadItemRequest(href, cancelPreviousRequest = true) {
352
+ const event = new CustomEvent("qti-load-item-request", {
353
+ bubbles: true,
354
+ composed: true,
355
+ detail: {
356
+ href,
357
+ promise: null,
358
+ cancelPreviousRequest
359
+ }
360
+ });
361
+ this.dispatchEvent(event);
362
+ return event.detail.promise;
363
+ }
364
+ }
365
+ return TestNavigationClass;
366
+ };
367
+
368
+ // src/lib/qti-test/mixins/test-view.mixin.ts
369
+ var TestViewMixin = (superClass) => {
370
+ class TestViewClass extends superClass {
371
+ constructor(...args) {
372
+ super(...args);
373
+ this._testContext = { ...this._testContext, view: "candidate" };
374
+ this.addEventListener("on-test-switch-view", (e) => {
375
+ this._testContext = { ...this._testContext, view: e.detail };
376
+ this._updateElementView();
377
+ });
378
+ this.addEventListener("qti-assessment-test-connected", () => {
379
+ this._updateElementView();
380
+ });
381
+ this.addEventListener("qti-assessment-item-connected", (e) => {
382
+ this._updateElementView();
383
+ this._setCorrectResponseVisibility(e.detail);
384
+ });
385
+ }
386
+ willUpdate(changedProperties) {
387
+ super.willUpdate(changedProperties);
388
+ if (changedProperties.has("_testContext")) {
389
+ this._updateElementView();
390
+ }
391
+ }
392
+ // Method to handle view updates for elements based on the current context view
393
+ _updateElementView() {
394
+ if (this.testElement && this.testElement.el) {
395
+ const viewElements = Array.from(this.testElement.el.querySelectorAll("[view]"));
396
+ viewElements.forEach((element) => {
397
+ element.classList.toggle("show", element.getAttribute("view") === this._testContext.view);
398
+ });
399
+ const assessmentItem = this.testElement.el.querySelector(
400
+ `qti-assessment-item[identifier="${this._testContext.navItemId}"]`
401
+ );
402
+ if (assessmentItem) {
403
+ assessmentItem.showCorrectResponse(this._testContext.view === "scorer");
404
+ }
405
+ }
406
+ }
407
+ // Event handler for connected QTI assessment items
408
+ _setCorrectResponseVisibility(assessmentItem) {
409
+ assessmentItem.showCorrectResponse(this._testContext.view === "scorer");
410
+ }
411
+ }
412
+ return TestViewClass;
413
+ };
414
+
415
+ // src/lib/qti-test/test-base.ts
416
+ import { provide } from "@lit/context";
417
+ import { LitElement } from "lit";
418
+ import { state } from "lit/decorators.js";
419
+
420
+ // src/lib/qti-test/context/test.context.ts
421
+ import { createContext } from "@lit/context";
422
+ var testContext = createContext(Symbol("test"));
423
+ var testElement = createContext(Symbol("testElement"));
424
+
425
+ // src/lib/qti-test/test-base.ts
426
+ var TestBase = class extends LitElement {
427
+ constructor() {
428
+ super();
429
+ this._testContext = { items: [], testOutcomeVariables: [] };
430
+ this.testElement = { el: null };
431
+ /**
432
+ * Updates the variables of an assessment item in the test context.
433
+ * - Matches the assessment item with the corresponding test context item.
434
+ * - If the item is not found, logs a warning.
435
+ * - Updates variables in the test context if exactly one variable exists.
436
+ * - Otherwise, syncs the assessment item's variables with the test context.
437
+ *
438
+ * @param assessmentItem - The assessment item to update.
439
+ */
440
+ this._updateItemInTestContext = (assessmentItem) => {
441
+ const { identifier, variables } = assessmentItem;
442
+ const itemContext = this._testContext.items.find((i) => i?.identifier === identifier);
443
+ if (!itemContext) {
444
+ console.warn(`Item IDs between assessment.xml and item.xml should match: ${identifier} is not found!`);
445
+ return;
446
+ }
447
+ if (itemContext.variables?.length === 1) {
448
+ this._updateItemVariablesInTestContext(identifier, variables);
449
+ } else {
450
+ assessmentItem.variables = [...itemContext.variables || []];
451
+ }
452
+ };
453
+ this.addEventListener("qti-assessment-test-connected", (e) => {
454
+ const qtiAssessmentTest = e.detail;
455
+ const items = Array.from(qtiAssessmentTest.querySelectorAll("qti-assessment-item-ref")).map(
456
+ (itemRef) => ({
457
+ href: itemRef.href,
458
+ identifier: itemRef.identifier,
459
+ category: itemRef.category,
460
+ variables: [{ identifier: "completionStatus", value: "not_attempted", type: "outcome" }]
461
+ })
462
+ );
463
+ this.testElement = { el: qtiAssessmentTest };
464
+ this._testContext = { ...this._testContext, items };
465
+ });
466
+ this.addEventListener("qti-assessment-item-connected", (e) => {
467
+ this._updateItemInTestContext(e.detail);
468
+ });
469
+ this.addEventListener("qti-outcome-changed", (e) => {
470
+ const assessmentitem = e.composedPath()[0];
471
+ this._updateItemVariablesInTestContext(assessmentitem.identifier, assessmentitem.variables);
472
+ });
473
+ }
474
+ get context() {
475
+ return this._testContext;
476
+ }
477
+ // /* restores the context by updating existing items and adding new items from the "contextToRestore" parameter into the "this._context.items" array. */
478
+ set context(testContext2) {
479
+ if (testContext2 === null || testContext2 === void 0) return;
480
+ this._testContext = { ...testContext2 };
481
+ testContext2.items?.forEach((itemContext) => {
482
+ const existingItemContext = this._testContext.items.find((i) => i.identifier === itemContext.identifier);
483
+ if (existingItemContext) {
484
+ existingItemContext.variables = itemContext.variables;
485
+ } else {
486
+ this._testContext.items.push(itemContext);
487
+ }
488
+ });
489
+ }
490
+ _updateItemVariablesInTestContext(identifier, variables) {
491
+ this._testContext = {
492
+ ...this._testContext,
493
+ // Spread existing test context properties
494
+ items: this._testContext.items.map((itemContext) => {
495
+ if (itemContext.identifier !== identifier) {
496
+ return itemContext;
497
+ }
498
+ return {
499
+ ...itemContext,
500
+ // Keep other properties of the item context
501
+ variables: variables.map((variable) => {
502
+ const matchingVariable = itemContext.variables.find((v) => v.identifier === variable.identifier);
503
+ return matchingVariable ? { ...matchingVariable, ...variable } : variable;
504
+ })
505
+ };
506
+ })
507
+ };
508
+ }
509
+ // private _addItemToTestContext(
510
+ // e: CustomEvent<{ href: string; identifier: string; category: string }> & { target: QtiAssessmentItemRef }
511
+ // ): void {
512
+ // const { href, identifier, category } = e.detail;
513
+ // // Update test context items, adding a new item if the identifier is not already in the list
514
+ // if (!this._testContext.items.some(item => item.identifier === identifier)) {
515
+ // this._testContext.items.push({
516
+ // href,
517
+ // identifier,
518
+ // category,
519
+ // variables: [{ identifier: 'completionStatus', value: 'not_attempted', type: 'outcome' }]
520
+ // // category: e.target.category
521
+ // });
522
+ // }
523
+ // }
524
+ connectedCallback() {
525
+ super.connectedCallback();
526
+ this.setAttribute("qti-test", "");
527
+ }
528
+ };
529
+ __decorateClass([
530
+ state(),
531
+ provide({ context: testContext })
532
+ ], TestBase.prototype, "_testContext", 2);
533
+ __decorateClass([
534
+ state(),
535
+ provide({ context: testElement })
536
+ ], TestBase.prototype, "testElement", 2);
537
+
538
+ // src/lib/qti-test/qti-test.ts
539
+ var QtiTest = class extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestBase))) {
540
+ /**
541
+ * Renders the component's template.
542
+ * Provides a default `<slot>` for content projection.
543
+ */
544
+ render() {
545
+ return html`<slot></slot>`;
546
+ }
547
+ };
548
+ QtiTest = __decorateClass([
549
+ customElement("qti-test")
550
+ ], QtiTest);
551
+
552
+ // src/lib/qti-test/qti-assessment-test/qti-assessment-item-ref.ts
553
+ import { consume } from "@lit/context";
554
+ import { html as html2, LitElement as LitElement2 } from "lit";
555
+ import { property } from "lit/decorators.js";
556
+ var stringToBooleanConverter = {
557
+ fromAttribute(value) {
558
+ return value === "true";
559
+ },
560
+ toAttribute(value) {
561
+ return value ? "true" : "false";
562
+ }
563
+ };
564
+ var QtiAssessmentItemRef = class extends LitElement2 {
565
+ constructor() {
566
+ super(...arguments);
567
+ this.weigths = /* @__PURE__ */ new Map();
568
+ }
569
+ // the XMLDocument
570
+ createRenderRoot() {
571
+ return this;
572
+ }
573
+ get assessmentItem() {
574
+ return this.renderRoot?.querySelector("qti-assessment-item");
575
+ }
576
+ async connectedCallback() {
577
+ super.connectedCallback();
578
+ await this.updateComplete;
579
+ this.dispatchEvent(
580
+ new CustomEvent("qti-assessment-item-ref-connected", {
581
+ bubbles: true,
582
+ composed: true,
583
+ detail: { identifier: this.identifier, href: this.href, category: this.category }
584
+ })
585
+ );
586
+ }
587
+ render() {
588
+ return html2`${this.xmlDoc}`;
589
+ }
590
+ };
591
+ __decorateClass([
592
+ property({ type: String })
593
+ ], QtiAssessmentItemRef.prototype, "category", 2);
594
+ __decorateClass([
595
+ property({ type: String })
596
+ ], QtiAssessmentItemRef.prototype, "identifier", 2);
597
+ __decorateClass([
598
+ property({ type: Boolean, converter: stringToBooleanConverter })
599
+ ], QtiAssessmentItemRef.prototype, "required", 2);
600
+ __decorateClass([
601
+ property({ type: Boolean, converter: stringToBooleanConverter })
602
+ ], QtiAssessmentItemRef.prototype, "fixed", 2);
603
+ __decorateClass([
604
+ property({ type: String })
605
+ ], QtiAssessmentItemRef.prototype, "href", 2);
606
+ __decorateClass([
607
+ consume({ context: testContext, subscribe: true })
608
+ ], QtiAssessmentItemRef.prototype, "_testContext", 2);
609
+ __decorateClass([
610
+ property({ type: Object, attribute: false })
611
+ ], QtiAssessmentItemRef.prototype, "xmlDoc", 2);
612
+ if (!customElements.get("qti-assessment-item-ref")) {
613
+ customElements.define("qti-assessment-item-ref", QtiAssessmentItemRef);
614
+ }
615
+
616
+ // src/lib/qti-test/qti-assessment-test/qti-assessment-section.ts
617
+ import { consume as consume2 } from "@lit/context";
618
+ import { html as html3, LitElement as LitElement3 } from "lit";
619
+ import { property as property2 } from "lit/decorators.js";
620
+ var stringToBooleanConverter2 = {
621
+ fromAttribute(value) {
622
+ return value === "true";
623
+ },
624
+ toAttribute(value) {
625
+ return value ? "true" : "false";
626
+ }
627
+ };
628
+ var QtiAssessmentSection = class extends LitElement3 {
629
+ async connectedCallback() {
630
+ super.connectedCallback();
631
+ await this.updateComplete;
632
+ this.dispatchEvent(
633
+ new Event("qti-assessment-section-connected", {
634
+ bubbles: true,
635
+ composed: true
636
+ })
637
+ );
638
+ }
639
+ render() {
640
+ return html3`<slot name="qti-rubric-block"></slot><slot></slot>`;
641
+ }
642
+ };
643
+ __decorateClass([
644
+ property2({ type: String })
645
+ ], QtiAssessmentSection.prototype, "identifier", 2);
646
+ __decorateClass([
647
+ property2({ type: String })
648
+ ], QtiAssessmentSection.prototype, "required", 2);
649
+ __decorateClass([
650
+ property2({ type: Boolean, converter: stringToBooleanConverter2 })
651
+ ], QtiAssessmentSection.prototype, "fixed", 2);
652
+ __decorateClass([
653
+ property2({ type: String })
654
+ ], QtiAssessmentSection.prototype, "title", 2);
655
+ __decorateClass([
656
+ property2({ type: Boolean, converter: stringToBooleanConverter2 })
657
+ ], QtiAssessmentSection.prototype, "visible", 2);
658
+ __decorateClass([
659
+ property2({ type: Boolean, converter: stringToBooleanConverter2, attribute: "keep-together" })
660
+ ], QtiAssessmentSection.prototype, "keepTogether", 2);
661
+ __decorateClass([
662
+ consume2({ context: testContext, subscribe: true })
663
+ ], QtiAssessmentSection.prototype, "_testContext", 2);
664
+ if (!customElements.get("qti-assessment-section")) {
665
+ customElements.define("qti-assessment-section", QtiAssessmentSection);
666
+ }
667
+
668
+ // src/lib/qti-test/qti-assessment-test/qti-assessment-test.ts
669
+ import { consume as consume3 } from "@lit/context";
670
+ import { html as html4, LitElement as LitElement4 } from "lit";
671
+ import { customElement as customElement2, property as property3 } from "lit/decorators.js";
672
+ var QtiAssessmentTest = class extends LitElement4 {
673
+ async connectedCallback() {
674
+ super.connectedCallback();
675
+ await this.updateComplete;
676
+ this.dispatchEvent(
677
+ new CustomEvent("qti-assessment-test-connected", {
678
+ detail: this,
679
+ bubbles: true,
680
+ composed: true
681
+ })
682
+ );
683
+ }
684
+ render() {
685
+ return html4` <slot></slot>`;
686
+ }
687
+ };
688
+ __decorateClass([
689
+ property3({ type: String })
690
+ ], QtiAssessmentTest.prototype, "identifier", 2);
691
+ __decorateClass([
692
+ property3({ type: String })
693
+ ], QtiAssessmentTest.prototype, "title", 2);
694
+ __decorateClass([
695
+ consume3({ context: testContext, subscribe: true })
696
+ ], QtiAssessmentTest.prototype, "_testContext", 2);
697
+ QtiAssessmentTest = __decorateClass([
698
+ customElement2("qti-assessment-test")
699
+ ], QtiAssessmentTest);
700
+
701
+ // src/lib/qti-test/qti-assessment-test/qti-test-part.ts
702
+ import { html as html5, LitElement as LitElement5 } from "lit";
703
+ import { customElement as customElement3, property as property4 } from "lit/decorators.js";
704
+ var QtiTestPart = class extends LitElement5 {
705
+ constructor() {
706
+ super(...arguments);
707
+ this.identifier = "";
708
+ this.title = "";
709
+ this.class = "";
710
+ this.NavigationMode = "nonlinear";
711
+ this.submissionMode = "individual";
712
+ }
713
+ async connectedCallback() {
714
+ super.connectedCallback();
715
+ await this.updateComplete;
716
+ this.dispatchEvent(
717
+ new Event("qti-test-part-connected", {
718
+ bubbles: true,
719
+ composed: true
720
+ })
721
+ );
722
+ }
723
+ render() {
724
+ return html5` <slot></slot>`;
725
+ }
726
+ };
727
+ __decorateClass([
728
+ property4({ type: String })
729
+ ], QtiTestPart.prototype, "identifier", 2);
730
+ __decorateClass([
731
+ property4({ type: String })
732
+ ], QtiTestPart.prototype, "title", 2);
733
+ __decorateClass([
734
+ property4({ type: String })
735
+ ], QtiTestPart.prototype, "class", 2);
736
+ __decorateClass([
737
+ property4({ type: String, attribute: "navigation-mode" })
738
+ ], QtiTestPart.prototype, "NavigationMode", 2);
739
+ __decorateClass([
740
+ property4({ type: String, attribute: "submission-mode" })
741
+ ], QtiTestPart.prototype, "submissionMode", 2);
742
+ QtiTestPart = __decorateClass([
743
+ customElement3("qti-test-part")
744
+ ], QtiTestPart);
745
+ if (!customElements.get("qti-test-part")) {
746
+ customElements.define("qti-test-part", QtiTestPart);
747
+ }
748
+
749
+ // src/lib/qti-test/components/test-component.abstract.ts
750
+ import { consume as consume4 } from "@lit/context";
751
+ import { LitElement as LitElement6 } from "lit";
752
+ import { state as state2 } from "lit/decorators.js";
753
+
754
+ // src/lib/decorators/watch.ts
755
+ function watch(propertyName, options) {
756
+ const resolvedOptions = {
757
+ waitUntilFirstUpdate: false,
758
+ ...options
759
+ };
760
+ return (proto, decoratedFnName) => {
761
+ const { update } = proto;
762
+ const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];
763
+ proto.update = function(changedProps) {
764
+ watchedProperties.forEach((property10) => {
765
+ const key = property10;
766
+ if (changedProps.has(key)) {
767
+ const oldValue = changedProps.get(key);
768
+ const newValue = this[key];
769
+ if (oldValue !== newValue) {
770
+ if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) {
771
+ this[decoratedFnName](oldValue, newValue);
772
+ }
773
+ }
774
+ }
775
+ });
776
+ update.call(this, changedProps);
777
+ };
778
+ };
779
+ }
780
+
781
+ // src/lib/decorators/prop-internal-state.ts
782
+ import { property as property5 } from "lit/decorators.js";
783
+ function propInternalState(options) {
784
+ return (protoOrDescriptor, name) => {
785
+ property5(options)(protoOrDescriptor, name);
786
+ const key = `__${name}`;
787
+ Object.defineProperty(protoOrDescriptor, name, {
788
+ get() {
789
+ return this[key];
790
+ },
791
+ set(value) {
792
+ const oldValue = this[key];
793
+ this[key] = value;
794
+ if (oldValue !== value) {
795
+ if (this._internals?.states) {
796
+ const stateName = name.toLowerCase();
797
+ if (value) {
798
+ this._internals.states.add(`--${stateName}`);
799
+ } else {
800
+ this._internals.states.delete(`--${stateName}`);
801
+ }
802
+ }
803
+ if (options.aria && this._internals) {
804
+ const ariaAttribute = options.aria;
805
+ if (value) {
806
+ this._internals[ariaAttribute] = "true";
807
+ } else {
808
+ this._internals[ariaAttribute] = null;
809
+ }
810
+ }
811
+ this.requestUpdate(name, oldValue);
812
+ }
813
+ },
814
+ configurable: true,
815
+ enumerable: true
816
+ });
817
+ };
818
+ }
819
+
820
+ // src/lib/qti-test/components/test-component.abstract.ts
821
+ var TestComponent = class extends LitElement6 {
822
+ constructor() {
823
+ super();
824
+ this.disabled = true;
825
+ this._internals = this.attachInternals();
826
+ }
827
+ _handleTestElementChange(_oldValue, newValue) {
828
+ if (newValue.el) {
829
+ this.disabled = false;
830
+ }
831
+ }
832
+ willUpdate(changedProperties) {
833
+ if (changedProperties.has("_testContext")) {
834
+ const { items = [], navItemId } = this._testContext ?? {};
835
+ this.itemIndex = items.findIndex((item) => item.identifier === navItemId);
836
+ this.items = items;
837
+ this.view = this._testContext?.view;
838
+ }
839
+ }
840
+ _switchView(view) {
841
+ this.dispatchEvent(
842
+ new CustomEvent("on-test-switch-view", {
843
+ composed: true,
844
+ bubbles: true,
845
+ detail: view
846
+ })
847
+ );
848
+ }
849
+ _requestItem(identifier) {
850
+ this.dispatchEvent(
851
+ new CustomEvent("qti-request-test-item", {
852
+ composed: true,
853
+ bubbles: true,
854
+ detail: identifier
855
+ })
856
+ );
857
+ }
858
+ };
859
+ __decorateClass([
860
+ propInternalState({
861
+ type: Boolean,
862
+ reflect: true,
863
+ aria: "ariaDisabled"
864
+ // Maps to `aria-disabled` attribute
865
+ })
866
+ ], TestComponent.prototype, "disabled", 2);
867
+ __decorateClass([
868
+ state2(),
869
+ consume4({ context: testContext, subscribe: true })
870
+ ], TestComponent.prototype, "_testContext", 2);
871
+ __decorateClass([
872
+ state2(),
873
+ consume4({ context: testElement, subscribe: true })
874
+ ], TestComponent.prototype, "_testElement", 2);
875
+ __decorateClass([
876
+ watch("_testElement")
877
+ ], TestComponent.prototype, "_handleTestElementChange", 1);
878
+
879
+ // src/lib/qti-test/components/test-next.ts
880
+ import { css as css2, html as html6 } from "lit";
881
+ import { customElement as customElement4 } from "lit/decorators.js";
882
+
883
+ // src/lib/qti-test/components/styles.ts
884
+ import { css } from "lit";
885
+ var form = css`
886
+ display: inline-flex;
887
+ align-items: center;
888
+ cursor: pointer;
889
+ padding: 0.5rem 1rem;
890
+ border-radius: 0.25rem;
891
+ user-select: none;
892
+ `;
893
+ var btn = css`
894
+ background-color: lightgray;
895
+ ${form};
896
+ `;
897
+ var dis = css`
898
+ cursor: not-allowed;
899
+ opacity: 0.5;
900
+ `;
901
+ var ind = css`
902
+ ${form};
903
+ border: 1px solid gray;
904
+ `;
905
+
906
+ // src/lib/qti-test/components/test-next.ts
907
+ var TestNext = class extends TestComponent {
908
+ constructor() {
909
+ super();
910
+ this._internals.role = "button";
911
+ this._internals.ariaLabel = "Next item";
912
+ this.addEventListener("click", (e) => {
913
+ e.preventDefault();
914
+ if (!this.disabled) this._requestItem(this.items[this.itemIndex + 1].identifier);
915
+ });
916
+ }
917
+ willUpdate(changedProperties) {
918
+ super.willUpdate(changedProperties);
919
+ if (changedProperties.has("_testContext")) {
920
+ this.disabled = !this._testElement?.el || this.itemIndex < 0 || this.itemIndex >= this.items.length - 1;
921
+ }
922
+ }
923
+ render() {
924
+ return html6`<slot></slot>`;
925
+ }
926
+ };
927
+ TestNext.styles = css2`
928
+ :host {
929
+ ${btn};
930
+ }
931
+ :host([disabled]) {
932
+ ${dis};
933
+ }
934
+ `;
935
+ TestNext = __decorateClass([
936
+ customElement4("test-next")
937
+ ], TestNext);
938
+
939
+ // src/lib/qti-test/components/test-prev.ts
940
+ import { css as css3, html as html7 } from "lit";
941
+ import { customElement as customElement5 } from "lit/decorators.js";
942
+ var TestPrev = class extends TestComponent {
943
+ constructor() {
944
+ super();
945
+ this._internals.role = "button";
946
+ this._internals.ariaLabel = "Next item";
947
+ this.addEventListener("click", (e) => {
948
+ e.preventDefault();
949
+ if (!this.disabled) this._requestItem(this.items[this.itemIndex - 1].identifier);
950
+ });
951
+ }
952
+ willUpdate(changedProperties) {
953
+ super.willUpdate(changedProperties);
954
+ if (changedProperties.has("_testContext")) {
955
+ this.disabled = !this._testElement?.el || this.itemIndex === 0 || this.itemIndex === -1;
956
+ }
957
+ }
958
+ render() {
959
+ return html7`<slot></slot>`;
960
+ }
961
+ };
962
+ TestPrev.styles = css3`
963
+ :host {
964
+ ${btn};
965
+ }
966
+ :host([disabled]) {
967
+ ${dis};
968
+ }
969
+ `;
970
+ TestPrev = __decorateClass([
971
+ customElement5("test-prev")
972
+ ], TestPrev);
973
+
974
+ // src/lib/qti-test/components/test-view.ts
975
+ import { html as html8 } from "lit";
976
+ import { customElement as customElement6, property as property6, state as state3 } from "lit/decorators.js";
977
+ var TestView = class extends TestComponent {
978
+ constructor() {
979
+ super(...arguments);
980
+ this.label = "view";
981
+ this._handleViewOptionsChange = () => {
982
+ this.updateViewOptions();
983
+ };
984
+ this._viewOptions = TestView.DEFAULT_VIEW_OPTIONS;
985
+ }
986
+ connectedCallback() {
987
+ super.connectedCallback();
988
+ this.updateViewOptions();
989
+ }
990
+ updateViewOptions() {
991
+ if (this.viewOptions) {
992
+ const options = this.viewOptions.split(",").map((opt) => opt.trim());
993
+ this._viewOptions = options.filter((opt) => TestView.DEFAULT_VIEW_OPTIONS.includes(opt));
994
+ } else {
995
+ this._viewOptions = TestView.DEFAULT_VIEW_OPTIONS;
996
+ }
997
+ }
998
+ render() {
999
+ return html8`
1000
+ <label part="label" for="viewSelect">${this.label}</label>
1001
+ <select
1002
+ part="select"
1003
+ id="viewSelect"
1004
+ .disabled=${this.disabled}
1005
+ @change=${(e) => {
1006
+ const el = e.target;
1007
+ this._switchView(el.value);
1008
+ }}
1009
+ >
1010
+ ${this._viewOptions.map((v) => html8`<option value="${v}" ?selected=${v === this.view}>${v}</option>`)}
1011
+ </select>
1012
+ `;
1013
+ }
1014
+ };
1015
+ TestView.DEFAULT_VIEW_OPTIONS = ["author", "candidate", "proctor", "scorer", "testConstructor", "tutor"];
1016
+ __decorateClass([
1017
+ property6({ type: String })
1018
+ ], TestView.prototype, "label", 2);
1019
+ __decorateClass([
1020
+ property6({ type: String, attribute: "view-options" })
1021
+ ], TestView.prototype, "viewOptions", 2);
1022
+ __decorateClass([
1023
+ watch("viewOptions", { waitUntilFirstUpdate: true })
1024
+ ], TestView.prototype, "_handleViewOptionsChange", 2);
1025
+ __decorateClass([
1026
+ state3()
1027
+ ], TestView.prototype, "_viewOptions", 2);
1028
+ TestView = __decorateClass([
1029
+ customElement6("test-view")
1030
+ ], TestView);
1031
+
1032
+ // src/lib/qti-test/components/test-item-link.ts
1033
+ import { css as css4, html as html9 } from "lit";
1034
+ import { customElement as customElement7, property as property7 } from "lit/decorators.js";
1035
+ var TestItemLink = class extends TestComponent {
1036
+ constructor() {
1037
+ super();
1038
+ this.itemId = null;
1039
+ this.addEventListener("click", () => this._requestItem(this.itemId));
1040
+ }
1041
+ render() {
1042
+ return html9` <slot></slot> `;
1043
+ }
1044
+ };
1045
+ TestItemLink.styles = css4`
1046
+ :host {
1047
+ ${btn};
1048
+ }
1049
+ :host([disabled]) {
1050
+ ${dis};
1051
+ }
1052
+ `;
1053
+ __decorateClass([
1054
+ property7({ type: String, attribute: "item-id" })
1055
+ ], TestItemLink.prototype, "itemId", 2);
1056
+ TestItemLink = __decorateClass([
1057
+ customElement7("test-item-link")
1058
+ ], TestItemLink);
1059
+
1060
+ // src/lib/qti-test/components/test-container.ts
1061
+ import { LitElement as LitElement7, html as html10 } from "lit";
1062
+ import { customElement as customElement8, property as property8, state as state4 } from "lit/decorators.js";
1063
+ import { until } from "lit/directives/until.js";
1064
+
1065
+ // inline:../../../item.css?inline
1066
+ var item_default = `@layer qti-base, qti-components, qti-utilities, qti-variants, qti-extended;
1067
+
1068
+ :root,
1069
+ :host {
1070
+ /* Active colors */
1071
+ --qti-bg-active: #ffecec;
1072
+ --qti-border-active: #f86d70;
1073
+
1074
+ /* Gap size */
1075
+ --qti-gap-size: 1rem;
1076
+
1077
+ /* Background colors */
1078
+ --qti-bg: white;
1079
+ --qti-hover-bg: #f9fafb;
1080
+
1081
+ /* Light theme colors */
1082
+ --qti-light-bg-active: #f0f0f0; /* Light gray */
1083
+ --qti-light-border-active: #d0d0d0; /* Medium gray */
1084
+
1085
+ /* Dark theme colors */
1086
+ --qti-dark-bg-active: #1f2937; /* Dark gray */
1087
+ --qti-dark-border-active: #64748b; /* Medium gray */
1088
+
1089
+ /* Disabled colors */
1090
+ --qti-disabled-bg: #f3f4f6;
1091
+ --qti-disabled-color: #45484f;
1092
+
1093
+ /* Border properties */
1094
+ --qti-border-thickness: 2px;
1095
+ --qti-border-style: solid;
1096
+ --qti-border-color: #c6cad0;
1097
+ --qti-border-radius: 0.3rem;
1098
+ --qti-drop-border-radius: calc(var(--qti-border-radius) + var(--qti-border-thickness));
1099
+
1100
+ /* Focus & active states */
1101
+ --qti-focus-border-width: 5px;
1102
+ --qti-focus-color: #bddcff7e;
1103
+
1104
+ /* Class-specific variables */
1105
+
1106
+ /* Form elements */
1107
+ --qti-form-size: 1rem;
1108
+
1109
+ /* Point elements */
1110
+ --qti-point-size: 2rem;
1111
+
1112
+ /* Order buttons */
1113
+ --qti-order-size: 2rem;
1114
+
1115
+ /* Generic padding for all elements */
1116
+ --qti-padding-vertical: 0.5rem; /* py-2 */
1117
+ --qti-padding-horizontal: 0.5rem; /* px-2 */
1118
+ }
1119
+
1120
+ /* SVG masks and backgrounds */
1121
+
1122
+ .chevron {
1123
+ background: url("data:image/svg+xml,%3Csvg fill='currentColor' width='22' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Cpath clip-rule='evenodd' fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'%3E%3C/path%3E%3C/svg%3E")
1124
+ no-repeat center right 6px;
1125
+ }
1126
+
1127
+ .handle {
1128
+ background-image: radial-gradient(
1129
+ circle at center,
1130
+ rgb(0 0 0 / 10%) 0,
1131
+ rgb(0 0 0 / 20%) 2px,
1132
+ rgb(255 255 255 / 0%) 2px,
1133
+ rgb(255 255 255 / 0%) 100%
1134
+ );
1135
+ background-repeat: repeat-y;
1136
+ background-position: left center;
1137
+ background-size: 14px 8px;
1138
+ }
1139
+
1140
+ .check-mask {
1141
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
1142
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
1143
+ }
1144
+
1145
+ /*
1146
+ Following are classes that can be applied to elements and element states, so they are not used directly
1147
+ The @apply directive is used to apply these classes to elements
1148
+ */
1149
+
1150
+ /* Apply .bordered to an element */
1151
+
1152
+ .bordered {
1153
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1154
+ outline: none;
1155
+ }
1156
+
1157
+ /* Apply .form rules for checkbox and radiobutton */
1158
+
1159
+ .form {
1160
+
1161
+ display: grid;
1162
+ place-content: center;
1163
+ width: var(--qti-form-size);
1164
+ height: var(--qti-form-size);
1165
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1166
+ outline: none;
1167
+ }
1168
+
1169
+ /* Apply .button rules for button-like elements, such as drags and buttons */
1170
+
1171
+ .button {
1172
+
1173
+ border-radius: var(--qti-border-radius);
1174
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
1175
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1176
+ outline: none;
1177
+ }
1178
+
1179
+ /* Apply .select for the select dropdown element */
1180
+
1181
+ .select {
1182
+
1183
+ border-radius: var(--qti-border-radius);
1184
+ position: relative;
1185
+ -webkit-appearance: none;
1186
+ -moz-appearance: none;
1187
+ appearance: none;
1188
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
1189
+ padding-right: calc(var(--qti-padding-horizontal) + 1.5rem); /* 1.5rem for the chevron */ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color); outline: none; background: url("data:image/svg+xml,%3Csvg fill='currentColor' width='22' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Cpath clip-rule='evenodd' fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'%3E%3C/path%3E%3C/svg%3E")
1190
+ no-repeat center right 6px;
1191
+ }
1192
+
1193
+ /* Apply .text for the input text and textarea */
1194
+
1195
+ .text {
1196
+
1197
+ border-radius: 0;
1198
+ cursor: text;
1199
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
1200
+ background: unset;
1201
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1202
+ outline: none;
1203
+ }
1204
+
1205
+ /* Apply .spot for hotspot shapes */
1206
+
1207
+ .spot {
1208
+
1209
+ width: 100%;
1210
+ height: 100%;
1211
+ background-color: transparent;
1212
+ padding: 0;
1213
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1214
+ outline: none;
1215
+ }
1216
+
1217
+ /* Apply .point for circular small hotspots */
1218
+
1219
+ .point {
1220
+
1221
+ border-radius: 100%;
1222
+ width: var(--qti-point-size);
1223
+ height: var(--qti-point-size);
1224
+ background-color: transparent;
1225
+ padding: 0;
1226
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1227
+ outline: none;
1228
+ }
1229
+
1230
+ /* Apply .drag for draggable elements */
1231
+
1232
+ .drag {
1233
+
1234
+ transition:
1235
+ transform 200ms ease-out,
1236
+ box-shadow 200ms ease-out,
1237
+ rotate 200ms ease-out;
1238
+ cursor: grab;
1239
+ background-color: var(--qti-bg);
1240
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
1241
+ border-radius: var(--qti-border-radius);
1242
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem) !important; /* 1.5rem for the drag */ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color); outline: none; background-image: radial-gradient(
1243
+ circle at center,
1244
+ rgb(0 0 0 / 10%) 0,
1245
+ rgb(0 0 0 / 20%) 2px,
1246
+ rgb(255 255 255 / 0%) 2px,
1247
+ rgb(255 255 255 / 0%) 100%
1248
+ ); background-repeat: repeat-y; background-position: left center; background-size: 14px 8px;
1249
+ }
1250
+
1251
+ /* Apply .dragging for the dragging state of a draggable element */
1252
+
1253
+ .dragging {
1254
+ pointer-events: none;
1255
+ rotate: -2deg;
1256
+ box-shadow:
1257
+ 0 8px 12px rgb(0 0 0 / 20%),
1258
+ 0 4px 8px rgb(0 0 0 / 10%);
1259
+ }
1260
+
1261
+ /* Apply .drop for an element where you can drop the draggable */
1262
+
1263
+ .drop {
1264
+
1265
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
1266
+ center no-repeat;
1267
+ border-radius: var(--qti-border-radius);
1268
+ position: relative;
1269
+ background-color: var(--qti-bg);
1270
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1271
+ outline: none;
1272
+ }
1273
+
1274
+ /* Apply .dropping for an indicator where you can drop the draggable */
1275
+
1276
+ .dropping {
1277
+ background-color: var(--qti-bg-active);
1278
+ }
1279
+
1280
+ /* Apply .order for a small circular button */
1281
+
1282
+ .order {
1283
+
1284
+ display: grid;
1285
+ place-content: center;
1286
+
1287
+ /* background-color: var(--qti-bg-active); */
1288
+ border-radius: 100%;
1289
+ width: var(--qti-order-size);
1290
+ height: var(--qti-order-size);
1291
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1292
+ outline: none;
1293
+ }
1294
+
1295
+ /* Apply .check-size for radio and checkbox size */
1296
+
1297
+ .check-size {
1298
+ width: calc(var(--qti-form-size) - 6px);
1299
+ height: calc(var(--qti-form-size) - 6px);
1300
+ }
1301
+
1302
+ /* Apply .check for checkbox */
1303
+
1304
+ .check {
1305
+ gap: 0.5rem;
1306
+ border-radius: var(--qti-border-radius);
1307
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
1308
+ outline: none;
1309
+ cursor: pointer;
1310
+ }
1311
+
1312
+ /* Apply .check-radio for outer circle of the radio buttons */
1313
+
1314
+ .check-radio {
1315
+
1316
+ border-radius: 100%;
1317
+
1318
+ display: grid;
1319
+
1320
+ place-content: center;
1321
+
1322
+ width: var(--qti-form-size);
1323
+
1324
+ height: var(--qti-form-size);
1325
+
1326
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1327
+
1328
+ outline: none;
1329
+ }
1330
+
1331
+ /* Apply .check-radio-checked for the inner checked radio */
1332
+
1333
+ .check-radio-checked {
1334
+ background-color: var(--qti-border-active);
1335
+ border-radius: 100%;
1336
+ }
1337
+
1338
+ /* Apply .check-checkbox for outer square of the checkbox */
1339
+
1340
+ .check-checkbox {
1341
+
1342
+ display: flex;
1343
+ place-items: center;
1344
+ border-radius: var(--qti-border-radius);
1345
+ display: grid;
1346
+ place-content: center;
1347
+ width: var(--qti-form-size);
1348
+ height: var(--qti-form-size);
1349
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1350
+ outline: none;
1351
+ }
1352
+
1353
+ /* Apply .check-checkbox-checked for the inner checkmark */
1354
+
1355
+ .check-checkbox-checked {
1356
+ background-color: var(--qti-border-active);
1357
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
1358
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
1359
+ }
1360
+
1361
+ /* Apply .hov for hover state */
1362
+
1363
+ .hov {
1364
+ background-color: var(--qti-hover-bg);
1365
+ }
1366
+
1367
+ /* Apply .foc for focus state */
1368
+
1369
+ .foc {
1370
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
1371
+ }
1372
+
1373
+ /* Apply .act for active state */
1374
+
1375
+ .act {
1376
+ border-color: var(--qti-border-active);
1377
+ background-color: var(--qti-bg-active);
1378
+ }
1379
+
1380
+ .act-bg {
1381
+ background-color: var(--qti-bg-active);
1382
+ }
1383
+
1384
+ .act-bor {
1385
+ border-color: var(--qti-border-active);
1386
+ }
1387
+
1388
+ /* Apply .rdo for readonly state */
1389
+
1390
+ .rdo {
1391
+ cursor: pointer;
1392
+ background-color: var(--qti-bg);
1393
+ outline: 0;
1394
+ border: none;
1395
+ }
1396
+
1397
+ /* Apply .dis for disabled state */
1398
+
1399
+ .dis {
1400
+ cursor: not-allowed;
1401
+ background-color: var(--qti-disabled-bg);
1402
+ color: var(--qti-disabled-color);
1403
+ border-color: var(--qti-border-color);
1404
+ outline: 4px solid var(--qti-disabled-bg);
1405
+ }
1406
+
1407
+ /* base */
1408
+
1409
+ /* ============================
1410
+ QTI 3 shared css
1411
+ 1. Display
1412
+ 2. Special Flex styles
1413
+ 3. Margin
1414
+ 4. Padding
1415
+ 5. Horizontal Alignment styles
1416
+ 6. Vertical Alignment styles
1417
+ 7. Height
1418
+ 8. Width
1419
+ 9. Text-Indent
1420
+ 10. List Style
1421
+ 11. Layout
1422
+ 12. Other QTI 3 presentation utilities
1423
+ ============================ */
1424
+
1425
+ /* ==========
1426
+ Display css
1427
+ =========== */
1428
+
1429
+ .qti-display-inline {
1430
+ display: inline;
1431
+ }
1432
+
1433
+ .qti-display-inline-block {
1434
+ display: inline-block;
1435
+ }
1436
+
1437
+ .qti-display-block {
1438
+ display: block;
1439
+ }
1440
+
1441
+ .qti-display-flex {
1442
+ display: flexbox;
1443
+ display: flex;
1444
+ }
1445
+
1446
+ .qti-display-inline-flex {
1447
+ display: inline-flex;
1448
+ }
1449
+
1450
+ .qti-display-grid {
1451
+ display: grid;
1452
+ }
1453
+
1454
+ .qti-display-inline-grid {
1455
+ display: inline-grid;
1456
+ }
1457
+
1458
+ .qti-display-table {
1459
+ display: table;
1460
+ }
1461
+
1462
+ .qti-display-table-cell {
1463
+ display: table-cell;
1464
+ }
1465
+
1466
+ .qti-display-table-row {
1467
+ display: table-row;
1468
+ }
1469
+
1470
+ .qti-display-list-item {
1471
+ display: list-item;
1472
+ }
1473
+
1474
+ .qti-display-inherit {
1475
+ display: inherit;
1476
+ }
1477
+
1478
+ /*
1479
+ * hidden to screen readers and sighted
1480
+ */
1481
+
1482
+ .qti-hidden {
1483
+ display: none;
1484
+ }
1485
+
1486
+ /*
1487
+ * visible to screen readers, hidden to sighted
1488
+ */
1489
+
1490
+ .qti-visually-hidden {
1491
+ position: fixed !important;
1492
+ overflow: hidden;
1493
+ clip: rect(1px 1px 1px 1px);
1494
+ height: 1px;
1495
+ width: 1px;
1496
+ border: 0;
1497
+ margin: -1px;
1498
+ }
1499
+
1500
+ /* =============================
1501
+ Special flex styles
1502
+ ============================= */
1503
+
1504
+ .qti-flex-direction-column {
1505
+ flex-direction: column;
1506
+ }
1507
+
1508
+ .qti-flex-direction-row {
1509
+ flex-direction: row;
1510
+ }
1511
+
1512
+ .qti-flex-grow-1 {
1513
+ flex-grow: 1;
1514
+ }
1515
+
1516
+ .qti-flex-grow-0 {
1517
+ flex-grow: 0;
1518
+ }
1519
+
1520
+ /* =========
1521
+ Margin css
1522
+ ========== */
1523
+
1524
+ /**
1525
+ * For margin Top and Bottom and Left and Right
1526
+ */
1527
+
1528
+ .qti-margin-0 {
1529
+ margin: 0 !important;
1530
+ }
1531
+
1532
+ .qti-margin-1 {
1533
+ margin: 0.25rem !important;
1534
+ }
1535
+
1536
+ .qti-margin-2 {
1537
+ margin: 0.5rem !important;
1538
+ }
1539
+
1540
+ .qti-margin-3 {
1541
+ margin: 1rem !important;
1542
+ }
1543
+
1544
+ .qti-margin-4 {
1545
+ margin: 1.5rem !important;
1546
+ }
1547
+
1548
+ .qti-margin-5 {
1549
+ margin: 3rem !important;
1550
+ }
1551
+
1552
+ .qti-margin-auto {
1553
+ margin: auto !important;
1554
+ }
1555
+
1556
+ /*
1557
+ For margin Left and Right
1558
+ */
1559
+
1560
+ .qti-margin-x-0 {
1561
+ margin-right: 0 !important;
1562
+ margin-left: 0 !important;
1563
+ }
1564
+
1565
+ .qti-margin-x-1 {
1566
+ margin-right: 0.25rem !important;
1567
+ margin-left: 0.25rem !important;
1568
+ }
1569
+
1570
+ .qti-margin-x-2 {
1571
+ margin-right: 0.5rem !important;
1572
+ margin-left: 0.5rem !important;
1573
+ }
1574
+
1575
+ .qti-margin-x-3 {
1576
+ margin-right: 1rem !important;
1577
+ margin-left: 1rem !important;
1578
+ }
1579
+
1580
+ .qti-margin-x-4 {
1581
+ margin-right: 1.5rem !important;
1582
+ margin-left: 1.5rem !important;
1583
+ }
1584
+
1585
+ .qti-margin-x-5 {
1586
+ margin-right: 3rem !important;
1587
+ margin-left: 3rem !important;
1588
+ }
1589
+
1590
+ .qti-margin-x-auto {
1591
+ margin-right: auto !important;
1592
+ margin-left: auto !important;
1593
+ }
1594
+
1595
+ /*
1596
+ For margin Top and Bottom
1597
+ */
1598
+
1599
+ .qti-margin-y-0 {
1600
+ margin-top: 0 !important;
1601
+ margin-bottom: 0 !important;
1602
+ }
1603
+
1604
+ .qti-margin-y-1 {
1605
+ margin-top: 0.25rem !important;
1606
+ margin-bottom: 0.25rem !important;
1607
+ }
1608
+
1609
+ .qti-margin-y-2 {
1610
+ margin-top: 0.5rem !important;
1611
+ margin-bottom: 0.5rem !important;
1612
+ }
1613
+
1614
+ .qti-margin-y-3 {
1615
+ margin-top: 1rem !important;
1616
+ margin-bottom: 1rem !important;
1617
+ }
1618
+
1619
+ .qti-margin-y-4 {
1620
+ margin-top: 1.5rem !important;
1621
+ margin-bottom: 1.5rem !important;
1622
+ }
1623
+
1624
+ .qti-margin-y-5 {
1625
+ margin-top: 3rem !important;
1626
+ margin-bottom: 3rem !important;
1627
+ }
1628
+
1629
+ .qti-margin-y-auto {
1630
+ margin-top: auto !important;
1631
+ margin-bottom: auto !important;
1632
+ }
1633
+
1634
+ /*
1635
+ For margin Top
1636
+ */
1637
+
1638
+ .qti-margin-t-0 {
1639
+ margin-top: 0 !important;
1640
+ }
1641
+
1642
+ .qti-margin-t-1 {
1643
+ margin-top: 0.25rem !important;
1644
+ }
1645
+
1646
+ .qti-margin-t-2 {
1647
+ margin-top: 0.5rem !important;
1648
+ }
1649
+
1650
+ .qti-margin-t-3 {
1651
+ margin-top: 1rem !important;
1652
+ }
1653
+
1654
+ .qti-margin-t-4 {
1655
+ margin-top: 1.5rem !important;
1656
+ }
1657
+
1658
+ .qti-margin-t-5 {
1659
+ margin-top: 3rem !important;
1660
+ }
1661
+
1662
+ .qti-margin-t-auto {
1663
+ margin-top: auto !important;
1664
+ }
1665
+
1666
+ /*
1667
+ For margin Bottom
1668
+ */
1669
+
1670
+ .qti-margin-b-0 {
1671
+ margin-bottom: 0 !important;
1672
+ }
1673
+
1674
+ .qti-margin-b-1 {
1675
+ margin-bottom: 0.25rem !important;
1676
+ }
1677
+
1678
+ .qti-margin-b-2 {
1679
+ margin-bottom: 0.5rem !important;
1680
+ }
1681
+
1682
+ .qti-margin-b-3 {
1683
+ margin-bottom: 1rem !important;
1684
+ }
1685
+
1686
+ .qti-margin-b-4 {
1687
+ margin-bottom: 1.5rem !important;
1688
+ }
1689
+
1690
+ .qti-margin-b-5 {
1691
+ margin-bottom: 3rem !important;
1692
+ }
1693
+
1694
+ .qti-margin-b-auto {
1695
+ margin-bottom: auto !important;
1696
+ }
1697
+
1698
+ /*
1699
+ For margin Start LTR
1700
+ */
1701
+
1702
+ .qti-margin-s-0 {
1703
+ margin-left: 0 !important;
1704
+ }
1705
+
1706
+ .qti-margin-s-1 {
1707
+ margin-left: 0.25rem !important;
1708
+ }
1709
+
1710
+ .qti-margin-s-2 {
1711
+ margin-left: 0.5rem !important;
1712
+ }
1713
+
1714
+ .qti-margin-s-3 {
1715
+ margin-left: 1rem !important;
1716
+ }
1717
+
1718
+ .qti-margin-s-4 {
1719
+ margin-left: 1.5rem !important;
1720
+ }
1721
+
1722
+ .qti-margin-s-5 {
1723
+ margin-left: 3rem !important;
1724
+ }
1725
+
1726
+ .qti-margin-s-auto {
1727
+ margin-left: auto !important;
1728
+ }
1729
+
1730
+ /*
1731
+ For margin End LTR
1732
+ */
1733
+
1734
+ .qti-margin-e-0 {
1735
+ margin-right: 0 !important;
1736
+ }
1737
+
1738
+ .qti-margin-e-1 {
1739
+ margin-right: 0.25rem !important;
1740
+ }
1741
+
1742
+ .qti-margin-e-2 {
1743
+ margin-right: 0.5rem !important;
1744
+ }
1745
+
1746
+ .qti-margin-e-3 {
1747
+ margin-right: 1rem !important;
1748
+ }
1749
+
1750
+ .qti-margin-e-4 {
1751
+ margin-right: 1.5rem !important;
1752
+ }
1753
+
1754
+ .qti-margin-e-5 {
1755
+ margin-right: 3rem !important;
1756
+ }
1757
+
1758
+ .qti-margin-e-auto {
1759
+ margin-right: auto !important;
1760
+ }
1761
+
1762
+ /* =========
1763
+ Padding css
1764
+ ========== */
1765
+
1766
+ /*
1767
+ For padding Top and Bottom and Left and Right
1768
+ */
1769
+
1770
+ .qti-padding-0 {
1771
+ padding: 0 !important;
1772
+ }
1773
+
1774
+ .qti-padding-1 {
1775
+ padding: 0.25rem !important;
1776
+ }
1777
+
1778
+ .qti-padding-2 {
1779
+ padding: 0.5rem !important;
1780
+ }
1781
+
1782
+ .qti-padding-3 {
1783
+ padding: 1rem !important;
1784
+ }
1785
+
1786
+ .qti-padding-4 {
1787
+ padding: 1.5rem !important;
1788
+ }
1789
+
1790
+ .qti-padding-5 {
1791
+ padding: 3rem !important;
1792
+ }
1793
+
1794
+ /*
1795
+ For padding Left and Right
1796
+ */
1797
+
1798
+ .qti-padding-x-0 {
1799
+ padding-right: 0 !important;
1800
+ padding-left: 0 !important;
1801
+ }
1802
+
1803
+ .qti-padding-x-1 {
1804
+ padding-right: 0.25rem !important;
1805
+ padding-left: 0.25rem !important;
1806
+ }
1807
+
1808
+ .qti-padding-x-2 {
1809
+ padding-right: 0.5rem !important;
1810
+ padding-left: 0.5rem !important;
1811
+ }
1812
+
1813
+ .qti-padding-x-3 {
1814
+ padding-right: 1rem !important;
1815
+ padding-left: 1rem !important;
1816
+ }
1817
+
1818
+ .qti-padding-x-4 {
1819
+ padding-right: 1.5rem !important;
1820
+ padding-left: 1.5rem !important;
1821
+ }
1822
+
1823
+ .qti-padding-x-5 {
1824
+ padding-right: 3rem !important;
1825
+ padding-left: 3rem !important;
1826
+ }
1827
+
1828
+ /*
1829
+ For padding Top and Bottom
1830
+ */
1831
+
1832
+ .qti-padding-y-0 {
1833
+ padding-top: 0 !important;
1834
+ padding-bottom: 0 !important;
1835
+ }
1836
+
1837
+ .qti-padding-y-1 {
1838
+ padding-top: 0.25rem !important;
1839
+ padding-bottom: 0.25rem !important;
1840
+ }
1841
+
1842
+ .qti-padding-y-2 {
1843
+ padding-top: 0.5rem !important;
1844
+ padding-bottom: 0.5rem !important;
1845
+ }
1846
+
1847
+ .qti-padding-y-3 {
1848
+ padding-top: 1rem !important;
1849
+ padding-bottom: 1rem !important;
1850
+ }
1851
+
1852
+ .qti-padding-y-4 {
1853
+ padding-top: 1.5rem !important;
1854
+ padding-bottom: 1.5rem !important;
1855
+ }
1856
+
1857
+ .qti-padding-y-5 {
1858
+ padding-top: 3rem !important;
1859
+ padding-bottom: 3rem !important;
1860
+ }
1861
+
1862
+ /*
1863
+ For padding Top
1864
+ */
1865
+
1866
+ .qti-padding-t-0 {
1867
+ padding-top: 0 !important;
1868
+ }
1869
+
1870
+ .qti-padding-t-1 {
1871
+ padding-top: 0.25rem !important;
1872
+ }
1873
+
1874
+ .qti-padding-t-2 {
1875
+ padding-top: 0.5rem !important;
1876
+ }
1877
+
1878
+ .qti-padding-t-3 {
1879
+ padding-top: 1rem !important;
1880
+ }
1881
+
1882
+ .qti-padding-t-4 {
1883
+ padding-top: 1.5rem !important;
1884
+ }
1885
+
1886
+ .qti-padding-t-5 {
1887
+ padding-top: 3rem !important;
1888
+ }
1889
+
1890
+ /*
1891
+ For padding Bottom
1892
+ */
1893
+
1894
+ .qti-padding-b-0 {
1895
+ padding-bottom: 0 !important;
1896
+ }
1897
+
1898
+ .qti-padding-b-1 {
1899
+ padding-bottom: 0.25rem !important;
1900
+ }
1901
+
1902
+ .qti-padding-b-2 {
1903
+ padding-bottom: 0.5rem !important;
1904
+ }
1905
+
1906
+ .qti-padding-b-3 {
1907
+ padding-bottom: 1rem !important;
1908
+ }
1909
+
1910
+ .qti-padding-b-4 {
1911
+ padding-bottom: 1.5rem !important;
1912
+ }
1913
+
1914
+ .qti-padding-b-5 {
1915
+ padding-bottom: 3rem !important;
1916
+ }
1917
+
1918
+ /*
1919
+ For padding Start LTR
1920
+ */
1921
+
1922
+ .qti-padding-s-0 {
1923
+ padding-left: 0 !important;
1924
+ }
1925
+
1926
+ .qti-padding-s-1 {
1927
+ padding-left: 0.25rem !important;
1928
+ }
1929
+
1930
+ .qti-padding-s-2 {
1931
+ padding-left: 0.5rem !important;
1932
+ }
1933
+
1934
+ .qti-padding-s-3 {
1935
+ padding-left: 1rem !important;
1936
+ }
1937
+
1938
+ .qti-padding-s-4 {
1939
+ padding-left: 1.5rem !important;
1940
+ }
1941
+
1942
+ .qti-padding-s-5 {
1943
+ padding-left: 3rem !important;
1944
+ }
1945
+
1946
+ /*
1947
+ For padding End LTR
1948
+ */
1949
+
1950
+ .qti-padding-e-0 {
1951
+ padding-right: 0 !important;
1952
+ }
1953
+
1954
+ .qti-padding-e-1 {
1955
+ padding-right: 0.25rem !important;
1956
+ }
1957
+
1958
+ .qti-padding-e-2 {
1959
+ padding-right: 0.5rem !important;
1960
+ }
1961
+
1962
+ .qti-padding-e-3 {
1963
+ padding-right: 1rem !important;
1964
+ }
1965
+
1966
+ .qti-padding-e-4 {
1967
+ padding-right: 1.5rem !important;
1968
+ }
1969
+
1970
+ .qti-padding-e-5 {
1971
+ padding-right: 3rem !important;
1972
+ }
1973
+
1974
+ /* ====================
1975
+ Horizontal alignment
1976
+ ==================== */
1977
+
1978
+ .qti-align-left {
1979
+ text-align: left;
1980
+ }
1981
+
1982
+ .qti-align-center {
1983
+ text-align: center;
1984
+ }
1985
+
1986
+ .qti-align-right {
1987
+ text-align: right;
1988
+ }
1989
+
1990
+ /* ==================
1991
+ Vertical alignment
1992
+ ================== */
1993
+
1994
+ .qti-valign-top {
1995
+ vertical-align: top;
1996
+ }
1997
+
1998
+ .qti-valign-middle {
1999
+ vertical-align: middle;
2000
+ }
2001
+
2002
+ .qti-valign-baseline {
2003
+ vertical-align: baseline;
2004
+ }
2005
+
2006
+ .qti-valign-bottom {
2007
+ vertical-align: bottom;
2008
+ }
2009
+
2010
+ /* =============
2011
+ Height styles
2012
+ ============= */
2013
+
2014
+ .qti-height-0 {
2015
+ height: 0;
2016
+ }
2017
+
2018
+ .qti-height-px {
2019
+ height: 1px;
2020
+ }
2021
+
2022
+ .qti-height-0p5 {
2023
+ height: 0.125rem;
2024
+ }
2025
+
2026
+ .qti-height-1 {
2027
+ height: 0.25rem;
2028
+ }
2029
+
2030
+ .qti-height-1p5 {
2031
+ height: 0.375rem;
2032
+ }
2033
+
2034
+ .qti-height-2 {
2035
+ height: 0.5rem;
2036
+ }
2037
+
2038
+ .qti-height-2p5 {
2039
+ height: 0.625rem;
2040
+ }
2041
+
2042
+ .qti-height-3 {
2043
+ height: 0.75rem;
2044
+ }
2045
+
2046
+ .qti-height-3p5 {
2047
+ height: 0.875rem;
2048
+ }
2049
+
2050
+ .qti-height-4 {
2051
+ height: 1rem;
2052
+ }
2053
+
2054
+ .qti-height-5 {
2055
+ height: 1.25rem;
2056
+ }
2057
+
2058
+ .qti-height-6 {
2059
+ height: 1.5rem;
2060
+ }
2061
+
2062
+ .qti-height-7 {
2063
+ height: 1.75rem;
2064
+ }
2065
+
2066
+ .qti-height-8 {
2067
+ height: 2rem;
2068
+ }
2069
+
2070
+ .qti-height-9 {
2071
+ height: 2.25rem;
2072
+ }
2073
+
2074
+ .qti-height-10 {
2075
+ height: 2.5rem;
2076
+ }
2077
+
2078
+ .qti-height-11 {
2079
+ height: 2.75rem;
2080
+ }
2081
+
2082
+ .qti-height-12 {
2083
+ height: 3rem;
2084
+ }
2085
+
2086
+ .qti-height-14 {
2087
+ height: 3.5rem;
2088
+ }
2089
+
2090
+ .qti-height-16 {
2091
+ height: 4rem;
2092
+ }
2093
+
2094
+ .qti-height-20 {
2095
+ height: 5rem;
2096
+ }
2097
+
2098
+ .qti-height-24 {
2099
+ height: 6rem;
2100
+ }
2101
+
2102
+ .qti-height-28 {
2103
+ height: 7rem;
2104
+ }
2105
+
2106
+ .qti-height-32 {
2107
+ height: 8rem;
2108
+ }
2109
+
2110
+ .qti-height-36 {
2111
+ height: 9rem;
2112
+ }
2113
+
2114
+ .qti-height-40 {
2115
+ height: 10rem;
2116
+ }
2117
+
2118
+ .qti-height-44 {
2119
+ height: 11rem;
2120
+ }
2121
+
2122
+ .qti-height-48 {
2123
+ height: 12rem;
2124
+ }
2125
+
2126
+ .qti-height-52 {
2127
+ height: 13rem;
2128
+ }
2129
+
2130
+ .qti-height-56 {
2131
+ height: 14rem;
2132
+ }
2133
+
2134
+ .qti-height-60 {
2135
+ height: 15rem;
2136
+ }
2137
+
2138
+ .qti-height-64 {
2139
+ height: 16rem;
2140
+ }
2141
+
2142
+ .qti-height-72 {
2143
+ height: 18rem;
2144
+ }
2145
+
2146
+ .qti-height-80 {
2147
+ height: 20rem;
2148
+ }
2149
+
2150
+ .qti-height-96 {
2151
+ height: 24rem;
2152
+ }
2153
+
2154
+ .qti-height-1-2 {
2155
+ height: 50%;
2156
+ }
2157
+
2158
+ .qti-height-1-3 {
2159
+ height: 33.3333%;
2160
+ }
2161
+
2162
+ .qti-height-2-3 {
2163
+ height: 66.6667%;
2164
+ }
2165
+
2166
+ .qti-height-1-4 {
2167
+ height: 25%;
2168
+ }
2169
+
2170
+ .qti-height-2-4 {
2171
+ height: 50%;
2172
+ }
2173
+
2174
+ .qti-height-3-4 {
2175
+ height: 75%;
2176
+ }
2177
+
2178
+ .qti-height-1-5 {
2179
+ height: 20%;
2180
+ }
2181
+
2182
+ .qti-height-2-5 {
2183
+ height: 40%;
2184
+ }
2185
+
2186
+ .qti-height-3-5 {
2187
+ height: 60%;
2188
+ }
2189
+
2190
+ .qti-height-4-5 {
2191
+ height: 80%;
2192
+ }
2193
+
2194
+ .qti-height-1-6 {
2195
+ height: 16.6667%;
2196
+ }
2197
+
2198
+ .qti-height-2-6 {
2199
+ height: 33.3333%;
2200
+ }
2201
+
2202
+ .qti-height-3-6 {
2203
+ height: 50%;
2204
+ }
2205
+
2206
+ .qti-height-4-6 {
2207
+ height: 66.6667%;
2208
+ }
2209
+
2210
+ .qti-height-5-6 {
2211
+ height: 83.3333%;
2212
+ }
2213
+
2214
+ .qti-height-auto {
2215
+ height: auto;
2216
+ }
2217
+
2218
+ .qti-height-full {
2219
+ height: 100%;
2220
+ }
2221
+
2222
+ /* ============
2223
+ Width styles
2224
+ ============ */
2225
+
2226
+ .qti-width-0 {
2227
+ width: 0;
2228
+ }
2229
+
2230
+ .qti-width-px {
2231
+ width: 1px;
2232
+ }
2233
+
2234
+ .qti-width-0p5 {
2235
+ width: 0.125rem;
2236
+ }
2237
+
2238
+ .qti-width-1 {
2239
+ width: 0.25rem;
2240
+ }
2241
+
2242
+ .qti-width-1p5 {
2243
+ width: 0.375rem;
2244
+ }
2245
+
2246
+ .qti-width-2 {
2247
+ width: 0.5rem;
2248
+ }
2249
+
2250
+ .qti-width-2p5 {
2251
+ width: 0.625rem;
2252
+ }
2253
+
2254
+ .qti-width-3 {
2255
+ width: 0.75rem;
2256
+ }
2257
+
2258
+ .qti-width-3p5 {
2259
+ width: 0.875rem;
2260
+ }
2261
+
2262
+ .qti-width-4 {
2263
+ width: 1rem;
2264
+ }
2265
+
2266
+ .qti-width-5 {
2267
+ width: 1.25rem;
2268
+ }
2269
+
2270
+ .qti-width-6 {
2271
+ width: 1.5rem;
2272
+ }
2273
+
2274
+ .qti-width-7 {
2275
+ width: 1.75rem;
2276
+ }
2277
+
2278
+ .qti-width-8 {
2279
+ width: 2rem;
2280
+ }
2281
+
2282
+ .qti-width-9 {
2283
+ width: 2.25rem;
2284
+ }
2285
+
2286
+ .qti-width-10 {
2287
+ width: 2.5rem;
2288
+ }
2289
+
2290
+ .qti-width-11 {
2291
+ width: 2.75rem;
2292
+ }
2293
+
2294
+ .qti-width-12 {
2295
+ width: 3rem;
2296
+ }
2297
+
2298
+ .qti-width-14 {
2299
+ width: 3.5rem;
2300
+ }
2301
+
2302
+ .qti-width-16 {
2303
+ width: 4rem;
2304
+ }
2305
+
2306
+ .qti-width-20 {
2307
+ width: 5rem;
2308
+ }
2309
+
2310
+ .qti-width-24 {
2311
+ width: 6rem;
2312
+ }
2313
+
2314
+ .qti-width-28 {
2315
+ width: 7rem;
2316
+ }
2317
+
2318
+ .qti-width-32 {
2319
+ width: 8rem;
2320
+ }
2321
+
2322
+ .qti-width-36 {
2323
+ width: 9rem;
2324
+ }
2325
+
2326
+ .qti-width-40 {
2327
+ width: 10rem;
2328
+ }
2329
+
2330
+ .qti-width-44 {
2331
+ width: 11rem;
2332
+ }
2333
+
2334
+ .qti-width-48 {
2335
+ width: 12rem;
2336
+ }
2337
+
2338
+ .qti-width-52 {
2339
+ width: 13rem;
2340
+ }
2341
+
2342
+ .qti-width-56 {
2343
+ width: 14rem;
2344
+ }
2345
+
2346
+ .qti-width-60 {
2347
+ width: 15rem;
2348
+ }
2349
+
2350
+ .qti-width-64 {
2351
+ width: 16rem;
2352
+ }
2353
+
2354
+ .qti-width-72 {
2355
+ width: 18rem;
2356
+ }
2357
+
2358
+ .qti-width-80 {
2359
+ width: 20rem;
2360
+ }
2361
+
2362
+ .qti-width-96 {
2363
+ width: 24rem;
2364
+ }
2365
+
2366
+ .qti-width-auto {
2367
+ width: auto;
2368
+ }
2369
+
2370
+ .qti-width-1-2 {
2371
+ width: 50%;
2372
+ }
2373
+
2374
+ .qti-width-1-3 {
2375
+ width: 33.3333%;
2376
+ }
2377
+
2378
+ .qti-width-2-3 {
2379
+ width: 66.6667%;
2380
+ }
2381
+
2382
+ .qti-width-1-4 {
2383
+ width: 25%;
2384
+ }
2385
+
2386
+ .qti-width-2-4 {
2387
+ width: 50%;
2388
+ }
2389
+
2390
+ .qti-width-3-4 {
2391
+ width: 75%;
2392
+ }
2393
+
2394
+ .qti-width-1-5 {
2395
+ width: 20%;
2396
+ }
2397
+
2398
+ .qti-width-2-5 {
2399
+ width: 40%;
2400
+ }
2401
+
2402
+ .qti-width-3-5 {
2403
+ width: 60%;
2404
+ }
2405
+
2406
+ .qti-width-4-5 {
2407
+ width: 80%;
2408
+ }
2409
+
2410
+ .qti-width-1-6 {
2411
+ width: 16.6667%;
2412
+ }
2413
+
2414
+ .qti-width-2-6 {
2415
+ width: 33.3333%;
2416
+ }
2417
+
2418
+ .qti-width-3-6 {
2419
+ width: 50%;
2420
+ }
2421
+
2422
+ .qti-width-4-6 {
2423
+ width: 66.6667%;
2424
+ }
2425
+
2426
+ .qti-width-5-6 {
2427
+ width: 83.3333%;
2428
+ }
2429
+
2430
+ .qti-width-1-12 {
2431
+ width: 8.3333%;
2432
+ }
2433
+
2434
+ .qti-width-2-12 {
2435
+ width: 16.6667%;
2436
+ }
2437
+
2438
+ .qti-width-3-12 {
2439
+ width: 25%;
2440
+ }
2441
+
2442
+ .qti-width-4-12 {
2443
+ width: 33.3333%;
2444
+ }
2445
+
2446
+ .qti-width-5-12 {
2447
+ width: 41.6667%;
2448
+ }
2449
+
2450
+ .qti-width-6-12 {
2451
+ width: 50%;
2452
+ }
2453
+
2454
+ .qti-width-7-12 {
2455
+ width: 58.3333%;
2456
+ }
2457
+
2458
+ .qti-width-8-12 {
2459
+ width: 66.6667%;
2460
+ }
2461
+
2462
+ .qti-width-9-12 {
2463
+ width: 75%;
2464
+ }
2465
+
2466
+ .qti-width-10-12 {
2467
+ width: 83.3333%;
2468
+ }
2469
+
2470
+ .qti-width-11-12 {
2471
+ width: 91.6667%;
2472
+ }
2473
+
2474
+ .qti-width-full,
2475
+ .qti-fullwidth {
2476
+ width: 100%;
2477
+ }
2478
+
2479
+ /* ==================
2480
+ Text Indent styles
2481
+ ================== */
2482
+
2483
+ .qti-text-indent-0 {
2484
+ text-indent: 0;
2485
+ }
2486
+
2487
+ .qti-text-indent-px {
2488
+ text-indent: 1px;
2489
+ }
2490
+
2491
+ .qti-text-indent-0p5 {
2492
+ text-indent: 0.125rem;
2493
+ }
2494
+
2495
+ .qti-text-indent-1 {
2496
+ text-indent: 0.25rem;
2497
+ }
2498
+
2499
+ .qti-text-indent-1p5 {
2500
+ text-indent: 0.375rem;
2501
+ }
2502
+
2503
+ .qti-text-indent-2 {
2504
+ text-indent: 0.5rem;
2505
+ }
2506
+
2507
+ .qti-text-indent-2p5 {
2508
+ text-indent: 0.625rem;
2509
+ }
2510
+
2511
+ .qti-text-indent-3 {
2512
+ text-indent: 0.75rem;
2513
+ }
2514
+
2515
+ .qti-text-indent-3p5 {
2516
+ text-indent: 0.875rem;
2517
+ }
2518
+
2519
+ .qti-text-indent-4 {
2520
+ text-indent: 1rem;
2521
+ }
2522
+
2523
+ .qti-text-indent-5 {
2524
+ text-indent: 1.25rem;
2525
+ }
2526
+
2527
+ .qti-text-indent-6 {
2528
+ text-indent: 1.5rem;
2529
+ }
2530
+
2531
+ .qti-text-indent-7 {
2532
+ text-indent: 1.75rem;
2533
+ }
2534
+
2535
+ .qti-text-indent-8 {
2536
+ text-indent: 2rem;
2537
+ }
2538
+
2539
+ .qti-text-indent-12 {
2540
+ text-indent: 3rem;
2541
+ }
2542
+
2543
+ .qti-text-indent-16 {
2544
+ text-indent: 4rem;
2545
+ }
2546
+
2547
+ .qti-text-indent-20 {
2548
+ text-indent: 5rem;
2549
+ }
2550
+
2551
+ .qti-text-indent-24 {
2552
+ text-indent: 6rem;
2553
+ }
2554
+
2555
+ .qti-text-indent-28 {
2556
+ text-indent: 7rem;
2557
+ }
2558
+
2559
+ .qti-text-indent-32 {
2560
+ text-indent: 8rem;
2561
+ }
2562
+
2563
+ /* =================
2564
+ List Style styles
2565
+ ================= */
2566
+
2567
+ .qti-list-style-type-none {
2568
+ list-style-type: none;
2569
+ }
2570
+
2571
+ .qti-list-style-type-disc {
2572
+ list-style-type: disc;
2573
+ }
2574
+
2575
+ .qti-list-style-type-circle {
2576
+ list-style-type: circle;
2577
+ }
2578
+
2579
+ .qti-list-style-type-square {
2580
+ list-style-type: square;
2581
+ }
2582
+
2583
+ .qti-list-style-type-decimal {
2584
+ list-style-type: decimal;
2585
+ }
2586
+
2587
+ .qti-list-style-type-decimal-leading-zero {
2588
+ list-style-type: decimal-leading-zero;
2589
+ }
2590
+
2591
+ .qti-list-style-type-lower-alpha {
2592
+ list-style-type: lower-alpha;
2593
+ }
2594
+
2595
+ .qti-list-style-type-upper-alpha {
2596
+ list-style-type: upper-alpha;
2597
+ }
2598
+
2599
+ .qti-list-style-type-lower-roman {
2600
+ list-style-type: lower-roman;
2601
+ }
2602
+
2603
+ .qti-list-style-type-upper-roman {
2604
+ list-style-type: upper-roman;
2605
+ }
2606
+
2607
+ .qti-list-style-type-lower-latin {
2608
+ list-style-type: lower-latin;
2609
+ }
2610
+
2611
+ .qti-list-style-type-upper-latin {
2612
+ list-style-type: upper-latin;
2613
+ }
2614
+
2615
+ .qti-list-style-type-lower-greek {
2616
+ list-style-type: lower-greek;
2617
+ }
2618
+
2619
+ .qti-list-style-type-arabic-indic {
2620
+ list-style-type: arabic-indic;
2621
+ }
2622
+
2623
+ .qti-list-style-type-armenian {
2624
+ list-style-type: armenian;
2625
+ }
2626
+
2627
+ .qti-list-style-type-lower-armenian {
2628
+ list-style-type: lower-armenian;
2629
+ }
2630
+
2631
+ .qti-list-style-type-upper-armenian {
2632
+ list-style-type: upper-armenian;
2633
+ }
2634
+
2635
+ .qti-list-style-type-bengali {
2636
+ list-style-type: bengali;
2637
+ }
2638
+
2639
+ .qti-list-style-type-cambodian {
2640
+ list-style-type: cambodian;
2641
+ }
2642
+
2643
+ .qti-list-style-type-simp-chinese-formal {
2644
+ list-style-type: simp-chinese-formal;
2645
+ }
2646
+
2647
+ .qti-list-style-type-simp-chinese-informal {
2648
+ list-style-type: simp-chinese-informal;
2649
+ }
2650
+
2651
+ .qti-list-style-type-trad-chinese-formal {
2652
+ list-style-type: trad-chinese-formal;
2653
+ }
2654
+
2655
+ .qti-list-style-type-trad-chinese-informal {
2656
+ list-style-type: trad-chinese-informal;
2657
+ }
2658
+
2659
+ .qti-list-style-type-cjk-ideographic {
2660
+ list-style-type: cjk-ideographic;
2661
+ }
2662
+
2663
+ .qti-list-style-type-cjk-heavenly-stem {
2664
+ list-style-type: cjk-heavenly-stem;
2665
+ }
2666
+
2667
+ .qti-list-style-type-cjk-earthly-branch {
2668
+ list-style-type: cjk-earthly-branch;
2669
+ }
2670
+
2671
+ .qti-list-style-type-devanagari {
2672
+ list-style-type: devanagari;
2673
+ }
2674
+
2675
+ .qti-list-style-type-ethiopic-halehame-ti-er {
2676
+ list-style-type: ethiopic-halehame-ti-er;
2677
+ }
2678
+
2679
+ .qti-list-style-type-ethiopic-halehame-ti-et {
2680
+ list-style-type: ethiopic-halehame-ti-et;
2681
+ }
2682
+
2683
+ .qti-list-style-type-ethiopic-halehame-am {
2684
+ list-style-type: ethiopic-halehame-am;
2685
+ }
2686
+
2687
+ .qti-list-style-type-ethiopic-halehame {
2688
+ list-style-type: ethiopic-halehame;
2689
+ }
2690
+
2691
+ .qti-list-style-type-georgian {
2692
+ list-style-type: georgian;
2693
+ }
2694
+
2695
+ .qti-list-style-type-gujarati {
2696
+ list-style-type: gujarati;
2697
+ }
2698
+
2699
+ .qti-list-style-type-gurmukhi {
2700
+ list-style-type: gurmukhi;
2701
+ }
2702
+
2703
+ .qti-list-style-type-hangul {
2704
+ list-style-type: hangul;
2705
+ }
2706
+
2707
+ .qti-list-style-type-hangul-consonant {
2708
+ list-style-type: hangul-consonant;
2709
+ }
2710
+
2711
+ .qti-list-style-type-hebrew {
2712
+ list-style-type: hebrew;
2713
+ }
2714
+
2715
+ .qti-list-style-type-hiragana {
2716
+ list-style-type: hiragana;
2717
+ }
2718
+
2719
+ .qti-list-style-type-hiragana-iroha {
2720
+ list-style-type: hiragana-iroha;
2721
+ }
2722
+
2723
+ .qti-list-style-type-khmer {
2724
+ list-style-type: khmer;
2725
+ }
2726
+
2727
+ .qti-list-style-type-korean-hangul-formal {
2728
+ list-style-type: korean-hangul-formal;
2729
+ }
2730
+
2731
+ .qti-list-style-type-korean-hanja-formal {
2732
+ list-style-type: korean-hanja-formal;
2733
+ }
2734
+
2735
+ .qti-list-style-type-korean-hanja-informal {
2736
+ list-style-type: korean-hanja-informal;
2737
+ }
2738
+
2739
+ .qti-list-style-type-lao {
2740
+ list-style-type: lao;
2741
+ }
2742
+
2743
+ .qti-list-style-type-malayalam {
2744
+ list-style-type: malayalam;
2745
+ }
2746
+
2747
+ .qti-list-style-type-mongolian {
2748
+ list-style-type: mongolian;
2749
+ }
2750
+
2751
+ .qti-list-style-type-myanmar {
2752
+ list-style-type: myanmar;
2753
+ }
2754
+
2755
+ .qti-list-style-type-oriya {
2756
+ list-style-type: oriya;
2757
+ }
2758
+
2759
+ .qti-list-style-type-persian {
2760
+ list-style-type: persian;
2761
+ }
2762
+
2763
+ .qti-list-style-type-thai {
2764
+ list-style-type: thai;
2765
+ }
2766
+
2767
+ .qti-list-style-type-tibetan {
2768
+ list-style-type: tibetan;
2769
+ }
2770
+
2771
+ .qti-list-style-type-telugu {
2772
+ list-style-type: telugu;
2773
+ }
2774
+
2775
+ .qti-list-style-type-urdu {
2776
+ list-style-type: urdu;
2777
+ }
2778
+
2779
+ /* =========================
2780
+ Other QTI 3 Presentation Utilities
2781
+ ========================= */
2782
+
2783
+ .qti-bordered {
2784
+ border: 1px solid var(--table-border-color);
2785
+ }
2786
+
2787
+ .qti-underline {
2788
+ text-decoration: underline;
2789
+ text-decoration-color: var(--foreground);
2790
+ }
2791
+
2792
+ .qti-italic {
2793
+ font-style: italic;
2794
+ }
2795
+
2796
+ .qti-well {
2797
+ min-height: 20px;
2798
+ padding: 19px;
2799
+ margin-bottom: 20px;
2800
+ background-color: var(--well-bg);
2801
+ border: var(--well-border);
2802
+ border-radius: 4px;
2803
+ box-shadow: var(--well-box-shadow);
2804
+ }
2805
+
2806
+ /* Set writing-mode to vertical-rl
2807
+ Typical for CJK vertical text */
2808
+
2809
+ .qti-writing-mode-vertical-rl {
2810
+ writing-mode: vertical-rl;
2811
+ }
2812
+
2813
+ /* Set writing-mode to vertical-lr
2814
+ Typical for Mongolian vertical text */
2815
+
2816
+ .qti-writing-mode-vertical-lr {
2817
+ writing-mode: vertical-lr;
2818
+ }
2819
+
2820
+ /* Set writing-mode to horizontal-tb
2821
+ Browser default */
2822
+
2823
+ .qti-writing-mode-horizontal-tb {
2824
+ writing-mode: horizontal-tb;
2825
+ }
2826
+
2827
+ /* Float an element left */
2828
+
2829
+ .qti-float-left {
2830
+ float: left;
2831
+ }
2832
+
2833
+ /* Float an element right */
2834
+
2835
+ .qti-float-right {
2836
+ float: right;
2837
+ }
2838
+
2839
+ /* Remove a float */
2840
+
2841
+ .qti-float-none {
2842
+ float: none;
2843
+ }
2844
+
2845
+ /* Clearfix Hack to apply to a container of
2846
+ floated content that overflows the container. */
2847
+
2848
+ .qti-float-clearfix::after {
2849
+ content: '';
2850
+ clear: both;
2851
+ display: table;
2852
+ }
2853
+
2854
+ .qti-float-clear-left
2855
+ .qti-float-clear-right
2856
+ .qti-float-clear-both
2857
+
2858
+ /* Set text-orientation to upright */
2859
+ .qti-text-orientation-upright {
2860
+ text-orientation: upright;
2861
+ }
2862
+
2863
+ /* stylelint-disable number-max-precision */
2864
+
2865
+ @layer qti-base {
2866
+ .qti-layout-row {
2867
+ display: flex;
2868
+ flex-wrap: wrap;
2869
+ width: 100%;
2870
+ gap: 2.1276595745%;
2871
+ }
2872
+
2873
+ .qti-layout-row [class*='qti-layout-col']:not(:empty) {
2874
+ box-sizing: border-box;
2875
+ }
2876
+
2877
+ .qti-layout-row [class*='qti-layout-col']:empty {
2878
+ width: 0;
2879
+ overflow: hidden; /* to fully collapse if there\u2019s padding or borders */
2880
+ }
2881
+
2882
+ .qti-layout-col1 {
2883
+ width: 6.3829787234%;
2884
+ }
2885
+
2886
+ .qti-layout-col2 {
2887
+ width: 14.8936170213%;
2888
+ }
2889
+
2890
+ .qti-layout-col3 {
2891
+ width: 23.4042553191%;
2892
+ }
2893
+
2894
+ .qti-layout-col4 {
2895
+ width: 31.914893617%;
2896
+ }
2897
+
2898
+ .qti-layout-col5 {
2899
+ width: 40.4255319149%;
2900
+ }
2901
+
2902
+ .qti-layout-col6 {
2903
+ width: 48.9361702128%;
2904
+ }
2905
+
2906
+ .qti-layout-col7 {
2907
+ width: 57.4468085106%;
2908
+ }
2909
+
2910
+ .qti-layout-col8 {
2911
+ width: 65.9574468085%;
2912
+ }
2913
+
2914
+ .qti-layout-col9 {
2915
+ width: 74.4680851064%;
2916
+ }
2917
+
2918
+ .qti-layout-col10 {
2919
+ width: 82.9787234043%;
2920
+ }
2921
+
2922
+ .qti-layout-col11 {
2923
+ width: 91.4893617021%;
2924
+ }
2925
+
2926
+ .qti-layout-col12 {
2927
+ width: 100%;
2928
+ }
2929
+
2930
+ .qti-layout-offset1 {
2931
+ margin-left: 8.5106382979%;
2932
+ }
2933
+
2934
+ .qti-layout-offset2 {
2935
+ margin-left: 17.0212765957%;
2936
+ }
2937
+
2938
+ .qti-layout-offset3 {
2939
+ margin-left: 25.5319148936%;
2940
+ }
2941
+
2942
+ .qti-layout-offset4 {
2943
+ margin-left: 34.0425531915%;
2944
+ }
2945
+
2946
+ .qti-layout-offset5 {
2947
+ margin-left: 42.5531914894%;
2948
+ }
2949
+
2950
+ .qti-layout-offset6 {
2951
+ margin-left: 51.0638297872%;
2952
+ }
2953
+
2954
+ .qti-layout-offset7 {
2955
+ margin-left: 59.5744680851%;
2956
+ }
2957
+
2958
+ .qti-layout-offset8 {
2959
+ margin-left: 68.085106383%;
2960
+ }
2961
+
2962
+ .qti-layout-offset9 {
2963
+ margin-left: 76.5957446809%;
2964
+ }
2965
+
2966
+ .qti-layout-offset10 {
2967
+ margin-left: 85.1063829787%;
2968
+ }
2969
+
2970
+ .qti-layout-offset11 {
2971
+ margin-left: 93.6170212766%;
2972
+ }
2973
+
2974
+ .qti-layout-offset12 {
2975
+ margin-left: 102.1276595745%;
2976
+ }
2977
+
2978
+ @media (width <= 767px) {
2979
+ [class*='qti-layout-col'] {
2980
+ width: 100%;
2981
+ }
2982
+ }
2983
+ }
2984
+
2985
+ [view],
2986
+ qti-outcome-declaration,
2987
+ qti-response-declaration {
2988
+ display: none;
2989
+ }
2990
+
2991
+ [view].show {
2992
+ display: block;
2993
+ }
2994
+
2995
+ :host {
2996
+ box-sizing: border-box;
2997
+ }
2998
+
2999
+ *,
3000
+ *::before,
3001
+ *::after {
3002
+ box-sizing: inherit;
3003
+ }
3004
+
3005
+ /* components */
3006
+
3007
+ @layer qti-components {
3008
+ qti-choice-interaction {
3009
+ &.qti-input-control-hidden {
3010
+ & qti-simple-choice {
3011
+
3012
+ &:hover {
3013
+ background-color: var(--qti-hover-bg);
3014
+ }
3015
+
3016
+ &:focus {
3017
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3018
+ }
3019
+
3020
+ &::part(ch) {
3021
+ display: none;
3022
+ }
3023
+
3024
+ &:state(--checked),
3025
+ &[aria-checked='true'] {
3026
+ border-color: var(--qti-border-active);
3027
+ background-color: var(--qti-bg-active);
3028
+ }
3029
+
3030
+ &:state(readonly),
3031
+ &[aria-readonly='true'] {
3032
+ cursor: pointer;
3033
+ background-color: var(--qti-bg);
3034
+ outline: 0;
3035
+ border: none;
3036
+ }
3037
+
3038
+ &:state(disabled),
3039
+ &[aria-disabled='true'] {
3040
+ cursor: not-allowed;
3041
+ background-color: var(--qti-disabled-bg);
3042
+ color: var(--qti-disabled-color);
3043
+ border-color: var(--qti-border-color);
3044
+ outline: 4px solid var(--qti-disabled-bg);
3045
+ }
3046
+
3047
+ border-radius: var(--qti-border-radius);
3048
+
3049
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3050
+
3051
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3052
+
3053
+ outline: none
3054
+ }
3055
+ }
3056
+
3057
+ &:not(.qti-input-control-hidden) {
3058
+ & qti-simple-choice {
3059
+
3060
+ &:not([aria-disabled='true'], [aria-readonly='true'], :state(--checked)):hover {
3061
+ background-color: var(--qti-hover-bg);
3062
+ }
3063
+
3064
+ &:focus {
3065
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3066
+ }
3067
+
3068
+ &:state(--checked),
3069
+ &[aria-checked='true'] {
3070
+ border-color: var(--qti-border-active);
3071
+ background-color: var(--qti-bg-active);
3072
+ }
3073
+
3074
+ &:state(readonly),
3075
+ &[aria-readonly='true'] {
3076
+ cursor: pointer;
3077
+ background-color: var(--qti-bg);
3078
+ outline: 0;
3079
+ border: none;
3080
+ }
3081
+
3082
+ &:state(disabled),
3083
+ &[aria-disabled='true'] {
3084
+ cursor: not-allowed;
3085
+ background-color: var(--qti-disabled-bg);
3086
+ color: var(--qti-disabled-color);
3087
+ border-color: var(--qti-border-color);
3088
+ outline: 4px solid var(--qti-disabled-bg);
3089
+ }
3090
+
3091
+ &::part(cha) {
3092
+ width: calc(var(--qti-form-size) - 6px);
3093
+ height: calc(var(--qti-form-size) - 6px);
3094
+ }
3095
+
3096
+ &:state(radio)::part(ch) {
3097
+ border-radius: 100%;
3098
+ display: grid;
3099
+ place-content: center;
3100
+ width: var(--qti-form-size);
3101
+ height: var(--qti-form-size);
3102
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3103
+ outline: none;
3104
+ }
3105
+
3106
+ &:state(radio):state(--checked)::part(cha) {
3107
+ background-color: var(--qti-border-active);
3108
+ border-radius: 100%;
3109
+ }
3110
+
3111
+ &:state(checkbox)::part(ch) {
3112
+ display: flex;
3113
+ place-items: center;
3114
+ border-radius: var(--qti-border-radius);
3115
+ display: grid;
3116
+ place-content: center;
3117
+ width: var(--qti-form-size);
3118
+ height: var(--qti-form-size);
3119
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3120
+ outline: none;
3121
+ }
3122
+
3123
+ &:state(checkbox):state(--checked)::part(cha) {
3124
+ background-color: var(--qti-border-active);
3125
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
3126
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
3127
+ }
3128
+
3129
+ gap: 0.5rem;
3130
+
3131
+ border-radius: var(--qti-border-radius);
3132
+
3133
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3134
+
3135
+ outline: none;
3136
+
3137
+ cursor: pointer
3138
+ }
3139
+ }
3140
+
3141
+ & qti-simple-choice {
3142
+ width: -moz-fit-content;
3143
+ width: fit-content;
3144
+ cursor: pointer;
3145
+
3146
+ &:state(correct-response),
3147
+ &[data-correct-response='true'] {
3148
+ &::after {
3149
+ content: '\\02714';
3150
+ color: #16a34a; /* text-green-600 */
3151
+ }
3152
+ }
3153
+ }
3154
+
3155
+ & qti-simple-choice > p {
3156
+ margin: 0 !important;
3157
+ padding: 0 !important;
3158
+ }
3159
+ }
3160
+
3161
+ .hover-border {
3162
+ border: 2px solid #000; /* Adjust the border style and color as needed */
3163
+ }
3164
+
3165
+ qti-graphic-gap-match-interaction {
3166
+ position: relative;
3167
+
3168
+ &.qti-selections-light {
3169
+ &:state(--dragzone-active)::part(drags) {
3170
+ background-color: var(--qti-light-bg-active);
3171
+ border-color: var(--qti-light-border-active);
3172
+ }
3173
+
3174
+ &:state(--dragzone-enabled)::part(drags) {
3175
+ background-color: var(--qti-light-bg-active);
3176
+ }
3177
+ }
3178
+
3179
+ &.qti-selections-dark {
3180
+ &:state(--dragzone-active)::part(drags) {
3181
+ background-color: var(--qti-dark-bg-active);
3182
+ border-color: var(--qti-dark-border-active);
3183
+ }
3184
+
3185
+ &:state(--dragzone-enabled)::part(drags) {
3186
+ background-color: var(--qti-dark-bg-active);
3187
+ }
3188
+ }
3189
+
3190
+ /* General styles for active and enabled states */
3191
+ &:state(--dragzone-active)::part(drags) {
3192
+ border-color: var(--qti-border-active);
3193
+ background-color: var(--qti-bg-active);
3194
+ }
3195
+
3196
+ &:state(--dragzone-enabled)::part(drags) {
3197
+ background-color: var(--qti-bg-active);
3198
+ }
3199
+
3200
+ & qti-gap-img,
3201
+ qti-gap-text {
3202
+ display: flex;
3203
+ justify-content: center;
3204
+ align-items: center;
3205
+ cursor: grab;
3206
+ }
3207
+
3208
+ & qti-associable-hotspot {
3209
+ display: flex;
3210
+ justify-content: center;
3211
+ align-items: center;
3212
+ border: 2px solid transparent;
3213
+
3214
+ &[enabled] {
3215
+
3216
+ /* Light theme override */
3217
+ .qti-selections-light {
3218
+ background-color: var(--qti-light-bg-active);
3219
+ }
3220
+
3221
+ /* Dark theme override */
3222
+ .qti-selections-dark {
3223
+ background-color: var(--qti-dark-bg-active);
3224
+ }
3225
+ background-color: var(--qti-bg-active)
3226
+ }
3227
+
3228
+ &[active] {
3229
+
3230
+ /* Light theme override */
3231
+ .qti-selections-light {
3232
+ background-color: var(--qti-light-bg-active);
3233
+ border-color: var(--qti-light-border-active);
3234
+ }
3235
+
3236
+ /* Dark theme override */
3237
+ .qti-selections-dark {
3238
+ background-color: var(--qti-dark-bg-active);
3239
+ border-color: var(--qti-dark-border-active);
3240
+ }
3241
+ border-color: var(--qti-border-active);
3242
+ background-color: var(--qti-bg-active)
3243
+ }
3244
+
3245
+ &[disabled] {
3246
+
3247
+ &:not(:empty) {
3248
+ cursor: default !important;
3249
+ }
3250
+
3251
+ cursor: not-allowed;
3252
+
3253
+ background-color: var(--qti-disabled-bg);
3254
+
3255
+ color: var(--qti-disabled-color);
3256
+
3257
+ border-color: var(--qti-border-color);
3258
+
3259
+ outline: 4px solid var(--qti-disabled-bg)
3260
+ }
3261
+
3262
+ &:empty::after {
3263
+ padding: var(--qti-padding-md) var(--qti-padding-lg); /* Padding shorthand */
3264
+ content: '\\0000a0'; /* when empty, put a space in it */
3265
+ }
3266
+
3267
+ &:not(:empty) {
3268
+ padding: 0;
3269
+ width: auto;
3270
+ }
3271
+
3272
+ &:not(:empty) > * {
3273
+ flex: 1;
3274
+ transform: rotate(0); /* rotate-0 */
3275
+ box-shadow: 0 0 0 1px #e5e7eb; /* ring-gray-200 */
3276
+ }
3277
+ }
3278
+
3279
+ & img {
3280
+ margin: 0;
3281
+ padding: 0;
3282
+ }
3283
+ }
3284
+
3285
+ qti-text-entry-interaction {
3286
+ &::part(input) {
3287
+ border-radius: 0;
3288
+ cursor: text;
3289
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3290
+ background: unset;
3291
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3292
+ outline: none;
3293
+ }
3294
+
3295
+ &:hover {
3296
+ background-color: var(--qti-hover-bg);
3297
+ }
3298
+
3299
+ &:focus-within {
3300
+ &::part(input) {
3301
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3302
+ border-color: var(--qti-border-active);
3303
+ }
3304
+ }
3305
+ }
3306
+
3307
+ qti-extended-text-interaction {
3308
+ &::part(textarea) {
3309
+ border-radius: 0;
3310
+ cursor: text;
3311
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3312
+ background: unset;
3313
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3314
+ outline: none;
3315
+ }
3316
+
3317
+ &:hover {
3318
+ background-color: var(--qti-hover-bg);
3319
+ }
3320
+
3321
+ &:focus-within {
3322
+ &::part(textarea) {
3323
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3324
+ border-color: var(--qti-border-active);
3325
+ }
3326
+ }
3327
+ }
3328
+
3329
+ qti-gap-match-interaction {
3330
+ &.qti-selections-light {
3331
+ &:state(--dragzone-active)::part(drags) {
3332
+ background-color: var(--qti-light-bg-active);
3333
+ border-color: var(--qti-light-border-active);
3334
+ }
3335
+
3336
+ &:state(--dragzone-enabled)::part(drags) {
3337
+ background-color: var(--qti-light-bg-active);
3338
+ }
3339
+ }
3340
+
3341
+ &.qti-selections-dark {
3342
+ &:state(--dragzone-active)::part(drags) {
3343
+ background-color: var(--qti-dark-bg-active);
3344
+ border-color: var(--qti-dark-border-active);
3345
+ }
3346
+
3347
+ &:state(--dragzone-enabled)::part(drags) {
3348
+ background-color: var(--qti-dark-bg-active);
3349
+ }
3350
+ }
3351
+
3352
+ /* General styles for active and enabled states */
3353
+ &:state(--dragzone-active)::part(drags) {
3354
+ border-color: var(--qti-border-active);
3355
+ background-color: var(--qti-bg-active);
3356
+ }
3357
+
3358
+ &:state(--dragzone-enabled)::part(drags) {
3359
+ background-color: var(--qti-bg-active);
3360
+ }
3361
+
3362
+ & qti-gap-text {
3363
+
3364
+ &[dragging] {
3365
+ pointer-events: none;
3366
+ rotate: -2deg;
3367
+ box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3368
+ 0 4px 8px rgb(0 0 0 / 10%);
3369
+ }
3370
+
3371
+ &:hover {
3372
+ background-color: var(--qti-hover-bg);
3373
+ }
3374
+
3375
+ &:focus {
3376
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3377
+ }
3378
+
3379
+ transition: transform 200ms ease-out,
3380
+ box-shadow 200ms ease-out,
3381
+ rotate 200ms ease-out;
3382
+
3383
+ cursor: grab;
3384
+
3385
+ background-color: var(--qti-bg);
3386
+
3387
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3388
+
3389
+ border-radius: var(--qti-border-radius);
3390
+
3391
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
3392
+
3393
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3394
+
3395
+ outline: none;
3396
+
3397
+ background-image: radial-gradient(
3398
+ circle at center,
3399
+ rgb(0 0 0 / 10%) 0,
3400
+ rgb(0 0 0 / 20%) 2px,
3401
+ rgb(255 255 255 / 0%) 2px,
3402
+ rgb(255 255 255 / 0%) 100%
3403
+ );
3404
+
3405
+ background-repeat: repeat-y;
3406
+
3407
+ background-position: left center;
3408
+
3409
+ background-size: 14px 8px
3410
+ }
3411
+
3412
+ & qti-gap {
3413
+
3414
+ &[disabled] {
3415
+
3416
+ &:not(:empty) {
3417
+ cursor: default !important;
3418
+ }
3419
+
3420
+ cursor: not-allowed;
3421
+
3422
+ background-color: var(--qti-disabled-bg);
3423
+
3424
+ color: var(--qti-disabled-color);
3425
+
3426
+ border-color: var(--qti-border-color);
3427
+
3428
+ outline: 4px solid var(--qti-disabled-bg)
3429
+ }
3430
+
3431
+ &[enabled] {
3432
+
3433
+ /* Light theme override */
3434
+ .qti-selections-light {
3435
+ border-color: var(--qti-light-border-active);
3436
+ }
3437
+
3438
+ /* Dark theme override */
3439
+ .qti-selections-dark {
3440
+ border-color: var(--qti-dark-border-active);
3441
+ }
3442
+ background-color: var(--qti-bg-active)
3443
+ }
3444
+
3445
+ &[active] {
3446
+
3447
+ /* Light theme override */
3448
+ .qti-selections-light {
3449
+ background-color: var(--qti-light-bg-active);
3450
+ border-color: var(--qti-light-border-active);
3451
+ }
3452
+
3453
+ /* Dark theme override */
3454
+ .qti-selections-dark {
3455
+ background-color: var(--qti-dark-bg-active);
3456
+ border-color: var(--qti-dark-border-active);
3457
+ }
3458
+ border-color: var(--qti-border-active);
3459
+ background-color: var(--qti-bg-active)
3460
+ }
3461
+
3462
+ display: inline-flex;
3463
+ align-items: center;
3464
+
3465
+ &:empty::after {
3466
+ padding: var(--qti-padding-md) var(--qti-padding-lg); /* Padding shorthand */
3467
+ content: '\\0000a0'; /* when empty, put a space in it */
3468
+ }
3469
+
3470
+ &:not(:empty) {
3471
+ display: inline-flex;
3472
+ padding: 0;
3473
+ width: auto;
3474
+ }
3475
+
3476
+ &:not(:empty) > * {
3477
+ flex: 1;
3478
+ transform: rotate(0); /* rotate-0 */
3479
+ box-shadow: 0 0 0 1px #e5e7eb; /* ring-gray-200 */
3480
+ }
3481
+
3482
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
3483
+ center no-repeat;
3484
+
3485
+ border-radius: var(--qti-border-radius);
3486
+
3487
+ position: relative;
3488
+
3489
+ background-color: var(--qti-bg);
3490
+
3491
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3492
+
3493
+ outline: none
3494
+ }
3495
+ }
3496
+
3497
+ qti-hotspot-interaction {
3498
+ & qti-hotspot-choice {
3499
+ &[shape='circle'] {
3500
+
3501
+ &:hover {
3502
+ background-color: var(--qti-hover-bg);
3503
+ }
3504
+
3505
+ &:focus {
3506
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3507
+ }
3508
+
3509
+ &:state(--checked),
3510
+ &[aria-checked='true'] {
3511
+ border-color: var(--qti-border-active);
3512
+ }
3513
+
3514
+ &:state(--readonly),
3515
+ &[aria-readonly='true'] {
3516
+ cursor: pointer;
3517
+ background-color: var(--qti-bg);
3518
+ outline: 0;
3519
+ border: none;
3520
+ }
3521
+
3522
+ &:state(--disabled),
3523
+ &[aria-disabled='true'] {
3524
+ cursor: not-allowed;
3525
+ background-color: var(--qti-disabled-bg);
3526
+ color: var(--qti-disabled-color);
3527
+ border-color: var(--qti-border-color);
3528
+ outline: 4px solid var(--qti-disabled-bg);
3529
+ }
3530
+
3531
+ width: 100%;
3532
+
3533
+ height: 100%;
3534
+
3535
+ background-color: transparent;
3536
+
3537
+ padding: 0;
3538
+
3539
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3540
+
3541
+ outline: none
3542
+ }
3543
+
3544
+ &[shape='rect'] {
3545
+
3546
+ /* &:hover {
3547
+ @apply hov;
3548
+ } */
3549
+
3550
+ &:focus {
3551
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3552
+ }
3553
+
3554
+ &:state(--checked),
3555
+ &[aria-checked='true'] {
3556
+ border-color: var(--qti-border-active);
3557
+ }
3558
+
3559
+ &[aria-readonly='true'] {
3560
+ cursor: pointer;
3561
+ background-color: var(--qti-bg);
3562
+ outline: 0;
3563
+ border: none;
3564
+ }
3565
+
3566
+ &[aria-disabled='true'] {
3567
+ cursor: not-allowed;
3568
+ background-color: var(--qti-disabled-bg);
3569
+ color: var(--qti-disabled-color);
3570
+ border-color: var(--qti-border-color);
3571
+ outline: 4px solid var(--qti-disabled-bg);
3572
+ }
3573
+
3574
+ width: 100%;
3575
+
3576
+ height: 100%;
3577
+
3578
+ background-color: transparent;
3579
+
3580
+ padding: 0;
3581
+
3582
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3583
+
3584
+ outline: none
3585
+ }
3586
+
3587
+ &[shape='poly'] {
3588
+ &:hover::after {
3589
+ content: '';
3590
+ width: 100%;
3591
+ height: 100%;
3592
+ background: repeating-linear-gradient(
3593
+ 45deg,
3594
+ var(--qti-border-active),
3595
+ var(--qti-border-active) 5px,
3596
+ transparent 5px,
3597
+ transparent 10px
3598
+ );
3599
+ display: block;
3600
+ }
3601
+
3602
+ &:state(--checked)::after,
3603
+ &[aria-checked='true']::after {
3604
+ content: '';
3605
+ width: 100%;
3606
+ height: 100%;
3607
+ background: repeating-linear-gradient(
3608
+ 45deg,
3609
+ transparent,
3610
+ transparent 5px,
3611
+ var(--qti-border-active) 5px,
3612
+ var(--qti-border-active) 10px
3613
+ );
3614
+ display: block;
3615
+ }
3616
+
3617
+ &[aria-readonly='true'] {
3618
+ cursor: pointer;
3619
+ background-color: var(--qti-bg);
3620
+ outline: 0;
3621
+ border: none;
3622
+ }
3623
+
3624
+ &[aria-disabled='true'] {
3625
+ cursor: not-allowed;
3626
+ background-color: var(--qti-disabled-bg);
3627
+ color: var(--qti-disabled-color);
3628
+ border-color: var(--qti-border-color);
3629
+ outline: 4px solid var(--qti-disabled-bg);
3630
+ }
3631
+ }
3632
+ }
3633
+ }
3634
+
3635
+ qti-hottext-interaction {
3636
+ /* &:not(.qti-input-control-hidden),
3637
+ &:not(.qti-unselected-hidden) { */
3638
+ qti-hottext {
3639
+ display: inline-flex;
3640
+ align-items: center;
3641
+
3642
+ &:hover {
3643
+ background-color: var(--qti-hover-bg);
3644
+ }
3645
+
3646
+ &:focus {
3647
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3648
+ }
3649
+
3650
+ &::part(cha) {
3651
+ width: calc(var(--qti-form-size) - 6px);
3652
+ height: calc(var(--qti-form-size) - 6px);
3653
+ }
3654
+
3655
+ &:state(radio)::part(ch) {
3656
+ border-radius: 100%;
3657
+ display: grid;
3658
+ place-content: center;
3659
+ width: var(--qti-form-size);
3660
+ height: var(--qti-form-size);
3661
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3662
+ outline: none;
3663
+ }
3664
+
3665
+ &:state(radio):state(--checked)::part(cha) {
3666
+ background-color: var(--qti-border-active);
3667
+ border-radius: 100%;
3668
+ }
3669
+
3670
+ &:state(checkbox)::part(ch) {
3671
+ display: flex;
3672
+ place-items: center;
3673
+ border-radius: var(--qti-border-radius);
3674
+ display: grid;
3675
+ place-content: center;
3676
+ width: var(--qti-form-size);
3677
+ height: var(--qti-form-size);
3678
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3679
+ outline: none;
3680
+ }
3681
+
3682
+ &:state(checkbox):state(--checked)::part(cha) {
3683
+ background-color: var(--qti-border-active);
3684
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
3685
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
3686
+ }
3687
+
3688
+ gap: 0.5rem;
3689
+
3690
+ border-radius: var(--qti-border-radius);
3691
+
3692
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3693
+
3694
+ outline: none;
3695
+
3696
+ cursor: pointer
3697
+ }
3698
+
3699
+ /* } */
3700
+
3701
+ &.qti-input-control-hidden {
3702
+ qti-hottext {
3703
+ /* --qti-padding-md: 0.1rem;
3704
+ --qti-padding-lg: 0.2rem;
3705
+ --qti-border-radius-md: 0.3rem;
3706
+ --qti-border-thickness: 1px;
3707
+ --qti-font-weight-semibold: 400; */
3708
+
3709
+ &:hover {
3710
+ background-color: var(--qti-hover-bg);
3711
+ }
3712
+
3713
+ &:focus {
3714
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3715
+ }
3716
+
3717
+ /* @layer qti-variants { */
3718
+ &::part(ch) {
3719
+ display: none;
3720
+ }
3721
+
3722
+ &:state(--checked) {
3723
+ border-color: var(--qti-border-active);
3724
+ background-color: var(--qti-bg-active);
3725
+ }
3726
+
3727
+ &[aria-readonly='true'] {
3728
+ cursor: pointer;
3729
+ background-color: var(--qti-bg);
3730
+ outline: 0;
3731
+ border: none;
3732
+ }
3733
+
3734
+ &[aria-disabled='true'] {
3735
+ cursor: not-allowed;
3736
+ background-color: var(--qti-disabled-bg);
3737
+ color: var(--qti-disabled-color);
3738
+ border-color: var(--qti-border-color);
3739
+ outline: 4px solid var(--qti-disabled-bg);
3740
+ }
3741
+
3742
+ border-radius: var(--qti-border-radius);
3743
+
3744
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3745
+
3746
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3747
+
3748
+ outline: none
3749
+ }
3750
+
3751
+ /* } */
3752
+ }
3753
+
3754
+ &.qti-unselected-hidden {
3755
+ qti-hottext {
3756
+ &:hover {
3757
+ background-color: var(--qti-hover-bg);
3758
+ }
3759
+
3760
+ &:focus {
3761
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3762
+ }
3763
+
3764
+ cursor: pointer;
3765
+
3766
+ &::part(ch) {
3767
+ display: none;
3768
+ }
3769
+
3770
+ &:state(--checked) {
3771
+ background-color: var(--qti-bg-active);
3772
+ }
3773
+
3774
+ &[aria-readonly='true'] {
3775
+ cursor: pointer;
3776
+ background-color: var(--qti-bg);
3777
+ outline: 0;
3778
+ border: none;
3779
+ }
3780
+
3781
+ &[aria-disabled='true'] {
3782
+ cursor: not-allowed;
3783
+ background-color: var(--qti-disabled-bg);
3784
+ color: var(--qti-disabled-color);
3785
+ border-color: var(--qti-border-color);
3786
+ outline: 4px solid var(--qti-disabled-bg);
3787
+ }
3788
+ }
3789
+ }
3790
+ }
3791
+
3792
+ qti-inline-choice-interaction {
3793
+ &::part(select) {
3794
+
3795
+ &:hover {
3796
+ background-color: var(--qti-hover-bg);
3797
+ }
3798
+
3799
+ &:focus {
3800
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3801
+ }
3802
+
3803
+ border-radius: var(--qti-border-radius);
3804
+
3805
+ position: relative;
3806
+
3807
+ -webkit-appearance: none;
3808
+
3809
+ -moz-appearance: none;
3810
+
3811
+ appearance: none;
3812
+
3813
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3814
+
3815
+ padding-right: calc(var(--qti-padding-horizontal) + 1.5rem);
3816
+
3817
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3818
+
3819
+ outline: none;
3820
+
3821
+ background: url("data:image/svg+xml,%3Csvg fill='currentColor' width='22' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Cpath clip-rule='evenodd' fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'%3E%3C/path%3E%3C/svg%3E")
3822
+ no-repeat center right 6px
3823
+ }
3824
+ }
3825
+
3826
+ qti-match-interaction:not(.qti-match-tabular) {
3827
+ &:state(--dragzone-enabled) qti-simple-match-set:first-of-type {
3828
+ background-color: var(--qti-bg-active);
3829
+ }
3830
+
3831
+ &:state(--dragzone-active) qti-simple-match-set:first-of-type {
3832
+ border-color: var(--qti-border-active);
3833
+ background-color: var(--qti-bg-active);
3834
+ }
3835
+
3836
+ /* The draggables */
3837
+ & qti-simple-match-set:first-of-type {
3838
+ display: flex;
3839
+ flex-wrap: wrap;
3840
+ align-items: flex-start; /* Prevents children from stretching */
3841
+ gap: var(--qti-gap-size);
3842
+ border: 2px solid transparent;
3843
+
3844
+ & qti-simple-associable-choice {
3845
+
3846
+ &[dragging] {
3847
+ pointer-events: none;
3848
+ rotate: -2deg;
3849
+ box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3850
+ 0 4px 8px rgb(0 0 0 / 10%);
3851
+ }
3852
+
3853
+ &:hover {
3854
+ background-color: var(--qti-hover-bg);
3855
+ }
3856
+
3857
+ &:focus {
3858
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3859
+ }
3860
+
3861
+ transition: transform 200ms ease-out,
3862
+ box-shadow 200ms ease-out,
3863
+ rotate 200ms ease-out;
3864
+
3865
+ cursor: grab;
3866
+
3867
+ background-color: var(--qti-bg);
3868
+
3869
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3870
+
3871
+ border-radius: var(--qti-border-radius);
3872
+
3873
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
3874
+
3875
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3876
+
3877
+ outline: none;
3878
+
3879
+ background-image: radial-gradient(
3880
+ circle at center,
3881
+ rgb(0 0 0 / 10%) 0,
3882
+ rgb(0 0 0 / 20%) 2px,
3883
+ rgb(255 255 255 / 0%) 2px,
3884
+ rgb(255 255 255 / 0%) 100%
3885
+ );
3886
+
3887
+ background-repeat: repeat-y;
3888
+
3889
+ background-position: left center;
3890
+
3891
+ background-size: 14px 8px
3892
+ }
3893
+ }
3894
+
3895
+ /* The droppables */
3896
+ & qti-simple-match-set:last-of-type {
3897
+ display: grid;
3898
+ grid-auto-columns: 1fr; /* auto-cols-fr */
3899
+ grid-auto-flow: column; /* grid-flow-col */
3900
+ gap: var(--qti-gap-size); /* gap-2 */
3901
+ width: 100%; /* w-full */
3902
+
3903
+ & qti-simple-associable-choice {
3904
+ display: flex;
3905
+ flex-direction: column;
3906
+ }
3907
+
3908
+ & > qti-simple-associable-choice {
3909
+ /* a droppable qti-simple-associable-choice */
3910
+ box-sizing: border-box;
3911
+ display: grid;
3912
+ grid-row: 2 / 4;
3913
+ grid-template-rows: subgrid;
3914
+
3915
+ & img {
3916
+ max-width: 100%;
3917
+ height: auto;
3918
+ }
3919
+
3920
+ &[enabled] {
3921
+ &::part(dropslot) {
3922
+ background-color: var(--qti-bg-active);
3923
+ }
3924
+ }
3925
+
3926
+ &[disabled] {
3927
+ &::part(dropslot) {
3928
+ cursor: not-allowed;
3929
+ background-color: var(--qti-disabled-bg);
3930
+ color: var(--qti-disabled-color);
3931
+ border-color: var(--qti-border-color);
3932
+ outline: 4px solid var(--qti-disabled-bg);
3933
+ }
3934
+ }
3935
+
3936
+ &[active] {
3937
+ &::part(dropslot) {
3938
+ border-color: var(--qti-border-active);
3939
+ background-color: var(--qti-bg-active);
3940
+ }
3941
+ }
3942
+
3943
+ &::part(dropslot) {
3944
+
3945
+ &[dragging] {
3946
+ pointer-events: none;
3947
+ rotate: -2deg;
3948
+ box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3949
+ 0 4px 8px rgb(0 0 0 / 10%);
3950
+ }
3951
+
3952
+ &:focus {
3953
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3954
+ }
3955
+
3956
+ min-height: 6rem;
3957
+ gap: var(--qti-gap-size);
3958
+ box-sizing: border-box;
3959
+ display: flex;
3960
+ justify-content: center;
3961
+ align-items: center;
3962
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
3963
+ center no-repeat;
3964
+ border-radius: var(--qti-border-radius);
3965
+ position: relative;
3966
+ background-color: var(--qti-bg);
3967
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3968
+ outline: none;
3969
+ }
3970
+
3971
+ & > *:not(qti-simple-associable-choice) {
3972
+ pointer-events: none;
3973
+ }
3974
+
3975
+ & > qti-simple-associable-choice {
3976
+
3977
+ &::part(dropslot) {
3978
+ display: none;
3979
+ }
3980
+
3981
+ &:hover {
3982
+ background-color: var(--qti-hover-bg);
3983
+ }
3984
+
3985
+ &:focus {
3986
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3987
+ }
3988
+
3989
+ flex-basis: fit-content;
3990
+
3991
+ transition: transform 200ms ease-out,
3992
+ box-shadow 200ms ease-out,
3993
+ rotate 200ms ease-out;
3994
+
3995
+ cursor: grab;
3996
+
3997
+ background-color: var(--qti-bg);
3998
+
3999
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
4000
+
4001
+ border-radius: var(--qti-border-radius);
4002
+
4003
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
4004
+
4005
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4006
+
4007
+ outline: none;
4008
+
4009
+ background-image: radial-gradient(
4010
+ circle at center,
4011
+ rgb(0 0 0 / 10%) 0,
4012
+ rgb(0 0 0 / 20%) 2px,
4013
+ rgb(255 255 255 / 0%) 2px,
4014
+ rgb(255 255 255 / 0%) 100%
4015
+ );
4016
+
4017
+ background-repeat: repeat-y;
4018
+
4019
+ background-position: left center;
4020
+
4021
+ background-size: 14px 8px;
4022
+ }
4023
+ }
4024
+ }
4025
+ }
4026
+
4027
+ qti-order-interaction:state(--dragzone-active)::part(drags) {
4028
+ border-color: var(--qti-border-active);
4029
+ background-color: var(--qti-bg-active);
4030
+ }
4031
+
4032
+ qti-order-interaction:state(--dragzone-enabled)::part(drags) {
4033
+ background-color: var(--qti-bg-active);
4034
+ }
4035
+
4036
+ qti-order-interaction {
4037
+ &::part(qti-simple-choice),
4038
+ & qti-simple-choice {
4039
+
4040
+ &[dragging] {
4041
+ pointer-events: none;
4042
+ rotate: -2deg;
4043
+ box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
4044
+ 0 4px 8px rgb(0 0 0 / 10%);
4045
+ }
4046
+
4047
+ &:hover {
4048
+ background-color: var(--qti-hover-bg);
4049
+ }
4050
+
4051
+ &:focus {
4052
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4053
+ }
4054
+
4055
+ transition: transform 200ms ease-out,
4056
+ box-shadow 200ms ease-out,
4057
+ rotate 200ms ease-out;
4058
+
4059
+ cursor: grab;
4060
+
4061
+ background-color: var(--qti-bg);
4062
+
4063
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
4064
+
4065
+ border-radius: var(--qti-border-radius);
4066
+
4067
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
4068
+
4069
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4070
+
4071
+ outline: none;
4072
+
4073
+ background-image: radial-gradient(
4074
+ circle at center,
4075
+ rgb(0 0 0 / 10%) 0,
4076
+ rgb(0 0 0 / 20%) 2px,
4077
+ rgb(255 255 255 / 0%) 2px,
4078
+ rgb(255 255 255 / 0%) 100%
4079
+ );
4080
+
4081
+ background-repeat: repeat-y;
4082
+
4083
+ background-position: left center;
4084
+
4085
+ background-size: 14px 8px
4086
+ }
4087
+
4088
+ &::part(qti-simple-choice) {
4089
+ display: flex;
4090
+ overflow: hidden;
4091
+ align-items: center;
4092
+ width: 100%;
4093
+ text-overflow: ellipsis;
4094
+ }
4095
+
4096
+ &::part(drops) {
4097
+ gap: 0.5rem; /* gap-2 */
4098
+ }
4099
+
4100
+ &::part(drags) {
4101
+ gap: 0.5rem; /* gap-2 */
4102
+ }
4103
+
4104
+ &::part(drop-list) {
4105
+
4106
+ &[enabled] {
4107
+
4108
+ /* Light theme override */
4109
+ .qti-selections-light {
4110
+ border-color: var(--qti-light-border-active);
4111
+ }
4112
+
4113
+ /* Dark theme override */
4114
+ .qti-selections-dark {
4115
+ border-color: var(--qti-dark-border-active);
4116
+ }
4117
+ background-color: var(--qti-bg-active)
4118
+ }
4119
+
4120
+ &:hover {
4121
+ background-color: var(--qti-hover-bg);
4122
+ }
4123
+
4124
+ &:focus {
4125
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4126
+ }
4127
+
4128
+ display: flex;
4129
+ min-height: 4rem;
4130
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
4131
+ center no-repeat;
4132
+ border-radius: var(--qti-border-radius);
4133
+ position: relative;
4134
+ background-color: var(--qti-bg);
4135
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4136
+ outline: none;
4137
+ }
4138
+
4139
+ &::part(active) {
4140
+ border-color: var(--qti-border-active);
4141
+ background-color: var(--qti-bg-active);
4142
+ }
4143
+
4144
+ & drop-list {
4145
+ &[shape='circle'] {
4146
+
4147
+ &:hover {
4148
+ background-color: var(--qti-hover-bg);
4149
+ }
4150
+
4151
+ &:focus {
4152
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4153
+ }
4154
+
4155
+ &[aria-checked='true'] {
4156
+ border-color: var(--qti-border-active);
4157
+ background-color: var(--qti-bg-active);
4158
+ }
4159
+
4160
+ &[aria-readonly='true'] {
4161
+ cursor: pointer;
4162
+ background-color: var(--qti-bg);
4163
+ outline: 0;
4164
+ border: none;
4165
+ }
4166
+
4167
+ &[aria-disabled='true'] {
4168
+ cursor: not-allowed;
4169
+ background-color: var(--qti-disabled-bg);
4170
+ color: var(--qti-disabled-color);
4171
+ border-color: var(--qti-border-color);
4172
+ outline: 4px solid var(--qti-disabled-bg);
4173
+ }
4174
+
4175
+ width: 100%;
4176
+
4177
+ height: 100%;
4178
+
4179
+ background-color: transparent;
4180
+
4181
+ padding: 0;
4182
+
4183
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4184
+
4185
+ outline: none
4186
+ }
4187
+
4188
+ &[shape='square'] {
4189
+
4190
+ &:hover {
4191
+ background-color: var(--qti-hover-bg);
4192
+ }
4193
+
4194
+ &:focus {
4195
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4196
+ }
4197
+
4198
+ &[aria-checked='true'] {
4199
+ border-color: var(--qti-border-active);
4200
+ background-color: var(--qti-bg-active);
4201
+ }
4202
+
4203
+ &[aria-readonly='true'] {
4204
+ cursor: pointer;
4205
+ background-color: var(--qti-bg);
4206
+ outline: 0;
4207
+ border: none;
4208
+ }
4209
+
4210
+ &[aria-disabled='true'] {
4211
+ cursor: not-allowed;
4212
+ background-color: var(--qti-disabled-bg);
4213
+ color: var(--qti-disabled-color);
4214
+ border-color: var(--qti-border-color);
4215
+ outline: 4px solid var(--qti-disabled-bg);
4216
+ }
4217
+
4218
+ width: 100%;
4219
+
4220
+ height: 100%;
4221
+
4222
+ background-color: transparent;
4223
+
4224
+ padding: 0;
4225
+
4226
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4227
+
4228
+ outline: none
4229
+ }
4230
+ }
4231
+ }
4232
+
4233
+ qti-associate-interaction {
4234
+ /* General styles for active and enabled states */
4235
+ &:state(--dragzone-active) slot[name='qti-simple-associable-choice'] {
4236
+ border-color: var(--qti-border-active);
4237
+ background-color: var(--qti-bg-active);
4238
+ }
4239
+
4240
+ &:state(--dragzone-enabled) slot[name='qti-simple-associable-choice'] {
4241
+ background-color: var(--qti-bg-active);
4242
+ }
4243
+
4244
+ & qti-simple-associable-choice, /* drags when in lightdom */
4245
+ &::part(qti-simple-associable-choice) /* drags when in shadowdom */ {
4246
+
4247
+ &:hover {
4248
+ background-color: var(--qti-hover-bg);
4249
+ }
4250
+
4251
+ &:focus {
4252
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4253
+ }
4254
+
4255
+ &[dragging] {
4256
+ pointer-events: none;
4257
+ rotate: -2deg;
4258
+ box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
4259
+ 0 4px 8px rgb(0 0 0 / 10%);
4260
+ }
4261
+
4262
+ transition: transform 200ms ease-out,
4263
+ box-shadow 200ms ease-out,
4264
+ rotate 200ms ease-out;
4265
+
4266
+ cursor: grab;
4267
+
4268
+ background-color: var(--qti-bg);
4269
+
4270
+ padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
4271
+
4272
+ border-radius: var(--qti-border-radius);
4273
+
4274
+ padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
4275
+
4276
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4277
+
4278
+ outline: none;
4279
+
4280
+ background-image: radial-gradient(
4281
+ circle at center,
4282
+ rgb(0 0 0 / 10%) 0,
4283
+ rgb(0 0 0 / 20%) 2px,
4284
+ rgb(255 255 255 / 0%) 2px,
4285
+ rgb(255 255 255 / 0%) 100%
4286
+ );
4287
+
4288
+ background-repeat: repeat-y;
4289
+
4290
+ background-position: left center;
4291
+
4292
+ background-size: 14px 8px
4293
+ }
4294
+
4295
+ /* display: flex;
4296
+ overflow: hidden;
4297
+ align-items: center; */
4298
+
4299
+ /* &::part(drop-container) {
4300
+ display: flex;
4301
+ flex-direction: column;
4302
+ gap: var(--qti-gap-size);
4303
+ } */
4304
+
4305
+ &::part(drop-list) {
4306
+
4307
+ display: grid;
4308
+ height: 3rem;
4309
+ min-width: 10rem;
4310
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
4311
+ center no-repeat;
4312
+ border-radius: var(--qti-border-radius);
4313
+ position: relative;
4314
+ background-color: var(--qti-bg);
4315
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4316
+ outline: none;
4317
+ }
4318
+
4319
+ &::part(drop-list):focus {
4320
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4321
+ }
4322
+
4323
+ &::part(drop-list)[dragging] {
4324
+ border-color: var(--qti-border-active);
4325
+ background-color: var(--qti-bg-active);
4326
+ }
4327
+
4328
+ /* &::part(drop-list) {
4329
+ @apply act;
4330
+ } */
4331
+ }
4332
+
4333
+ qti-graphic-order-interaction {
4334
+ & qti-hotspot-choice {
4335
+
4336
+ &:hover {
4337
+ background-color: var(--qti-hover-bg);
4338
+ }
4339
+
4340
+ &:focus {
4341
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4342
+ }
4343
+
4344
+ &:state(--checked),
4345
+ &[aria-checked='true'] {
4346
+ border-color: var(--qti-border-active);
4347
+ background-color: var(--qti-bg-active);
4348
+ }
4349
+
4350
+ &[aria-readonly='true'] {
4351
+ cursor: pointer;
4352
+ background-color: var(--qti-bg);
4353
+ outline: 0;
4354
+ border: none;
4355
+ }
4356
+
4357
+ &[aria-disabled='true'] {
4358
+ cursor: not-allowed;
4359
+ background-color: var(--qti-disabled-bg);
4360
+ color: var(--qti-disabled-color);
4361
+ border-color: var(--qti-border-color);
4362
+ outline: 4px solid var(--qti-disabled-bg);
4363
+ }
4364
+
4365
+ &[aria-ordervalue] {
4366
+ display: grid;
4367
+ place-content: center;
4368
+ }
4369
+
4370
+ &[aria-ordervalue]::after {
4371
+ content: attr(aria-ordervalue) !important;
4372
+ }
4373
+
4374
+ width: 100%;
4375
+
4376
+ height: 100%;
4377
+
4378
+ background-color: transparent;
4379
+
4380
+ padding: 0;
4381
+
4382
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4383
+
4384
+ outline: none
4385
+ }
4386
+
4387
+ &.qti-selections-light {
4388
+ &:state(--dragzone-active)::part(drags) {
4389
+ background-color: var(--qti-light-bg-active);
4390
+ border-color: var(--qti-light-border-active);
4391
+ }
4392
+
4393
+ &:state(--dragzone-enabled)::part(drags) {
4394
+ background-color: var(--qti-light-bg-active);
4395
+ }
4396
+ }
4397
+
4398
+ &.qti-selections-dark {
4399
+ &:state(--dragzone-active)::part(drags) {
4400
+ background-color: var(--qti-dark-bg-active);
4401
+ border-color: var(--qti-dark-border-active);
4402
+ }
4403
+
4404
+ &:state(--dragzone-enabled)::part(drags) {
4405
+ background-color: var(--qti-dark-bg-active);
4406
+ }
4407
+ }
4408
+
4409
+ /* General styles for active and enabled states */
4410
+ &:state(--dragzone-active)::part(drags) {
4411
+ border-color: var(--qti-border-active);
4412
+ background-color: var(--qti-bg-active);
4413
+ }
4414
+
4415
+ &:state(--dragzone-enabled)::part(drags) {
4416
+ background-color: var(--qti-bg-active);
4417
+ }
4418
+ }
4419
+
4420
+ qti-graphic-associate-interaction {
4421
+ position: relative;
4422
+ display: block;
4423
+
4424
+ & qti-associable-hotspot {
4425
+ &[shape='circle'] {
4426
+
4427
+ &:hover {
4428
+ background-color: var(--qti-hover-bg);
4429
+ }
4430
+
4431
+ &:focus {
4432
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4433
+ }
4434
+
4435
+ &[aria-checked='true'] {
4436
+ border-color: var(--qti-border-active);
4437
+ background-color: var(--qti-bg-active);
4438
+ }
4439
+
4440
+ &[aria-readonly='true'] {
4441
+ cursor: pointer;
4442
+ background-color: var(--qti-bg);
4443
+ outline: 0;
4444
+ border: none;
4445
+ }
4446
+
4447
+ &[aria-disabled='true'] {
4448
+ cursor: not-allowed;
4449
+ background-color: var(--qti-disabled-bg);
4450
+ color: var(--qti-disabled-color);
4451
+ border-color: var(--qti-border-color);
4452
+ outline: 4px solid var(--qti-disabled-bg);
4453
+ }
4454
+
4455
+ width: 100%;
4456
+
4457
+ height: 100%;
4458
+
4459
+ background-color: transparent;
4460
+
4461
+ padding: 0;
4462
+
4463
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4464
+
4465
+ outline: none
4466
+ }
4467
+
4468
+ &[shape='square'] {
4469
+
4470
+ &:hover {
4471
+ background-color: var(--qti-hover-bg);
4472
+ }
4473
+
4474
+ &:focus {
4475
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4476
+ }
4477
+
4478
+ &[aria-checked='true'] {
4479
+ border-color: var(--qti-border-active);
4480
+ background-color: var(--qti-bg-active);
4481
+ }
4482
+
4483
+ &[aria-readonly='true'] {
4484
+ cursor: pointer;
4485
+ background-color: var(--qti-bg);
4486
+ outline: 0;
4487
+ border: none;
4488
+ }
4489
+
4490
+ &[aria-disabled='true'] {
4491
+ cursor: not-allowed;
4492
+ background-color: var(--qti-disabled-bg);
4493
+ color: var(--qti-disabled-color);
4494
+ border-color: var(--qti-border-color);
4495
+ outline: 4px solid var(--qti-disabled-bg);
4496
+ }
4497
+
4498
+ width: 100%;
4499
+
4500
+ height: 100%;
4501
+
4502
+ background-color: transparent;
4503
+
4504
+ padding: 0;
4505
+
4506
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4507
+
4508
+ outline: none
4509
+ }
4510
+ }
4511
+
4512
+ &.qti-selections-light {
4513
+ &:state(--dragzone-active)::part(drags) {
4514
+ background-color: var(--qti-light-bg-active);
4515
+ border-color: var(--qti-light-border-active);
4516
+ }
4517
+
4518
+ &:state(--dragzone-enabled)::part(drags) {
4519
+ background-color: var(--qti-light-bg-active);
4520
+ }
4521
+ }
4522
+
4523
+ &.qti-selections-dark {
4524
+ &:state(--dragzone-active)::part(drags) {
4525
+ background-color: var(--qti-dark-bg-active);
4526
+ border-color: var(--qti-dark-border-active);
4527
+ }
4528
+
4529
+ &:state(--dragzone-enabled)::part(drags) {
4530
+ background-color: var(--qti-dark-bg-active);
4531
+ }
4532
+ }
4533
+
4534
+ /* General styles for active and enabled states */
4535
+ &:state(--dragzone-active)::part(drags) {
4536
+ border-color: var(--qti-border-active);
4537
+ background-color: var(--qti-bg-active);
4538
+ }
4539
+
4540
+ &:state(--dragzone-enabled)::part(drags) {
4541
+ background-color: var(--qti-bg-active);
4542
+ }
4543
+ }
4544
+
4545
+ qti-slider-interaction {
4546
+ --qti-tick-color: rgb(229 231 235 / 100%);
4547
+ --qti-tick-width: 1px;
4548
+ }
4549
+
4550
+ qti-select-point-interaction {
4551
+ &::part(point) {
4552
+ &:hover {
4553
+ background-color: var(--qti-hover-bg);
4554
+ }
4555
+
4556
+ &:focus {
4557
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4558
+ }
4559
+
4560
+ border-radius: 100%;
4561
+
4562
+ width: var(--qti-point-size);
4563
+
4564
+ height: var(--qti-point-size);
4565
+
4566
+ background-color: transparent;
4567
+
4568
+ padding: 0;
4569
+
4570
+ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4571
+
4572
+ outline: none;
4573
+ }
4574
+ }
4575
+
4576
+ qti-position-object-stage {
4577
+ & qti-position-object-interaction {
4578
+ /* no styles necessary, only layout styles, defined in the component */
4579
+ }
4580
+ }
4581
+
4582
+ qti-prompt {
4583
+ margin: 0.5rem 0; /* my-2 */
4584
+ display: block;
4585
+ width: 100%;
4586
+ }
4587
+ }
4588
+ `;
4589
+
4590
+ // src/lib/qti-test/components/test-container.ts
4591
+ var TestContainer = class extends LitElement7 {
4592
+ constructor() {
4593
+ super(...arguments);
4594
+ this.testURL = null;
4595
+ this.testDoc = null;
4596
+ this.testXML = null;
4597
+ /** Template content if provided */
4598
+ this.templateContent = null;
4599
+ }
4600
+ async handleTestURLChange() {
4601
+ if (!this.testURL) return;
4602
+ try {
4603
+ const api = await qtiTransformTest().load(this.testURL);
4604
+ this.testDoc = api.htmlDoc();
4605
+ } catch (error) {
4606
+ console.error("Error loading or parsing XML:", error);
4607
+ }
4608
+ }
4609
+ handleTestXMLChange() {
4610
+ if (!this.testXML) return;
4611
+ try {
4612
+ this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();
4613
+ } catch (error) {
4614
+ console.error("Error parsing XML:", error);
4615
+ }
4616
+ }
4617
+ async connectedCallback() {
4618
+ super.connectedCallback();
4619
+ this.initializeTemplateContent();
4620
+ this.applyStyles();
4621
+ if (this.testURL) {
4622
+ this.handleTestURLChange();
4623
+ }
4624
+ if (this.testXML) {
4625
+ this.handleTestXMLChange();
4626
+ }
4627
+ }
4628
+ initializeTemplateContent() {
4629
+ const template = this.querySelector("template");
4630
+ this.templateContent = template ? template.content : html10``;
4631
+ }
4632
+ applyStyles() {
4633
+ const sheet = new CSSStyleSheet();
4634
+ sheet.replaceSync(item_default);
4635
+ this.shadowRoot.adoptedStyleSheets = [sheet];
4636
+ }
4637
+ render() {
4638
+ return html10`
4639
+ ${this.templateContent}
4640
+ <slot></slot>
4641
+ ${until(this.testDoc, html10`<span>Loading...</span>`)}
4642
+ `;
4643
+ }
4644
+ };
4645
+ __decorateClass([
4646
+ property8({ type: String, attribute: "test-url" })
4647
+ ], TestContainer.prototype, "testURL", 2);
4648
+ __decorateClass([
4649
+ state4()
4650
+ ], TestContainer.prototype, "testDoc", 2);
4651
+ __decorateClass([
4652
+ state4()
4653
+ ], TestContainer.prototype, "testXML", 2);
4654
+ __decorateClass([
4655
+ watch("testURL", { waitUntilFirstUpdate: true })
4656
+ ], TestContainer.prototype, "handleTestURLChange", 1);
4657
+ __decorateClass([
4658
+ watch("testXML", { waitUntilFirstUpdate: true })
4659
+ ], TestContainer.prototype, "handleTestXMLChange", 1);
4660
+ TestContainer = __decorateClass([
4661
+ customElement8("test-container")
4662
+ ], TestContainer);
4663
+
4664
+ // src/lib/qti-test/components/test-paging-buttons-stamp.ts
4665
+ import { html as html11 } from "lit";
4666
+ import { customElement as customElement9, property as property9 } from "lit/decorators.js";
4667
+ import { prepareTemplate } from "stampino";
4668
+ var TestPagingButtonsStamp = class extends TestComponent {
4669
+ constructor() {
4670
+ super();
4671
+ this.maxDisplayedItems = 2;
4672
+ this.skipOnCategory = "dep-informational";
4673
+ this._internals.ariaLabel = "pagination";
4674
+ }
4675
+ createRenderRoot() {
4676
+ return this;
4677
+ }
4678
+ render() {
4679
+ const items = this._testContext.items.reduce(
4680
+ (acc, item) => {
4681
+ const isDepInfoItem = item.category?.split(" ").includes(this.skipOnCategory);
4682
+ const newIndex = isDepInfoItem ? "i" : acc.counter++;
4683
+ acc.result.push({
4684
+ ...item,
4685
+ newIndex
4686
+ // Assign the new index, which only increments for non-info items
4687
+ });
4688
+ return acc;
4689
+ },
4690
+ { counter: 0, result: [] }
4691
+ ).result;
4692
+ const itemIndex = items.findIndex((item) => item.identifier === this._testContext.navItemId);
4693
+ const start = Math.max(0, itemIndex - this.maxDisplayedItems);
4694
+ const end = Math.min(items.length, itemIndex + this.maxDisplayedItems + 1);
4695
+ const clampedItems = items.slice(start, end);
4696
+ return html11`
4697
+ ${clampedItems.map((item) => {
4698
+ const rawscore = item.variables.find((vr) => vr.identifier == "SCORE");
4699
+ const score = parseInt(rawscore?.value?.toString());
4700
+ const completionStatus = item.variables.find((v) => v.identifier === "completionStatus")?.value;
4701
+ const type = item.category !== this.skipOnCategory ? "regular" : "info";
4702
+ const active = this._testContext.navItemId === item.identifier;
4703
+ const correct = this._testContext.view === "scorer" && type == "regular" && score !== void 0 && !isNaN(score) && score > 0;
4704
+ const incorrect = this._testContext.view === "scorer" && type == "regular" && score !== void 0 && !isNaN(score) && score <= 0;
4705
+ const answered = this._testContext.view === "candidate" && completionStatus === "completed" && item.category !== this.skipOnCategory;
4706
+ const computedItem = {
4707
+ ...item,
4708
+ type,
4709
+ active,
4710
+ correct,
4711
+ incorrect,
4712
+ answered
4713
+ };
4714
+ const templateElement = this.firstElementChild;
4715
+ const myTemplate = prepareTemplate(templateElement);
4716
+ return myTemplate({ item: computedItem });
4717
+ })}
4718
+ `;
4719
+ }
4720
+ };
4721
+ __decorateClass([
4722
+ property9({ type: Number, attribute: "max-displayed-items" })
4723
+ ], TestPagingButtonsStamp.prototype, "maxDisplayedItems", 2);
4724
+ __decorateClass([
4725
+ property9({ type: String, attribute: "skip-on-category" })
4726
+ ], TestPagingButtonsStamp.prototype, "skipOnCategory", 2);
4727
+ TestPagingButtonsStamp = __decorateClass([
4728
+ customElement9("test-paging-buttons-stamp")
4729
+ ], TestPagingButtonsStamp);
4730
+ export {
4731
+ QtiAssessmentItemRef,
4732
+ QtiAssessmentSection,
4733
+ QtiAssessmentTest,
4734
+ QtiTest,
4735
+ QtiTestPart,
4736
+ TestComponent,
4737
+ TestContainer,
4738
+ TestItemLink,
4739
+ TestNext,
4740
+ TestPagingButtonsStamp,
4741
+ TestPrev,
4742
+ TestView,
4743
+ testContext,
4744
+ testElement
4745
+ };
4746
+ //# sourceMappingURL=index.js.map