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