@gmb/bitmark-parser-generator 3.34.0 → 3.36.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.
- package/README.md +4 -4
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/index.cjs +33650 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +7733 -0
- package/dist/index.d.ts +7733 -0
- package/dist/index.js +33590 -0
- package/dist/index.js.map +1 -0
- package/package.json +106 -90
- package/dist/cjs/BitmarkParserGenerator.js +0 -776
- package/dist/cjs/BitmarkParserGenerator.js.map +0 -1
- package/dist/cjs/ast/Ast.js +0 -220
- package/dist/cjs/ast/Ast.js.map +0 -1
- package/dist/cjs/ast/BaseBuilder.js +0 -193
- package/dist/cjs/ast/BaseBuilder.js.map +0 -1
- package/dist/cjs/ast/Builder.js +0 -1781
- package/dist/cjs/ast/Builder.js.map +0 -1
- package/dist/cjs/ast/ResourceBuilder.js +0 -963
- package/dist/cjs/ast/ResourceBuilder.js.map +0 -1
- package/dist/cjs/ast/rules/NodeValidator.js +0 -184
- package/dist/cjs/ast/rules/NodeValidator.js.map +0 -1
- package/dist/cjs/ast/writer/FileWriter.js +0 -119
- package/dist/cjs/ast/writer/FileWriter.js.map +0 -1
- package/dist/cjs/ast/writer/StreamWriter.js +0 -89
- package/dist/cjs/ast/writer/StreamWriter.js.map +0 -1
- package/dist/cjs/ast/writer/StringWriter.js +0 -115
- package/dist/cjs/ast/writer/StringWriter.js.map +0 -1
- package/dist/cjs/ast/writer/Writer.js +0 -3
- package/dist/cjs/ast/writer/Writer.js.map +0 -1
- package/dist/cjs/breakscaping/Breakscape.js +0 -80
- package/dist/cjs/breakscaping/Breakscape.js.map +0 -1
- package/dist/cjs/breakscaping/BreakscapeLoop.js +0 -305
- package/dist/cjs/breakscaping/BreakscapeLoop.js.map +0 -1
- package/dist/cjs/breakscaping/BreakscapeOptions.js +0 -3
- package/dist/cjs/breakscaping/BreakscapeOptions.js.map +0 -1
- package/dist/cjs/breakscaping/BreakscapeRegex.js +0 -213
- package/dist/cjs/breakscaping/BreakscapeRegex.js.map +0 -1
- package/dist/cjs/breakscaping/RegexConfigs.js +0 -38
- package/dist/cjs/breakscaping/RegexConfigs.js.map +0 -1
- package/dist/cjs/config/Config.js +0 -352
- package/dist/cjs/config/Config.js.map +0 -1
- package/dist/cjs/config/ConfigHydrator.js +0 -161
- package/dist/cjs/config/ConfigHydrator.js.map +0 -1
- package/dist/cjs/config/raw/bits.js +0 -2615
- package/dist/cjs/config/raw/bits.js.map +0 -1
- package/dist/cjs/config/raw/cardSets.js +0 -549
- package/dist/cjs/config/raw/cardSets.js.map +0 -1
- package/dist/cjs/config/raw/groups.js +0 -1182
- package/dist/cjs/config/raw/groups.js.map +0 -1
- package/dist/cjs/config/raw/properties.js +0 -1006
- package/dist/cjs/config/raw/properties.js.map +0 -1
- package/dist/cjs/config/raw/resources.js +0 -103
- package/dist/cjs/config/raw/resources.js.map +0 -1
- package/dist/cjs/config/raw/tags.js +0 -48
- package/dist/cjs/config/raw/tags.js.map +0 -1
- package/dist/cjs/generated/build-info.js +0 -13
- package/dist/cjs/generated/build-info.js.map +0 -1
- package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +0 -3168
- package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js.map +0 -1
- package/dist/cjs/generated/parser/text/text-peggy-parser.js +0 -9659
- package/dist/cjs/generated/parser/text/text-peggy-parser.js.map +0 -1
- package/dist/cjs/generator/AstWalkerGenerator.js +0 -86
- package/dist/cjs/generator/AstWalkerGenerator.js.map +0 -1
- package/dist/cjs/generator/Generator.js +0 -3
- package/dist/cjs/generator/Generator.js.map +0 -1
- package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js +0 -49
- package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js.map +0 -1
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js +0 -2601
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +0 -1
- package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js +0 -51
- package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonFileGenerator.js +0 -53
- package/dist/cjs/generator/json/JsonFileGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonGenerator.js +0 -1584
- package/dist/cjs/generator/json/JsonGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonObjectGenerator.js +0 -51
- package/dist/cjs/generator/json/JsonObjectGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonStringGenerator.js +0 -50
- package/dist/cjs/generator/json/JsonStringGenerator.js.map +0 -1
- package/dist/cjs/generator/text/TextGenerator.js +0 -1199
- package/dist/cjs/generator/text/TextGenerator.js.map +0 -1
- package/dist/cjs/index.js +0 -79
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/info/InfoBuilder.js +0 -43
- package/dist/cjs/info/InfoBuilder.js.map +0 -1
- package/dist/cjs/init/init.js +0 -15
- package/dist/cjs/init/init.js.map +0 -1
- package/dist/cjs/model/ast/BreakscapedString.js +0 -3
- package/dist/cjs/model/ast/BreakscapedString.js.map +0 -1
- package/dist/cjs/model/ast/NodeType.js +0 -557
- package/dist/cjs/model/ast/NodeType.js.map +0 -1
- package/dist/cjs/model/ast/Nodes.js +0 -3
- package/dist/cjs/model/ast/Nodes.js.map +0 -1
- package/dist/cjs/model/ast/StardardString.js +0 -3
- package/dist/cjs/model/ast/StardardString.js.map +0 -1
- package/dist/cjs/model/ast/TextNodes.js +0 -3
- package/dist/cjs/model/ast/TextNodes.js.map +0 -1
- package/dist/cjs/model/config/AbstractTagConfig.js +0 -18
- package/dist/cjs/model/config/AbstractTagConfig.js.map +0 -1
- package/dist/cjs/model/config/BitConfig.js +0 -72
- package/dist/cjs/model/config/BitConfig.js.map +0 -1
- package/dist/cjs/model/config/CardSetConfig.js +0 -26
- package/dist/cjs/model/config/CardSetConfig.js.map +0 -1
- package/dist/cjs/model/config/CardVariantConfig.js +0 -32
- package/dist/cjs/model/config/CardVariantConfig.js.map +0 -1
- package/dist/cjs/model/config/MarkupTagConfig.js +0 -41
- package/dist/cjs/model/config/MarkupTagConfig.js.map +0 -1
- package/dist/cjs/model/config/PropertyTagConfig.js +0 -50
- package/dist/cjs/model/config/PropertyTagConfig.js.map +0 -1
- package/dist/cjs/model/config/ResourceTagConfig.js +0 -42
- package/dist/cjs/model/config/ResourceTagConfig.js.map +0 -1
- package/dist/cjs/model/config/ResourcesConfig.js +0 -31
- package/dist/cjs/model/config/ResourcesConfig.js.map +0 -1
- package/dist/cjs/model/config/TagConfig.js +0 -3
- package/dist/cjs/model/config/TagConfig.js.map +0 -1
- package/dist/cjs/model/config/TagsConfig.js +0 -3
- package/dist/cjs/model/config/TagsConfig.js.map +0 -1
- package/dist/cjs/model/config/TagsConfigWithInfo.js +0 -3
- package/dist/cjs/model/config/TagsConfigWithInfo.js.map +0 -1
- package/dist/cjs/model/config/_Config.js +0 -3
- package/dist/cjs/model/config/_Config.js.map +0 -1
- package/dist/cjs/model/config/enum/CardSetConfigKey.js +0 -28
- package/dist/cjs/model/config/enum/CardSetConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/ConfigKey.js +0 -29
- package/dist/cjs/model/config/enum/ConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/GroupConfigKey.js +0 -57
- package/dist/cjs/model/config/enum/GroupConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/GroupConfigType.js +0 -14
- package/dist/cjs/model/config/enum/GroupConfigType.js.map +0 -1
- package/dist/cjs/model/config/enum/PropertyConfigKey.js +0 -215
- package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/ResourceConfigKey.js +0 -40
- package/dist/cjs/model/config/enum/ResourceConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/TagConfigKey.js +0 -26
- package/dist/cjs/model/config/enum/TagConfigKey.js.map +0 -1
- package/dist/cjs/model/enum/BitTagType.js +0 -13
- package/dist/cjs/model/enum/BitTagType.js.map +0 -1
- package/dist/cjs/model/enum/BitType.js +0 -576
- package/dist/cjs/model/enum/BitType.js.map +0 -1
- package/dist/cjs/model/enum/BitmarkGeneratorOutput.js +0 -2
- package/dist/cjs/model/enum/BitmarkGeneratorOutput.js.map +0 -1
- package/dist/cjs/model/enum/BitmarkParserType.js +0 -9
- package/dist/cjs/model/enum/BitmarkParserType.js.map +0 -1
- package/dist/cjs/model/enum/BitmarkVersion.js +0 -12
- package/dist/cjs/model/enum/BitmarkVersion.js.map +0 -1
- package/dist/cjs/model/enum/BodyBitType.js +0 -14
- package/dist/cjs/model/enum/BodyBitType.js.map +0 -1
- package/dist/cjs/model/enum/BodyTextFormat.js +0 -14
- package/dist/cjs/model/enum/BodyTextFormat.js.map +0 -1
- package/dist/cjs/model/enum/CardSetVersion.js +0 -10
- package/dist/cjs/model/enum/CardSetVersion.js.map +0 -1
- package/dist/cjs/model/enum/Count.js +0 -9
- package/dist/cjs/model/enum/Count.js.map +0 -1
- package/dist/cjs/model/enum/DeprecatedTextFormat.js +0 -9
- package/dist/cjs/model/enum/DeprecatedTextFormat.js.map +0 -1
- package/dist/cjs/model/enum/ExampleType.js +0 -11
- package/dist/cjs/model/enum/ExampleType.js.map +0 -1
- package/dist/cjs/model/enum/PropertyAstKey.js +0 -18
- package/dist/cjs/model/enum/PropertyAstKey.js.map +0 -1
- package/dist/cjs/model/enum/PropertyFormat.js +0 -14
- package/dist/cjs/model/enum/PropertyFormat.js.map +0 -1
- package/dist/cjs/model/enum/PropertyJsonKey.js +0 -14
- package/dist/cjs/model/enum/PropertyJsonKey.js.map +0 -1
- package/dist/cjs/model/enum/PropertyTag.js +0 -8
- package/dist/cjs/model/enum/PropertyTag.js.map +0 -1
- package/dist/cjs/model/enum/ResourceJsonKey.js +0 -27
- package/dist/cjs/model/enum/ResourceJsonKey.js.map +0 -1
- package/dist/cjs/model/enum/ResourceTag.js +0 -37
- package/dist/cjs/model/enum/ResourceTag.js.map +0 -1
- package/dist/cjs/model/enum/Tag.js +0 -21
- package/dist/cjs/model/enum/Tag.js.map +0 -1
- package/dist/cjs/model/enum/TextFormat.js +0 -16
- package/dist/cjs/model/enum/TextFormat.js.map +0 -1
- package/dist/cjs/model/enum/TextLocation.js +0 -15
- package/dist/cjs/model/enum/TextLocation.js.map +0 -1
- package/dist/cjs/model/enum/TextMarkType.js +0 -54
- package/dist/cjs/model/enum/TextMarkType.js.map +0 -1
- package/dist/cjs/model/enum/TextNodeType.js +0 -35
- package/dist/cjs/model/enum/TextNodeType.js.map +0 -1
- package/dist/cjs/model/enum/TextSection.js +0 -18
- package/dist/cjs/model/enum/TextSection.js.map +0 -1
- package/dist/cjs/model/info/enum/InfoFormat.js +0 -11
- package/dist/cjs/model/info/enum/InfoFormat.js.map +0 -1
- package/dist/cjs/model/info/enum/InfoType.js +0 -12
- package/dist/cjs/model/info/enum/InfoType.js.map +0 -1
- package/dist/cjs/model/json/BitJson.js +0 -3
- package/dist/cjs/model/json/BitJson.js.map +0 -1
- package/dist/cjs/model/json/BitWrapperJson.js +0 -3
- package/dist/cjs/model/json/BitWrapperJson.js.map +0 -1
- package/dist/cjs/model/json/BodyBitJson.js +0 -3
- package/dist/cjs/model/json/BodyBitJson.js.map +0 -1
- package/dist/cjs/model/json/ParserJson.js +0 -3
- package/dist/cjs/model/json/ParserJson.js.map +0 -1
- package/dist/cjs/model/json/ResourceJson.js +0 -3
- package/dist/cjs/model/json/ResourceJson.js.map +0 -1
- package/dist/cjs/model/parser/ParserData.js +0 -3
- package/dist/cjs/model/parser/ParserData.js.map +0 -1
- package/dist/cjs/model/parser/ParserError.js +0 -3
- package/dist/cjs/model/parser/ParserError.js.map +0 -1
- package/dist/cjs/model/parser/ParserInfo.js +0 -3
- package/dist/cjs/model/parser/ParserInfo.js.map +0 -1
- package/dist/cjs/model/parser/ParserLocation.js +0 -3
- package/dist/cjs/model/parser/ParserLocation.js.map +0 -1
- package/dist/cjs/model/parser/ParserLocationRange.js +0 -3
- package/dist/cjs/model/parser/ParserLocationRange.js.map +0 -1
- package/dist/cjs/model/parser/TagValidationData.js +0 -3
- package/dist/cjs/model/parser/TagValidationData.js.map +0 -1
- package/dist/cjs/parser/bitmark/BitmarkParser.js +0 -25
- package/dist/cjs/parser/bitmark/BitmarkParser.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js +0 -7
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +0 -614
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +0 -716
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js +0 -69
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +0 -745
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js +0 -82
- package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +0 -260
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +0 -50
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +0 -885
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +0 -27
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +0 -61
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +0 -63
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +0 -161
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +0 -55
- package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +0 -31
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +0 -59
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js +0 -16
- package/dist/cjs/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +0 -29
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +0 -20
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +0 -45
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +0 -44
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js +0 -11
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +0 -57
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +0 -158
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +0 -37
- package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +0 -24
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +0 -163
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +0 -27
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +0 -28
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +0 -53
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +0 -203
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +0 -24
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/json/JsonParser.js +0 -270
- package/dist/cjs/parser/json/JsonParser.js.map +0 -1
- package/dist/cjs/parser/text/TextParser.js +0 -148
- package/dist/cjs/parser/text/TextParser.js.map +0 -1
- package/dist/cjs/parser/text/peg/TextPegParser.js +0 -7
- package/dist/cjs/parser/text/peg/TextPegParser.js.map +0 -1
- package/dist/cjs/utils/ArrayUtils.js +0 -43
- package/dist/cjs/utils/ArrayUtils.js.map +0 -1
- package/dist/cjs/utils/BitUtils.js +0 -75
- package/dist/cjs/utils/BitUtils.js.map +0 -1
- package/dist/cjs/utils/BooleanUtils.js +0 -62
- package/dist/cjs/utils/BooleanUtils.js.map +0 -1
- package/dist/cjs/utils/FileUtils.js +0 -75
- package/dist/cjs/utils/FileUtils.js.map +0 -1
- package/dist/cjs/utils/NumberUtils.js +0 -62
- package/dist/cjs/utils/NumberUtils.js.map +0 -1
- package/dist/cjs/utils/ObjectUtils.js +0 -417
- package/dist/cjs/utils/ObjectUtils.js.map +0 -1
- package/dist/cjs/utils/StringUtils.js +0 -183
- package/dist/cjs/utils/StringUtils.js.map +0 -1
- package/dist/cjs/utils/UrlUtils.js +0 -37
- package/dist/cjs/utils/UrlUtils.js.map +0 -1
- package/dist/cjs/utils/env/Env.js +0 -131
- package/dist/cjs/utils/env/Env.js.map +0 -1
- package/dist/cjs/utils/env/Environment.js +0 -15
- package/dist/cjs/utils/env/Environment.js.map +0 -1
- package/dist/cjs/utils/env/Os.js +0 -14
- package/dist/cjs/utils/env/Os.js.map +0 -1
- package/dist/cjs/utils/env/Version.js +0 -12
- package/dist/cjs/utils/env/Version.js.map +0 -1
- package/dist/cjs/utils/env/userAgent.js +0 -88
- package/dist/cjs/utils/env/userAgent.js.map +0 -1
- package/dist/cjs/utils/polyfill/fs.js +0 -14
- package/dist/cjs/utils/polyfill/fs.js.map +0 -1
- package/dist/esm/BitmarkParserGenerator.js +0 -735
- package/dist/esm/BitmarkParserGenerator.js.map +0 -1
- package/dist/esm/ast/Ast.js +0 -217
- package/dist/esm/ast/Ast.js.map +0 -1
- package/dist/esm/ast/BaseBuilder.js +0 -190
- package/dist/esm/ast/BaseBuilder.js.map +0 -1
- package/dist/esm/ast/Builder.js +0 -1775
- package/dist/esm/ast/Builder.js.map +0 -1
- package/dist/esm/ast/ResourceBuilder.js +0 -960
- package/dist/esm/ast/ResourceBuilder.js.map +0 -1
- package/dist/esm/ast/rules/NodeValidator.js +0 -181
- package/dist/esm/ast/rules/NodeValidator.js.map +0 -1
- package/dist/esm/ast/writer/FileWriter.js +0 -80
- package/dist/esm/ast/writer/FileWriter.js.map +0 -1
- package/dist/esm/ast/writer/StreamWriter.js +0 -83
- package/dist/esm/ast/writer/StreamWriter.js.map +0 -1
- package/dist/esm/ast/writer/StringWriter.js +0 -112
- package/dist/esm/ast/writer/StringWriter.js.map +0 -1
- package/dist/esm/ast/writer/Writer.js +0 -2
- package/dist/esm/ast/writer/Writer.js.map +0 -1
- package/dist/esm/breakscaping/Breakscape.js +0 -77
- package/dist/esm/breakscaping/Breakscape.js.map +0 -1
- package/dist/esm/breakscaping/BreakscapeLoop.js +0 -302
- package/dist/esm/breakscaping/BreakscapeLoop.js.map +0 -1
- package/dist/esm/breakscaping/BreakscapeOptions.js +0 -2
- package/dist/esm/breakscaping/BreakscapeOptions.js.map +0 -1
- package/dist/esm/breakscaping/BreakscapeRegex.js +0 -177
- package/dist/esm/breakscaping/BreakscapeRegex.js.map +0 -1
- package/dist/esm/breakscaping/RegexConfigs.js +0 -35
- package/dist/esm/breakscaping/RegexConfigs.js.map +0 -1
- package/dist/esm/config/Config.js +0 -349
- package/dist/esm/config/Config.js.map +0 -1
- package/dist/esm/config/ConfigHydrator.js +0 -158
- package/dist/esm/config/ConfigHydrator.js.map +0 -1
- package/dist/esm/config/raw/bits.js +0 -2612
- package/dist/esm/config/raw/bits.js.map +0 -1
- package/dist/esm/config/raw/cardSets.js +0 -546
- package/dist/esm/config/raw/cardSets.js.map +0 -1
- package/dist/esm/config/raw/groups.js +0 -1179
- package/dist/esm/config/raw/groups.js.map +0 -1
- package/dist/esm/config/raw/properties.js +0 -1003
- package/dist/esm/config/raw/properties.js.map +0 -1
- package/dist/esm/config/raw/resources.js +0 -100
- package/dist/esm/config/raw/resources.js.map +0 -1
- package/dist/esm/config/raw/tags.js +0 -45
- package/dist/esm/config/raw/tags.js.map +0 -1
- package/dist/esm/generated/build-info.js +0 -10
- package/dist/esm/generated/build-info.js.map +0 -1
- package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +0 -3163
- package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js.map +0 -1
- package/dist/esm/generated/parser/text/text-peggy-parser.js +0 -9654
- package/dist/esm/generated/parser/text/text-peggy-parser.js.map +0 -1
- package/dist/esm/generator/AstWalkerGenerator.js +0 -83
- package/dist/esm/generator/AstWalkerGenerator.js.map +0 -1
- package/dist/esm/generator/Generator.js +0 -2
- package/dist/esm/generator/Generator.js.map +0 -1
- package/dist/esm/generator/bitmark/BitmarkFileGenerator.js +0 -46
- package/dist/esm/generator/bitmark/BitmarkFileGenerator.js.map +0 -1
- package/dist/esm/generator/bitmark/BitmarkGenerator.js +0 -2598
- package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +0 -1
- package/dist/esm/generator/bitmark/BitmarkStringGenerator.js +0 -48
- package/dist/esm/generator/bitmark/BitmarkStringGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonFileGenerator.js +0 -50
- package/dist/esm/generator/json/JsonFileGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonGenerator.js +0 -1578
- package/dist/esm/generator/json/JsonGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonObjectGenerator.js +0 -48
- package/dist/esm/generator/json/JsonObjectGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonStringGenerator.js +0 -47
- package/dist/esm/generator/json/JsonStringGenerator.js.map +0 -1
- package/dist/esm/generator/text/TextGenerator.js +0 -1196
- package/dist/esm/generator/text/TextGenerator.js.map +0 -1
- package/dist/esm/index.js +0 -49
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/info/InfoBuilder.js +0 -40
- package/dist/esm/info/InfoBuilder.js.map +0 -1
- package/dist/esm/init/init.js +0 -13
- package/dist/esm/init/init.js.map +0 -1
- package/dist/esm/model/ast/BreakscapedString.js +0 -2
- package/dist/esm/model/ast/BreakscapedString.js.map +0 -1
- package/dist/esm/model/ast/NodeType.js +0 -554
- package/dist/esm/model/ast/NodeType.js.map +0 -1
- package/dist/esm/model/ast/Nodes.js +0 -2
- package/dist/esm/model/ast/Nodes.js.map +0 -1
- package/dist/esm/model/ast/StardardString.js +0 -2
- package/dist/esm/model/ast/StardardString.js.map +0 -1
- package/dist/esm/model/ast/TextNodes.js +0 -2
- package/dist/esm/model/ast/TextNodes.js.map +0 -1
- package/dist/esm/model/config/AbstractTagConfig.js +0 -15
- package/dist/esm/model/config/AbstractTagConfig.js.map +0 -1
- package/dist/esm/model/config/BitConfig.js +0 -69
- package/dist/esm/model/config/BitConfig.js.map +0 -1
- package/dist/esm/model/config/CardSetConfig.js +0 -23
- package/dist/esm/model/config/CardSetConfig.js.map +0 -1
- package/dist/esm/model/config/CardVariantConfig.js +0 -29
- package/dist/esm/model/config/CardVariantConfig.js.map +0 -1
- package/dist/esm/model/config/MarkupTagConfig.js +0 -38
- package/dist/esm/model/config/MarkupTagConfig.js.map +0 -1
- package/dist/esm/model/config/PropertyTagConfig.js +0 -47
- package/dist/esm/model/config/PropertyTagConfig.js.map +0 -1
- package/dist/esm/model/config/ResourceTagConfig.js +0 -39
- package/dist/esm/model/config/ResourceTagConfig.js.map +0 -1
- package/dist/esm/model/config/ResourcesConfig.js +0 -28
- package/dist/esm/model/config/ResourcesConfig.js.map +0 -1
- package/dist/esm/model/config/TagConfig.js +0 -2
- package/dist/esm/model/config/TagConfig.js.map +0 -1
- package/dist/esm/model/config/TagsConfig.js +0 -2
- package/dist/esm/model/config/TagsConfig.js.map +0 -1
- package/dist/esm/model/config/TagsConfigWithInfo.js +0 -2
- package/dist/esm/model/config/TagsConfigWithInfo.js.map +0 -1
- package/dist/esm/model/config/_Config.js +0 -2
- package/dist/esm/model/config/_Config.js.map +0 -1
- package/dist/esm/model/config/enum/CardSetConfigKey.js +0 -25
- package/dist/esm/model/config/enum/CardSetConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/ConfigKey.js +0 -26
- package/dist/esm/model/config/enum/ConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/GroupConfigKey.js +0 -53
- package/dist/esm/model/config/enum/GroupConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/GroupConfigType.js +0 -11
- package/dist/esm/model/config/enum/GroupConfigType.js.map +0 -1
- package/dist/esm/model/config/enum/PropertyConfigKey.js +0 -211
- package/dist/esm/model/config/enum/PropertyConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/ResourceConfigKey.js +0 -36
- package/dist/esm/model/config/enum/ResourceConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/TagConfigKey.js +0 -22
- package/dist/esm/model/config/enum/TagConfigKey.js.map +0 -1
- package/dist/esm/model/enum/BitTagType.js +0 -10
- package/dist/esm/model/enum/BitTagType.js.map +0 -1
- package/dist/esm/model/enum/BitType.js +0 -573
- package/dist/esm/model/enum/BitType.js.map +0 -1
- package/dist/esm/model/enum/BitmarkGeneratorOutput.js +0 -2
- package/dist/esm/model/enum/BitmarkGeneratorOutput.js.map +0 -1
- package/dist/esm/model/enum/BitmarkParserType.js +0 -6
- package/dist/esm/model/enum/BitmarkParserType.js.map +0 -1
- package/dist/esm/model/enum/BitmarkVersion.js +0 -8
- package/dist/esm/model/enum/BitmarkVersion.js.map +0 -1
- package/dist/esm/model/enum/BodyBitType.js +0 -11
- package/dist/esm/model/enum/BodyBitType.js.map +0 -1
- package/dist/esm/model/enum/BodyTextFormat.js +0 -11
- package/dist/esm/model/enum/BodyTextFormat.js.map +0 -1
- package/dist/esm/model/enum/CardSetVersion.js +0 -7
- package/dist/esm/model/enum/CardSetVersion.js.map +0 -1
- package/dist/esm/model/enum/Count.js +0 -6
- package/dist/esm/model/enum/Count.js.map +0 -1
- package/dist/esm/model/enum/DeprecatedTextFormat.js +0 -6
- package/dist/esm/model/enum/DeprecatedTextFormat.js.map +0 -1
- package/dist/esm/model/enum/ExampleType.js +0 -8
- package/dist/esm/model/enum/ExampleType.js.map +0 -1
- package/dist/esm/model/enum/PropertyAstKey.js +0 -15
- package/dist/esm/model/enum/PropertyAstKey.js.map +0 -1
- package/dist/esm/model/enum/PropertyFormat.js +0 -11
- package/dist/esm/model/enum/PropertyFormat.js.map +0 -1
- package/dist/esm/model/enum/PropertyJsonKey.js +0 -11
- package/dist/esm/model/enum/PropertyJsonKey.js.map +0 -1
- package/dist/esm/model/enum/PropertyTag.js +0 -5
- package/dist/esm/model/enum/PropertyTag.js.map +0 -1
- package/dist/esm/model/enum/ResourceJsonKey.js +0 -24
- package/dist/esm/model/enum/ResourceJsonKey.js.map +0 -1
- package/dist/esm/model/enum/ResourceTag.js +0 -34
- package/dist/esm/model/enum/ResourceTag.js.map +0 -1
- package/dist/esm/model/enum/Tag.js +0 -18
- package/dist/esm/model/enum/Tag.js.map +0 -1
- package/dist/esm/model/enum/TextFormat.js +0 -13
- package/dist/esm/model/enum/TextFormat.js.map +0 -1
- package/dist/esm/model/enum/TextLocation.js +0 -12
- package/dist/esm/model/enum/TextLocation.js.map +0 -1
- package/dist/esm/model/enum/TextMarkType.js +0 -51
- package/dist/esm/model/enum/TextMarkType.js.map +0 -1
- package/dist/esm/model/enum/TextNodeType.js +0 -32
- package/dist/esm/model/enum/TextNodeType.js.map +0 -1
- package/dist/esm/model/enum/TextSection.js +0 -15
- package/dist/esm/model/enum/TextSection.js.map +0 -1
- package/dist/esm/model/info/enum/InfoFormat.js +0 -8
- package/dist/esm/model/info/enum/InfoFormat.js.map +0 -1
- package/dist/esm/model/info/enum/InfoType.js +0 -9
- package/dist/esm/model/info/enum/InfoType.js.map +0 -1
- package/dist/esm/model/json/BitJson.js +0 -2
- package/dist/esm/model/json/BitJson.js.map +0 -1
- package/dist/esm/model/json/BitWrapperJson.js +0 -2
- package/dist/esm/model/json/BitWrapperJson.js.map +0 -1
- package/dist/esm/model/json/BodyBitJson.js +0 -2
- package/dist/esm/model/json/BodyBitJson.js.map +0 -1
- package/dist/esm/model/json/ParserJson.js +0 -2
- package/dist/esm/model/json/ParserJson.js.map +0 -1
- package/dist/esm/model/json/ResourceJson.js +0 -2
- package/dist/esm/model/json/ResourceJson.js.map +0 -1
- package/dist/esm/model/parser/ParserData.js +0 -2
- package/dist/esm/model/parser/ParserData.js.map +0 -1
- package/dist/esm/model/parser/ParserError.js +0 -2
- package/dist/esm/model/parser/ParserError.js.map +0 -1
- package/dist/esm/model/parser/ParserInfo.js +0 -2
- package/dist/esm/model/parser/ParserInfo.js.map +0 -1
- package/dist/esm/model/parser/ParserLocation.js +0 -2
- package/dist/esm/model/parser/ParserLocation.js.map +0 -1
- package/dist/esm/model/parser/ParserLocationRange.js +0 -2
- package/dist/esm/model/parser/ParserLocationRange.js.map +0 -1
- package/dist/esm/model/parser/TagValidationData.js +0 -2
- package/dist/esm/model/parser/TagValidationData.js.map +0 -1
- package/dist/esm/parser/bitmark/BitmarkParser.js +0 -22
- package/dist/esm/parser/bitmark/BitmarkParser.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js +0 -4
- package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +0 -611
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +0 -713
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js +0 -59
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +0 -742
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js +0 -79
- package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +0 -257
- package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +0 -48
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +0 -883
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +0 -25
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +0 -58
- package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +0 -61
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +0 -159
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +0 -52
- package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +0 -29
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +0 -57
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js +0 -14
- package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +0 -27
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +0 -18
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +0 -43
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +0 -42
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js +0 -9
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +0 -55
- package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +0 -156
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +0 -35
- package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +0 -22
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +0 -160
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +0 -25
- package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +0 -26
- package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +0 -50
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +0 -201
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +0 -22
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/json/JsonParser.js +0 -267
- package/dist/esm/parser/json/JsonParser.js.map +0 -1
- package/dist/esm/parser/text/TextParser.js +0 -145
- package/dist/esm/parser/text/TextParser.js.map +0 -1
- package/dist/esm/parser/text/peg/TextPegParser.js +0 -4
- package/dist/esm/parser/text/peg/TextPegParser.js.map +0 -1
- package/dist/esm/utils/ArrayUtils.js +0 -40
- package/dist/esm/utils/ArrayUtils.js.map +0 -1
- package/dist/esm/utils/BitUtils.js +0 -72
- package/dist/esm/utils/BitUtils.js.map +0 -1
- package/dist/esm/utils/BooleanUtils.js +0 -59
- package/dist/esm/utils/BooleanUtils.js.map +0 -1
- package/dist/esm/utils/FileUtils.js +0 -36
- package/dist/esm/utils/FileUtils.js.map +0 -1
- package/dist/esm/utils/NumberUtils.js +0 -59
- package/dist/esm/utils/NumberUtils.js.map +0 -1
- package/dist/esm/utils/ObjectUtils.js +0 -411
- package/dist/esm/utils/ObjectUtils.js.map +0 -1
- package/dist/esm/utils/StringUtils.js +0 -180
- package/dist/esm/utils/StringUtils.js.map +0 -1
- package/dist/esm/utils/UrlUtils.js +0 -34
- package/dist/esm/utils/UrlUtils.js.map +0 -1
- package/dist/esm/utils/env/Env.js +0 -127
- package/dist/esm/utils/env/Env.js.map +0 -1
- package/dist/esm/utils/env/Environment.js +0 -12
- package/dist/esm/utils/env/Environment.js.map +0 -1
- package/dist/esm/utils/env/Os.js +0 -11
- package/dist/esm/utils/env/Os.js.map +0 -1
- package/dist/esm/utils/env/Version.js +0 -9
- package/dist/esm/utils/env/Version.js.map +0 -1
- package/dist/esm/utils/env/userAgent.js +0 -86
- package/dist/esm/utils/env/userAgent.js.map +0 -1
- package/dist/esm/utils/polyfill/fs.js +0 -10
- package/dist/esm/utils/polyfill/fs.js.map +0 -1
- package/dist/types/BitmarkParserGenerator.d.ts +0 -478
- package/dist/types/BitmarkParserGenerator.d.ts.map +0 -1
- package/dist/types/ast/Ast.d.ts +0 -137
- package/dist/types/ast/Ast.d.ts.map +0 -1
- package/dist/types/ast/BaseBuilder.d.ts +0 -64
- package/dist/types/ast/BaseBuilder.d.ts.map +0 -1
- package/dist/types/ast/Builder.d.ts +0 -692
- package/dist/types/ast/Builder.d.ts.map +0 -1
- package/dist/types/ast/ResourceBuilder.d.ts +0 -384
- package/dist/types/ast/ResourceBuilder.d.ts.map +0 -1
- package/dist/types/ast/rules/NodeValidator.d.ts +0 -28
- package/dist/types/ast/rules/NodeValidator.d.ts.map +0 -1
- package/dist/types/ast/writer/FileWriter.d.ts +0 -37
- package/dist/types/ast/writer/FileWriter.d.ts.map +0 -1
- package/dist/types/ast/writer/StreamWriter.d.ts +0 -29
- package/dist/types/ast/writer/StreamWriter.d.ts.map +0 -1
- package/dist/types/ast/writer/StringWriter.d.ts +0 -30
- package/dist/types/ast/writer/StringWriter.d.ts.map +0 -1
- package/dist/types/ast/writer/Writer.d.ts +0 -72
- package/dist/types/ast/writer/Writer.d.ts.map +0 -1
- package/dist/types/breakscaping/Breakscape.d.ts +0 -44
- package/dist/types/breakscaping/Breakscape.d.ts.map +0 -1
- package/dist/types/breakscaping/BreakscapeLoop.d.ts +0 -142
- package/dist/types/breakscaping/BreakscapeLoop.d.ts.map +0 -1
- package/dist/types/breakscaping/BreakscapeOptions.d.ts +0 -30
- package/dist/types/breakscaping/BreakscapeOptions.d.ts.map +0 -1
- package/dist/types/breakscaping/BreakscapeRegex.d.ts +0 -96
- package/dist/types/breakscaping/BreakscapeRegex.d.ts.map +0 -1
- package/dist/types/breakscaping/RegexConfigs.d.ts +0 -35
- package/dist/types/breakscaping/RegexConfigs.d.ts.map +0 -1
- package/dist/types/config/Config.d.ts +0 -115
- package/dist/types/config/Config.d.ts.map +0 -1
- package/dist/types/config/ConfigHydrator.d.ts +0 -16
- package/dist/types/config/ConfigHydrator.d.ts.map +0 -1
- package/dist/types/config/raw/bits.d.ts +0 -4
- package/dist/types/config/raw/bits.d.ts.map +0 -1
- package/dist/types/config/raw/cardSets.d.ts +0 -4
- package/dist/types/config/raw/cardSets.d.ts.map +0 -1
- package/dist/types/config/raw/groups.d.ts +0 -4
- package/dist/types/config/raw/groups.d.ts.map +0 -1
- package/dist/types/config/raw/properties.d.ts +0 -4
- package/dist/types/config/raw/properties.d.ts.map +0 -1
- package/dist/types/config/raw/resources.d.ts +0 -4
- package/dist/types/config/raw/resources.d.ts.map +0 -1
- package/dist/types/config/raw/tags.d.ts +0 -4
- package/dist/types/config/raw/tags.d.ts.map +0 -1
- package/dist/types/generated/build-info.d.ts +0 -8
- package/dist/types/generated/build-info.d.ts.map +0 -1
- package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts +0 -12
- package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts.map +0 -1
- package/dist/types/generated/parser/text/text-peggy-parser.d.ts +0 -12
- package/dist/types/generated/parser/text/text-peggy-parser.d.ts.map +0 -1
- package/dist/types/generator/AstWalkerGenerator.d.ts +0 -32
- package/dist/types/generator/AstWalkerGenerator.d.ts.map +0 -1
- package/dist/types/generator/Generator.d.ts +0 -6
- package/dist/types/generator/Generator.d.ts.map +0 -1
- package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts +0 -41
- package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts.map +0 -1
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +0 -401
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +0 -1
- package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts +0 -31
- package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonFileGenerator.d.ts +0 -45
- package/dist/types/generator/json/JsonFileGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonGenerator.d.ts +0 -357
- package/dist/types/generator/json/JsonGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonObjectGenerator.d.ts +0 -32
- package/dist/types/generator/json/JsonObjectGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonStringGenerator.d.ts +0 -30
- package/dist/types/generator/json/JsonStringGenerator.d.ts.map +0 -1
- package/dist/types/generator/text/TextGenerator.d.ts +0 -228
- package/dist/types/generator/text/TextGenerator.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -50
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/info/InfoBuilder.d.ts +0 -18
- package/dist/types/info/InfoBuilder.d.ts.map +0 -1
- package/dist/types/init/init.d.ts +0 -4
- package/dist/types/init/init.d.ts.map +0 -1
- package/dist/types/model/ast/BreakscapedString.d.ts +0 -4
- package/dist/types/model/ast/BreakscapedString.d.ts.map +0 -1
- package/dist/types/model/ast/NodeType.d.ts +0 -1093
- package/dist/types/model/ast/NodeType.d.ts.map +0 -1
- package/dist/types/model/ast/Nodes.d.ts +0 -268
- package/dist/types/model/ast/Nodes.d.ts.map +0 -1
- package/dist/types/model/ast/StardardString.d.ts +0 -4
- package/dist/types/model/ast/StardardString.d.ts.map +0 -1
- package/dist/types/model/ast/TextNodes.d.ts +0 -130
- package/dist/types/model/ast/TextNodes.d.ts.map +0 -1
- package/dist/types/model/config/AbstractTagConfig.d.ts +0 -24
- package/dist/types/model/config/AbstractTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/BitConfig.d.ts +0 -48
- package/dist/types/model/config/BitConfig.d.ts.map +0 -1
- package/dist/types/model/config/CardSetConfig.d.ts +0 -14
- package/dist/types/model/config/CardSetConfig.d.ts.map +0 -1
- package/dist/types/model/config/CardVariantConfig.d.ts +0 -16
- package/dist/types/model/config/CardVariantConfig.d.ts.map +0 -1
- package/dist/types/model/config/MarkupTagConfig.d.ts +0 -17
- package/dist/types/model/config/MarkupTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/PropertyTagConfig.d.ts +0 -23
- package/dist/types/model/config/PropertyTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/ResourceTagConfig.d.ts +0 -18
- package/dist/types/model/config/ResourceTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/ResourcesConfig.d.ts +0 -14
- package/dist/types/model/config/ResourcesConfig.d.ts.map +0 -1
- package/dist/types/model/config/TagConfig.d.ts +0 -5
- package/dist/types/model/config/TagConfig.d.ts.map +0 -1
- package/dist/types/model/config/TagsConfig.d.ts +0 -5
- package/dist/types/model/config/TagsConfig.d.ts.map +0 -1
- package/dist/types/model/config/TagsConfigWithInfo.d.ts +0 -9
- package/dist/types/model/config/TagsConfigWithInfo.d.ts.map +0 -1
- package/dist/types/model/config/_Config.d.ts +0 -119
- package/dist/types/model/config/_Config.d.ts.map +0 -1
- package/dist/types/model/config/enum/CardSetConfigKey.d.ts +0 -43
- package/dist/types/model/config/enum/CardSetConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/ConfigKey.d.ts +0 -578
- package/dist/types/model/config/enum/ConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/GroupConfigKey.d.ts +0 -144
- package/dist/types/model/config/enum/GroupConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/GroupConfigType.d.ts +0 -16
- package/dist/types/model/config/enum/GroupConfigType.d.ts.map +0 -1
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts +0 -618
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/ResourceConfigKey.d.ts +0 -87
- package/dist/types/model/config/enum/ResourceConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/TagConfigKey.d.ts +0 -51
- package/dist/types/model/config/enum/TagConfigKey.d.ts.map +0 -1
- package/dist/types/model/enum/BitTagType.d.ts +0 -15
- package/dist/types/model/enum/BitTagType.d.ts.map +0 -1
- package/dist/types/model/enum/BitType.d.ts +0 -1143
- package/dist/types/model/enum/BitType.d.ts.map +0 -1
- package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts +0 -1
- package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts.map +0 -1
- package/dist/types/model/enum/BitmarkParserType.d.ts +0 -7
- package/dist/types/model/enum/BitmarkParserType.d.ts.map +0 -1
- package/dist/types/model/enum/BitmarkVersion.d.ts +0 -12
- package/dist/types/model/enum/BitmarkVersion.d.ts.map +0 -1
- package/dist/types/model/enum/BodyBitType.d.ts +0 -25
- package/dist/types/model/enum/BodyBitType.d.ts.map +0 -1
- package/dist/types/model/enum/BodyTextFormat.d.ts +0 -17
- package/dist/types/model/enum/BodyTextFormat.d.ts.map +0 -1
- package/dist/types/model/enum/CardSetVersion.d.ts +0 -11
- package/dist/types/model/enum/CardSetVersion.d.ts.map +0 -1
- package/dist/types/model/enum/Count.d.ts +0 -7
- package/dist/types/model/enum/Count.d.ts.map +0 -1
- package/dist/types/model/enum/DeprecatedTextFormat.d.ts +0 -7
- package/dist/types/model/enum/DeprecatedTextFormat.d.ts.map +0 -1
- package/dist/types/model/enum/ExampleType.d.ts +0 -13
- package/dist/types/model/enum/ExampleType.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyAstKey.d.ts +0 -22
- package/dist/types/model/enum/PropertyAstKey.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyFormat.d.ts +0 -19
- package/dist/types/model/enum/PropertyFormat.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyJsonKey.d.ts +0 -10
- package/dist/types/model/enum/PropertyJsonKey.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyTag.d.ts +0 -419
- package/dist/types/model/enum/PropertyTag.d.ts.map +0 -1
- package/dist/types/model/enum/ResourceJsonKey.d.ts +0 -45
- package/dist/types/model/enum/ResourceJsonKey.d.ts.map +0 -1
- package/dist/types/model/enum/ResourceTag.d.ts +0 -63
- package/dist/types/model/enum/ResourceTag.d.ts.map +0 -1
- package/dist/types/model/enum/Tag.d.ts +0 -33
- package/dist/types/model/enum/Tag.d.ts.map +0 -1
- package/dist/types/model/enum/TextFormat.d.ts +0 -17
- package/dist/types/model/enum/TextFormat.d.ts.map +0 -1
- package/dist/types/model/enum/TextLocation.d.ts +0 -16
- package/dist/types/model/enum/TextLocation.d.ts.map +0 -1
- package/dist/types/model/enum/TextMarkType.d.ts +0 -93
- package/dist/types/model/enum/TextMarkType.d.ts.map +0 -1
- package/dist/types/model/enum/TextNodeType.d.ts +0 -53
- package/dist/types/model/enum/TextNodeType.d.ts.map +0 -1
- package/dist/types/model/enum/TextSection.d.ts +0 -27
- package/dist/types/model/enum/TextSection.d.ts.map +0 -1
- package/dist/types/model/info/enum/InfoFormat.d.ts +0 -13
- package/dist/types/model/info/enum/InfoFormat.d.ts.map +0 -1
- package/dist/types/model/info/enum/InfoType.d.ts +0 -15
- package/dist/types/model/info/enum/InfoType.d.ts.map +0 -1
- package/dist/types/model/json/BitJson.d.ts +0 -479
- package/dist/types/model/json/BitJson.d.ts.map +0 -1
- package/dist/types/model/json/BitWrapperJson.d.ts +0 -8
- package/dist/types/model/json/BitWrapperJson.d.ts.map +0 -1
- package/dist/types/model/json/BodyBitJson.d.ts +0 -81
- package/dist/types/model/json/BodyBitJson.d.ts.map +0 -1
- package/dist/types/model/json/ParserJson.d.ts +0 -12
- package/dist/types/model/json/ParserJson.d.ts.map +0 -1
- package/dist/types/model/json/ResourceJson.d.ts +0 -244
- package/dist/types/model/json/ResourceJson.d.ts.map +0 -1
- package/dist/types/model/parser/ParserData.d.ts +0 -11
- package/dist/types/model/parser/ParserData.d.ts.map +0 -1
- package/dist/types/model/parser/ParserError.d.ts +0 -17
- package/dist/types/model/parser/ParserError.d.ts.map +0 -1
- package/dist/types/model/parser/ParserInfo.d.ts +0 -10
- package/dist/types/model/parser/ParserInfo.d.ts.map +0 -1
- package/dist/types/model/parser/ParserLocation.d.ts +0 -6
- package/dist/types/model/parser/ParserLocation.d.ts.map +0 -1
- package/dist/types/model/parser/ParserLocationRange.d.ts +0 -10
- package/dist/types/model/parser/ParserLocationRange.d.ts.map +0 -1
- package/dist/types/model/parser/TagValidationData.d.ts +0 -24
- package/dist/types/model/parser/TagValidationData.d.ts.map +0 -1
- package/dist/types/parser/bitmark/BitmarkParser.d.ts +0 -21
- package/dist/types/parser/bitmark/BitmarkParser.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts +0 -8
- package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts +0 -108
- package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +0 -137
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +0 -333
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +0 -186
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts +0 -61
- package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts +0 -37
- package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts +0 -7
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts +0 -15
- package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts +0 -14
- package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts +0 -6
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts +0 -6
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +0 -14
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +0 -11
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +0 -6
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/json/JsonParser.d.ts +0 -59
- package/dist/types/parser/json/JsonParser.d.ts.map +0 -1
- package/dist/types/parser/text/TextParser.d.ts +0 -55
- package/dist/types/parser/text/TextParser.d.ts.map +0 -1
- package/dist/types/parser/text/peg/TextPegParser.d.ts +0 -8
- package/dist/types/parser/text/peg/TextPegParser.d.ts.map +0 -1
- package/dist/types/utils/ArrayUtils.d.ts +0 -25
- package/dist/types/utils/ArrayUtils.d.ts.map +0 -1
- package/dist/types/utils/BitUtils.d.ts +0 -30
- package/dist/types/utils/BitUtils.d.ts.map +0 -1
- package/dist/types/utils/BooleanUtils.d.ts +0 -30
- package/dist/types/utils/BooleanUtils.d.ts.map +0 -1
- package/dist/types/utils/FileUtils.d.ts +0 -12
- package/dist/types/utils/FileUtils.d.ts.map +0 -1
- package/dist/types/utils/NumberUtils.d.ts +0 -47
- package/dist/types/utils/NumberUtils.d.ts.map +0 -1
- package/dist/types/utils/ObjectUtils.d.ts +0 -197
- package/dist/types/utils/ObjectUtils.d.ts.map +0 -1
- package/dist/types/utils/StringUtils.d.ts +0 -77
- package/dist/types/utils/StringUtils.d.ts.map +0 -1
- package/dist/types/utils/UrlUtils.d.ts +0 -7
- package/dist/types/utils/UrlUtils.d.ts.map +0 -1
- package/dist/types/utils/env/Env.d.ts +0 -39
- package/dist/types/utils/env/Env.d.ts.map +0 -1
- package/dist/types/utils/env/Environment.d.ts +0 -21
- package/dist/types/utils/env/Environment.d.ts.map +0 -1
- package/dist/types/utils/env/Os.d.ts +0 -19
- package/dist/types/utils/env/Os.d.ts.map +0 -1
- package/dist/types/utils/env/Version.d.ts +0 -10
- package/dist/types/utils/env/Version.d.ts.map +0 -1
- package/dist/types/utils/env/userAgent.d.ts +0 -11
- package/dist/types/utils/env/userAgent.d.ts.map +0 -1
- package/dist/types/utils/polyfill/fs.d.ts +0 -6
- package/dist/types/utils/polyfill/fs.d.ts.map +0 -1
|
@@ -1,883 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { Breakscape } from '../../../../breakscaping/Breakscape';
|
|
13
|
-
import { Config } from '../../../../config/Config';
|
|
14
|
-
import { CardSetConfigKey } from '../../../../model/config/enum/CardSetConfigKey';
|
|
15
|
-
import { BitType } from '../../../../model/enum/BitType';
|
|
16
|
-
import { BodyBitType } from '../../../../model/enum/BodyBitType';
|
|
17
|
-
import { ResourceTag } from '../../../../model/enum/ResourceTag';
|
|
18
|
-
import { NumberUtils } from '../../../../utils/NumberUtils';
|
|
19
|
-
import { BitmarkPegParserValidator } from '../BitmarkPegParserValidator';
|
|
20
|
-
import { BitContentLevel, } from '../BitmarkPegParserTypes';
|
|
21
|
-
function buildCards(context, bitType, textFormat, parsedCardSet, statementV1, statementsV1, choicesV1, responsesV1) {
|
|
22
|
-
var _a;
|
|
23
|
-
const { bitConfig } = context;
|
|
24
|
-
if (context.DEBUG_CARD_SET)
|
|
25
|
-
context.debugPrint('card set', parsedCardSet);
|
|
26
|
-
let result = {};
|
|
27
|
-
// Process the card contents
|
|
28
|
-
const processedCardSet = processCardSet(context, parsedCardSet);
|
|
29
|
-
// Parse the card contents according to the card set type
|
|
30
|
-
// Get the bit metadata to check how to parse the card set
|
|
31
|
-
const cardSetType = (_a = bitConfig.cardSet) === null || _a === void 0 ? void 0 : _a.configKey;
|
|
32
|
-
switch (cardSetType) {
|
|
33
|
-
case CardSetConfigKey._flashcard:
|
|
34
|
-
case CardSetConfigKey._definitionList:
|
|
35
|
-
result = parseFlashcardOrDefinitionList(context, bitType, processedCardSet);
|
|
36
|
-
break;
|
|
37
|
-
case CardSetConfigKey._elements:
|
|
38
|
-
result = parseElements(context, bitType, processedCardSet);
|
|
39
|
-
break;
|
|
40
|
-
case CardSetConfigKey._statements:
|
|
41
|
-
result = parseStatements(context, bitType, processedCardSet, statementV1, statementsV1);
|
|
42
|
-
break;
|
|
43
|
-
case CardSetConfigKey._feedback:
|
|
44
|
-
result = parseFeedback(context, bitType, processedCardSet);
|
|
45
|
-
break;
|
|
46
|
-
case CardSetConfigKey._quiz:
|
|
47
|
-
result = parseQuiz(context, bitType, processedCardSet, choicesV1, responsesV1);
|
|
48
|
-
break;
|
|
49
|
-
case CardSetConfigKey._questions:
|
|
50
|
-
result = parseQuestions(context, bitType, processedCardSet);
|
|
51
|
-
break;
|
|
52
|
-
case CardSetConfigKey._matchPairs:
|
|
53
|
-
// ==> heading / pairs
|
|
54
|
-
result = parseMatchPairs(context, bitType, processedCardSet);
|
|
55
|
-
break;
|
|
56
|
-
case CardSetConfigKey._matchMatrix:
|
|
57
|
-
// ==> heading / matrix
|
|
58
|
-
result = parseMatchMatrix(context, bitType, processedCardSet);
|
|
59
|
-
break;
|
|
60
|
-
case CardSetConfigKey._pronunciationTable:
|
|
61
|
-
result = parsePronunciationTable(context, bitType, processedCardSet);
|
|
62
|
-
break;
|
|
63
|
-
case CardSetConfigKey._table:
|
|
64
|
-
// ==> heading / table
|
|
65
|
-
result = parseTable(context, bitType, processedCardSet);
|
|
66
|
-
break;
|
|
67
|
-
case CardSetConfigKey._botActionResponses:
|
|
68
|
-
result = parseBotActionResponses(context, bitType, processedCardSet);
|
|
69
|
-
break;
|
|
70
|
-
case CardSetConfigKey._ingredients:
|
|
71
|
-
result = parseIngredients(context, bitType, processedCardSet);
|
|
72
|
-
break;
|
|
73
|
-
case CardSetConfigKey._clozeList:
|
|
74
|
-
case CardSetConfigKey._exampleBitList:
|
|
75
|
-
case CardSetConfigKey._bookReferenceList:
|
|
76
|
-
result = parseCardBits(context, bitType, textFormat, processedCardSet);
|
|
77
|
-
break;
|
|
78
|
-
// DEPRECATED - REMOVE IN THE FUTURE
|
|
79
|
-
// case CardSetConfigKey._captionDefinitionsList:
|
|
80
|
-
// // ==> captionDefinitionsList
|
|
81
|
-
// result = parseCaptionDefinitionsList(context, bitType, processedCardSet);
|
|
82
|
-
// break;
|
|
83
|
-
default:
|
|
84
|
-
// Return default empty object
|
|
85
|
-
}
|
|
86
|
-
// Add the internal comments
|
|
87
|
-
result.internalComments =
|
|
88
|
-
processedCardSet.internalComments.length > 0 ? processedCardSet.internalComments : undefined;
|
|
89
|
-
return result;
|
|
90
|
-
}
|
|
91
|
-
function processCardSet(context, parsedCardSet) {
|
|
92
|
-
var _a;
|
|
93
|
-
const processedCardSet = {
|
|
94
|
-
cards: [],
|
|
95
|
-
internalComments: [],
|
|
96
|
-
};
|
|
97
|
-
// Early return if no card set
|
|
98
|
-
if (!parsedCardSet)
|
|
99
|
-
return processedCardSet;
|
|
100
|
-
const { bitType } = context;
|
|
101
|
-
// Process the card contents
|
|
102
|
-
let cardNo = 0;
|
|
103
|
-
let sideNo = 0;
|
|
104
|
-
let variantNo = 0;
|
|
105
|
-
for (const card of parsedCardSet.cards) {
|
|
106
|
-
const processedCard = {
|
|
107
|
-
no: cardNo++,
|
|
108
|
-
sides: [],
|
|
109
|
-
};
|
|
110
|
-
processedCardSet.cards.push(processedCard);
|
|
111
|
-
for (const side of card.sides) {
|
|
112
|
-
const processedSide = {
|
|
113
|
-
no: sideNo++,
|
|
114
|
-
variants: [],
|
|
115
|
-
};
|
|
116
|
-
processedCard.sides.push(processedSide);
|
|
117
|
-
for (const variant of side.variants) {
|
|
118
|
-
const { parser, content } = variant;
|
|
119
|
-
const processedVariant = {
|
|
120
|
-
parser,
|
|
121
|
-
no: variantNo++,
|
|
122
|
-
};
|
|
123
|
-
processedSide.variants.push(processedVariant);
|
|
124
|
-
const tagsConfig = Config.getTagsConfigForCardSet(bitType, sideNo, variantNo);
|
|
125
|
-
const tags = context.bitContentProcessor(BitContentLevel.Card, tagsConfig, content);
|
|
126
|
-
if (context.DEBUG_CARD_TAGS)
|
|
127
|
-
context.debugPrint('card tags', tags);
|
|
128
|
-
// Validate the cardBody
|
|
129
|
-
tags.cardBody = BitmarkPegParserValidator.checkCardBody(context, BitContentLevel.Card, bitType, tags.cardBody, processedCard.no, processedSide.no, processedVariant.no);
|
|
130
|
-
// Reduce the card body parts to a breakscaped string
|
|
131
|
-
tags.cardBodyStr = (_a = tags.cardBody) === null || _a === void 0 ? void 0 : _a.bodyString;
|
|
132
|
-
processedVariant.data = tags;
|
|
133
|
-
// Add any internal comments
|
|
134
|
-
if (tags.internalComments)
|
|
135
|
-
processedCardSet.internalComments.push(...tags.internalComments);
|
|
136
|
-
}
|
|
137
|
-
variantNo = 0;
|
|
138
|
-
}
|
|
139
|
-
sideNo = 0;
|
|
140
|
-
}
|
|
141
|
-
return processedCardSet;
|
|
142
|
-
}
|
|
143
|
-
function parseFlashcardOrDefinitionList(context, bitType, cardSet) {
|
|
144
|
-
var _a;
|
|
145
|
-
const flashcards = [];
|
|
146
|
-
const definitions = [];
|
|
147
|
-
let questionStr = '';
|
|
148
|
-
let question;
|
|
149
|
-
let answer;
|
|
150
|
-
let alternativeAnswers = [];
|
|
151
|
-
let variantIndex = 0;
|
|
152
|
-
let extraTags = {};
|
|
153
|
-
let questionVariant;
|
|
154
|
-
const onlyOneCardAllowed = bitType === BitType.flashcard1;
|
|
155
|
-
// Extract the heading card if it exists
|
|
156
|
-
const headingData = extractHeadingCard(cardSet);
|
|
157
|
-
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
158
|
-
const card = cardSet.cards[cardIdx];
|
|
159
|
-
// Skip the headings card if it exists
|
|
160
|
-
if (headingData && cardIdx === 0)
|
|
161
|
-
continue;
|
|
162
|
-
// Reset the question and answers
|
|
163
|
-
question = undefined;
|
|
164
|
-
answer = undefined;
|
|
165
|
-
alternativeAnswers = [];
|
|
166
|
-
variantIndex = 0;
|
|
167
|
-
extraTags = {};
|
|
168
|
-
for (const side of card.sides) {
|
|
169
|
-
for (const content of side.variants) {
|
|
170
|
-
const _b = content.data, { cardBody, resources } = _b, tags = __rest(_b, ["cardBody", "resources"]);
|
|
171
|
-
extraTags = Object.assign(Object.assign({}, extraTags), tags);
|
|
172
|
-
const icon = resources && resources.length > 0 ? resources[0] : undefined;
|
|
173
|
-
const text = cardBody === null || cardBody === void 0 ? void 0 : cardBody.body;
|
|
174
|
-
const str = (_a = cardBody === null || cardBody === void 0 ? void 0 : cardBody.bodyString) !== null && _a !== void 0 ? _a : '';
|
|
175
|
-
if (variantIndex === 0) {
|
|
176
|
-
questionVariant = content;
|
|
177
|
-
questionStr = str;
|
|
178
|
-
question = {
|
|
179
|
-
text,
|
|
180
|
-
icon,
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
else if (variantIndex === 1) {
|
|
184
|
-
answer = {
|
|
185
|
-
text,
|
|
186
|
-
icon,
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
alternativeAnswers.push({
|
|
191
|
-
text,
|
|
192
|
-
icon: icon,
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
variantIndex++;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
// Add the flashcard
|
|
199
|
-
if (cardIdx === 0 || !onlyOneCardAllowed) {
|
|
200
|
-
if (Config.isOfBitType(bitType, [BitType.flashcard])) {
|
|
201
|
-
// .flashcard
|
|
202
|
-
// if (question) {
|
|
203
|
-
const fc = Object.assign({ question: question, answer: answer, alternativeAnswers: alternativeAnswers }, extraTags);
|
|
204
|
-
if (fc)
|
|
205
|
-
flashcards.push(fc);
|
|
206
|
-
// } else {
|
|
207
|
-
// context.addWarning('Ignoring card with empty question', questionVariant);
|
|
208
|
-
// }
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
// .definition-list, etc
|
|
212
|
-
const dl = Object.assign({ term: question, definition: answer, alternativeDefinitions: alternativeAnswers }, extraTags);
|
|
213
|
-
if (dl)
|
|
214
|
-
definitions.push(dl);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
// Only one card allowed, add a warning and ignore the card
|
|
219
|
-
context.addWarning(`Bit '${bitType}' should only contain one card. Ignore subsequent card: '${questionStr}'`, questionVariant);
|
|
220
|
-
break;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
return {
|
|
224
|
-
heading: headingData === null || headingData === void 0 ? void 0 : headingData.heading,
|
|
225
|
-
flashcards: flashcards.length > 0 ? flashcards : undefined,
|
|
226
|
-
definitions: definitions.length > 0 ? definitions : undefined,
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
function parseElements(_context, _bitType, cardSet) {
|
|
230
|
-
var _a;
|
|
231
|
-
const elements = [];
|
|
232
|
-
for (const card of cardSet.cards) {
|
|
233
|
-
for (const side of card.sides) {
|
|
234
|
-
for (const content of side.variants) {
|
|
235
|
-
const tags = content.data;
|
|
236
|
-
// if (tags.cardBody) {
|
|
237
|
-
elements.push((_a = tags.cardBodyStr) !== null && _a !== void 0 ? _a : '');
|
|
238
|
-
// } else {
|
|
239
|
-
// context.addWarning('Ignoring card with empty element', content);
|
|
240
|
-
// }
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
return {
|
|
245
|
-
elements: elements.length > 0 ? elements : undefined,
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
function parseStatements(_context, _bitType, cardSet, statementV1, statementsV1) {
|
|
249
|
-
var _a;
|
|
250
|
-
const statements = [];
|
|
251
|
-
for (const card of cardSet.cards) {
|
|
252
|
-
for (const side of card.sides) {
|
|
253
|
-
for (const content of side.variants) {
|
|
254
|
-
const _b = content.data, { statements: chainedStatements, statement: _ignore } = _b, tags = __rest(_b, ["statements", "statement"]);
|
|
255
|
-
// Remove statement from rest, tags
|
|
256
|
-
_ignore;
|
|
257
|
-
// Re-build the statement, adding any tags that were not in the True/False chain
|
|
258
|
-
// These tags are actually not in the correct place, but we can still interpret them and fix the data.
|
|
259
|
-
// As .true-false only has one statement per card, we can just add the extra tags to the statement.
|
|
260
|
-
if (Array.isArray(chainedStatements)) {
|
|
261
|
-
for (const s of chainedStatements) {
|
|
262
|
-
// if (s.text) {
|
|
263
|
-
const statement = Object.assign({ statement: (_a = s.statement) !== null && _a !== void 0 ? _a : '', isCorrect: s.isCorrect, item: s.item, lead: s.lead, hint: s.hint, instruction: s.instruction, example: s.example }, tags);
|
|
264
|
-
if (statement)
|
|
265
|
-
statements.push(statement);
|
|
266
|
-
// } else {
|
|
267
|
-
// context.addWarning('Ignoring card with empty statement', content);
|
|
268
|
-
// }
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
// Add the V1 statement to the end of the statements array to improve backwards compatibility
|
|
275
|
-
if (statementV1) {
|
|
276
|
-
statements.push(statementV1);
|
|
277
|
-
}
|
|
278
|
-
// Add the V1 statements to the end of the statements array to improve backwards compatibility
|
|
279
|
-
if (Array.isArray(statementsV1) && statementsV1.length > 0) {
|
|
280
|
-
statements.push(...statementsV1);
|
|
281
|
-
}
|
|
282
|
-
return {
|
|
283
|
-
statements: statements.length > 0 ? statements : undefined,
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
function parseFeedback(_context, _bitType, cardSet) {
|
|
287
|
-
let feedback;
|
|
288
|
-
const feedbacks = [];
|
|
289
|
-
// Extract the heading card if it exists
|
|
290
|
-
const headingData = extractHeadingCard(cardSet);
|
|
291
|
-
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
292
|
-
const card = cardSet.cards[cardIdx];
|
|
293
|
-
// Skip the headings card if it exists
|
|
294
|
-
if (headingData && cardIdx === 0)
|
|
295
|
-
continue;
|
|
296
|
-
feedback = undefined;
|
|
297
|
-
for (let sideIdx = 0; sideIdx < card.sides.length; sideIdx++) {
|
|
298
|
-
const side = card.sides[sideIdx];
|
|
299
|
-
for (const content of side.variants) {
|
|
300
|
-
const tags = content.data;
|
|
301
|
-
const { cardBody, cardBodyStr, choices: choiceTags } = tags, restTags = __rest(tags, ["cardBody", "cardBodyStr", "choices"]);
|
|
302
|
-
if (sideIdx === 0) {
|
|
303
|
-
// First side (feedback choices)
|
|
304
|
-
const choices = [];
|
|
305
|
-
if (choiceTags && choiceTags.length > 0) {
|
|
306
|
-
for (const tf of choiceTags) {
|
|
307
|
-
const { __isDefaultExample, example } = tf, tfTags = __rest(tf, ["__isDefaultExample", "example"]);
|
|
308
|
-
const choice = {
|
|
309
|
-
choice: tfTags.choice,
|
|
310
|
-
requireReason: tfTags.isCorrect,
|
|
311
|
-
__isDefaultExample,
|
|
312
|
-
example,
|
|
313
|
-
};
|
|
314
|
-
choices.push(choice);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
// if (tags.choices || tags.responses) {
|
|
318
|
-
feedback = Object.assign(Object.assign({}, tags), { choices: choices });
|
|
319
|
-
if (feedback)
|
|
320
|
-
feedbacks.push(feedback);
|
|
321
|
-
}
|
|
322
|
-
else if (sideIdx === 1) {
|
|
323
|
-
// Second side (feedback reason)
|
|
324
|
-
const reason = Object.assign({ text: cardBodyStr !== null && cardBodyStr !== void 0 ? cardBodyStr : '', __textAst: cardBody === null || cardBody === void 0 ? void 0 : cardBody.body }, restTags);
|
|
325
|
-
if (feedback) {
|
|
326
|
-
feedback.reason = reason;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
return {
|
|
333
|
-
heading: headingData === null || headingData === void 0 ? void 0 : headingData.heading,
|
|
334
|
-
feedbacks: feedbacks.length > 0 ? feedbacks : undefined,
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
function parseQuiz(_context, bitType, cardSet, choicesV1, responsesV1) {
|
|
338
|
-
const quizzes = [];
|
|
339
|
-
const insertChoices = Config.isOfBitType(bitType, BitType.multipleChoice);
|
|
340
|
-
const insertResponses = Config.isOfBitType(bitType, BitType.multipleResponse);
|
|
341
|
-
if (!insertChoices && !insertResponses)
|
|
342
|
-
return {};
|
|
343
|
-
let isDefaultExampleCard = false;
|
|
344
|
-
let exampleCard;
|
|
345
|
-
for (const card of cardSet.cards) {
|
|
346
|
-
isDefaultExampleCard = false;
|
|
347
|
-
exampleCard = undefined;
|
|
348
|
-
for (const side of card.sides) {
|
|
349
|
-
for (const content of side.variants) {
|
|
350
|
-
const _a = content.data, { __isDefaultExample, example } = _a, tags = __rest(_a, ["__isDefaultExample", "example"]);
|
|
351
|
-
// Example
|
|
352
|
-
isDefaultExampleCard = __isDefaultExample === true ? true : isDefaultExampleCard;
|
|
353
|
-
exampleCard = example ? example : exampleCard;
|
|
354
|
-
// Insert choices / responses
|
|
355
|
-
if (tags.trueFalse && tags.trueFalse.length > 0) {
|
|
356
|
-
const responsesOrChoices = [];
|
|
357
|
-
for (const tf of tags.trueFalse) {
|
|
358
|
-
const { __isDefaultExample: isDefaultExampleTf, example: exampleTf } = tf, tfTags = __rest(tf, ["__isDefaultExample", "example"]);
|
|
359
|
-
const __isDefaultExample = isDefaultExampleTf || isDefaultExampleCard;
|
|
360
|
-
const example = exampleTf || exampleCard;
|
|
361
|
-
const response = {
|
|
362
|
-
isCorrect: tfTags.isCorrect,
|
|
363
|
-
__isDefaultExample,
|
|
364
|
-
example,
|
|
365
|
-
};
|
|
366
|
-
if (insertResponses)
|
|
367
|
-
response.response = tfTags.text;
|
|
368
|
-
else
|
|
369
|
-
response.choice = tfTags.text;
|
|
370
|
-
if (response)
|
|
371
|
-
responsesOrChoices.push(response);
|
|
372
|
-
}
|
|
373
|
-
if (insertResponses)
|
|
374
|
-
tags.responses = responsesOrChoices;
|
|
375
|
-
else
|
|
376
|
-
tags.choices = responsesOrChoices;
|
|
377
|
-
}
|
|
378
|
-
// if (tags.choices || tags.responses) {
|
|
379
|
-
const quiz = Object.assign(Object.assign({}, tags), { choices: tags.choices, responses: tags.responses, __isDefaultExample: isDefaultExampleCard, __defaultExample: exampleCard });
|
|
380
|
-
if (quiz)
|
|
381
|
-
quizzes.push(quiz);
|
|
382
|
-
// } else {
|
|
383
|
-
// context.addWarning('Ignoring card with empty quiz', content);
|
|
384
|
-
// }
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
// Add a quiz for the V1 choices / responses
|
|
389
|
-
if (insertChoices && Array.isArray(choicesV1) && choicesV1.length > 0) {
|
|
390
|
-
const quiz = {
|
|
391
|
-
choices: choicesV1,
|
|
392
|
-
};
|
|
393
|
-
if (quiz)
|
|
394
|
-
quizzes.push(quiz);
|
|
395
|
-
}
|
|
396
|
-
if (insertResponses && Array.isArray(responsesV1) && responsesV1.length > 0) {
|
|
397
|
-
const quiz = {
|
|
398
|
-
responses: responsesV1,
|
|
399
|
-
};
|
|
400
|
-
if (quiz)
|
|
401
|
-
quizzes.push(quiz);
|
|
402
|
-
}
|
|
403
|
-
return {
|
|
404
|
-
quizzes: quizzes.length > 0 ? quizzes : undefined,
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
|
-
function parseQuestions(_context, _bitType, cardSet) {
|
|
408
|
-
var _a;
|
|
409
|
-
const questions = [];
|
|
410
|
-
for (const card of cardSet.cards) {
|
|
411
|
-
for (const side of card.sides) {
|
|
412
|
-
for (const content of side.variants) {
|
|
413
|
-
const tags = content.data;
|
|
414
|
-
// if (tags.cardBody) {
|
|
415
|
-
const q = Object.assign({ question: (_a = tags.cardBodyStr) !== null && _a !== void 0 ? _a : '' }, tags);
|
|
416
|
-
if (q)
|
|
417
|
-
questions.push(q);
|
|
418
|
-
// }
|
|
419
|
-
// else {
|
|
420
|
-
// context.addWarning('Ignoring card with empty body text', content);
|
|
421
|
-
// }
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
return {
|
|
426
|
-
questions: questions.length > 0 ? questions : undefined,
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
function parseMatchPairs(_context, bitType, cardSet) {
|
|
430
|
-
var _a;
|
|
431
|
-
const pairs = [];
|
|
432
|
-
let pairKey = undefined;
|
|
433
|
-
let pairValues = [];
|
|
434
|
-
let _pairValuesAst = [];
|
|
435
|
-
let keyAudio = undefined;
|
|
436
|
-
let keyImage = undefined;
|
|
437
|
-
let extraTags = {};
|
|
438
|
-
let isDefaultExampleCard = false;
|
|
439
|
-
let exampleCard;
|
|
440
|
-
// let variant: ProcessedCardVariant | undefined;
|
|
441
|
-
// Extract the heading card if it exists
|
|
442
|
-
const headingValuesIsArray = Config.isOfBitType(bitType, BitType.matchMatrix);
|
|
443
|
-
const headingData = extractHeadingCard(cardSet, headingValuesIsArray);
|
|
444
|
-
const isDefaultExampleCardSet = (_a = headingData === null || headingData === void 0 ? void 0 : headingData.isDefaultExampleCardSet) !== null && _a !== void 0 ? _a : false;
|
|
445
|
-
let exampleCardSet = headingData === null || headingData === void 0 ? void 0 : headingData.exampleCardSet;
|
|
446
|
-
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
447
|
-
const card = cardSet.cards[cardIdx];
|
|
448
|
-
// Skip the headings card if it exists
|
|
449
|
-
if (headingData && cardIdx === 0)
|
|
450
|
-
continue;
|
|
451
|
-
pairKey = undefined;
|
|
452
|
-
pairValues = [];
|
|
453
|
-
_pairValuesAst = [];
|
|
454
|
-
keyAudio = undefined;
|
|
455
|
-
keyImage = undefined;
|
|
456
|
-
extraTags = {};
|
|
457
|
-
isDefaultExampleCard = false;
|
|
458
|
-
exampleCard = undefined;
|
|
459
|
-
for (let sideIdx = 0; sideIdx < card.sides.length; sideIdx++) {
|
|
460
|
-
const side = card.sides[sideIdx];
|
|
461
|
-
for (const content of side.variants) {
|
|
462
|
-
// variant = content;
|
|
463
|
-
const _b = content.data, { cardBody, cardBodyStr, resources, __isDefaultExample, example } = _b, tags = __rest(_b, ["cardBody", "cardBodyStr", "resources", "__isDefaultExample", "example"]);
|
|
464
|
-
// Example
|
|
465
|
-
isDefaultExampleCard = __isDefaultExample === true ? true : isDefaultExampleCard;
|
|
466
|
-
exampleCard = example ? example : exampleCard;
|
|
467
|
-
if (sideIdx === 0) {
|
|
468
|
-
// First side
|
|
469
|
-
if (Array.isArray(resources) && resources.length > 0) {
|
|
470
|
-
// TODO - should search the correct resource type based on the bit type
|
|
471
|
-
const resource = resources[0];
|
|
472
|
-
// console.log('WARNING: Match card has resource on first side', tags.resource);
|
|
473
|
-
if (resource.type === ResourceTag.audio) {
|
|
474
|
-
keyAudio = resource;
|
|
475
|
-
}
|
|
476
|
-
else if (resource.type === ResourceTag.image) {
|
|
477
|
-
keyImage = resource;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
else {
|
|
481
|
-
// If not a heading or resource, it is a pair
|
|
482
|
-
pairKey = cardBodyStr;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
else {
|
|
486
|
-
// Subsequent sides (pair)
|
|
487
|
-
const value = cardBodyStr !== null && cardBodyStr !== void 0 ? cardBodyStr : '';
|
|
488
|
-
const valueAst = cardBody === null || cardBody === void 0 ? void 0 : cardBody.body;
|
|
489
|
-
pairValues.push(value);
|
|
490
|
-
_pairValuesAst.push(valueAst);
|
|
491
|
-
if ((isDefaultExampleCardSet || isDefaultExampleCard) && !exampleCard)
|
|
492
|
-
exampleCard = valueAst;
|
|
493
|
-
// Fix: https://github.com/getMoreBrain/cosmic/issues/5454
|
|
494
|
-
delete tags.item;
|
|
495
|
-
delete tags.lead;
|
|
496
|
-
}
|
|
497
|
-
// Extra tags
|
|
498
|
-
extraTags = Object.assign(Object.assign({}, extraTags), tags);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
// if (pairKey || keyAudio || keyImage) {
|
|
502
|
-
// Calculate final example and __isDefaultExample
|
|
503
|
-
if (isDefaultExampleCard)
|
|
504
|
-
exampleCardSet = undefined;
|
|
505
|
-
const __isDefaultExample = isDefaultExampleCard || isDefaultExampleCardSet;
|
|
506
|
-
const example = exampleCard || exampleCardSet;
|
|
507
|
-
const pair = Object.assign(Object.assign({ key: pairKey !== null && pairKey !== void 0 ? pairKey : '', keyAudio,
|
|
508
|
-
keyImage, values: pairValues, __valuesAst: _pairValuesAst }, extraTags), { __isDefaultExample,
|
|
509
|
-
example });
|
|
510
|
-
if (pair)
|
|
511
|
-
pairs.push(pair);
|
|
512
|
-
// } else {
|
|
513
|
-
// context.addWarning('Ignoring card with empty body text', variant);
|
|
514
|
-
// }
|
|
515
|
-
}
|
|
516
|
-
return {
|
|
517
|
-
heading: headingData === null || headingData === void 0 ? void 0 : headingData.heading,
|
|
518
|
-
pairs: pairs.length > 0 ? pairs : undefined,
|
|
519
|
-
};
|
|
520
|
-
}
|
|
521
|
-
function parseMatchMatrix(_context, _bitType, cardSet) {
|
|
522
|
-
var _a;
|
|
523
|
-
let matrixKey = undefined;
|
|
524
|
-
let matrixKeyTags = undefined;
|
|
525
|
-
const matrix = [];
|
|
526
|
-
let matrixCells = [];
|
|
527
|
-
let matrixCellValues = [];
|
|
528
|
-
let _matrixCellValuesAst = [];
|
|
529
|
-
let matrixCellTags = {};
|
|
530
|
-
let isDefaultExampleCard = false;
|
|
531
|
-
let exampleCard;
|
|
532
|
-
let isDefaultExampleSide = false;
|
|
533
|
-
let exampleSide;
|
|
534
|
-
let isCaseSensitiveMatrix;
|
|
535
|
-
let isCaseSensitiveCell;
|
|
536
|
-
// let keyAudio: AudioResource | undefined = undefined;
|
|
537
|
-
// let keyImage: ImageResource | undefined = undefined;
|
|
538
|
-
// let variant: ProcessedCardVariant | undefined;
|
|
539
|
-
// Extract the heading card if it exists
|
|
540
|
-
const headingData = extractHeadingCard(cardSet, true);
|
|
541
|
-
const isDefaultExampleCardSet = (_a = headingData === null || headingData === void 0 ? void 0 : headingData.isDefaultExampleCardSet) !== null && _a !== void 0 ? _a : false;
|
|
542
|
-
let exampleCardSet = headingData === null || headingData === void 0 ? void 0 : headingData.exampleCardSet;
|
|
543
|
-
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
544
|
-
const card = cardSet.cards[cardIdx];
|
|
545
|
-
// Skip the headings card if it exists
|
|
546
|
-
if (headingData && cardIdx === 0)
|
|
547
|
-
continue;
|
|
548
|
-
matrixKey = undefined;
|
|
549
|
-
matrixKeyTags = undefined;
|
|
550
|
-
// keyAudio = undefined;
|
|
551
|
-
// keyImage = undefined;
|
|
552
|
-
matrixCells = [];
|
|
553
|
-
matrixCellValues = [];
|
|
554
|
-
_matrixCellValuesAst = [];
|
|
555
|
-
isDefaultExampleCard = false;
|
|
556
|
-
exampleCard = undefined;
|
|
557
|
-
isCaseSensitiveMatrix = undefined;
|
|
558
|
-
for (let sideIdx = 0; sideIdx < card.sides.length; sideIdx++) {
|
|
559
|
-
const side = card.sides[sideIdx];
|
|
560
|
-
matrixCellValues = [];
|
|
561
|
-
_matrixCellValuesAst = [];
|
|
562
|
-
matrixCellTags = {};
|
|
563
|
-
isDefaultExampleSide = false;
|
|
564
|
-
exampleSide = undefined;
|
|
565
|
-
isCaseSensitiveCell = undefined;
|
|
566
|
-
for (const content of side.variants) {
|
|
567
|
-
// variant = content;
|
|
568
|
-
const tags = content.data;
|
|
569
|
-
const { cardBody, cardBodyStr, __isDefaultExample, example, isCaseSensitive } = tags, restTags = __rest(tags, ["cardBody", "cardBodyStr", "__isDefaultExample", "example", "isCaseSensitive"]);
|
|
570
|
-
// Example
|
|
571
|
-
isDefaultExampleSide = __isDefaultExample === true ? true : isDefaultExampleSide;
|
|
572
|
-
exampleSide = example ? example : exampleSide;
|
|
573
|
-
// Merge the tags into the matrix cell tags
|
|
574
|
-
Object.assign(matrixCellTags, restTags);
|
|
575
|
-
if (sideIdx === 0) {
|
|
576
|
-
// First side (matrix)
|
|
577
|
-
matrixKey = cardBodyStr;
|
|
578
|
-
matrixKeyTags = restTags;
|
|
579
|
-
isDefaultExampleCard = __isDefaultExample === true ? true : isDefaultExampleCard;
|
|
580
|
-
exampleCard = example ? example : exampleCard;
|
|
581
|
-
isCaseSensitiveMatrix = isCaseSensitive != null ? isCaseSensitive : isCaseSensitiveMatrix;
|
|
582
|
-
}
|
|
583
|
-
else {
|
|
584
|
-
// Subsequent sides (matrix cell value)
|
|
585
|
-
const value = cardBodyStr !== null && cardBodyStr !== void 0 ? cardBodyStr : Breakscape.EMPTY_STRING;
|
|
586
|
-
const valueAst = cardBody === null || cardBody === void 0 ? void 0 : cardBody.body;
|
|
587
|
-
matrixCellValues.push(value);
|
|
588
|
-
_matrixCellValuesAst.push(valueAst);
|
|
589
|
-
if ((isDefaultExampleCardSet || isDefaultExampleSide) && !exampleSide)
|
|
590
|
-
exampleSide = valueAst;
|
|
591
|
-
isCaseSensitiveCell = isCaseSensitive != null ? isCaseSensitive : isCaseSensitiveMatrix;
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
// Finished looping variants, create matrix cell
|
|
595
|
-
if (sideIdx > 0) {
|
|
596
|
-
// Calculate final example and __isDefaultExample
|
|
597
|
-
if (isDefaultExampleSide)
|
|
598
|
-
exampleCard = exampleCardSet = undefined;
|
|
599
|
-
if (isDefaultExampleCard)
|
|
600
|
-
exampleCardSet = undefined;
|
|
601
|
-
const __isDefaultExample = isDefaultExampleSide || isDefaultExampleCard || isDefaultExampleCardSet;
|
|
602
|
-
const example = exampleSide || exampleCard || exampleCardSet;
|
|
603
|
-
const matrixCell = Object.assign(Object.assign({ values: matrixCellValues, __valuesAst: _matrixCellValuesAst }, matrixCellTags), { __isDefaultExample: __isDefaultExample, example, isCaseSensitive: isCaseSensitiveCell });
|
|
604
|
-
if (matrixCell)
|
|
605
|
-
matrixCells.push(matrixCell);
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
// if (matrixKey) {
|
|
609
|
-
const m = Object.assign({ key: matrixKey !== null && matrixKey !== void 0 ? matrixKey : Breakscape.EMPTY_STRING,
|
|
610
|
-
// item: matrixItem ?? Breakscape.EMPTY_STRING,
|
|
611
|
-
// keyAudio,
|
|
612
|
-
// keyImage,
|
|
613
|
-
cells: matrixCells }, matrixKeyTags);
|
|
614
|
-
if (m)
|
|
615
|
-
matrix.push(m);
|
|
616
|
-
// } else {
|
|
617
|
-
// context.addWarning('Ignoring card with empty body text', variant);
|
|
618
|
-
// }
|
|
619
|
-
}
|
|
620
|
-
return {
|
|
621
|
-
heading: headingData === null || headingData === void 0 ? void 0 : headingData.heading,
|
|
622
|
-
matrix: matrix.length > 0 ? matrix : undefined,
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
|
-
function parsePronunciationTable(_context, _bitType, cardSet) {
|
|
626
|
-
var _a;
|
|
627
|
-
const rows = [];
|
|
628
|
-
let rowValues = [];
|
|
629
|
-
for (const card of cardSet.cards) {
|
|
630
|
-
rowValues = [];
|
|
631
|
-
for (const side of card.sides) {
|
|
632
|
-
for (const content of side.variants) {
|
|
633
|
-
// variant = content;
|
|
634
|
-
const tags = content.data;
|
|
635
|
-
const { title, cardBody, resources } = tags;
|
|
636
|
-
const heading = title && title[1].titleAst;
|
|
637
|
-
const audio = (resources && resources.length > 0 ? resources.find((r) => r.type === ResourceTag.audio) : undefined);
|
|
638
|
-
const value = {
|
|
639
|
-
title: heading !== null && heading !== void 0 ? heading : [],
|
|
640
|
-
body: ((_a = cardBody === null || cardBody === void 0 ? void 0 : cardBody.body) !== null && _a !== void 0 ? _a : []),
|
|
641
|
-
audio,
|
|
642
|
-
};
|
|
643
|
-
rowValues.push(value);
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
rows.push(rowValues);
|
|
647
|
-
}
|
|
648
|
-
const table = {
|
|
649
|
-
data: rows,
|
|
650
|
-
};
|
|
651
|
-
return { pronunciationTable: table };
|
|
652
|
-
}
|
|
653
|
-
function parseTable(_context, _bitType, cardSet) {
|
|
654
|
-
var _a;
|
|
655
|
-
let isHeading = false;
|
|
656
|
-
const columns = [];
|
|
657
|
-
const rows = [];
|
|
658
|
-
let rowValues = [];
|
|
659
|
-
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
660
|
-
const card = cardSet.cards[cardIdx];
|
|
661
|
-
isHeading = false;
|
|
662
|
-
rowValues = [];
|
|
663
|
-
for (const side of card.sides) {
|
|
664
|
-
for (const content of side.variants) {
|
|
665
|
-
// variant = content;
|
|
666
|
-
const tags = content.data;
|
|
667
|
-
const { title, cardBody } = tags;
|
|
668
|
-
// Get the 'heading' which is the [#title] at level 1
|
|
669
|
-
// const heading = title && title[1].titleString;
|
|
670
|
-
const heading = title && title[1].titleAst;
|
|
671
|
-
if (cardIdx === 0 && heading != null)
|
|
672
|
-
isHeading = true;
|
|
673
|
-
if (isHeading) {
|
|
674
|
-
columns.push(heading !== null && heading !== void 0 ? heading : []);
|
|
675
|
-
}
|
|
676
|
-
else {
|
|
677
|
-
// If not a heading, it is a row cell value
|
|
678
|
-
// const value = cardBodyStr ?? '';
|
|
679
|
-
const value = ((_a = cardBody === null || cardBody === void 0 ? void 0 : cardBody.body) !== null && _a !== void 0 ? _a : []);
|
|
680
|
-
rowValues.push(value);
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
if (!isHeading) {
|
|
685
|
-
rows.push(rowValues);
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
const table = {
|
|
689
|
-
columns,
|
|
690
|
-
data: rows,
|
|
691
|
-
};
|
|
692
|
-
return { table };
|
|
693
|
-
}
|
|
694
|
-
function parseBotActionResponses(_context, _bitType, cardSet) {
|
|
695
|
-
const botResponses = [];
|
|
696
|
-
for (const card of cardSet.cards) {
|
|
697
|
-
for (const side of card.sides) {
|
|
698
|
-
for (const content of side.variants) {
|
|
699
|
-
const _a = content.data, { __instructionString, reaction, cardBodyStr: feedback } = _a, tags = __rest(_a, ["__instructionString", "reaction", "cardBodyStr"]);
|
|
700
|
-
const botResponse = Object.assign({ response: __instructionString !== null && __instructionString !== void 0 ? __instructionString : Breakscape.EMPTY_STRING, reaction: reaction !== null && reaction !== void 0 ? reaction : Breakscape.EMPTY_STRING, feedback: feedback !== null && feedback !== void 0 ? feedback : Breakscape.EMPTY_STRING }, tags);
|
|
701
|
-
if (botResponse)
|
|
702
|
-
botResponses.push(botResponse);
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
return {
|
|
707
|
-
botResponses: botResponses.length > 0 ? botResponses : undefined,
|
|
708
|
-
};
|
|
709
|
-
}
|
|
710
|
-
function parseIngredients(_context, _bitType, cardSet) {
|
|
711
|
-
const ingredients = [];
|
|
712
|
-
for (const card of cardSet.cards) {
|
|
713
|
-
for (const side of card.sides) {
|
|
714
|
-
for (const content of side.variants) {
|
|
715
|
-
const _a = content.data, { title: titleArray, __instructionString, unit, unitAbbr, decimalPlaces, disableCalculation, cardBodyStr, cardBody } = _a, tags = __rest(_a, ["title", "__instructionString", "unit", "unitAbbr", "decimalPlaces", "disableCalculation", "cardBodyStr", "cardBody"]);
|
|
716
|
-
// Extract 'title' from title array (if present)
|
|
717
|
-
// Extract 'quantity' from either then unchained instruction, or from the select (otherwise use 0)
|
|
718
|
-
// Extract checked from the select options (if present, otherwise checked is false))
|
|
719
|
-
const title = Array.isArray(titleArray) && titleArray.length > 0
|
|
720
|
-
? titleArray[titleArray.length - 1].titleString
|
|
721
|
-
: undefined;
|
|
722
|
-
let checked = false;
|
|
723
|
-
let quantity = NumberUtils.asNumber(__instructionString);
|
|
724
|
-
if (cardBody && cardBody.bodyBits) {
|
|
725
|
-
const select = cardBody.bodyBits.find((c) => c.type === BodyBitType.select);
|
|
726
|
-
if (select) {
|
|
727
|
-
quantity = select.__instructionString ? NumberUtils.asNumber(select.__instructionString) : quantity;
|
|
728
|
-
if (select.options && select.options.length > 0) {
|
|
729
|
-
checked = select.options[0].isCorrect;
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
const ingredient = Object.assign({ title,
|
|
734
|
-
checked,
|
|
735
|
-
// TS compiler very weird. It doesn't recognize that cardBodyStr is a string|undefined, even if cast!
|
|
736
|
-
// Casting to 'any' to avoid the error
|
|
737
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
738
|
-
ingredient: cardBodyStr, quantity, unit: unit !== null && unit !== void 0 ? unit : Breakscape.EMPTY_STRING, unitAbbr: unitAbbr !== null && unitAbbr !== void 0 ? unitAbbr : Breakscape.EMPTY_STRING, decimalPlaces: decimalPlaces !== null && decimalPlaces !== void 0 ? decimalPlaces : 1, disableCalculation: disableCalculation }, tags);
|
|
739
|
-
if (ingredient)
|
|
740
|
-
ingredients.push(ingredient);
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
return {
|
|
745
|
-
ingredients: ingredients.length > 0 ? ingredients : undefined,
|
|
746
|
-
};
|
|
747
|
-
}
|
|
748
|
-
// DEPRECATED - REMOVE IN THE FUTURE
|
|
749
|
-
// function parseCaptionDefinitionsList(
|
|
750
|
-
// _context: BitmarkPegParserContext,
|
|
751
|
-
// _bitType: BitTypeType,
|
|
752
|
-
// cardSet: ProcessedCardSet,
|
|
753
|
-
// ): BitSpecificCards {
|
|
754
|
-
// let isHeading = false;
|
|
755
|
-
// const columns: string[] = [];
|
|
756
|
-
// const rows: string[][] = [];
|
|
757
|
-
// let rowValues: string[] = [];
|
|
758
|
-
// for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
759
|
-
// const card = cardSet.cards[cardIdx];
|
|
760
|
-
// isHeading = false;
|
|
761
|
-
// rowValues = [];
|
|
762
|
-
// for (const side of card.sides) {
|
|
763
|
-
// for (const content of side.variants) {
|
|
764
|
-
// // variant = content;
|
|
765
|
-
// const tags = content.data;
|
|
766
|
-
// const { title, cardBodyStr } = tags;
|
|
767
|
-
// // Get the 'heading' which is the [#title] at level 1
|
|
768
|
-
// const heading = title && title[1].titleString;
|
|
769
|
-
// if (cardIdx === 0 && heading != null) isHeading = true;
|
|
770
|
-
// if (isHeading) {
|
|
771
|
-
// columns.push(heading ?? '');
|
|
772
|
-
// } else {
|
|
773
|
-
// // If not a heading, it is a row cell value
|
|
774
|
-
// const value = cardBodyStr ?? '';
|
|
775
|
-
// rowValues.push(value);
|
|
776
|
-
// }
|
|
777
|
-
// }
|
|
778
|
-
// }
|
|
779
|
-
// if (!isHeading) {
|
|
780
|
-
// rows.push(rowValues);
|
|
781
|
-
// }
|
|
782
|
-
// }
|
|
783
|
-
// const captionDefinitionList: Partial<CaptionDefinitionListJson> | undefined =
|
|
784
|
-
// columns.length > 0
|
|
785
|
-
// ? {
|
|
786
|
-
// heading: columns,
|
|
787
|
-
// definitions: rows
|
|
788
|
-
// .map((row) => {
|
|
789
|
-
// const col: Partial<CaptionDefinitionJson> = {
|
|
790
|
-
// term: row[0],
|
|
791
|
-
// definition: row[1],
|
|
792
|
-
// };
|
|
793
|
-
// return col as CaptionDefinitionJson;
|
|
794
|
-
// })
|
|
795
|
-
// .filter((d) => d != null),
|
|
796
|
-
// }
|
|
797
|
-
// : undefined;
|
|
798
|
-
// return { captionDefinitionList };
|
|
799
|
-
// }
|
|
800
|
-
function parseCardBits(_context, _bitType, _textFormat, cardSet) {
|
|
801
|
-
const cardBits = [];
|
|
802
|
-
for (const card of cardSet.cards) {
|
|
803
|
-
for (const side of card.sides) {
|
|
804
|
-
for (const content of side.variants) {
|
|
805
|
-
const _a = content.data, { cardBody: body } = _a, rest = __rest(_a, ["cardBody"]);
|
|
806
|
-
const cardBit = Object.assign({ body }, rest);
|
|
807
|
-
if (cardBit)
|
|
808
|
-
cardBits.push(cardBit);
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
return {
|
|
813
|
-
cardBits: cardBits.length > 0 ? cardBits : undefined,
|
|
814
|
-
};
|
|
815
|
-
}
|
|
816
|
-
function extractHeadingCard(cardSet, valuesIsArray = false) {
|
|
817
|
-
let isHeading = false;
|
|
818
|
-
let heading;
|
|
819
|
-
let forKeys = undefined;
|
|
820
|
-
const forValues = [];
|
|
821
|
-
let isDefaultExampleCardSet = false;
|
|
822
|
-
let exampleCardSet;
|
|
823
|
-
if (cardSet.cards.length === 0)
|
|
824
|
-
return undefined;
|
|
825
|
-
const card = cardSet.cards[0];
|
|
826
|
-
for (let sideIdx = 0; sideIdx < card.sides.length; sideIdx++) {
|
|
827
|
-
const side = card.sides[sideIdx];
|
|
828
|
-
if (side.variants.length === 0)
|
|
829
|
-
continue;
|
|
830
|
-
const content = side.variants[0];
|
|
831
|
-
const tags = content.data;
|
|
832
|
-
const { title, __isDefaultExample, example } = tags;
|
|
833
|
-
// Get the 'heading' which is the [#title] at level 1
|
|
834
|
-
const heading = title && title[1].titleString;
|
|
835
|
-
if (heading != null)
|
|
836
|
-
isHeading = true;
|
|
837
|
-
if (sideIdx === 0) {
|
|
838
|
-
// 1st side
|
|
839
|
-
if (isHeading) {
|
|
840
|
-
forKeys = heading;
|
|
841
|
-
isDefaultExampleCardSet = __isDefaultExample === true ? true : isDefaultExampleCardSet;
|
|
842
|
-
exampleCardSet = example ? example : exampleCardSet;
|
|
843
|
-
}
|
|
844
|
-
} /*if (sideIdx === 1)*/
|
|
845
|
-
else {
|
|
846
|
-
// 2nd side
|
|
847
|
-
if (isHeading) {
|
|
848
|
-
forValues.push(heading !== null && heading !== void 0 ? heading : '');
|
|
849
|
-
isDefaultExampleCardSet = __isDefaultExample === true ? true : isDefaultExampleCardSet;
|
|
850
|
-
exampleCardSet = example ? example : exampleCardSet;
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
if (isHeading) {
|
|
855
|
-
let forValuesFinal = forValues;
|
|
856
|
-
if (valuesIsArray) {
|
|
857
|
-
// forValues is an array of values
|
|
858
|
-
forValuesFinal = forValues;
|
|
859
|
-
}
|
|
860
|
-
else {
|
|
861
|
-
// Standard match, forValues is a single value
|
|
862
|
-
if (forValues.length >= 1) {
|
|
863
|
-
forValuesFinal = forValues[forValues.length - 1];
|
|
864
|
-
}
|
|
865
|
-
else {
|
|
866
|
-
forValuesFinal = '';
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
heading = {
|
|
870
|
-
forKeys: forKeys !== null && forKeys !== void 0 ? forKeys : '',
|
|
871
|
-
forValues: forValuesFinal,
|
|
872
|
-
};
|
|
873
|
-
}
|
|
874
|
-
return heading
|
|
875
|
-
? {
|
|
876
|
-
heading: heading,
|
|
877
|
-
isDefaultExampleCardSet,
|
|
878
|
-
exampleCardSet,
|
|
879
|
-
}
|
|
880
|
-
: undefined;
|
|
881
|
-
}
|
|
882
|
-
export { buildCards };
|
|
883
|
-
//# sourceMappingURL=CardContentProcessor.js.map
|