@gmb/bitmark-parser-generator 3.33.0 → 3.35.0

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 (904) hide show
  1. package/README.md +2 -2
  2. package/dist/browser/bitmark-parser-generator.min.js +1 -1
  3. package/dist/browser/bundle-report.html +2 -2
  4. package/dist/index.cjs +34967 -0
  5. package/dist/index.cjs.map +1 -0
  6. package/dist/index.d.cts +8185 -0
  7. package/dist/index.d.ts +8185 -0
  8. package/dist/index.js +34907 -0
  9. package/dist/index.js.map +1 -0
  10. package/package.json +100 -87
  11. package/dist/cjs/BitmarkParserGenerator.js +0 -776
  12. package/dist/cjs/BitmarkParserGenerator.js.map +0 -1
  13. package/dist/cjs/ast/Ast.js +0 -220
  14. package/dist/cjs/ast/Ast.js.map +0 -1
  15. package/dist/cjs/ast/BaseBuilder.js +0 -193
  16. package/dist/cjs/ast/BaseBuilder.js.map +0 -1
  17. package/dist/cjs/ast/Builder.js +0 -1788
  18. package/dist/cjs/ast/Builder.js.map +0 -1
  19. package/dist/cjs/ast/ResourceBuilder.js +0 -964
  20. package/dist/cjs/ast/ResourceBuilder.js.map +0 -1
  21. package/dist/cjs/ast/rules/NodeValidator.js +0 -184
  22. package/dist/cjs/ast/rules/NodeValidator.js.map +0 -1
  23. package/dist/cjs/ast/writer/FileWriter.js +0 -119
  24. package/dist/cjs/ast/writer/FileWriter.js.map +0 -1
  25. package/dist/cjs/ast/writer/StreamWriter.js +0 -89
  26. package/dist/cjs/ast/writer/StreamWriter.js.map +0 -1
  27. package/dist/cjs/ast/writer/StringWriter.js +0 -115
  28. package/dist/cjs/ast/writer/StringWriter.js.map +0 -1
  29. package/dist/cjs/ast/writer/Writer.js +0 -3
  30. package/dist/cjs/ast/writer/Writer.js.map +0 -1
  31. package/dist/cjs/breakscaping/Breakscape.js +0 -80
  32. package/dist/cjs/breakscaping/Breakscape.js.map +0 -1
  33. package/dist/cjs/breakscaping/BreakscapeLoop.js +0 -305
  34. package/dist/cjs/breakscaping/BreakscapeLoop.js.map +0 -1
  35. package/dist/cjs/breakscaping/BreakscapeOptions.js +0 -3
  36. package/dist/cjs/breakscaping/BreakscapeOptions.js.map +0 -1
  37. package/dist/cjs/breakscaping/BreakscapeRegex.js +0 -213
  38. package/dist/cjs/breakscaping/BreakscapeRegex.js.map +0 -1
  39. package/dist/cjs/breakscaping/RegexConfigs.js +0 -38
  40. package/dist/cjs/breakscaping/RegexConfigs.js.map +0 -1
  41. package/dist/cjs/config/Config.js +0 -352
  42. package/dist/cjs/config/Config.js.map +0 -1
  43. package/dist/cjs/config/ConfigHydrator.js +0 -161
  44. package/dist/cjs/config/ConfigHydrator.js.map +0 -1
  45. package/dist/cjs/config/raw/bits.js +0 -2615
  46. package/dist/cjs/config/raw/bits.js.map +0 -1
  47. package/dist/cjs/config/raw/cardSets.js +0 -549
  48. package/dist/cjs/config/raw/cardSets.js.map +0 -1
  49. package/dist/cjs/config/raw/groups.js +0 -1182
  50. package/dist/cjs/config/raw/groups.js.map +0 -1
  51. package/dist/cjs/config/raw/properties.js +0 -1006
  52. package/dist/cjs/config/raw/properties.js.map +0 -1
  53. package/dist/cjs/config/raw/resources.js +0 -103
  54. package/dist/cjs/config/raw/resources.js.map +0 -1
  55. package/dist/cjs/config/raw/tags.js +0 -48
  56. package/dist/cjs/config/raw/tags.js.map +0 -1
  57. package/dist/cjs/generated/build-info.js +0 -13
  58. package/dist/cjs/generated/build-info.js.map +0 -1
  59. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +0 -3168
  60. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js.map +0 -1
  61. package/dist/cjs/generated/parser/text/text-peggy-parser.js +0 -9631
  62. package/dist/cjs/generated/parser/text/text-peggy-parser.js.map +0 -1
  63. package/dist/cjs/generator/AstWalkerGenerator.js +0 -86
  64. package/dist/cjs/generator/AstWalkerGenerator.js.map +0 -1
  65. package/dist/cjs/generator/Generator.js +0 -3
  66. package/dist/cjs/generator/Generator.js.map +0 -1
  67. package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js +0 -49
  68. package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js.map +0 -1
  69. package/dist/cjs/generator/bitmark/BitmarkGenerator.js +0 -2601
  70. package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +0 -1
  71. package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js +0 -51
  72. package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js.map +0 -1
  73. package/dist/cjs/generator/json/JsonFileGenerator.js +0 -53
  74. package/dist/cjs/generator/json/JsonFileGenerator.js.map +0 -1
  75. package/dist/cjs/generator/json/JsonGenerator.js +0 -1584
  76. package/dist/cjs/generator/json/JsonGenerator.js.map +0 -1
  77. package/dist/cjs/generator/json/JsonObjectGenerator.js +0 -51
  78. package/dist/cjs/generator/json/JsonObjectGenerator.js.map +0 -1
  79. package/dist/cjs/generator/json/JsonStringGenerator.js +0 -50
  80. package/dist/cjs/generator/json/JsonStringGenerator.js.map +0 -1
  81. package/dist/cjs/generator/text/TextGenerator.js +0 -1195
  82. package/dist/cjs/generator/text/TextGenerator.js.map +0 -1
  83. package/dist/cjs/index.js +0 -79
  84. package/dist/cjs/index.js.map +0 -1
  85. package/dist/cjs/info/InfoBuilder.js +0 -43
  86. package/dist/cjs/info/InfoBuilder.js.map +0 -1
  87. package/dist/cjs/init/init.js +0 -15
  88. package/dist/cjs/init/init.js.map +0 -1
  89. package/dist/cjs/model/ast/BreakscapedString.js +0 -3
  90. package/dist/cjs/model/ast/BreakscapedString.js.map +0 -1
  91. package/dist/cjs/model/ast/NodeType.js +0 -557
  92. package/dist/cjs/model/ast/NodeType.js.map +0 -1
  93. package/dist/cjs/model/ast/Nodes.js +0 -3
  94. package/dist/cjs/model/ast/Nodes.js.map +0 -1
  95. package/dist/cjs/model/ast/StardardString.js +0 -3
  96. package/dist/cjs/model/ast/StardardString.js.map +0 -1
  97. package/dist/cjs/model/ast/TextNodes.js +0 -3
  98. package/dist/cjs/model/ast/TextNodes.js.map +0 -1
  99. package/dist/cjs/model/config/AbstractTagConfig.js +0 -18
  100. package/dist/cjs/model/config/AbstractTagConfig.js.map +0 -1
  101. package/dist/cjs/model/config/BitConfig.js +0 -72
  102. package/dist/cjs/model/config/BitConfig.js.map +0 -1
  103. package/dist/cjs/model/config/CardSetConfig.js +0 -26
  104. package/dist/cjs/model/config/CardSetConfig.js.map +0 -1
  105. package/dist/cjs/model/config/CardVariantConfig.js +0 -32
  106. package/dist/cjs/model/config/CardVariantConfig.js.map +0 -1
  107. package/dist/cjs/model/config/MarkupTagConfig.js +0 -41
  108. package/dist/cjs/model/config/MarkupTagConfig.js.map +0 -1
  109. package/dist/cjs/model/config/PropertyTagConfig.js +0 -50
  110. package/dist/cjs/model/config/PropertyTagConfig.js.map +0 -1
  111. package/dist/cjs/model/config/ResourceTagConfig.js +0 -42
  112. package/dist/cjs/model/config/ResourceTagConfig.js.map +0 -1
  113. package/dist/cjs/model/config/ResourcesConfig.js +0 -31
  114. package/dist/cjs/model/config/ResourcesConfig.js.map +0 -1
  115. package/dist/cjs/model/config/TagConfig.js +0 -3
  116. package/dist/cjs/model/config/TagConfig.js.map +0 -1
  117. package/dist/cjs/model/config/TagsConfig.js +0 -3
  118. package/dist/cjs/model/config/TagsConfig.js.map +0 -1
  119. package/dist/cjs/model/config/TagsConfigWithInfo.js +0 -3
  120. package/dist/cjs/model/config/TagsConfigWithInfo.js.map +0 -1
  121. package/dist/cjs/model/config/_Config.js +0 -3
  122. package/dist/cjs/model/config/_Config.js.map +0 -1
  123. package/dist/cjs/model/config/enum/CardSetConfigKey.js +0 -28
  124. package/dist/cjs/model/config/enum/CardSetConfigKey.js.map +0 -1
  125. package/dist/cjs/model/config/enum/ConfigKey.js +0 -29
  126. package/dist/cjs/model/config/enum/ConfigKey.js.map +0 -1
  127. package/dist/cjs/model/config/enum/GroupConfigKey.js +0 -57
  128. package/dist/cjs/model/config/enum/GroupConfigKey.js.map +0 -1
  129. package/dist/cjs/model/config/enum/GroupConfigType.js +0 -14
  130. package/dist/cjs/model/config/enum/GroupConfigType.js.map +0 -1
  131. package/dist/cjs/model/config/enum/PropertyConfigKey.js +0 -215
  132. package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +0 -1
  133. package/dist/cjs/model/config/enum/ResourceConfigKey.js +0 -40
  134. package/dist/cjs/model/config/enum/ResourceConfigKey.js.map +0 -1
  135. package/dist/cjs/model/config/enum/TagConfigKey.js +0 -26
  136. package/dist/cjs/model/config/enum/TagConfigKey.js.map +0 -1
  137. package/dist/cjs/model/enum/BitTagType.js +0 -13
  138. package/dist/cjs/model/enum/BitTagType.js.map +0 -1
  139. package/dist/cjs/model/enum/BitType.js +0 -576
  140. package/dist/cjs/model/enum/BitType.js.map +0 -1
  141. package/dist/cjs/model/enum/BitmarkGeneratorOutput.js +0 -2
  142. package/dist/cjs/model/enum/BitmarkGeneratorOutput.js.map +0 -1
  143. package/dist/cjs/model/enum/BitmarkParserType.js +0 -9
  144. package/dist/cjs/model/enum/BitmarkParserType.js.map +0 -1
  145. package/dist/cjs/model/enum/BitmarkVersion.js +0 -12
  146. package/dist/cjs/model/enum/BitmarkVersion.js.map +0 -1
  147. package/dist/cjs/model/enum/BodyBitType.js +0 -14
  148. package/dist/cjs/model/enum/BodyBitType.js.map +0 -1
  149. package/dist/cjs/model/enum/BodyTextFormat.js +0 -14
  150. package/dist/cjs/model/enum/BodyTextFormat.js.map +0 -1
  151. package/dist/cjs/model/enum/CardSetVersion.js +0 -10
  152. package/dist/cjs/model/enum/CardSetVersion.js.map +0 -1
  153. package/dist/cjs/model/enum/Count.js +0 -9
  154. package/dist/cjs/model/enum/Count.js.map +0 -1
  155. package/dist/cjs/model/enum/DeprecatedTextFormat.js +0 -9
  156. package/dist/cjs/model/enum/DeprecatedTextFormat.js.map +0 -1
  157. package/dist/cjs/model/enum/ExampleType.js +0 -11
  158. package/dist/cjs/model/enum/ExampleType.js.map +0 -1
  159. package/dist/cjs/model/enum/PropertyAstKey.js +0 -18
  160. package/dist/cjs/model/enum/PropertyAstKey.js.map +0 -1
  161. package/dist/cjs/model/enum/PropertyFormat.js +0 -14
  162. package/dist/cjs/model/enum/PropertyFormat.js.map +0 -1
  163. package/dist/cjs/model/enum/PropertyJsonKey.js +0 -14
  164. package/dist/cjs/model/enum/PropertyJsonKey.js.map +0 -1
  165. package/dist/cjs/model/enum/PropertyTag.js +0 -8
  166. package/dist/cjs/model/enum/PropertyTag.js.map +0 -1
  167. package/dist/cjs/model/enum/ResourceJsonKey.js +0 -27
  168. package/dist/cjs/model/enum/ResourceJsonKey.js.map +0 -1
  169. package/dist/cjs/model/enum/ResourceTag.js +0 -37
  170. package/dist/cjs/model/enum/ResourceTag.js.map +0 -1
  171. package/dist/cjs/model/enum/Tag.js +0 -21
  172. package/dist/cjs/model/enum/Tag.js.map +0 -1
  173. package/dist/cjs/model/enum/TextFormat.js +0 -16
  174. package/dist/cjs/model/enum/TextFormat.js.map +0 -1
  175. package/dist/cjs/model/enum/TextLocation.js +0 -15
  176. package/dist/cjs/model/enum/TextLocation.js.map +0 -1
  177. package/dist/cjs/model/enum/TextMarkType.js +0 -54
  178. package/dist/cjs/model/enum/TextMarkType.js.map +0 -1
  179. package/dist/cjs/model/enum/TextNodeType.js +0 -35
  180. package/dist/cjs/model/enum/TextNodeType.js.map +0 -1
  181. package/dist/cjs/model/enum/TextSection.js +0 -18
  182. package/dist/cjs/model/enum/TextSection.js.map +0 -1
  183. package/dist/cjs/model/info/enum/InfoFormat.js +0 -11
  184. package/dist/cjs/model/info/enum/InfoFormat.js.map +0 -1
  185. package/dist/cjs/model/info/enum/InfoType.js +0 -12
  186. package/dist/cjs/model/info/enum/InfoType.js.map +0 -1
  187. package/dist/cjs/model/json/BitJson.js +0 -3
  188. package/dist/cjs/model/json/BitJson.js.map +0 -1
  189. package/dist/cjs/model/json/BitWrapperJson.js +0 -3
  190. package/dist/cjs/model/json/BitWrapperJson.js.map +0 -1
  191. package/dist/cjs/model/json/BodyBitJson.js +0 -3
  192. package/dist/cjs/model/json/BodyBitJson.js.map +0 -1
  193. package/dist/cjs/model/json/ParserJson.js +0 -3
  194. package/dist/cjs/model/json/ParserJson.js.map +0 -1
  195. package/dist/cjs/model/json/ResourceJson.js +0 -3
  196. package/dist/cjs/model/json/ResourceJson.js.map +0 -1
  197. package/dist/cjs/model/parser/ParserData.js +0 -3
  198. package/dist/cjs/model/parser/ParserData.js.map +0 -1
  199. package/dist/cjs/model/parser/ParserError.js +0 -3
  200. package/dist/cjs/model/parser/ParserError.js.map +0 -1
  201. package/dist/cjs/model/parser/ParserInfo.js +0 -3
  202. package/dist/cjs/model/parser/ParserInfo.js.map +0 -1
  203. package/dist/cjs/model/parser/ParserLocation.js +0 -3
  204. package/dist/cjs/model/parser/ParserLocation.js.map +0 -1
  205. package/dist/cjs/model/parser/ParserLocationRange.js +0 -3
  206. package/dist/cjs/model/parser/ParserLocationRange.js.map +0 -1
  207. package/dist/cjs/model/parser/TagValidationData.js +0 -3
  208. package/dist/cjs/model/parser/TagValidationData.js.map +0 -1
  209. package/dist/cjs/parser/bitmark/BitmarkParser.js +0 -25
  210. package/dist/cjs/parser/bitmark/BitmarkParser.js.map +0 -1
  211. package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js +0 -7
  212. package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js.map +0 -1
  213. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +0 -614
  214. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +0 -1
  215. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +0 -716
  216. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +0 -1
  217. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js +0 -69
  218. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +0 -1
  219. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +0 -745
  220. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +0 -1
  221. package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js +0 -82
  222. package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js.map +0 -1
  223. package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +0 -260
  224. package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +0 -1
  225. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +0 -50
  226. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +0 -1
  227. package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +0 -885
  228. package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +0 -1
  229. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +0 -27
  230. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +0 -1
  231. package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +0 -61
  232. package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +0 -1
  233. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +0 -63
  234. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +0 -1
  235. package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +0 -161
  236. package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +0 -1
  237. package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +0 -55
  238. package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +0 -1
  239. package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +0 -31
  240. package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +0 -1
  241. package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +0 -59
  242. package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +0 -1
  243. package/dist/cjs/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js +0 -16
  244. package/dist/cjs/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +0 -1
  245. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +0 -29
  246. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +0 -1
  247. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +0 -20
  248. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +0 -1
  249. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +0 -45
  250. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +0 -1
  251. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +0 -44
  252. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +0 -1
  253. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js +0 -11
  254. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +0 -1
  255. package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +0 -57
  256. package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +0 -1
  257. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +0 -158
  258. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +0 -1
  259. package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +0 -37
  260. package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +0 -1
  261. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +0 -24
  262. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +0 -1
  263. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +0 -163
  264. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +0 -1
  265. package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +0 -27
  266. package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +0 -1
  267. package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +0 -28
  268. package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +0 -1
  269. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +0 -53
  270. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +0 -1
  271. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +0 -203
  272. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +0 -1
  273. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +0 -24
  274. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +0 -1
  275. package/dist/cjs/parser/json/JsonParser.js +0 -270
  276. package/dist/cjs/parser/json/JsonParser.js.map +0 -1
  277. package/dist/cjs/parser/text/TextParser.js +0 -148
  278. package/dist/cjs/parser/text/TextParser.js.map +0 -1
  279. package/dist/cjs/parser/text/peg/TextPegParser.js +0 -7
  280. package/dist/cjs/parser/text/peg/TextPegParser.js.map +0 -1
  281. package/dist/cjs/utils/ArrayUtils.js +0 -43
  282. package/dist/cjs/utils/ArrayUtils.js.map +0 -1
  283. package/dist/cjs/utils/BitUtils.js +0 -75
  284. package/dist/cjs/utils/BitUtils.js.map +0 -1
  285. package/dist/cjs/utils/BooleanUtils.js +0 -62
  286. package/dist/cjs/utils/BooleanUtils.js.map +0 -1
  287. package/dist/cjs/utils/FileUtils.js +0 -75
  288. package/dist/cjs/utils/FileUtils.js.map +0 -1
  289. package/dist/cjs/utils/NumberUtils.js +0 -62
  290. package/dist/cjs/utils/NumberUtils.js.map +0 -1
  291. package/dist/cjs/utils/ObjectUtils.js +0 -417
  292. package/dist/cjs/utils/ObjectUtils.js.map +0 -1
  293. package/dist/cjs/utils/StringUtils.js +0 -183
  294. package/dist/cjs/utils/StringUtils.js.map +0 -1
  295. package/dist/cjs/utils/UrlUtils.js +0 -37
  296. package/dist/cjs/utils/UrlUtils.js.map +0 -1
  297. package/dist/cjs/utils/env/Env.js +0 -131
  298. package/dist/cjs/utils/env/Env.js.map +0 -1
  299. package/dist/cjs/utils/env/Environment.js +0 -15
  300. package/dist/cjs/utils/env/Environment.js.map +0 -1
  301. package/dist/cjs/utils/env/Os.js +0 -14
  302. package/dist/cjs/utils/env/Os.js.map +0 -1
  303. package/dist/cjs/utils/env/Version.js +0 -12
  304. package/dist/cjs/utils/env/Version.js.map +0 -1
  305. package/dist/cjs/utils/env/userAgent.js +0 -88
  306. package/dist/cjs/utils/env/userAgent.js.map +0 -1
  307. package/dist/cjs/utils/polyfill/fs.js +0 -14
  308. package/dist/cjs/utils/polyfill/fs.js.map +0 -1
  309. package/dist/esm/BitmarkParserGenerator.js +0 -735
  310. package/dist/esm/BitmarkParserGenerator.js.map +0 -1
  311. package/dist/esm/ast/Ast.js +0 -217
  312. package/dist/esm/ast/Ast.js.map +0 -1
  313. package/dist/esm/ast/BaseBuilder.js +0 -190
  314. package/dist/esm/ast/BaseBuilder.js.map +0 -1
  315. package/dist/esm/ast/Builder.js +0 -1782
  316. package/dist/esm/ast/Builder.js.map +0 -1
  317. package/dist/esm/ast/ResourceBuilder.js +0 -961
  318. package/dist/esm/ast/ResourceBuilder.js.map +0 -1
  319. package/dist/esm/ast/rules/NodeValidator.js +0 -181
  320. package/dist/esm/ast/rules/NodeValidator.js.map +0 -1
  321. package/dist/esm/ast/writer/FileWriter.js +0 -80
  322. package/dist/esm/ast/writer/FileWriter.js.map +0 -1
  323. package/dist/esm/ast/writer/StreamWriter.js +0 -83
  324. package/dist/esm/ast/writer/StreamWriter.js.map +0 -1
  325. package/dist/esm/ast/writer/StringWriter.js +0 -112
  326. package/dist/esm/ast/writer/StringWriter.js.map +0 -1
  327. package/dist/esm/ast/writer/Writer.js +0 -2
  328. package/dist/esm/ast/writer/Writer.js.map +0 -1
  329. package/dist/esm/breakscaping/Breakscape.js +0 -77
  330. package/dist/esm/breakscaping/Breakscape.js.map +0 -1
  331. package/dist/esm/breakscaping/BreakscapeLoop.js +0 -302
  332. package/dist/esm/breakscaping/BreakscapeLoop.js.map +0 -1
  333. package/dist/esm/breakscaping/BreakscapeOptions.js +0 -2
  334. package/dist/esm/breakscaping/BreakscapeOptions.js.map +0 -1
  335. package/dist/esm/breakscaping/BreakscapeRegex.js +0 -177
  336. package/dist/esm/breakscaping/BreakscapeRegex.js.map +0 -1
  337. package/dist/esm/breakscaping/RegexConfigs.js +0 -35
  338. package/dist/esm/breakscaping/RegexConfigs.js.map +0 -1
  339. package/dist/esm/config/Config.js +0 -349
  340. package/dist/esm/config/Config.js.map +0 -1
  341. package/dist/esm/config/ConfigHydrator.js +0 -158
  342. package/dist/esm/config/ConfigHydrator.js.map +0 -1
  343. package/dist/esm/config/raw/bits.js +0 -2612
  344. package/dist/esm/config/raw/bits.js.map +0 -1
  345. package/dist/esm/config/raw/cardSets.js +0 -546
  346. package/dist/esm/config/raw/cardSets.js.map +0 -1
  347. package/dist/esm/config/raw/groups.js +0 -1179
  348. package/dist/esm/config/raw/groups.js.map +0 -1
  349. package/dist/esm/config/raw/properties.js +0 -1003
  350. package/dist/esm/config/raw/properties.js.map +0 -1
  351. package/dist/esm/config/raw/resources.js +0 -100
  352. package/dist/esm/config/raw/resources.js.map +0 -1
  353. package/dist/esm/config/raw/tags.js +0 -45
  354. package/dist/esm/config/raw/tags.js.map +0 -1
  355. package/dist/esm/generated/build-info.js +0 -10
  356. package/dist/esm/generated/build-info.js.map +0 -1
  357. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +0 -3163
  358. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js.map +0 -1
  359. package/dist/esm/generated/parser/text/text-peggy-parser.js +0 -9626
  360. package/dist/esm/generated/parser/text/text-peggy-parser.js.map +0 -1
  361. package/dist/esm/generator/AstWalkerGenerator.js +0 -83
  362. package/dist/esm/generator/AstWalkerGenerator.js.map +0 -1
  363. package/dist/esm/generator/Generator.js +0 -2
  364. package/dist/esm/generator/Generator.js.map +0 -1
  365. package/dist/esm/generator/bitmark/BitmarkFileGenerator.js +0 -46
  366. package/dist/esm/generator/bitmark/BitmarkFileGenerator.js.map +0 -1
  367. package/dist/esm/generator/bitmark/BitmarkGenerator.js +0 -2598
  368. package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +0 -1
  369. package/dist/esm/generator/bitmark/BitmarkStringGenerator.js +0 -48
  370. package/dist/esm/generator/bitmark/BitmarkStringGenerator.js.map +0 -1
  371. package/dist/esm/generator/json/JsonFileGenerator.js +0 -50
  372. package/dist/esm/generator/json/JsonFileGenerator.js.map +0 -1
  373. package/dist/esm/generator/json/JsonGenerator.js +0 -1578
  374. package/dist/esm/generator/json/JsonGenerator.js.map +0 -1
  375. package/dist/esm/generator/json/JsonObjectGenerator.js +0 -48
  376. package/dist/esm/generator/json/JsonObjectGenerator.js.map +0 -1
  377. package/dist/esm/generator/json/JsonStringGenerator.js +0 -47
  378. package/dist/esm/generator/json/JsonStringGenerator.js.map +0 -1
  379. package/dist/esm/generator/text/TextGenerator.js +0 -1192
  380. package/dist/esm/generator/text/TextGenerator.js.map +0 -1
  381. package/dist/esm/index.js +0 -49
  382. package/dist/esm/index.js.map +0 -1
  383. package/dist/esm/info/InfoBuilder.js +0 -40
  384. package/dist/esm/info/InfoBuilder.js.map +0 -1
  385. package/dist/esm/init/init.js +0 -13
  386. package/dist/esm/init/init.js.map +0 -1
  387. package/dist/esm/model/ast/BreakscapedString.js +0 -2
  388. package/dist/esm/model/ast/BreakscapedString.js.map +0 -1
  389. package/dist/esm/model/ast/NodeType.js +0 -554
  390. package/dist/esm/model/ast/NodeType.js.map +0 -1
  391. package/dist/esm/model/ast/Nodes.js +0 -2
  392. package/dist/esm/model/ast/Nodes.js.map +0 -1
  393. package/dist/esm/model/ast/StardardString.js +0 -2
  394. package/dist/esm/model/ast/StardardString.js.map +0 -1
  395. package/dist/esm/model/ast/TextNodes.js +0 -2
  396. package/dist/esm/model/ast/TextNodes.js.map +0 -1
  397. package/dist/esm/model/config/AbstractTagConfig.js +0 -15
  398. package/dist/esm/model/config/AbstractTagConfig.js.map +0 -1
  399. package/dist/esm/model/config/BitConfig.js +0 -69
  400. package/dist/esm/model/config/BitConfig.js.map +0 -1
  401. package/dist/esm/model/config/CardSetConfig.js +0 -23
  402. package/dist/esm/model/config/CardSetConfig.js.map +0 -1
  403. package/dist/esm/model/config/CardVariantConfig.js +0 -29
  404. package/dist/esm/model/config/CardVariantConfig.js.map +0 -1
  405. package/dist/esm/model/config/MarkupTagConfig.js +0 -38
  406. package/dist/esm/model/config/MarkupTagConfig.js.map +0 -1
  407. package/dist/esm/model/config/PropertyTagConfig.js +0 -47
  408. package/dist/esm/model/config/PropertyTagConfig.js.map +0 -1
  409. package/dist/esm/model/config/ResourceTagConfig.js +0 -39
  410. package/dist/esm/model/config/ResourceTagConfig.js.map +0 -1
  411. package/dist/esm/model/config/ResourcesConfig.js +0 -28
  412. package/dist/esm/model/config/ResourcesConfig.js.map +0 -1
  413. package/dist/esm/model/config/TagConfig.js +0 -2
  414. package/dist/esm/model/config/TagConfig.js.map +0 -1
  415. package/dist/esm/model/config/TagsConfig.js +0 -2
  416. package/dist/esm/model/config/TagsConfig.js.map +0 -1
  417. package/dist/esm/model/config/TagsConfigWithInfo.js +0 -2
  418. package/dist/esm/model/config/TagsConfigWithInfo.js.map +0 -1
  419. package/dist/esm/model/config/_Config.js +0 -2
  420. package/dist/esm/model/config/_Config.js.map +0 -1
  421. package/dist/esm/model/config/enum/CardSetConfigKey.js +0 -25
  422. package/dist/esm/model/config/enum/CardSetConfigKey.js.map +0 -1
  423. package/dist/esm/model/config/enum/ConfigKey.js +0 -26
  424. package/dist/esm/model/config/enum/ConfigKey.js.map +0 -1
  425. package/dist/esm/model/config/enum/GroupConfigKey.js +0 -53
  426. package/dist/esm/model/config/enum/GroupConfigKey.js.map +0 -1
  427. package/dist/esm/model/config/enum/GroupConfigType.js +0 -11
  428. package/dist/esm/model/config/enum/GroupConfigType.js.map +0 -1
  429. package/dist/esm/model/config/enum/PropertyConfigKey.js +0 -211
  430. package/dist/esm/model/config/enum/PropertyConfigKey.js.map +0 -1
  431. package/dist/esm/model/config/enum/ResourceConfigKey.js +0 -36
  432. package/dist/esm/model/config/enum/ResourceConfigKey.js.map +0 -1
  433. package/dist/esm/model/config/enum/TagConfigKey.js +0 -22
  434. package/dist/esm/model/config/enum/TagConfigKey.js.map +0 -1
  435. package/dist/esm/model/enum/BitTagType.js +0 -10
  436. package/dist/esm/model/enum/BitTagType.js.map +0 -1
  437. package/dist/esm/model/enum/BitType.js +0 -573
  438. package/dist/esm/model/enum/BitType.js.map +0 -1
  439. package/dist/esm/model/enum/BitmarkGeneratorOutput.js +0 -2
  440. package/dist/esm/model/enum/BitmarkGeneratorOutput.js.map +0 -1
  441. package/dist/esm/model/enum/BitmarkParserType.js +0 -6
  442. package/dist/esm/model/enum/BitmarkParserType.js.map +0 -1
  443. package/dist/esm/model/enum/BitmarkVersion.js +0 -8
  444. package/dist/esm/model/enum/BitmarkVersion.js.map +0 -1
  445. package/dist/esm/model/enum/BodyBitType.js +0 -11
  446. package/dist/esm/model/enum/BodyBitType.js.map +0 -1
  447. package/dist/esm/model/enum/BodyTextFormat.js +0 -11
  448. package/dist/esm/model/enum/BodyTextFormat.js.map +0 -1
  449. package/dist/esm/model/enum/CardSetVersion.js +0 -7
  450. package/dist/esm/model/enum/CardSetVersion.js.map +0 -1
  451. package/dist/esm/model/enum/Count.js +0 -6
  452. package/dist/esm/model/enum/Count.js.map +0 -1
  453. package/dist/esm/model/enum/DeprecatedTextFormat.js +0 -6
  454. package/dist/esm/model/enum/DeprecatedTextFormat.js.map +0 -1
  455. package/dist/esm/model/enum/ExampleType.js +0 -8
  456. package/dist/esm/model/enum/ExampleType.js.map +0 -1
  457. package/dist/esm/model/enum/PropertyAstKey.js +0 -15
  458. package/dist/esm/model/enum/PropertyAstKey.js.map +0 -1
  459. package/dist/esm/model/enum/PropertyFormat.js +0 -11
  460. package/dist/esm/model/enum/PropertyFormat.js.map +0 -1
  461. package/dist/esm/model/enum/PropertyJsonKey.js +0 -11
  462. package/dist/esm/model/enum/PropertyJsonKey.js.map +0 -1
  463. package/dist/esm/model/enum/PropertyTag.js +0 -5
  464. package/dist/esm/model/enum/PropertyTag.js.map +0 -1
  465. package/dist/esm/model/enum/ResourceJsonKey.js +0 -24
  466. package/dist/esm/model/enum/ResourceJsonKey.js.map +0 -1
  467. package/dist/esm/model/enum/ResourceTag.js +0 -34
  468. package/dist/esm/model/enum/ResourceTag.js.map +0 -1
  469. package/dist/esm/model/enum/Tag.js +0 -18
  470. package/dist/esm/model/enum/Tag.js.map +0 -1
  471. package/dist/esm/model/enum/TextFormat.js +0 -13
  472. package/dist/esm/model/enum/TextFormat.js.map +0 -1
  473. package/dist/esm/model/enum/TextLocation.js +0 -12
  474. package/dist/esm/model/enum/TextLocation.js.map +0 -1
  475. package/dist/esm/model/enum/TextMarkType.js +0 -51
  476. package/dist/esm/model/enum/TextMarkType.js.map +0 -1
  477. package/dist/esm/model/enum/TextNodeType.js +0 -32
  478. package/dist/esm/model/enum/TextNodeType.js.map +0 -1
  479. package/dist/esm/model/enum/TextSection.js +0 -15
  480. package/dist/esm/model/enum/TextSection.js.map +0 -1
  481. package/dist/esm/model/info/enum/InfoFormat.js +0 -8
  482. package/dist/esm/model/info/enum/InfoFormat.js.map +0 -1
  483. package/dist/esm/model/info/enum/InfoType.js +0 -9
  484. package/dist/esm/model/info/enum/InfoType.js.map +0 -1
  485. package/dist/esm/model/json/BitJson.js +0 -2
  486. package/dist/esm/model/json/BitJson.js.map +0 -1
  487. package/dist/esm/model/json/BitWrapperJson.js +0 -2
  488. package/dist/esm/model/json/BitWrapperJson.js.map +0 -1
  489. package/dist/esm/model/json/BodyBitJson.js +0 -2
  490. package/dist/esm/model/json/BodyBitJson.js.map +0 -1
  491. package/dist/esm/model/json/ParserJson.js +0 -2
  492. package/dist/esm/model/json/ParserJson.js.map +0 -1
  493. package/dist/esm/model/json/ResourceJson.js +0 -2
  494. package/dist/esm/model/json/ResourceJson.js.map +0 -1
  495. package/dist/esm/model/parser/ParserData.js +0 -2
  496. package/dist/esm/model/parser/ParserData.js.map +0 -1
  497. package/dist/esm/model/parser/ParserError.js +0 -2
  498. package/dist/esm/model/parser/ParserError.js.map +0 -1
  499. package/dist/esm/model/parser/ParserInfo.js +0 -2
  500. package/dist/esm/model/parser/ParserInfo.js.map +0 -1
  501. package/dist/esm/model/parser/ParserLocation.js +0 -2
  502. package/dist/esm/model/parser/ParserLocation.js.map +0 -1
  503. package/dist/esm/model/parser/ParserLocationRange.js +0 -2
  504. package/dist/esm/model/parser/ParserLocationRange.js.map +0 -1
  505. package/dist/esm/model/parser/TagValidationData.js +0 -2
  506. package/dist/esm/model/parser/TagValidationData.js.map +0 -1
  507. package/dist/esm/parser/bitmark/BitmarkParser.js +0 -22
  508. package/dist/esm/parser/bitmark/BitmarkParser.js.map +0 -1
  509. package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js +0 -4
  510. package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js.map +0 -1
  511. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +0 -611
  512. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +0 -1
  513. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +0 -713
  514. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +0 -1
  515. package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js +0 -59
  516. package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +0 -1
  517. package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +0 -742
  518. package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +0 -1
  519. package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js +0 -79
  520. package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js.map +0 -1
  521. package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +0 -257
  522. package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +0 -1
  523. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +0 -48
  524. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +0 -1
  525. package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +0 -883
  526. package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +0 -1
  527. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +0 -25
  528. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +0 -1
  529. package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +0 -58
  530. package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +0 -1
  531. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +0 -61
  532. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +0 -1
  533. package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +0 -159
  534. package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +0 -1
  535. package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +0 -52
  536. package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +0 -1
  537. package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +0 -29
  538. package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +0 -1
  539. package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +0 -57
  540. package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +0 -1
  541. package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js +0 -14
  542. package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +0 -1
  543. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +0 -27
  544. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +0 -1
  545. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +0 -18
  546. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +0 -1
  547. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +0 -43
  548. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +0 -1
  549. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +0 -42
  550. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +0 -1
  551. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js +0 -9
  552. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +0 -1
  553. package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +0 -55
  554. package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +0 -1
  555. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +0 -156
  556. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +0 -1
  557. package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +0 -35
  558. package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +0 -1
  559. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +0 -22
  560. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +0 -1
  561. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +0 -160
  562. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +0 -1
  563. package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +0 -25
  564. package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +0 -1
  565. package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +0 -26
  566. package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +0 -1
  567. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +0 -50
  568. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +0 -1
  569. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +0 -201
  570. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +0 -1
  571. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +0 -22
  572. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +0 -1
  573. package/dist/esm/parser/json/JsonParser.js +0 -267
  574. package/dist/esm/parser/json/JsonParser.js.map +0 -1
  575. package/dist/esm/parser/text/TextParser.js +0 -145
  576. package/dist/esm/parser/text/TextParser.js.map +0 -1
  577. package/dist/esm/parser/text/peg/TextPegParser.js +0 -4
  578. package/dist/esm/parser/text/peg/TextPegParser.js.map +0 -1
  579. package/dist/esm/utils/ArrayUtils.js +0 -40
  580. package/dist/esm/utils/ArrayUtils.js.map +0 -1
  581. package/dist/esm/utils/BitUtils.js +0 -72
  582. package/dist/esm/utils/BitUtils.js.map +0 -1
  583. package/dist/esm/utils/BooleanUtils.js +0 -59
  584. package/dist/esm/utils/BooleanUtils.js.map +0 -1
  585. package/dist/esm/utils/FileUtils.js +0 -36
  586. package/dist/esm/utils/FileUtils.js.map +0 -1
  587. package/dist/esm/utils/NumberUtils.js +0 -59
  588. package/dist/esm/utils/NumberUtils.js.map +0 -1
  589. package/dist/esm/utils/ObjectUtils.js +0 -411
  590. package/dist/esm/utils/ObjectUtils.js.map +0 -1
  591. package/dist/esm/utils/StringUtils.js +0 -180
  592. package/dist/esm/utils/StringUtils.js.map +0 -1
  593. package/dist/esm/utils/UrlUtils.js +0 -34
  594. package/dist/esm/utils/UrlUtils.js.map +0 -1
  595. package/dist/esm/utils/env/Env.js +0 -127
  596. package/dist/esm/utils/env/Env.js.map +0 -1
  597. package/dist/esm/utils/env/Environment.js +0 -12
  598. package/dist/esm/utils/env/Environment.js.map +0 -1
  599. package/dist/esm/utils/env/Os.js +0 -11
  600. package/dist/esm/utils/env/Os.js.map +0 -1
  601. package/dist/esm/utils/env/Version.js +0 -9
  602. package/dist/esm/utils/env/Version.js.map +0 -1
  603. package/dist/esm/utils/env/userAgent.js +0 -86
  604. package/dist/esm/utils/env/userAgent.js.map +0 -1
  605. package/dist/esm/utils/polyfill/fs.js +0 -10
  606. package/dist/esm/utils/polyfill/fs.js.map +0 -1
  607. package/dist/types/BitmarkParserGenerator.d.ts +0 -478
  608. package/dist/types/BitmarkParserGenerator.d.ts.map +0 -1
  609. package/dist/types/ast/Ast.d.ts +0 -137
  610. package/dist/types/ast/Ast.d.ts.map +0 -1
  611. package/dist/types/ast/BaseBuilder.d.ts +0 -64
  612. package/dist/types/ast/BaseBuilder.d.ts.map +0 -1
  613. package/dist/types/ast/Builder.d.ts +0 -692
  614. package/dist/types/ast/Builder.d.ts.map +0 -1
  615. package/dist/types/ast/ResourceBuilder.d.ts +0 -384
  616. package/dist/types/ast/ResourceBuilder.d.ts.map +0 -1
  617. package/dist/types/ast/rules/NodeValidator.d.ts +0 -28
  618. package/dist/types/ast/rules/NodeValidator.d.ts.map +0 -1
  619. package/dist/types/ast/writer/FileWriter.d.ts +0 -37
  620. package/dist/types/ast/writer/FileWriter.d.ts.map +0 -1
  621. package/dist/types/ast/writer/StreamWriter.d.ts +0 -29
  622. package/dist/types/ast/writer/StreamWriter.d.ts.map +0 -1
  623. package/dist/types/ast/writer/StringWriter.d.ts +0 -30
  624. package/dist/types/ast/writer/StringWriter.d.ts.map +0 -1
  625. package/dist/types/ast/writer/Writer.d.ts +0 -72
  626. package/dist/types/ast/writer/Writer.d.ts.map +0 -1
  627. package/dist/types/breakscaping/Breakscape.d.ts +0 -44
  628. package/dist/types/breakscaping/Breakscape.d.ts.map +0 -1
  629. package/dist/types/breakscaping/BreakscapeLoop.d.ts +0 -142
  630. package/dist/types/breakscaping/BreakscapeLoop.d.ts.map +0 -1
  631. package/dist/types/breakscaping/BreakscapeOptions.d.ts +0 -30
  632. package/dist/types/breakscaping/BreakscapeOptions.d.ts.map +0 -1
  633. package/dist/types/breakscaping/BreakscapeRegex.d.ts +0 -96
  634. package/dist/types/breakscaping/BreakscapeRegex.d.ts.map +0 -1
  635. package/dist/types/breakscaping/RegexConfigs.d.ts +0 -35
  636. package/dist/types/breakscaping/RegexConfigs.d.ts.map +0 -1
  637. package/dist/types/config/Config.d.ts +0 -115
  638. package/dist/types/config/Config.d.ts.map +0 -1
  639. package/dist/types/config/ConfigHydrator.d.ts +0 -16
  640. package/dist/types/config/ConfigHydrator.d.ts.map +0 -1
  641. package/dist/types/config/raw/bits.d.ts +0 -4
  642. package/dist/types/config/raw/bits.d.ts.map +0 -1
  643. package/dist/types/config/raw/cardSets.d.ts +0 -4
  644. package/dist/types/config/raw/cardSets.d.ts.map +0 -1
  645. package/dist/types/config/raw/groups.d.ts +0 -4
  646. package/dist/types/config/raw/groups.d.ts.map +0 -1
  647. package/dist/types/config/raw/properties.d.ts +0 -4
  648. package/dist/types/config/raw/properties.d.ts.map +0 -1
  649. package/dist/types/config/raw/resources.d.ts +0 -4
  650. package/dist/types/config/raw/resources.d.ts.map +0 -1
  651. package/dist/types/config/raw/tags.d.ts +0 -4
  652. package/dist/types/config/raw/tags.d.ts.map +0 -1
  653. package/dist/types/generated/build-info.d.ts +0 -8
  654. package/dist/types/generated/build-info.d.ts.map +0 -1
  655. package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts +0 -12
  656. package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts.map +0 -1
  657. package/dist/types/generated/parser/text/text-peggy-parser.d.ts +0 -12
  658. package/dist/types/generated/parser/text/text-peggy-parser.d.ts.map +0 -1
  659. package/dist/types/generator/AstWalkerGenerator.d.ts +0 -32
  660. package/dist/types/generator/AstWalkerGenerator.d.ts.map +0 -1
  661. package/dist/types/generator/Generator.d.ts +0 -6
  662. package/dist/types/generator/Generator.d.ts.map +0 -1
  663. package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts +0 -41
  664. package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts.map +0 -1
  665. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +0 -401
  666. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +0 -1
  667. package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts +0 -31
  668. package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts.map +0 -1
  669. package/dist/types/generator/json/JsonFileGenerator.d.ts +0 -45
  670. package/dist/types/generator/json/JsonFileGenerator.d.ts.map +0 -1
  671. package/dist/types/generator/json/JsonGenerator.d.ts +0 -357
  672. package/dist/types/generator/json/JsonGenerator.d.ts.map +0 -1
  673. package/dist/types/generator/json/JsonObjectGenerator.d.ts +0 -32
  674. package/dist/types/generator/json/JsonObjectGenerator.d.ts.map +0 -1
  675. package/dist/types/generator/json/JsonStringGenerator.d.ts +0 -30
  676. package/dist/types/generator/json/JsonStringGenerator.d.ts.map +0 -1
  677. package/dist/types/generator/text/TextGenerator.d.ts +0 -228
  678. package/dist/types/generator/text/TextGenerator.d.ts.map +0 -1
  679. package/dist/types/index.d.ts +0 -50
  680. package/dist/types/index.d.ts.map +0 -1
  681. package/dist/types/info/InfoBuilder.d.ts +0 -18
  682. package/dist/types/info/InfoBuilder.d.ts.map +0 -1
  683. package/dist/types/init/init.d.ts +0 -4
  684. package/dist/types/init/init.d.ts.map +0 -1
  685. package/dist/types/model/ast/BreakscapedString.d.ts +0 -4
  686. package/dist/types/model/ast/BreakscapedString.d.ts.map +0 -1
  687. package/dist/types/model/ast/NodeType.d.ts +0 -1093
  688. package/dist/types/model/ast/NodeType.d.ts.map +0 -1
  689. package/dist/types/model/ast/Nodes.d.ts +0 -268
  690. package/dist/types/model/ast/Nodes.d.ts.map +0 -1
  691. package/dist/types/model/ast/StardardString.d.ts +0 -4
  692. package/dist/types/model/ast/StardardString.d.ts.map +0 -1
  693. package/dist/types/model/ast/TextNodes.d.ts +0 -130
  694. package/dist/types/model/ast/TextNodes.d.ts.map +0 -1
  695. package/dist/types/model/config/AbstractTagConfig.d.ts +0 -24
  696. package/dist/types/model/config/AbstractTagConfig.d.ts.map +0 -1
  697. package/dist/types/model/config/BitConfig.d.ts +0 -48
  698. package/dist/types/model/config/BitConfig.d.ts.map +0 -1
  699. package/dist/types/model/config/CardSetConfig.d.ts +0 -14
  700. package/dist/types/model/config/CardSetConfig.d.ts.map +0 -1
  701. package/dist/types/model/config/CardVariantConfig.d.ts +0 -16
  702. package/dist/types/model/config/CardVariantConfig.d.ts.map +0 -1
  703. package/dist/types/model/config/MarkupTagConfig.d.ts +0 -17
  704. package/dist/types/model/config/MarkupTagConfig.d.ts.map +0 -1
  705. package/dist/types/model/config/PropertyTagConfig.d.ts +0 -23
  706. package/dist/types/model/config/PropertyTagConfig.d.ts.map +0 -1
  707. package/dist/types/model/config/ResourceTagConfig.d.ts +0 -18
  708. package/dist/types/model/config/ResourceTagConfig.d.ts.map +0 -1
  709. package/dist/types/model/config/ResourcesConfig.d.ts +0 -14
  710. package/dist/types/model/config/ResourcesConfig.d.ts.map +0 -1
  711. package/dist/types/model/config/TagConfig.d.ts +0 -5
  712. package/dist/types/model/config/TagConfig.d.ts.map +0 -1
  713. package/dist/types/model/config/TagsConfig.d.ts +0 -5
  714. package/dist/types/model/config/TagsConfig.d.ts.map +0 -1
  715. package/dist/types/model/config/TagsConfigWithInfo.d.ts +0 -9
  716. package/dist/types/model/config/TagsConfigWithInfo.d.ts.map +0 -1
  717. package/dist/types/model/config/_Config.d.ts +0 -119
  718. package/dist/types/model/config/_Config.d.ts.map +0 -1
  719. package/dist/types/model/config/enum/CardSetConfigKey.d.ts +0 -43
  720. package/dist/types/model/config/enum/CardSetConfigKey.d.ts.map +0 -1
  721. package/dist/types/model/config/enum/ConfigKey.d.ts +0 -578
  722. package/dist/types/model/config/enum/ConfigKey.d.ts.map +0 -1
  723. package/dist/types/model/config/enum/GroupConfigKey.d.ts +0 -144
  724. package/dist/types/model/config/enum/GroupConfigKey.d.ts.map +0 -1
  725. package/dist/types/model/config/enum/GroupConfigType.d.ts +0 -16
  726. package/dist/types/model/config/enum/GroupConfigType.d.ts.map +0 -1
  727. package/dist/types/model/config/enum/PropertyConfigKey.d.ts +0 -618
  728. package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +0 -1
  729. package/dist/types/model/config/enum/ResourceConfigKey.d.ts +0 -87
  730. package/dist/types/model/config/enum/ResourceConfigKey.d.ts.map +0 -1
  731. package/dist/types/model/config/enum/TagConfigKey.d.ts +0 -51
  732. package/dist/types/model/config/enum/TagConfigKey.d.ts.map +0 -1
  733. package/dist/types/model/enum/BitTagType.d.ts +0 -15
  734. package/dist/types/model/enum/BitTagType.d.ts.map +0 -1
  735. package/dist/types/model/enum/BitType.d.ts +0 -1143
  736. package/dist/types/model/enum/BitType.d.ts.map +0 -1
  737. package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts +0 -1
  738. package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts.map +0 -1
  739. package/dist/types/model/enum/BitmarkParserType.d.ts +0 -7
  740. package/dist/types/model/enum/BitmarkParserType.d.ts.map +0 -1
  741. package/dist/types/model/enum/BitmarkVersion.d.ts +0 -12
  742. package/dist/types/model/enum/BitmarkVersion.d.ts.map +0 -1
  743. package/dist/types/model/enum/BodyBitType.d.ts +0 -25
  744. package/dist/types/model/enum/BodyBitType.d.ts.map +0 -1
  745. package/dist/types/model/enum/BodyTextFormat.d.ts +0 -17
  746. package/dist/types/model/enum/BodyTextFormat.d.ts.map +0 -1
  747. package/dist/types/model/enum/CardSetVersion.d.ts +0 -11
  748. package/dist/types/model/enum/CardSetVersion.d.ts.map +0 -1
  749. package/dist/types/model/enum/Count.d.ts +0 -7
  750. package/dist/types/model/enum/Count.d.ts.map +0 -1
  751. package/dist/types/model/enum/DeprecatedTextFormat.d.ts +0 -7
  752. package/dist/types/model/enum/DeprecatedTextFormat.d.ts.map +0 -1
  753. package/dist/types/model/enum/ExampleType.d.ts +0 -13
  754. package/dist/types/model/enum/ExampleType.d.ts.map +0 -1
  755. package/dist/types/model/enum/PropertyAstKey.d.ts +0 -22
  756. package/dist/types/model/enum/PropertyAstKey.d.ts.map +0 -1
  757. package/dist/types/model/enum/PropertyFormat.d.ts +0 -19
  758. package/dist/types/model/enum/PropertyFormat.d.ts.map +0 -1
  759. package/dist/types/model/enum/PropertyJsonKey.d.ts +0 -10
  760. package/dist/types/model/enum/PropertyJsonKey.d.ts.map +0 -1
  761. package/dist/types/model/enum/PropertyTag.d.ts +0 -419
  762. package/dist/types/model/enum/PropertyTag.d.ts.map +0 -1
  763. package/dist/types/model/enum/ResourceJsonKey.d.ts +0 -45
  764. package/dist/types/model/enum/ResourceJsonKey.d.ts.map +0 -1
  765. package/dist/types/model/enum/ResourceTag.d.ts +0 -63
  766. package/dist/types/model/enum/ResourceTag.d.ts.map +0 -1
  767. package/dist/types/model/enum/Tag.d.ts +0 -33
  768. package/dist/types/model/enum/Tag.d.ts.map +0 -1
  769. package/dist/types/model/enum/TextFormat.d.ts +0 -17
  770. package/dist/types/model/enum/TextFormat.d.ts.map +0 -1
  771. package/dist/types/model/enum/TextLocation.d.ts +0 -16
  772. package/dist/types/model/enum/TextLocation.d.ts.map +0 -1
  773. package/dist/types/model/enum/TextMarkType.d.ts +0 -93
  774. package/dist/types/model/enum/TextMarkType.d.ts.map +0 -1
  775. package/dist/types/model/enum/TextNodeType.d.ts +0 -53
  776. package/dist/types/model/enum/TextNodeType.d.ts.map +0 -1
  777. package/dist/types/model/enum/TextSection.d.ts +0 -27
  778. package/dist/types/model/enum/TextSection.d.ts.map +0 -1
  779. package/dist/types/model/info/enum/InfoFormat.d.ts +0 -13
  780. package/dist/types/model/info/enum/InfoFormat.d.ts.map +0 -1
  781. package/dist/types/model/info/enum/InfoType.d.ts +0 -15
  782. package/dist/types/model/info/enum/InfoType.d.ts.map +0 -1
  783. package/dist/types/model/json/BitJson.d.ts +0 -479
  784. package/dist/types/model/json/BitJson.d.ts.map +0 -1
  785. package/dist/types/model/json/BitWrapperJson.d.ts +0 -8
  786. package/dist/types/model/json/BitWrapperJson.d.ts.map +0 -1
  787. package/dist/types/model/json/BodyBitJson.d.ts +0 -81
  788. package/dist/types/model/json/BodyBitJson.d.ts.map +0 -1
  789. package/dist/types/model/json/ParserJson.d.ts +0 -12
  790. package/dist/types/model/json/ParserJson.d.ts.map +0 -1
  791. package/dist/types/model/json/ResourceJson.d.ts +0 -244
  792. package/dist/types/model/json/ResourceJson.d.ts.map +0 -1
  793. package/dist/types/model/parser/ParserData.d.ts +0 -11
  794. package/dist/types/model/parser/ParserData.d.ts.map +0 -1
  795. package/dist/types/model/parser/ParserError.d.ts +0 -17
  796. package/dist/types/model/parser/ParserError.d.ts.map +0 -1
  797. package/dist/types/model/parser/ParserInfo.d.ts +0 -10
  798. package/dist/types/model/parser/ParserInfo.d.ts.map +0 -1
  799. package/dist/types/model/parser/ParserLocation.d.ts +0 -6
  800. package/dist/types/model/parser/ParserLocation.d.ts.map +0 -1
  801. package/dist/types/model/parser/ParserLocationRange.d.ts +0 -10
  802. package/dist/types/model/parser/ParserLocationRange.d.ts.map +0 -1
  803. package/dist/types/model/parser/TagValidationData.d.ts +0 -24
  804. package/dist/types/model/parser/TagValidationData.d.ts.map +0 -1
  805. package/dist/types/parser/bitmark/BitmarkParser.d.ts +0 -21
  806. package/dist/types/parser/bitmark/BitmarkParser.d.ts.map +0 -1
  807. package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts +0 -8
  808. package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts.map +0 -1
  809. package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts +0 -108
  810. package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts.map +0 -1
  811. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +0 -137
  812. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +0 -1
  813. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +0 -333
  814. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +0 -1
  815. package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +0 -186
  816. package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +0 -1
  817. package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts +0 -61
  818. package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts.map +0 -1
  819. package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts +0 -37
  820. package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts.map +0 -1
  821. package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts +0 -5
  822. package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +0 -1
  823. package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts +0 -7
  824. package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +0 -1
  825. package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts +0 -5
  826. package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +0 -1
  827. package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts +0 -15
  828. package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts.map +0 -1
  829. package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts +0 -5
  830. package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +0 -1
  831. package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts +0 -4
  832. package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts.map +0 -1
  833. package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts +0 -14
  834. package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts.map +0 -1
  835. package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts +0 -6
  836. package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +0 -1
  837. package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts +0 -5
  838. package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts.map +0 -1
  839. package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts +0 -4
  840. package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts.map +0 -1
  841. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts +0 -5
  842. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts.map +0 -1
  843. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts +0 -5
  844. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +0 -1
  845. package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts +0 -6
  846. package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts.map +0 -1
  847. package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts +0 -5
  848. package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts.map +0 -1
  849. package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts +0 -4
  850. package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts.map +0 -1
  851. package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts +0 -5
  852. package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts.map +0 -1
  853. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts +0 -5
  854. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +0 -1
  855. package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts +0 -5
  856. package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts.map +0 -1
  857. package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts +0 -5
  858. package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +0 -1
  859. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +0 -14
  860. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +0 -1
  861. package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts +0 -5
  862. package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts.map +0 -1
  863. package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts +0 -5
  864. package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts.map +0 -1
  865. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +0 -11
  866. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +0 -1
  867. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +0 -6
  868. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +0 -1
  869. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts +0 -4
  870. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +0 -1
  871. package/dist/types/parser/json/JsonParser.d.ts +0 -59
  872. package/dist/types/parser/json/JsonParser.d.ts.map +0 -1
  873. package/dist/types/parser/text/TextParser.d.ts +0 -55
  874. package/dist/types/parser/text/TextParser.d.ts.map +0 -1
  875. package/dist/types/parser/text/peg/TextPegParser.d.ts +0 -8
  876. package/dist/types/parser/text/peg/TextPegParser.d.ts.map +0 -1
  877. package/dist/types/utils/ArrayUtils.d.ts +0 -25
  878. package/dist/types/utils/ArrayUtils.d.ts.map +0 -1
  879. package/dist/types/utils/BitUtils.d.ts +0 -30
  880. package/dist/types/utils/BitUtils.d.ts.map +0 -1
  881. package/dist/types/utils/BooleanUtils.d.ts +0 -30
  882. package/dist/types/utils/BooleanUtils.d.ts.map +0 -1
  883. package/dist/types/utils/FileUtils.d.ts +0 -12
  884. package/dist/types/utils/FileUtils.d.ts.map +0 -1
  885. package/dist/types/utils/NumberUtils.d.ts +0 -47
  886. package/dist/types/utils/NumberUtils.d.ts.map +0 -1
  887. package/dist/types/utils/ObjectUtils.d.ts +0 -197
  888. package/dist/types/utils/ObjectUtils.d.ts.map +0 -1
  889. package/dist/types/utils/StringUtils.d.ts +0 -77
  890. package/dist/types/utils/StringUtils.d.ts.map +0 -1
  891. package/dist/types/utils/UrlUtils.d.ts +0 -7
  892. package/dist/types/utils/UrlUtils.d.ts.map +0 -1
  893. package/dist/types/utils/env/Env.d.ts +0 -39
  894. package/dist/types/utils/env/Env.d.ts.map +0 -1
  895. package/dist/types/utils/env/Environment.d.ts +0 -21
  896. package/dist/types/utils/env/Environment.d.ts.map +0 -1
  897. package/dist/types/utils/env/Os.d.ts +0 -19
  898. package/dist/types/utils/env/Os.d.ts.map +0 -1
  899. package/dist/types/utils/env/Version.d.ts +0 -10
  900. package/dist/types/utils/env/Version.d.ts.map +0 -1
  901. package/dist/types/utils/env/userAgent.d.ts +0 -11
  902. package/dist/types/utils/env/userAgent.d.ts.map +0 -1
  903. package/dist/types/utils/polyfill/fs.d.ts +0 -6
  904. package/dist/types/utils/polyfill/fs.d.ts.map +0 -1
@@ -1,964 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.ResourceBuilder = void 0;
15
- const Breakscape_1 = require("../breakscaping/Breakscape");
16
- const Config_1 = require("../config/Config");
17
- const BitType_1 = require("../model/enum/BitType");
18
- const ResourceTag_1 = require("../model/enum/ResourceTag");
19
- const TextLocation_1 = require("../model/enum/TextLocation");
20
- const ObjectUtils_1 = require("../utils/ObjectUtils");
21
- const StringUtils_1 = require("../utils/StringUtils");
22
- const UrlUtils_1 = require("../utils/UrlUtils");
23
- const BaseBuilder_1 = require("./BaseBuilder");
24
- const NodeValidator_1 = require("./rules/NodeValidator");
25
- /**
26
- * Builder to build bitmark Resource AST nodes programmatically
27
- */
28
- class ResourceBuilder extends BaseBuilder_1.BaseBuilder {
29
- /**
30
- * Build and validate resource JSON object(s) from external resource JSON object(s)
31
- *
32
- * Note: a single input resource object can be converted to multiple resource objects
33
- * (e.g. stillImageFilm -> image + audio)
34
- *
35
- * @param bitType
36
- * @param resource
37
- * @returns
38
- */
39
- resourceFromResourceJson(context, resource) {
40
- if (!resource)
41
- return undefined;
42
- const nodes = [];
43
- // Convert single resource to array
44
- if (!Array.isArray(resource))
45
- resource = [resource];
46
- for (const thisResource of resource) {
47
- // Validate we have a valid resource type
48
- let type = ResourceTag_1.ResourceTag.fromValue(thisResource.type);
49
- if (!type)
50
- return undefined;
51
- // Get the resource key
52
- const resourceKey = ResourceTag_1.ResourceTag.keyFromValue(type);
53
- if (!resourceKey)
54
- return undefined;
55
- // Override original type with type alias if present
56
- const __typeAlias = ResourceTag_1.ResourceTag.fromValue(thisResource.__typeAlias);
57
- type = __typeAlias !== null && __typeAlias !== void 0 ? __typeAlias : type;
58
- let data;
59
- // TODO: This code should use the config to handle the combo resources. For now the logic is hardcoded
60
- // Handle special cases for multiple resource bits (imageResponsive, stillImageFilm)
61
- if (type === ResourceTag_1.ResourceTag.imageResponsive) {
62
- const r = thisResource;
63
- const imagePortraitNode = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.imagePortrait, r.imagePortrait);
64
- const imageLandscapeNode = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.imageLandscape, r.imageLandscape);
65
- if (imagePortraitNode)
66
- nodes.push(imagePortraitNode);
67
- if (imageLandscapeNode)
68
- nodes.push(imageLandscapeNode);
69
- }
70
- else if (type === ResourceTag_1.ResourceTag.stillImageFilm) {
71
- const r = thisResource;
72
- const imageNode = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.image, r.image);
73
- const audioNode = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.audio, r.audio);
74
- if (imageNode)
75
- nodes.push(imageNode);
76
- if (audioNode)
77
- nodes.push(audioNode);
78
- }
79
- else {
80
- // Standard single resource case
81
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
82
- data = thisResource[resourceKey];
83
- if (!data)
84
- return undefined;
85
- const node = this.resourceFromResourceDataJson(context, type, data);
86
- if (node)
87
- nodes.push(node);
88
- }
89
- }
90
- if (nodes.length === 0)
91
- return undefined;
92
- if (nodes.length === 1)
93
- return nodes[0];
94
- return nodes;
95
- }
96
- resourceFromResourceDataJson(context, type, data) {
97
- var _a, _b, _c;
98
- if (!data)
99
- return undefined;
100
- type = ResourceTag_1.ResourceTag.fromValue(type);
101
- if (!type)
102
- return undefined;
103
- const dataAsString = StringUtils_1.StringUtils.isString(data) ? data : undefined;
104
- // url / src / href / app
105
- const url = data.url || data.src || data.body || dataAsString;
106
- // Sub resources
107
- const posterImage = data.posterImage
108
- ? (_a = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.image, data.posterImage)) === null || _a === void 0 ? void 0 : _a.image
109
- : undefined;
110
- const thumbnails = data.thumbnails
111
- ? data.thumbnails.map((t) => {
112
- var _a;
113
- return (_a = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.image, t)) === null || _a === void 0 ? void 0 : _a.image;
114
- })
115
- : undefined;
116
- // Resource
117
- const node = this.resource(context, {
118
- type,
119
- // Generic (except Article / Document)
120
- value: url,
121
- // ImageLikeResource / AudioLikeResource / VideoLikeResource / Article / Document
122
- format: data.format,
123
- // ImageLikeResource
124
- src1x: data.src1x,
125
- src2x: data.src2x,
126
- src3x: data.src3x,
127
- src4x: data.src4x,
128
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.caption),
129
- // ImageLikeResource / VideoLikeResource
130
- width: (_b = data.width) !== null && _b !== void 0 ? _b : undefined,
131
- height: (_c = data.height) !== null && _c !== void 0 ? _c : undefined,
132
- alt: data.alt,
133
- zoomDisabled: data.zoomDisabled,
134
- // VideoLikeResource
135
- duration: data.duration,
136
- mute: data.mute,
137
- autoplay: data.autoplay,
138
- allowSubtitles: data.allowSubtitles,
139
- showSubtitles: data.showSubtitles,
140
- posterImage,
141
- thumbnails,
142
- // WebsiteLinkResource
143
- siteName: undefined, //data.siteName,
144
- // Generic Resource
145
- license: data.license,
146
- copyright: data.copyright,
147
- showInIndex: data.showInIndex,
148
- search: data.search,
149
- });
150
- return node;
151
- }
152
- /**
153
- * Build resource node
154
- *
155
- * @param data - data for the node
156
- * @returns
157
- */
158
- /* private */ resource(context, data) {
159
- var _a;
160
- let node;
161
- const { type, value: valueIn, format: formatIn } = data, rest = __rest(data, ["type", "value", "format"]);
162
- const finalData = Object.assign({ type, value: valueIn !== null && valueIn !== void 0 ? valueIn : Breakscape_1.Breakscape.EMPTY_STRING, format: formatIn !== null && formatIn !== void 0 ? formatIn : Breakscape_1.Breakscape.EMPTY_STRING }, rest);
163
- // Special case for video like tags - build thumbnails from the srcXx properties
164
- switch (type) {
165
- case ResourceTag_1.ResourceTag.video:
166
- case ResourceTag_1.ResourceTag.videoEmbed:
167
- case ResourceTag_1.ResourceTag.videoLink:
168
- case ResourceTag_1.ResourceTag.stillImageFilmEmbed:
169
- case ResourceTag_1.ResourceTag.stillImageFilmLink: {
170
- const thumbnailKeys = ['src1x', 'src2x', 'src3x', 'src4x'];
171
- const thumbnails = [];
172
- for (const k of thumbnailKeys) {
173
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
174
- const dataAsAny = data;
175
- const value = dataAsAny[k];
176
- if (value) {
177
- const image = this.resource(context, {
178
- type: ResourceTag_1.ResourceTag.image,
179
- value,
180
- });
181
- if (image)
182
- thumbnails.push(image.image);
183
- }
184
- }
185
- // Merge with existing thumbnails
186
- finalData.thumbnails = [...((_a = finalData.thumbnails) !== null && _a !== void 0 ? _a : []), ...thumbnails];
187
- }
188
- }
189
- switch (type) {
190
- case ResourceTag_1.ResourceTag.image:
191
- case ResourceTag_1.ResourceTag.imagePortrait:
192
- case ResourceTag_1.ResourceTag.imageLandscape:
193
- case ResourceTag_1.ResourceTag.backgroundWallpaper:
194
- case ResourceTag_1.ResourceTag.imagePlaceholder:
195
- case ResourceTag_1.ResourceTag.icon:
196
- node = this.imageResource(context, finalData, type);
197
- break;
198
- // case ResourceTag.imageResponsive: {
199
- // node = this.imageResponsiveResource({
200
- // imagePortrait: this.imageResource(
201
- // finalData.imagePortrait ?? {
202
- // format: '',
203
- // value: '',
204
- // },
205
- // ),
206
- // imageLandscape: this.imageResource(
207
- // finalData.imageLandscape ?? {
208
- // format: '',
209
- // value: '',
210
- // },
211
- // ),
212
- // });
213
- // break;
214
- // }
215
- case ResourceTag_1.ResourceTag.imageLink:
216
- node = this.imageLinkResource(context, finalData);
217
- break;
218
- case ResourceTag_1.ResourceTag.audio:
219
- node = this.audioResource(context, finalData);
220
- break;
221
- case ResourceTag_1.ResourceTag.audioEmbed:
222
- node = this.audioEmbedResource(context, finalData);
223
- break;
224
- case ResourceTag_1.ResourceTag.audioLink:
225
- node = this.audioLinkResource(context, finalData);
226
- break;
227
- case ResourceTag_1.ResourceTag.video:
228
- node = this.videoResource(context, finalData);
229
- break;
230
- case ResourceTag_1.ResourceTag.videoEmbed:
231
- node = this.videoEmbedResource(context, finalData);
232
- break;
233
- case ResourceTag_1.ResourceTag.videoLink:
234
- node = this.videoLinkResource(context, finalData);
235
- break;
236
- // case ResourceTag.stillImageFilm: {
237
- // node = this.stillImageFilmResource({
238
- // image: this.imageResource(context,
239
- // finalData.image ?? {
240
- // format: '',
241
- // value: '',
242
- // },
243
- // ),
244
- // audio: this.audioResource(context,
245
- // finalData.audio ?? {
246
- // format: '',
247
- // value: '',
248
- // },
249
- // ),
250
- // });
251
- // break;
252
- // }
253
- case ResourceTag_1.ResourceTag.stillImageFilmEmbed:
254
- node = this.stillImageFilmEmbedResource(context, finalData);
255
- break;
256
- case ResourceTag_1.ResourceTag.stillImageFilmLink:
257
- node = this.stillImageFilmLinkResource(context, finalData);
258
- break;
259
- case ResourceTag_1.ResourceTag.article:
260
- node = this.articleResource(context, finalData);
261
- break;
262
- case ResourceTag_1.ResourceTag.document:
263
- node = this.documentResource(context, finalData);
264
- break;
265
- case ResourceTag_1.ResourceTag.documentEmbed:
266
- node = this.documentEmbedResource(context, finalData);
267
- break;
268
- case ResourceTag_1.ResourceTag.documentLink:
269
- node = this.documentLinkResource(context, finalData);
270
- break;
271
- case ResourceTag_1.ResourceTag.documentDownload:
272
- node = this.documentDownloadResource(context, finalData);
273
- break;
274
- case ResourceTag_1.ResourceTag.appLink:
275
- node = this.appLinkResource(context, finalData);
276
- break;
277
- case ResourceTag_1.ResourceTag.websiteLink:
278
- node = this.websiteLinkResource(context, finalData);
279
- break;
280
- default:
281
- }
282
- return node;
283
- }
284
- /**
285
- * Build imageResource node
286
- *
287
- * @param data - data for the node
288
- * @returns
289
- */
290
- imageResource(context, data, __typeAlias) {
291
- var _a, _b;
292
- const { value, src1x, src2x, src3x, src4x, width, height, alt, zoomDisabled, license, copyright, showInIndex, caption, search, } = data;
293
- const { bitType } = context;
294
- let zoomDisabledDefault = false;
295
- if (Config_1.Config.isOfBitType(bitType, [
296
- BitType_1.BitType.imageSeparator,
297
- BitType_1.BitType.pageBanner,
298
- BitType_1.BitType.imagesLogoGrave,
299
- BitType_1.BitType.prototypeImages,
300
- ])) {
301
- zoomDisabledDefault = true;
302
- }
303
- // NOTE: Node order is important and is defined here
304
- const node = {
305
- type: ResourceTag_1.ResourceTag.image,
306
- __typeAlias: __typeAlias !== null && __typeAlias !== void 0 ? __typeAlias : ResourceTag_1.ResourceTag.image,
307
- image: {
308
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
309
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
310
- src: value !== null && value !== void 0 ? value : '',
311
- src1x: (src1x !== null && src1x !== void 0 ? src1x : undefined),
312
- src2x: (src2x !== null && src2x !== void 0 ? src2x : undefined),
313
- src3x: (src3x !== null && src3x !== void 0 ? src3x : undefined),
314
- src4x: (src4x !== null && src4x !== void 0 ? src4x : undefined),
315
- width: (width !== null && width !== void 0 ? width : null),
316
- height: (height !== null && height !== void 0 ? height : null),
317
- alt: alt !== null && alt !== void 0 ? alt : '',
318
- zoomDisabled: zoomDisabled !== null && zoomDisabled !== void 0 ? zoomDisabled : zoomDisabledDefault,
319
- license: license !== null && license !== void 0 ? license : '',
320
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
321
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
322
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
323
- search: (search !== null && search !== void 0 ? search : undefined),
324
- },
325
- };
326
- // Remove Unset Optionals
327
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.image, {
328
- ignoreFalse: ['zoomDisabled', 'showInIndex'],
329
- ignoreEmptyArrays: ['caption'],
330
- ignoreUndefined: ['width', 'height'],
331
- ignoreEmptyString: ['src', 'alt', 'license', 'copyright'],
332
- });
333
- // Validate and correct invalid bits as much as possible
334
- return NodeValidator_1.NodeValidator.validateResource(node);
335
- }
336
- /**
337
- * Build imageLinkResource node
338
- *
339
- * @param data - data for the node
340
- * @returns
341
- */
342
- imageLinkResource(context, data) {
343
- var _a, _b;
344
- const { value, src1x, src2x, src3x, src4x, width, height, alt, zoomDisabled, license, copyright, showInIndex, caption, search, } = data;
345
- // NOTE: Node order is important and is defined here
346
- const node = {
347
- type: ResourceTag_1.ResourceTag.imageLink,
348
- __typeAlias: ResourceTag_1.ResourceTag.imageLink,
349
- imageLink: {
350
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
351
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
352
- // src: value ?? '',
353
- url: value !== null && value !== void 0 ? value : '',
354
- src1x: (src1x !== null && src1x !== void 0 ? src1x : undefined),
355
- src2x: (src2x !== null && src2x !== void 0 ? src2x : undefined),
356
- src3x: (src3x !== null && src3x !== void 0 ? src3x : undefined),
357
- src4x: (src4x !== null && src4x !== void 0 ? src4x : undefined),
358
- width: (width !== null && width !== void 0 ? width : null),
359
- height: (height !== null && height !== void 0 ? height : null),
360
- alt: alt !== null && alt !== void 0 ? alt : '',
361
- zoomDisabled: zoomDisabled !== null && zoomDisabled !== void 0 ? zoomDisabled : false, // TODO: Default depends on the bit(!)
362
- license: license !== null && license !== void 0 ? license : '',
363
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
364
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
365
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
366
- search: (search !== null && search !== void 0 ? search : undefined),
367
- },
368
- };
369
- // Remove Unset Optionals
370
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.imageLink, {
371
- ignoreFalse: ['zoomDisabled', 'showInIndex'],
372
- ignoreEmptyArrays: ['caption'],
373
- ignoreUndefined: ['width', 'height'],
374
- ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
375
- });
376
- // Validate and correct invalid bits as much as possible
377
- return NodeValidator_1.NodeValidator.validateResource(node);
378
- }
379
- /**
380
- * Build audioResource node
381
- *
382
- * @param data - data for the node
383
- * @returns
384
- */
385
- audioResource(context, data) {
386
- var _a, _b;
387
- const { value, duration, mute, autoplay, license, copyright, showInIndex, caption, search } = data;
388
- // NOTE: Node order is important and is defined here
389
- const node = {
390
- type: ResourceTag_1.ResourceTag.audio,
391
- __typeAlias: ResourceTag_1.ResourceTag.audio,
392
- audio: {
393
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
394
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
395
- src: value !== null && value !== void 0 ? value : '',
396
- duration: (duration !== null && duration !== void 0 ? duration : undefined),
397
- mute: (mute !== null && mute !== void 0 ? mute : undefined),
398
- autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
399
- license: license !== null && license !== void 0 ? license : '',
400
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
401
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
402
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
403
- search: (search !== null && search !== void 0 ? search : undefined),
404
- },
405
- };
406
- // Remove Unset Optionals
407
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.audio, {
408
- ignoreEmptyArrays: ['caption'],
409
- ignoreEmptyString: ['src', 'alt', 'license', 'copyright'],
410
- ignoreFalse: ['showInIndex'],
411
- });
412
- // Validate and correct invalid bits as much as possible
413
- return NodeValidator_1.NodeValidator.validateResource(node);
414
- }
415
- /**
416
- * Build audioEmbedResource node
417
- *
418
- * @param data - data for the node
419
- * @returns
420
- */
421
- audioEmbedResource(context, data) {
422
- var _a, _b;
423
- const { value, duration, mute, autoplay, license, copyright, showInIndex, caption, search } = data;
424
- // NOTE: Node order is important and is defined here
425
- const node = {
426
- type: ResourceTag_1.ResourceTag.audioEmbed,
427
- __typeAlias: ResourceTag_1.ResourceTag.audioEmbed,
428
- audioEmbed: {
429
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
430
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
431
- src: value !== null && value !== void 0 ? value : '',
432
- duration: (duration !== null && duration !== void 0 ? duration : undefined),
433
- mute: (mute !== null && mute !== void 0 ? mute : undefined),
434
- autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
435
- license: license !== null && license !== void 0 ? license : '',
436
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
437
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
438
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
439
- search: (search !== null && search !== void 0 ? search : undefined),
440
- },
441
- };
442
- // Remove Unset Optionals
443
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.audioEmbed, {
444
- ignoreEmptyArrays: ['caption'],
445
- ignoreEmptyString: ['src', /*'alt',*/ 'license', 'copyright'],
446
- ignoreFalse: ['showInIndex'],
447
- });
448
- // Validate and correct invalid bits as much as possible
449
- return NodeValidator_1.NodeValidator.validateResource(node);
450
- }
451
- /**
452
- * Build audioLinkResource node
453
- *
454
- * @param data - data for the node
455
- * @returns
456
- */
457
- audioLinkResource(context, data) {
458
- var _a, _b;
459
- const { value, duration, mute, autoplay, license, copyright, showInIndex, caption, search } = data;
460
- // NOTE: Node order is important and is defined here
461
- const node = {
462
- type: ResourceTag_1.ResourceTag.audioLink,
463
- __typeAlias: ResourceTag_1.ResourceTag.audioLink,
464
- audioLink: {
465
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
466
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
467
- // src: value ?? '',
468
- url: value !== null && value !== void 0 ? value : '',
469
- duration: (duration !== null && duration !== void 0 ? duration : undefined),
470
- mute: (mute !== null && mute !== void 0 ? mute : undefined),
471
- autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
472
- license: license !== null && license !== void 0 ? license : '',
473
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
474
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
475
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
476
- search: (search !== null && search !== void 0 ? search : undefined),
477
- },
478
- };
479
- // Remove Unset Optionals
480
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.audioLink, {
481
- // ignoreEmptyArrays: ['caption'],
482
- ignoreEmptyString: ['url' /*'alt', 'license', 'copyright'*/],
483
- });
484
- // Validate and correct invalid bits as much as possible
485
- return NodeValidator_1.NodeValidator.validateResource(node);
486
- }
487
- /**
488
- * Build videoResource node
489
- *
490
- * @param data - data for the node
491
- * @returns
492
- */
493
- videoResource(context, data) {
494
- var _a, _b;
495
- const { value, width, height, duration, mute, autoplay, allowSubtitles, showSubtitles, alt, posterImage, thumbnails, license, copyright, showInIndex, caption, search, } = data;
496
- // NOTE: Node order is important and is defined here
497
- const node = {
498
- type: ResourceTag_1.ResourceTag.video,
499
- __typeAlias: ResourceTag_1.ResourceTag.video,
500
- video: {
501
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
502
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
503
- src: value !== null && value !== void 0 ? value : '',
504
- width: (width !== null && width !== void 0 ? width : null),
505
- height: (height !== null && height !== void 0 ? height : null),
506
- duration: (duration !== null && duration !== void 0 ? duration : undefined),
507
- mute: (mute !== null && mute !== void 0 ? mute : undefined),
508
- autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
509
- allowSubtitles: (allowSubtitles !== null && allowSubtitles !== void 0 ? allowSubtitles : undefined),
510
- showSubtitles: (showSubtitles !== null && showSubtitles !== void 0 ? showSubtitles : undefined),
511
- alt: alt !== null && alt !== void 0 ? alt : '',
512
- license: license !== null && license !== void 0 ? license : '',
513
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
514
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
515
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
516
- search: (search !== null && search !== void 0 ? search : undefined),
517
- // Have sub-chains so must be at end of chain
518
- posterImage: (posterImage !== null && posterImage !== void 0 ? posterImage : undefined),
519
- thumbnails: (thumbnails !== null && thumbnails !== void 0 ? thumbnails : undefined),
520
- },
521
- };
522
- // Remove Unset Optionals
523
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.video, {
524
- ignoreEmptyArrays: ['caption'],
525
- ignoreUndefined: ['width', 'height'],
526
- ignoreEmptyString: ['src', /*'alt',*/ 'license', 'copyright'],
527
- ignoreFalse: ['showInIndex'],
528
- });
529
- // Validate and correct invalid bits as much as possible
530
- return NodeValidator_1.NodeValidator.validateResource(node);
531
- }
532
- /**
533
- * Build videoEmbedResource node
534
- *
535
- * @param data - data for the node
536
- * @returns
537
- */
538
- videoEmbedResource(context, data) {
539
- var _a, _b;
540
- const { value, width, height, duration, mute, autoplay, allowSubtitles, showSubtitles, alt, posterImage, thumbnails, license, copyright, showInIndex, caption, search, } = data;
541
- // NOTE: Node order is important and is defined here
542
- const node = {
543
- type: ResourceTag_1.ResourceTag.videoEmbed,
544
- __typeAlias: ResourceTag_1.ResourceTag.videoEmbed,
545
- videoEmbed: {
546
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
547
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
548
- // src: value ?? '',
549
- url: value !== null && value !== void 0 ? value : '',
550
- width: (width !== null && width !== void 0 ? width : null),
551
- height: (height !== null && height !== void 0 ? height : null),
552
- duration: (duration !== null && duration !== void 0 ? duration : undefined),
553
- mute: (mute !== null && mute !== void 0 ? mute : undefined),
554
- autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
555
- allowSubtitles: (allowSubtitles !== null && allowSubtitles !== void 0 ? allowSubtitles : undefined),
556
- showSubtitles: (showSubtitles !== null && showSubtitles !== void 0 ? showSubtitles : undefined),
557
- alt: alt !== null && alt !== void 0 ? alt : '',
558
- posterImage: (posterImage !== null && posterImage !== void 0 ? posterImage : undefined),
559
- thumbnails: (thumbnails !== null && thumbnails !== void 0 ? thumbnails : undefined),
560
- license: license !== null && license !== void 0 ? license : '',
561
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
562
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
563
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
564
- search: (search !== null && search !== void 0 ? search : undefined),
565
- },
566
- };
567
- // Remove Unset Optionals
568
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.videoEmbed, {
569
- ignoreEmptyArrays: ['caption'],
570
- ignoreUndefined: ['width', 'height'],
571
- ignoreEmptyString: ['url', /*'alt',*/ 'license', 'copyright'],
572
- ignoreFalse: ['showInIndex'],
573
- });
574
- // Validate and correct invalid bits as much as possible
575
- return NodeValidator_1.NodeValidator.validateResource(node);
576
- }
577
- /**
578
- * Build videoLinkResource node
579
- *
580
- * @param data - data for the node
581
- * @returns
582
- */
583
- videoLinkResource(context, data) {
584
- var _a, _b;
585
- const { value, width, height, duration, mute, autoplay, allowSubtitles, showSubtitles, alt, posterImage, thumbnails, license, copyright, showInIndex, caption, search, } = data;
586
- // NOTE: Node order is important and is defined here
587
- const node = {
588
- type: ResourceTag_1.ResourceTag.videoLink,
589
- __typeAlias: ResourceTag_1.ResourceTag.videoLink,
590
- videoLink: {
591
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
592
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
593
- // src: value ?? '',
594
- url: value !== null && value !== void 0 ? value : '',
595
- width: (width !== null && width !== void 0 ? width : null),
596
- height: (height !== null && height !== void 0 ? height : null),
597
- duration: (duration !== null && duration !== void 0 ? duration : undefined),
598
- mute: (mute !== null && mute !== void 0 ? mute : undefined),
599
- autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
600
- allowSubtitles: (allowSubtitles !== null && allowSubtitles !== void 0 ? allowSubtitles : undefined),
601
- showSubtitles: (showSubtitles !== null && showSubtitles !== void 0 ? showSubtitles : undefined),
602
- alt: alt !== null && alt !== void 0 ? alt : '',
603
- posterImage: (posterImage !== null && posterImage !== void 0 ? posterImage : undefined),
604
- thumbnails: (thumbnails !== null && thumbnails !== void 0 ? thumbnails : undefined),
605
- license: license !== null && license !== void 0 ? license : '',
606
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
607
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
608
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
609
- search: (search !== null && search !== void 0 ? search : undefined),
610
- },
611
- };
612
- // Remove Unset Optionals
613
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.videoLink, {
614
- ignoreEmptyArrays: ['caption'],
615
- ignoreUndefined: ['width', 'height'],
616
- ignoreEmptyString: ['url', /*'alt',*/ 'license', 'copyright'],
617
- ignoreFalse: ['showInIndex'],
618
- });
619
- // Validate and correct invalid bits as much as possible
620
- return NodeValidator_1.NodeValidator.validateResource(node);
621
- }
622
- // /**
623
- // * Build stillImageFilmResource node
624
- // *
625
- // * @param data - data for the node
626
- // * @returns
627
- // */
628
- // stillImageFilmResource(context: BuildContext, data: { image?: ImageResource; audio?: AudioResource }): StillImageFilmResource {
629
- // const { image, audio } = data;
630
- // // NOTE: Node order is important and is defined here
631
- // const node: StillImageFilmResource = {
632
- // type: ResourceTag.stillImageFilm,
633
- // __typeAlias: ResourceTag.stillImageFilm,
634
- // image: image ?? this.imageResource({ format: '', value: '' }),
635
- // audio: audio ?? this.audioResource({ format: '', value: '' }),
636
- // };
637
- // // Remove Unset Optionals
638
- // ObjectUtils.removeUnwantedProperties(node);
639
- // // Validate and correct invalid bits as much as possible
640
- // return NodeValidator.validateResource(node) ;
641
- // }
642
- /**
643
- * Build stillImageFilmEmbedResource node
644
- *
645
- * @param data - data for the node
646
- * @returns
647
- */
648
- stillImageFilmEmbedResource(context, data) {
649
- var _a, _b;
650
- const { value, width, height, duration, mute, autoplay, allowSubtitles, showSubtitles, alt, posterImage, thumbnails, license, copyright, showInIndex, caption, search, } = data;
651
- // NOTE: Node order is important and is defined here
652
- const node = {
653
- type: ResourceTag_1.ResourceTag.stillImageFilmEmbed,
654
- __typeAlias: ResourceTag_1.ResourceTag.stillImageFilmEmbed,
655
- stillImageFilmEmbed: {
656
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
657
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
658
- // src: value ?? '',
659
- url: value !== null && value !== void 0 ? value : '',
660
- width: (width !== null && width !== void 0 ? width : null),
661
- height: (height !== null && height !== void 0 ? height : null),
662
- duration: (duration !== null && duration !== void 0 ? duration : undefined),
663
- mute: (mute !== null && mute !== void 0 ? mute : undefined),
664
- autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
665
- allowSubtitles: (allowSubtitles !== null && allowSubtitles !== void 0 ? allowSubtitles : undefined),
666
- showSubtitles: (showSubtitles !== null && showSubtitles !== void 0 ? showSubtitles : undefined),
667
- alt: alt !== null && alt !== void 0 ? alt : '',
668
- posterImage: (posterImage !== null && posterImage !== void 0 ? posterImage : undefined),
669
- thumbnails: (thumbnails !== null && thumbnails !== void 0 ? thumbnails : undefined),
670
- license: license !== null && license !== void 0 ? license : '',
671
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
672
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
673
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
674
- search: (search !== null && search !== void 0 ? search : undefined),
675
- },
676
- };
677
- // Remove Unset Optionals
678
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.stillImageFilmEmbed, {
679
- ignoreEmptyArrays: ['caption'],
680
- ignoreUndefined: ['width', 'height'],
681
- ignoreEmptyString: ['url', /*'alt',*/ 'license', 'copyright'],
682
- ignoreFalse: ['showInIndex'],
683
- });
684
- // Validate and correct invalid bits as much as possible
685
- return NodeValidator_1.NodeValidator.validateResource(node);
686
- }
687
- /**
688
- * Build stillImageFilmLinkResource node
689
- *
690
- * @param data - data for the node
691
- * @returns
692
- */
693
- stillImageFilmLinkResource(context, data) {
694
- var _a, _b;
695
- const { value, width, height, duration, mute, autoplay, allowSubtitles, showSubtitles, alt, posterImage, thumbnails, license, copyright, showInIndex, caption, search, } = data;
696
- // NOTE: Node order is important and is defined here
697
- const node = {
698
- type: ResourceTag_1.ResourceTag.stillImageFilmLink,
699
- __typeAlias: ResourceTag_1.ResourceTag.stillImageFilmLink,
700
- stillImageFilmLink: {
701
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
702
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
703
- // src: value ?? '',
704
- url: value !== null && value !== void 0 ? value : '',
705
- width: (width !== null && width !== void 0 ? width : null),
706
- height: (height !== null && height !== void 0 ? height : null),
707
- duration: (duration !== null && duration !== void 0 ? duration : undefined),
708
- mute: (mute !== null && mute !== void 0 ? mute : undefined),
709
- autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
710
- allowSubtitles: (allowSubtitles !== null && allowSubtitles !== void 0 ? allowSubtitles : undefined),
711
- showSubtitles: (showSubtitles !== null && showSubtitles !== void 0 ? showSubtitles : undefined),
712
- alt: alt !== null && alt !== void 0 ? alt : '',
713
- posterImage: (posterImage !== null && posterImage !== void 0 ? posterImage : undefined),
714
- thumbnails: (thumbnails !== null && thumbnails !== void 0 ? thumbnails : undefined),
715
- license: license !== null && license !== void 0 ? license : '',
716
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
717
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
718
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
719
- search: (search !== null && search !== void 0 ? search : undefined),
720
- },
721
- };
722
- // Remove Unset Optionals
723
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.stillImageFilmLink, {
724
- ignoreEmptyArrays: ['caption'],
725
- ignoreUndefined: ['width', 'height'],
726
- ignoreEmptyString: ['url', /*'alt',*/ 'license', 'copyright'],
727
- ignoreFalse: ['showInIndex'],
728
- });
729
- // Validate and correct invalid bits as much as possible
730
- return NodeValidator_1.NodeValidator.validateResource(node);
731
- }
732
- /**
733
- * Build articleResource node
734
- *
735
- * @param data - data for the node
736
- * @returns
737
- */
738
- articleResource(context, data) {
739
- var _a, _b;
740
- const { value, license, copyright, showInIndex, caption, search } = data;
741
- // NOTE: Node order is important and is defined here
742
- const node = {
743
- type: ResourceTag_1.ResourceTag.article,
744
- __typeAlias: ResourceTag_1.ResourceTag.article,
745
- article: {
746
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
747
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
748
- body: value !== null && value !== void 0 ? value : '',
749
- license: license !== null && license !== void 0 ? license : '',
750
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
751
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
752
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
753
- search: (search !== null && search !== void 0 ? search : undefined),
754
- },
755
- };
756
- // Remove Unset Optionals
757
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.article, {
758
- ignoreEmptyArrays: ['caption'],
759
- ignoreEmptyString: ['body', 'alt', 'license', 'copyright'],
760
- });
761
- // Validate and correct invalid bits as much as possible
762
- return NodeValidator_1.NodeValidator.validateResource(node);
763
- }
764
- /**
765
- * Build documentResource node
766
- *
767
- * @param data - data for the node
768
- * @returns
769
- */
770
- documentResource(context, data) {
771
- var _a, _b;
772
- const { value, license, copyright, showInIndex, caption, search } = data;
773
- // NOTE: Node order is important and is defined here
774
- const node = {
775
- type: ResourceTag_1.ResourceTag.document,
776
- __typeAlias: ResourceTag_1.ResourceTag.document,
777
- document: {
778
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
779
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
780
- url: value !== null && value !== void 0 ? value : '',
781
- license: license !== null && license !== void 0 ? license : '',
782
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
783
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
784
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
785
- search: (search !== null && search !== void 0 ? search : undefined),
786
- },
787
- };
788
- // Remove Unset Optionals
789
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.document, {
790
- ignoreEmptyArrays: ['caption'],
791
- ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
792
- ignoreFalse: ['showInIndex'],
793
- });
794
- // Validate and correct invalid bits as much as possible
795
- return NodeValidator_1.NodeValidator.validateResource(node);
796
- }
797
- /**
798
- * Build documentEmbedResource node
799
- *
800
- * @param data - data for the node
801
- * @returns
802
- */
803
- documentEmbedResource(context, data) {
804
- var _a, _b;
805
- const { value, license, copyright, showInIndex, caption, search } = data;
806
- // NOTE: Node order is important and is defined here
807
- const node = {
808
- type: ResourceTag_1.ResourceTag.documentEmbed,
809
- __typeAlias: ResourceTag_1.ResourceTag.documentEmbed,
810
- documentEmbed: {
811
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
812
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
813
- url: value !== null && value !== void 0 ? value : '',
814
- license: license !== null && license !== void 0 ? license : '',
815
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
816
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
817
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
818
- search: (search !== null && search !== void 0 ? search : undefined),
819
- },
820
- };
821
- // Remove Unset Optionals
822
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.documentEmbed, {
823
- ignoreEmptyArrays: ['caption'],
824
- ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
825
- ignoreFalse: ['showInIndex'],
826
- });
827
- // Validate and correct invalid bits as much as possible
828
- return NodeValidator_1.NodeValidator.validateResource(node);
829
- }
830
- /**
831
- * Build documentLinkResource node
832
- *
833
- * @param data - data for the node
834
- * @returns
835
- */
836
- documentLinkResource(context, data) {
837
- var _a, _b;
838
- const { value, license, copyright, showInIndex, caption, search } = data;
839
- // NOTE: Node order is important and is defined here
840
- const node = {
841
- type: ResourceTag_1.ResourceTag.documentLink,
842
- __typeAlias: ResourceTag_1.ResourceTag.documentLink,
843
- documentLink: {
844
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
845
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
846
- url: value !== null && value !== void 0 ? value : '',
847
- license: license !== null && license !== void 0 ? license : '',
848
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
849
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
850
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
851
- search: (search !== null && search !== void 0 ? search : undefined),
852
- },
853
- };
854
- // Remove Unset Optionals
855
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.documentLink, {
856
- ignoreEmptyArrays: ['caption'],
857
- ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
858
- ignoreFalse: ['showInIndex'],
859
- });
860
- // Validate and correct invalid bits as much as possible
861
- return NodeValidator_1.NodeValidator.validateResource(node);
862
- }
863
- /**
864
- * Build documentDownloadResource node
865
- *
866
- * @param data - data for the node
867
- * @returns
868
- */
869
- documentDownloadResource(context, data) {
870
- var _a, _b;
871
- const { value, license, copyright, showInIndex, caption, search } = data;
872
- // NOTE: Node order is important and is defined here
873
- const node = {
874
- type: ResourceTag_1.ResourceTag.documentDownload,
875
- __typeAlias: ResourceTag_1.ResourceTag.documentDownload,
876
- documentDownload: {
877
- format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
878
- provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
879
- url: value !== null && value !== void 0 ? value : '',
880
- license: license !== null && license !== void 0 ? license : '',
881
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
882
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
883
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
884
- search: (search !== null && search !== void 0 ? search : undefined),
885
- },
886
- };
887
- // Remove Unset Optionals
888
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.documentDownload, {
889
- ignoreEmptyArrays: ['caption'],
890
- ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
891
- ignoreFalse: ['showInIndex'],
892
- });
893
- // Validate and correct invalid bits as much as possible
894
- return NodeValidator_1.NodeValidator.validateResource(node);
895
- }
896
- /**
897
- * Build appLinkResource node
898
- *
899
- * @param data - data for the node
900
- * @returns
901
- */
902
- appLinkResource(context, data) {
903
- const { value, license, copyright, showInIndex, caption, search } = data;
904
- // NOTE: Node order is important and is defined here
905
- const node = {
906
- type: ResourceTag_1.ResourceTag.appLink,
907
- __typeAlias: ResourceTag_1.ResourceTag.appLink,
908
- appLink: {
909
- // format: (UrlUtils.fileExtensionFromUrl(value) ?? undefined) as string,
910
- // provider: (UrlUtils.domainFromUrl(value) ?? undefined) as string,
911
- provider: undefined,
912
- url: value !== null && value !== void 0 ? value : '',
913
- license: license !== null && license !== void 0 ? license : '',
914
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
915
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
916
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
917
- search: (search !== null && search !== void 0 ? search : undefined),
918
- },
919
- };
920
- // Remove Unset Optionals
921
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.appLink, {
922
- ignoreEmptyArrays: ['caption'],
923
- ignoreEmptyString: ['url', /*'alt',*/ 'license', 'copyright'],
924
- ignoreFalse: ['showInIndex'],
925
- });
926
- // Validate and correct invalid bits as much as possible
927
- return NodeValidator_1.NodeValidator.validateResource(node);
928
- }
929
- /**
930
- * Build websiteLinkResource node
931
- *
932
- * @param data - data for the node
933
- * @returns
934
- */
935
- websiteLinkResource(context, data) {
936
- const { value, /*siteName,*/ license, copyright, showInIndex, caption, search } = data;
937
- // NOTE: Node order is important and is defined here
938
- const node = {
939
- type: ResourceTag_1.ResourceTag.websiteLink,
940
- __typeAlias: ResourceTag_1.ResourceTag.websiteLink,
941
- websiteLink: {
942
- // provider: (UrlUtils.domainFromUrl(value) ?? undefined) as string,
943
- provider: undefined,
944
- url: value !== null && value !== void 0 ? value : '',
945
- // siteName,
946
- license: license !== null && license !== void 0 ? license : '',
947
- copyright: copyright !== null && copyright !== void 0 ? copyright : '',
948
- showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
949
- caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
950
- search: (search !== null && search !== void 0 ? search : undefined),
951
- },
952
- };
953
- // Remove Unset Optionals
954
- ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.websiteLink, {
955
- ignoreEmptyArrays: ['caption'],
956
- ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
957
- ignoreFalse: ['showInIndex'],
958
- });
959
- // Validate and correct invalid bits as much as possible
960
- return NodeValidator_1.NodeValidator.validateResource(node);
961
- }
962
- }
963
- exports.ResourceBuilder = ResourceBuilder;
964
- //# sourceMappingURL=ResourceBuilder.js.map