@citolab/qti-components 7.3.0 → 7.3.2
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.
- package/cdn/chunks/chunk-2F7QLIQX.js +2 -0
- package/cdn/chunks/chunk-2TNA4LAA.js +5 -0
- package/cdn/chunks/chunk-3KGTXIVH.js +8 -0
- package/cdn/chunks/chunk-3XOKPK45.js +2 -0
- package/cdn/chunks/chunk-42P7F3FC.js +73 -0
- package/cdn/chunks/chunk-4DVWMPIY.js +1 -0
- package/cdn/chunks/chunk-4HPXSOYI.js +8 -0
- package/cdn/chunks/chunk-4NRLYCX4.js +1 -0
- package/cdn/chunks/chunk-57WZEH27.js +8 -0
- package/cdn/chunks/chunk-5EXLLJZQ.js +1 -0
- package/cdn/chunks/chunk-5F23N5NY.js +1 -0
- package/cdn/chunks/chunk-5PA3GEIX.js +2 -0
- package/cdn/chunks/chunk-5TWGFLOQ.js +8 -0
- package/cdn/chunks/chunk-65CZNGQC.js +55 -0
- package/cdn/chunks/chunk-65EW446C.js +6 -0
- package/cdn/chunks/chunk-6BGG2JJR.js +24 -0
- package/cdn/chunks/chunk-6IUESNBB.js +8 -0
- package/cdn/chunks/chunk-6K2ZYRFF.js +8 -0
- package/cdn/chunks/chunk-774W6MHT.js +8 -0
- package/cdn/chunks/chunk-7Q4OOYXA.js +1 -0
- package/cdn/chunks/chunk-7VGFTHNK.js +1492 -0
- package/cdn/chunks/chunk-7WJYJA45.js +59 -0
- package/cdn/chunks/chunk-AA47N7CH.js +1 -0
- package/cdn/chunks/chunk-AEDTBA25.js +1 -0
- package/cdn/chunks/chunk-AZLSV74C.js +8 -0
- package/cdn/chunks/chunk-BB7HFL7K.js +1 -0
- package/cdn/chunks/chunk-BMOQZEO2.js +1 -0
- package/cdn/chunks/chunk-C26NWYVO.js +2 -0
- package/cdn/chunks/chunk-CIIKVJF7.js +2 -0
- package/cdn/chunks/chunk-CMGZUMGV.js +2 -0
- package/cdn/chunks/chunk-D4A6UBNV.js +41 -0
- package/cdn/chunks/chunk-DCSFLPLR.js +8 -0
- package/cdn/chunks/chunk-DDA3QNFL.js +1 -0
- package/cdn/chunks/chunk-DEWOG57H.js +1 -0
- package/cdn/chunks/chunk-DHC7PAPQ.js +8 -0
- package/cdn/chunks/chunk-DNY4M5BB.js +8 -0
- package/cdn/chunks/chunk-DPR3I67K.js +1 -0
- package/cdn/chunks/chunk-DQTXWGN5.js +48 -0
- package/cdn/chunks/chunk-DTLI3JJ6.js +8 -0
- package/cdn/chunks/chunk-DZTNCG5K.js +2 -0
- package/cdn/chunks/chunk-E46WIJKQ.js +5 -0
- package/cdn/chunks/chunk-ER2TCZX3.js +8 -0
- package/cdn/chunks/chunk-EVDUKDZH.js +1 -0
- package/cdn/chunks/chunk-EWRXIRZJ.js +8 -0
- package/cdn/chunks/chunk-EZJSKOLP.js +5 -0
- package/cdn/chunks/chunk-F6VI7SEZ.js +5 -0
- package/cdn/chunks/chunk-FGR3JZXL.js +48 -0
- package/cdn/chunks/chunk-FREEF447.js +2 -0
- package/cdn/chunks/chunk-G66B3SKF.js +2 -0
- package/cdn/chunks/chunk-GFVOBN7D.js +8 -0
- package/cdn/chunks/chunk-GOXH3AYH.js +5 -0
- package/cdn/chunks/chunk-GVKNKCU6.js +1492 -0
- package/cdn/chunks/chunk-H3WTP2FL.js +2 -0
- package/cdn/chunks/chunk-HE62L5UT.js +1 -0
- package/cdn/chunks/chunk-HH6AFB54.js +1492 -0
- package/cdn/chunks/chunk-IEHCQ5EK.js +2 -0
- package/cdn/chunks/chunk-IEOQ2ZTN.js +3461 -0
- package/cdn/chunks/chunk-IPAFN4CK.js +1 -0
- package/cdn/chunks/chunk-JHBAY3L2.js +8 -0
- package/cdn/chunks/chunk-JKUNDLQR.js +1 -0
- package/cdn/chunks/chunk-KLXWDMHE.js +1 -0
- package/cdn/chunks/chunk-KP5NLKZ5.js +1 -0
- package/cdn/chunks/chunk-KXXIBL5Z.js +8 -0
- package/cdn/chunks/chunk-LBB5CUEL.js +8 -0
- package/cdn/chunks/chunk-LHAF7DPW.js +2 -0
- package/cdn/chunks/chunk-LUNOUEBJ.js +8 -0
- package/cdn/chunks/chunk-M3RRG6KY.js +1 -0
- package/cdn/chunks/chunk-M4LLTEOD.js +8 -0
- package/cdn/chunks/chunk-MH2Z24XO.js +1 -0
- package/cdn/chunks/chunk-N3YBYEEI.js +2 -0
- package/cdn/chunks/chunk-N5BGKNYJ.js +5 -0
- package/cdn/chunks/chunk-NPVEQKUL.js +2 -0
- package/cdn/chunks/chunk-ODMQDF6O.js +1 -0
- package/cdn/chunks/chunk-OW2KBDBG.js +8 -0
- package/cdn/chunks/chunk-PQJD55CB.js +8 -0
- package/cdn/chunks/chunk-PUI3LIFH.js +0 -0
- package/cdn/chunks/chunk-QHO7IBHQ.js +2 -0
- package/cdn/chunks/chunk-QTTXN3LY.js +2 -0
- package/cdn/chunks/chunk-RQHP2XKF.js +8 -0
- package/cdn/chunks/chunk-RUQA3BBO.js +8 -0
- package/cdn/chunks/chunk-RZGOUINM.js +1 -0
- package/cdn/chunks/chunk-SAXGGMLU.js +8 -0
- package/cdn/chunks/chunk-SDSLRCON.js +1 -0
- package/cdn/chunks/chunk-SDWXKOZK.js +8 -0
- package/cdn/chunks/chunk-T4K75PFT.js +1 -0
- package/cdn/chunks/chunk-TC54XTRL.js +17 -0
- package/cdn/chunks/chunk-TDS4LYUD.js +8 -0
- package/cdn/chunks/chunk-U5Y5T4ZS.js +17 -0
- package/cdn/chunks/chunk-U7DWV6B3.js +5 -0
- package/cdn/chunks/chunk-UB5MEEVK.js +8 -0
- package/cdn/chunks/chunk-UN2WT4WS.js +2 -0
- package/cdn/chunks/chunk-UU5PAEUU.js +1 -0
- package/cdn/chunks/chunk-UX37G5GZ.js +8 -0
- package/cdn/chunks/chunk-UZYJ2YET.js +1 -0
- package/cdn/chunks/chunk-VGNWADCN.js +1 -0
- package/cdn/chunks/chunk-VXQNVDBK.js +1 -0
- package/cdn/chunks/chunk-W6GUPXZV.js +1492 -0
- package/cdn/chunks/chunk-WC5YAZM2.js +5 -0
- package/cdn/chunks/chunk-WLTLNYTT.js +8 -0
- package/cdn/chunks/chunk-WNRGD6XK.js +1 -0
- package/cdn/chunks/chunk-X6XQ42NC.js +1 -0
- package/cdn/chunks/chunk-X6XRXEW2.js +2 -0
- package/cdn/chunks/chunk-XB37N5IN.js +1 -0
- package/cdn/chunks/chunk-XCXGSLM4.js +2 -0
- package/cdn/chunks/chunk-XFUCW4CT.js +5 -0
- package/cdn/chunks/chunk-XQIN4PIX.js +10 -0
- package/cdn/chunks/chunk-XY3YXM26.js +8 -0
- package/cdn/chunks/chunk-YGJSWINU.js +1 -0
- package/cdn/chunks/chunk-YXM5LVFL.js +1 -0
- package/cdn/chunks/chunk-YXZ773BI.js +1 -0
- package/cdn/chunks/chunk-YZCE7WOL.js +1 -0
- package/cdn/chunks/chunk-ZJK77QYF.js +8 -0
- package/cdn/chunks/chunk-ZSLIH67U.js +1 -0
- package/cdn/exports/computed-item.context.js +1 -1
- package/cdn/exports/computed.context.js +1 -1
- package/cdn/exports/config.context.js +1 -1
- package/cdn/exports/interaction.js +1 -1
- package/cdn/exports/qti-assessment-item.context.js +1 -1
- package/cdn/exports/qti-condition-expression.js +1 -1
- package/cdn/exports/qti-expression.js +1 -1
- package/cdn/exports/session.context.js +1 -1
- package/cdn/exports/test.context.js +1 -1
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +1 -1
- package/cdn/qti-components/index.js +1 -1
- package/cdn/qti-item/components/item-container.js +1 -1
- package/cdn/qti-item/components/item-show-correct-response.js +1 -1
- package/cdn/qti-item/components/print-item-variables.js +1 -1
- package/cdn/qti-item/components/styles.js +1 -1
- package/cdn/qti-item/core/index.js +1 -1
- package/cdn/qti-test/components/index.js +1 -1
- package/cdn/qti-test/components/styles.js +1 -1
- package/cdn/qti-test/components/test-check-item.js +1 -0
- package/cdn/qti-test/components/test-container.js +1 -1
- package/cdn/qti-test/components/test-end-attempt.js +1 -1
- package/cdn/qti-test/components/test-item-link.js +1 -1
- package/cdn/qti-test/components/test-navigation.js +1 -1
- package/cdn/qti-test/components/test-next.js +1 -1
- package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -1
- package/cdn/qti-test/components/test-prev.js +1 -1
- package/cdn/qti-test/components/test-print-context.js +1 -1
- package/cdn/qti-test/components/test-print-item-variables.js +1 -1
- package/cdn/qti-test/components/test-scoring-buttons.js +1 -1
- package/cdn/qti-test/components/test-scoring-feedback.js +1 -1
- package/cdn/qti-test/components/test-section-buttons-stamp.js +1 -1
- package/cdn/qti-test/components/test-section-link.js +1 -1
- package/cdn/qti-test/components/test-show-correct-response.js +1 -1
- package/cdn/qti-test/components/test-stamp.js +1 -1
- package/cdn/qti-test/components/test-view-toggle.js +1 -1
- package/cdn/qti-test/components/test-view.js +1 -1
- package/cdn/qti-test/core/index.js +1 -1
- package/dist/chunks/chunk-24ZEUR6V.js +91 -0
- package/dist/chunks/chunk-24ZEUR6V.js.map +1 -0
- package/dist/chunks/chunk-25SPL2N7.js +296 -0
- package/dist/chunks/chunk-25SPL2N7.js.map +1 -0
- package/dist/chunks/chunk-2L6I23IQ.js +308 -0
- package/dist/chunks/chunk-2L6I23IQ.js.map +1 -0
- package/dist/chunks/chunk-3FIHHFFC.js +307 -0
- package/dist/chunks/chunk-3FIHHFFC.js.map +1 -0
- package/dist/chunks/chunk-3IAZELYI.js +90 -0
- package/dist/chunks/chunk-3IAZELYI.js.map +1 -0
- package/dist/chunks/chunk-3YJPKRFS.js +91 -0
- package/dist/chunks/chunk-3YJPKRFS.js.map +1 -0
- package/dist/chunks/chunk-5AZFPSD4.js +87 -0
- package/dist/chunks/chunk-5AZFPSD4.js.map +1 -0
- package/dist/chunks/chunk-5OZP32ZZ.js +90 -0
- package/dist/chunks/chunk-5OZP32ZZ.js.map +1 -0
- package/dist/chunks/chunk-5QGG5BMS.js +45 -0
- package/dist/chunks/chunk-5QGG5BMS.js.map +1 -0
- package/dist/chunks/chunk-5SU6S5L4.js +94 -0
- package/dist/chunks/chunk-5SU6S5L4.js.map +1 -0
- package/dist/chunks/chunk-5WHKITF6.js +90 -0
- package/dist/chunks/chunk-5WHKITF6.js.map +1 -0
- package/dist/chunks/chunk-64JRMFTB.js +93 -0
- package/dist/chunks/chunk-64JRMFTB.js.map +1 -0
- package/dist/chunks/chunk-6BNGNEZW.js +308 -0
- package/dist/chunks/chunk-6BNGNEZW.js.map +1 -0
- package/dist/chunks/chunk-6DMR7L77.js +44 -0
- package/dist/chunks/chunk-6DMR7L77.js.map +1 -0
- package/dist/chunks/chunk-6N4WVDBR.js +95 -0
- package/dist/chunks/chunk-6N4WVDBR.js.map +1 -0
- package/dist/chunks/chunk-6SGCKTJ6.js +88 -0
- package/dist/chunks/chunk-6SGCKTJ6.js.map +1 -0
- package/dist/chunks/chunk-6U3U2UIA.js +887 -0
- package/dist/chunks/chunk-6U3U2UIA.js.map +1 -0
- package/dist/chunks/chunk-745MFIEL.js +238 -0
- package/dist/chunks/chunk-745MFIEL.js.map +1 -0
- package/dist/chunks/chunk-7NNYV6VG.js +95 -0
- package/dist/chunks/chunk-7NNYV6VG.js.map +1 -0
- package/dist/chunks/chunk-7OMJMXHK.js +50 -0
- package/dist/chunks/chunk-7OMJMXHK.js.map +1 -0
- package/dist/chunks/chunk-7YI2I5U2.js +238 -0
- package/dist/chunks/chunk-7YI2I5U2.js.map +1 -0
- package/dist/chunks/chunk-AOXSRF6N.js +7309 -0
- package/dist/chunks/chunk-AOXSRF6N.js.map +1 -0
- package/dist/chunks/chunk-B7BLTXGS.js +88 -0
- package/dist/chunks/chunk-B7BLTXGS.js.map +1 -0
- package/dist/chunks/chunk-BI3RICFC.js +300 -0
- package/dist/chunks/chunk-BI3RICFC.js.map +1 -0
- package/dist/chunks/chunk-BTZQDUT6.js +44 -0
- package/dist/chunks/chunk-BTZQDUT6.js.map +1 -0
- package/dist/chunks/chunk-CTPQMLOA.js +88 -0
- package/dist/chunks/chunk-CTPQMLOA.js.map +1 -0
- package/dist/chunks/chunk-DGPPAIBY.js +307 -0
- package/dist/chunks/chunk-DGPPAIBY.js.map +1 -0
- package/dist/chunks/chunk-DJ7XZ2UR.js +91 -0
- package/dist/chunks/chunk-DJ7XZ2UR.js.map +1 -0
- package/dist/chunks/chunk-DLCEFRYR.js +887 -0
- package/dist/chunks/chunk-DLCEFRYR.js.map +1 -0
- package/dist/chunks/chunk-DLVJXJLB.js +90 -0
- package/dist/chunks/chunk-DLVJXJLB.js.map +1 -0
- package/dist/chunks/chunk-EVOMGJVT.js +95 -0
- package/dist/chunks/chunk-EVOMGJVT.js.map +1 -0
- package/dist/chunks/chunk-EYWDGFIX.js +89 -0
- package/dist/chunks/chunk-EYWDGFIX.js.map +1 -0
- package/dist/chunks/chunk-F5OPIJ4X.js +90 -0
- package/dist/chunks/chunk-F5OPIJ4X.js.map +1 -0
- package/dist/chunks/chunk-FEXZ676E.js +304 -0
- package/dist/chunks/chunk-FEXZ676E.js.map +1 -0
- package/dist/chunks/chunk-FH34FO6K.js +238 -0
- package/dist/chunks/chunk-FH34FO6K.js.map +1 -0
- package/dist/chunks/chunk-FIAJJAPH.js +85 -0
- package/dist/chunks/chunk-FIAJJAPH.js.map +1 -0
- package/dist/chunks/chunk-FQVFSQFE.js +238 -0
- package/dist/chunks/chunk-FQVFSQFE.js.map +1 -0
- package/dist/chunks/chunk-G3M2356A.js +889 -0
- package/dist/chunks/chunk-G3M2356A.js.map +1 -0
- package/dist/chunks/chunk-GA2EWU3T.js +102 -0
- package/dist/chunks/chunk-GA2EWU3T.js.map +1 -0
- package/dist/chunks/chunk-GEEYD5SH.js +7310 -0
- package/dist/chunks/chunk-GEEYD5SH.js.map +1 -0
- package/dist/chunks/chunk-GIHLVK5S.js +103 -0
- package/dist/chunks/chunk-GIHLVK5S.js.map +1 -0
- package/dist/chunks/chunk-GV4LNJKM.js +248 -0
- package/dist/chunks/chunk-GV4LNJKM.js.map +1 -0
- package/dist/chunks/chunk-H2HBYOZZ.js +90 -0
- package/dist/chunks/chunk-H2HBYOZZ.js.map +1 -0
- package/dist/chunks/chunk-H6RDLSTK.js +87 -0
- package/dist/chunks/chunk-H6RDLSTK.js.map +1 -0
- package/dist/chunks/chunk-HIFFHC2Z.js +887 -0
- package/dist/chunks/chunk-HIFFHC2Z.js.map +1 -0
- package/dist/chunks/chunk-HUQGTGCK.js +91 -0
- package/dist/chunks/chunk-HUQGTGCK.js.map +1 -0
- package/dist/chunks/chunk-IAZM2LUL.js +87 -0
- package/dist/chunks/chunk-IAZM2LUL.js.map +1 -0
- package/dist/chunks/chunk-IDRQNT6W.js +86 -0
- package/dist/chunks/chunk-IDRQNT6W.js.map +1 -0
- package/dist/chunks/chunk-IRKYNGZN.js +90 -0
- package/dist/chunks/chunk-IRKYNGZN.js.map +1 -0
- package/dist/chunks/chunk-IWQR5TSB.js +43 -0
- package/dist/chunks/chunk-IWQR5TSB.js.map +1 -0
- package/dist/chunks/chunk-J4RNYEIE.js +85 -0
- package/dist/chunks/chunk-J4RNYEIE.js.map +1 -0
- package/dist/chunks/chunk-K5F4CT37.js +82 -0
- package/dist/chunks/chunk-K5F4CT37.js.map +1 -0
- package/dist/chunks/chunk-L7HOSFNE.js +307 -0
- package/dist/chunks/chunk-L7HOSFNE.js.map +1 -0
- package/dist/chunks/chunk-LBL5YIK7.js +94 -0
- package/dist/chunks/chunk-LBL5YIK7.js.map +1 -0
- package/dist/chunks/chunk-MGC6UY5C.js +85 -0
- package/dist/chunks/chunk-MGC6UY5C.js.map +1 -0
- package/dist/chunks/chunk-MK5KU4FM.js +7303 -0
- package/dist/chunks/chunk-MK5KU4FM.js.map +1 -0
- package/dist/chunks/chunk-MKPVFZUH.js +88 -0
- package/dist/chunks/chunk-MKPVFZUH.js.map +1 -0
- package/dist/chunks/chunk-MTWSJYVA.js +86 -0
- package/dist/chunks/chunk-MTWSJYVA.js.map +1 -0
- package/dist/chunks/chunk-NJTIAZBT.js +236 -0
- package/dist/chunks/chunk-NJTIAZBT.js.map +1 -0
- package/dist/chunks/chunk-O2AQND3R.js +889 -0
- package/dist/chunks/chunk-O2AQND3R.js.map +1 -0
- package/dist/chunks/chunk-O2SG4LAF.js +294 -0
- package/dist/chunks/chunk-O2SG4LAF.js.map +1 -0
- package/dist/chunks/chunk-POGGEBHU.js +294 -0
- package/dist/chunks/chunk-POGGEBHU.js.map +1 -0
- package/dist/chunks/chunk-PRO3U224.js +91 -0
- package/dist/chunks/chunk-PRO3U224.js.map +1 -0
- package/dist/chunks/chunk-PWLZEXO4.js +89 -0
- package/dist/chunks/chunk-PWLZEXO4.js.map +1 -0
- package/dist/chunks/chunk-Q7Q24WJK.js +227 -0
- package/dist/chunks/chunk-Q7Q24WJK.js.map +1 -0
- package/dist/chunks/chunk-QBRVWBMH.js +230 -0
- package/dist/chunks/chunk-QBRVWBMH.js.map +1 -0
- package/dist/chunks/chunk-R5EYCFY4.js +91 -0
- package/dist/chunks/chunk-R5EYCFY4.js.map +1 -0
- package/dist/chunks/chunk-RHXLL5D3.js +264 -0
- package/dist/chunks/chunk-RHXLL5D3.js.map +1 -0
- package/dist/chunks/chunk-SGNRQWTB.js +887 -0
- package/dist/chunks/chunk-SGNRQWTB.js.map +1 -0
- package/dist/chunks/chunk-SOKWNLL4.js +89 -0
- package/dist/chunks/chunk-SOKWNLL4.js.map +1 -0
- package/dist/chunks/chunk-TWYN56XO.js +92 -0
- package/dist/chunks/chunk-TWYN56XO.js.map +1 -0
- package/dist/chunks/chunk-U2662SPQ.js +887 -0
- package/dist/chunks/chunk-U2662SPQ.js.map +1 -0
- package/dist/chunks/chunk-UNYT7ZNM.js +85 -0
- package/dist/chunks/chunk-UNYT7ZNM.js.map +1 -0
- package/dist/chunks/chunk-UUZFQW3D.js +889 -0
- package/dist/chunks/chunk-UUZFQW3D.js.map +1 -0
- package/dist/chunks/chunk-VIBFS7K3.js +229 -0
- package/dist/chunks/chunk-VIBFS7K3.js.map +1 -0
- package/dist/chunks/chunk-VVPQCJL6.js +264 -0
- package/dist/chunks/chunk-VVPQCJL6.js.map +1 -0
- package/dist/chunks/chunk-VY73H2OD.js +238 -0
- package/dist/chunks/chunk-VY73H2OD.js.map +1 -0
- package/dist/chunks/chunk-W7DAMVVM.js +90 -0
- package/dist/chunks/chunk-W7DAMVVM.js.map +1 -0
- package/dist/chunks/chunk-WTV3RW6F.js +91 -0
- package/dist/chunks/chunk-WTV3RW6F.js.map +1 -0
- package/dist/chunks/chunk-XB2AUIYM.js +232 -0
- package/dist/chunks/chunk-XB2AUIYM.js.map +1 -0
- package/dist/chunks/chunk-XBJQTK4U.js +91 -0
- package/dist/chunks/chunk-XBJQTK4U.js.map +1 -0
- package/dist/chunks/chunk-XH6AMJFY.js +238 -0
- package/dist/chunks/chunk-XH6AMJFY.js.map +1 -0
- package/dist/chunks/chunk-XNQ4ARRB.js +90 -0
- package/dist/chunks/chunk-XNQ4ARRB.js.map +1 -0
- package/dist/chunks/chunk-Y5S4XHSH.js +133 -0
- package/dist/chunks/chunk-Y5S4XHSH.js.map +1 -0
- package/dist/chunks/chunk-YC72WJT5.js +88 -0
- package/dist/chunks/chunk-YC72WJT5.js.map +1 -0
- package/dist/chunks/chunk-YMQNOCS2.js +246 -0
- package/dist/chunks/chunk-YMQNOCS2.js.map +1 -0
- package/dist/chunks/chunk-Z6EJ36PR.js +307 -0
- package/dist/chunks/chunk-Z6EJ36PR.js.map +1 -0
- package/dist/chunks/chunk-ZEEFMPDJ.js +238 -0
- package/dist/chunks/chunk-ZEEFMPDJ.js.map +1 -0
- package/dist/chunks/chunk-ZGSNDSK3.js +1 -0
- package/dist/chunks/chunk-ZGSNDSK3.js.map +1 -0
- package/dist/chunks/chunk-ZLULX3V3.js +264 -0
- package/dist/chunks/chunk-ZLULX3V3.js.map +1 -0
- package/dist/chunks/chunk-ZO6ZTWFN.js +99 -0
- package/dist/chunks/chunk-ZO6ZTWFN.js.map +1 -0
- package/dist/chunks/chunk-ZSAPTO2I.js +85 -0
- package/dist/chunks/chunk-ZSAPTO2I.js.map +1 -0
- package/dist/chunks/chunk-ZW6ND3PL.js +307 -0
- package/dist/chunks/chunk-ZW6ND3PL.js.map +1 -0
- package/dist/exports/computed-item.context.d.ts +1 -1
- package/dist/exports/computed.context.d.ts +2 -2
- package/dist/exports/interaction.d.ts +1 -1
- package/dist/exports/item.context.d.ts +1 -1
- package/dist/exports/qti-assessment-item.context.d.ts +1 -1
- package/dist/exports/qti-condition-expression.d.ts +1 -1
- package/dist/exports/qti-expression.d.ts +1 -1
- package/dist/exports/session.context.d.ts +2 -2
- package/dist/exports/test.context.d.ts +1 -1
- package/dist/exports/variables.d.ts +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +19 -16
- package/dist/qti-components/index.d.ts +2 -2
- package/dist/qti-components/index.js +1 -1
- package/dist/qti-components-jsx.d.ts +63 -18
- package/dist/qti-item/components/item-show-correct-response.d.ts +1 -1
- package/dist/qti-item/components/print-item-variables.d.ts +1 -1
- package/dist/qti-item/core/index.d.ts +1 -1
- package/dist/qti-loader/index.d.ts +1 -1
- package/dist/qti-response-declaration-0TYT5oEz.d.ts +1171 -0
- package/dist/qti-response-declaration-B0WM2iOU.d.ts +1113 -0
- package/dist/qti-response-declaration-tkYP2TfV.d.ts +1112 -0
- package/dist/qti-response-declaration-y-C5AMTr.d.ts +1115 -0
- package/dist/qti-test/components/index.d.ts +3 -2
- package/dist/qti-test/components/index.js +17 -14
- package/dist/qti-test/components/test-check-item.d.ts +16 -0
- package/dist/qti-test/components/test-check-item.js +9 -0
- package/dist/qti-test/components/test-check-item.js.map +1 -0
- package/dist/qti-test/components/test-navigation.d.ts +2 -2
- package/dist/qti-test/components/test-navigation.js +1 -1
- package/dist/qti-test/components/test-next.d.ts +2 -3
- package/dist/qti-test/components/test-next.js +1 -4
- package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +3 -0
- package/dist/qti-test/components/test-paging-buttons-stamp.js +1 -1
- package/dist/qti-test/components/test-prev.d.ts +2 -2
- package/dist/qti-test/components/test-prev.js +1 -2
- package/dist/qti-test/components/test-print-context.d.ts +2 -2
- package/dist/qti-test/components/test-print-item-variables.d.ts +2 -2
- package/dist/qti-test/components/test-scoring-buttons.d.ts +2 -2
- package/dist/qti-test/components/test-scoring-buttons.js +1 -1
- package/dist/qti-test/components/test-scoring-feedback.d.ts +2 -2
- package/dist/qti-test/components/test-section-buttons-stamp.d.ts +3 -0
- package/dist/qti-test/components/test-section-buttons-stamp.js +1 -1
- package/dist/qti-test/components/test-show-correct-response.d.ts +5 -2
- package/dist/qti-test/components/test-show-correct-response.js +1 -1
- package/dist/qti-test/components/test-stamp.d.ts +8 -2
- package/dist/qti-test/components/test-stamp.js +1 -1
- package/dist/qti-test/core/index.d.ts +4 -3
- package/dist/qti-test/core/index.js +2 -2
- package/dist/qti-test-feedback-Bth3dOO1.d.ts +85 -0
- package/dist/qti-test-feedback-C6Z0bJMR.d.ts +85 -0
- package/dist/qti-test-feedback-CcyKpmkY.d.ts +85 -0
- package/dist/qti-test-feedback-D8AwiYTL.d.ts +85 -0
- package/dist/vscode.html-custom-data.json +30 -13
- package/package.json +6 -5
- package/readme.md +4 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-AZIKAG7K.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-stamp.ts
|
|
9
|
+
import { html, LitElement, nothing } from "lit";
|
|
10
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
11
|
+
import { prepareTemplate } from "stampino";
|
|
12
|
+
import { consume } from "@lit/context";
|
|
13
|
+
var TestStamp = class extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.debug = false;
|
|
17
|
+
this.stampContext = {
|
|
18
|
+
view: "candidate",
|
|
19
|
+
activeItem: {},
|
|
20
|
+
activeSection: {
|
|
21
|
+
items: []
|
|
22
|
+
},
|
|
23
|
+
activeTestpart: {
|
|
24
|
+
items: []
|
|
25
|
+
},
|
|
26
|
+
test: {}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
createRenderRoot() {
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
const templateElement = this.querySelector("template");
|
|
35
|
+
if (!templateElement) {
|
|
36
|
+
this.myTemplate = null;
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.myTemplate = prepareTemplate(templateElement);
|
|
40
|
+
}
|
|
41
|
+
willUpdate(_changedProperties) {
|
|
42
|
+
if (!this.computedContext) {
|
|
43
|
+
this.stampContext = null;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const activeTestPart = this.computedContext.testParts.find((testPart) => testPart.active);
|
|
47
|
+
const activeSection = activeTestPart?.sections.find((section) => section.active);
|
|
48
|
+
const activeItem = activeSection?.items.find((item) => item.active);
|
|
49
|
+
const { variables, ...augmentedItem } = activeItem || {};
|
|
50
|
+
const augmentedTestPart = {
|
|
51
|
+
...activeTestPart,
|
|
52
|
+
items: activeTestPart.sections.flatMap((section) => section.items.map(({ variables: variables2, ...rest }) => rest)),
|
|
53
|
+
sections: activeTestPart.sections.map((section) => ({
|
|
54
|
+
...section,
|
|
55
|
+
items: section.items.map(({ variables: variables2, ...rest }) => rest)
|
|
56
|
+
}))
|
|
57
|
+
};
|
|
58
|
+
const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables: variables2, ...rest }) => rest) };
|
|
59
|
+
const { testParts, ...activeTest } = this.computedContext;
|
|
60
|
+
this.stampContext = {
|
|
61
|
+
view: this.computedContext.view,
|
|
62
|
+
activeItem: augmentedItem,
|
|
63
|
+
activeSection: augmentedSection,
|
|
64
|
+
activeTestpart: augmentedTestPart,
|
|
65
|
+
test: activeTest
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}
|
|
70
|
+
${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
__decorateClass([
|
|
74
|
+
property({ type: Boolean, reflect: true })
|
|
75
|
+
], TestStamp.prototype, "debug", 2);
|
|
76
|
+
__decorateClass([
|
|
77
|
+
state(),
|
|
78
|
+
consume({ context: computedContext, subscribe: true })
|
|
79
|
+
], TestStamp.prototype, "computedContext", 2);
|
|
80
|
+
__decorateClass([
|
|
81
|
+
state()
|
|
82
|
+
], TestStamp.prototype, "stampContext", 2);
|
|
83
|
+
TestStamp = __decorateClass([
|
|
84
|
+
customElement("test-stamp")
|
|
85
|
+
], TestStamp);
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
TestStamp
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=chunk-5OZP32ZZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-stamp.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { View } from '../core/mixins/test-view.mixin';\nimport type { PropertyValues } from 'lit';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n/**\n * A custom web component that renders a test stamp using the Lit framework.\n * This component is deprecated and will be removed in the future.\n * @customElement\n * @extends {LitElement}\n */\n@customElement('test-stamp')\nexport class TestStamp extends LitElement {\n /**\n * Indicates whether the component is in debug mode.\n * When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.\n */\n @property({ type: Boolean, reflect: true })\n public debug = false;\n\n @state()\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n @state()\n private stampContext: {\n view?: View;\n test?: unknown;\n activeTestpart?: unknown;\n activeSection?: unknown;\n activeItem?: unknown;\n } = {\n view: 'candidate',\n activeItem: {},\n activeSection: {\n items: []\n },\n activeTestpart: {\n items: []\n },\n test: {}\n };\n\n myTemplate: TemplateFunction;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) {\n this.stampContext = null;\n return;\n }\n const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n const activeSection = activeTestPart?.sections.find(section => section.active);\n const activeItem = activeSection?.items.find(item => item.active);\n const { variables, ...augmentedItem } = activeItem || {};\n\n const augmentedTestPart = {\n ...activeTestPart,\n items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n sections: activeTestPart.sections.map(section => ({\n ...section,\n items: section.items.map(({ variables, ...rest }) => rest)\n }))\n };\n\n const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables, ...rest }) => rest) };\n const { testParts, ...activeTest } = this.computedContext;\n\n this.stampContext = {\n view: this.computedContext.view,\n activeItem: augmentedItem,\n activeSection: augmentedSection,\n activeTestpart: augmentedTestPart,\n test: activeTest\n };\n }\n\n render() {\n // if (!this.stampContext) return nothing;\n return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}\n ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-stamp': TestStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,uBAAuB;AAChC,SAAS,eA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I,CAAC,EAAE,WAAAA,YAAW,GAAG,KAAK,MAAM,IAAI,EAAE;AAC9G,UAAM,EAAE,WAAW,GAAG,WAAW,IAAI,KAAK;AAE1C,SAAK,eAAe;AAAA,MAClB,MAAM,KAAK,gBAAgB;AAAA,MAC3B,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,SAAS;AAEP,WAAO,QAAQ,KAAK,QAAQ,mBAAmB,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC,CAAC,mBAAmB,OAAO;AAAA,MACjH,KAAK,aAAa,KAAK,WAAW,KAAK,YAAY,IAAI,OAAO;AAAA,EAClE;AACF;AA7ES;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAL/B,UAMJ;AAIC;AAAA,EAFP,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAT3C,UAUH;AAGA;AAAA,EADP,MAAM;AAAA,GAZI,UAaH;AAbG,YAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":["variables"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-AZIKAG7K.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-paging-buttons-stamp.ts
|
|
9
|
+
import { html, LitElement } from "lit";
|
|
10
|
+
import { customElement } from "lit/decorators.js";
|
|
11
|
+
import { prepareTemplate } from "stampino";
|
|
12
|
+
import { consume } from "@lit/context";
|
|
13
|
+
var TestPagingButtonsStamp = class extends LitElement {
|
|
14
|
+
createRenderRoot() {
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this._internals = this.attachInternals();
|
|
20
|
+
this._internals.ariaLabel = "pagination";
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback();
|
|
24
|
+
const templateElement = this.querySelector("template");
|
|
25
|
+
this.myTemplate = prepareTemplate(templateElement);
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
if (!this.computedContext) return html``;
|
|
29
|
+
const items = this.computedContext.testParts.flatMap(
|
|
30
|
+
(testPart) => testPart.sections.flatMap((section) => section.items)
|
|
31
|
+
);
|
|
32
|
+
return html` ${items.map((item) => this.myTemplate({ item, view: this.computedContext.view }))} `;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
__decorateClass([
|
|
36
|
+
consume({ context: computedContext, subscribe: true })
|
|
37
|
+
], TestPagingButtonsStamp.prototype, "computedContext", 2);
|
|
38
|
+
TestPagingButtonsStamp = __decorateClass([
|
|
39
|
+
customElement("test-paging-buttons-stamp")
|
|
40
|
+
], TestPagingButtonsStamp);
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
TestPagingButtonsStamp
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=chunk-5QGG5BMS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-paging-buttons-stamp.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n/**\n * @deprecated test-paging-buttons-stamp is deprecated and will be removed in the future.\n */\n@customElement('test-paging-buttons-stamp')\nexport class TestPagingButtonsStamp extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n myTemplate: TemplateFunction;\n private _internals: ElementInternals;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n this._internals.ariaLabel = 'pagination';\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n render() {\n if (!this.computedContext) return html``;\n const items = this.computedContext.testParts.flatMap(testPart =>\n testPart.sections.flatMap(section => section.items)\n );\n\n return html` ${items.map(item => this.myTemplate({ item, view: this.computedContext.view }))} `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-paging-buttons-stamp': TestPagingButtonsStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,kBAAkB;AACjC,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAWjB,IAAM,yBAAN,cAAqC,WAAW;AAAA,EAO3C,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,cAAc;AACZ,UAAM;AACN,SAAK,aAAa,KAAK,gBAAgB;AACvC,SAAK,WAAW,YAAY;AAAA,EAC9B;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEA,SAAS;AACP,QAAI,CAAC,KAAK,gBAAiB,QAAO;AAClC,UAAM,QAAQ,KAAK,gBAAgB,UAAU;AAAA,MAAQ,cACnD,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK;AAAA,IACpD;AAEA,WAAO,QAAQ,MAAM,IAAI,UAAQ,KAAK,WAAW,EAAE,MAAM,MAAM,KAAK,gBAAgB,KAAK,CAAC,CAAC,CAAC;AAAA,EAC9F;AACF;AA7BU;AAAA,EADP,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAD3C,uBAEH;AAFG,yBAAN;AAAA,EADN,cAAc,2BAA2B;AAAA,GAC7B;","names":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-AZIKAG7K.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-stamp.ts
|
|
9
|
+
import { html, LitElement, nothing } from "lit";
|
|
10
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
11
|
+
import { prepareTemplate } from "stampino";
|
|
12
|
+
import { consume } from "@lit/context";
|
|
13
|
+
var TestStamp = class extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.debug = false;
|
|
17
|
+
this.stampContext = {
|
|
18
|
+
view: "candidate",
|
|
19
|
+
activeItem: {},
|
|
20
|
+
activeSection: {
|
|
21
|
+
items: []
|
|
22
|
+
},
|
|
23
|
+
activeTestpart: {
|
|
24
|
+
items: [],
|
|
25
|
+
sections: []
|
|
26
|
+
},
|
|
27
|
+
test: {}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
createRenderRoot() {
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
super.connectedCallback();
|
|
35
|
+
const templateElement = this.querySelector("template");
|
|
36
|
+
if (!templateElement) {
|
|
37
|
+
this.myTemplate = null;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this.myTemplate = prepareTemplate(templateElement);
|
|
41
|
+
}
|
|
42
|
+
willUpdate(_changedProperties) {
|
|
43
|
+
if (!this.computedContext) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const activeTestPart = this.computedContext.testParts.find((testPart) => testPart.active);
|
|
47
|
+
const activeSection = activeTestPart?.sections.find((section) => section.active);
|
|
48
|
+
const activeItem = activeSection?.items.find((item) => item.active);
|
|
49
|
+
const { variables, ...augmentedItem } = activeItem || {};
|
|
50
|
+
if (!activeTestPart || !activeSection || !activeItem) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const augmentedTestPart = {
|
|
54
|
+
...activeTestPart,
|
|
55
|
+
items: activeTestPart.sections.flatMap((section) => section.items.map(({ variables: variables2, ...rest }) => rest)),
|
|
56
|
+
sections: activeTestPart.sections.map((section) => ({
|
|
57
|
+
...section,
|
|
58
|
+
items: section.items.map(({ variables: variables2, ...rest }) => rest)
|
|
59
|
+
}))
|
|
60
|
+
};
|
|
61
|
+
console.log("activeTestPart", activeTestPart);
|
|
62
|
+
const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables: variables2, ...rest }) => rest) };
|
|
63
|
+
const { testParts, ...activeTest } = this.computedContext;
|
|
64
|
+
this.stampContext = {
|
|
65
|
+
view: this.computedContext.view,
|
|
66
|
+
activeItem: augmentedItem,
|
|
67
|
+
activeSection: augmentedSection,
|
|
68
|
+
activeTestpart: augmentedTestPart,
|
|
69
|
+
test: activeTest
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}
|
|
74
|
+
${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
__decorateClass([
|
|
78
|
+
property({ type: Boolean, reflect: true })
|
|
79
|
+
], TestStamp.prototype, "debug", 2);
|
|
80
|
+
__decorateClass([
|
|
81
|
+
state(),
|
|
82
|
+
consume({ context: computedContext, subscribe: true })
|
|
83
|
+
], TestStamp.prototype, "computedContext", 2);
|
|
84
|
+
__decorateClass([
|
|
85
|
+
state()
|
|
86
|
+
], TestStamp.prototype, "stampContext", 2);
|
|
87
|
+
TestStamp = __decorateClass([
|
|
88
|
+
customElement("test-stamp")
|
|
89
|
+
], TestStamp);
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
TestStamp
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=chunk-5SU6S5L4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-stamp.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { View } from '../core/mixins/test-view.mixin';\nimport type { PropertyValues } from 'lit';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n/**\n * A custom web component that renders a test stamp using the Lit framework.\n * This component is deprecated and will be removed in the future.\n * @customElement\n * @extends {LitElement}\n */\n@customElement('test-stamp')\nexport class TestStamp extends LitElement {\n /**\n * Indicates whether the component is in debug mode.\n * When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.\n */\n @property({ type: Boolean, reflect: true })\n public debug = false;\n\n @state()\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n @state()\n private stampContext: {\n view?: View;\n test?: unknown;\n activeTestpart?: unknown;\n activeSection?: unknown;\n activeItem?: unknown;\n } = {\n view: 'candidate',\n activeItem: {},\n activeSection: {\n items: []\n },\n activeTestpart: {\n items: [],\n sections: []\n },\n test: {}\n };\n\n myTemplate: TemplateFunction;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) {\n return;\n }\n const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n const activeSection = activeTestPart?.sections.find(section => section.active);\n const activeItem = activeSection?.items.find(item => item.active);\n const { variables, ...augmentedItem } = activeItem || {};\n\n if (!activeTestPart || !activeSection || !activeItem) {\n return;\n }\n\n const augmentedTestPart = {\n ...activeTestPart,\n items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n sections: activeTestPart.sections.map(section => ({\n ...section,\n items: section.items.map(({ variables, ...rest }) => rest)\n }))\n };\n\n console.log('activeTestPart', activeTestPart);\n\n const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables, ...rest }) => rest) };\n const { testParts, ...activeTest } = this.computedContext;\n\n this.stampContext = {\n view: this.computedContext.view,\n activeItem: augmentedItem,\n activeSection: augmentedSection,\n activeTestpart: augmentedTestPart,\n test: activeTest\n };\n }\n\n render() {\n // if (!this.stampContext) return nothing;\n return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}\n ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-stamp': TestStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAgBjB,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC;AAAA;AAML,SAAO,QAAQ;AAOf,SAAQ,eAMJ;AAAA,MACF,MAAM;AAAA,MACN,YAAY,CAAC;AAAA,MACb,eAAe;AAAA,QACb,OAAO,CAAC;AAAA,MACV;AAAA,MACA,gBAAgB;AAAA,QACd,OAAO,CAAC;AAAA,QACR,UAAU,CAAC;AAAA,MACb;AAAA,MACA,MAAM,CAAC;AAAA,IACT;AAAA;AAAA,EAIU,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,QAAI,CAAC,iBAAiB;AACpB,WAAK,aAAa;AAClB;AAAA,IACF;AACA,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEU,WAA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AClE;AACF;AAnFS;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAL/B,UAMJ;AAIC;AAAA,EAFP,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAT3C,UAUH;AAGA;AAAA,EADP,MAAM;AAAA,GAZI,UAaH;AAbG,YAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":["variables"]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-AZIKAG7K.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-stamp.ts
|
|
9
|
+
import { html, LitElement, nothing } from "lit";
|
|
10
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
11
|
+
import { prepareTemplate } from "stampino";
|
|
12
|
+
import { consume } from "@lit/context";
|
|
13
|
+
var TestStamp = class extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.debug = false;
|
|
17
|
+
this.stampContext = {
|
|
18
|
+
view: "candidate",
|
|
19
|
+
activeItem: {},
|
|
20
|
+
activeSection: {
|
|
21
|
+
items: []
|
|
22
|
+
},
|
|
23
|
+
activeTestpart: {
|
|
24
|
+
items: []
|
|
25
|
+
},
|
|
26
|
+
test: {}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
createRenderRoot() {
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
const templateElement = this.querySelector("template");
|
|
35
|
+
if (!templateElement) {
|
|
36
|
+
this.myTemplate = null;
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.myTemplate = prepareTemplate(templateElement);
|
|
40
|
+
}
|
|
41
|
+
willUpdate(_changedProperties) {
|
|
42
|
+
if (!this.computedContext) {
|
|
43
|
+
this.stampContext = null;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const activeTestPart = this.computedContext.testParts.find((testPart) => testPart.active);
|
|
47
|
+
const activeSection = activeTestPart?.sections.find((section) => section.active);
|
|
48
|
+
const activeItem = activeSection?.items.find((item) => item.active);
|
|
49
|
+
const { variables, ...augmentedItem } = activeItem || {};
|
|
50
|
+
const augmentedTestPart = {
|
|
51
|
+
...activeTestPart,
|
|
52
|
+
items: activeTestPart.sections.flatMap((section) => section.items.map(({ variables: variables2, ...rest }) => rest)),
|
|
53
|
+
sections: activeTestPart.sections.map((section) => ({
|
|
54
|
+
...section,
|
|
55
|
+
items: section.items.map(({ variables: variables2, ...rest }) => rest) || []
|
|
56
|
+
}))
|
|
57
|
+
};
|
|
58
|
+
const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables: variables2, ...rest }) => rest) };
|
|
59
|
+
const { testParts, ...activeTest } = this.computedContext;
|
|
60
|
+
this.stampContext = {
|
|
61
|
+
view: this.computedContext.view,
|
|
62
|
+
activeItem: augmentedItem,
|
|
63
|
+
activeSection: augmentedSection,
|
|
64
|
+
activeTestpart: augmentedTestPart,
|
|
65
|
+
test: activeTest
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}
|
|
70
|
+
${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
__decorateClass([
|
|
74
|
+
property({ type: Boolean, reflect: true })
|
|
75
|
+
], TestStamp.prototype, "debug", 2);
|
|
76
|
+
__decorateClass([
|
|
77
|
+
state(),
|
|
78
|
+
consume({ context: computedContext, subscribe: true })
|
|
79
|
+
], TestStamp.prototype, "computedContext", 2);
|
|
80
|
+
__decorateClass([
|
|
81
|
+
state()
|
|
82
|
+
], TestStamp.prototype, "stampContext", 2);
|
|
83
|
+
TestStamp = __decorateClass([
|
|
84
|
+
customElement("test-stamp")
|
|
85
|
+
], TestStamp);
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
TestStamp
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=chunk-5WHKITF6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-stamp.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { View } from '../core/mixins/test-view.mixin';\nimport type { PropertyValues } from 'lit';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n/**\n * A custom web component that renders a test stamp using the Lit framework.\n * This component is deprecated and will be removed in the future.\n * @customElement\n * @extends {LitElement}\n */\n@customElement('test-stamp')\nexport class TestStamp extends LitElement {\n /**\n * Indicates whether the component is in debug mode.\n * When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.\n */\n @property({ type: Boolean, reflect: true })\n public debug = false;\n\n @state()\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n @state()\n private stampContext: {\n view?: View;\n test?: unknown;\n activeTestpart?: unknown;\n activeSection?: unknown;\n activeItem?: unknown;\n } = {\n view: 'candidate',\n activeItem: {},\n activeSection: {\n items: []\n },\n activeTestpart: {\n items: []\n },\n test: {}\n };\n\n myTemplate: TemplateFunction;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) {\n this.stampContext = null;\n return;\n }\n const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n const activeSection = activeTestPart?.sections.find(section => section.active);\n const activeItem = activeSection?.items.find(item => item.active);\n const { variables, ...augmentedItem } = activeItem || {};\n\n // if (!activeTestPart || !activeSection || !activeItem) {\n // this.stampContext = null;\n // return;\n // }\n\n const augmentedTestPart = {\n ...activeTestPart,\n items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n sections: activeTestPart.sections.map(section => ({\n ...section,\n items: section.items.map(({ variables, ...rest }) => rest) || []\n }))\n };\n\n const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables, ...rest }) => rest) };\n const { testParts, ...activeTest } = this.computedContext;\n\n this.stampContext = {\n view: this.computedContext.view,\n activeItem: augmentedItem,\n activeSection: augmentedSection,\n activeTestpart: augmentedTestPart,\n test: activeTest\n };\n }\n\n render() {\n // if (!this.stampContext) return nothing;\n return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}\n ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-stamp': TestStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAgBjB,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC;AAAA;AAML,SAAO,QAAQ;AAOf,SAAQ,eAMJ;AAAA,MACF,MAAM;AAAA,MACN,YAAY,CAAC;AAAA,MACb,eAAe;AAAA,QACb,OAAO,CAAC;AAAA,MACV;AAAA,MACA,gBAAgB;AAAA,QACd,OAAO,CAAC;AAAA,MACV;AAAA,MACA,MAAM,CAAC;AAAA,IACT;AAAA;AAAA,EAIU,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,oBAA0B;AACxB,UAAM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,CAAC,CAAC,mBAAmB,OAAO;AAAA,MACjH,KAAK,aAAa,KAAK,WAAW,KAAK,YAAY,IAAI,OAAO;AAAA,EAClE;AACF;AAlFS;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAL/B,UAMJ;AAIC;AAAA,EAFP,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAT3C,UAUH;AAGA;AAAA,EADP,MAAM;AAAA,GAZI,UAaH;AAbG,YAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":["variables"]}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-AZIKAG7K.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-stamp.ts
|
|
9
|
+
import { html, LitElement, nothing } from "lit";
|
|
10
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
11
|
+
import { prepareTemplate } from "stampino";
|
|
12
|
+
import { consume } from "@lit/context";
|
|
13
|
+
var TestStamp = class extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.debug = false;
|
|
17
|
+
this.stampContext = {
|
|
18
|
+
view: "candidate",
|
|
19
|
+
activeItem: {},
|
|
20
|
+
activeSection: {
|
|
21
|
+
items: []
|
|
22
|
+
},
|
|
23
|
+
activeTestpart: {
|
|
24
|
+
items: [],
|
|
25
|
+
sections: []
|
|
26
|
+
},
|
|
27
|
+
test: {}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
createRenderRoot() {
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
super.connectedCallback();
|
|
35
|
+
const templateElement = this.querySelector("template");
|
|
36
|
+
if (!templateElement) {
|
|
37
|
+
this.myTemplate = null;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this.myTemplate = prepareTemplate(templateElement);
|
|
41
|
+
}
|
|
42
|
+
willUpdate(_changedProperties) {
|
|
43
|
+
if (!this.computedContext) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const activeTestPart = this.computedContext.testParts.find((testPart) => testPart.active);
|
|
47
|
+
const activeSection = activeTestPart?.sections.find((section) => section.active);
|
|
48
|
+
const activeItem = activeSection?.items.find((item) => item.active);
|
|
49
|
+
const { variables, ...augmentedItem } = activeItem || {};
|
|
50
|
+
if (!activeTestPart || !activeSection || !activeItem) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const augmentedTestPart = {
|
|
54
|
+
...activeTestPart,
|
|
55
|
+
items: activeTestPart.sections.flatMap((section) => section.items.map(({ variables: variables2, ...rest }) => rest)),
|
|
56
|
+
sections: activeTestPart.sections.map((section) => ({
|
|
57
|
+
...section,
|
|
58
|
+
items: section.items.map(({ variables: variables2, ...rest }) => rest)
|
|
59
|
+
}))
|
|
60
|
+
};
|
|
61
|
+
const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables: variables2, ...rest }) => rest) };
|
|
62
|
+
const { testParts, ...activeTest } = this.computedContext;
|
|
63
|
+
this.stampContext = {
|
|
64
|
+
view: this.computedContext.view,
|
|
65
|
+
activeItem: augmentedItem,
|
|
66
|
+
activeSection: augmentedSection,
|
|
67
|
+
activeTestpart: augmentedTestPart,
|
|
68
|
+
test: activeTest
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
render() {
|
|
72
|
+
return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}
|
|
73
|
+
${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
__decorateClass([
|
|
77
|
+
property({ type: Boolean, reflect: true })
|
|
78
|
+
], TestStamp.prototype, "debug", 2);
|
|
79
|
+
__decorateClass([
|
|
80
|
+
state(),
|
|
81
|
+
consume({ context: computedContext, subscribe: true })
|
|
82
|
+
], TestStamp.prototype, "computedContext", 2);
|
|
83
|
+
__decorateClass([
|
|
84
|
+
state()
|
|
85
|
+
], TestStamp.prototype, "stampContext", 2);
|
|
86
|
+
TestStamp = __decorateClass([
|
|
87
|
+
customElement("test-stamp")
|
|
88
|
+
], TestStamp);
|
|
89
|
+
|
|
90
|
+
export {
|
|
91
|
+
TestStamp
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=chunk-64JRMFTB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-stamp.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { View } from '../core/mixins/test-view.mixin';\nimport type { PropertyValues } from 'lit';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n/**\n * A custom web component that renders a test stamp using the Lit framework.\n * This component is deprecated and will be removed in the future.\n * @customElement\n * @extends {LitElement}\n */\n@customElement('test-stamp')\nexport class TestStamp extends LitElement {\n /**\n * Indicates whether the component is in debug mode.\n * When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.\n */\n @property({ type: Boolean, reflect: true })\n public debug = false;\n\n @state()\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n @state()\n private stampContext: {\n view?: View;\n test?: unknown;\n activeTestpart?: unknown;\n activeSection?: unknown;\n activeItem?: unknown;\n } = {\n view: 'candidate',\n activeItem: {},\n activeSection: {\n items: []\n },\n activeTestpart: {\n items: [],\n sections: []\n },\n test: {}\n };\n\n myTemplate: TemplateFunction;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) {\n return;\n }\n const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n const activeSection = activeTestPart?.sections.find(section => section.active);\n const activeItem = activeSection?.items.find(item => item.active);\n const { variables, ...augmentedItem } = activeItem || {};\n\n if (!activeTestPart || !activeSection || !activeItem) {\n return;\n }\n\n const augmentedTestPart = {\n ...activeTestPart,\n items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n sections: activeTestPart.sections.map(section => ({\n ...section,\n items: section.items.map(({ variables, ...rest }) => rest)\n }))\n };\n\n const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables, ...rest }) => rest) };\n const { testParts, ...activeTest } = this.computedContext;\n\n this.stampContext = {\n view: this.computedContext.view,\n activeItem: augmentedItem,\n activeSection: augmentedSection,\n activeTestpart: augmentedTestPart,\n test: activeTest\n };\n }\n\n render() {\n // if (!this.stampContext) return nothing;\n return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}\n ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-stamp': TestStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAgBjB,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC;AAAA;AAML,SAAO,QAAQ;AAOf,SAAQ,eAMJ;AAAA,MACF,MAAM;AAAA,MACN,YAAY,CAAC;AAAA,MACb,eAAe;AAAA,QACb,OAAO,CAAC;AAAA,MACV;AAAA,MACA,gBAAgB;AAAA,QACd,OAAO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