@gmb/bitmark-parser-generator 1.0.11

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 (1615) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +183 -0
  3. package/dist/browser/bitmark-parser-generator-antlr.min.js +2 -0
  4. package/dist/browser/bitmark-parser-generator-antlr.min.js.LICENSE.txt +22 -0
  5. package/dist/browser/bitmark-parser-generator.min.js +1 -0
  6. package/dist/browser/bundle-report.html +39 -0
  7. package/dist/cjs/BitmarkParserGenerator.js +470 -0
  8. package/dist/cjs/BitmarkParserGenerator.js.map +1 -0
  9. package/dist/cjs/ast/Ast.js +216 -0
  10. package/dist/cjs/ast/Ast.js.map +1 -0
  11. package/dist/cjs/ast/BaseBuilder.js +72 -0
  12. package/dist/cjs/ast/BaseBuilder.js.map +1 -0
  13. package/dist/cjs/ast/Builder.js +607 -0
  14. package/dist/cjs/ast/Builder.js.map +1 -0
  15. package/dist/cjs/ast/ResourceBuilder.js +629 -0
  16. package/dist/cjs/ast/ResourceBuilder.js.map +1 -0
  17. package/dist/cjs/ast/rules/NodeValidator.js +137 -0
  18. package/dist/cjs/ast/rules/NodeValidator.js.map +1 -0
  19. package/dist/cjs/ast/writer/FileWriter.js +109 -0
  20. package/dist/cjs/ast/writer/FileWriter.js.map +1 -0
  21. package/dist/cjs/ast/writer/StreamWriter.js +76 -0
  22. package/dist/cjs/ast/writer/StreamWriter.js.map +1 -0
  23. package/dist/cjs/ast/writer/StringWriter.js +102 -0
  24. package/dist/cjs/ast/writer/StringWriter.js.map +1 -0
  25. package/dist/cjs/ast/writer/Writer.js +3 -0
  26. package/dist/cjs/ast/writer/Writer.js.map +1 -0
  27. package/dist/cjs/config/bits/_errorBitConfig.js +10 -0
  28. package/dist/cjs/config/bits/_errorBitConfig.js.map +1 -0
  29. package/dist/cjs/config/bits/aiPromptBitConfig.js +12 -0
  30. package/dist/cjs/config/bits/aiPromptBitConfig.js.map +1 -0
  31. package/dist/cjs/config/bits/anchorBitConfig.js +11 -0
  32. package/dist/cjs/config/bits/anchorBitConfig.js.map +1 -0
  33. package/dist/cjs/config/bits/appLinkBitConfig.js +14 -0
  34. package/dist/cjs/config/bits/appLinkBitConfig.js.map +1 -0
  35. package/dist/cjs/config/bits/articleAiBitConfig.js +13 -0
  36. package/dist/cjs/config/bits/articleAiBitConfig.js.map +1 -0
  37. package/dist/cjs/config/bits/articleAttachmentBitConfig.js +12 -0
  38. package/dist/cjs/config/bits/articleAttachmentBitConfig.js.map +1 -0
  39. package/dist/cjs/config/bits/articleBitConfig.js +12 -0
  40. package/dist/cjs/config/bits/articleBitConfig.js.map +1 -0
  41. package/dist/cjs/config/bits/articleEmbedBitConfig.js +14 -0
  42. package/dist/cjs/config/bits/articleEmbedBitConfig.js.map +1 -0
  43. package/dist/cjs/config/bits/articleLinkBitConfig.js +14 -0
  44. package/dist/cjs/config/bits/articleLinkBitConfig.js.map +1 -0
  45. package/dist/cjs/config/bits/assignmentBitConfig.js +12 -0
  46. package/dist/cjs/config/bits/assignmentBitConfig.js.map +1 -0
  47. package/dist/cjs/config/bits/audioBitConfig.js +14 -0
  48. package/dist/cjs/config/bits/audioBitConfig.js.map +1 -0
  49. package/dist/cjs/config/bits/audioEmbedBitConfig.js +14 -0
  50. package/dist/cjs/config/bits/audioEmbedBitConfig.js.map +1 -0
  51. package/dist/cjs/config/bits/audioLinkBitConfig.js +14 -0
  52. package/dist/cjs/config/bits/audioLinkBitConfig.js.map +1 -0
  53. package/dist/cjs/config/bits/bitAliasBitConfig.js +12 -0
  54. package/dist/cjs/config/bits/bitAliasBitConfig.js.map +1 -0
  55. package/dist/cjs/config/bits/bitBookEndingBitConfig.js +11 -0
  56. package/dist/cjs/config/bits/bitBookEndingBitConfig.js.map +1 -0
  57. package/dist/cjs/config/bits/bitBookSummaryBitConfig.js +11 -0
  58. package/dist/cjs/config/bits/bitBookSummaryBitConfig.js.map +1 -0
  59. package/dist/cjs/config/bits/blogArticleBitConfig.js +12 -0
  60. package/dist/cjs/config/bits/blogArticleBitConfig.js.map +1 -0
  61. package/dist/cjs/config/bits/bookBitConfig.js +49 -0
  62. package/dist/cjs/config/bits/bookBitConfig.js.map +1 -0
  63. package/dist/cjs/config/bits/botActionAnnounceBitConfig.js +11 -0
  64. package/dist/cjs/config/bits/botActionAnnounceBitConfig.js.map +1 -0
  65. package/dist/cjs/config/bits/botActionRatingNumberBitConfig.js +11 -0
  66. package/dist/cjs/config/bits/botActionRatingNumberBitConfig.js.map +1 -0
  67. package/dist/cjs/config/bits/botActionRemindBitConfig.js +11 -0
  68. package/dist/cjs/config/bits/botActionRemindBitConfig.js.map +1 -0
  69. package/dist/cjs/config/bits/botActionResponseBitConfig.js +14 -0
  70. package/dist/cjs/config/bits/botActionResponseBitConfig.js.map +1 -0
  71. package/dist/cjs/config/bits/botActionSaveBitConfig.js +11 -0
  72. package/dist/cjs/config/bits/botActionSaveBitConfig.js.map +1 -0
  73. package/dist/cjs/config/bits/botActionSendBitConfig.js +12 -0
  74. package/dist/cjs/config/bits/botActionSendBitConfig.js.map +1 -0
  75. package/dist/cjs/config/bits/botActionTrueFalseBitConfig.js +11 -0
  76. package/dist/cjs/config/bits/botActionTrueFalseBitConfig.js.map +1 -0
  77. package/dist/cjs/config/bits/botInterviewBitConfig.js +11 -0
  78. package/dist/cjs/config/bits/botInterviewBitConfig.js.map +1 -0
  79. package/dist/cjs/config/bits/browserImageBitConfig.js +15 -0
  80. package/dist/cjs/config/bits/browserImageBitConfig.js.map +1 -0
  81. package/dist/cjs/config/bits/bugBitConfig.js +12 -0
  82. package/dist/cjs/config/bits/bugBitConfig.js.map +1 -0
  83. package/dist/cjs/config/bits/card1BitConfig.js +12 -0
  84. package/dist/cjs/config/bits/card1BitConfig.js.map +1 -0
  85. package/dist/cjs/config/bits/chapterBitConfig.js +12 -0
  86. package/dist/cjs/config/bits/chapterBitConfig.js.map +1 -0
  87. package/dist/cjs/config/bits/chapterSubjectMatterBitConfig.js +11 -0
  88. package/dist/cjs/config/bits/chapterSubjectMatterBitConfig.js.map +1 -0
  89. package/dist/cjs/config/bits/chatBitConfig.js +11 -0
  90. package/dist/cjs/config/bits/chatBitConfig.js.map +1 -0
  91. package/dist/cjs/config/bits/clozeAndMultipleChoiceTextBitConfig.js +13 -0
  92. package/dist/cjs/config/bits/clozeAndMultipleChoiceTextBitConfig.js.map +1 -0
  93. package/dist/cjs/config/bits/clozeBitConfig.js +13 -0
  94. package/dist/cjs/config/bits/clozeBitConfig.js.map +1 -0
  95. package/dist/cjs/config/bits/clozeInstructionGroupedBitConfig.js +13 -0
  96. package/dist/cjs/config/bits/clozeInstructionGroupedBitConfig.js.map +1 -0
  97. package/dist/cjs/config/bits/clozeSolutionGroupedBitConfig.js +13 -0
  98. package/dist/cjs/config/bits/clozeSolutionGroupedBitConfig.js.map +1 -0
  99. package/dist/cjs/config/bits/codeBitConfig.js +12 -0
  100. package/dist/cjs/config/bits/codeBitConfig.js.map +1 -0
  101. package/dist/cjs/config/bits/conclusionBitConfig.js +12 -0
  102. package/dist/cjs/config/bits/conclusionBitConfig.js.map +1 -0
  103. package/dist/cjs/config/bits/conversationBitConfig.js +19 -0
  104. package/dist/cjs/config/bits/conversationBitConfig.js.map +1 -0
  105. package/dist/cjs/config/bits/correctionBitConfig.js +12 -0
  106. package/dist/cjs/config/bits/correctionBitConfig.js.map +1 -0
  107. package/dist/cjs/config/bits/dangerBitConfig.js +12 -0
  108. package/dist/cjs/config/bits/dangerBitConfig.js.map +1 -0
  109. package/dist/cjs/config/bits/details1BitConfig.js +11 -0
  110. package/dist/cjs/config/bits/details1BitConfig.js.map +1 -0
  111. package/dist/cjs/config/bits/detailsBitConfig.js +12 -0
  112. package/dist/cjs/config/bits/detailsBitConfig.js.map +1 -0
  113. package/dist/cjs/config/bits/documentBitConfig.js +14 -0
  114. package/dist/cjs/config/bits/documentBitConfig.js.map +1 -0
  115. package/dist/cjs/config/bits/documentDownloadBitConfig.js +14 -0
  116. package/dist/cjs/config/bits/documentDownloadBitConfig.js.map +1 -0
  117. package/dist/cjs/config/bits/documentEmbedBitConfig.js +14 -0
  118. package/dist/cjs/config/bits/documentEmbedBitConfig.js.map +1 -0
  119. package/dist/cjs/config/bits/documentLinkBitConfig.js +14 -0
  120. package/dist/cjs/config/bits/documentLinkBitConfig.js.map +1 -0
  121. package/dist/cjs/config/bits/documentUploadBitConfig.js +11 -0
  122. package/dist/cjs/config/bits/documentUploadBitConfig.js.map +1 -0
  123. package/dist/cjs/config/bits/editorialBitConfig.js +12 -0
  124. package/dist/cjs/config/bits/editorialBitConfig.js.map +1 -0
  125. package/dist/cjs/config/bits/essayBitConfig.js +13 -0
  126. package/dist/cjs/config/bits/essayBitConfig.js.map +1 -0
  127. package/dist/cjs/config/bits/exampleBitConfig.js +12 -0
  128. package/dist/cjs/config/bits/exampleBitConfig.js.map +1 -0
  129. package/dist/cjs/config/bits/featuredBitConfig.js +12 -0
  130. package/dist/cjs/config/bits/featuredBitConfig.js.map +1 -0
  131. package/dist/cjs/config/bits/flashcard1BitConfig.js +11 -0
  132. package/dist/cjs/config/bits/flashcard1BitConfig.js.map +1 -0
  133. package/dist/cjs/config/bits/flashcardBitConfig.js +11 -0
  134. package/dist/cjs/config/bits/flashcardBitConfig.js.map +1 -0
  135. package/dist/cjs/config/bits/focusImageBitConfig.js +15 -0
  136. package/dist/cjs/config/bits/focusImageBitConfig.js.map +1 -0
  137. package/dist/cjs/config/bits/footNoteBitConfig.js +12 -0
  138. package/dist/cjs/config/bits/footNoteBitConfig.js.map +1 -0
  139. package/dist/cjs/config/bits/generic/cardSetBitConfigs.js +138 -0
  140. package/dist/cjs/config/bits/generic/cardSetBitConfigs.js.map +1 -0
  141. package/dist/cjs/config/bits/generic/chainBitConfigs.js +47 -0
  142. package/dist/cjs/config/bits/generic/chainBitConfigs.js.map +1 -0
  143. package/dist/cjs/config/bits/generic/resourceChainBitConfigs.js +197 -0
  144. package/dist/cjs/config/bits/generic/resourceChainBitConfigs.js.map +1 -0
  145. package/dist/cjs/config/bits/generic/standardBitConfigs.js +46 -0
  146. package/dist/cjs/config/bits/generic/standardBitConfigs.js.map +1 -0
  147. package/dist/cjs/config/bits/groupBornBitConfig.js +11 -0
  148. package/dist/cjs/config/bits/groupBornBitConfig.js.map +1 -0
  149. package/dist/cjs/config/bits/groupDiedBitConfig.js +11 -0
  150. package/dist/cjs/config/bits/groupDiedBitConfig.js.map +1 -0
  151. package/dist/cjs/config/bits/helpBitConfig.js +12 -0
  152. package/dist/cjs/config/bits/helpBitConfig.js.map +1 -0
  153. package/dist/cjs/config/bits/highlightTextBitConfig.js +13 -0
  154. package/dist/cjs/config/bits/highlightTextBitConfig.js.map +1 -0
  155. package/dist/cjs/config/bits/hintBitConfig.js +12 -0
  156. package/dist/cjs/config/bits/hintBitConfig.js.map +1 -0
  157. package/dist/cjs/config/bits/imageBitConfig.js +14 -0
  158. package/dist/cjs/config/bits/imageBitConfig.js.map +1 -0
  159. package/dist/cjs/config/bits/imageLinkBitConfig.js +14 -0
  160. package/dist/cjs/config/bits/imageLinkBitConfig.js.map +1 -0
  161. package/dist/cjs/config/bits/imagePrototypeBitConfig.js +14 -0
  162. package/dist/cjs/config/bits/imagePrototypeBitConfig.js.map +1 -0
  163. package/dist/cjs/config/bits/imageSuperWideBitConfig.js +14 -0
  164. package/dist/cjs/config/bits/imageSuperWideBitConfig.js.map +1 -0
  165. package/dist/cjs/config/bits/imageZoomBitConfig.js +14 -0
  166. package/dist/cjs/config/bits/imageZoomBitConfig.js.map +1 -0
  167. package/dist/cjs/config/bits/infoBitConfig.js +12 -0
  168. package/dist/cjs/config/bits/infoBitConfig.js.map +1 -0
  169. package/dist/cjs/config/bits/internalLinkBitConfig.js +12 -0
  170. package/dist/cjs/config/bits/internalLinkBitConfig.js.map +1 -0
  171. package/dist/cjs/config/bits/interviewBitConfig.js +15 -0
  172. package/dist/cjs/config/bits/interviewBitConfig.js.map +1 -0
  173. package/dist/cjs/config/bits/interviewInstructionGroupedBitConfig.js +15 -0
  174. package/dist/cjs/config/bits/interviewInstructionGroupedBitConfig.js.map +1 -0
  175. package/dist/cjs/config/bits/learningPathBitConfig.js +87 -0
  176. package/dist/cjs/config/bits/learningPathBitConfig.js.map +1 -0
  177. package/dist/cjs/config/bits/markBitConfig.js +12 -0
  178. package/dist/cjs/config/bits/markBitConfig.js.map +1 -0
  179. package/dist/cjs/config/bits/matchBitConfig.js +64 -0
  180. package/dist/cjs/config/bits/matchBitConfig.js.map +1 -0
  181. package/dist/cjs/config/bits/messageBitConfig.js +12 -0
  182. package/dist/cjs/config/bits/messageBitConfig.js.map +1 -0
  183. package/dist/cjs/config/bits/multipleChoice1BitConfig.js +13 -0
  184. package/dist/cjs/config/bits/multipleChoice1BitConfig.js.map +1 -0
  185. package/dist/cjs/config/bits/multipleChoiceBitConfig.js +16 -0
  186. package/dist/cjs/config/bits/multipleChoiceBitConfig.js.map +1 -0
  187. package/dist/cjs/config/bits/multipleChoiceTextBitConfig.js +13 -0
  188. package/dist/cjs/config/bits/multipleChoiceTextBitConfig.js.map +1 -0
  189. package/dist/cjs/config/bits/multipleResponse1BitConfig.js +13 -0
  190. package/dist/cjs/config/bits/multipleResponse1BitConfig.js.map +1 -0
  191. package/dist/cjs/config/bits/multipleResponseBitConfig.js +16 -0
  192. package/dist/cjs/config/bits/multipleResponseBitConfig.js.map +1 -0
  193. package/dist/cjs/config/bits/newspaperArticleBitConfig.js +12 -0
  194. package/dist/cjs/config/bits/newspaperArticleBitConfig.js.map +1 -0
  195. package/dist/cjs/config/bits/noteAiBitConfig.js +13 -0
  196. package/dist/cjs/config/bits/noteAiBitConfig.js.map +1 -0
  197. package/dist/cjs/config/bits/noteBitConfig.js +12 -0
  198. package/dist/cjs/config/bits/noteBitConfig.js.map +1 -0
  199. package/dist/cjs/config/bits/notebookArticleBitConfig.js +12 -0
  200. package/dist/cjs/config/bits/notebookArticleBitConfig.js.map +1 -0
  201. package/dist/cjs/config/bits/pageBitConfig.js +12 -0
  202. package/dist/cjs/config/bits/pageBitConfig.js.map +1 -0
  203. package/dist/cjs/config/bits/photoBitConfig.js +14 -0
  204. package/dist/cjs/config/bits/photoBitConfig.js.map +1 -0
  205. package/dist/cjs/config/bits/preparationNoteBitConfig.js +12 -0
  206. package/dist/cjs/config/bits/preparationNoteBitConfig.js.map +1 -0
  207. package/dist/cjs/config/bits/question1BitConfig.js +12 -0
  208. package/dist/cjs/config/bits/question1BitConfig.js.map +1 -0
  209. package/dist/cjs/config/bits/quoteBitConfig.js +12 -0
  210. package/dist/cjs/config/bits/quoteBitConfig.js.map +1 -0
  211. package/dist/cjs/config/bits/ratingBitConfig.js +11 -0
  212. package/dist/cjs/config/bits/ratingBitConfig.js.map +1 -0
  213. package/dist/cjs/config/bits/recordAudioBitConfig.js +11 -0
  214. package/dist/cjs/config/bits/recordAudioBitConfig.js.map +1 -0
  215. package/dist/cjs/config/bits/releaseNoteBitConfig.js +13 -0
  216. package/dist/cjs/config/bits/releaseNoteBitConfig.js.map +1 -0
  217. package/dist/cjs/config/bits/releaseNotesSummaryBitConfig.js +12 -0
  218. package/dist/cjs/config/bits/releaseNotesSummaryBitConfig.js.map +1 -0
  219. package/dist/cjs/config/bits/remarkBitConfig.js +12 -0
  220. package/dist/cjs/config/bits/remarkBitConfig.js.map +1 -0
  221. package/dist/cjs/config/bits/sampleSolutionBitConfig.js +15 -0
  222. package/dist/cjs/config/bits/sampleSolutionBitConfig.js.map +1 -0
  223. package/dist/cjs/config/bits/screenshotBitConfig.js +14 -0
  224. package/dist/cjs/config/bits/screenshotBitConfig.js.map +1 -0
  225. package/dist/cjs/config/bits/selfAssessmentBitConfig.js +12 -0
  226. package/dist/cjs/config/bits/selfAssessmentBitConfig.js.map +1 -0
  227. package/dist/cjs/config/bits/sequenceBitConfig.js +15 -0
  228. package/dist/cjs/config/bits/sequenceBitConfig.js.map +1 -0
  229. package/dist/cjs/config/bits/sideNoteBitConfig.js +12 -0
  230. package/dist/cjs/config/bits/sideNoteBitConfig.js.map +1 -0
  231. package/dist/cjs/config/bits/statementBitConfig.js +12 -0
  232. package/dist/cjs/config/bits/statementBitConfig.js.map +1 -0
  233. package/dist/cjs/config/bits/stickyNoteBitConfig.js +12 -0
  234. package/dist/cjs/config/bits/stickyNoteBitConfig.js.map +1 -0
  235. package/dist/cjs/config/bits/stillImageFilmBitConfig.js +14 -0
  236. package/dist/cjs/config/bits/stillImageFilmBitConfig.js.map +1 -0
  237. package/dist/cjs/config/bits/stillImageFilmEmbedBitConfig.js +14 -0
  238. package/dist/cjs/config/bits/stillImageFilmEmbedBitConfig.js.map +1 -0
  239. package/dist/cjs/config/bits/stillImageFilmLinkBitConfig.js +14 -0
  240. package/dist/cjs/config/bits/stillImageFilmLinkBitConfig.js.map +1 -0
  241. package/dist/cjs/config/bits/summaryAiBitConfig.js +13 -0
  242. package/dist/cjs/config/bits/summaryAiBitConfig.js.map +1 -0
  243. package/dist/cjs/config/bits/summaryBitConfig.js +13 -0
  244. package/dist/cjs/config/bits/summaryBitConfig.js.map +1 -0
  245. package/dist/cjs/config/bits/survey1BitConfig.js +12 -0
  246. package/dist/cjs/config/bits/survey1BitConfig.js.map +1 -0
  247. package/dist/cjs/config/bits/surveyAnonymous1BitConfig.js +12 -0
  248. package/dist/cjs/config/bits/surveyAnonymous1BitConfig.js.map +1 -0
  249. package/dist/cjs/config/bits/surveyAnonymousBitConfig.js +12 -0
  250. package/dist/cjs/config/bits/surveyAnonymousBitConfig.js.map +1 -0
  251. package/dist/cjs/config/bits/surveyBitConfig.js +12 -0
  252. package/dist/cjs/config/bits/surveyBitConfig.js.map +1 -0
  253. package/dist/cjs/config/bits/takePictureBitConfig.js +11 -0
  254. package/dist/cjs/config/bits/takePictureBitConfig.js.map +1 -0
  255. package/dist/cjs/config/bits/tocBitConfig.js +11 -0
  256. package/dist/cjs/config/bits/tocBitConfig.js.map +1 -0
  257. package/dist/cjs/config/bits/trueFalse1BitConfig.js +14 -0
  258. package/dist/cjs/config/bits/trueFalse1BitConfig.js.map +1 -0
  259. package/dist/cjs/config/bits/trueFalseBitConfig.js +16 -0
  260. package/dist/cjs/config/bits/trueFalseBitConfig.js.map +1 -0
  261. package/dist/cjs/config/bits/vendorPadletEmbedBitConfig.js +12 -0
  262. package/dist/cjs/config/bits/vendorPadletEmbedBitConfig.js.map +1 -0
  263. package/dist/cjs/config/bits/videoBitConfig.js +14 -0
  264. package/dist/cjs/config/bits/videoBitConfig.js.map +1 -0
  265. package/dist/cjs/config/bits/videoEmbedBitConfig.js +14 -0
  266. package/dist/cjs/config/bits/videoEmbedBitConfig.js.map +1 -0
  267. package/dist/cjs/config/bits/videoLandscapeBitConfig.js +14 -0
  268. package/dist/cjs/config/bits/videoLandscapeBitConfig.js.map +1 -0
  269. package/dist/cjs/config/bits/videoLinkBitConfig.js +14 -0
  270. package/dist/cjs/config/bits/videoLinkBitConfig.js.map +1 -0
  271. package/dist/cjs/config/bits/videoPortraitBitConfig.js +14 -0
  272. package/dist/cjs/config/bits/videoPortraitBitConfig.js.map +1 -0
  273. package/dist/cjs/config/bits/warningBitConfig.js +12 -0
  274. package/dist/cjs/config/bits/warningBitConfig.js.map +1 -0
  275. package/dist/cjs/config/bits/websiteLinkBitConfig.js +14 -0
  276. package/dist/cjs/config/bits/websiteLinkBitConfig.js.map +1 -0
  277. package/dist/cjs/config/bits/workbookArticleBitConfig.js +12 -0
  278. package/dist/cjs/config/bits/workbookArticleBitConfig.js.map +1 -0
  279. package/dist/cjs/config/config.js +177 -0
  280. package/dist/cjs/config/config.js.map +1 -0
  281. package/dist/cjs/config/properties/actionPropertyConfig.js +9 -0
  282. package/dist/cjs/config/properties/actionPropertyConfig.js.map +1 -0
  283. package/dist/cjs/config/properties/ageRangePropertyConfig.js +8 -0
  284. package/dist/cjs/config/properties/ageRangePropertyConfig.js.map +1 -0
  285. package/dist/cjs/config/properties/aiGeneratedPropertyConfig.js +11 -0
  286. package/dist/cjs/config/properties/aiGeneratedPropertyConfig.js.map +1 -0
  287. package/dist/cjs/config/properties/authorPropertyConfig.js +8 -0
  288. package/dist/cjs/config/properties/authorPropertyConfig.js.map +1 -0
  289. package/dist/cjs/config/properties/bookPropertyConfig.js +9 -0
  290. package/dist/cjs/config/properties/bookPropertyConfig.js.map +1 -0
  291. package/dist/cjs/config/properties/botPropertyConfig.js +8 -0
  292. package/dist/cjs/config/properties/botPropertyConfig.js.map +1 -0
  293. package/dist/cjs/config/properties/caseSensitivePropertyConfig.js +11 -0
  294. package/dist/cjs/config/properties/caseSensitivePropertyConfig.js.map +1 -0
  295. package/dist/cjs/config/properties/computerLanguagePropertyConfig.js +9 -0
  296. package/dist/cjs/config/properties/computerLanguagePropertyConfig.js.map +1 -0
  297. package/dist/cjs/config/properties/coverImagePropertyConfig.js +8 -0
  298. package/dist/cjs/config/properties/coverImagePropertyConfig.js.map +1 -0
  299. package/dist/cjs/config/properties/datePropertyConfig.js +8 -0
  300. package/dist/cjs/config/properties/datePropertyConfig.js.map +1 -0
  301. package/dist/cjs/config/properties/deeplinkPropertyConfig.js +8 -0
  302. package/dist/cjs/config/properties/deeplinkPropertyConfig.js.map +1 -0
  303. package/dist/cjs/config/properties/durationPropertyConfig.js +9 -0
  304. package/dist/cjs/config/properties/durationPropertyConfig.js.map +1 -0
  305. package/dist/cjs/config/properties/examplePropertyConfig.js +9 -0
  306. package/dist/cjs/config/properties/examplePropertyConfig.js.map +1 -0
  307. package/dist/cjs/config/properties/externalIdPropertyConfig.js +8 -0
  308. package/dist/cjs/config/properties/externalIdPropertyConfig.js.map +1 -0
  309. package/dist/cjs/config/properties/externalLinkPropertyConfig.js +9 -0
  310. package/dist/cjs/config/properties/externalLinkPropertyConfig.js.map +1 -0
  311. package/dist/cjs/config/properties/externalLinkTextPropertyConfig.js +9 -0
  312. package/dist/cjs/config/properties/externalLinkTextPropertyConfig.js.map +1 -0
  313. package/dist/cjs/config/properties/focusXPropertyConfig.js +9 -0
  314. package/dist/cjs/config/properties/focusXPropertyConfig.js.map +1 -0
  315. package/dist/cjs/config/properties/focusYPropertyConfig.js +9 -0
  316. package/dist/cjs/config/properties/focusYPropertyConfig.js.map +1 -0
  317. package/dist/cjs/config/properties/idPropertyConfig.js +8 -0
  318. package/dist/cjs/config/properties/idPropertyConfig.js.map +1 -0
  319. package/dist/cjs/config/properties/isInfoOnlyPropertyConfig.js +9 -0
  320. package/dist/cjs/config/properties/isInfoOnlyPropertyConfig.js.map +1 -0
  321. package/dist/cjs/config/properties/isTrackedPropertyConfig.js +9 -0
  322. package/dist/cjs/config/properties/isTrackedPropertyConfig.js.map +1 -0
  323. package/dist/cjs/config/properties/kindPropertyConfig.js +9 -0
  324. package/dist/cjs/config/properties/kindPropertyConfig.js.map +1 -0
  325. package/dist/cjs/config/properties/labelFalsePropertyConfig.js +9 -0
  326. package/dist/cjs/config/properties/labelFalsePropertyConfig.js.map +1 -0
  327. package/dist/cjs/config/properties/labelTruePropertyConfig.js +9 -0
  328. package/dist/cjs/config/properties/labelTruePropertyConfig.js.map +1 -0
  329. package/dist/cjs/config/properties/languagePropertyConfig.js +8 -0
  330. package/dist/cjs/config/properties/languagePropertyConfig.js.map +1 -0
  331. package/dist/cjs/config/properties/levelPropertyConfig.js +9 -0
  332. package/dist/cjs/config/properties/levelPropertyConfig.js.map +1 -0
  333. package/dist/cjs/config/properties/listPropertyConfig.js +8 -0
  334. package/dist/cjs/config/properties/listPropertyConfig.js.map +1 -0
  335. package/dist/cjs/config/properties/locationPropertyConfig.js +9 -0
  336. package/dist/cjs/config/properties/locationPropertyConfig.js.map +1 -0
  337. package/dist/cjs/config/properties/longAnswerPropertyConfig.js +11 -0
  338. package/dist/cjs/config/properties/longAnswerPropertyConfig.js.map +1 -0
  339. package/dist/cjs/config/properties/padletIdPropertyConfig.js +9 -0
  340. package/dist/cjs/config/properties/padletIdPropertyConfig.js.map +1 -0
  341. package/dist/cjs/config/properties/partialAnswerPropertyConfig.js +9 -0
  342. package/dist/cjs/config/properties/partialAnswerPropertyConfig.js.map +1 -0
  343. package/dist/cjs/config/properties/partnerPropertyConfig.js +9 -0
  344. package/dist/cjs/config/properties/partnerPropertyConfig.js.map +1 -0
  345. package/dist/cjs/config/properties/progressPropertyConfig.js +10 -0
  346. package/dist/cjs/config/properties/progressPropertyConfig.js.map +1 -0
  347. package/dist/cjs/config/properties/publicationsPropertyConfig.js +8 -0
  348. package/dist/cjs/config/properties/publicationsPropertyConfig.js.map +1 -0
  349. package/dist/cjs/config/properties/publisherPropertyConfig.js +8 -0
  350. package/dist/cjs/config/properties/publisherPropertyConfig.js.map +1 -0
  351. package/dist/cjs/config/properties/quotedPersonPropertyConfig.js +9 -0
  352. package/dist/cjs/config/properties/quotedPersonPropertyConfig.js.map +1 -0
  353. package/dist/cjs/config/properties/reactionPropertyConfig.js +9 -0
  354. package/dist/cjs/config/properties/reactionPropertyConfig.js.map +1 -0
  355. package/dist/cjs/config/properties/referencePropertyConfig.js +10 -0
  356. package/dist/cjs/config/properties/referencePropertyConfig.js.map +1 -0
  357. package/dist/cjs/config/properties/releaseVersionPropertyConfig.js +9 -0
  358. package/dist/cjs/config/properties/releaseVersionPropertyConfig.js.map +1 -0
  359. package/dist/cjs/config/properties/resourcePropertyConfig.js +78 -0
  360. package/dist/cjs/config/properties/resourcePropertyConfig.js.map +1 -0
  361. package/dist/cjs/config/properties/sampleSolutionPropertyConfig.js +9 -0
  362. package/dist/cjs/config/properties/sampleSolutionPropertyConfig.js.map +1 -0
  363. package/dist/cjs/config/properties/shortAnswerPropertyConfig.js +11 -0
  364. package/dist/cjs/config/properties/shortAnswerPropertyConfig.js.map +1 -0
  365. package/dist/cjs/config/properties/spaceIdPropertyConfig.js +8 -0
  366. package/dist/cjs/config/properties/spaceIdPropertyConfig.js.map +1 -0
  367. package/dist/cjs/config/properties/subjectPropertyConfig.js +8 -0
  368. package/dist/cjs/config/properties/subjectPropertyConfig.js.map +1 -0
  369. package/dist/cjs/config/properties/subtypePropertyConfig.js +9 -0
  370. package/dist/cjs/config/properties/subtypePropertyConfig.js.map +1 -0
  371. package/dist/cjs/config/properties/textReferencePropertyConfig.js +9 -0
  372. package/dist/cjs/config/properties/textReferencePropertyConfig.js.map +1 -0
  373. package/dist/cjs/config/properties/themePropertyConfig.js +8 -0
  374. package/dist/cjs/config/properties/themePropertyConfig.js.map +1 -0
  375. package/dist/cjs/config/properties/thumbImagePropertyConfig.js +9 -0
  376. package/dist/cjs/config/properties/thumbImagePropertyConfig.js.map +1 -0
  377. package/dist/cjs/config/properties/tocPropertyConfig.js +10 -0
  378. package/dist/cjs/config/properties/tocPropertyConfig.js.map +1 -0
  379. package/dist/cjs/config/properties/videoCallLinkPropertyConfig copy.js +9 -0
  380. package/dist/cjs/config/properties/videoCallLinkPropertyConfig copy.js.map +1 -0
  381. package/dist/cjs/config/properties/videoCallLinkPropertyConfig.js +9 -0
  382. package/dist/cjs/config/properties/videoCallLinkPropertyConfig.js.map +1 -0
  383. package/dist/cjs/generated/build-info.js +10 -0
  384. package/dist/cjs/generated/build-info.js.map +1 -0
  385. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +3429 -0
  386. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -0
  387. package/dist/cjs/generated/parser/text/text-peggy-parser.js +6897 -0
  388. package/dist/cjs/generated/parser/text/text-peggy-parser.js.map +1 -0
  389. package/dist/cjs/generator/Generator.js +3 -0
  390. package/dist/cjs/generator/Generator.js.map +1 -0
  391. package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js +49 -0
  392. package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js.map +1 -0
  393. package/dist/cjs/generator/bitmark/BitmarkGenerator.js +1202 -0
  394. package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -0
  395. package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js +51 -0
  396. package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js.map +1 -0
  397. package/dist/cjs/generator/json/JsonFileGenerator.js +53 -0
  398. package/dist/cjs/generator/json/JsonFileGenerator.js.map +1 -0
  399. package/dist/cjs/generator/json/JsonGenerator.js +2049 -0
  400. package/dist/cjs/generator/json/JsonGenerator.js.map +1 -0
  401. package/dist/cjs/generator/json/JsonObjectGenerator.js +51 -0
  402. package/dist/cjs/generator/json/JsonObjectGenerator.js.map +1 -0
  403. package/dist/cjs/generator/json/JsonStringGenerator.js +50 -0
  404. package/dist/cjs/generator/json/JsonStringGenerator.js.map +1 -0
  405. package/dist/cjs/generator/text/TextGenerator.js +663 -0
  406. package/dist/cjs/generator/text/TextGenerator.js.map +1 -0
  407. package/dist/cjs/index.js +66 -0
  408. package/dist/cjs/index.js.map +1 -0
  409. package/dist/cjs/init/init.js +16 -0
  410. package/dist/cjs/init/init.js.map +1 -0
  411. package/dist/cjs/model/ast/NodeType.js +238 -0
  412. package/dist/cjs/model/ast/NodeType.js.map +1 -0
  413. package/dist/cjs/model/ast/Nodes.js +3 -0
  414. package/dist/cjs/model/ast/Nodes.js.map +1 -0
  415. package/dist/cjs/model/ast/TextNodes.js +3 -0
  416. package/dist/cjs/model/ast/TextNodes.js.map +1 -0
  417. package/dist/cjs/model/config/TagData.js +6 -0
  418. package/dist/cjs/model/config/TagData.js.map +1 -0
  419. package/dist/cjs/model/enum/BitType.js +185 -0
  420. package/dist/cjs/model/enum/BitType.js.map +1 -0
  421. package/dist/cjs/model/enum/BitmarkGeneratorOutput.js +2 -0
  422. package/dist/cjs/model/enum/BitmarkGeneratorOutput.js.map +1 -0
  423. package/dist/cjs/model/enum/BitmarkParserType.js +10 -0
  424. package/dist/cjs/model/enum/BitmarkParserType.js.map +1 -0
  425. package/dist/cjs/model/enum/BitmarkVersion.js +12 -0
  426. package/dist/cjs/model/enum/BitmarkVersion.js.map +1 -0
  427. package/dist/cjs/model/enum/BodyBitType.js +13 -0
  428. package/dist/cjs/model/enum/BodyBitType.js.map +1 -0
  429. package/dist/cjs/model/enum/CardSetType.js +15 -0
  430. package/dist/cjs/model/enum/CardSetType.js.map +1 -0
  431. package/dist/cjs/model/enum/CardSetVersion.js +10 -0
  432. package/dist/cjs/model/enum/CardSetVersion.js.map +1 -0
  433. package/dist/cjs/model/enum/PropertyKey.js +76 -0
  434. package/dist/cjs/model/enum/PropertyKey.js.map +1 -0
  435. package/dist/cjs/model/enum/ResourceType.js +31 -0
  436. package/dist/cjs/model/enum/ResourceType.js.map +1 -0
  437. package/dist/cjs/model/enum/TagType.js +22 -0
  438. package/dist/cjs/model/enum/TagType.js.map +1 -0
  439. package/dist/cjs/model/enum/TextFormat.js +11 -0
  440. package/dist/cjs/model/enum/TextFormat.js.map +1 -0
  441. package/dist/cjs/model/enum/TextMarkType.js +25 -0
  442. package/dist/cjs/model/enum/TextMarkType.js.map +1 -0
  443. package/dist/cjs/model/enum/TextNodeType.js +26 -0
  444. package/dist/cjs/model/enum/TextNodeType.js.map +1 -0
  445. package/dist/cjs/model/enum/TextSection.js +18 -0
  446. package/dist/cjs/model/enum/TextSection.js.map +1 -0
  447. package/dist/cjs/model/json/BitJson.js +3 -0
  448. package/dist/cjs/model/json/BitJson.js.map +1 -0
  449. package/dist/cjs/model/json/BitWrapperJson.js +3 -0
  450. package/dist/cjs/model/json/BitWrapperJson.js.map +1 -0
  451. package/dist/cjs/model/json/BodyBitJson.js +3 -0
  452. package/dist/cjs/model/json/BodyBitJson.js.map +1 -0
  453. package/dist/cjs/model/json/ParserJson.js +3 -0
  454. package/dist/cjs/model/json/ParserJson.js.map +1 -0
  455. package/dist/cjs/model/json/ResourceJson.js +3 -0
  456. package/dist/cjs/model/json/ResourceJson.js.map +1 -0
  457. package/dist/cjs/model/parser/ParserData.js +3 -0
  458. package/dist/cjs/model/parser/ParserData.js.map +1 -0
  459. package/dist/cjs/model/parser/ParserError.js +3 -0
  460. package/dist/cjs/model/parser/ParserError.js.map +1 -0
  461. package/dist/cjs/model/parser/ParserInfo.js +3 -0
  462. package/dist/cjs/model/parser/ParserInfo.js.map +1 -0
  463. package/dist/cjs/model/parser/ParserLocation.js +3 -0
  464. package/dist/cjs/model/parser/ParserLocation.js.map +1 -0
  465. package/dist/cjs/model/parser/ParserLocationRange.js +3 -0
  466. package/dist/cjs/model/parser/ParserLocationRange.js.map +1 -0
  467. package/dist/cjs/parser/bitmark/BitmarkParser.js +67 -0
  468. package/dist/cjs/parser/bitmark/BitmarkParser.js.map +1 -0
  469. package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js +7 -0
  470. package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js.map +1 -0
  471. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +533 -0
  472. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -0
  473. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +575 -0
  474. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -0
  475. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js +64 -0
  476. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -0
  477. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +610 -0
  478. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -0
  479. package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js +82 -0
  480. package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js.map +1 -0
  481. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +35 -0
  482. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -0
  483. package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +405 -0
  484. package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -0
  485. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +16 -0
  486. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -0
  487. package/dist/cjs/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js +19 -0
  488. package/dist/cjs/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js.map +1 -0
  489. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +35 -0
  490. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -0
  491. package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +42 -0
  492. package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -0
  493. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +16 -0
  494. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -0
  495. package/dist/cjs/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js +51 -0
  496. package/dist/cjs/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js.map +1 -0
  497. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +63 -0
  498. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -0
  499. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +16 -0
  500. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -0
  501. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +115 -0
  502. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -0
  503. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +42 -0
  504. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -0
  505. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +177 -0
  506. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +1 -0
  507. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +18 -0
  508. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -0
  509. package/dist/cjs/parser/json/JsonParser.js +592 -0
  510. package/dist/cjs/parser/json/JsonParser.js.map +1 -0
  511. package/dist/cjs/parser/text/TextParser.js +33 -0
  512. package/dist/cjs/parser/text/TextParser.js.map +1 -0
  513. package/dist/cjs/parser/text/peg/TextPegParser.js +7 -0
  514. package/dist/cjs/parser/text/peg/TextPegParser.js.map +1 -0
  515. package/dist/cjs/utils/ArrayUtils.js +43 -0
  516. package/dist/cjs/utils/ArrayUtils.js.map +1 -0
  517. package/dist/cjs/utils/BitUtils.js +34 -0
  518. package/dist/cjs/utils/BitUtils.js.map +1 -0
  519. package/dist/cjs/utils/BooleanUtils.js +62 -0
  520. package/dist/cjs/utils/BooleanUtils.js.map +1 -0
  521. package/dist/cjs/utils/FileUtils.js +65 -0
  522. package/dist/cjs/utils/FileUtils.js.map +1 -0
  523. package/dist/cjs/utils/NumberUtils.js +26 -0
  524. package/dist/cjs/utils/NumberUtils.js.map +1 -0
  525. package/dist/cjs/utils/ObjectUtils.js +203 -0
  526. package/dist/cjs/utils/ObjectUtils.js.map +1 -0
  527. package/dist/cjs/utils/StringUtils.js +134 -0
  528. package/dist/cjs/utils/StringUtils.js.map +1 -0
  529. package/dist/cjs/utils/UrlUtils.js +37 -0
  530. package/dist/cjs/utils/UrlUtils.js.map +1 -0
  531. package/dist/cjs/utils/env/Env.js +131 -0
  532. package/dist/cjs/utils/env/Env.js.map +1 -0
  533. package/dist/cjs/utils/env/Environment.js +15 -0
  534. package/dist/cjs/utils/env/Environment.js.map +1 -0
  535. package/dist/cjs/utils/env/Os.js +14 -0
  536. package/dist/cjs/utils/env/Os.js.map +1 -0
  537. package/dist/cjs/utils/env/Version.js +12 -0
  538. package/dist/cjs/utils/env/Version.js.map +1 -0
  539. package/dist/cjs/utils/env/userAgent.js +89 -0
  540. package/dist/cjs/utils/env/userAgent.js.map +1 -0
  541. package/dist/cjs/utils/polyfill/fs.js +15 -0
  542. package/dist/cjs/utils/polyfill/fs.js.map +1 -0
  543. package/dist/esm/BitmarkParserGenerator.js +440 -0
  544. package/dist/esm/BitmarkParserGenerator.js.map +1 -0
  545. package/dist/esm/ast/Ast.js +213 -0
  546. package/dist/esm/ast/Ast.js.map +1 -0
  547. package/dist/esm/ast/BaseBuilder.js +69 -0
  548. package/dist/esm/ast/BaseBuilder.js.map +1 -0
  549. package/dist/esm/ast/Builder.js +604 -0
  550. package/dist/esm/ast/Builder.js.map +1 -0
  551. package/dist/esm/ast/ResourceBuilder.js +626 -0
  552. package/dist/esm/ast/ResourceBuilder.js.map +1 -0
  553. package/dist/esm/ast/rules/NodeValidator.js +134 -0
  554. package/dist/esm/ast/rules/NodeValidator.js.map +1 -0
  555. package/dist/esm/ast/writer/FileWriter.js +80 -0
  556. package/dist/esm/ast/writer/FileWriter.js.map +1 -0
  557. package/dist/esm/ast/writer/StreamWriter.js +70 -0
  558. package/dist/esm/ast/writer/StreamWriter.js.map +1 -0
  559. package/dist/esm/ast/writer/StringWriter.js +99 -0
  560. package/dist/esm/ast/writer/StringWriter.js.map +1 -0
  561. package/dist/esm/ast/writer/Writer.js +2 -0
  562. package/dist/esm/ast/writer/Writer.js.map +1 -0
  563. package/dist/esm/config/bits/_errorBitConfig.js +8 -0
  564. package/dist/esm/config/bits/_errorBitConfig.js.map +1 -0
  565. package/dist/esm/config/bits/aiPromptBitConfig.js +10 -0
  566. package/dist/esm/config/bits/aiPromptBitConfig.js.map +1 -0
  567. package/dist/esm/config/bits/anchorBitConfig.js +9 -0
  568. package/dist/esm/config/bits/anchorBitConfig.js.map +1 -0
  569. package/dist/esm/config/bits/appLinkBitConfig.js +12 -0
  570. package/dist/esm/config/bits/appLinkBitConfig.js.map +1 -0
  571. package/dist/esm/config/bits/articleAiBitConfig.js +11 -0
  572. package/dist/esm/config/bits/articleAiBitConfig.js.map +1 -0
  573. package/dist/esm/config/bits/articleAttachmentBitConfig.js +10 -0
  574. package/dist/esm/config/bits/articleAttachmentBitConfig.js.map +1 -0
  575. package/dist/esm/config/bits/articleBitConfig.js +10 -0
  576. package/dist/esm/config/bits/articleBitConfig.js.map +1 -0
  577. package/dist/esm/config/bits/articleEmbedBitConfig.js +12 -0
  578. package/dist/esm/config/bits/articleEmbedBitConfig.js.map +1 -0
  579. package/dist/esm/config/bits/articleLinkBitConfig.js +12 -0
  580. package/dist/esm/config/bits/articleLinkBitConfig.js.map +1 -0
  581. package/dist/esm/config/bits/assignmentBitConfig.js +10 -0
  582. package/dist/esm/config/bits/assignmentBitConfig.js.map +1 -0
  583. package/dist/esm/config/bits/audioBitConfig.js +12 -0
  584. package/dist/esm/config/bits/audioBitConfig.js.map +1 -0
  585. package/dist/esm/config/bits/audioEmbedBitConfig.js +12 -0
  586. package/dist/esm/config/bits/audioEmbedBitConfig.js.map +1 -0
  587. package/dist/esm/config/bits/audioLinkBitConfig.js +12 -0
  588. package/dist/esm/config/bits/audioLinkBitConfig.js.map +1 -0
  589. package/dist/esm/config/bits/bitAliasBitConfig.js +10 -0
  590. package/dist/esm/config/bits/bitAliasBitConfig.js.map +1 -0
  591. package/dist/esm/config/bits/bitBookEndingBitConfig.js +9 -0
  592. package/dist/esm/config/bits/bitBookEndingBitConfig.js.map +1 -0
  593. package/dist/esm/config/bits/bitBookSummaryBitConfig.js +9 -0
  594. package/dist/esm/config/bits/bitBookSummaryBitConfig.js.map +1 -0
  595. package/dist/esm/config/bits/blogArticleBitConfig.js +10 -0
  596. package/dist/esm/config/bits/blogArticleBitConfig.js.map +1 -0
  597. package/dist/esm/config/bits/bookBitConfig.js +47 -0
  598. package/dist/esm/config/bits/bookBitConfig.js.map +1 -0
  599. package/dist/esm/config/bits/botActionAnnounceBitConfig.js +9 -0
  600. package/dist/esm/config/bits/botActionAnnounceBitConfig.js.map +1 -0
  601. package/dist/esm/config/bits/botActionRatingNumberBitConfig.js +9 -0
  602. package/dist/esm/config/bits/botActionRatingNumberBitConfig.js.map +1 -0
  603. package/dist/esm/config/bits/botActionRemindBitConfig.js +9 -0
  604. package/dist/esm/config/bits/botActionRemindBitConfig.js.map +1 -0
  605. package/dist/esm/config/bits/botActionResponseBitConfig.js +12 -0
  606. package/dist/esm/config/bits/botActionResponseBitConfig.js.map +1 -0
  607. package/dist/esm/config/bits/botActionSaveBitConfig.js +9 -0
  608. package/dist/esm/config/bits/botActionSaveBitConfig.js.map +1 -0
  609. package/dist/esm/config/bits/botActionSendBitConfig.js +10 -0
  610. package/dist/esm/config/bits/botActionSendBitConfig.js.map +1 -0
  611. package/dist/esm/config/bits/botActionTrueFalseBitConfig.js +9 -0
  612. package/dist/esm/config/bits/botActionTrueFalseBitConfig.js.map +1 -0
  613. package/dist/esm/config/bits/botInterviewBitConfig.js +9 -0
  614. package/dist/esm/config/bits/botInterviewBitConfig.js.map +1 -0
  615. package/dist/esm/config/bits/browserImageBitConfig.js +13 -0
  616. package/dist/esm/config/bits/browserImageBitConfig.js.map +1 -0
  617. package/dist/esm/config/bits/bugBitConfig.js +10 -0
  618. package/dist/esm/config/bits/bugBitConfig.js.map +1 -0
  619. package/dist/esm/config/bits/card1BitConfig.js +10 -0
  620. package/dist/esm/config/bits/card1BitConfig.js.map +1 -0
  621. package/dist/esm/config/bits/chapterBitConfig.js +10 -0
  622. package/dist/esm/config/bits/chapterBitConfig.js.map +1 -0
  623. package/dist/esm/config/bits/chapterSubjectMatterBitConfig.js +9 -0
  624. package/dist/esm/config/bits/chapterSubjectMatterBitConfig.js.map +1 -0
  625. package/dist/esm/config/bits/chatBitConfig.js +9 -0
  626. package/dist/esm/config/bits/chatBitConfig.js.map +1 -0
  627. package/dist/esm/config/bits/clozeAndMultipleChoiceTextBitConfig.js +11 -0
  628. package/dist/esm/config/bits/clozeAndMultipleChoiceTextBitConfig.js.map +1 -0
  629. package/dist/esm/config/bits/clozeBitConfig.js +11 -0
  630. package/dist/esm/config/bits/clozeBitConfig.js.map +1 -0
  631. package/dist/esm/config/bits/clozeInstructionGroupedBitConfig.js +11 -0
  632. package/dist/esm/config/bits/clozeInstructionGroupedBitConfig.js.map +1 -0
  633. package/dist/esm/config/bits/clozeSolutionGroupedBitConfig.js +11 -0
  634. package/dist/esm/config/bits/clozeSolutionGroupedBitConfig.js.map +1 -0
  635. package/dist/esm/config/bits/codeBitConfig.js +10 -0
  636. package/dist/esm/config/bits/codeBitConfig.js.map +1 -0
  637. package/dist/esm/config/bits/conclusionBitConfig.js +10 -0
  638. package/dist/esm/config/bits/conclusionBitConfig.js.map +1 -0
  639. package/dist/esm/config/bits/conversationBitConfig.js +17 -0
  640. package/dist/esm/config/bits/conversationBitConfig.js.map +1 -0
  641. package/dist/esm/config/bits/correctionBitConfig.js +10 -0
  642. package/dist/esm/config/bits/correctionBitConfig.js.map +1 -0
  643. package/dist/esm/config/bits/dangerBitConfig.js +10 -0
  644. package/dist/esm/config/bits/dangerBitConfig.js.map +1 -0
  645. package/dist/esm/config/bits/details1BitConfig.js +9 -0
  646. package/dist/esm/config/bits/details1BitConfig.js.map +1 -0
  647. package/dist/esm/config/bits/detailsBitConfig.js +10 -0
  648. package/dist/esm/config/bits/detailsBitConfig.js.map +1 -0
  649. package/dist/esm/config/bits/documentBitConfig.js +12 -0
  650. package/dist/esm/config/bits/documentBitConfig.js.map +1 -0
  651. package/dist/esm/config/bits/documentDownloadBitConfig.js +12 -0
  652. package/dist/esm/config/bits/documentDownloadBitConfig.js.map +1 -0
  653. package/dist/esm/config/bits/documentEmbedBitConfig.js +12 -0
  654. package/dist/esm/config/bits/documentEmbedBitConfig.js.map +1 -0
  655. package/dist/esm/config/bits/documentLinkBitConfig.js +12 -0
  656. package/dist/esm/config/bits/documentLinkBitConfig.js.map +1 -0
  657. package/dist/esm/config/bits/documentUploadBitConfig.js +9 -0
  658. package/dist/esm/config/bits/documentUploadBitConfig.js.map +1 -0
  659. package/dist/esm/config/bits/editorialBitConfig.js +10 -0
  660. package/dist/esm/config/bits/editorialBitConfig.js.map +1 -0
  661. package/dist/esm/config/bits/essayBitConfig.js +11 -0
  662. package/dist/esm/config/bits/essayBitConfig.js.map +1 -0
  663. package/dist/esm/config/bits/exampleBitConfig.js +10 -0
  664. package/dist/esm/config/bits/exampleBitConfig.js.map +1 -0
  665. package/dist/esm/config/bits/featuredBitConfig.js +10 -0
  666. package/dist/esm/config/bits/featuredBitConfig.js.map +1 -0
  667. package/dist/esm/config/bits/flashcard1BitConfig.js +9 -0
  668. package/dist/esm/config/bits/flashcard1BitConfig.js.map +1 -0
  669. package/dist/esm/config/bits/flashcardBitConfig.js +9 -0
  670. package/dist/esm/config/bits/flashcardBitConfig.js.map +1 -0
  671. package/dist/esm/config/bits/focusImageBitConfig.js +13 -0
  672. package/dist/esm/config/bits/focusImageBitConfig.js.map +1 -0
  673. package/dist/esm/config/bits/footNoteBitConfig.js +10 -0
  674. package/dist/esm/config/bits/footNoteBitConfig.js.map +1 -0
  675. package/dist/esm/config/bits/generic/cardSetBitConfigs.js +127 -0
  676. package/dist/esm/config/bits/generic/cardSetBitConfigs.js.map +1 -0
  677. package/dist/esm/config/bits/generic/chainBitConfigs.js +42 -0
  678. package/dist/esm/config/bits/generic/chainBitConfigs.js.map +1 -0
  679. package/dist/esm/config/bits/generic/resourceChainBitConfigs.js +173 -0
  680. package/dist/esm/config/bits/generic/resourceChainBitConfigs.js.map +1 -0
  681. package/dist/esm/config/bits/generic/standardBitConfigs.js +40 -0
  682. package/dist/esm/config/bits/generic/standardBitConfigs.js.map +1 -0
  683. package/dist/esm/config/bits/groupBornBitConfig.js +9 -0
  684. package/dist/esm/config/bits/groupBornBitConfig.js.map +1 -0
  685. package/dist/esm/config/bits/groupDiedBitConfig.js +9 -0
  686. package/dist/esm/config/bits/groupDiedBitConfig.js.map +1 -0
  687. package/dist/esm/config/bits/helpBitConfig.js +10 -0
  688. package/dist/esm/config/bits/helpBitConfig.js.map +1 -0
  689. package/dist/esm/config/bits/highlightTextBitConfig.js +11 -0
  690. package/dist/esm/config/bits/highlightTextBitConfig.js.map +1 -0
  691. package/dist/esm/config/bits/hintBitConfig.js +10 -0
  692. package/dist/esm/config/bits/hintBitConfig.js.map +1 -0
  693. package/dist/esm/config/bits/imageBitConfig.js +12 -0
  694. package/dist/esm/config/bits/imageBitConfig.js.map +1 -0
  695. package/dist/esm/config/bits/imageLinkBitConfig.js +12 -0
  696. package/dist/esm/config/bits/imageLinkBitConfig.js.map +1 -0
  697. package/dist/esm/config/bits/imagePrototypeBitConfig.js +12 -0
  698. package/dist/esm/config/bits/imagePrototypeBitConfig.js.map +1 -0
  699. package/dist/esm/config/bits/imageSuperWideBitConfig.js +12 -0
  700. package/dist/esm/config/bits/imageSuperWideBitConfig.js.map +1 -0
  701. package/dist/esm/config/bits/imageZoomBitConfig.js +12 -0
  702. package/dist/esm/config/bits/imageZoomBitConfig.js.map +1 -0
  703. package/dist/esm/config/bits/infoBitConfig.js +10 -0
  704. package/dist/esm/config/bits/infoBitConfig.js.map +1 -0
  705. package/dist/esm/config/bits/internalLinkBitConfig.js +10 -0
  706. package/dist/esm/config/bits/internalLinkBitConfig.js.map +1 -0
  707. package/dist/esm/config/bits/interviewBitConfig.js +13 -0
  708. package/dist/esm/config/bits/interviewBitConfig.js.map +1 -0
  709. package/dist/esm/config/bits/interviewInstructionGroupedBitConfig.js +13 -0
  710. package/dist/esm/config/bits/interviewInstructionGroupedBitConfig.js.map +1 -0
  711. package/dist/esm/config/bits/learningPathBitConfig.js +85 -0
  712. package/dist/esm/config/bits/learningPathBitConfig.js.map +1 -0
  713. package/dist/esm/config/bits/markBitConfig.js +10 -0
  714. package/dist/esm/config/bits/markBitConfig.js.map +1 -0
  715. package/dist/esm/config/bits/matchBitConfig.js +62 -0
  716. package/dist/esm/config/bits/matchBitConfig.js.map +1 -0
  717. package/dist/esm/config/bits/messageBitConfig.js +10 -0
  718. package/dist/esm/config/bits/messageBitConfig.js.map +1 -0
  719. package/dist/esm/config/bits/multipleChoice1BitConfig.js +11 -0
  720. package/dist/esm/config/bits/multipleChoice1BitConfig.js.map +1 -0
  721. package/dist/esm/config/bits/multipleChoiceBitConfig.js +14 -0
  722. package/dist/esm/config/bits/multipleChoiceBitConfig.js.map +1 -0
  723. package/dist/esm/config/bits/multipleChoiceTextBitConfig.js +11 -0
  724. package/dist/esm/config/bits/multipleChoiceTextBitConfig.js.map +1 -0
  725. package/dist/esm/config/bits/multipleResponse1BitConfig.js +11 -0
  726. package/dist/esm/config/bits/multipleResponse1BitConfig.js.map +1 -0
  727. package/dist/esm/config/bits/multipleResponseBitConfig.js +14 -0
  728. package/dist/esm/config/bits/multipleResponseBitConfig.js.map +1 -0
  729. package/dist/esm/config/bits/newspaperArticleBitConfig.js +10 -0
  730. package/dist/esm/config/bits/newspaperArticleBitConfig.js.map +1 -0
  731. package/dist/esm/config/bits/noteAiBitConfig.js +11 -0
  732. package/dist/esm/config/bits/noteAiBitConfig.js.map +1 -0
  733. package/dist/esm/config/bits/noteBitConfig.js +10 -0
  734. package/dist/esm/config/bits/noteBitConfig.js.map +1 -0
  735. package/dist/esm/config/bits/notebookArticleBitConfig.js +10 -0
  736. package/dist/esm/config/bits/notebookArticleBitConfig.js.map +1 -0
  737. package/dist/esm/config/bits/pageBitConfig.js +10 -0
  738. package/dist/esm/config/bits/pageBitConfig.js.map +1 -0
  739. package/dist/esm/config/bits/photoBitConfig.js +12 -0
  740. package/dist/esm/config/bits/photoBitConfig.js.map +1 -0
  741. package/dist/esm/config/bits/preparationNoteBitConfig.js +10 -0
  742. package/dist/esm/config/bits/preparationNoteBitConfig.js.map +1 -0
  743. package/dist/esm/config/bits/question1BitConfig.js +10 -0
  744. package/dist/esm/config/bits/question1BitConfig.js.map +1 -0
  745. package/dist/esm/config/bits/quoteBitConfig.js +10 -0
  746. package/dist/esm/config/bits/quoteBitConfig.js.map +1 -0
  747. package/dist/esm/config/bits/ratingBitConfig.js +9 -0
  748. package/dist/esm/config/bits/ratingBitConfig.js.map +1 -0
  749. package/dist/esm/config/bits/recordAudioBitConfig.js +9 -0
  750. package/dist/esm/config/bits/recordAudioBitConfig.js.map +1 -0
  751. package/dist/esm/config/bits/releaseNoteBitConfig.js +11 -0
  752. package/dist/esm/config/bits/releaseNoteBitConfig.js.map +1 -0
  753. package/dist/esm/config/bits/releaseNotesSummaryBitConfig.js +10 -0
  754. package/dist/esm/config/bits/releaseNotesSummaryBitConfig.js.map +1 -0
  755. package/dist/esm/config/bits/remarkBitConfig.js +10 -0
  756. package/dist/esm/config/bits/remarkBitConfig.js.map +1 -0
  757. package/dist/esm/config/bits/sampleSolutionBitConfig.js +13 -0
  758. package/dist/esm/config/bits/sampleSolutionBitConfig.js.map +1 -0
  759. package/dist/esm/config/bits/screenshotBitConfig.js +12 -0
  760. package/dist/esm/config/bits/screenshotBitConfig.js.map +1 -0
  761. package/dist/esm/config/bits/selfAssessmentBitConfig.js +10 -0
  762. package/dist/esm/config/bits/selfAssessmentBitConfig.js.map +1 -0
  763. package/dist/esm/config/bits/sequenceBitConfig.js +13 -0
  764. package/dist/esm/config/bits/sequenceBitConfig.js.map +1 -0
  765. package/dist/esm/config/bits/sideNoteBitConfig.js +10 -0
  766. package/dist/esm/config/bits/sideNoteBitConfig.js.map +1 -0
  767. package/dist/esm/config/bits/statementBitConfig.js +10 -0
  768. package/dist/esm/config/bits/statementBitConfig.js.map +1 -0
  769. package/dist/esm/config/bits/stickyNoteBitConfig.js +10 -0
  770. package/dist/esm/config/bits/stickyNoteBitConfig.js.map +1 -0
  771. package/dist/esm/config/bits/stillImageFilmBitConfig.js +12 -0
  772. package/dist/esm/config/bits/stillImageFilmBitConfig.js.map +1 -0
  773. package/dist/esm/config/bits/stillImageFilmEmbedBitConfig.js +12 -0
  774. package/dist/esm/config/bits/stillImageFilmEmbedBitConfig.js.map +1 -0
  775. package/dist/esm/config/bits/stillImageFilmLinkBitConfig.js +12 -0
  776. package/dist/esm/config/bits/stillImageFilmLinkBitConfig.js.map +1 -0
  777. package/dist/esm/config/bits/summaryAiBitConfig.js +11 -0
  778. package/dist/esm/config/bits/summaryAiBitConfig.js.map +1 -0
  779. package/dist/esm/config/bits/summaryBitConfig.js +11 -0
  780. package/dist/esm/config/bits/summaryBitConfig.js.map +1 -0
  781. package/dist/esm/config/bits/survey1BitConfig.js +10 -0
  782. package/dist/esm/config/bits/survey1BitConfig.js.map +1 -0
  783. package/dist/esm/config/bits/surveyAnonymous1BitConfig.js +10 -0
  784. package/dist/esm/config/bits/surveyAnonymous1BitConfig.js.map +1 -0
  785. package/dist/esm/config/bits/surveyAnonymousBitConfig.js +10 -0
  786. package/dist/esm/config/bits/surveyAnonymousBitConfig.js.map +1 -0
  787. package/dist/esm/config/bits/surveyBitConfig.js +10 -0
  788. package/dist/esm/config/bits/surveyBitConfig.js.map +1 -0
  789. package/dist/esm/config/bits/takePictureBitConfig.js +9 -0
  790. package/dist/esm/config/bits/takePictureBitConfig.js.map +1 -0
  791. package/dist/esm/config/bits/tocBitConfig.js +9 -0
  792. package/dist/esm/config/bits/tocBitConfig.js.map +1 -0
  793. package/dist/esm/config/bits/trueFalse1BitConfig.js +12 -0
  794. package/dist/esm/config/bits/trueFalse1BitConfig.js.map +1 -0
  795. package/dist/esm/config/bits/trueFalseBitConfig.js +14 -0
  796. package/dist/esm/config/bits/trueFalseBitConfig.js.map +1 -0
  797. package/dist/esm/config/bits/vendorPadletEmbedBitConfig.js +10 -0
  798. package/dist/esm/config/bits/vendorPadletEmbedBitConfig.js.map +1 -0
  799. package/dist/esm/config/bits/videoBitConfig.js +12 -0
  800. package/dist/esm/config/bits/videoBitConfig.js.map +1 -0
  801. package/dist/esm/config/bits/videoEmbedBitConfig.js +12 -0
  802. package/dist/esm/config/bits/videoEmbedBitConfig.js.map +1 -0
  803. package/dist/esm/config/bits/videoLandscapeBitConfig.js +12 -0
  804. package/dist/esm/config/bits/videoLandscapeBitConfig.js.map +1 -0
  805. package/dist/esm/config/bits/videoLinkBitConfig.js +12 -0
  806. package/dist/esm/config/bits/videoLinkBitConfig.js.map +1 -0
  807. package/dist/esm/config/bits/videoPortraitBitConfig.js +12 -0
  808. package/dist/esm/config/bits/videoPortraitBitConfig.js.map +1 -0
  809. package/dist/esm/config/bits/warningBitConfig.js +10 -0
  810. package/dist/esm/config/bits/warningBitConfig.js.map +1 -0
  811. package/dist/esm/config/bits/websiteLinkBitConfig.js +12 -0
  812. package/dist/esm/config/bits/websiteLinkBitConfig.js.map +1 -0
  813. package/dist/esm/config/bits/workbookArticleBitConfig.js +10 -0
  814. package/dist/esm/config/bits/workbookArticleBitConfig.js.map +1 -0
  815. package/dist/esm/config/config.js +175 -0
  816. package/dist/esm/config/config.js.map +1 -0
  817. package/dist/esm/config/properties/actionPropertyConfig.js +7 -0
  818. package/dist/esm/config/properties/actionPropertyConfig.js.map +1 -0
  819. package/dist/esm/config/properties/ageRangePropertyConfig.js +6 -0
  820. package/dist/esm/config/properties/ageRangePropertyConfig.js.map +1 -0
  821. package/dist/esm/config/properties/aiGeneratedPropertyConfig.js +9 -0
  822. package/dist/esm/config/properties/aiGeneratedPropertyConfig.js.map +1 -0
  823. package/dist/esm/config/properties/authorPropertyConfig.js +6 -0
  824. package/dist/esm/config/properties/authorPropertyConfig.js.map +1 -0
  825. package/dist/esm/config/properties/bookPropertyConfig.js +7 -0
  826. package/dist/esm/config/properties/bookPropertyConfig.js.map +1 -0
  827. package/dist/esm/config/properties/botPropertyConfig.js +6 -0
  828. package/dist/esm/config/properties/botPropertyConfig.js.map +1 -0
  829. package/dist/esm/config/properties/caseSensitivePropertyConfig.js +9 -0
  830. package/dist/esm/config/properties/caseSensitivePropertyConfig.js.map +1 -0
  831. package/dist/esm/config/properties/computerLanguagePropertyConfig.js +7 -0
  832. package/dist/esm/config/properties/computerLanguagePropertyConfig.js.map +1 -0
  833. package/dist/esm/config/properties/coverImagePropertyConfig.js +6 -0
  834. package/dist/esm/config/properties/coverImagePropertyConfig.js.map +1 -0
  835. package/dist/esm/config/properties/datePropertyConfig.js +6 -0
  836. package/dist/esm/config/properties/datePropertyConfig.js.map +1 -0
  837. package/dist/esm/config/properties/deeplinkPropertyConfig.js +6 -0
  838. package/dist/esm/config/properties/deeplinkPropertyConfig.js.map +1 -0
  839. package/dist/esm/config/properties/durationPropertyConfig.js +7 -0
  840. package/dist/esm/config/properties/durationPropertyConfig.js.map +1 -0
  841. package/dist/esm/config/properties/examplePropertyConfig.js +7 -0
  842. package/dist/esm/config/properties/examplePropertyConfig.js.map +1 -0
  843. package/dist/esm/config/properties/externalIdPropertyConfig.js +6 -0
  844. package/dist/esm/config/properties/externalIdPropertyConfig.js.map +1 -0
  845. package/dist/esm/config/properties/externalLinkPropertyConfig.js +7 -0
  846. package/dist/esm/config/properties/externalLinkPropertyConfig.js.map +1 -0
  847. package/dist/esm/config/properties/externalLinkTextPropertyConfig.js +7 -0
  848. package/dist/esm/config/properties/externalLinkTextPropertyConfig.js.map +1 -0
  849. package/dist/esm/config/properties/focusXPropertyConfig.js +7 -0
  850. package/dist/esm/config/properties/focusXPropertyConfig.js.map +1 -0
  851. package/dist/esm/config/properties/focusYPropertyConfig.js +7 -0
  852. package/dist/esm/config/properties/focusYPropertyConfig.js.map +1 -0
  853. package/dist/esm/config/properties/idPropertyConfig.js +6 -0
  854. package/dist/esm/config/properties/idPropertyConfig.js.map +1 -0
  855. package/dist/esm/config/properties/isInfoOnlyPropertyConfig.js +7 -0
  856. package/dist/esm/config/properties/isInfoOnlyPropertyConfig.js.map +1 -0
  857. package/dist/esm/config/properties/isTrackedPropertyConfig.js +7 -0
  858. package/dist/esm/config/properties/isTrackedPropertyConfig.js.map +1 -0
  859. package/dist/esm/config/properties/kindPropertyConfig.js +7 -0
  860. package/dist/esm/config/properties/kindPropertyConfig.js.map +1 -0
  861. package/dist/esm/config/properties/labelFalsePropertyConfig.js +7 -0
  862. package/dist/esm/config/properties/labelFalsePropertyConfig.js.map +1 -0
  863. package/dist/esm/config/properties/labelTruePropertyConfig.js +7 -0
  864. package/dist/esm/config/properties/labelTruePropertyConfig.js.map +1 -0
  865. package/dist/esm/config/properties/languagePropertyConfig.js +6 -0
  866. package/dist/esm/config/properties/languagePropertyConfig.js.map +1 -0
  867. package/dist/esm/config/properties/levelPropertyConfig.js +7 -0
  868. package/dist/esm/config/properties/levelPropertyConfig.js.map +1 -0
  869. package/dist/esm/config/properties/listPropertyConfig.js +6 -0
  870. package/dist/esm/config/properties/listPropertyConfig.js.map +1 -0
  871. package/dist/esm/config/properties/locationPropertyConfig.js +7 -0
  872. package/dist/esm/config/properties/locationPropertyConfig.js.map +1 -0
  873. package/dist/esm/config/properties/longAnswerPropertyConfig.js +9 -0
  874. package/dist/esm/config/properties/longAnswerPropertyConfig.js.map +1 -0
  875. package/dist/esm/config/properties/padletIdPropertyConfig.js +7 -0
  876. package/dist/esm/config/properties/padletIdPropertyConfig.js.map +1 -0
  877. package/dist/esm/config/properties/partialAnswerPropertyConfig.js +7 -0
  878. package/dist/esm/config/properties/partialAnswerPropertyConfig.js.map +1 -0
  879. package/dist/esm/config/properties/partnerPropertyConfig.js +7 -0
  880. package/dist/esm/config/properties/partnerPropertyConfig.js.map +1 -0
  881. package/dist/esm/config/properties/progressPropertyConfig.js +8 -0
  882. package/dist/esm/config/properties/progressPropertyConfig.js.map +1 -0
  883. package/dist/esm/config/properties/publicationsPropertyConfig.js +6 -0
  884. package/dist/esm/config/properties/publicationsPropertyConfig.js.map +1 -0
  885. package/dist/esm/config/properties/publisherPropertyConfig.js +6 -0
  886. package/dist/esm/config/properties/publisherPropertyConfig.js.map +1 -0
  887. package/dist/esm/config/properties/quotedPersonPropertyConfig.js +7 -0
  888. package/dist/esm/config/properties/quotedPersonPropertyConfig.js.map +1 -0
  889. package/dist/esm/config/properties/reactionPropertyConfig.js +7 -0
  890. package/dist/esm/config/properties/reactionPropertyConfig.js.map +1 -0
  891. package/dist/esm/config/properties/referencePropertyConfig.js +8 -0
  892. package/dist/esm/config/properties/referencePropertyConfig.js.map +1 -0
  893. package/dist/esm/config/properties/releaseVersionPropertyConfig.js +7 -0
  894. package/dist/esm/config/properties/releaseVersionPropertyConfig.js.map +1 -0
  895. package/dist/esm/config/properties/resourcePropertyConfig.js +76 -0
  896. package/dist/esm/config/properties/resourcePropertyConfig.js.map +1 -0
  897. package/dist/esm/config/properties/sampleSolutionPropertyConfig.js +7 -0
  898. package/dist/esm/config/properties/sampleSolutionPropertyConfig.js.map +1 -0
  899. package/dist/esm/config/properties/shortAnswerPropertyConfig.js +9 -0
  900. package/dist/esm/config/properties/shortAnswerPropertyConfig.js.map +1 -0
  901. package/dist/esm/config/properties/spaceIdPropertyConfig.js +6 -0
  902. package/dist/esm/config/properties/spaceIdPropertyConfig.js.map +1 -0
  903. package/dist/esm/config/properties/subjectPropertyConfig.js +6 -0
  904. package/dist/esm/config/properties/subjectPropertyConfig.js.map +1 -0
  905. package/dist/esm/config/properties/subtypePropertyConfig.js +7 -0
  906. package/dist/esm/config/properties/subtypePropertyConfig.js.map +1 -0
  907. package/dist/esm/config/properties/textReferencePropertyConfig.js +7 -0
  908. package/dist/esm/config/properties/textReferencePropertyConfig.js.map +1 -0
  909. package/dist/esm/config/properties/themePropertyConfig.js +6 -0
  910. package/dist/esm/config/properties/themePropertyConfig.js.map +1 -0
  911. package/dist/esm/config/properties/thumbImagePropertyConfig.js +7 -0
  912. package/dist/esm/config/properties/thumbImagePropertyConfig.js.map +1 -0
  913. package/dist/esm/config/properties/tocPropertyConfig.js +8 -0
  914. package/dist/esm/config/properties/tocPropertyConfig.js.map +1 -0
  915. package/dist/esm/config/properties/videoCallLinkPropertyConfig copy.js +7 -0
  916. package/dist/esm/config/properties/videoCallLinkPropertyConfig copy.js.map +1 -0
  917. package/dist/esm/config/properties/videoCallLinkPropertyConfig.js +7 -0
  918. package/dist/esm/config/properties/videoCallLinkPropertyConfig.js.map +1 -0
  919. package/dist/esm/generated/build-info.js +7 -0
  920. package/dist/esm/generated/build-info.js.map +1 -0
  921. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +3425 -0
  922. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js.map +1 -0
  923. package/dist/esm/generated/parser/text/text-peggy-parser.js +6893 -0
  924. package/dist/esm/generated/parser/text/text-peggy-parser.js.map +1 -0
  925. package/dist/esm/generator/Generator.js +2 -0
  926. package/dist/esm/generator/Generator.js.map +1 -0
  927. package/dist/esm/generator/bitmark/BitmarkFileGenerator.js +46 -0
  928. package/dist/esm/generator/bitmark/BitmarkFileGenerator.js.map +1 -0
  929. package/dist/esm/generator/bitmark/BitmarkGenerator.js +1199 -0
  930. package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -0
  931. package/dist/esm/generator/bitmark/BitmarkStringGenerator.js +48 -0
  932. package/dist/esm/generator/bitmark/BitmarkStringGenerator.js.map +1 -0
  933. package/dist/esm/generator/json/JsonFileGenerator.js +50 -0
  934. package/dist/esm/generator/json/JsonFileGenerator.js.map +1 -0
  935. package/dist/esm/generator/json/JsonGenerator.js +2046 -0
  936. package/dist/esm/generator/json/JsonGenerator.js.map +1 -0
  937. package/dist/esm/generator/json/JsonObjectGenerator.js +48 -0
  938. package/dist/esm/generator/json/JsonObjectGenerator.js.map +1 -0
  939. package/dist/esm/generator/json/JsonStringGenerator.js +47 -0
  940. package/dist/esm/generator/json/JsonStringGenerator.js.map +1 -0
  941. package/dist/esm/generator/text/TextGenerator.js +660 -0
  942. package/dist/esm/generator/text/TextGenerator.js.map +1 -0
  943. package/dist/esm/index.js +40 -0
  944. package/dist/esm/index.js.map +1 -0
  945. package/dist/esm/init/init.js +13 -0
  946. package/dist/esm/init/init.js.map +1 -0
  947. package/dist/esm/model/ast/NodeType.js +235 -0
  948. package/dist/esm/model/ast/NodeType.js.map +1 -0
  949. package/dist/esm/model/ast/Nodes.js +2 -0
  950. package/dist/esm/model/ast/Nodes.js.map +1 -0
  951. package/dist/esm/model/ast/TextNodes.js +2 -0
  952. package/dist/esm/model/ast/TextNodes.js.map +1 -0
  953. package/dist/esm/model/config/TagData.js +3 -0
  954. package/dist/esm/model/config/TagData.js.map +1 -0
  955. package/dist/esm/model/enum/BitType.js +182 -0
  956. package/dist/esm/model/enum/BitType.js.map +1 -0
  957. package/dist/esm/model/enum/BitmarkGeneratorOutput.js +2 -0
  958. package/dist/esm/model/enum/BitmarkGeneratorOutput.js.map +1 -0
  959. package/dist/esm/model/enum/BitmarkParserType.js +7 -0
  960. package/dist/esm/model/enum/BitmarkParserType.js.map +1 -0
  961. package/dist/esm/model/enum/BitmarkVersion.js +8 -0
  962. package/dist/esm/model/enum/BitmarkVersion.js.map +1 -0
  963. package/dist/esm/model/enum/BodyBitType.js +10 -0
  964. package/dist/esm/model/enum/BodyBitType.js.map +1 -0
  965. package/dist/esm/model/enum/CardSetType.js +12 -0
  966. package/dist/esm/model/enum/CardSetType.js.map +1 -0
  967. package/dist/esm/model/enum/CardSetVersion.js +7 -0
  968. package/dist/esm/model/enum/CardSetVersion.js.map +1 -0
  969. package/dist/esm/model/enum/PropertyKey.js +73 -0
  970. package/dist/esm/model/enum/PropertyKey.js.map +1 -0
  971. package/dist/esm/model/enum/ResourceType.js +28 -0
  972. package/dist/esm/model/enum/ResourceType.js.map +1 -0
  973. package/dist/esm/model/enum/TagType.js +19 -0
  974. package/dist/esm/model/enum/TagType.js.map +1 -0
  975. package/dist/esm/model/enum/TextFormat.js +8 -0
  976. package/dist/esm/model/enum/TextFormat.js.map +1 -0
  977. package/dist/esm/model/enum/TextMarkType.js +22 -0
  978. package/dist/esm/model/enum/TextMarkType.js.map +1 -0
  979. package/dist/esm/model/enum/TextNodeType.js +23 -0
  980. package/dist/esm/model/enum/TextNodeType.js.map +1 -0
  981. package/dist/esm/model/enum/TextSection.js +15 -0
  982. package/dist/esm/model/enum/TextSection.js.map +1 -0
  983. package/dist/esm/model/json/BitJson.js +2 -0
  984. package/dist/esm/model/json/BitJson.js.map +1 -0
  985. package/dist/esm/model/json/BitWrapperJson.js +2 -0
  986. package/dist/esm/model/json/BitWrapperJson.js.map +1 -0
  987. package/dist/esm/model/json/BodyBitJson.js +2 -0
  988. package/dist/esm/model/json/BodyBitJson.js.map +1 -0
  989. package/dist/esm/model/json/ParserJson.js +2 -0
  990. package/dist/esm/model/json/ParserJson.js.map +1 -0
  991. package/dist/esm/model/json/ResourceJson.js +2 -0
  992. package/dist/esm/model/json/ResourceJson.js.map +1 -0
  993. package/dist/esm/model/parser/ParserData.js +2 -0
  994. package/dist/esm/model/parser/ParserData.js.map +1 -0
  995. package/dist/esm/model/parser/ParserError.js +2 -0
  996. package/dist/esm/model/parser/ParserError.js.map +1 -0
  997. package/dist/esm/model/parser/ParserInfo.js +2 -0
  998. package/dist/esm/model/parser/ParserInfo.js.map +1 -0
  999. package/dist/esm/model/parser/ParserLocation.js +2 -0
  1000. package/dist/esm/model/parser/ParserLocation.js.map +1 -0
  1001. package/dist/esm/model/parser/ParserLocationRange.js +2 -0
  1002. package/dist/esm/model/parser/ParserLocationRange.js.map +1 -0
  1003. package/dist/esm/parser/bitmark/BitmarkParser.js +64 -0
  1004. package/dist/esm/parser/bitmark/BitmarkParser.js.map +1 -0
  1005. package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js +4 -0
  1006. package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js.map +1 -0
  1007. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +530 -0
  1008. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +1 -0
  1009. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +572 -0
  1010. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +1 -0
  1011. package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js +54 -0
  1012. package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +1 -0
  1013. package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +607 -0
  1014. package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +1 -0
  1015. package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js +79 -0
  1016. package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js.map +1 -0
  1017. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +32 -0
  1018. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +1 -0
  1019. package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +402 -0
  1020. package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -0
  1021. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +13 -0
  1022. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +1 -0
  1023. package/dist/esm/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js +16 -0
  1024. package/dist/esm/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.js.map +1 -0
  1025. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +32 -0
  1026. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +1 -0
  1027. package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +39 -0
  1028. package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +1 -0
  1029. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +13 -0
  1030. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +1 -0
  1031. package/dist/esm/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js +48 -0
  1032. package/dist/esm/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.js.map +1 -0
  1033. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +60 -0
  1034. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +1 -0
  1035. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +13 -0
  1036. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +1 -0
  1037. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +111 -0
  1038. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +1 -0
  1039. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +38 -0
  1040. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +1 -0
  1041. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +174 -0
  1042. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +1 -0
  1043. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +15 -0
  1044. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +1 -0
  1045. package/dist/esm/parser/json/JsonParser.js +589 -0
  1046. package/dist/esm/parser/json/JsonParser.js.map +1 -0
  1047. package/dist/esm/parser/text/TextParser.js +30 -0
  1048. package/dist/esm/parser/text/TextParser.js.map +1 -0
  1049. package/dist/esm/parser/text/peg/TextPegParser.js +4 -0
  1050. package/dist/esm/parser/text/peg/TextPegParser.js.map +1 -0
  1051. package/dist/esm/utils/ArrayUtils.js +40 -0
  1052. package/dist/esm/utils/ArrayUtils.js.map +1 -0
  1053. package/dist/esm/utils/BitUtils.js +31 -0
  1054. package/dist/esm/utils/BitUtils.js.map +1 -0
  1055. package/dist/esm/utils/BooleanUtils.js +59 -0
  1056. package/dist/esm/utils/BooleanUtils.js.map +1 -0
  1057. package/dist/esm/utils/FileUtils.js +36 -0
  1058. package/dist/esm/utils/FileUtils.js.map +1 -0
  1059. package/dist/esm/utils/NumberUtils.js +23 -0
  1060. package/dist/esm/utils/NumberUtils.js.map +1 -0
  1061. package/dist/esm/utils/ObjectUtils.js +200 -0
  1062. package/dist/esm/utils/ObjectUtils.js.map +1 -0
  1063. package/dist/esm/utils/StringUtils.js +131 -0
  1064. package/dist/esm/utils/StringUtils.js.map +1 -0
  1065. package/dist/esm/utils/UrlUtils.js +34 -0
  1066. package/dist/esm/utils/UrlUtils.js.map +1 -0
  1067. package/dist/esm/utils/env/Env.js +127 -0
  1068. package/dist/esm/utils/env/Env.js.map +1 -0
  1069. package/dist/esm/utils/env/Environment.js +12 -0
  1070. package/dist/esm/utils/env/Environment.js.map +1 -0
  1071. package/dist/esm/utils/env/Os.js +11 -0
  1072. package/dist/esm/utils/env/Os.js.map +1 -0
  1073. package/dist/esm/utils/env/Version.js +9 -0
  1074. package/dist/esm/utils/env/Version.js.map +1 -0
  1075. package/dist/esm/utils/env/userAgent.js +86 -0
  1076. package/dist/esm/utils/env/userAgent.js.map +1 -0
  1077. package/dist/esm/utils/polyfill/fs.js +11 -0
  1078. package/dist/esm/utils/polyfill/fs.js.map +1 -0
  1079. package/dist/types/BitmarkParserGenerator.d.ts +212 -0
  1080. package/dist/types/BitmarkParserGenerator.d.ts.map +1 -0
  1081. package/dist/types/ast/Ast.d.ts +141 -0
  1082. package/dist/types/ast/Ast.d.ts.map +1 -0
  1083. package/dist/types/ast/BaseBuilder.d.ts +22 -0
  1084. package/dist/types/ast/BaseBuilder.d.ts.map +1 -0
  1085. package/dist/types/ast/Builder.d.ts +402 -0
  1086. package/dist/types/ast/Builder.d.ts.map +1 -0
  1087. package/dist/types/ast/ResourceBuilder.d.ts +383 -0
  1088. package/dist/types/ast/ResourceBuilder.d.ts.map +1 -0
  1089. package/dist/types/ast/rules/NodeValidator.d.ts +20 -0
  1090. package/dist/types/ast/rules/NodeValidator.d.ts.map +1 -0
  1091. package/dist/types/ast/writer/FileWriter.d.ts +39 -0
  1092. package/dist/types/ast/writer/FileWriter.d.ts.map +1 -0
  1093. package/dist/types/ast/writer/StreamWriter.d.ts +28 -0
  1094. package/dist/types/ast/writer/StreamWriter.d.ts.map +1 -0
  1095. package/dist/types/ast/writer/StringWriter.d.ts +28 -0
  1096. package/dist/types/ast/writer/StringWriter.d.ts.map +1 -0
  1097. package/dist/types/ast/writer/Writer.d.ts +66 -0
  1098. package/dist/types/ast/writer/Writer.d.ts.map +1 -0
  1099. package/dist/types/config/bits/_errorBitConfig.d.ts +2 -0
  1100. package/dist/types/config/bits/_errorBitConfig.d.ts.map +1 -0
  1101. package/dist/types/config/bits/aiPromptBitConfig.d.ts +2 -0
  1102. package/dist/types/config/bits/aiPromptBitConfig.d.ts.map +1 -0
  1103. package/dist/types/config/bits/anchorBitConfig.d.ts +2 -0
  1104. package/dist/types/config/bits/anchorBitConfig.d.ts.map +1 -0
  1105. package/dist/types/config/bits/appLinkBitConfig.d.ts +2 -0
  1106. package/dist/types/config/bits/appLinkBitConfig.d.ts.map +1 -0
  1107. package/dist/types/config/bits/articleAiBitConfig.d.ts +2 -0
  1108. package/dist/types/config/bits/articleAiBitConfig.d.ts.map +1 -0
  1109. package/dist/types/config/bits/articleAttachmentBitConfig.d.ts +2 -0
  1110. package/dist/types/config/bits/articleAttachmentBitConfig.d.ts.map +1 -0
  1111. package/dist/types/config/bits/articleBitConfig.d.ts +2 -0
  1112. package/dist/types/config/bits/articleBitConfig.d.ts.map +1 -0
  1113. package/dist/types/config/bits/articleEmbedBitConfig.d.ts +2 -0
  1114. package/dist/types/config/bits/articleEmbedBitConfig.d.ts.map +1 -0
  1115. package/dist/types/config/bits/articleLinkBitConfig.d.ts +2 -0
  1116. package/dist/types/config/bits/articleLinkBitConfig.d.ts.map +1 -0
  1117. package/dist/types/config/bits/assignmentBitConfig.d.ts +2 -0
  1118. package/dist/types/config/bits/assignmentBitConfig.d.ts.map +1 -0
  1119. package/dist/types/config/bits/audioBitConfig.d.ts +2 -0
  1120. package/dist/types/config/bits/audioBitConfig.d.ts.map +1 -0
  1121. package/dist/types/config/bits/audioEmbedBitConfig.d.ts +2 -0
  1122. package/dist/types/config/bits/audioEmbedBitConfig.d.ts.map +1 -0
  1123. package/dist/types/config/bits/audioLinkBitConfig.d.ts +2 -0
  1124. package/dist/types/config/bits/audioLinkBitConfig.d.ts.map +1 -0
  1125. package/dist/types/config/bits/bitAliasBitConfig.d.ts +2 -0
  1126. package/dist/types/config/bits/bitAliasBitConfig.d.ts.map +1 -0
  1127. package/dist/types/config/bits/bitBookEndingBitConfig.d.ts +2 -0
  1128. package/dist/types/config/bits/bitBookEndingBitConfig.d.ts.map +1 -0
  1129. package/dist/types/config/bits/bitBookSummaryBitConfig.d.ts +2 -0
  1130. package/dist/types/config/bits/bitBookSummaryBitConfig.d.ts.map +1 -0
  1131. package/dist/types/config/bits/blogArticleBitConfig.d.ts +2 -0
  1132. package/dist/types/config/bits/blogArticleBitConfig.d.ts.map +1 -0
  1133. package/dist/types/config/bits/bookBitConfig.d.ts +2 -0
  1134. package/dist/types/config/bits/bookBitConfig.d.ts.map +1 -0
  1135. package/dist/types/config/bits/botActionAnnounceBitConfig.d.ts +2 -0
  1136. package/dist/types/config/bits/botActionAnnounceBitConfig.d.ts.map +1 -0
  1137. package/dist/types/config/bits/botActionRatingNumberBitConfig.d.ts +2 -0
  1138. package/dist/types/config/bits/botActionRatingNumberBitConfig.d.ts.map +1 -0
  1139. package/dist/types/config/bits/botActionRemindBitConfig.d.ts +2 -0
  1140. package/dist/types/config/bits/botActionRemindBitConfig.d.ts.map +1 -0
  1141. package/dist/types/config/bits/botActionResponseBitConfig.d.ts +2 -0
  1142. package/dist/types/config/bits/botActionResponseBitConfig.d.ts.map +1 -0
  1143. package/dist/types/config/bits/botActionSaveBitConfig.d.ts +2 -0
  1144. package/dist/types/config/bits/botActionSaveBitConfig.d.ts.map +1 -0
  1145. package/dist/types/config/bits/botActionSendBitConfig.d.ts +2 -0
  1146. package/dist/types/config/bits/botActionSendBitConfig.d.ts.map +1 -0
  1147. package/dist/types/config/bits/botActionTrueFalseBitConfig.d.ts +2 -0
  1148. package/dist/types/config/bits/botActionTrueFalseBitConfig.d.ts.map +1 -0
  1149. package/dist/types/config/bits/botInterviewBitConfig.d.ts +2 -0
  1150. package/dist/types/config/bits/botInterviewBitConfig.d.ts.map +1 -0
  1151. package/dist/types/config/bits/browserImageBitConfig.d.ts +2 -0
  1152. package/dist/types/config/bits/browserImageBitConfig.d.ts.map +1 -0
  1153. package/dist/types/config/bits/bugBitConfig.d.ts +2 -0
  1154. package/dist/types/config/bits/bugBitConfig.d.ts.map +1 -0
  1155. package/dist/types/config/bits/card1BitConfig.d.ts +2 -0
  1156. package/dist/types/config/bits/card1BitConfig.d.ts.map +1 -0
  1157. package/dist/types/config/bits/chapterBitConfig.d.ts +2 -0
  1158. package/dist/types/config/bits/chapterBitConfig.d.ts.map +1 -0
  1159. package/dist/types/config/bits/chapterSubjectMatterBitConfig.d.ts +2 -0
  1160. package/dist/types/config/bits/chapterSubjectMatterBitConfig.d.ts.map +1 -0
  1161. package/dist/types/config/bits/chatBitConfig.d.ts +2 -0
  1162. package/dist/types/config/bits/chatBitConfig.d.ts.map +1 -0
  1163. package/dist/types/config/bits/clozeAndMultipleChoiceTextBitConfig.d.ts +2 -0
  1164. package/dist/types/config/bits/clozeAndMultipleChoiceTextBitConfig.d.ts.map +1 -0
  1165. package/dist/types/config/bits/clozeBitConfig.d.ts +2 -0
  1166. package/dist/types/config/bits/clozeBitConfig.d.ts.map +1 -0
  1167. package/dist/types/config/bits/clozeInstructionGroupedBitConfig.d.ts +2 -0
  1168. package/dist/types/config/bits/clozeInstructionGroupedBitConfig.d.ts.map +1 -0
  1169. package/dist/types/config/bits/clozeSolutionGroupedBitConfig.d.ts +2 -0
  1170. package/dist/types/config/bits/clozeSolutionGroupedBitConfig.d.ts.map +1 -0
  1171. package/dist/types/config/bits/codeBitConfig.d.ts +2 -0
  1172. package/dist/types/config/bits/codeBitConfig.d.ts.map +1 -0
  1173. package/dist/types/config/bits/conclusionBitConfig.d.ts +2 -0
  1174. package/dist/types/config/bits/conclusionBitConfig.d.ts.map +1 -0
  1175. package/dist/types/config/bits/conversationBitConfig.d.ts +2 -0
  1176. package/dist/types/config/bits/conversationBitConfig.d.ts.map +1 -0
  1177. package/dist/types/config/bits/correctionBitConfig.d.ts +2 -0
  1178. package/dist/types/config/bits/correctionBitConfig.d.ts.map +1 -0
  1179. package/dist/types/config/bits/dangerBitConfig.d.ts +2 -0
  1180. package/dist/types/config/bits/dangerBitConfig.d.ts.map +1 -0
  1181. package/dist/types/config/bits/details1BitConfig.d.ts +2 -0
  1182. package/dist/types/config/bits/details1BitConfig.d.ts.map +1 -0
  1183. package/dist/types/config/bits/detailsBitConfig.d.ts +2 -0
  1184. package/dist/types/config/bits/detailsBitConfig.d.ts.map +1 -0
  1185. package/dist/types/config/bits/documentBitConfig.d.ts +2 -0
  1186. package/dist/types/config/bits/documentBitConfig.d.ts.map +1 -0
  1187. package/dist/types/config/bits/documentDownloadBitConfig.d.ts +2 -0
  1188. package/dist/types/config/bits/documentDownloadBitConfig.d.ts.map +1 -0
  1189. package/dist/types/config/bits/documentEmbedBitConfig.d.ts +2 -0
  1190. package/dist/types/config/bits/documentEmbedBitConfig.d.ts.map +1 -0
  1191. package/dist/types/config/bits/documentLinkBitConfig.d.ts +2 -0
  1192. package/dist/types/config/bits/documentLinkBitConfig.d.ts.map +1 -0
  1193. package/dist/types/config/bits/documentUploadBitConfig.d.ts +2 -0
  1194. package/dist/types/config/bits/documentUploadBitConfig.d.ts.map +1 -0
  1195. package/dist/types/config/bits/editorialBitConfig.d.ts +2 -0
  1196. package/dist/types/config/bits/editorialBitConfig.d.ts.map +1 -0
  1197. package/dist/types/config/bits/essayBitConfig.d.ts +2 -0
  1198. package/dist/types/config/bits/essayBitConfig.d.ts.map +1 -0
  1199. package/dist/types/config/bits/exampleBitConfig.d.ts +2 -0
  1200. package/dist/types/config/bits/exampleBitConfig.d.ts.map +1 -0
  1201. package/dist/types/config/bits/featuredBitConfig.d.ts +2 -0
  1202. package/dist/types/config/bits/featuredBitConfig.d.ts.map +1 -0
  1203. package/dist/types/config/bits/flashcard1BitConfig.d.ts +2 -0
  1204. package/dist/types/config/bits/flashcard1BitConfig.d.ts.map +1 -0
  1205. package/dist/types/config/bits/flashcardBitConfig.d.ts +2 -0
  1206. package/dist/types/config/bits/flashcardBitConfig.d.ts.map +1 -0
  1207. package/dist/types/config/bits/focusImageBitConfig.d.ts +2 -0
  1208. package/dist/types/config/bits/focusImageBitConfig.d.ts.map +1 -0
  1209. package/dist/types/config/bits/footNoteBitConfig.d.ts +2 -0
  1210. package/dist/types/config/bits/footNoteBitConfig.d.ts.map +1 -0
  1211. package/dist/types/config/bits/generic/cardSetBitConfigs.d.ts +12 -0
  1212. package/dist/types/config/bits/generic/cardSetBitConfigs.d.ts.map +1 -0
  1213. package/dist/types/config/bits/generic/chainBitConfigs.d.ts +6 -0
  1214. package/dist/types/config/bits/generic/chainBitConfigs.d.ts.map +1 -0
  1215. package/dist/types/config/bits/generic/resourceChainBitConfigs.d.ts +25 -0
  1216. package/dist/types/config/bits/generic/resourceChainBitConfigs.d.ts.map +1 -0
  1217. package/dist/types/config/bits/generic/standardBitConfigs.d.ts +7 -0
  1218. package/dist/types/config/bits/generic/standardBitConfigs.d.ts.map +1 -0
  1219. package/dist/types/config/bits/groupBornBitConfig.d.ts +2 -0
  1220. package/dist/types/config/bits/groupBornBitConfig.d.ts.map +1 -0
  1221. package/dist/types/config/bits/groupDiedBitConfig.d.ts +2 -0
  1222. package/dist/types/config/bits/groupDiedBitConfig.d.ts.map +1 -0
  1223. package/dist/types/config/bits/helpBitConfig.d.ts +2 -0
  1224. package/dist/types/config/bits/helpBitConfig.d.ts.map +1 -0
  1225. package/dist/types/config/bits/highlightTextBitConfig.d.ts +2 -0
  1226. package/dist/types/config/bits/highlightTextBitConfig.d.ts.map +1 -0
  1227. package/dist/types/config/bits/hintBitConfig.d.ts +2 -0
  1228. package/dist/types/config/bits/hintBitConfig.d.ts.map +1 -0
  1229. package/dist/types/config/bits/imageBitConfig.d.ts +2 -0
  1230. package/dist/types/config/bits/imageBitConfig.d.ts.map +1 -0
  1231. package/dist/types/config/bits/imageLinkBitConfig.d.ts +2 -0
  1232. package/dist/types/config/bits/imageLinkBitConfig.d.ts.map +1 -0
  1233. package/dist/types/config/bits/imagePrototypeBitConfig.d.ts +2 -0
  1234. package/dist/types/config/bits/imagePrototypeBitConfig.d.ts.map +1 -0
  1235. package/dist/types/config/bits/imageSuperWideBitConfig.d.ts +2 -0
  1236. package/dist/types/config/bits/imageSuperWideBitConfig.d.ts.map +1 -0
  1237. package/dist/types/config/bits/imageZoomBitConfig.d.ts +2 -0
  1238. package/dist/types/config/bits/imageZoomBitConfig.d.ts.map +1 -0
  1239. package/dist/types/config/bits/infoBitConfig.d.ts +2 -0
  1240. package/dist/types/config/bits/infoBitConfig.d.ts.map +1 -0
  1241. package/dist/types/config/bits/internalLinkBitConfig.d.ts +2 -0
  1242. package/dist/types/config/bits/internalLinkBitConfig.d.ts.map +1 -0
  1243. package/dist/types/config/bits/interviewBitConfig.d.ts +2 -0
  1244. package/dist/types/config/bits/interviewBitConfig.d.ts.map +1 -0
  1245. package/dist/types/config/bits/interviewInstructionGroupedBitConfig.d.ts +2 -0
  1246. package/dist/types/config/bits/interviewInstructionGroupedBitConfig.d.ts.map +1 -0
  1247. package/dist/types/config/bits/learningPathBitConfig.d.ts +2 -0
  1248. package/dist/types/config/bits/learningPathBitConfig.d.ts.map +1 -0
  1249. package/dist/types/config/bits/markBitConfig.d.ts +2 -0
  1250. package/dist/types/config/bits/markBitConfig.d.ts.map +1 -0
  1251. package/dist/types/config/bits/matchBitConfig.d.ts +2 -0
  1252. package/dist/types/config/bits/matchBitConfig.d.ts.map +1 -0
  1253. package/dist/types/config/bits/messageBitConfig.d.ts +2 -0
  1254. package/dist/types/config/bits/messageBitConfig.d.ts.map +1 -0
  1255. package/dist/types/config/bits/multipleChoice1BitConfig.d.ts +2 -0
  1256. package/dist/types/config/bits/multipleChoice1BitConfig.d.ts.map +1 -0
  1257. package/dist/types/config/bits/multipleChoiceBitConfig.d.ts +2 -0
  1258. package/dist/types/config/bits/multipleChoiceBitConfig.d.ts.map +1 -0
  1259. package/dist/types/config/bits/multipleChoiceTextBitConfig.d.ts +2 -0
  1260. package/dist/types/config/bits/multipleChoiceTextBitConfig.d.ts.map +1 -0
  1261. package/dist/types/config/bits/multipleResponse1BitConfig.d.ts +2 -0
  1262. package/dist/types/config/bits/multipleResponse1BitConfig.d.ts.map +1 -0
  1263. package/dist/types/config/bits/multipleResponseBitConfig.d.ts +2 -0
  1264. package/dist/types/config/bits/multipleResponseBitConfig.d.ts.map +1 -0
  1265. package/dist/types/config/bits/newspaperArticleBitConfig.d.ts +2 -0
  1266. package/dist/types/config/bits/newspaperArticleBitConfig.d.ts.map +1 -0
  1267. package/dist/types/config/bits/noteAiBitConfig.d.ts +2 -0
  1268. package/dist/types/config/bits/noteAiBitConfig.d.ts.map +1 -0
  1269. package/dist/types/config/bits/noteBitConfig.d.ts +2 -0
  1270. package/dist/types/config/bits/noteBitConfig.d.ts.map +1 -0
  1271. package/dist/types/config/bits/notebookArticleBitConfig.d.ts +2 -0
  1272. package/dist/types/config/bits/notebookArticleBitConfig.d.ts.map +1 -0
  1273. package/dist/types/config/bits/pageBitConfig.d.ts +2 -0
  1274. package/dist/types/config/bits/pageBitConfig.d.ts.map +1 -0
  1275. package/dist/types/config/bits/photoBitConfig.d.ts +2 -0
  1276. package/dist/types/config/bits/photoBitConfig.d.ts.map +1 -0
  1277. package/dist/types/config/bits/preparationNoteBitConfig.d.ts +2 -0
  1278. package/dist/types/config/bits/preparationNoteBitConfig.d.ts.map +1 -0
  1279. package/dist/types/config/bits/question1BitConfig.d.ts +2 -0
  1280. package/dist/types/config/bits/question1BitConfig.d.ts.map +1 -0
  1281. package/dist/types/config/bits/quoteBitConfig.d.ts +2 -0
  1282. package/dist/types/config/bits/quoteBitConfig.d.ts.map +1 -0
  1283. package/dist/types/config/bits/ratingBitConfig.d.ts +2 -0
  1284. package/dist/types/config/bits/ratingBitConfig.d.ts.map +1 -0
  1285. package/dist/types/config/bits/recordAudioBitConfig.d.ts +2 -0
  1286. package/dist/types/config/bits/recordAudioBitConfig.d.ts.map +1 -0
  1287. package/dist/types/config/bits/releaseNoteBitConfig.d.ts +2 -0
  1288. package/dist/types/config/bits/releaseNoteBitConfig.d.ts.map +1 -0
  1289. package/dist/types/config/bits/releaseNotesSummaryBitConfig.d.ts +2 -0
  1290. package/dist/types/config/bits/releaseNotesSummaryBitConfig.d.ts.map +1 -0
  1291. package/dist/types/config/bits/remarkBitConfig.d.ts +2 -0
  1292. package/dist/types/config/bits/remarkBitConfig.d.ts.map +1 -0
  1293. package/dist/types/config/bits/sampleSolutionBitConfig.d.ts +2 -0
  1294. package/dist/types/config/bits/sampleSolutionBitConfig.d.ts.map +1 -0
  1295. package/dist/types/config/bits/screenshotBitConfig.d.ts +2 -0
  1296. package/dist/types/config/bits/screenshotBitConfig.d.ts.map +1 -0
  1297. package/dist/types/config/bits/selfAssessmentBitConfig.d.ts +2 -0
  1298. package/dist/types/config/bits/selfAssessmentBitConfig.d.ts.map +1 -0
  1299. package/dist/types/config/bits/sequenceBitConfig.d.ts +2 -0
  1300. package/dist/types/config/bits/sequenceBitConfig.d.ts.map +1 -0
  1301. package/dist/types/config/bits/sideNoteBitConfig.d.ts +2 -0
  1302. package/dist/types/config/bits/sideNoteBitConfig.d.ts.map +1 -0
  1303. package/dist/types/config/bits/statementBitConfig.d.ts +2 -0
  1304. package/dist/types/config/bits/statementBitConfig.d.ts.map +1 -0
  1305. package/dist/types/config/bits/stickyNoteBitConfig.d.ts +2 -0
  1306. package/dist/types/config/bits/stickyNoteBitConfig.d.ts.map +1 -0
  1307. package/dist/types/config/bits/stillImageFilmBitConfig.d.ts +2 -0
  1308. package/dist/types/config/bits/stillImageFilmBitConfig.d.ts.map +1 -0
  1309. package/dist/types/config/bits/stillImageFilmEmbedBitConfig.d.ts +2 -0
  1310. package/dist/types/config/bits/stillImageFilmEmbedBitConfig.d.ts.map +1 -0
  1311. package/dist/types/config/bits/stillImageFilmLinkBitConfig.d.ts +2 -0
  1312. package/dist/types/config/bits/stillImageFilmLinkBitConfig.d.ts.map +1 -0
  1313. package/dist/types/config/bits/summaryAiBitConfig.d.ts +2 -0
  1314. package/dist/types/config/bits/summaryAiBitConfig.d.ts.map +1 -0
  1315. package/dist/types/config/bits/summaryBitConfig.d.ts +2 -0
  1316. package/dist/types/config/bits/summaryBitConfig.d.ts.map +1 -0
  1317. package/dist/types/config/bits/survey1BitConfig.d.ts +2 -0
  1318. package/dist/types/config/bits/survey1BitConfig.d.ts.map +1 -0
  1319. package/dist/types/config/bits/surveyAnonymous1BitConfig.d.ts +2 -0
  1320. package/dist/types/config/bits/surveyAnonymous1BitConfig.d.ts.map +1 -0
  1321. package/dist/types/config/bits/surveyAnonymousBitConfig.d.ts +2 -0
  1322. package/dist/types/config/bits/surveyAnonymousBitConfig.d.ts.map +1 -0
  1323. package/dist/types/config/bits/surveyBitConfig.d.ts +2 -0
  1324. package/dist/types/config/bits/surveyBitConfig.d.ts.map +1 -0
  1325. package/dist/types/config/bits/takePictureBitConfig.d.ts +2 -0
  1326. package/dist/types/config/bits/takePictureBitConfig.d.ts.map +1 -0
  1327. package/dist/types/config/bits/tocBitConfig.d.ts +2 -0
  1328. package/dist/types/config/bits/tocBitConfig.d.ts.map +1 -0
  1329. package/dist/types/config/bits/trueFalse1BitConfig.d.ts +2 -0
  1330. package/dist/types/config/bits/trueFalse1BitConfig.d.ts.map +1 -0
  1331. package/dist/types/config/bits/trueFalseBitConfig.d.ts +2 -0
  1332. package/dist/types/config/bits/trueFalseBitConfig.d.ts.map +1 -0
  1333. package/dist/types/config/bits/vendorPadletEmbedBitConfig.d.ts +2 -0
  1334. package/dist/types/config/bits/vendorPadletEmbedBitConfig.d.ts.map +1 -0
  1335. package/dist/types/config/bits/videoBitConfig.d.ts +2 -0
  1336. package/dist/types/config/bits/videoBitConfig.d.ts.map +1 -0
  1337. package/dist/types/config/bits/videoEmbedBitConfig.d.ts +2 -0
  1338. package/dist/types/config/bits/videoEmbedBitConfig.d.ts.map +1 -0
  1339. package/dist/types/config/bits/videoLandscapeBitConfig.d.ts +2 -0
  1340. package/dist/types/config/bits/videoLandscapeBitConfig.d.ts.map +1 -0
  1341. package/dist/types/config/bits/videoLinkBitConfig.d.ts +2 -0
  1342. package/dist/types/config/bits/videoLinkBitConfig.d.ts.map +1 -0
  1343. package/dist/types/config/bits/videoPortraitBitConfig.d.ts +2 -0
  1344. package/dist/types/config/bits/videoPortraitBitConfig.d.ts.map +1 -0
  1345. package/dist/types/config/bits/warningBitConfig.d.ts +2 -0
  1346. package/dist/types/config/bits/warningBitConfig.d.ts.map +1 -0
  1347. package/dist/types/config/bits/websiteLinkBitConfig.d.ts +2 -0
  1348. package/dist/types/config/bits/websiteLinkBitConfig.d.ts.map +1 -0
  1349. package/dist/types/config/bits/workbookArticleBitConfig.d.ts +2 -0
  1350. package/dist/types/config/bits/workbookArticleBitConfig.d.ts.map +1 -0
  1351. package/dist/types/config/config.d.ts +173 -0
  1352. package/dist/types/config/config.d.ts.map +1 -0
  1353. package/dist/types/config/properties/actionPropertyConfig.d.ts +2 -0
  1354. package/dist/types/config/properties/actionPropertyConfig.d.ts.map +1 -0
  1355. package/dist/types/config/properties/ageRangePropertyConfig.d.ts +2 -0
  1356. package/dist/types/config/properties/ageRangePropertyConfig.d.ts.map +1 -0
  1357. package/dist/types/config/properties/aiGeneratedPropertyConfig.d.ts +2 -0
  1358. package/dist/types/config/properties/aiGeneratedPropertyConfig.d.ts.map +1 -0
  1359. package/dist/types/config/properties/authorPropertyConfig.d.ts +2 -0
  1360. package/dist/types/config/properties/authorPropertyConfig.d.ts.map +1 -0
  1361. package/dist/types/config/properties/bookPropertyConfig.d.ts +2 -0
  1362. package/dist/types/config/properties/bookPropertyConfig.d.ts.map +1 -0
  1363. package/dist/types/config/properties/botPropertyConfig.d.ts +2 -0
  1364. package/dist/types/config/properties/botPropertyConfig.d.ts.map +1 -0
  1365. package/dist/types/config/properties/caseSensitivePropertyConfig.d.ts +2 -0
  1366. package/dist/types/config/properties/caseSensitivePropertyConfig.d.ts.map +1 -0
  1367. package/dist/types/config/properties/computerLanguagePropertyConfig.d.ts +2 -0
  1368. package/dist/types/config/properties/computerLanguagePropertyConfig.d.ts.map +1 -0
  1369. package/dist/types/config/properties/coverImagePropertyConfig.d.ts +2 -0
  1370. package/dist/types/config/properties/coverImagePropertyConfig.d.ts.map +1 -0
  1371. package/dist/types/config/properties/datePropertyConfig.d.ts +2 -0
  1372. package/dist/types/config/properties/datePropertyConfig.d.ts.map +1 -0
  1373. package/dist/types/config/properties/deeplinkPropertyConfig.d.ts +2 -0
  1374. package/dist/types/config/properties/deeplinkPropertyConfig.d.ts.map +1 -0
  1375. package/dist/types/config/properties/durationPropertyConfig.d.ts +2 -0
  1376. package/dist/types/config/properties/durationPropertyConfig.d.ts.map +1 -0
  1377. package/dist/types/config/properties/examplePropertyConfig.d.ts +2 -0
  1378. package/dist/types/config/properties/examplePropertyConfig.d.ts.map +1 -0
  1379. package/dist/types/config/properties/externalIdPropertyConfig.d.ts +2 -0
  1380. package/dist/types/config/properties/externalIdPropertyConfig.d.ts.map +1 -0
  1381. package/dist/types/config/properties/externalLinkPropertyConfig.d.ts +2 -0
  1382. package/dist/types/config/properties/externalLinkPropertyConfig.d.ts.map +1 -0
  1383. package/dist/types/config/properties/externalLinkTextPropertyConfig.d.ts +2 -0
  1384. package/dist/types/config/properties/externalLinkTextPropertyConfig.d.ts.map +1 -0
  1385. package/dist/types/config/properties/focusXPropertyConfig.d.ts +2 -0
  1386. package/dist/types/config/properties/focusXPropertyConfig.d.ts.map +1 -0
  1387. package/dist/types/config/properties/focusYPropertyConfig.d.ts +2 -0
  1388. package/dist/types/config/properties/focusYPropertyConfig.d.ts.map +1 -0
  1389. package/dist/types/config/properties/idPropertyConfig.d.ts +2 -0
  1390. package/dist/types/config/properties/idPropertyConfig.d.ts.map +1 -0
  1391. package/dist/types/config/properties/isInfoOnlyPropertyConfig.d.ts +2 -0
  1392. package/dist/types/config/properties/isInfoOnlyPropertyConfig.d.ts.map +1 -0
  1393. package/dist/types/config/properties/isTrackedPropertyConfig.d.ts +2 -0
  1394. package/dist/types/config/properties/isTrackedPropertyConfig.d.ts.map +1 -0
  1395. package/dist/types/config/properties/kindPropertyConfig.d.ts +2 -0
  1396. package/dist/types/config/properties/kindPropertyConfig.d.ts.map +1 -0
  1397. package/dist/types/config/properties/labelFalsePropertyConfig.d.ts +2 -0
  1398. package/dist/types/config/properties/labelFalsePropertyConfig.d.ts.map +1 -0
  1399. package/dist/types/config/properties/labelTruePropertyConfig.d.ts +2 -0
  1400. package/dist/types/config/properties/labelTruePropertyConfig.d.ts.map +1 -0
  1401. package/dist/types/config/properties/languagePropertyConfig.d.ts +2 -0
  1402. package/dist/types/config/properties/languagePropertyConfig.d.ts.map +1 -0
  1403. package/dist/types/config/properties/levelPropertyConfig.d.ts +2 -0
  1404. package/dist/types/config/properties/levelPropertyConfig.d.ts.map +1 -0
  1405. package/dist/types/config/properties/listPropertyConfig.d.ts +2 -0
  1406. package/dist/types/config/properties/listPropertyConfig.d.ts.map +1 -0
  1407. package/dist/types/config/properties/locationPropertyConfig.d.ts +2 -0
  1408. package/dist/types/config/properties/locationPropertyConfig.d.ts.map +1 -0
  1409. package/dist/types/config/properties/longAnswerPropertyConfig.d.ts +2 -0
  1410. package/dist/types/config/properties/longAnswerPropertyConfig.d.ts.map +1 -0
  1411. package/dist/types/config/properties/padletIdPropertyConfig.d.ts +2 -0
  1412. package/dist/types/config/properties/padletIdPropertyConfig.d.ts.map +1 -0
  1413. package/dist/types/config/properties/partialAnswerPropertyConfig.d.ts +2 -0
  1414. package/dist/types/config/properties/partialAnswerPropertyConfig.d.ts.map +1 -0
  1415. package/dist/types/config/properties/partnerPropertyConfig.d.ts +2 -0
  1416. package/dist/types/config/properties/partnerPropertyConfig.d.ts.map +1 -0
  1417. package/dist/types/config/properties/progressPropertyConfig.d.ts +2 -0
  1418. package/dist/types/config/properties/progressPropertyConfig.d.ts.map +1 -0
  1419. package/dist/types/config/properties/publicationsPropertyConfig.d.ts +2 -0
  1420. package/dist/types/config/properties/publicationsPropertyConfig.d.ts.map +1 -0
  1421. package/dist/types/config/properties/publisherPropertyConfig.d.ts +2 -0
  1422. package/dist/types/config/properties/publisherPropertyConfig.d.ts.map +1 -0
  1423. package/dist/types/config/properties/quotedPersonPropertyConfig.d.ts +2 -0
  1424. package/dist/types/config/properties/quotedPersonPropertyConfig.d.ts.map +1 -0
  1425. package/dist/types/config/properties/reactionPropertyConfig.d.ts +2 -0
  1426. package/dist/types/config/properties/reactionPropertyConfig.d.ts.map +1 -0
  1427. package/dist/types/config/properties/referencePropertyConfig.d.ts +2 -0
  1428. package/dist/types/config/properties/referencePropertyConfig.d.ts.map +1 -0
  1429. package/dist/types/config/properties/releaseVersionPropertyConfig.d.ts +2 -0
  1430. package/dist/types/config/properties/releaseVersionPropertyConfig.d.ts.map +1 -0
  1431. package/dist/types/config/properties/resourcePropertyConfig.d.ts +2 -0
  1432. package/dist/types/config/properties/resourcePropertyConfig.d.ts.map +1 -0
  1433. package/dist/types/config/properties/sampleSolutionPropertyConfig.d.ts +2 -0
  1434. package/dist/types/config/properties/sampleSolutionPropertyConfig.d.ts.map +1 -0
  1435. package/dist/types/config/properties/shortAnswerPropertyConfig.d.ts +2 -0
  1436. package/dist/types/config/properties/shortAnswerPropertyConfig.d.ts.map +1 -0
  1437. package/dist/types/config/properties/spaceIdPropertyConfig.d.ts +2 -0
  1438. package/dist/types/config/properties/spaceIdPropertyConfig.d.ts.map +1 -0
  1439. package/dist/types/config/properties/subjectPropertyConfig.d.ts +2 -0
  1440. package/dist/types/config/properties/subjectPropertyConfig.d.ts.map +1 -0
  1441. package/dist/types/config/properties/subtypePropertyConfig.d.ts +2 -0
  1442. package/dist/types/config/properties/subtypePropertyConfig.d.ts.map +1 -0
  1443. package/dist/types/config/properties/textReferencePropertyConfig.d.ts +2 -0
  1444. package/dist/types/config/properties/textReferencePropertyConfig.d.ts.map +1 -0
  1445. package/dist/types/config/properties/themePropertyConfig.d.ts +2 -0
  1446. package/dist/types/config/properties/themePropertyConfig.d.ts.map +1 -0
  1447. package/dist/types/config/properties/thumbImagePropertyConfig.d.ts +2 -0
  1448. package/dist/types/config/properties/thumbImagePropertyConfig.d.ts.map +1 -0
  1449. package/dist/types/config/properties/tocPropertyConfig.d.ts +2 -0
  1450. package/dist/types/config/properties/tocPropertyConfig.d.ts.map +1 -0
  1451. package/dist/types/config/properties/videoCallLinkPropertyConfig copy.d.ts +2 -0
  1452. package/dist/types/config/properties/videoCallLinkPropertyConfig copy.d.ts.map +1 -0
  1453. package/dist/types/config/properties/videoCallLinkPropertyConfig.d.ts +2 -0
  1454. package/dist/types/config/properties/videoCallLinkPropertyConfig.d.ts.map +1 -0
  1455. package/dist/types/generated/build-info.d.ts +5 -0
  1456. package/dist/types/generated/build-info.d.ts.map +1 -0
  1457. package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts +11 -0
  1458. package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts.map +1 -0
  1459. package/dist/types/generated/parser/text/text-peggy-parser.d.ts +11 -0
  1460. package/dist/types/generated/parser/text/text-peggy-parser.d.ts.map +1 -0
  1461. package/dist/types/generator/Generator.d.ts +6 -0
  1462. package/dist/types/generator/Generator.d.ts.map +1 -0
  1463. package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts +42 -0
  1464. package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts.map +1 -0
  1465. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +263 -0
  1466. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +1 -0
  1467. package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts +31 -0
  1468. package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts.map +1 -0
  1469. package/dist/types/generator/json/JsonFileGenerator.d.ts +46 -0
  1470. package/dist/types/generator/json/JsonFileGenerator.d.ts.map +1 -0
  1471. package/dist/types/generator/json/JsonGenerator.d.ts +288 -0
  1472. package/dist/types/generator/json/JsonGenerator.d.ts.map +1 -0
  1473. package/dist/types/generator/json/JsonObjectGenerator.d.ts +32 -0
  1474. package/dist/types/generator/json/JsonObjectGenerator.d.ts.map +1 -0
  1475. package/dist/types/generator/json/JsonStringGenerator.d.ts +30 -0
  1476. package/dist/types/generator/json/JsonStringGenerator.d.ts.map +1 -0
  1477. package/dist/types/generator/text/TextGenerator.d.ts +127 -0
  1478. package/dist/types/generator/text/TextGenerator.d.ts.map +1 -0
  1479. package/dist/types/index.d.ts +44 -0
  1480. package/dist/types/index.d.ts.map +1 -0
  1481. package/dist/types/init/init.d.ts +4 -0
  1482. package/dist/types/init/init.d.ts.map +1 -0
  1483. package/dist/types/model/ast/NodeType.d.ts +445 -0
  1484. package/dist/types/model/ast/NodeType.d.ts.map +1 -0
  1485. package/dist/types/model/ast/Nodes.d.ts +408 -0
  1486. package/dist/types/model/ast/Nodes.d.ts.map +1 -0
  1487. package/dist/types/model/ast/TextNodes.d.ts +73 -0
  1488. package/dist/types/model/ast/TextNodes.d.ts.map +1 -0
  1489. package/dist/types/model/config/TagData.d.ts +14 -0
  1490. package/dist/types/model/config/TagData.d.ts.map +1 -0
  1491. package/dist/types/model/enum/BitType.d.ts +385 -0
  1492. package/dist/types/model/enum/BitType.d.ts.map +1 -0
  1493. package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts +1 -0
  1494. package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts.map +1 -0
  1495. package/dist/types/model/enum/BitmarkParserType.d.ts +11 -0
  1496. package/dist/types/model/enum/BitmarkParserType.d.ts.map +1 -0
  1497. package/dist/types/model/enum/BitmarkVersion.d.ts +12 -0
  1498. package/dist/types/model/enum/BitmarkVersion.d.ts.map +1 -0
  1499. package/dist/types/model/enum/BodyBitType.d.ts +22 -0
  1500. package/dist/types/model/enum/BodyBitType.d.ts.map +1 -0
  1501. package/dist/types/model/enum/CardSetType.d.ts +21 -0
  1502. package/dist/types/model/enum/CardSetType.d.ts.map +1 -0
  1503. package/dist/types/model/enum/CardSetVersion.d.ts +11 -0
  1504. package/dist/types/model/enum/CardSetVersion.d.ts.map +1 -0
  1505. package/dist/types/model/enum/PropertyKey.d.ts +150 -0
  1506. package/dist/types/model/enum/PropertyKey.d.ts.map +1 -0
  1507. package/dist/types/model/enum/ResourceType.d.ts +76 -0
  1508. package/dist/types/model/enum/ResourceType.d.ts.map +1 -0
  1509. package/dist/types/model/enum/TagType.d.ts +35 -0
  1510. package/dist/types/model/enum/TagType.d.ts.map +1 -0
  1511. package/dist/types/model/enum/TextFormat.d.ts +13 -0
  1512. package/dist/types/model/enum/TextFormat.d.ts.map +1 -0
  1513. package/dist/types/model/enum/TextMarkType.d.ts +37 -0
  1514. package/dist/types/model/enum/TextMarkType.d.ts.map +1 -0
  1515. package/dist/types/model/enum/TextNodeType.d.ts +37 -0
  1516. package/dist/types/model/enum/TextNodeType.d.ts.map +1 -0
  1517. package/dist/types/model/enum/TextSection.d.ts +27 -0
  1518. package/dist/types/model/enum/TextSection.d.ts.map +1 -0
  1519. package/dist/types/model/json/BitJson.d.ts +187 -0
  1520. package/dist/types/model/json/BitJson.d.ts.map +1 -0
  1521. package/dist/types/model/json/BitWrapperJson.d.ts +8 -0
  1522. package/dist/types/model/json/BitWrapperJson.d.ts.map +1 -0
  1523. package/dist/types/model/json/BodyBitJson.d.ts +61 -0
  1524. package/dist/types/model/json/BodyBitJson.d.ts.map +1 -0
  1525. package/dist/types/model/json/ParserJson.d.ts +10 -0
  1526. package/dist/types/model/json/ParserJson.d.ts.map +1 -0
  1527. package/dist/types/model/json/ResourceJson.d.ts +252 -0
  1528. package/dist/types/model/json/ResourceJson.d.ts.map +1 -0
  1529. package/dist/types/model/parser/ParserData.d.ts +11 -0
  1530. package/dist/types/model/parser/ParserData.d.ts.map +1 -0
  1531. package/dist/types/model/parser/ParserError.d.ts +17 -0
  1532. package/dist/types/model/parser/ParserError.d.ts.map +1 -0
  1533. package/dist/types/model/parser/ParserInfo.d.ts +10 -0
  1534. package/dist/types/model/parser/ParserInfo.d.ts.map +1 -0
  1535. package/dist/types/model/parser/ParserLocation.d.ts +6 -0
  1536. package/dist/types/model/parser/ParserLocation.d.ts.map +1 -0
  1537. package/dist/types/model/parser/ParserLocationRange.d.ts +10 -0
  1538. package/dist/types/model/parser/ParserLocationRange.d.ts.map +1 -0
  1539. package/dist/types/parser/bitmark/BitmarkParser.d.ts +28 -0
  1540. package/dist/types/parser/bitmark/BitmarkParser.d.ts.map +1 -0
  1541. package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts +8 -0
  1542. package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts.map +1 -0
  1543. package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts +96 -0
  1544. package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts.map +1 -0
  1545. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +128 -0
  1546. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +1 -0
  1547. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +261 -0
  1548. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +1 -0
  1549. package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +182 -0
  1550. package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +1 -0
  1551. package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts +61 -0
  1552. package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts.map +1 -0
  1553. package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts +5 -0
  1554. package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +1 -0
  1555. package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts +6 -0
  1556. package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +1 -0
  1557. package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts +5 -0
  1558. package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +1 -0
  1559. package/dist/types/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.d.ts +5 -0
  1560. package/dist/types/parser/bitmark/peg/contentProcessors/CommentTagContentProcessor.d.ts.map +1 -0
  1561. package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts +5 -0
  1562. package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +1 -0
  1563. package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts +6 -0
  1564. package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +1 -0
  1565. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts +5 -0
  1566. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +1 -0
  1567. package/dist/types/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.d.ts +5 -0
  1568. package/dist/types/parser/bitmark/peg/contentProcessors/PartnerChainContentProcessor.d.ts.map +1 -0
  1569. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts +5 -0
  1570. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +1 -0
  1571. package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts +5 -0
  1572. package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +1 -0
  1573. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +14 -0
  1574. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +1 -0
  1575. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +6 -0
  1576. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +1 -0
  1577. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +6 -0
  1578. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +1 -0
  1579. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts +5 -0
  1580. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +1 -0
  1581. package/dist/types/parser/json/JsonParser.d.ts +77 -0
  1582. package/dist/types/parser/json/JsonParser.d.ts.map +1 -0
  1583. package/dist/types/parser/text/TextParser.d.ts +19 -0
  1584. package/dist/types/parser/text/TextParser.d.ts.map +1 -0
  1585. package/dist/types/parser/text/peg/TextPegParser.d.ts +8 -0
  1586. package/dist/types/parser/text/peg/TextPegParser.d.ts.map +1 -0
  1587. package/dist/types/utils/ArrayUtils.d.ts +25 -0
  1588. package/dist/types/utils/ArrayUtils.d.ts.map +1 -0
  1589. package/dist/types/utils/BitUtils.d.ts +17 -0
  1590. package/dist/types/utils/BitUtils.d.ts.map +1 -0
  1591. package/dist/types/utils/BooleanUtils.d.ts +30 -0
  1592. package/dist/types/utils/BooleanUtils.d.ts.map +1 -0
  1593. package/dist/types/utils/FileUtils.d.ts +12 -0
  1594. package/dist/types/utils/FileUtils.d.ts.map +1 -0
  1595. package/dist/types/utils/NumberUtils.d.ts +16 -0
  1596. package/dist/types/utils/NumberUtils.d.ts.map +1 -0
  1597. package/dist/types/utils/ObjectUtils.d.ts +118 -0
  1598. package/dist/types/utils/ObjectUtils.d.ts.map +1 -0
  1599. package/dist/types/utils/StringUtils.d.ts +46 -0
  1600. package/dist/types/utils/StringUtils.d.ts.map +1 -0
  1601. package/dist/types/utils/UrlUtils.d.ts +7 -0
  1602. package/dist/types/utils/UrlUtils.d.ts.map +1 -0
  1603. package/dist/types/utils/env/Env.d.ts +39 -0
  1604. package/dist/types/utils/env/Env.d.ts.map +1 -0
  1605. package/dist/types/utils/env/Environment.d.ts +21 -0
  1606. package/dist/types/utils/env/Environment.d.ts.map +1 -0
  1607. package/dist/types/utils/env/Os.d.ts +19 -0
  1608. package/dist/types/utils/env/Os.d.ts.map +1 -0
  1609. package/dist/types/utils/env/Version.d.ts +10 -0
  1610. package/dist/types/utils/env/Version.d.ts.map +1 -0
  1611. package/dist/types/utils/env/userAgent.d.ts +11 -0
  1612. package/dist/types/utils/env/userAgent.d.ts.map +1 -0
  1613. package/dist/types/utils/polyfill/fs.d.ts +6 -0
  1614. package/dist/types/utils/polyfill/fs.d.ts.map +1 -0
  1615. package/package.json +127 -0
@@ -0,0 +1,2049 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.JsonGenerator = void 0;
24
+ const Ast_1 = require("../../ast/Ast");
25
+ const NodeType_1 = require("../../model/ast/NodeType");
26
+ const BitType_1 = require("../../model/enum/BitType");
27
+ const BitmarkVersion_1 = require("../../model/enum/BitmarkVersion");
28
+ const BodyBitType_1 = require("../../model/enum/BodyBitType");
29
+ const PropertyKey_1 = require("../../model/enum/PropertyKey");
30
+ const ResourceType_1 = require("../../model/enum/ResourceType");
31
+ const TextFormat_1 = require("../../model/enum/TextFormat");
32
+ const TextParser_1 = require("../../parser/text/TextParser");
33
+ const ArrayUtils_1 = require("../../utils/ArrayUtils");
34
+ const StringUtils_1 = require("../../utils/StringUtils");
35
+ const UrlUtils_1 = require("../../utils/UrlUtils");
36
+ const DEFAULT_OPTIONS = {
37
+ // debugGenerationInline: true,
38
+ };
39
+ /**
40
+ * Generate bitmark JSON from a bitmark AST
41
+ *
42
+ * TODO: NOT IMPLEMENTED!
43
+ */
44
+ class JsonGenerator {
45
+ /**
46
+ * Generate bitmark JSON from a bitmark AST
47
+ *
48
+ * @param writer - destination for the output
49
+ * @param options - JSON generation options
50
+ */
51
+ constructor(writer, options) {
52
+ var _a;
53
+ this.ast = new Ast_1.Ast();
54
+ this.textParser = new TextParser_1.TextParser();
55
+ // State
56
+ this.json = [];
57
+ this.bitWrapperJson = {};
58
+ this.bitJson = {};
59
+ this.textDefault = '';
60
+ this.bodyDefault = '';
61
+ // Debug
62
+ this.printed = false;
63
+ this.bitmarkVersion = (_a = BitmarkVersion_1.BitmarkVersion.fromValue(options === null || options === void 0 ? void 0 : options.bitmarkVersion)) !== null && _a !== void 0 ? _a : BitmarkVersion_1.DEFAULT_BITMARK_VERSION;
64
+ this.options = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options === null || options === void 0 ? void 0 : options.jsonOptions);
65
+ this.jsonPrettifySpace = this.options.prettify === true ? 2 : this.options.prettify || undefined;
66
+ // Set defaults according to bitmark version
67
+ if (this.bitmarkVersion === BitmarkVersion_1.BitmarkVersion.v2) {
68
+ if (this.options.textAsPlainText === undefined) {
69
+ this.options.textAsPlainText = true;
70
+ }
71
+ }
72
+ else {
73
+ if (this.options.textAsPlainText === undefined) {
74
+ this.options.textAsPlainText = false;
75
+ }
76
+ }
77
+ this.writer = writer;
78
+ this.enter = this.enter.bind(this);
79
+ this.between = this.between.bind(this);
80
+ this.exit = this.exit.bind(this);
81
+ this.leaf = this.leaf.bind(this);
82
+ this.generatePropertyHandlers();
83
+ }
84
+ /**
85
+ * Generate bitmark markup from bitmark AST
86
+ *
87
+ * @param ast bitmark AST
88
+ */
89
+ generate(ast) {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ // Reset the state
92
+ this.resetState();
93
+ // Open the writer
94
+ yield this.writer.open();
95
+ // Walk the bitmark AST
96
+ this.walkAndWrite(ast);
97
+ // Write the JSON object to file
98
+ this.write(JSON.stringify(this.json, null, this.jsonPrettifySpace));
99
+ // Close the writer
100
+ yield this.writer.close();
101
+ });
102
+ }
103
+ /**
104
+ * Generate text from a bitmark text AST synchronously
105
+ *
106
+ * @param ast bitmark text AST
107
+ */
108
+ generateSync(ast) {
109
+ // Reset the state
110
+ this.resetState();
111
+ // Open the writer
112
+ this.writer.openSync();
113
+ // Walk the bitmark AST
114
+ this.walkAndWrite(ast);
115
+ // Close the writer
116
+ this.writer.closeSync();
117
+ }
118
+ resetState() {
119
+ this.json = [];
120
+ this.bitWrapperJson = {};
121
+ this.bitJson = {};
122
+ this.textDefault = this.options.textAsPlainText ? '' : [];
123
+ this.bodyDefault = this.options.textAsPlainText ? '' : [];
124
+ this.printed = false;
125
+ }
126
+ walkAndWrite(ast) {
127
+ // Walk the bitmark AST
128
+ this.ast.walk(ast, NodeType_1.NodeType.bitmarkAst, this, undefined);
129
+ }
130
+ enter(node, parent, route) {
131
+ let res = void 0;
132
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
133
+ const gen = this;
134
+ const funcName = `enter_${node.key}`;
135
+ if (!this.printed) {
136
+ this.printed = true;
137
+ }
138
+ if (this.options.debugGenerationInline)
139
+ this.writeInlineDebug(node.key, { open: true });
140
+ if (typeof gen[funcName] === 'function') {
141
+ res = gen[funcName](node, parent, route);
142
+ }
143
+ return res;
144
+ }
145
+ between(node, left, right, parent, route) {
146
+ let res = void 0;
147
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
148
+ const gen = this;
149
+ const funcName = `between_${node.key}`;
150
+ if (this.options.debugGenerationInline)
151
+ this.writeInlineDebug(node.key, { single: true });
152
+ if (typeof gen[funcName] === 'function') {
153
+ res = gen[funcName](node, left, right, parent, route);
154
+ }
155
+ return res;
156
+ }
157
+ exit(node, parent, route) {
158
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
159
+ const gen = this;
160
+ const funcName = `exit_${node.key}`;
161
+ if (this.options.debugGenerationInline)
162
+ this.writeInlineDebug(node.key, { close: true });
163
+ if (typeof gen[funcName] === 'function') {
164
+ gen[funcName](node, parent, route);
165
+ }
166
+ }
167
+ leaf(node, parent, route) {
168
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
169
+ const gen = this;
170
+ const funcName = `leaf_${node.key}`;
171
+ if (this.options.debugGenerationInline)
172
+ this.writeInlineDebug(node.key, { open: true });
173
+ if (typeof gen[funcName] === 'function') {
174
+ gen[funcName](node, parent, route);
175
+ }
176
+ if (this.options.debugGenerationInline)
177
+ this.writeInlineDebug(node.key, { close: true });
178
+ }
179
+ //
180
+ // NODE HANDLERS
181
+ //
182
+ //
183
+ // Non-Terminal nodes (branches)
184
+ //
185
+ // bitmark
186
+ enter_bitmarkAst(_node, _parent, _route) {
187
+ // Reset the JSON
188
+ this.json = [];
189
+ }
190
+ // bitmarkAst -> bits
191
+ // bitmarkAst -> bits -> bitsValue
192
+ enter_bitsValue(node, _parent, _route) {
193
+ const bit = node.value;
194
+ // Reset
195
+ this.bitWrapperJson = {
196
+ //
197
+ };
198
+ this.json.push(this.bitWrapperJson);
199
+ this.bitJson = this.createBitJson(bit);
200
+ this.bitWrapperJson.bit = this.bitJson;
201
+ }
202
+ exit_bitsValue(_node, _parent, _route) {
203
+ // Clean up the bit JSON, removing any unwanted values
204
+ this.cleanAndSetDefaultsForBitJson(this.bitJson);
205
+ }
206
+ // bitmarkAst -> bits -> bitsValue -> partner
207
+ enter_partner(node, parent, _route) {
208
+ const partner = node.value;
209
+ // Ignore example that is not at the bit level as it are handled elsewhere
210
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.bitsValue)
211
+ return;
212
+ const { name, avatarImage } = partner;
213
+ const partnerJson = {};
214
+ this.addProperty(partnerJson, 'name', name !== null && name !== void 0 ? name : '', true);
215
+ if (avatarImage) {
216
+ const res = this.parseResourceToJson(avatarImage);
217
+ if (res && res.type === ResourceType_1.ResourceType.image) {
218
+ partnerJson.avatarImage = res.image;
219
+ }
220
+ }
221
+ this.bitJson.partner = partnerJson;
222
+ }
223
+ // bitmarkAst -> bits -> bitsValue -> sampleSolution
224
+ enter_sampleSolution(node, _parent, _route) {
225
+ if (node.value != null)
226
+ this.addProperty(this.bitJson, 'sampleSolution', node.value, true);
227
+ }
228
+ // bitmarkAst -> bits -> bitsValue -> itemLead
229
+ enter_itemLead(node, parent, _route) {
230
+ const itemLead = node.value;
231
+ const { item, lead } = itemLead;
232
+ // Ignore item / lead that are not at the bit level as they are handled elsewhere
233
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.bitsValue)
234
+ return;
235
+ if (item != null) {
236
+ this.bitJson.item = this.toTextAstOrString(item);
237
+ }
238
+ if (lead != null) {
239
+ this.bitJson.lead = this.toTextAstOrString(lead);
240
+ }
241
+ }
242
+ // bitmarkAst -> bits -> bitsValue -> extraProperties
243
+ enter_extraProperties(node, _parent, _route) {
244
+ const extraProperties = node.value;
245
+ if (!this.options.excludeUnknownProperties && extraProperties) {
246
+ for (const [key, values] of Object.entries(extraProperties)) {
247
+ let k = key;
248
+ if (Object.prototype.hasOwnProperty.call(this.bitJson, key)) {
249
+ k = `_${key}`;
250
+ }
251
+ this.addProperty(this.bitJson, k, values);
252
+ }
253
+ }
254
+ }
255
+ // bitmarkAst -> bits -> bitsValue -> body -> bodyParts
256
+ enter_bodyParts(node, _parent, route) {
257
+ const bodyParts = node.value;
258
+ const plainText = this.options.textAsPlainText;
259
+ const textFormat = this.getTextFormat(route);
260
+ let fullBodyTextStr = '';
261
+ let placeholderIndex = 0;
262
+ // Ensure body exists
263
+ if (this.bitJson.body == null)
264
+ this.bitJson.body = this.bodyDefault;
265
+ // Function for creating the placeholder keys
266
+ const createPlaceholderKeys = (i) => {
267
+ return {
268
+ // Old placeholder style (for backwards compatibility) = {0}
269
+ legacyPlaceholderKey: `{${i}}`,
270
+ // New placeholder style (cannot clash as bitmark parser would have removed it) = [!0]
271
+ placeholderKey: `[!${i}]`,
272
+ };
273
+ };
274
+ // Loop the text bodyParts creating full body text with the correct placeholders
275
+ //
276
+ // For text output 'fullBodyTextStr:
277
+ // - is created and written to the JSON
278
+ // - has placeholders inserted into 'fullBodyTextStr' in the format {0}
279
+ //
280
+ // For JSON output 'fullBodyTextStr:
281
+ // - is created and passed into the text parser to create the body text AST
282
+ // - has placeholders inserted into 'fullBodyTextStr' in the format [!0] to allow the text parser to identify
283
+ // where the body bits should be inserted
284
+ //
285
+ for (let i = 0; i < bodyParts.length; i++) {
286
+ const bodyPart = bodyParts[i];
287
+ const isText = bodyPart.type === BodyBitType_1.BodyBitType.text;
288
+ if (isText) {
289
+ const asText = bodyPart;
290
+ const bodyTextPart = asText.data.bodyText;
291
+ // Append the text part to the full text body
292
+ fullBodyTextStr += bodyTextPart;
293
+ }
294
+ else {
295
+ const { legacyPlaceholderKey, placeholderKey } = createPlaceholderKeys(placeholderIndex);
296
+ // Append the placeholder to the full text body
297
+ fullBodyTextStr += plainText ? legacyPlaceholderKey : placeholderKey;
298
+ placeholderIndex++;
299
+ }
300
+ }
301
+ // Add string or AST to the body
302
+ this.bitJson.body = this.toTextAstOrString(fullBodyTextStr, textFormat);
303
+ const bodyAst = this.bitJson.body;
304
+ // Loop the body parts again to create the body bits:
305
+ // - For text output the body bits are inserted into the 'placeholders' object
306
+ // - For JSON output the body bits are inserted into body AST, replacing the placeholders created by the text parser
307
+ placeholderIndex = 0;
308
+ for (let i = 0; i < bodyParts.length; i++) {
309
+ const bodyPart = bodyParts[i];
310
+ // Skip text body parts as they are handled above
311
+ const isText = bodyPart.type === BodyBitType_1.BodyBitType.text;
312
+ if (isText)
313
+ continue;
314
+ const bodyBit = bodyPart;
315
+ let bodyBitJson;
316
+ const { legacyPlaceholderKey } = createPlaceholderKeys(placeholderIndex);
317
+ switch (bodyPart.type) {
318
+ case BodyBitType_1.BodyBitType.gap: {
319
+ const gap = bodyBit;
320
+ bodyBitJson = this.createGapJson(gap);
321
+ break;
322
+ }
323
+ case BodyBitType_1.BodyBitType.select: {
324
+ const select = bodyBit;
325
+ bodyBitJson = this.createSelectJson(select);
326
+ break;
327
+ }
328
+ case BodyBitType_1.BodyBitType.highlight: {
329
+ const highlight = bodyBit;
330
+ bodyBitJson = this.createHighlightJson(highlight);
331
+ break;
332
+ }
333
+ }
334
+ // Add the gap to the placeholders
335
+ if (bodyBitJson) {
336
+ if (plainText) {
337
+ // Ensure placeholders exists
338
+ if (!this.bitJson.placeholders)
339
+ this.bitJson.placeholders = {};
340
+ // Add the body bit to the placeholders
341
+ this.bitJson.placeholders[legacyPlaceholderKey] = bodyBitJson;
342
+ }
343
+ else {
344
+ // Insert the body bit into the body AST
345
+ this.replacePlaceholderWithBodyBit(bodyAst, bodyBitJson, placeholderIndex);
346
+ }
347
+ }
348
+ placeholderIndex++;
349
+ }
350
+ // Stop traversal of this branch for efficiency
351
+ return false;
352
+ }
353
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> elements
354
+ enter_elements(node, _parent, _route) {
355
+ const elements = node.value;
356
+ // Ignore elements that are not at the bit level as they are handled elsewhere as quizzes
357
+ // if (parent?.key !== NodeType.bitsValue) return;
358
+ if (elements && elements.length > 0) {
359
+ this.bitJson.elements = elements;
360
+ }
361
+ }
362
+ // bitmarkAst -> bits -> bitsValue -> statement
363
+ enter_statement(node, parent, _route) {
364
+ var _a, _b;
365
+ const statement = node.value;
366
+ // Ignore statement that is not at the bit level as it is handled elsewhere
367
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.bitsValue)
368
+ return;
369
+ if (statement) {
370
+ this.bitJson.statement = (_a = statement.text) !== null && _a !== void 0 ? _a : '';
371
+ this.bitJson.isCorrect = (_b = statement.isCorrect) !== null && _b !== void 0 ? _b : false;
372
+ }
373
+ }
374
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> statements -> statementsValue
375
+ enter_statements(node, parent, _route) {
376
+ var _a, _b, _c, _d;
377
+ const statements = node.value;
378
+ // Ignore statements that are not at the card node level as they are handled elsewhere
379
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.cardNode)
380
+ return;
381
+ const statementsJson = [];
382
+ if (statements) {
383
+ for (const s of statements) {
384
+ // Create the statement
385
+ const statementJson = Object.assign(Object.assign({ statement: (_a = s.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = s.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(s)), this.toExampleAndIsExample(s.example));
386
+ // Delete unwanted properties
387
+ if (((_c = s.itemLead) === null || _c === void 0 ? void 0 : _c.item) == null)
388
+ delete statementJson.item;
389
+ if (((_d = s.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
390
+ delete statementJson.lead;
391
+ if ((s === null || s === void 0 ? void 0 : s.hint) == null)
392
+ delete statementJson.hint;
393
+ if ((s === null || s === void 0 ? void 0 : s.instruction) == null)
394
+ delete statementJson.instruction;
395
+ if ((s === null || s === void 0 ? void 0 : s.example) == null)
396
+ delete statementJson.example;
397
+ statementsJson.push(statementJson);
398
+ }
399
+ }
400
+ if (statementsJson.length > 0) {
401
+ this.bitJson.statements = statementsJson;
402
+ }
403
+ }
404
+ // bitmarkAst -> bits -> bitsValue -> choices
405
+ // X bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes -> quizzesValue -> choices
406
+ enter_choices(node, parent, _route) {
407
+ var _a, _b, _c;
408
+ const choices = node.value;
409
+ // Ignore choices that are not at the bit level as they are handled elsewhere as quizzes
410
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.bitsValue)
411
+ return;
412
+ const choicesJson = [];
413
+ if (choices) {
414
+ for (const c of choices) {
415
+ // Create the choice
416
+ const choiceJson = Object.assign({ choice: (_a = c.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = c.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(c));
417
+ // Delete unwanted properties
418
+ if (((_c = c.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
419
+ delete choiceJson.lead;
420
+ choicesJson.push(choiceJson);
421
+ }
422
+ }
423
+ if (choicesJson.length > 0) {
424
+ this.bitJson.choices = choicesJson;
425
+ }
426
+ }
427
+ // bitmarkAst -> bits -> bitsValue -> responses
428
+ // X bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes -> quizzesValue -> responses
429
+ enter_responses(node, parent, _route) {
430
+ var _a, _b, _c;
431
+ const responses = node.value;
432
+ // Ignore responses that are not at the bit level as they are handled elsewhere as quizzes
433
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.bitsValue)
434
+ return;
435
+ const responsesJson = [];
436
+ if (responses) {
437
+ for (const r of responses) {
438
+ // Create the response
439
+ const responseJson = Object.assign({ response: (_a = r.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = r.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(r));
440
+ // Delete unwanted properties
441
+ if (((_c = r.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
442
+ delete responseJson.lead;
443
+ responsesJson.push(responseJson);
444
+ }
445
+ }
446
+ if (responsesJson.length > 0) {
447
+ this.bitJson.responses = responsesJson;
448
+ }
449
+ }
450
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> quizzes
451
+ enter_quizzes(node, _parent, _route) {
452
+ var _a, _b, _c, _d, _e, _f, _g;
453
+ const quizzes = node.value;
454
+ const quizzesJson = [];
455
+ if (quizzes) {
456
+ for (const q of quizzes) {
457
+ // Choices
458
+ const choicesJson = [];
459
+ if (q.choices) {
460
+ for (const c of q.choices) {
461
+ // Create the choice
462
+ const choiceJson = Object.assign({ choice: (_a = c.text) !== null && _a !== void 0 ? _a : '', isCorrect: (_b = c.isCorrect) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(c));
463
+ // Delete unwanted properties
464
+ if (((_c = q.itemLead) === null || _c === void 0 ? void 0 : _c.lead) == null)
465
+ delete choiceJson.lead;
466
+ choicesJson.push(choiceJson);
467
+ }
468
+ }
469
+ // Responses
470
+ const responsesJson = [];
471
+ if (q.responses) {
472
+ for (const c of q.responses) {
473
+ // Create the choice
474
+ const responseJson = Object.assign({ response: (_d = c.text) !== null && _d !== void 0 ? _d : '', isCorrect: (_e = c.isCorrect) !== null && _e !== void 0 ? _e : false }, this.toItemLeadHintInstruction(c));
475
+ // Delete unwanted properties
476
+ if (((_f = q.itemLead) === null || _f === void 0 ? void 0 : _f.lead) == null)
477
+ delete responseJson.lead;
478
+ responsesJson.push(responseJson);
479
+ }
480
+ }
481
+ // Create the quiz
482
+ const quizJson = Object.assign(Object.assign(Object.assign({}, this.toItemLeadHintInstruction(q)), this.toExampleAndIsExample(q.example)), { choices: q.choices ? choicesJson : undefined, responses: q.responses ? responsesJson : undefined });
483
+ // Delete unwanted properties
484
+ if (((_g = q.itemLead) === null || _g === void 0 ? void 0 : _g.lead) == null)
485
+ delete quizJson.lead;
486
+ quizzesJson.push(quizJson);
487
+ }
488
+ }
489
+ if (quizzesJson.length > 0) {
490
+ this.bitJson.quizzes = quizzesJson;
491
+ }
492
+ }
493
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> heading
494
+ enter_heading(node, _parent, _route) {
495
+ var _a, _b;
496
+ const heading = node.value;
497
+ // Ensure the heading is valid for writing out (it will be valid, but if it is empty, it should not be written)
498
+ let valid = false;
499
+ if (heading && heading.forKeys /*&& heading.forValues && heading.forValues.length > 0*/) {
500
+ valid = true;
501
+ }
502
+ if (!valid)
503
+ return false;
504
+ // Create the heading
505
+ const headingJson = {
506
+ forKeys: (_a = heading.forKeys) !== null && _a !== void 0 ? _a : '',
507
+ };
508
+ // TODO: Should probably check wether bit is a match or a matrix and add a string for match and array for matrix
509
+ if (Array.isArray(heading.forValues)) {
510
+ if (heading.forValues.length > 1) {
511
+ headingJson.forValues = heading.forValues;
512
+ }
513
+ else if (heading.forValues.length === 1) {
514
+ headingJson.forValues = heading.forValues[0];
515
+ }
516
+ else {
517
+ headingJson.forValues = heading.forValues;
518
+ }
519
+ }
520
+ else {
521
+ headingJson.forValues = (_b = heading.forValues) !== null && _b !== void 0 ? _b : '';
522
+ }
523
+ this.bitJson.heading = headingJson;
524
+ }
525
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> pairs
526
+ enter_pairs(node, _parent, _route) {
527
+ var _a, _b, _c, _d, _e;
528
+ const pairs = node.value;
529
+ const pairsJson = [];
530
+ if (pairs) {
531
+ for (const p of pairs) {
532
+ // Create the question
533
+ const pairJson = Object.assign(Object.assign(Object.assign({ key: (_a = p.key) !== null && _a !== void 0 ? _a : '', keyAudio: p.keyAudio ? this.addAudioResource(p.keyAudio) : undefined, keyImage: p.keyImage ? this.addImageResource(p.keyImage) : undefined, values: (_b = p.values) !== null && _b !== void 0 ? _b : [] }, this.toItemLeadHintInstruction(p)), this.toExampleAndIsExample(p.example)), { isCaseSensitive: (_c = p.isCaseSensitive) !== null && _c !== void 0 ? _c : true, isLongAnswer: (_d = !p.isShortAnswer) !== null && _d !== void 0 ? _d : false });
534
+ // Delete unwanted properties
535
+ if (((_e = p.itemLead) === null || _e === void 0 ? void 0 : _e.lead) == null)
536
+ delete pairJson.lead;
537
+ if (pairJson.key) {
538
+ delete pairJson.keyAudio;
539
+ delete pairJson.keyImage;
540
+ }
541
+ if (pairJson.keyAudio != null) {
542
+ delete pairJson.key;
543
+ delete pairJson.keyImage;
544
+ }
545
+ if (pairJson.keyImage != null) {
546
+ delete pairJson.key;
547
+ delete pairJson.keyAudio;
548
+ }
549
+ pairsJson.push(pairJson);
550
+ }
551
+ }
552
+ if (pairsJson.length > 0) {
553
+ this.bitJson.pairs = pairsJson;
554
+ }
555
+ }
556
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> matrix
557
+ enter_matrix(node, _parent, _route) {
558
+ var _a, _b, _c, _d, _e, _f;
559
+ const matrix = node.value;
560
+ const matrixJsonArray = [];
561
+ if (matrix) {
562
+ for (const m of matrix) {
563
+ // Choices
564
+ const matrixCellsJson = [];
565
+ if (m.cells) {
566
+ for (const c of m.cells) {
567
+ // Create the choice
568
+ const matrixCellJson = Object.assign(Object.assign({ values: (_a = c.values) !== null && _a !== void 0 ? _a : [] }, this.toItemLeadHintInstruction(c)), this.toExampleAndIsExample(c.example));
569
+ // Delete unwanted properties
570
+ if (((_b = c.itemLead) === null || _b === void 0 ? void 0 : _b.lead) == null)
571
+ delete matrixCellJson.lead;
572
+ if (c.hint == null)
573
+ delete matrixCellJson.hint;
574
+ if (c.example == null)
575
+ delete matrixCellJson.isExample;
576
+ if (c.example == null)
577
+ delete matrixCellJson.example;
578
+ matrixCellsJson.push(matrixCellJson);
579
+ }
580
+ }
581
+ // Create the matrix
582
+ const matrixJson = Object.assign(Object.assign(Object.assign({ key: (_c = m.key) !== null && _c !== void 0 ? _c : '', cells: matrixCellsJson !== null && matrixCellsJson !== void 0 ? matrixCellsJson : [] }, this.toItemLeadHintInstruction(m)), this.toExampleAndIsExample(m.example)), { isCaseSensitive: (_d = m.isCaseSensitive) !== null && _d !== void 0 ? _d : true, isLongAnswer: (_e = !m.isShortAnswer) !== null && _e !== void 0 ? _e : false });
583
+ // Delete unwanted properties
584
+ if (((_f = m.itemLead) === null || _f === void 0 ? void 0 : _f.lead) == null)
585
+ delete matrixJson.lead;
586
+ if (m.instruction == null)
587
+ delete matrixJson.instruction;
588
+ matrixJsonArray.push(matrixJson);
589
+ }
590
+ }
591
+ if (matrixJsonArray.length > 0) {
592
+ this.bitJson.matrix = matrixJsonArray;
593
+ }
594
+ }
595
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> questions
596
+ enter_questions(node, _parent, _route) {
597
+ var _a, _b, _c, _d, _e;
598
+ const questions = node.value;
599
+ const questionsJson = [];
600
+ if (questions) {
601
+ for (const q of questions) {
602
+ // Create the question
603
+ const questionJson = Object.assign(Object.assign(Object.assign({ question: (_a = q.question) !== null && _a !== void 0 ? _a : '', partialAnswer: (_b = ArrayUtils_1.ArrayUtils.asSingle(q.partialAnswer)) !== null && _b !== void 0 ? _b : '', sampleSolution: (_c = q.sampleSolution) !== null && _c !== void 0 ? _c : '' }, this.toItemLeadHintInstruction(q)), this.toExampleAndIsExample(q.example)), {
604
+ // isCaseSensitive: q.isCaseSensitive ?? true,
605
+ isShortAnswer: (_d = q.isShortAnswer) !== null && _d !== void 0 ? _d : true });
606
+ // Delete unwanted properties
607
+ if (((_e = q.itemLead) === null || _e === void 0 ? void 0 : _e.lead) == null)
608
+ delete questionJson.lead;
609
+ questionsJson.push(questionJson);
610
+ }
611
+ }
612
+ if (questionsJson.length > 0) {
613
+ this.bitJson.questions = questionsJson;
614
+ }
615
+ }
616
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> botResponses
617
+ enter_botResponses(node, parent, _route) {
618
+ var _a, _b, _c, _d;
619
+ const botResponses = node.value;
620
+ // Ignore responses that are not at the cardNode level as they are handled elsewhere
621
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.cardNode)
622
+ return;
623
+ const responsesJson = [];
624
+ if (botResponses) {
625
+ for (const r of botResponses) {
626
+ // Create the response
627
+ const responseJson = Object.assign({ response: (_a = r.response) !== null && _a !== void 0 ? _a : '', reaction: (_b = r.reaction) !== null && _b !== void 0 ? _b : '', feedback: (_c = r.feedback) !== null && _c !== void 0 ? _c : '' }, this.toItemLeadHintInstruction(r));
628
+ // Delete unwanted properties
629
+ if (((_d = r.itemLead) === null || _d === void 0 ? void 0 : _d.lead) == null)
630
+ delete responseJson.lead;
631
+ if (r.hint == null)
632
+ delete responseJson.hint;
633
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
634
+ delete responseJson.instruction;
635
+ responsesJson.push(responseJson);
636
+ }
637
+ }
638
+ if (responsesJson.length > 0) {
639
+ this.bitJson.responses = responsesJson;
640
+ }
641
+ }
642
+ // bitmarkAst -> bits -> bitsValue -> resource
643
+ enter_resource(node, _parent, _route) {
644
+ const resource = node.value;
645
+ // This is a resource - handle it with the common code
646
+ this.bitJson.resource = this.parseResourceToJson(resource);
647
+ }
648
+ //
649
+ // Terminal nodes (leaves)
650
+ //
651
+ // bitmarkAst -> bits -> bitsValue -> title
652
+ leaf_title(node, _parent, _route) {
653
+ this.bitJson.title = this.toTextAstOrString(node.value);
654
+ }
655
+ // bitmarkAst -> bits -> bitsValue -> subtitle
656
+ leaf_subtitle(node, _parent, _route) {
657
+ this.bitJson.subtitle = this.toTextAstOrString(node.value);
658
+ }
659
+ // // bitmarkAst -> bits -> bitsValue -> level
660
+ leaf_level(node, _parent, _route) {
661
+ var _a;
662
+ if (node.value != null)
663
+ this.addProperty(this.bitJson, 'level', (_a = node.value) !== null && _a !== void 0 ? _a : 1, true);
664
+ }
665
+ // bitmarkAst -> bits -> bitsValue -> book
666
+ leaf_book(node, _parent, _route) {
667
+ if (node.value != null)
668
+ this.addProperty(this.bitJson, 'book', node.value, true);
669
+ }
670
+ // bitmarkAst -> bits -> bitsValue -> anchor
671
+ leaf_anchor(node, _parent, _route) {
672
+ if (node.value != null)
673
+ this.addProperty(this.bitJson, 'anchor', node.value, true);
674
+ }
675
+ // bitmarkAst -> bits -> bitsValue -> reference
676
+ leaf_reference(node, _parent, _route) {
677
+ if (node.value != null)
678
+ this.addProperty(this.bitJson, 'reference', node.value, true);
679
+ }
680
+ // bitmarkAst -> bits -> bitsValue -> referenceEnd
681
+ leaf_referenceEnd(node, _parent, _route) {
682
+ if (node.value != null)
683
+ this.addProperty(this.bitJson, 'referenceEnd', node.value, true);
684
+ }
685
+ // bitmarkAst -> bits -> bitsValue -> * -> hint
686
+ leaf_hint(node, parent, _route) {
687
+ const hint = node.value;
688
+ // Ignore hint that is not at the bit level as it are handled elsewhere
689
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.bitsValue)
690
+ return;
691
+ this.bitJson.hint = this.toTextAstOrString(hint);
692
+ }
693
+ // bitmarkAst -> bits -> bitsValue -> * -> instruction
694
+ leaf_instruction(node, parent, _route) {
695
+ const instruction = node.value;
696
+ // Ignore instruction that is not at the bit level as it are handled elsewhere
697
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.bitsValue)
698
+ return;
699
+ this.bitJson.instruction = this.toTextAstOrString(instruction);
700
+ }
701
+ // bitmarkAst -> bits -> bitsValue -> example
702
+ leaf_example(node, parent, _route) {
703
+ const example = node.value;
704
+ // Ignore example that is not at the bit level as it are handled elsewhere
705
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.bitsValue)
706
+ return;
707
+ const res = this.toExampleAndIsExample(example);
708
+ this.bitJson.isExample = res.isExample;
709
+ this.bitJson.example = res.example;
710
+ }
711
+ // bitmarkAst -> bits -> footer -> footerText
712
+ leaf_footerText(node, _parent, _route) {
713
+ const footer = node.value;
714
+ this.bitJson.footer = this.toTextAstOrString(footer);
715
+ }
716
+ // bitmarkAst -> bits -> bitsValue -> markup
717
+ leaf_markup(node, _parent, _route) {
718
+ const bitmark = node.value;
719
+ if (bitmark)
720
+ this.bitWrapperJson.bitmark = bitmark;
721
+ }
722
+ // bitmarkAst -> bits -> bitsValue -> parser
723
+ enter_parser(node, parent, _route) {
724
+ const parser = node.value;
725
+ if (parser) {
726
+ const { version, excessResources: parserExcessResources, warnings, errors } = parser, parserRest = __rest(parser, ["version", "excessResources", "warnings", "errors"]);
727
+ const bitmarkVersion = `${this.bitmarkVersion}`;
728
+ // Parse resources to JSON from AST
729
+ let excessResources;
730
+ if (Array.isArray(parserExcessResources) && parserExcessResources.length > 0) {
731
+ excessResources = [];
732
+ for (const r of parserExcessResources) {
733
+ const rJson = this.parseResourceToJson(r);
734
+ if (rJson)
735
+ excessResources.push(rJson);
736
+ }
737
+ }
738
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) === NodeType_1.NodeType.bitsValue) {
739
+ // Bit level parser information
740
+ this.bitWrapperJson.parser = Object.assign(Object.assign({ version,
741
+ bitmarkVersion }, parserRest), { warnings,
742
+ errors,
743
+ excessResources });
744
+ if (!this.options.enableWarnings) {
745
+ // Remove warnings if not enabled
746
+ delete this.bitWrapperJson.parser.warnings;
747
+ }
748
+ }
749
+ else {
750
+ // Top level parser information (not specific to a bit)
751
+ // TODO - not sure where this error can be written
752
+ // this.bitWrapperJson.parser = {
753
+ // errors,
754
+ // };
755
+ }
756
+ }
757
+ }
758
+ // bitmarkAst -> errors
759
+ // protected enter_errors(node: NodeInfo, parent: NodeInfo | undefined, _route: NodeInfo[],
760
+ // context: Context): void {
761
+ // const errors = node.value as ParserError[] | undefined;
762
+ // if (errors && errors.length > 0) {
763
+ // // Complete bit is invalid
764
+ // // TODO - not sure where this error can be written
765
+ // // this.bitWrapperJson.parser = {
766
+ // // errors,
767
+ // // };
768
+ // }
769
+ // }
770
+ //
771
+ // Generated Node Handlers
772
+ //
773
+ /**
774
+ * Generate the handlers for properties, as they are mostly the same, but not quite
775
+ */
776
+ generatePropertyHandlers() {
777
+ var _a;
778
+ for (const key of PropertyKey_1.PropertyKey.values()) {
779
+ const validatedKey = PropertyKey_1.PropertyKey.fromValue(key);
780
+ const meta = (_a = PropertyKey_1.PropertyKey.getMetadata(validatedKey)) !== null && _a !== void 0 ? _a : {};
781
+ const astKey = meta.astKey ? meta.astKey : key;
782
+ const funcName = `enter_${astKey}`;
783
+ // Special cases (handled outside of the automatically generated handlers)
784
+ if (astKey === PropertyKey_1.PropertyKey.example)
785
+ continue;
786
+ if (astKey === PropertyKey_1.PropertyKey.partner)
787
+ continue;
788
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
789
+ this[funcName] = (node, parent, _route) => {
790
+ const value = node.value;
791
+ if (value == null)
792
+ return;
793
+ // if (key === 'progress') debugger;
794
+ // Ignore any property that is not at the bit level as that will be handled by a different handler
795
+ if ((parent === null || parent === void 0 ? void 0 : parent.key) !== NodeType_1.NodeType.bitsValue)
796
+ return;
797
+ // Convert key as needed
798
+ let jsonKey = key;
799
+ if (meta.jsonKey)
800
+ jsonKey = meta.jsonKey;
801
+ // Add the property
802
+ this.addProperty(this.bitJson, jsonKey, value, meta.isSingle);
803
+ };
804
+ // Bind this
805
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
806
+ this[funcName] = this[funcName].bind(this);
807
+ }
808
+ }
809
+ // // END NODE HANDLERS
810
+ //
811
+ // HELPER FUNCTIONS
812
+ //
813
+ createGapJson(gap) {
814
+ var _a;
815
+ const data = gap.data;
816
+ // Create the gap
817
+ const gapJson = Object.assign(Object.assign(Object.assign({ type: 'gap', solutions: data.solutions }, this.toItemLeadHintInstruction(data)), this.toExampleAndIsExample(data.example)), { isCaseSensitive: (_a = data.isCaseSensitive) !== null && _a !== void 0 ? _a : true });
818
+ // Remove unwanted properties
819
+ if (!gapJson.lead)
820
+ delete gapJson.lead;
821
+ return gapJson;
822
+ }
823
+ createSelectJson(select) {
824
+ var _a, _b, _c;
825
+ const data = select.data;
826
+ // Create the select options
827
+ const options = [];
828
+ for (const option of data.options) {
829
+ const optionJson = Object.assign(Object.assign({ text: option.text, isCorrect: (_a = option.isCorrect) !== null && _a !== void 0 ? _a : false }, this.toItemLeadHintInstruction(option)), this.toExampleAndIsExample(option.example));
830
+ // Remove unwanted properties
831
+ if (!optionJson.item)
832
+ delete optionJson.item;
833
+ if (!optionJson.lead)
834
+ delete optionJson.lead;
835
+ if (!optionJson.instruction)
836
+ delete optionJson.instruction;
837
+ if (!optionJson.example)
838
+ delete optionJson.example;
839
+ if (!optionJson.isExample)
840
+ delete optionJson.isExample;
841
+ if (!optionJson.isCaseSensitive)
842
+ delete optionJson.isCaseSensitive;
843
+ options.push(optionJson);
844
+ }
845
+ // Create the select
846
+ const selectJson = Object.assign(Object.assign({ type: 'select', prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', options, postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '' }, this.toItemLeadHintInstruction(data)), this.toExampleAndIsExample(data.example));
847
+ // Remove unwanted properties
848
+ if (!selectJson.lead)
849
+ delete selectJson.lead;
850
+ return selectJson;
851
+ }
852
+ createHighlightJson(highlight) {
853
+ var _a, _b, _c, _d;
854
+ const data = highlight.data;
855
+ // Create the highlight options
856
+ const texts = [];
857
+ for (const text of data.texts) {
858
+ const textJson = Object.assign(Object.assign({ text: text.text, isCorrect: (_a = text.isCorrect) !== null && _a !== void 0 ? _a : false, isHighlighted: (_b = text.isHighlighted) !== null && _b !== void 0 ? _b : false }, this.toItemLeadHintInstruction(text)), this.toExampleAndIsExample(text.example));
859
+ // Remove unwanted properties
860
+ if (!textJson.item)
861
+ delete textJson.item;
862
+ if (!textJson.lead)
863
+ delete textJson.lead;
864
+ if (!textJson.hint)
865
+ delete textJson.hint;
866
+ if (!textJson.example)
867
+ delete textJson.example;
868
+ if (!textJson.isExample)
869
+ delete textJson.isExample;
870
+ if (!textJson.isCaseSensitive)
871
+ delete textJson.isCaseSensitive;
872
+ texts.push(textJson);
873
+ }
874
+ // Create the select
875
+ const highlightJson = Object.assign(Object.assign({ type: 'highlight', prefix: (_c = data.prefix) !== null && _c !== void 0 ? _c : '', texts, postfix: (_d = data.postfix) !== null && _d !== void 0 ? _d : '' }, this.toItemLeadHintInstruction(data)), this.toExampleAndIsExample(data.example));
876
+ // Remove unwanted properties
877
+ if (!highlightJson.lead)
878
+ delete highlightJson.lead;
879
+ return highlightJson;
880
+ }
881
+ parseResourceToJson(resource) {
882
+ if (!resource)
883
+ return undefined;
884
+ // All resources should now be valid as they are validated in the AST
885
+ // TODO: remove code below
886
+ // // Check if a resource has a value, if not, we should not write it (or any of its chained properties)
887
+ // let valid = false;
888
+ // if (resource.value) {
889
+ // valid = true;
890
+ // }
891
+ // // Resource is not valid, return undefined
892
+ // if (!valid) return undefined;
893
+ // // Resource is valid, write it.
894
+ let resourceJson;
895
+ switch (resource.type) {
896
+ case ResourceType_1.ResourceType.image:
897
+ resourceJson = {
898
+ type: ResourceType_1.ResourceType.image,
899
+ image: this.addImageResource(resource),
900
+ };
901
+ break;
902
+ case ResourceType_1.ResourceType.imageLink:
903
+ resourceJson = {
904
+ type: ResourceType_1.ResourceType.imageLink,
905
+ imageLink: this.addImageLinkResource(resource),
906
+ };
907
+ break;
908
+ case ResourceType_1.ResourceType.audio:
909
+ resourceJson = {
910
+ type: ResourceType_1.ResourceType.audio,
911
+ audio: this.addAudioResource(resource),
912
+ };
913
+ break;
914
+ case ResourceType_1.ResourceType.audioEmbed:
915
+ resourceJson = {
916
+ type: ResourceType_1.ResourceType.audioEmbed,
917
+ audioEmbed: this.addAudioEmbedResource(resource),
918
+ };
919
+ break;
920
+ case ResourceType_1.ResourceType.audioLink:
921
+ resourceJson = {
922
+ type: ResourceType_1.ResourceType.audioLink,
923
+ audioLink: this.addAudioLinkResource(resource),
924
+ };
925
+ break;
926
+ case ResourceType_1.ResourceType.video:
927
+ resourceJson = {
928
+ type: ResourceType_1.ResourceType.video,
929
+ video: this.addVideoResource(resource),
930
+ };
931
+ break;
932
+ case ResourceType_1.ResourceType.videoEmbed:
933
+ resourceJson = {
934
+ type: ResourceType_1.ResourceType.videoEmbed,
935
+ videoEmbed: this.addVideoEmbedResource(resource),
936
+ };
937
+ resourceJson.videoEmbed = this.addVideoLinkResource(resource);
938
+ break;
939
+ case ResourceType_1.ResourceType.videoLink:
940
+ resourceJson = {
941
+ type: ResourceType_1.ResourceType.videoLink,
942
+ videoLink: this.addVideoLinkResource(resource),
943
+ };
944
+ break;
945
+ case ResourceType_1.ResourceType.stillImageFilm: {
946
+ const stillImageFilmResource = resource;
947
+ // Only write the resource if it has both an image and audio
948
+ if (stillImageFilmResource.image.value != null && stillImageFilmResource.audio.value != null) {
949
+ resourceJson = {
950
+ type: ResourceType_1.ResourceType.stillImageFilm,
951
+ image: this.addImageResource(stillImageFilmResource.image),
952
+ audio: this.addAudioResource(stillImageFilmResource.audio),
953
+ };
954
+ }
955
+ break;
956
+ }
957
+ case ResourceType_1.ResourceType.stillImageFilmEmbed:
958
+ resourceJson = {
959
+ type: ResourceType_1.ResourceType.stillImageFilmEmbed,
960
+ stillImageFilmEmbed: this.addStillImageFilmEmbedResource(resource),
961
+ };
962
+ break;
963
+ case ResourceType_1.ResourceType.stillImageFilmLink:
964
+ resourceJson = {
965
+ type: ResourceType_1.ResourceType.stillImageFilmLink,
966
+ stillImageFilmLink: this.addStillImageFilmLinkResource(resource),
967
+ };
968
+ break;
969
+ case ResourceType_1.ResourceType.article:
970
+ resourceJson = {
971
+ type: ResourceType_1.ResourceType.article,
972
+ article: this.addArticleResource(resource),
973
+ };
974
+ break;
975
+ case ResourceType_1.ResourceType.document:
976
+ resourceJson = {
977
+ type: ResourceType_1.ResourceType.document,
978
+ document: this.addDocumentResource(resource),
979
+ };
980
+ break;
981
+ case ResourceType_1.ResourceType.documentEmbed:
982
+ resourceJson = {
983
+ type: ResourceType_1.ResourceType.documentEmbed,
984
+ documentEmbed: this.addDocumentEmbedResource(resource),
985
+ };
986
+ break;
987
+ case ResourceType_1.ResourceType.documentLink:
988
+ resourceJson = {
989
+ type: ResourceType_1.ResourceType.documentLink,
990
+ documentLink: this.addDocumentLinkResource(resource),
991
+ };
992
+ break;
993
+ case ResourceType_1.ResourceType.documentDownload:
994
+ resourceJson = {
995
+ type: ResourceType_1.ResourceType.documentDownload,
996
+ documentDownload: this.addDocumentDownloadResource(resource),
997
+ };
998
+ break;
999
+ case ResourceType_1.ResourceType.appLink:
1000
+ resourceJson = {
1001
+ type: ResourceType_1.ResourceType.appLink,
1002
+ appLink: this.addAppLinkResource(resource),
1003
+ };
1004
+ break;
1005
+ case ResourceType_1.ResourceType.websiteLink:
1006
+ resourceJson = {
1007
+ type: ResourceType_1.ResourceType.websiteLink,
1008
+ websiteLink: this.addWebsiteLinkResource(resource),
1009
+ };
1010
+ break;
1011
+ default:
1012
+ }
1013
+ return resourceJson;
1014
+ }
1015
+ addImageResource(resource) {
1016
+ var _a, _b, _c;
1017
+ const resourceJson = {};
1018
+ if (StringUtils_1.StringUtils.isString(resource)) {
1019
+ const value = resource;
1020
+ resource = {
1021
+ type: ResourceType_1.ResourceType.image,
1022
+ value,
1023
+ format: UrlUtils_1.UrlUtils.fileExtensionFromUrl(value),
1024
+ provider: UrlUtils_1.UrlUtils.domainFromUrl(value),
1025
+ };
1026
+ }
1027
+ resource = resource; // Keep TS compiler happy
1028
+ if (resource.format != null)
1029
+ resourceJson.format = resource.format;
1030
+ if (resource.provider != null)
1031
+ resourceJson.provider = resource.provider;
1032
+ if (resource.value != null)
1033
+ resourceJson.src = resource.value;
1034
+ if (resource.src1x != null)
1035
+ resourceJson.src1x = resource.src1x;
1036
+ if (resource.src2x != null)
1037
+ resourceJson.src2x = resource.src2x;
1038
+ if (resource.src3x != null)
1039
+ resourceJson.src3x = resource.src3x;
1040
+ if (resource.src4x != null)
1041
+ resourceJson.src4x = resource.src4x;
1042
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1043
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1044
+ resourceJson.alt = (_c = resource.alt) !== null && _c !== void 0 ? _c : '';
1045
+ this.addGenericResourceProperties(resource, resourceJson);
1046
+ return resourceJson;
1047
+ }
1048
+ addImageLinkResource(resource) {
1049
+ var _a, _b, _c;
1050
+ const resourceJson = {};
1051
+ if (StringUtils_1.StringUtils.isString(resource)) {
1052
+ const value = resource;
1053
+ resource = {
1054
+ type: ResourceType_1.ResourceType.imageLink,
1055
+ value,
1056
+ format: UrlUtils_1.UrlUtils.fileExtensionFromUrl(value),
1057
+ provider: UrlUtils_1.UrlUtils.domainFromUrl(value),
1058
+ };
1059
+ }
1060
+ resource = resource; // Keep TS compiler happy
1061
+ if (resource.format != null)
1062
+ resourceJson.format = resource.format;
1063
+ if (resource.provider != null)
1064
+ resourceJson.provider = resource.provider;
1065
+ if (resource.value != null)
1066
+ resourceJson.url = resource.value;
1067
+ if (resource.src1x != null)
1068
+ resourceJson.src1x = resource.src1x;
1069
+ if (resource.src2x != null)
1070
+ resourceJson.src2x = resource.src2x;
1071
+ if (resource.src3x != null)
1072
+ resourceJson.src3x = resource.src3x;
1073
+ if (resource.src4x != null)
1074
+ resourceJson.src4x = resource.src4x;
1075
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1076
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1077
+ resourceJson.alt = (_c = resource.alt) !== null && _c !== void 0 ? _c : '';
1078
+ this.addGenericResourceProperties(resource, resourceJson);
1079
+ return resourceJson;
1080
+ }
1081
+ addAudioResource(resource) {
1082
+ const resourceJson = {};
1083
+ if (resource.format != null)
1084
+ resourceJson.format = resource.format;
1085
+ if (resource.provider != null)
1086
+ resourceJson.provider = resource.provider;
1087
+ if (resource.value != null)
1088
+ resourceJson.src = resource.value;
1089
+ if (resource.duration != null)
1090
+ resourceJson.duration = resource.duration;
1091
+ if (resource.mute != null)
1092
+ resourceJson.mute = resource.mute;
1093
+ if (resource.autoplay != null)
1094
+ resourceJson.autoplay = resource.autoplay;
1095
+ this.addGenericResourceProperties(resource, resourceJson);
1096
+ return resourceJson;
1097
+ }
1098
+ addAudioEmbedResource(resource) {
1099
+ const resourceJson = {};
1100
+ if (resource.format != null)
1101
+ resourceJson.format = resource.format;
1102
+ if (resource.provider != null)
1103
+ resourceJson.provider = resource.provider;
1104
+ if (resource.value != null)
1105
+ resourceJson.src = resource.value;
1106
+ if (resource.duration != null)
1107
+ resourceJson.duration = resource.duration;
1108
+ if (resource.mute != null)
1109
+ resourceJson.mute = resource.mute;
1110
+ if (resource.autoplay != null)
1111
+ resourceJson.autoplay = resource.autoplay;
1112
+ this.addGenericResourceProperties(resource, resourceJson);
1113
+ return resourceJson;
1114
+ }
1115
+ addAudioLinkResource(resource) {
1116
+ const resourceJson = {};
1117
+ if (resource.format != null)
1118
+ resourceJson.format = resource.format;
1119
+ if (resource.provider != null)
1120
+ resourceJson.provider = resource.provider;
1121
+ if (resource.value != null)
1122
+ resourceJson.url = resource.value;
1123
+ if (resource.duration != null)
1124
+ resourceJson.duration = resource.duration;
1125
+ if (resource.mute != null)
1126
+ resourceJson.mute = resource.mute;
1127
+ if (resource.autoplay != null)
1128
+ resourceJson.autoplay = resource.autoplay;
1129
+ this.addGenericResourceProperties(resource, resourceJson, true);
1130
+ return resourceJson;
1131
+ }
1132
+ addVideoResource(resource) {
1133
+ var _a, _b;
1134
+ const resourceJson = {};
1135
+ if (resource.format != null)
1136
+ resourceJson.format = resource.format;
1137
+ if (resource.provider != null)
1138
+ resourceJson.provider = resource.provider;
1139
+ if (resource.value != null)
1140
+ resourceJson.src = resource.value;
1141
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1142
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1143
+ if (resource.duration != null)
1144
+ resourceJson.duration = resource.duration;
1145
+ if (resource.mute != null)
1146
+ resourceJson.mute = resource.mute;
1147
+ if (resource.autoplay != null)
1148
+ resourceJson.autoplay = resource.autoplay;
1149
+ if (resource.allowSubtitles != null)
1150
+ resourceJson.allowSubtitles = resource.allowSubtitles;
1151
+ if (resource.showSubtitles != null)
1152
+ resourceJson.showSubtitles = resource.showSubtitles;
1153
+ if (resource.alt != null)
1154
+ resourceJson.alt = resource.alt;
1155
+ if (resource.posterImage != null)
1156
+ resourceJson.posterImage = this.addImageResource(resource.posterImage);
1157
+ if (resource.thumbnails != null && resource.thumbnails.length > 0) {
1158
+ resourceJson.thumbnails = [];
1159
+ for (const thumbnail of resource.thumbnails) {
1160
+ resourceJson.thumbnails.push(this.addImageResource(thumbnail));
1161
+ }
1162
+ }
1163
+ this.addGenericResourceProperties(resource, resourceJson);
1164
+ return resourceJson;
1165
+ }
1166
+ addVideoEmbedResource(resource) {
1167
+ var _a, _b;
1168
+ const resourceJson = {};
1169
+ if (resource.format != null)
1170
+ resourceJson.format = resource.format;
1171
+ if (resource.provider != null)
1172
+ resourceJson.provider = resource.provider;
1173
+ if (resource.value != null)
1174
+ resourceJson.src = resource.value;
1175
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1176
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1177
+ if (resource.duration != null)
1178
+ resourceJson.duration = resource.duration;
1179
+ if (resource.mute != null)
1180
+ resourceJson.mute = resource.mute;
1181
+ if (resource.autoplay != null)
1182
+ resourceJson.autoplay = resource.autoplay;
1183
+ if (resource.allowSubtitles != null)
1184
+ resourceJson.allowSubtitles = resource.allowSubtitles;
1185
+ if (resource.showSubtitles != null)
1186
+ resourceJson.showSubtitles = resource.showSubtitles;
1187
+ if (resource.alt != null)
1188
+ resourceJson.alt = resource.alt;
1189
+ if (resource.posterImage != null)
1190
+ resourceJson.posterImage = this.addImageResource(resource.posterImage);
1191
+ if (resource.thumbnails != null && resource.thumbnails.length > 0) {
1192
+ resourceJson.thumbnails = [];
1193
+ for (const thumbnail of resource.thumbnails) {
1194
+ resourceJson.thumbnails.push(this.addImageResource(thumbnail));
1195
+ }
1196
+ }
1197
+ this.addGenericResourceProperties(resource, resourceJson);
1198
+ return resourceJson;
1199
+ }
1200
+ addVideoLinkResource(resource) {
1201
+ var _a, _b;
1202
+ const resourceJson = {};
1203
+ if (resource.format != null)
1204
+ resourceJson.format = resource.format;
1205
+ if (resource.provider != null)
1206
+ resourceJson.provider = resource.provider;
1207
+ if (resource.value != null)
1208
+ resourceJson.url = resource.value;
1209
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1210
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1211
+ if (resource.duration != null)
1212
+ resourceJson.duration = resource.duration;
1213
+ if (resource.mute != null)
1214
+ resourceJson.mute = resource.mute;
1215
+ if (resource.autoplay != null)
1216
+ resourceJson.autoplay = resource.autoplay;
1217
+ if (resource.allowSubtitles != null)
1218
+ resourceJson.allowSubtitles = resource.allowSubtitles;
1219
+ if (resource.showSubtitles != null)
1220
+ resourceJson.showSubtitles = resource.showSubtitles;
1221
+ if (resource.alt != null)
1222
+ resourceJson.alt = resource.alt;
1223
+ if (resource.posterImage != null)
1224
+ resourceJson.posterImage = this.addImageResource(resource.posterImage);
1225
+ if (resource.thumbnails != null && resource.thumbnails.length > 0) {
1226
+ resourceJson.thumbnails = [];
1227
+ for (const thumbnail of resource.thumbnails) {
1228
+ resourceJson.thumbnails.push(this.addImageResource(thumbnail));
1229
+ }
1230
+ }
1231
+ this.addGenericResourceProperties(resource, resourceJson);
1232
+ return resourceJson;
1233
+ }
1234
+ addStillImageFilmEmbedResource(resource) {
1235
+ var _a, _b;
1236
+ const resourceJson = {};
1237
+ if (resource.format != null)
1238
+ resourceJson.format = resource.format;
1239
+ if (resource.provider != null)
1240
+ resourceJson.provider = resource.provider;
1241
+ if (resource.value != null)
1242
+ resourceJson.url = resource.value;
1243
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1244
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1245
+ if (resource.duration != null)
1246
+ resourceJson.duration = resource.duration;
1247
+ if (resource.mute != null)
1248
+ resourceJson.mute = resource.mute;
1249
+ if (resource.autoplay != null)
1250
+ resourceJson.autoplay = resource.autoplay;
1251
+ if (resource.allowSubtitles != null)
1252
+ resourceJson.allowSubtitles = resource.allowSubtitles;
1253
+ if (resource.showSubtitles != null)
1254
+ resourceJson.showSubtitles = resource.showSubtitles;
1255
+ if (resource.alt != null)
1256
+ resourceJson.alt = resource.alt;
1257
+ if (resource.posterImage != null)
1258
+ resourceJson.posterImage = this.addImageResource(resource.posterImage);
1259
+ if (resource.thumbnails != null && resource.thumbnails.length > 0) {
1260
+ resourceJson.thumbnails = [];
1261
+ for (const thumbnail of resource.thumbnails) {
1262
+ resourceJson.thumbnails.push(this.addImageResource(thumbnail));
1263
+ }
1264
+ }
1265
+ this.addGenericResourceProperties(resource, resourceJson);
1266
+ return resourceJson;
1267
+ }
1268
+ addStillImageFilmLinkResource(resource) {
1269
+ var _a, _b;
1270
+ const resourceJson = {};
1271
+ if (resource.format != null)
1272
+ resourceJson.format = resource.format;
1273
+ if (resource.provider != null)
1274
+ resourceJson.provider = resource.provider;
1275
+ if (resource.value != null)
1276
+ resourceJson.url = resource.value;
1277
+ resourceJson.width = (_a = resource.width) !== null && _a !== void 0 ? _a : null;
1278
+ resourceJson.height = (_b = resource.height) !== null && _b !== void 0 ? _b : null;
1279
+ if (resource.duration != null)
1280
+ resourceJson.duration = resource.duration;
1281
+ if (resource.mute != null)
1282
+ resourceJson.mute = resource.mute;
1283
+ if (resource.autoplay != null)
1284
+ resourceJson.autoplay = resource.autoplay;
1285
+ if (resource.allowSubtitles != null)
1286
+ resourceJson.allowSubtitles = resource.allowSubtitles;
1287
+ if (resource.showSubtitles != null)
1288
+ resourceJson.showSubtitles = resource.showSubtitles;
1289
+ if (resource.alt != null)
1290
+ resourceJson.alt = resource.alt;
1291
+ if (resource.posterImage != null)
1292
+ resourceJson.posterImage = this.addImageResource(resource.posterImage);
1293
+ if (resource.thumbnails != null && resource.thumbnails.length > 0) {
1294
+ resourceJson.thumbnails = [];
1295
+ for (const thumbnail of resource.thumbnails) {
1296
+ resourceJson.thumbnails.push(this.addImageResource(thumbnail));
1297
+ }
1298
+ }
1299
+ this.addGenericResourceProperties(resource, resourceJson);
1300
+ return resourceJson;
1301
+ }
1302
+ addArticleResource(resource) {
1303
+ const resourceJson = {};
1304
+ if (resource.format != null)
1305
+ resourceJson.format = resource.format;
1306
+ if (resource.provider != null)
1307
+ resourceJson.provider = resource.provider;
1308
+ if (resource.value != null)
1309
+ resourceJson.body = resource.value;
1310
+ // if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
1311
+ this.addGenericResourceProperties(resource, resourceJson);
1312
+ return resourceJson;
1313
+ }
1314
+ addDocumentResource(resource) {
1315
+ const resourceJson = {};
1316
+ if (resource.format != null)
1317
+ resourceJson.format = resource.format;
1318
+ if (resource.provider != null)
1319
+ resourceJson.provider = resource.provider;
1320
+ if (resource.value != null)
1321
+ resourceJson.url = resource.value;
1322
+ // if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
1323
+ this.addGenericResourceProperties(resource, resourceJson);
1324
+ return resourceJson;
1325
+ }
1326
+ addDocumentEmbedResource(resource) {
1327
+ const resourceJson = {};
1328
+ if (resource.format != null)
1329
+ resourceJson.format = resource.format;
1330
+ if (resource.provider != null)
1331
+ resourceJson.provider = resource.provider;
1332
+ if (resource.value != null)
1333
+ resourceJson.url = resource.value;
1334
+ // if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
1335
+ this.addGenericResourceProperties(resource, resourceJson);
1336
+ return resourceJson;
1337
+ }
1338
+ addDocumentLinkResource(resource) {
1339
+ const resourceJson = {};
1340
+ if (resource.format != null)
1341
+ resourceJson.format = resource.format;
1342
+ if (resource.provider != null)
1343
+ resourceJson.provider = resource.provider;
1344
+ if (resource.value != null)
1345
+ resourceJson.url = resource.value;
1346
+ // if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
1347
+ this.addGenericResourceProperties(resource, resourceJson);
1348
+ return resourceJson;
1349
+ }
1350
+ addDocumentDownloadResource(resource) {
1351
+ const resourceJson = {};
1352
+ if (resource.format != null)
1353
+ resourceJson.format = resource.format;
1354
+ if (resource.provider != null)
1355
+ resourceJson.provider = resource.provider;
1356
+ if (resource.value != null)
1357
+ resourceJson.url = resource.value;
1358
+ // if (resource.href != null) resourceJson.href = resource.href; // It is never used (and doesn't exist in the AST model)
1359
+ this.addGenericResourceProperties(resource, resourceJson);
1360
+ return resourceJson;
1361
+ }
1362
+ addAppLinkResource(resource) {
1363
+ const resourceJson = {};
1364
+ // if (resource.format != null) resourceJson.format = resource.format;
1365
+ if (resource.value != null)
1366
+ resourceJson.url = resource.value;
1367
+ this.addGenericResourceProperties(resource, resourceJson);
1368
+ return resourceJson;
1369
+ }
1370
+ addWebsiteLinkResource(resource) {
1371
+ const resourceJson = {};
1372
+ // if (resource.format != null) resourceJson.format = resource.format;
1373
+ if (resource.value != null)
1374
+ resourceJson.url = resource.value;
1375
+ if (resource.siteName != null)
1376
+ resourceJson.siteName = resource.siteName;
1377
+ this.addGenericResourceProperties(resource, resourceJson);
1378
+ return resourceJson;
1379
+ }
1380
+ addGenericResourceProperties(resource, resourceJson, noDefaults) {
1381
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1382
+ if (noDefaults) {
1383
+ if (resource.license != null)
1384
+ resourceJson.license = (_a = resource.license) !== null && _a !== void 0 ? _a : '';
1385
+ if (resource.copyright != null)
1386
+ resourceJson.copyright = (_b = resource.copyright) !== null && _b !== void 0 ? _b : '';
1387
+ if (resource.provider != null)
1388
+ resourceJson.provider = resource.provider;
1389
+ if (resource.showInIndex != null)
1390
+ resourceJson.showInIndex = (_c = resource.showInIndex) !== null && _c !== void 0 ? _c : false;
1391
+ if (resource.caption != null)
1392
+ resourceJson.caption = this.toTextAstOrString((_d = resource.caption) !== null && _d !== void 0 ? _d : '');
1393
+ }
1394
+ else {
1395
+ resourceJson.license = (_e = resource.license) !== null && _e !== void 0 ? _e : '';
1396
+ resourceJson.copyright = (_f = resource.copyright) !== null && _f !== void 0 ? _f : '';
1397
+ if (resource.provider != null)
1398
+ resourceJson.provider = resource.provider;
1399
+ resourceJson.showInIndex = (_g = resource.showInIndex) !== null && _g !== void 0 ? _g : false;
1400
+ resourceJson.caption = this.toTextAstOrString((_h = resource.caption) !== null && _h !== void 0 ? _h : '');
1401
+ }
1402
+ return resourceJson;
1403
+ }
1404
+ toItemLeadHintInstruction(item) {
1405
+ var _a, _b, _c, _d, _e, _f;
1406
+ return {
1407
+ item: this.toTextAstOrString((_b = (_a = item.itemLead) === null || _a === void 0 ? void 0 : _a.item) !== null && _b !== void 0 ? _b : ''),
1408
+ lead: this.toTextAstOrString((_d = (_c = item.itemLead) === null || _c === void 0 ? void 0 : _c.lead) !== null && _d !== void 0 ? _d : ''),
1409
+ hint: this.toTextAstOrString((_e = item.hint) !== null && _e !== void 0 ? _e : ''),
1410
+ instruction: this.toTextAstOrString((_f = item.instruction) !== null && _f !== void 0 ? _f : ''),
1411
+ };
1412
+ }
1413
+ toExampleAndIsExample(exampleIn) {
1414
+ let isExample = false;
1415
+ let example = this.textDefault;
1416
+ if (exampleIn === true) {
1417
+ isExample = true;
1418
+ }
1419
+ else if (exampleIn) {
1420
+ isExample = true;
1421
+ example = this.toTextAstOrString(exampleIn);
1422
+ }
1423
+ return {
1424
+ isExample,
1425
+ example,
1426
+ };
1427
+ }
1428
+ addProperty(
1429
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1430
+ target, name, values, singleWithoutArray) {
1431
+ if (values !== undefined) {
1432
+ if (!Array.isArray(values))
1433
+ values = [values];
1434
+ if (Array.isArray(values) && values.length > 0) {
1435
+ if (singleWithoutArray && values.length >= 1) {
1436
+ target[name] = values[values.length - 1];
1437
+ }
1438
+ else {
1439
+ target[name] = values;
1440
+ }
1441
+ }
1442
+ }
1443
+ }
1444
+ /**
1445
+ * Get the bit type from any node
1446
+ *
1447
+ * @param route the route to the node
1448
+ * @returns the bit type
1449
+ */
1450
+ getBitType(route) {
1451
+ for (const node of route) {
1452
+ if (node.key === NodeType_1.NodeType.bitsValue) {
1453
+ const n = node.value;
1454
+ return BitType_1.BitType.fromValue(n === null || n === void 0 ? void 0 : n.bitType);
1455
+ }
1456
+ }
1457
+ return undefined;
1458
+ }
1459
+ /**
1460
+ * Get the text format from any node
1461
+ *
1462
+ * @param route the route to the node
1463
+ * @returns the text format
1464
+ */
1465
+ getTextFormat(route) {
1466
+ for (const node of route) {
1467
+ if (node.key === NodeType_1.NodeType.bitsValue) {
1468
+ const n = node.value;
1469
+ return TextFormat_1.TextFormat.fromValue(n === null || n === void 0 ? void 0 : n.textFormat);
1470
+ }
1471
+ }
1472
+ return undefined;
1473
+ }
1474
+ /**
1475
+ * Convert parse a string to TextAst if required, otherwise just return the string as is.
1476
+ * @param text
1477
+ * @returns
1478
+ */
1479
+ toTextAstOrString(text, format = TextFormat_1.TextFormat.bitmarkMinusMinus) {
1480
+ if (!text)
1481
+ undefined;
1482
+ if (this.options.textAsPlainText) {
1483
+ return text;
1484
+ }
1485
+ // Use the text parser to parse the text
1486
+ const textAst = this.textParser.toAst(text, {
1487
+ textFormat: format,
1488
+ });
1489
+ return textAst;
1490
+ }
1491
+ /**
1492
+ * Walk the body AST to find the placeholder and replace it with the body bit.
1493
+ *
1494
+ * @param bodyAst the body AST
1495
+ * @param bodyBitJson the body bit json to insert at the placeholder position
1496
+ * @param index the index of the placeholder to replace
1497
+ */
1498
+ replacePlaceholderWithBodyBit(bodyAst, bodyBitJson, index) {
1499
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1500
+ const walkRecursive = (node, parent, parentKey) => {
1501
+ if (Array.isArray(node)) {
1502
+ // Walk the array of nodes
1503
+ for (let i = 0; i < node.length; i++) {
1504
+ const child = node[i];
1505
+ const done = walkRecursive(child, node, i);
1506
+ if (done)
1507
+ return true;
1508
+ }
1509
+ }
1510
+ else {
1511
+ if (node.type === 'bit' && node.index === index) {
1512
+ // Found the placeholder, replace it with the body bit
1513
+ parent[parentKey] = bodyBitJson;
1514
+ return true;
1515
+ }
1516
+ if (node.content) {
1517
+ // Walk the child content
1518
+ const done = walkRecursive(node.content, node, 'content');
1519
+ if (done)
1520
+ return true;
1521
+ }
1522
+ }
1523
+ return false;
1524
+ };
1525
+ walkRecursive(bodyAst, null, null);
1526
+ }
1527
+ //
1528
+ // WRITE FUNCTIONS
1529
+ //
1530
+ writeInlineDebug(key, state) {
1531
+ let tag = key;
1532
+ if (state.open) {
1533
+ tag = `<${key}>`;
1534
+ }
1535
+ else if (state.close) {
1536
+ tag = `</${key}>`;
1537
+ }
1538
+ else if (state.single) {
1539
+ tag = `<${key} />`;
1540
+ }
1541
+ this.writeString(tag);
1542
+ }
1543
+ writeString(s) {
1544
+ if (s != null)
1545
+ this.write(`${s}`);
1546
+ }
1547
+ /**
1548
+ * Create a new bit json object.
1549
+ * - This function defines the order of the properties in the json.
1550
+ *
1551
+ * @param bit
1552
+ * @returns
1553
+ */
1554
+ createBitJson(bit) {
1555
+ const bitJson = {
1556
+ type: bit.bitType,
1557
+ format: bit.textFormat,
1558
+ // Properties
1559
+ id: undefined,
1560
+ externalId: undefined,
1561
+ spaceId: undefined,
1562
+ padletId: undefined,
1563
+ AIGenerated: undefined,
1564
+ releaseVersion: undefined,
1565
+ book: undefined,
1566
+ ageRange: undefined,
1567
+ language: undefined,
1568
+ computerLanguage: undefined,
1569
+ subtype: undefined,
1570
+ coverImage: undefined,
1571
+ publisher: undefined,
1572
+ publications: undefined,
1573
+ author: undefined,
1574
+ subject: undefined,
1575
+ date: undefined,
1576
+ location: undefined,
1577
+ theme: undefined,
1578
+ kind: undefined,
1579
+ action: undefined,
1580
+ thumbImage: undefined,
1581
+ focusX: undefined,
1582
+ focusY: undefined,
1583
+ deeplink: undefined,
1584
+ externalLink: undefined,
1585
+ externalLinkText: undefined,
1586
+ videoCallLink: undefined,
1587
+ duration: undefined,
1588
+ list: undefined,
1589
+ textReference: undefined,
1590
+ isTracked: undefined,
1591
+ isInfoOnly: undefined,
1592
+ labelTrue: undefined,
1593
+ labelFalse: undefined,
1594
+ quotedPerson: undefined,
1595
+ partialAnswer: undefined,
1596
+ // Book data
1597
+ title: undefined,
1598
+ subtitle: undefined,
1599
+ level: undefined,
1600
+ toc: undefined,
1601
+ progress: undefined,
1602
+ anchor: undefined,
1603
+ reference: undefined,
1604
+ referenceEnd: undefined,
1605
+ // Item, Lead, Hint, Instruction
1606
+ item: undefined,
1607
+ lead: undefined,
1608
+ hint: undefined,
1609
+ instruction: undefined,
1610
+ // Example
1611
+ example: undefined,
1612
+ isExample: undefined,
1613
+ // Partner .conversion-xxx only
1614
+ partner: undefined,
1615
+ // Extra Properties
1616
+ extraProperties: undefined,
1617
+ // Body
1618
+ body: undefined,
1619
+ // Resource
1620
+ resource: undefined,
1621
+ // Children
1622
+ statement: undefined,
1623
+ isCorrect: undefined,
1624
+ sampleSolution: undefined,
1625
+ elements: undefined,
1626
+ statements: undefined,
1627
+ responses: undefined,
1628
+ quizzes: undefined,
1629
+ heading: undefined,
1630
+ pairs: undefined,
1631
+ matrix: undefined,
1632
+ choices: undefined,
1633
+ questions: undefined,
1634
+ // Placeholders
1635
+ placeholders: undefined,
1636
+ // Footer
1637
+ footer: undefined,
1638
+ };
1639
+ // Add the resource template if there should be a resource (indicated by resourceType) but there is none defined.
1640
+ // if (bit.resourceType && !bitJson.resource) {
1641
+ // const jsonKey = ResourceType.keyFromValue(bit.resourceType);
1642
+ // bitJson.resource = {
1643
+ // type: bit.resourceType,
1644
+ // } as ResourceJson;
1645
+ // // eslint-disable-next-line @typescript-eslint/no-explicit-any
1646
+ // if (jsonKey) (bitJson.resource as any)[jsonKey] = {};
1647
+ // }
1648
+ return bitJson;
1649
+ }
1650
+ /**
1651
+ * Remove wanted properties from bit json object.
1652
+ * - This function defines the defaults for properties in the json.
1653
+ *
1654
+ * @param bit
1655
+ * @returns
1656
+ */
1657
+ cleanAndSetDefaultsForBitJson(bitJson) {
1658
+ const plainText = this.options.textAsPlainText;
1659
+ // Clear 'item' which may be an empty string if 'lead' was set but item not
1660
+ // Only necessary because '.article' does not include a default value for 'item'
1661
+ // which is totally inconsistent, but maybe is wanted.
1662
+ if (!bitJson.item)
1663
+ bitJson.item = undefined;
1664
+ // Add default properties to the bit.
1665
+ // NOTE: Not all bits have the same default properties.
1666
+ // The properties used in the antlr parser are a bit random sometimes?
1667
+ switch (bitJson.type) {
1668
+ case BitType_1.BitType._error:
1669
+ break;
1670
+ case BitType_1.BitType.article:
1671
+ case BitType_1.BitType.highlightText:
1672
+ case BitType_1.BitType.message:
1673
+ case BitType_1.BitType.sampleSolution:
1674
+ case BitType_1.BitType.page:
1675
+ case BitType_1.BitType.statement:
1676
+ if (bitJson.body == null)
1677
+ bitJson.body = this.bodyDefault;
1678
+ break;
1679
+ default: // Most bits have these defaults, but there are special cases (not sure if that is by error or design)
1680
+ if (bitJson.item == null)
1681
+ bitJson.item = this.textDefault;
1682
+ if (bitJson.hint == null)
1683
+ bitJson.hint = this.textDefault;
1684
+ if (bitJson.isExample == null)
1685
+ bitJson.isExample = false;
1686
+ if (bitJson.example == null)
1687
+ bitJson.example = this.textDefault;
1688
+ if (bitJson.body == null)
1689
+ bitJson.body = this.bodyDefault;
1690
+ break;
1691
+ case BitType_1.BitType.multipleChoice1:
1692
+ case BitType_1.BitType.multipleResponse1:
1693
+ case BitType_1.BitType.sequence:
1694
+ if (bitJson.item == null)
1695
+ bitJson.item = this.textDefault;
1696
+ if (bitJson.hint == null)
1697
+ bitJson.hint = this.textDefault;
1698
+ if (bitJson.instruction == null)
1699
+ bitJson.instruction = this.textDefault;
1700
+ if (bitJson.isExample == null)
1701
+ bitJson.isExample = false;
1702
+ if (bitJson.example == null)
1703
+ bitJson.example = this.textDefault;
1704
+ if (bitJson.body == null)
1705
+ bitJson.body = this.bodyDefault;
1706
+ break;
1707
+ case BitType_1.BitType.essay:
1708
+ if (bitJson.item == null)
1709
+ bitJson.item = this.textDefault;
1710
+ if (bitJson.hint == null)
1711
+ bitJson.hint = this.textDefault;
1712
+ if (bitJson.instruction == null)
1713
+ bitJson.instruction = this.textDefault;
1714
+ if (bitJson.isExample == null)
1715
+ bitJson.isExample = false;
1716
+ if (bitJson.example == null)
1717
+ bitJson.example = this.textDefault;
1718
+ if (bitJson.body == null)
1719
+ bitJson.body = this.bodyDefault;
1720
+ if (bitJson.partialAnswer == null)
1721
+ bitJson.partialAnswer = '';
1722
+ // if (bitJson.sampleSolution == null) bitJson.sampleSolution = '';
1723
+ break;
1724
+ case BitType_1.BitType.trueFalse1:
1725
+ if (bitJson.item == null)
1726
+ bitJson.item = this.textDefault;
1727
+ if (bitJson.lead == null)
1728
+ bitJson.lead = this.textDefault;
1729
+ if (bitJson.hint == null)
1730
+ bitJson.hint = this.textDefault;
1731
+ if (bitJson.instruction == null)
1732
+ bitJson.instruction = this.textDefault;
1733
+ if (bitJson.isExample == null)
1734
+ bitJson.isExample = false;
1735
+ if (bitJson.isCorrect == null)
1736
+ bitJson.isCorrect = false;
1737
+ if (bitJson.body == null)
1738
+ bitJson.body = this.bodyDefault;
1739
+ break;
1740
+ case BitType_1.BitType.trueFalse:
1741
+ if (bitJson.item == null)
1742
+ bitJson.item = this.textDefault;
1743
+ if (bitJson.lead == null)
1744
+ bitJson.lead = this.textDefault;
1745
+ if (bitJson.hint == null)
1746
+ bitJson.hint = this.textDefault;
1747
+ if (bitJson.instruction == null)
1748
+ bitJson.instruction = this.textDefault;
1749
+ if (bitJson.labelFalse == null)
1750
+ bitJson.labelFalse = '';
1751
+ if (bitJson.labelTrue == null)
1752
+ bitJson.labelTrue = '';
1753
+ if (bitJson.body == null)
1754
+ bitJson.body = this.bodyDefault;
1755
+ break;
1756
+ case BitType_1.BitType.chapter:
1757
+ if (bitJson.item == null)
1758
+ bitJson.item = this.textDefault;
1759
+ if (bitJson.hint == null)
1760
+ bitJson.hint = this.textDefault;
1761
+ if (bitJson.isExample == null)
1762
+ bitJson.isExample = false;
1763
+ if (bitJson.example == null)
1764
+ bitJson.example = this.textDefault;
1765
+ if (bitJson.toc == null)
1766
+ bitJson.toc = true; // Always set on chapter bits?
1767
+ if (bitJson.progress == null)
1768
+ bitJson.progress = true; // Always set on chapter bits
1769
+ if (bitJson.level == null)
1770
+ bitJson.level = 1; // Set level 1 if none set (makes no sense, but in ANTLR parser)
1771
+ if (bitJson.body == null)
1772
+ bitJson.body = this.bodyDefault;
1773
+ break;
1774
+ case BitType_1.BitType.multipleChoice:
1775
+ case BitType_1.BitType.multipleResponse:
1776
+ if (bitJson.item == null)
1777
+ bitJson.item = this.textDefault;
1778
+ if (bitJson.hint == null)
1779
+ bitJson.hint = this.textDefault;
1780
+ if (bitJson.instruction == null)
1781
+ bitJson.instruction = this.textDefault;
1782
+ if (bitJson.body == null)
1783
+ bitJson.body = this.bodyDefault;
1784
+ if (bitJson.footer == null)
1785
+ bitJson.footer = this.textDefault;
1786
+ break;
1787
+ case BitType_1.BitType.interview:
1788
+ case BitType_1.BitType.interviewInstructionGrouped:
1789
+ if (bitJson.item == null)
1790
+ bitJson.item = this.textDefault;
1791
+ if (bitJson.hint == null)
1792
+ bitJson.hint = this.textDefault;
1793
+ if (bitJson.instruction == null)
1794
+ bitJson.instruction = this.textDefault;
1795
+ if (bitJson.body == null)
1796
+ bitJson.body = this.bodyDefault;
1797
+ if (bitJson.footer == null)
1798
+ bitJson.footer = this.textDefault;
1799
+ if (bitJson.questions == null)
1800
+ bitJson.questions = [];
1801
+ break;
1802
+ case BitType_1.BitType.match:
1803
+ case BitType_1.BitType.matchReverse:
1804
+ case BitType_1.BitType.matchSolutionGrouped:
1805
+ case BitType_1.BitType.matchAll:
1806
+ case BitType_1.BitType.matchAllReverse:
1807
+ if (bitJson.item == null)
1808
+ bitJson.item = this.textDefault;
1809
+ if (bitJson.heading == null)
1810
+ bitJson.heading = {};
1811
+ if (bitJson.body == null)
1812
+ bitJson.body = this.bodyDefault;
1813
+ break;
1814
+ case BitType_1.BitType.matchMatrix:
1815
+ if (bitJson.item == null)
1816
+ bitJson.item = this.textDefault;
1817
+ if (bitJson.body == null)
1818
+ bitJson.body = this.bodyDefault;
1819
+ break;
1820
+ case BitType_1.BitType.learningPathBook:
1821
+ case BitType_1.BitType.learningPathBotTraining:
1822
+ case BitType_1.BitType.learningPathClassroomEvent:
1823
+ case BitType_1.BitType.learningPathClassroomTraining:
1824
+ case BitType_1.BitType.learningPathClosing:
1825
+ case BitType_1.BitType.learningPathExternalLink:
1826
+ case BitType_1.BitType.learningPathFeedback:
1827
+ case BitType_1.BitType.learningPathLearningGoal:
1828
+ case BitType_1.BitType.learningPathLti:
1829
+ case BitType_1.BitType.learningPathSign:
1830
+ case BitType_1.BitType.learningPathStep:
1831
+ case BitType_1.BitType.learningPathVideoCall:
1832
+ if (bitJson.item == null)
1833
+ bitJson.item = this.textDefault;
1834
+ if (bitJson.hint == null)
1835
+ bitJson.hint = this.textDefault;
1836
+ if (bitJson.isExample == null)
1837
+ bitJson.isExample = false;
1838
+ if (bitJson.example == null)
1839
+ bitJson.example = this.textDefault;
1840
+ if (bitJson.isTracked == null)
1841
+ bitJson.isTracked = true;
1842
+ if (bitJson.isInfoOnly == null)
1843
+ bitJson.isInfoOnly = false;
1844
+ if (bitJson.body == null)
1845
+ bitJson.body = this.bodyDefault;
1846
+ break;
1847
+ case BitType_1.BitType.articleAi:
1848
+ case BitType_1.BitType.noteAi:
1849
+ case BitType_1.BitType.summaryAi:
1850
+ if (bitJson.AIGenerated == null)
1851
+ bitJson.AIGenerated = true;
1852
+ if (bitJson.item == null)
1853
+ bitJson.item = this.textDefault;
1854
+ if (bitJson.hint == null)
1855
+ bitJson.hint = this.textDefault;
1856
+ if (bitJson.isExample == null)
1857
+ bitJson.isExample = false;
1858
+ if (bitJson.example == null)
1859
+ bitJson.example = this.textDefault;
1860
+ if (bitJson.body == null)
1861
+ bitJson.body = this.bodyDefault;
1862
+ break;
1863
+ }
1864
+ // Remove unwanted properties
1865
+ // Properties
1866
+ if (bitJson.id == null)
1867
+ delete bitJson.id;
1868
+ if (bitJson.externalId == null)
1869
+ delete bitJson.externalId;
1870
+ if (bitJson.spaceId == null)
1871
+ delete bitJson.spaceId;
1872
+ if (bitJson.padletId == null)
1873
+ delete bitJson.padletId;
1874
+ if (bitJson.AIGenerated == null)
1875
+ delete bitJson.AIGenerated;
1876
+ if (bitJson.releaseVersion == null)
1877
+ delete bitJson.releaseVersion;
1878
+ if (bitJson.book == null)
1879
+ delete bitJson.book;
1880
+ if (bitJson.ageRange == null)
1881
+ delete bitJson.ageRange;
1882
+ if (bitJson.language == null)
1883
+ delete bitJson.language;
1884
+ if (bitJson.computerLanguage == null)
1885
+ delete bitJson.computerLanguage;
1886
+ if (bitJson.subtype == null)
1887
+ delete bitJson.subtype;
1888
+ if (bitJson.coverImage == null)
1889
+ delete bitJson.coverImage;
1890
+ if (bitJson.publisher == null)
1891
+ delete bitJson.publisher;
1892
+ if (bitJson.publications == null)
1893
+ delete bitJson.publications;
1894
+ if (bitJson.author == null)
1895
+ delete bitJson.author;
1896
+ if (bitJson.subject == null)
1897
+ delete bitJson.subject;
1898
+ if (bitJson.date == null)
1899
+ delete bitJson.date;
1900
+ if (bitJson.location == null)
1901
+ delete bitJson.location;
1902
+ if (bitJson.theme == null)
1903
+ delete bitJson.theme;
1904
+ if (bitJson.kind == null)
1905
+ delete bitJson.kind;
1906
+ if (bitJson.action == null)
1907
+ delete bitJson.action;
1908
+ if (bitJson.thumbImage == null)
1909
+ delete bitJson.thumbImage;
1910
+ if (bitJson.deeplink == null)
1911
+ delete bitJson.deeplink;
1912
+ if (bitJson.externalLink == null)
1913
+ delete bitJson.externalLink;
1914
+ if (bitJson.externalLinkText == null)
1915
+ delete bitJson.externalLinkText;
1916
+ if (bitJson.videoCallLink == null)
1917
+ delete bitJson.videoCallLink;
1918
+ if (bitJson.duration == null)
1919
+ delete bitJson.duration;
1920
+ if (bitJson.list == null)
1921
+ delete bitJson.list;
1922
+ if (bitJson.textReference == null)
1923
+ delete bitJson.textReference;
1924
+ if (bitJson.isTracked == null)
1925
+ delete bitJson.isTracked;
1926
+ if (bitJson.isInfoOnly == null)
1927
+ delete bitJson.isInfoOnly;
1928
+ if (bitJson.labelTrue == null)
1929
+ delete bitJson.labelTrue;
1930
+ if (bitJson.labelFalse == null)
1931
+ delete bitJson.labelFalse;
1932
+ if (bitJson.quotedPerson == null)
1933
+ delete bitJson.quotedPerson;
1934
+ // Book data
1935
+ if (bitJson.title == null)
1936
+ delete bitJson.title;
1937
+ if (bitJson.subtitle == null)
1938
+ delete bitJson.subtitle;
1939
+ if (bitJson.level == null)
1940
+ delete bitJson.level;
1941
+ if (bitJson.toc == null)
1942
+ delete bitJson.toc;
1943
+ if (bitJson.progress == null)
1944
+ delete bitJson.progress;
1945
+ if (bitJson.anchor == null)
1946
+ delete bitJson.anchor;
1947
+ if (bitJson.reference == null)
1948
+ delete bitJson.reference;
1949
+ if (bitJson.referenceEnd == null)
1950
+ delete bitJson.referenceEnd;
1951
+ // Item, Lead, Hint, Instruction
1952
+ if (bitJson.item == null)
1953
+ delete bitJson.item;
1954
+ if (bitJson.lead == null)
1955
+ delete bitJson.lead;
1956
+ if (bitJson.hint == null)
1957
+ delete bitJson.hint;
1958
+ if (bitJson.instruction == null)
1959
+ delete bitJson.instruction;
1960
+ // Example
1961
+ if (bitJson.example == null)
1962
+ delete bitJson.example;
1963
+ if (bitJson.isExample == null)
1964
+ delete bitJson.isExample;
1965
+ // Extra Properties
1966
+ if (bitJson.extraProperties == null)
1967
+ delete bitJson.extraProperties;
1968
+ // Body
1969
+ if (bitJson.body == null)
1970
+ delete bitJson.body;
1971
+ // Placeholders
1972
+ if (bitJson.placeholders == null || Object.keys(bitJson.placeholders).length === 0)
1973
+ delete bitJson.placeholders;
1974
+ // Resource
1975
+ if (bitJson.resource == null)
1976
+ delete bitJson.resource;
1977
+ // Children
1978
+ if (bitJson.statement == null)
1979
+ delete bitJson.statement;
1980
+ if (bitJson.isCorrect == null)
1981
+ delete bitJson.isCorrect;
1982
+ if (bitJson.sampleSolution == null)
1983
+ delete bitJson.sampleSolution;
1984
+ if (bitJson.partialAnswer == null)
1985
+ delete bitJson.partialAnswer;
1986
+ if (bitJson.elements == null)
1987
+ delete bitJson.elements;
1988
+ if (bitJson.statements == null)
1989
+ delete bitJson.statements;
1990
+ if (bitJson.responses == null)
1991
+ delete bitJson.responses;
1992
+ if (bitJson.quizzes == null)
1993
+ delete bitJson.quizzes;
1994
+ if (bitJson.heading == null)
1995
+ delete bitJson.heading;
1996
+ if (bitJson.pairs == null)
1997
+ delete bitJson.pairs;
1998
+ if (bitJson.matrix == null)
1999
+ delete bitJson.matrix;
2000
+ if (bitJson.choices == null)
2001
+ delete bitJson.choices;
2002
+ if (bitJson.questions == null)
2003
+ delete bitJson.questions;
2004
+ // Placeholders
2005
+ if (!plainText || bitJson.placeholders == null)
2006
+ delete bitJson.placeholders;
2007
+ // Footer
2008
+ if (bitJson.footer == null)
2009
+ delete bitJson.footer;
2010
+ return bitJson;
2011
+ }
2012
+ //
2013
+ // Writer interface
2014
+ //
2015
+ /**
2016
+ * Writes a string value to the output.
2017
+ * @param value - The string value to be written.
2018
+ */
2019
+ write(value) {
2020
+ this.writer.write(value);
2021
+ return this;
2022
+ }
2023
+ /**
2024
+ * Writes a new line to the output. The line is indented automatically. The line is ended with the endOfLineString.
2025
+ * @param value - The line to write. When omitted, only the endOfLineString is written.
2026
+ */
2027
+ writeLine(value) {
2028
+ this.writer.writeLine(value);
2029
+ return this;
2030
+ }
2031
+ /**
2032
+ * Writes a collection of lines to the output. Each line is indented automatically and ended with the endOfLineString.
2033
+ * @param values - The lines to write.
2034
+ * @param delimiter - An optional delimiter to be written at the end of each line, except for the last one.
2035
+ */
2036
+ writeLines(values, delimiter) {
2037
+ this.writer.writeLines(values, delimiter);
2038
+ return this;
2039
+ }
2040
+ /**
2041
+ * Writes a single whitespace character to the output.
2042
+ */
2043
+ writeWhiteSpace() {
2044
+ this.writer.writeWhiteSpace();
2045
+ return this;
2046
+ }
2047
+ }
2048
+ exports.JsonGenerator = JsonGenerator;
2049
+ //# sourceMappingURL=JsonGenerator.js.map