@gmb/bitmark-parser-generator 4.12.0 → 4.14.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.
@@ -116,6 +116,7 @@ var BitType = superenum({
116
116
  botActionSend: "bot-action-send",
117
117
  botActionTrueFalse: "bot-action-true-false",
118
118
  botInterview: "bot-interview",
119
+ brandColor: "brand-color",
119
120
  browserImage: "browser-image",
120
121
  bug: "bug",
121
122
  bugAlt: "bug-alt",
@@ -430,7 +431,18 @@ var BitType = superenum({
430
431
  pageSubscribe: "page-subscribe",
431
432
  parameters: "parameters",
432
433
  photo: "photo",
434
+ platform: "platform",
435
+ platformHeader: "platform-header",
436
+ platformMain: "platform-main",
437
+ platformMainButton: "platform-main-button",
438
+ platformMainInput: "platform-main-input",
433
439
  platformPath: "platform-path",
440
+ platformSection: "platform-section",
441
+ platformSectionButton: "platform-section-button",
442
+ platformSectionChat: "platform-section-chat",
443
+ platformSectionHeader: "platform-section-header",
444
+ platformSectionInput: "platform-section-input",
445
+ platformSystemIcon: "platform-system-icon",
434
446
  preparationNote: "preparation-note",
435
447
  pronunciationTable: "pronunciation-table",
436
448
  prototypeImages: "prototype-images",
@@ -561,6 +573,7 @@ var BitType = superenum({
561
573
  surveyRatingOnce: "survey-rating-once",
562
574
  table: "table",
563
575
  tableAlt: "table-alt",
576
+ tableExtended: "table-extended",
564
577
  tableImage: "table-image",
565
578
  tableImageAlt: "table-image-alt",
566
579
  takePicture: "take-picture",
@@ -691,6 +704,7 @@ var CardSetConfigKey = superenum7({
691
704
  matchImagePairs: "matchImagePairs",
692
705
  matchMatrix: "matchMatrix",
693
706
  table: "table",
707
+ tableExtended: "tableExtended",
694
708
  pronunciationTable: "pronunciationTable",
695
709
  botActionResponses: "botActionResponses",
696
710
  exampleBitList: "exampleBitList",
@@ -1057,6 +1071,7 @@ var groupKeys = {
1057
1071
  group_bookCommon: "group_bookCommon",
1058
1072
  group_learningPathCommon: "group_learningPathCommon",
1059
1073
  group_advertisingCommon: "group_advertisingCommon",
1074
+ group_platformColorsCommon: "group_platformColorsCommon",
1060
1075
  group_quizCommon: "group_quizCommon",
1061
1076
  group_resourceBitTags: "group_resourceBitTags",
1062
1077
  group_resourceCommon: "group_resourceCommon",
@@ -1111,6 +1126,8 @@ var propertyKeys = {
1111
1126
  property_author: "@author",
1112
1127
  property_autoplay: "@autoplay",
1113
1128
  property_availableClassifications: "@availableClassifications",
1129
+ property_brandColor: "@brandColor",
1130
+ property_brandColorName: "@brandColorName",
1114
1131
  property_blockId: "@blockId",
1115
1132
  property_book: "@book",
1116
1133
  property_bookAlias: "@bookAlias",
@@ -1177,6 +1194,8 @@ var propertyKeys = {
1177
1194
  property_imageSource: "@imageSource",
1178
1195
  property_index: "@index",
1179
1196
  property_internalComment: "@internalComment",
1197
+ property_internalPrintPdf: "@internalPrintPdf",
1198
+ property_hasPrintRestriction: "@hasPrintRestriction",
1180
1199
  property_isCaseSensitive: "@isCaseSensitive",
1181
1200
  property_isInfoOnly: "@isInfoOnly",
1182
1201
  property_isPublic: "@isPublic",
@@ -1217,6 +1236,18 @@ var propertyKeys = {
1217
1236
  property_partner: "@partner",
1218
1237
  // Deprecated, replaced by person
1219
1238
  property_path: "@path",
1239
+ property_platformBackgroundColor: "@platformBackgroundColor",
1240
+ property_platformButtonBackgroundColor: "@platformButtonBackgroundColor",
1241
+ property_platformButtonPrimaryColor: "@platformButtonPrimaryColor",
1242
+ property_platformMessageBackgroundColor: "@platformMessageBackgroundColor",
1243
+ property_platformName: "@platformName",
1244
+ property_platformPlaceholderColor: "@platformPlaceholderColor",
1245
+ property_platformPrimaryColor: "@platformPrimaryColor",
1246
+ property_platformScrollbarColor: "@platformScrollbarColor",
1247
+ property_platformSecondaryColor: "@platformSecondaryColor",
1248
+ property_platformSelectionColor: "@platformSelectionColor",
1249
+ property_platformSeparatorColor: "@platformSeparatorColor",
1250
+ property_platformTextSelectionColor: "@platformTextSelectionColor",
1220
1251
  property_person: "@person",
1221
1252
  property_pointerLeft: "@pointerLeft",
1222
1253
  property_pointerTop: "@pointerTop",
@@ -1266,6 +1297,7 @@ var propertyKeys = {
1266
1297
  property_size: "@size",
1267
1298
  property_slug: "@slug",
1268
1299
  property_sourceDocument: "@sourceDocument",
1300
+ property_sourceRL: "@sourceRL",
1269
1301
  property_spaceId: "@spaceId",
1270
1302
  property_src1x: "@src1x",
1271
1303
  property_src2x: "@src2x",
@@ -1287,6 +1319,10 @@ var propertyKeys = {
1287
1319
  property_tableSearch: "@tableSearch",
1288
1320
  property_tableSort: "@tableSort",
1289
1321
  property_tableWhitespaceNoWrap: "@tableWhitespaceNoWrap",
1322
+ property_tableCellType: "@tableCellType",
1323
+ property_tableRowSpan: "@tableRowSpan",
1324
+ property_tableColSpan: "@tableColSpan",
1325
+ property_tableScope: "@tableScope",
1290
1326
  property_tag: "@tag",
1291
1327
  property_target: "@target",
1292
1328
  property_technicalTerm: "@technicalTerm",
@@ -1340,6 +1376,9 @@ var resourceKeys = {
1340
1376
  resource_appLink: "&appLink",
1341
1377
  resource_websiteLink: "&websiteLink",
1342
1378
  resource_icon: "&icon",
1379
+ resource_platformBackgroundImage: "&platformBackgroundImage",
1380
+ resource_platformIcon: "&platformIcon",
1381
+ resource_platformLogo: "&platformLogo",
1343
1382
  resource_backgroundWallpaper: "&backgroundWallpaper",
1344
1383
  resource_imagePlaceholder: "&imagePlaceholder"
1345
1384
  };
@@ -1566,7 +1605,10 @@ var ResourceType = superenum13({
1566
1605
  // Aliases for image
1567
1606
  icon: "icon",
1568
1607
  backgroundWallpaper: "backgroundWallpaper",
1569
- imagePlaceholder: "imagePlaceholder"
1608
+ imagePlaceholder: "imagePlaceholder",
1609
+ platformIcon: "platformIcon",
1610
+ platformLogo: "platformLogo",
1611
+ platformBackgroundImage: "platformBackgroundImage"
1570
1612
  });
1571
1613
  function resourceTypeToConfigKey(type) {
1572
1614
  return `&${stringUtils.kebabToCamel(type)}`;
@@ -2363,6 +2405,47 @@ var CARDSETS = {
2363
2405
  ]
2364
2406
  ]
2365
2407
  },
2408
+ [CardSetConfigKey.tableExtended]: {
2409
+ variants: [
2410
+ // Side 1
2411
+ [
2412
+ // Variant 1..N
2413
+ {
2414
+ tags: [
2415
+ {
2416
+ key: ConfigKey.group_standardItemLeadInstructionHint,
2417
+ description: "Standard tags for lead, instruction, and hint."
2418
+ },
2419
+ {
2420
+ key: ConfigKey.tag_title,
2421
+ description: "Title of the table."
2422
+ },
2423
+ {
2424
+ key: ConfigKey.property_tableCellType,
2425
+ description: "Table cell type (th/td).",
2426
+ format: TagFormat.plainText
2427
+ },
2428
+ {
2429
+ key: ConfigKey.property_tableRowSpan,
2430
+ description: "Number of rows the cell spans.",
2431
+ format: TagFormat.number
2432
+ },
2433
+ {
2434
+ key: ConfigKey.property_tableColSpan,
2435
+ description: "Number of columns the cell spans.",
2436
+ format: TagFormat.number
2437
+ },
2438
+ {
2439
+ key: ConfigKey.property_tableScope,
2440
+ description: "Scope attribute for header cells.",
2441
+ format: TagFormat.plainText
2442
+ }
2443
+ ],
2444
+ repeatCount: Count.infinity
2445
+ }
2446
+ ]
2447
+ ]
2448
+ },
2366
2449
  [CardSetConfigKey.pronunciationTable]: {
2367
2450
  variants: [
2368
2451
  // Side 1
@@ -2581,6 +2664,11 @@ var GROUPS = {
2581
2664
  format: TagFormat.plainText,
2582
2665
  maxCount: Count.infinity
2583
2666
  },
2667
+ {
2668
+ key: ConfigKey.property_sourceRL,
2669
+ description: "The original location of the information in the original source material",
2670
+ format: TagFormat.plainText
2671
+ },
2584
2672
  {
2585
2673
  key: ConfigKey.property_isTemplate,
2586
2674
  description: "If true, the bit is a template",
@@ -3227,6 +3315,17 @@ var GROUPS = {
3227
3315
  key: ConfigKey.property_sourceDocument,
3228
3316
  description: "Url of the source document for the book (for example, a PDF file)",
3229
3317
  format: TagFormat.plainText
3318
+ },
3319
+ {
3320
+ key: ConfigKey.property_internalPrintPdf,
3321
+ description: "Url of the internal print PDF for the book",
3322
+ format: TagFormat.plainText
3323
+ },
3324
+ {
3325
+ key: ConfigKey.property_hasPrintRestriction,
3326
+ description: "If true, the book has print restrictions",
3327
+ format: TagFormat.boolean,
3328
+ defaultValue: "true"
3230
3329
  }
3231
3330
  ]
3232
3331
  },
@@ -3316,6 +3415,67 @@ var GROUPS = {
3316
3415
  }
3317
3416
  ]
3318
3417
  },
3418
+ [ConfigKey.group_platformColorsCommon]: {
3419
+ type: GroupConfigType.standard,
3420
+ description: "Common platform colors",
3421
+ tags: [
3422
+ {
3423
+ key: ConfigKey.property_platformPrimaryColor,
3424
+ description: "The platform system primary color",
3425
+ format: TagFormat.plainText
3426
+ },
3427
+ {
3428
+ key: ConfigKey.property_platformSecondaryColor,
3429
+ description: "The platform section secondary color",
3430
+ format: TagFormat.plainText
3431
+ },
3432
+ {
3433
+ key: ConfigKey.property_platformBackgroundColor,
3434
+ description: "The platform system background color",
3435
+ format: TagFormat.plainText
3436
+ },
3437
+ {
3438
+ key: ConfigKey.property_platformButtonPrimaryColor,
3439
+ description: "The platform section header button primary color",
3440
+ format: TagFormat.plainText
3441
+ },
3442
+ {
3443
+ key: ConfigKey.property_platformButtonBackgroundColor,
3444
+ description: "The platform section header button background color",
3445
+ format: TagFormat.plainText
3446
+ },
3447
+ {
3448
+ key: ConfigKey.property_platformScrollbarColor,
3449
+ description: "The platform main scrollbar color",
3450
+ format: TagFormat.plainText
3451
+ },
3452
+ {
3453
+ key: ConfigKey.property_platformSelectionColor,
3454
+ description: "The platform main selection color",
3455
+ format: TagFormat.plainText
3456
+ },
3457
+ {
3458
+ key: ConfigKey.property_platformTextSelectionColor,
3459
+ description: "The platform main input text selection color",
3460
+ format: TagFormat.plainText
3461
+ },
3462
+ {
3463
+ key: ConfigKey.property_platformSeparatorColor,
3464
+ description: "The platform main separator color",
3465
+ format: TagFormat.plainText
3466
+ },
3467
+ {
3468
+ key: ConfigKey.property_platformPlaceholderColor,
3469
+ description: "The platform main input placeholder color",
3470
+ format: TagFormat.plainText
3471
+ },
3472
+ {
3473
+ key: ConfigKey.property_platformMessageBackgroundColor,
3474
+ description: "The platform section chat message background color",
3475
+ format: TagFormat.plainText
3476
+ }
3477
+ ]
3478
+ },
3319
3479
  [ConfigKey.group_quizCommon]: {
3320
3480
  type: GroupConfigType.standard,
3321
3481
  description: "Common quiz tags",
@@ -7117,6 +7277,23 @@ var BITS = {
7117
7277
  baseBitType: BitType.interview,
7118
7278
  description: "Bot interview bit, used to create bot interviews in articles or books"
7119
7279
  },
7280
+ [BitType.brandColor]: {
7281
+ since: "4.12.0",
7282
+ baseBitType: BitType._standard,
7283
+ description: "Brand color bit, used to define brand colors",
7284
+ tags: [
7285
+ {
7286
+ key: ConfigKey.property_brandColor,
7287
+ description: "The brand color",
7288
+ format: TagFormat.plainText
7289
+ },
7290
+ {
7291
+ key: ConfigKey.property_brandColorName,
7292
+ description: "The brand color name",
7293
+ format: TagFormat.plainText
7294
+ }
7295
+ ]
7296
+ },
7120
7297
  [BitType.learningPathBook]: {
7121
7298
  since: "1.3.0",
7122
7299
  baseBitType: BitType._standard,
@@ -7875,6 +8052,160 @@ var BITS = {
7875
8052
  baseBitType: BitType.image,
7876
8053
  description: "Photo bit, used to create photo bits in articles or books"
7877
8054
  },
8055
+ [BitType.platform]: {
8056
+ since: "4.12.0",
8057
+ baseBitType: BitType._standard,
8058
+ description: "Platform bit, used to define platform properties",
8059
+ tags: [
8060
+ {
8061
+ key: ConfigKey.property_platformName,
8062
+ description: "The platform name",
8063
+ format: TagFormat.plainText
8064
+ },
8065
+ {
8066
+ key: ConfigKey.resource_platformIcon,
8067
+ description: "The platform icon",
8068
+ chain: [
8069
+ {
8070
+ key: ConfigKey.group_resourceImageCommon,
8071
+ description: "Common image properties for the platform icon resource"
8072
+ }
8073
+ ],
8074
+ maxCount: 1
8075
+ }
8076
+ ]
8077
+ },
8078
+ [BitType.platformHeader]: {
8079
+ since: "4.12.0",
8080
+ baseBitType: BitType._standard,
8081
+ description: "Platform header bit, used to define platform header properties",
8082
+ tags: [
8083
+ {
8084
+ key: ConfigKey.resource_platformLogo,
8085
+ description: "The platform logo",
8086
+ chain: [
8087
+ {
8088
+ key: ConfigKey.group_resourceImageCommon,
8089
+ description: "Common image properties for the platform logo resource"
8090
+ }
8091
+ ],
8092
+ maxCount: 1
8093
+ },
8094
+ {
8095
+ key: ConfigKey.group_platformColorsCommon,
8096
+ description: "Common platform colors"
8097
+ }
8098
+ ]
8099
+ },
8100
+ [BitType.platformMain]: {
8101
+ since: "4.12.0",
8102
+ baseBitType: BitType._standard,
8103
+ description: "Platform main bit, used to define platform main properties",
8104
+ tags: [
8105
+ {
8106
+ key: ConfigKey.group_platformColorsCommon,
8107
+ description: "Common platform colors"
8108
+ }
8109
+ ]
8110
+ },
8111
+ [BitType.platformMainButton]: {
8112
+ since: "4.12.0",
8113
+ baseBitType: BitType._standard,
8114
+ description: "Platform main button bit, used to define platform main button properties",
8115
+ tags: [
8116
+ {
8117
+ key: ConfigKey.group_platformColorsCommon,
8118
+ description: "Common platform colors"
8119
+ }
8120
+ ]
8121
+ },
8122
+ [BitType.platformMainInput]: {
8123
+ since: "4.12.0",
8124
+ baseBitType: BitType._standard,
8125
+ description: "Platform main input bit, used to define platform main input properties",
8126
+ tags: [
8127
+ {
8128
+ key: ConfigKey.group_platformColorsCommon,
8129
+ description: "Common platform colors"
8130
+ }
8131
+ ]
8132
+ },
8133
+ [BitType.platformSection]: {
8134
+ since: "4.12.0",
8135
+ baseBitType: BitType._standard,
8136
+ description: "Platform section bit, used to define platform section properties",
8137
+ tags: [
8138
+ {
8139
+ key: ConfigKey.group_platformColorsCommon,
8140
+ description: "Common platform colors"
8141
+ }
8142
+ ]
8143
+ },
8144
+ [BitType.platformSectionButton]: {
8145
+ since: "4.12.0",
8146
+ baseBitType: BitType._standard,
8147
+ description: "Platform section button bit, used to define platform section button properties",
8148
+ tags: [
8149
+ {
8150
+ key: ConfigKey.group_platformColorsCommon,
8151
+ description: "Common platform colors"
8152
+ }
8153
+ ]
8154
+ },
8155
+ [BitType.platformSectionChat]: {
8156
+ since: "4.12.0",
8157
+ baseBitType: BitType._standard,
8158
+ description: "Platform section chat bit, used to define platform section chat properties",
8159
+ tags: [
8160
+ {
8161
+ key: ConfigKey.group_platformColorsCommon,
8162
+ description: "Common platform colors"
8163
+ },
8164
+ {
8165
+ key: ConfigKey.resource_platformBackgroundImage,
8166
+ description: "The platform section chat background image",
8167
+ chain: [
8168
+ {
8169
+ key: ConfigKey.group_resourceImageCommon,
8170
+ description: "Common image properties for the platform background image resource"
8171
+ }
8172
+ ]
8173
+ }
8174
+ ]
8175
+ },
8176
+ [BitType.platformSectionHeader]: {
8177
+ since: "4.12.0",
8178
+ baseBitType: BitType._standard,
8179
+ description: "Platform section header bit, used to define platform section header properties",
8180
+ tags: [
8181
+ {
8182
+ key: ConfigKey.group_platformColorsCommon,
8183
+ description: "Common platform colors"
8184
+ }
8185
+ ]
8186
+ },
8187
+ [BitType.platformSectionInput]: {
8188
+ since: "4.12.0",
8189
+ baseBitType: BitType._standard,
8190
+ description: "Platform section input bit, used to define platform section input properties",
8191
+ tags: [
8192
+ {
8193
+ key: ConfigKey.group_platformColorsCommon,
8194
+ description: "Common platform colors"
8195
+ }
8196
+ ]
8197
+ },
8198
+ [BitType.platformSystemIcon]: {
8199
+ since: "4.12.0",
8200
+ baseBitType: BitType._standard,
8201
+ description: "Platform system icon bit, used to define platform system icon properties",
8202
+ tags: [
8203
+ {
8204
+ key: ConfigKey.group_platformColorsCommon,
8205
+ description: "Common platform colors"
8206
+ }
8207
+ ]
8208
+ },
7878
8209
  [BitType.quote]: {
7879
8210
  since: "1.3.0",
7880
8211
  baseBitType: BitType._standard,
@@ -8242,6 +8573,12 @@ var BITS = {
8242
8573
  ],
8243
8574
  cardSet: CardSetConfigKey.table
8244
8575
  },
8576
+ [BitType.tableExtended]: {
8577
+ since: "4.14.0",
8578
+ baseBitType: BitType.table,
8579
+ description: "Extended table bit, used to create complex tables with all HTML table features",
8580
+ cardSet: CardSetConfigKey.tableExtended
8581
+ },
8245
8582
  [BitType.tableAlt]: {
8246
8583
  since: "1.16.0",
8247
8584
  baseBitType: BitType.table,
@@ -9223,7 +9560,7 @@ var instance2 = new Config();
9223
9560
  // src/generated/package_info.ts
9224
9561
  var PACKAGE_INFO = {
9225
9562
  "name": "@gmb/bitmark-parser-generator",
9226
- "version": "4.12.0",
9563
+ "version": "4.14.0",
9227
9564
  "author": "Get More Brain Ltd",
9228
9565
  "license": "ISC",
9229
9566
  "description": "A bitmark parser and generator using Peggy.js"
@@ -9568,6 +9905,10 @@ var NodeType = superenum20({
9568
9905
  advertisingClickUrl: "advertisingClickUrl",
9569
9906
  advertisingClickUrlValue: "advertisingClickUrlValue",
9570
9907
  ageRange: "ageRange",
9908
+ brandColor: "brandColor",
9909
+ brandColorValue: "brandColorValue",
9910
+ brandColorName: "brandColorName",
9911
+ brandColorNameValue: "brandColorNameValue",
9571
9912
  ageRangeValue: "ageRangeValue",
9572
9913
  aiGenerated: "aiGenerated",
9573
9914
  aiGeneratedValue: "aiGeneratedValue",
@@ -9720,6 +10061,7 @@ var NodeType = superenum20({
9720
10061
  durationValue: "durationValue",
9721
10062
  elements: "elements",
9722
10063
  elementsValue: "elementsValue",
10064
+ elementsValueValue: "elementsValueValue",
9723
10065
  emphasis: "emphasis",
9724
10066
  end: "end",
9725
10067
  errors: "errors",
@@ -9748,6 +10090,7 @@ var NodeType = superenum20({
9748
10090
  focusY: "focusY",
9749
10091
  focusYValue: "focusYValue",
9750
10092
  footer: "footer",
10093
+ footerValue: "footerValue",
9751
10094
  footerText: "footerText",
9752
10095
  forKeys: "forKeys",
9753
10096
  format: "format",
@@ -9770,11 +10113,13 @@ var NodeType = superenum20({
9770
10113
  hasBookNavigationValue: "hasBookNavigationValue",
9771
10114
  hasMarkAsDone: "hasMarkAsDone",
9772
10115
  hasMarkAsDoneValue: "hasMarkAsDoneValue",
10116
+ head: "head",
9773
10117
  heading: "heading",
9774
10118
  height: "height",
9775
10119
  heightValue: "heightValue",
9776
10120
  highlight: "highlight",
9777
10121
  hint: "hint",
10122
+ hintValue: "hintValue",
9778
10123
  href: "href",
9779
10124
  icon: "icon",
9780
10125
  iconTag: "iconTag",
@@ -9796,8 +10141,13 @@ var NodeType = superenum20({
9796
10141
  ingredients: "ingredients",
9797
10142
  ingredientsValue: "ingredientsValue",
9798
10143
  instruction: "instruction",
10144
+ instructionValue: "instructionValue",
9799
10145
  internalComment: "internalComment",
9800
10146
  internalCommentValue: "internalCommentValue",
10147
+ internalPrintPdf: "internalPrintPdf",
10148
+ internalPrintPdfValue: "internalPrintPdfValue",
10149
+ hasPrintRestriction: "hasPrintRestriction",
10150
+ hasPrintRestrictionValue: "hasPrintRestrictionValue",
9801
10151
  isCaseSensitive: "isCaseSensitive",
9802
10152
  isCommented: "isCommented",
9803
10153
  isCorrect: "isCorrect",
@@ -9816,6 +10166,7 @@ var NodeType = superenum20({
9816
10166
  isTracked: "isTracked",
9817
10167
  isTrackedValue: "isTrackedValue",
9818
10168
  item: "item",
10169
+ itemValue: "itemValue",
9819
10170
  itemLead: "itemLead",
9820
10171
  jobTitle: "jobTitle",
9821
10172
  jobTitleValue: "jobTitleValue",
@@ -9842,6 +10193,7 @@ var NodeType = superenum20({
9842
10193
  layerRoleValue: "layerRoleValue",
9843
10194
  layerValue: "layerValue",
9844
10195
  lead: "lead",
10196
+ leadValue: "leadValue",
9845
10197
  level: "level",
9846
10198
  levelACTFL: "levelACTFL",
9847
10199
  levelACTFLValue: "levelACTFLValue",
@@ -9863,6 +10215,7 @@ var NodeType = superenum20({
9863
10215
  machineTranslatedValue: "machineTranslatedValue",
9864
10216
  mailingList: "mailingList",
9865
10217
  marginNumber: "marginNumber",
10218
+ marginNumberValue: "marginNumberValue",
9866
10219
  mark: "mark",
9867
10220
  markConfig: "markConfig",
9868
10221
  markConfigValue: "markConfigValue",
@@ -9891,6 +10244,7 @@ var NodeType = superenum20({
9891
10244
  pageNo: "pageNo",
9892
10245
  pageNoValue: "pageNoValue",
9893
10246
  pageNumber: "pageNumber",
10247
+ pageNumberValue: "pageNumberValue",
9894
10248
  pageValue: "pageValue",
9895
10249
  pairs: "pairs",
9896
10250
  pairsValue: "pairsValue",
@@ -9900,6 +10254,36 @@ var NodeType = superenum20({
9900
10254
  partialAnswerValue: "partialAnswerValue",
9901
10255
  path: "path",
9902
10256
  pathValue: "pathValue",
10257
+ platformName: "platformName",
10258
+ platformNameValue: "platformNameValue",
10259
+ platformIcon: "platformIcon",
10260
+ platformIconValue: "platformIconValue",
10261
+ platformLogo: "platformLogo",
10262
+ platformLogoValue: "platformLogoValue",
10263
+ platformPrimaryColor: "platformPrimaryColor",
10264
+ platformPrimaryColorValue: "platformPrimaryColorValue",
10265
+ platformSecondaryColor: "platformSecondaryColor",
10266
+ platformSecondaryColorValue: "platformSecondaryColorValue",
10267
+ platformBackgroundColor: "platformBackgroundColor",
10268
+ platformBackgroundColorValue: "platformBackgroundColorValue",
10269
+ platformScrollbarColor: "platformScrollbarColor",
10270
+ platformScrollbarColorValue: "platformScrollbarColorValue",
10271
+ platformSelectionColor: "platformSelectionColor",
10272
+ platformSelectionColorValue: "platformSelectionColorValue",
10273
+ platformSeparatorColor: "platformSeparatorColor",
10274
+ platformSeparatorColorValue: "platformSeparatorColorValue",
10275
+ platformPlaceholderColor: "platformPlaceholderColor",
10276
+ platformPlaceholderColorValue: "platformPlaceholderColorValue",
10277
+ platformTextSelectionColor: "platformTextSelectionColor",
10278
+ platformTextSelectionColorValue: "platformTextSelectionColorValue",
10279
+ platformButtonPrimaryColor: "platformButtonPrimaryColor",
10280
+ platformButtonPrimaryColorValue: "platformButtonPrimaryColorValue",
10281
+ platformButtonBackgroundColor: "platformButtonBackgroundColor",
10282
+ platformButtonBackgroundColorValue: "platformButtonBackgroundColorValue",
10283
+ platformMessageBackgroundColor: "platformMessageBackgroundColor",
10284
+ platformMessageBackgroundColorValue: "platformMessageBackgroundColorValue",
10285
+ platformBackgroundImage: "platformBackgroundImage",
10286
+ platformBackgroundImageValue: "platformBackgroundImageValue",
9903
10287
  person: "person",
9904
10288
  pointerLeft: "pointerLeft",
9905
10289
  pointerLeftValue: "pointerLeftValue",
@@ -9944,6 +10328,7 @@ var NodeType = superenum20({
9944
10328
  publisherValue: "publisherValue",
9945
10329
  quantity: "quantity",
9946
10330
  question: "question",
10331
+ questionValue: "questionValue",
9947
10332
  questions: "questions",
9948
10333
  questionsValue: "questionsValue",
9949
10334
  quizCountItems: "quizCountItems",
@@ -9996,6 +10381,10 @@ var NodeType = superenum20({
9996
10381
  revealSolutions: "revealSolutions",
9997
10382
  root: "root",
9998
10383
  // bit type (root)
10384
+ rows: "rows",
10385
+ rowsValue: "rowsValue",
10386
+ rubric: "rubric",
10387
+ rubricValue: "rubricValue",
9999
10388
  sampleSolution: "sampleSolution",
10000
10389
  sampleSolutionValue: "sampleSolutionValue",
10001
10390
  scormSource: "scormSource",
@@ -10018,7 +10407,8 @@ var NodeType = superenum20({
10018
10407
  solutionsValue: "solutionsValue",
10019
10408
  sourceDocument: "sourceDocument",
10020
10409
  sourceDocumentValue: "sourceDocumentValue",
10021
- sourcePageNumber: "sourcePageNumber",
10410
+ sourceRL: "sourceRL",
10411
+ sourceRLValue: "sourceRLValue",
10022
10412
  spaceId: "spaceId",
10023
10413
  spaceIdValue: "spaceIdValue",
10024
10414
  src: "src",
@@ -10600,6 +10990,103 @@ var DeprecatedTextFormat = superenum23({
10600
10990
  // bitmark-- text format, deprecated
10601
10991
  });
10602
10992
 
10993
+ // src/parser/json/TableUtils.ts
10994
+ function isTableBasicFormat(table) {
10995
+ const t = table;
10996
+ return !!(t.columns || t.data) && !(t.head || t.body || t.foot);
10997
+ }
10998
+ function isTableExtendedFormat(table) {
10999
+ const t = table;
11000
+ return !!(t.head || t.body || t.foot);
11001
+ }
11002
+ function isMixedTableFormat(table) {
11003
+ const t = table;
11004
+ const hasOld = !!(t.columns || t.data);
11005
+ const hasNew = !!(t.head || t.body || t.foot);
11006
+ return hasOld && hasNew;
11007
+ }
11008
+ function convertBasicToExtendedTableFormat(table) {
11009
+ const tableExtended = {};
11010
+ if (table.columns && table.columns.length > 0) {
11011
+ tableExtended.head = {
11012
+ rows: [
11013
+ {
11014
+ cells: table.columns.map((col) => ({
11015
+ content: col,
11016
+ title: true
11017
+ }))
11018
+ }
11019
+ ]
11020
+ };
11021
+ }
11022
+ if (table.data && table.data.length > 0) {
11023
+ tableExtended.body = {
11024
+ rows: table.data.map((row) => ({
11025
+ cells: row.map((cell) => ({
11026
+ content: cell
11027
+ }))
11028
+ }))
11029
+ };
11030
+ }
11031
+ return tableExtended;
11032
+ }
11033
+ function convertExtendedToBasicTableFormat(tableExtended) {
11034
+ const table = {};
11035
+ const extractRowCells = (row) => {
11036
+ if (!row || !Array.isArray(row.cells)) {
11037
+ return [];
11038
+ }
11039
+ return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
11040
+ };
11041
+ const dataRows = [];
11042
+ const headRows = tableExtended.head?.rows ?? [];
11043
+ if (headRows.length > 0) {
11044
+ const primaryHeader = extractRowCells(headRows[0]);
11045
+ if (primaryHeader.length > 0) {
11046
+ table.columns = primaryHeader;
11047
+ }
11048
+ const remainingHeadRows = headRows.slice(1);
11049
+ remainingHeadRows.forEach((row) => {
11050
+ const cells = extractRowCells(row);
11051
+ if (cells.length > 0) {
11052
+ dataRows.push(cells);
11053
+ }
11054
+ });
11055
+ }
11056
+ const appendSectionRows = (section) => {
11057
+ if (!section || !Array.isArray(section.rows)) {
11058
+ return;
11059
+ }
11060
+ section.rows.forEach((row) => {
11061
+ const cells = extractRowCells(row);
11062
+ if (cells.length > 0) {
11063
+ dataRows.push(cells);
11064
+ }
11065
+ });
11066
+ };
11067
+ appendSectionRows(tableExtended.body);
11068
+ appendSectionRows(tableExtended.foot);
11069
+ if (dataRows.length > 0) {
11070
+ table.data = dataRows;
11071
+ }
11072
+ return table;
11073
+ }
11074
+ function normalizeTableFormat(bitType, table) {
11075
+ if (isMixedTableFormat(table)) {
11076
+ const t = table;
11077
+ delete t.columns;
11078
+ delete t.data;
11079
+ }
11080
+ const isExtended = instance2.isOfBitType(bitType, BitType.tableExtended);
11081
+ if (isExtended && isTableBasicFormat(table)) {
11082
+ return convertBasicToExtendedTableFormat(table);
11083
+ }
11084
+ if (!isExtended && isTableExtendedFormat(table)) {
11085
+ return convertExtendedToBasicTableFormat(table);
11086
+ }
11087
+ return table;
11088
+ }
11089
+
10603
11090
  // src/utils/ArrayUtils.ts
10604
11091
  var ArrayUtils = class {
10605
11092
  /**
@@ -21417,6 +21904,9 @@ var ResourceBuilder = class extends BaseBuilder {
21417
21904
  case ResourceType.backgroundWallpaper:
21418
21905
  case ResourceType.imagePlaceholder:
21419
21906
  case ResourceType.icon:
21907
+ case ResourceType.platformIcon:
21908
+ case ResourceType.platformLogo:
21909
+ case ResourceType.platformBackgroundImage:
21420
21910
  node = this.imageResource(context, finalData, type);
21421
21911
  break;
21422
21912
  // case ResourceType.imageResponsive: {
@@ -22390,6 +22880,7 @@ var Builder = class extends BaseBuilder {
22390
22880
  * @returns
22391
22881
  */
22392
22882
  buildBit(data, options) {
22883
+ data = structuredClone(data);
22393
22884
  const bitType = data.bitType;
22394
22885
  const bitConfig = instance2.getBitConfig(bitType);
22395
22886
  const deprecatedTextFormat = DeprecatedTextFormat.fromValue(data.textFormat);
@@ -22453,6 +22944,7 @@ var Builder = class extends BaseBuilder {
22453
22944
  data.jupyterExecutionCount,
22454
22945
  options
22455
22946
  ),
22947
+ sourceRL: this.toAstProperty(bitType, ConfigKey.property_sourceRL, data.sourceRL, options),
22456
22948
  isPublic: this.toAstProperty(bitType, ConfigKey.property_isPublic, data.isPublic, options),
22457
22949
  isTemplate: this.toAstProperty(
22458
22950
  bitType,
@@ -22976,6 +23468,18 @@ var Builder = class extends BaseBuilder {
22976
23468
  data.advertisingClickUrl,
22977
23469
  options
22978
23470
  ),
23471
+ brandColor: this.toAstProperty(
23472
+ bitType,
23473
+ ConfigKey.property_brandColor,
23474
+ data.brandColor,
23475
+ options
23476
+ ),
23477
+ brandColorName: this.toAstProperty(
23478
+ bitType,
23479
+ ConfigKey.property_brandColorName,
23480
+ data.brandColorName,
23481
+ options
23482
+ ),
22979
23483
  caption: this.handleJsonText(context, TextLocation2.tag, data.caption),
22980
23484
  quotedPerson: this.toAstProperty(
22981
23485
  bitType,
@@ -23039,6 +23543,18 @@ var Builder = class extends BaseBuilder {
23039
23543
  data.sourceDocument,
23040
23544
  options
23041
23545
  ),
23546
+ internalPrintPdf: this.toAstProperty(
23547
+ bitType,
23548
+ ConfigKey.property_internalPrintPdf,
23549
+ data.internalPrintPdf,
23550
+ options
23551
+ ),
23552
+ hasPrintRestriction: this.toAstProperty(
23553
+ bitType,
23554
+ ConfigKey.property_hasPrintRestriction,
23555
+ data.hasPrintRestriction,
23556
+ options
23557
+ ),
23042
23558
  tocResource: this.toAstProperty(
23043
23559
  bitType,
23044
23560
  ConfigKey.property_tocResource,
@@ -23052,6 +23568,81 @@ var Builder = class extends BaseBuilder {
23052
23568
  options
23053
23569
  ),
23054
23570
  page: this.toAstProperty(bitType, ConfigKey.property_page, data.page, options),
23571
+ platformName: this.toAstProperty(
23572
+ bitType,
23573
+ ConfigKey.property_platformName,
23574
+ data.platformName,
23575
+ options
23576
+ ),
23577
+ platformIcon: this.toImageResource(context, data.platformIcon),
23578
+ platformLogo: this.toImageResource(context, data.platformLogo),
23579
+ platformPrimaryColor: this.toAstProperty(
23580
+ bitType,
23581
+ ConfigKey.property_platformPrimaryColor,
23582
+ data.platformPrimaryColor,
23583
+ options
23584
+ ),
23585
+ platformSecondaryColor: this.toAstProperty(
23586
+ bitType,
23587
+ ConfigKey.property_platformSecondaryColor,
23588
+ data.platformSecondaryColor,
23589
+ options
23590
+ ),
23591
+ platformBackgroundColor: this.toAstProperty(
23592
+ bitType,
23593
+ ConfigKey.property_platformBackgroundColor,
23594
+ data.platformBackgroundColor,
23595
+ options
23596
+ ),
23597
+ platformScrollbarColor: this.toAstProperty(
23598
+ bitType,
23599
+ ConfigKey.property_platformScrollbarColor,
23600
+ data.platformScrollbarColor,
23601
+ options
23602
+ ),
23603
+ platformSelectionColor: this.toAstProperty(
23604
+ bitType,
23605
+ ConfigKey.property_platformSelectionColor,
23606
+ data.platformSelectionColor,
23607
+ options
23608
+ ),
23609
+ platformSeparatorColor: this.toAstProperty(
23610
+ bitType,
23611
+ ConfigKey.property_platformSeparatorColor,
23612
+ data.platformSeparatorColor,
23613
+ options
23614
+ ),
23615
+ platformPlaceholderColor: this.toAstProperty(
23616
+ bitType,
23617
+ ConfigKey.property_platformPlaceholderColor,
23618
+ data.platformPlaceholderColor,
23619
+ options
23620
+ ),
23621
+ platformTextSelectionColor: this.toAstProperty(
23622
+ bitType,
23623
+ ConfigKey.property_platformTextSelectionColor,
23624
+ data.platformTextSelectionColor,
23625
+ options
23626
+ ),
23627
+ platformButtonPrimaryColor: this.toAstProperty(
23628
+ bitType,
23629
+ ConfigKey.property_platformButtonPrimaryColor,
23630
+ data.platformButtonPrimaryColor,
23631
+ options
23632
+ ),
23633
+ platformButtonBackgroundColor: this.toAstProperty(
23634
+ bitType,
23635
+ ConfigKey.property_platformButtonBackgroundColor,
23636
+ data.platformButtonBackgroundColor,
23637
+ options
23638
+ ),
23639
+ platformMessageBackgroundColor: this.toAstProperty(
23640
+ bitType,
23641
+ ConfigKey.property_platformMessageBackgroundColor,
23642
+ data.platformMessageBackgroundColor,
23643
+ options
23644
+ ),
23645
+ platformBackgroundImage: this.toImageResource(context, data.platformBackgroundImage),
23055
23646
  productId: this.toAstProperty(bitType, ConfigKey.property_productId, data.productId, options),
23056
23647
  product: this.toAstProperty(bitType, ConfigKey.property_product, data.product, options),
23057
23648
  // productList: this.toAstProperty(
@@ -23123,7 +23714,6 @@ var Builder = class extends BaseBuilder {
23123
23714
  item: this.handleJsonText(context, TextLocation2.tag, data.item),
23124
23715
  lead: this.handleJsonText(context, TextLocation2.tag, data.lead),
23125
23716
  pageNumber: this.handleJsonText(context, TextLocation2.tag, data.pageNumber),
23126
- sourcePageNumber: this.handleJsonText(context, TextLocation2.tag, data.sourcePageNumber),
23127
23717
  marginNumber: this.handleJsonText(context, TextLocation2.tag, data.marginNumber),
23128
23718
  hint: this.handleJsonText(context, TextLocation2.tag, data.hint),
23129
23719
  instruction: this.handleJsonText(context, TextLocation2.tag, data.instruction),
@@ -23226,15 +23816,7 @@ var Builder = class extends BaseBuilder {
23226
23816
  objectUtils.removeUnwantedProperties(node, {
23227
23817
  ignoreAllFalse: true,
23228
23818
  ignoreUndefined: ["example"],
23229
- ignoreEmptyArrays: [
23230
- "item",
23231
- "lead",
23232
- "pageNumber",
23233
- "sourcePageNumber",
23234
- "marginNumber",
23235
- "hint",
23236
- "instruction"
23237
- ]
23819
+ ignoreEmptyArrays: ["item", "lead", "pageNumber", "marginNumber", "hint", "instruction"]
23238
23820
  });
23239
23821
  return nodeValidator.validateBit(node);
23240
23822
  }
@@ -23742,21 +24324,53 @@ var Builder = class extends BaseBuilder {
23742
24324
  return node;
23743
24325
  }
23744
24326
  /**
23745
- * Build table node
24327
+ * Build table / table extended node
23746
24328
  *
23747
24329
  * @param data - data for the node
23748
24330
  * @returns
23749
24331
  */
23750
24332
  buildTable(context, dataIn) {
23751
24333
  if (!dataIn) return void 0;
23752
- const node = {
23753
- columns: (dataIn.columns || []).map(
24334
+ const node = normalizeTableFormat(context.bitType, dataIn);
24335
+ const nodeTable = node;
24336
+ const nodeTableExtended = node;
24337
+ if (Array.isArray(nodeTable.columns) && nodeTable.columns.length > 0) {
24338
+ nodeTable.columns = nodeTable.columns.map(
23754
24339
  (col) => this.handleJsonText(context, TextLocation2.tag, col)
23755
- ),
23756
- data: (dataIn.data || []).map(
24340
+ );
24341
+ }
24342
+ if (Array.isArray(nodeTable.data) && nodeTable.data.length > 0) {
24343
+ nodeTable.data = nodeTable.data.map(
23757
24344
  (row) => (row || []).map((cell) => this.handleJsonText(context, TextLocation2.tag, cell))
23758
- )
24345
+ );
24346
+ }
24347
+ const buildSection = (section) => {
24348
+ if (!section || !Array.isArray(section.rows)) return void 0;
24349
+ const rows = section.rows.map((row) => {
24350
+ const cells = (row.cells || []).map((cell) => {
24351
+ const tableCell = {
24352
+ content: this.handleJsonText(context, TextLocation2.tag, cell.content)
24353
+ };
24354
+ if (cell.title != null) tableCell.title = cell.title;
24355
+ if (cell.rowspan != null) tableCell.rowspan = cell.rowspan;
24356
+ if (cell.colspan != null) tableCell.colspan = cell.colspan;
24357
+ if (cell.scope) tableCell.scope = cell.scope;
24358
+ return tableCell;
24359
+ });
24360
+ return {
24361
+ cells
24362
+ };
24363
+ });
24364
+ return {
24365
+ rows
24366
+ };
23759
24367
  };
24368
+ const head = buildSection(nodeTableExtended.head);
24369
+ if (head && head.rows?.length > 0) nodeTableExtended.head = head;
24370
+ const body = buildSection(nodeTableExtended.body);
24371
+ if (body && body.rows?.length > 0) nodeTableExtended.body = body;
24372
+ const foot = buildSection(nodeTableExtended.foot);
24373
+ if (foot && foot.rows?.length > 0) nodeTableExtended.foot = foot;
23760
24374
  return node;
23761
24375
  }
23762
24376
  /**
@@ -23780,7 +24394,7 @@ var Builder = class extends BaseBuilder {
23780
24394
  if (!data) return void 0;
23781
24395
  const defaultExample = data.__sampleSolutionAst;
23782
24396
  const node = {
23783
- question: data.question ?? "",
24397
+ question: this.handleJsonText(context, TextLocation2.body, data.question),
23784
24398
  partialAnswer: data.partialAnswer ?? "",
23785
24399
  sampleSolution: data.sampleSolution ?? "",
23786
24400
  additionalSolutions: data.additionalSolutions ?? void 0,
@@ -23794,9 +24408,9 @@ var Builder = class extends BaseBuilder {
23794
24408
  };
23795
24409
  objectUtils.removeUnwantedProperties(node, {
23796
24410
  ignoreAllFalse: true,
23797
- ignoreEmptyArrays: ["item", "hint", "instruction"],
24411
+ ignoreEmptyArrays: ["question", "item", "hint", "instruction"],
23798
24412
  ignoreUndefined: ["example"],
23799
- ignoreEmptyString: ["question", "partialAnswer", "sampleSolution"]
24413
+ ignoreEmptyString: ["partialAnswer", "sampleSolution"]
23800
24414
  });
23801
24415
  return node;
23802
24416
  }
@@ -24334,7 +24948,7 @@ var Builder = class extends BaseBuilder {
24334
24948
  buildStatement(context, data) {
24335
24949
  if (!data) return void 0;
24336
24950
  const node = {
24337
- statement: data.statement ?? "",
24951
+ statement: this.handleJsonText(context, TextLocation2.tag, data.statement),
24338
24952
  isCorrect: !!data.isCorrect,
24339
24953
  item: this.handleJsonText(context, TextLocation2.tag, data.item),
24340
24954
  lead: this.handleJsonText(context, TextLocation2.tag, data.lead),
@@ -24344,7 +24958,7 @@ var Builder = class extends BaseBuilder {
24344
24958
  };
24345
24959
  objectUtils.removeUnwantedProperties(node, {
24346
24960
  ignoreAllFalse: true,
24347
- // ignoreAllEmptyArrays: true,
24961
+ ignoreEmptyArrays: ["statement"],
24348
24962
  ignoreUndefined: ["example"]
24349
24963
  });
24350
24964
  return node;
@@ -24556,7 +25170,7 @@ var Builder = class extends BaseBuilder {
24556
25170
  const node = {
24557
25171
  heading: this.buildHeading(context, data.heading),
24558
25172
  questions: this.buildQuestions(context, data.questions),
24559
- elements: data.elements,
25173
+ elements: this.handleJsonText(context, TextLocation2.body, data.elements),
24560
25174
  flashcards: this.buildFlashcards(context, data.flashcards),
24561
25175
  definitions: this.buildDefinitionList(context, data.definitions ?? data.legend),
24562
25176
  statement: this.buildStatement(context, data.statement),
@@ -24575,7 +25189,9 @@ var Builder = class extends BaseBuilder {
24575
25189
  // captionDefinitionList: this.buildCaptionDefinitionList(context, data.captionDefinitionList),
24576
25190
  cardBits: this.buildCardBits(context, data.cardBits)
24577
25191
  };
24578
- objectUtils.removeUnwantedProperties(node);
25192
+ objectUtils.removeUnwantedProperties(node, {
25193
+ ignoreEmptyObjects: ["table"]
25194
+ });
24579
25195
  return Object.keys(node).length > 0 ? node : void 0;
24580
25196
  }
24581
25197
  /**
@@ -25079,6 +25695,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
25079
25695
  __publicField(this, "hasCardSet", false);
25080
25696
  __publicField(this, "hasFooter", false);
25081
25697
  __publicField(this, "inTag", true);
25698
+ __publicField(this, "skipTableTraversal", false);
25082
25699
  this.enter = this.enter.bind(this);
25083
25700
  this.between = this.between.bind(this);
25084
25701
  this.exit = this.exit.bind(this);
@@ -25547,7 +26164,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
25547
26164
  if (this.isEmptyText(item)) return false;
25548
26165
  if (!this.isEmptyText(parent?.value?.lead)) return true;
25549
26166
  if (!this.isEmptyText(parent?.value?.pageNumber)) return true;
25550
- if (!this.isEmptyText(parent?.value?.sourcePageNumber)) return true;
25551
26167
  if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
25552
26168
  this.writeNL_IfNotChain(route);
25553
26169
  this.writeOPC();
@@ -25561,7 +26177,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
25561
26177
  const parent = this.getParentNode(route);
25562
26178
  if (this.isEmptyText(lead)) return false;
25563
26179
  if (!this.isEmptyText(parent?.value?.pageNumber)) return true;
25564
- if (!this.isEmptyText(parent?.value?.sourcePageNumber)) return true;
25565
26180
  if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
25566
26181
  this.writeNL_IfNotChain(route);
25567
26182
  this.writeOPC();
@@ -25577,7 +26192,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
25577
26192
  const pageNumber = node.value;
25578
26193
  const parent = this.getParentNode(route);
25579
26194
  if (this.isEmptyText(pageNumber)) return false;
25580
- if (!this.isEmptyText(parent?.value?.sourcePageNumber)) return true;
25581
26195
  if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
25582
26196
  this.writeNL_IfNotChain(route);
25583
26197
  this.writeOPC();
@@ -25591,31 +26205,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
25591
26205
  this.writeCL();
25592
26206
  return true;
25593
26207
  }
25594
- // bitmarkAst -> bits -> bitsValue -> sourcePageNumber
25595
- enter_sourcePageNumber(node, route) {
25596
- const sourcePageNumber = node.value;
25597
- const parent = this.getParentNode(route);
25598
- if (this.isEmptyText(sourcePageNumber)) return false;
25599
- if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
25600
- this.writeNL_IfNotChain(route);
25601
- this.writeOPC();
25602
- this.writeTextOrValue(parent?.value?.item ?? "", TextFormat2.bitmarkText, TextLocation2.tag);
25603
- this.writeCL();
25604
- this.writeOPC();
25605
- this.writeTextOrValue(parent?.value?.lead ?? "", TextFormat2.bitmarkText, TextLocation2.tag);
25606
- this.writeCL();
25607
- this.writeOPC();
25608
- this.writeTextOrValue(
25609
- parent?.value?.pageNumber ?? "",
25610
- TextFormat2.bitmarkText,
25611
- TextLocation2.tag
25612
- );
25613
- this.writeCL();
25614
- this.writeOPC();
25615
- this.writeTextOrValue(sourcePageNumber ?? "", TextFormat2.bitmarkText, TextLocation2.tag);
25616
- this.writeCL();
25617
- return true;
25618
- }
25619
26208
  // bitmarkAst -> bits -> bitsValue -> marginNumber
25620
26209
  enter_marginNumber(node, route) {
25621
26210
  const marginNumber = node.value;
@@ -25636,13 +26225,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
25636
26225
  );
25637
26226
  this.writeCL();
25638
26227
  this.writeOPC();
25639
- this.writeTextOrValue(
25640
- parent?.value?.sourcePageNumber ?? "",
25641
- TextFormat2.bitmarkText,
25642
- TextLocation2.tag
25643
- );
25644
- this.writeCL();
25645
- this.writeOPC();
25646
26228
  this.writeTextOrValue(marginNumber, TextFormat2.bitmarkText, TextLocation2.tag);
25647
26229
  this.writeCL();
25648
26230
  return true;
@@ -25816,7 +26398,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
25816
26398
  enter_elements(_node, _route) {
25817
26399
  }
25818
26400
  between_elements(_node, _left, _right, _route) {
25819
- this.writeCardSetVariantDivider();
26401
+ this.writeCardSetSideDivider();
25820
26402
  }
25821
26403
  // bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards
25822
26404
  between_flashcards(_node, _left, _right, _route) {
@@ -25943,6 +26525,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
25943
26525
  enter_matrix(_node, _route) {
25944
26526
  }
25945
26527
  between_matrix(_node, _left, _right, _route) {
26528
+ if (!this.isCardAllowed) return;
25946
26529
  this.writeCardSetCardDivider();
25947
26530
  }
25948
26531
  // bitmarkAst -> bits -> bitsValue -> cardNode -> pairs -> pairsValue -> values
@@ -25963,12 +26546,83 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
25963
26546
  this.writeCardSetCardDivider();
25964
26547
  }
25965
26548
  // bitmarkAst -> bits -> bitsValue -> cardNode -> table
26549
+ enter_table(node, route) {
26550
+ const parent = this.getParentNode(route);
26551
+ if (parent?.key !== NodeType.cardNode) return true;
26552
+ const table = node.value;
26553
+ if (!table) return true;
26554
+ if (this.writeAdvancedTable(table)) {
26555
+ return false;
26556
+ }
26557
+ return true;
26558
+ }
25966
26559
  between_table(_node, _left, _right, route) {
25967
26560
  const parent = this.getParentNode(route);
25968
26561
  if (parent?.key !== NodeType.cardNode) return;
25969
26562
  if (!this.isCardAllowed) return;
25970
26563
  this.writeCardSetCardDivider();
25971
26564
  }
26565
+ writeAdvancedTable(table) {
26566
+ const normalized = normalizeTableFormat(BitType.tableExtended, table);
26567
+ const sections = [
26568
+ { key: "thead", qualifier: "thead", section: normalized.head },
26569
+ { key: "tbody", qualifier: void 0, section: normalized.body },
26570
+ { key: "tfoot", qualifier: "tfoot", section: normalized.foot }
26571
+ ];
26572
+ let rowCount = 0;
26573
+ for (const { key, qualifier, section } of sections) {
26574
+ const rows = section?.rows ?? [];
26575
+ if (rows.length === 0) {
26576
+ continue;
26577
+ }
26578
+ for (const row of rows) {
26579
+ this.writeCardSetCardDivider(qualifier);
26580
+ this.writeTableRow(row, key);
26581
+ rowCount++;
26582
+ }
26583
+ }
26584
+ return rowCount > 0;
26585
+ }
26586
+ writeTableRow(row, section) {
26587
+ const cells = row?.cells ?? [];
26588
+ if (cells.length === 0) return;
26589
+ for (let index = 0; index < cells.length; index++) {
26590
+ if (index > 0) {
26591
+ this.writeCardSetSideDivider();
26592
+ }
26593
+ this.writeNL();
26594
+ this.writeTableCell(cells[index], section);
26595
+ }
26596
+ }
26597
+ writeTableCell(cell, section) {
26598
+ const defaultCellType = section === "tbody" ? "td" : "th";
26599
+ const cellType = cell.title ? "th" : "td";
26600
+ if (cellType !== defaultCellType) {
26601
+ this.writeTableCellProperty("tableCellType", cellType);
26602
+ this.writeNL();
26603
+ }
26604
+ if (cell.rowspan && cell.rowspan > 1) {
26605
+ this.writeTableCellProperty("tableRowSpan", cell.rowspan);
26606
+ this.writeNL();
26607
+ }
26608
+ if (cell.colspan && cell.colspan > 1) {
26609
+ this.writeTableCellProperty("tableColSpan", cell.colspan);
26610
+ this.writeNL();
26611
+ }
26612
+ if (cell.scope) {
26613
+ this.writeTableCellProperty("tableScope", cell.scope);
26614
+ this.writeNL();
26615
+ }
26616
+ const content = cell.content ?? instance3.EMPTY_STRING;
26617
+ this.writeTextOrValue(content, this.textFormat, TextLocation2.body);
26618
+ }
26619
+ writeTableCellProperty(name, value) {
26620
+ this.writeOPA();
26621
+ this.writeTagKey(name);
26622
+ this.writeColon();
26623
+ this.writeTextOrValue(`${value}`, TextFormat2.plainText, TextLocation2.tag);
26624
+ this.writeCL();
26625
+ }
25972
26626
  // bitmarkAst -> bits -> bitsValue -> cardNode -> table -> data
25973
26627
  // bitmarkAst -> bits -> bitsValue -> cardNode -> pronunciationTable -> data
25974
26628
  between_data(_node, _left, _right, route) {
@@ -26197,6 +26851,27 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
26197
26851
  this.writePropertyStyleResource(node.key, resource);
26198
26852
  return true;
26199
26853
  }
26854
+ // bitmarkAst -> bits -> bitsValue -> platformIcon
26855
+ enter_platformIcon(node, _route) {
26856
+ const resource = node.value;
26857
+ this.writeNL();
26858
+ this.writePropertyStyleResource(node.key, resource);
26859
+ return true;
26860
+ }
26861
+ // bitmarkAst -> bits -> bitsValue -> platformLogo
26862
+ enter_platformLogo(node, _route) {
26863
+ const resource = node.value;
26864
+ this.writeNL();
26865
+ this.writePropertyStyleResource(node.key, resource);
26866
+ return true;
26867
+ }
26868
+ // bitmarkAst -> bits -> bitsValue -> platformBackgroundImage
26869
+ enter_platformBackgroundImage(node, _route) {
26870
+ const resource = node.value;
26871
+ this.writeNL();
26872
+ this.writePropertyStyleResource(node.key, resource);
26873
+ return true;
26874
+ }
26200
26875
  exit_imagePlaceholder(_node, _route) {
26201
26876
  }
26202
26877
  // bitmarkAst -> bits -> bitsValue -> posterImage
@@ -26469,8 +27144,8 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
26469
27144
  } else {
26470
27145
  }
26471
27146
  }
26472
- // bitmarkAst -> bits -> bitsValue -> elements -> elementsValue
26473
- leaf_elementsValue(node, _route) {
27147
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> elements -> elementsValue
27148
+ enter_elementsValue(node, _route) {
26474
27149
  if (node.value) {
26475
27150
  this.writeNL();
26476
27151
  this.writeTextOrValue(node.value, this.textFormat, TextLocation2.body);
@@ -26553,10 +27228,19 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
26553
27228
  }
26554
27229
  }
26555
27230
  // bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> question
27231
+ // bitmarkAst -> bits -> bitsValue -> cardNode -> questions -> questionsValue -> question
27232
+ enter_question(node, route) {
27233
+ const parent = this.getParentNode(route);
27234
+ if (parent?.key !== NodeType.questionsValue) return;
27235
+ if (node.value) {
27236
+ this.writeNL();
27237
+ this.writeTextOrValue(node.value, this.textFormat, TextLocation2.body);
27238
+ }
27239
+ }
26556
27240
  // bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards -> flashcardsValue -> question
26557
27241
  leaf_question(node, route) {
26558
27242
  const parent = this.getParentNode(route);
26559
- if (parent?.key !== NodeType.questionsValue && parent?.key !== NodeType.flashcardsValue) return;
27243
+ if (parent?.key !== NodeType.flashcardsValue) return;
26560
27244
  if (node.value) {
26561
27245
  this.writeNL();
26562
27246
  this.writeTextOrValue(node.value, this.textFormat, TextLocation2.body);
@@ -27032,12 +27716,12 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27032
27716
  } else {
27033
27717
  }
27034
27718
  }
27035
- writeCardSetCardDivider() {
27719
+ writeCardSetCardDivider(qualifier) {
27036
27720
  this.writeNL();
27037
- if (this.options.cardSetVersion === CardSetVersion.v1) {
27038
- this.write("===");
27039
- } else {
27040
- this.write("====");
27721
+ const divider = this.getCardDividerMarker();
27722
+ this.write(divider);
27723
+ if (qualifier) {
27724
+ this.appendCardDividerQualifier(qualifier);
27041
27725
  }
27042
27726
  }
27043
27727
  writeCardSetSideDivider() {
@@ -27056,6 +27740,20 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27056
27740
  this.write("++");
27057
27741
  }
27058
27742
  }
27743
+ getCardDividerMarker() {
27744
+ return this.options.cardSetVersion === CardSetVersion.v1 ? "===" : "====";
27745
+ }
27746
+ appendCardDividerQualifier(qualifier) {
27747
+ const marker = this.getCardDividerMarker();
27748
+ const normalizedQualifier = instance3.breakscape(qualifier, {
27749
+ format: TextFormat2.plainText,
27750
+ location: TextLocation2.tag
27751
+ });
27752
+ this.write(" ");
27753
+ this.write(normalizedQualifier);
27754
+ this.write(" ");
27755
+ this.write(marker);
27756
+ }
27059
27757
  writeNL_IfNotChain(route) {
27060
27758
  if (!this.isChain(route)) {
27061
27759
  this.writeNL();
@@ -27160,7 +27858,10 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
27160
27858
  return !!writeFormat;
27161
27859
  }
27162
27860
  calculateIsCardAllowed() {
27163
- return this.isBodyBitmarkText && !this.isOfBitType1();
27861
+ return this.isBodyBitmarkText && !this.isOfBitType1() && !this.isTableBitType();
27862
+ }
27863
+ isTableBitType() {
27864
+ return this.isOfBitType([BitType.table]);
27164
27865
  }
27165
27866
  isOfBitType1() {
27166
27867
  return this.isOfBitType([
@@ -27467,10 +28168,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
27467
28168
  enter_pageNumber(node, route) {
27468
28169
  return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
27469
28170
  }
27470
- // bitmarkAst -> bits -> bitsValue -> sourcePageNumber
27471
- enter_sourcePageNumber(node, route) {
27472
- return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
27473
- }
27474
28171
  // bitmarkAst -> bits -> bitsValue -> marginNumber
27475
28172
  enter_marginNumber(node, route) {
27476
28173
  return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
@@ -27681,7 +28378,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
27681
28378
  const parent = this.getParentNode(route);
27682
28379
  if (parent?.key !== NodeType.cardNode) return;
27683
28380
  if (statement) {
27684
- this.bitJson.statement = statement.statement ?? "";
28381
+ this.bitJson.statement = statement.statement ?? [];
27685
28382
  this.bitJson.isCorrect = statement.isCorrect ?? false;
27686
28383
  this.bitJson.example = statement.example;
27687
28384
  this.bitJson.isExample = statement.isExample;
@@ -27757,6 +28454,18 @@ var JsonGenerator = class extends AstWalkerGenerator {
27757
28454
  enter_imagePlaceholder(node, route) {
27758
28455
  return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
27759
28456
  }
28457
+ // bitmarkAst -> bits -> bitsValue -> platformIcon
28458
+ enter_platformIcon(node, route) {
28459
+ return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
28460
+ }
28461
+ // bitmarkAst -> bits -> bitsValue -> platformLogo
28462
+ enter_platformLogo(node, route) {
28463
+ return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
28464
+ }
28465
+ // bitmarkAst -> bits -> bitsValue -> platformBackgroundImage
28466
+ enter_platformBackgroundImage(node, route) {
28467
+ return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
28468
+ }
27760
28469
  // bitmarkAst -> bits -> bitsValue -> resources
27761
28470
  enter_resources(node, route) {
27762
28471
  const resources = node.value;
@@ -28193,7 +28902,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
28193
28902
  delete bitJson.item;
28194
28903
  delete bitJson.lead;
28195
28904
  delete bitJson.pageNumber;
28196
- delete bitJson.sourcePageNumber;
28197
28905
  delete bitJson.marginNumber;
28198
28906
  delete bitJson.hint;
28199
28907
  delete bitJson.instruction;
@@ -28205,8 +28913,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
28205
28913
  if (bitJson.lead == null || bitJson.lead?.length === 0) delete bitJson.lead;
28206
28914
  if (bitJson.pageNumber == null || bitJson.pageNumber?.length === 0)
28207
28915
  delete bitJson.pageNumber;
28208
- if (bitJson.sourcePageNumber == null || bitJson.sourcePageNumber?.length === 0)
28209
- delete bitJson.sourcePageNumber;
28210
28916
  if (bitJson.marginNumber == null || bitJson.marginNumber?.length === 0)
28211
28917
  delete bitJson.marginNumber;
28212
28918
  if (bitJson.hint == null || bitJson.hint?.length === 0) delete bitJson.hint;
@@ -28218,7 +28924,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
28218
28924
  if (bitJson.hint == null) bitJson.hint = this.textDefault;
28219
28925
  if (bitJson.instruction == null) bitJson.instruction = this.textDefault;
28220
28926
  if (bitJson.pageNumber == null) bitJson.pageNumber = this.textDefault;
28221
- if (bitJson.sourcePageNumber == null) bitJson.sourcePageNumber = this.textDefault;
28222
28927
  if (bitJson.marginNumber == null) bitJson.marginNumber = this.textDefault;
28223
28928
  }
28224
28929
  if (bitJson.body == null) bitJson.body = this.bodyDefault;
@@ -28295,6 +29000,9 @@ var JsonGenerator = class extends AstWalkerGenerator {
28295
29000
  if (bitJson.footer == null) bitJson.footer = this.textDefault;
28296
29001
  if (bitJson.questions == null) bitJson.questions = [];
28297
29002
  }
29003
+ if (instance2.isOfBitType(bitType, BitType.sequence)) {
29004
+ if (bitJson.elements == null) bitJson.elements = [];
29005
+ }
28298
29006
  if (bitType === BitType.matchMatrix) {
28299
29007
  isTopLevelExample = true;
28300
29008
  }
@@ -28355,6 +29063,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
28355
29063
  }
28356
29064
  if (instance2.isOfBitType(bitType, BitType.book)) {
28357
29065
  if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
29066
+ if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;
28358
29067
  if (bitJson.hasMarkAsDone == null) bitJson.hasMarkAsDone = false;
28359
29068
  if (bitJson.processHandIn == null) bitJson.processHandIn = false;
28360
29069
  if (bitJson.isPublic == null) bitJson.isPublic = false;
@@ -29008,6 +29717,9 @@ var BitmarkPegParserHelper = class {
29008
29717
  __publicField(this, "cardIndex", 0);
29009
29718
  __publicField(this, "cardSideIndex", 0);
29010
29719
  __publicField(this, "cardVariantIndex", 0);
29720
+ __publicField(this, "currentCardQualifier");
29721
+ __publicField(this, "currentSideQualifier");
29722
+ __publicField(this, "currentVariantQualifier");
29011
29723
  __publicField(this, "parse");
29012
29724
  __publicField(this, "parserText");
29013
29725
  __publicField(this, "parserLocation");
@@ -29176,30 +29888,43 @@ var BitmarkPegParserHelper = class {
29176
29888
  cardIndex,
29177
29889
  cardSideIndex,
29178
29890
  cardVariantIndex: cardContentIndex,
29179
- value: value2
29891
+ value: value2,
29892
+ cardQualifier,
29893
+ cardSideQualifier,
29894
+ cardVariantQualifier
29180
29895
  } = cardData;
29181
29896
  let card = unparsedCardSet.cards[cardIndex];
29182
29897
  if (!card) {
29183
29898
  card = {
29184
- sides: []
29899
+ sides: [],
29900
+ qualifier: cardQualifier
29185
29901
  };
29186
29902
  unparsedCardSet.cards[cardIndex] = card;
29903
+ } else if (cardQualifier && !card.qualifier) {
29904
+ card.qualifier = cardQualifier;
29187
29905
  }
29188
29906
  let side = card.sides[cardSideIndex];
29189
29907
  if (!side) {
29190
29908
  side = {
29191
- variants: []
29909
+ variants: [],
29910
+ qualifier: cardSideQualifier
29192
29911
  };
29193
29912
  card.sides[cardSideIndex] = side;
29913
+ } else if (cardSideQualifier && !side.qualifier) {
29914
+ side.qualifier = cardSideQualifier;
29194
29915
  }
29195
29916
  const variant = side.variants[cardContentIndex];
29196
29917
  if (!variant) {
29197
29918
  side.variants[cardContentIndex] = {
29198
29919
  value: value2,
29199
- parser: parser3
29920
+ parser: parser3,
29921
+ qualifier: cardVariantQualifier
29200
29922
  };
29201
29923
  } else {
29202
29924
  side.variants[cardContentIndex].value += value2;
29925
+ if (cardVariantQualifier && !variant.qualifier) {
29926
+ variant.qualifier = cardVariantQualifier;
29927
+ }
29203
29928
  }
29204
29929
  }
29205
29930
  unparsedCardSet.cards = unparsedCardSet.cards.filter((card) => {
@@ -29212,12 +29937,14 @@ var BitmarkPegParserHelper = class {
29212
29937
  });
29213
29938
  for (const unparsedCard of unparsedCardSet.cards) {
29214
29939
  const card = {
29215
- sides: []
29940
+ sides: [],
29941
+ qualifier: unparsedCard.qualifier
29216
29942
  };
29217
29943
  cardSet.cards.push(card);
29218
29944
  for (const unparsedSide of unparsedCard.sides) {
29219
29945
  const side = {
29220
- variants: []
29946
+ variants: [],
29947
+ qualifier: unparsedSide.qualifier
29221
29948
  };
29222
29949
  card.sides.push(side);
29223
29950
  for (const unparsedContent of unparsedSide.variants) {
@@ -29242,7 +29969,8 @@ var BitmarkPegParserHelper = class {
29242
29969
  if (DEBUG_TRACE_CARD_PARSED) this.debugPrint("parsedCardContent", content);
29243
29970
  side.variants.push({
29244
29971
  parser: parser2,
29245
- content
29972
+ content,
29973
+ qualifier: unparsedContent.qualifier
29246
29974
  });
29247
29975
  }
29248
29976
  }
@@ -29262,12 +29990,18 @@ var BitmarkPegParserHelper = class {
29262
29990
  this.cardIndex = -1;
29263
29991
  this.cardSideIndex = 0;
29264
29992
  this.cardVariantIndex = 0;
29993
+ this.currentCardQualifier = void 0;
29994
+ this.currentSideQualifier = void 0;
29995
+ this.currentVariantQualifier = void 0;
29265
29996
  }
29266
29997
  handleCardSetEnd() {
29267
29998
  if (DEBUG_TRACE_CARD_SET_END) this.debugPrint("CardSetEnd");
29268
29999
  this.cardIndex = 0;
29269
30000
  this.cardSideIndex = 0;
29270
30001
  this.cardVariantIndex = 0;
30002
+ this.currentCardQualifier = void 0;
30003
+ this.currentSideQualifier = void 0;
30004
+ this.currentVariantQualifier = void 0;
29271
30005
  }
29272
30006
  handleCards(value) {
29273
30007
  return value;
@@ -29277,27 +30011,45 @@ var BitmarkPegParserHelper = class {
29277
30011
  let isCardDivider = false;
29278
30012
  let isSideDivider = false;
29279
30013
  let isVariantDivider = false;
30014
+ let qualifier;
29280
30015
  if (Array.isArray(value) && value.length === 2) {
29281
- value = value[0];
29282
- if (version === CardSetVersion.v1) {
29283
- isCardDivider = value === CARD_DIVIDER_V1;
29284
- isSideDivider = value === CARD_SIDE_DIVIDER_V1;
29285
- isVariantDivider = value === CARD_VARIANT_DIVIDER_V1;
30016
+ const [divider, maybeQualifier] = value;
30017
+ if (typeof divider === "string") {
30018
+ value = divider;
30019
+ if (typeof maybeQualifier === "string" && maybeQualifier.trim() === maybeQualifier && maybeQualifier.length > 0) {
30020
+ qualifier = maybeQualifier;
30021
+ }
29286
30022
  } else {
29287
- isCardDivider = value === CARD_DIVIDER_V2;
29288
- isSideDivider = value === CARD_SIDE_DIVIDER_V2;
29289
- isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
30023
+ value = divider;
29290
30024
  }
30025
+ } else if (Array.isArray(value) && value.length === 1) {
30026
+ const [divider] = value;
30027
+ value = divider;
30028
+ }
30029
+ if (version === CardSetVersion.v1) {
30030
+ isCardDivider = value === CARD_DIVIDER_V1;
30031
+ isSideDivider = value === CARD_SIDE_DIVIDER_V1;
30032
+ isVariantDivider = value === CARD_VARIANT_DIVIDER_V1;
30033
+ } else {
30034
+ isCardDivider = value === CARD_DIVIDER_V2;
30035
+ isSideDivider = value === CARD_SIDE_DIVIDER_V2;
30036
+ isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
29291
30037
  }
29292
30038
  if (isCardDivider) {
29293
30039
  this.cardIndex++;
29294
30040
  this.cardSideIndex = 0;
29295
30041
  this.cardVariantIndex = 0;
30042
+ this.currentCardQualifier = qualifier;
30043
+ this.currentSideQualifier = void 0;
30044
+ this.currentVariantQualifier = void 0;
29296
30045
  } else if (isSideDivider) {
29297
30046
  this.cardSideIndex++;
29298
30047
  this.cardVariantIndex = 0;
30048
+ this.currentSideQualifier = qualifier;
30049
+ this.currentVariantQualifier = void 0;
29299
30050
  } else if (isVariantDivider) {
29300
30051
  this.cardVariantIndex++;
30052
+ this.currentVariantQualifier = qualifier;
29301
30053
  }
29302
30054
  if (this.isType(value, TypeKey.Card)) return value;
29303
30055
  return {
@@ -29306,7 +30058,10 @@ var BitmarkPegParserHelper = class {
29306
30058
  cardIndex: this.cardIndex,
29307
30059
  cardSideIndex: this.cardSideIndex,
29308
30060
  cardVariantIndex: this.cardVariantIndex,
29309
- value: ""
30061
+ value: "",
30062
+ cardQualifier: this.currentCardQualifier,
30063
+ cardSideQualifier: this.currentSideQualifier,
30064
+ cardVariantQualifier: this.currentVariantQualifier
29310
30065
  },
29311
30066
  parser: {
29312
30067
  text: this.parserText(),
@@ -29327,7 +30082,10 @@ var BitmarkPegParserHelper = class {
29327
30082
  cardIndex: this.cardIndex,
29328
30083
  cardSideIndex: this.cardSideIndex,
29329
30084
  cardVariantIndex: this.cardVariantIndex,
29330
- value
30085
+ value,
30086
+ cardQualifier: this.currentCardQualifier,
30087
+ cardSideQualifier: this.currentSideQualifier,
30088
+ cardVariantQualifier: this.currentVariantQualifier
29331
30089
  },
29332
30090
  parser: {
29333
30091
  text: this.parserText(),
@@ -29673,7 +30431,7 @@ var BitmarkPegParserValidator = class {
29673
30431
  let tagData = validTypeKeys.get(validTypeKey);
29674
30432
  if (!tagData && typeKey === TypeKey.Property) {
29675
30433
  const resourceKey = key.replace(/^@/, "&");
29676
- if (resourceKey === ConfigKey.resource_backgroundWallpaper || resourceKey === ConfigKey.resource_imagePlaceholder) {
30434
+ if (resourceKey === ConfigKey.resource_backgroundWallpaper || resourceKey === ConfigKey.resource_imagePlaceholder || resourceKey === ConfigKey.resource_platformIcon || resourceKey === ConfigKey.resource_platformLogo || resourceKey === ConfigKey.resource_platformBackgroundImage) {
29677
30435
  tagData = validTypeKeys.get(resourceKey);
29678
30436
  if (tagData) {
29679
30437
  typeKey = TypeKey.Resource;
@@ -30410,6 +31168,7 @@ function buildCards(context, bitType, textFormat, parsedCardSet, statementV1, st
30410
31168
  result = parsePronunciationTable(context, bitType, processedCardSet);
30411
31169
  break;
30412
31170
  case CardSetConfigKey.table:
31171
+ case CardSetConfigKey.tableExtended:
30413
31172
  result = parseTable(context, bitType, processedCardSet);
30414
31173
  break;
30415
31174
  case CardSetConfigKey.botActionResponses:
@@ -30446,20 +31205,23 @@ function processCardSet(context, parsedCardSet) {
30446
31205
  for (const card of parsedCardSet.cards) {
30447
31206
  const processedCard = {
30448
31207
  no: cardNo++,
30449
- sides: []
31208
+ sides: [],
31209
+ qualifier: card.qualifier
30450
31210
  };
30451
31211
  processedCardSet.cards.push(processedCard);
30452
31212
  for (const side of card.sides) {
30453
31213
  const processedSide = {
30454
31214
  no: sideNo++,
30455
- variants: []
31215
+ variants: [],
31216
+ qualifier: side.qualifier
30456
31217
  };
30457
31218
  processedCard.sides.push(processedSide);
30458
31219
  for (const variant of side.variants) {
30459
31220
  const { parser: parser2, content } = variant;
30460
31221
  const processedVariant = {
30461
31222
  parser: parser2,
30462
- no: variantNo++
31223
+ no: variantNo++,
31224
+ qualifier: variant.qualifier
30463
31225
  };
30464
31226
  processedSide.variants.push(processedVariant);
30465
31227
  const tagsConfig = instance2.getTagsConfigForCardSet(bitType, sideNo, variantNo);
@@ -30573,7 +31335,8 @@ function parseElements(_context, _bitType, cardSet) {
30573
31335
  for (const side of card.sides) {
30574
31336
  for (const content of side.variants) {
30575
31337
  const tags2 = content.data;
30576
- elements.push(tags2.cardBodyStr ?? "");
31338
+ const element = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
31339
+ elements.push(element);
30577
31340
  }
30578
31341
  }
30579
31342
  }
@@ -30590,7 +31353,7 @@ function parseStatements(_context, _bitType, cardSet, statementV1, statementsV1)
30590
31353
  if (Array.isArray(chainedStatements)) {
30591
31354
  for (const s of chainedStatements) {
30592
31355
  const statement = {
30593
- statement: s.statement ?? "",
31356
+ statement: s.statement ?? [],
30594
31357
  isCorrect: s.isCorrect,
30595
31358
  item: s.item,
30596
31359
  lead: s.lead,
@@ -30732,7 +31495,7 @@ function parseQuestions(_context, _bitType, cardSet) {
30732
31495
  for (const content of side.variants) {
30733
31496
  const tags2 = content.data;
30734
31497
  const q = {
30735
- question: tags2.cardBodyStr ?? "",
31498
+ question: tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING,
30736
31499
  ...tags2
30737
31500
  };
30738
31501
  if (q) questions.push(q);
@@ -30936,37 +31699,158 @@ function parsePronunciationTable(_context, _bitType, cardSet) {
30936
31699
  };
30937
31700
  return { pronunciationTable: table };
30938
31701
  }
30939
- function parseTable(_context, _bitType, cardSet) {
30940
- let isHeading = false;
30941
- const columns = [];
30942
- const rows = [];
30943
- let rowValues = [];
31702
+ function parseTable(context, _bitType, cardSet) {
31703
+ const sectionRows = {
31704
+ thead: [],
31705
+ tbody: [],
31706
+ tfoot: []
31707
+ };
31708
+ const getNormalizedQualifier = (rawQualifier) => {
31709
+ if (!rawQualifier) return void 0;
31710
+ const normalized = rawQualifier.trim().toLowerCase();
31711
+ if (normalized === "thead" || normalized === "tbody" || normalized === "tfoot") {
31712
+ return normalized;
31713
+ }
31714
+ context.addWarning(`Unknown table section qualifier '${rawQualifier}', defaulting to tbody.`);
31715
+ return void 0;
31716
+ };
31717
+ const isLegacyHeadingRow = (card, cardIndex) => {
31718
+ if (cardIndex !== 0) return false;
31719
+ return card.sides.some(
31720
+ (side) => side.variants.some((variant) => {
31721
+ const titles = variant.data.title;
31722
+ return Array.isArray(titles) && titles[1]?.titleAst;
31723
+ })
31724
+ );
31725
+ };
31726
+ const readExtraProperty = (extra, key) => {
31727
+ if (!extra) return void 0;
31728
+ const value = extra[key];
31729
+ return Array.isArray(value) ? value[0] : value;
31730
+ };
31731
+ const cleanupExtraProperties = (tags2, keys) => {
31732
+ const extra = tags2.extraProperties;
31733
+ if (!extra) return;
31734
+ for (const key of keys) {
31735
+ if (Object.prototype.hasOwnProperty.call(extra, key)) delete extra[key];
31736
+ }
31737
+ if (Object.keys(extra).length === 0) {
31738
+ delete tags2.extraProperties;
31739
+ }
31740
+ };
31741
+ const normalizeCellType = (raw, section) => {
31742
+ if (typeof raw === "string") {
31743
+ const normalized = raw.trim().toLowerCase();
31744
+ if (normalized === "th" || normalized === "td") {
31745
+ return normalized;
31746
+ }
31747
+ context.addWarning(
31748
+ `Invalid table cell type '${raw}', using default for section '${section}'.`
31749
+ );
31750
+ }
31751
+ return section === "tbody" ? "td" : "th";
31752
+ };
31753
+ const normalizeSpan = (raw, kind) => {
31754
+ if (raw == null) return 1;
31755
+ const numeric = instance6.asNumber(raw);
31756
+ if (numeric == null || !Number.isInteger(numeric) || numeric < 1) {
31757
+ context.addWarning(`Invalid table ${kind} '${raw}', defaulting to 1.`);
31758
+ return 1;
31759
+ }
31760
+ return numeric;
31761
+ };
31762
+ const normalizeScope = (raw) => {
31763
+ if (raw == null) return void 0;
31764
+ if (typeof raw !== "string") {
31765
+ context.addWarning(`Invalid table scope '${raw}', ignoring.`);
31766
+ return void 0;
31767
+ }
31768
+ const normalized = raw.trim().toLowerCase();
31769
+ switch (normalized) {
31770
+ case "row":
31771
+ case "col":
31772
+ case "rowgroup":
31773
+ case "colgroup":
31774
+ return normalized;
31775
+ default:
31776
+ context.addWarning(`Invalid table scope '${raw}', ignoring.`);
31777
+ return void 0;
31778
+ }
31779
+ };
31780
+ const buildCell = (variant, section) => {
31781
+ const tags2 = variant.data;
31782
+ const heading = tags2.title && tags2.title[1]?.titleAst;
31783
+ const bodyContent = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
31784
+ const content = heading ?? bodyContent;
31785
+ const cellTypeRaw = tags2.tableCellType ?? readExtraProperty(tags2.extraProperties, "tableCellType");
31786
+ const rowSpanRaw = tags2.tableRowSpan ?? readExtraProperty(tags2.extraProperties, "tableRowSpan");
31787
+ const colSpanRaw = tags2.tableColSpan ?? readExtraProperty(tags2.extraProperties, "tableColSpan");
31788
+ const scopeRaw = tags2.tableScope ?? readExtraProperty(tags2.extraProperties, "tableScope");
31789
+ cleanupExtraProperties(tags2, ["tableCellType", "tableRowSpan", "tableColSpan", "tableScope"]);
31790
+ const cellType = normalizeCellType(cellTypeRaw, section);
31791
+ const rowspan = normalizeSpan(rowSpanRaw, "rowspan");
31792
+ const colspan = normalizeSpan(colSpanRaw, "colspan");
31793
+ const scope = normalizeScope(scopeRaw);
31794
+ const cell = {
31795
+ content
31796
+ };
31797
+ if (cellType === "th") cell.title = true;
31798
+ if (rowspan > 1) cell.rowspan = rowspan;
31799
+ if (colspan > 1) cell.colspan = colspan;
31800
+ if (scope) cell.scope = scope;
31801
+ return cell;
31802
+ };
31803
+ const resolveSectionQualifier = (card) => {
31804
+ const cardQualifier = getNormalizedQualifier(card.qualifier);
31805
+ if (cardQualifier) return cardQualifier;
31806
+ for (const side of card.sides) {
31807
+ const sideQualifier = getNormalizedQualifier(side.qualifier);
31808
+ if (sideQualifier) return sideQualifier;
31809
+ for (const variant of side.variants) {
31810
+ const variantQualifier = getNormalizedQualifier(variant.qualifier);
31811
+ if (variantQualifier) return variantQualifier;
31812
+ }
31813
+ }
31814
+ return void 0;
31815
+ };
30944
31816
  for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
30945
31817
  const card = cardSet.cards[cardIdx];
30946
- isHeading = false;
30947
- rowValues = [];
31818
+ const qualifier = resolveSectionQualifier(card);
31819
+ const section = qualifier ? qualifier : isLegacyHeadingRow(card, cardIdx) ? "thead" : "tbody";
31820
+ const cells = [];
30948
31821
  for (const side of card.sides) {
30949
- for (const content of side.variants) {
30950
- const tags2 = content.data;
30951
- const { title, cardBody } = tags2;
30952
- const heading = title && title[1].titleAst;
30953
- if (cardIdx === 0 && heading != null) isHeading = true;
30954
- if (isHeading) {
30955
- columns.push(heading ?? []);
30956
- } else {
30957
- const value = cardBody?.body ?? [];
30958
- rowValues.push(value);
30959
- }
31822
+ for (const variant of side.variants) {
31823
+ cells.push(buildCell(variant, section));
30960
31824
  }
30961
31825
  }
30962
- if (!isHeading) {
30963
- rows.push(rowValues);
30964
- }
31826
+ sectionRows[section].push({
31827
+ cells
31828
+ });
31829
+ }
31830
+ const table = {};
31831
+ const hasHeadRows = sectionRows.thead.length > 0;
31832
+ const hasBodyRows = sectionRows.tbody.length > 0;
31833
+ const hasFootRows = sectionRows.tfoot.length > 0;
31834
+ if (hasHeadRows) {
31835
+ table.head = {
31836
+ rows: sectionRows.thead
31837
+ };
31838
+ }
31839
+ if (hasBodyRows) {
31840
+ table.body = {
31841
+ rows: sectionRows.tbody
31842
+ };
31843
+ }
31844
+ if (hasFootRows) {
31845
+ table.foot = {
31846
+ rows: sectionRows.tfoot
31847
+ };
31848
+ }
31849
+ if (!hasHeadRows && !hasBodyRows && !hasFootRows) {
31850
+ table.head = { rows: [] };
31851
+ table.body = { rows: [] };
31852
+ table.foot = { rows: [] };
30965
31853
  }
30966
- const table = {
30967
- columns,
30968
- data: rows
30969
- };
30970
31854
  return { table };
30971
31855
  }
30972
31856
  function parseBotActionResponses(_context, _bitType, cardSet) {
@@ -31117,11 +32001,11 @@ function extractHeadingCard(cardSet, valuesIsArray = false) {
31117
32001
  function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
31118
32002
  const { type, value } = content;
31119
32003
  const { textFormat } = context;
31120
- const textParser9 = new TextParser();
32004
+ const textParser10 = new TextParser();
31121
32005
  const trimmedStringValue = stringUtils.trimmedString(value);
31122
32006
  switch (type) {
31123
32007
  case TypeKey.Instruction: {
31124
- target.instruction = textParser9.toAst(trimmedStringValue, {
32008
+ target.instruction = textParser10.toAst(trimmedStringValue, {
31125
32009
  format: textFormat,
31126
32010
  location: TextLocation2.tag
31127
32011
  });
@@ -31132,7 +32016,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
31132
32016
  break;
31133
32017
  }
31134
32018
  case TypeKey.Hint: {
31135
- target.hint = textParser9.toAst(trimmedStringValue, {
32019
+ target.hint = textParser10.toAst(trimmedStringValue, {
31136
32020
  format: textFormat,
31137
32021
  location: TextLocation2.tag
31138
32022
  });
@@ -31162,7 +32046,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
31162
32046
  format: TextFormat2.bitmarkText,
31163
32047
  location: TextLocation2.tag
31164
32048
  });
31165
- target.__sampleSolutionAst = textParser9.toAst(trimmedStringValue, {
32049
+ target.__sampleSolutionAst = textParser10.toAst(trimmedStringValue, {
31166
32050
  format: textFormat,
31167
32051
  location: TextLocation2.tag
31168
32052
  });
@@ -31269,10 +32153,10 @@ function buildGap(context, _contentDepth, tagsConfig, content) {
31269
32153
  function itemLeadTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
31270
32154
  const { textFormat } = context;
31271
32155
  const { value } = content;
31272
- const textParser9 = new TextParser();
32156
+ const textParser10 = new TextParser();
31273
32157
  const trimmedStringValue = stringUtils.trimmedString(value);
31274
32158
  if (!target.itemLead) target.itemLead = [];
31275
- const text = textParser9.toAst(trimmedStringValue, {
32159
+ const text = textParser10.toAst(trimmedStringValue, {
31276
32160
  format: textFormat,
31277
32161
  location: TextLocation2.tag
31278
32162
  });
@@ -31950,7 +32834,7 @@ function resourceContentProcessor(context, _contentDepth, tagsConfig, content, t
31950
32834
  ...tags2
31951
32835
  });
31952
32836
  if (resource) {
31953
- if (configKey === ConfigKey.resource_backgroundWallpaper || configKey === ConfigKey.resource_imagePlaceholder) {
32837
+ if (configKey === ConfigKey.resource_backgroundWallpaper || configKey === ConfigKey.resource_imagePlaceholder || configKey === ConfigKey.resource_platformIcon || configKey === ConfigKey.resource_platformLogo || configKey === ConfigKey.resource_platformBackgroundImage) {
31954
32838
  if (target.propertyStyleResources) target.propertyStyleResources[resourceType] = resource;
31955
32839
  } else {
31956
32840
  resources.push(resource);
@@ -32023,7 +32907,9 @@ function buildTitles(_context, bitType, title) {
32023
32907
  }
32024
32908
 
32025
32909
  // src/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.ts
32026
- function trueFalseTagContentProcessor(_context, _contentDepth, content, target) {
32910
+ var textParser9 = new TextParser();
32911
+ function trueFalseTagContentProcessor(context, _contentDepth, content, target) {
32912
+ const { textFormat } = context;
32027
32913
  const { type, value } = content;
32028
32914
  const trueFalse = target.trueFalse;
32029
32915
  if (!trueFalse) return;
@@ -32034,8 +32920,13 @@ function trueFalseTagContentProcessor(_context, _contentDepth, content, target)
32034
32920
  location: TextLocation2.tag
32035
32921
  }
32036
32922
  );
32923
+ const textAst = textParser9.toAst(trimmedStringValue ?? "", {
32924
+ format: textFormat,
32925
+ location: TextLocation2.tag
32926
+ });
32037
32927
  trueFalse.push({
32038
32928
  text: trimmedStringValue,
32929
+ textAst,
32039
32930
  isCorrect: type === TypeKey.True,
32040
32931
  __isDefaultExample: false
32041
32932
  });
@@ -32139,7 +33030,7 @@ function buildStatementsChoicesResponses(context, tagsConfig, trueFalseContent)
32139
33030
  const { statement: _ignore, ...tagsRest } = tags2;
32140
33031
  const statement = {
32141
33032
  ...firstTrueFalse,
32142
- statement: firstTrueFalse.text,
33033
+ statement: firstTrueFalse.textAst ?? [],
32143
33034
  ...tagsRest
32144
33035
  };
32145
33036
  if (statement) statements.push(statement);
@@ -32658,8 +33549,7 @@ var BitmarkPegParserProcessor = class {
32658
33549
  if (l > 0) result.item = result.itemLead[0];
32659
33550
  if (l > 1) result.lead = result.itemLead[1];
32660
33551
  if (l > 2) result.pageNumber = result.itemLead[2];
32661
- if (l > 3) result.sourcePageNumber = result.itemLead[3];
32662
- if (l > 4) result.marginNumber = result.itemLead[l - 1];
33552
+ if (l > 3) result.marginNumber = result.itemLead[l - 1];
32663
33553
  }
32664
33554
  if (inBit) {
32665
33555
  result.body = instance11.process(
@@ -32907,36 +33797,39 @@ function peg$parse2(input, options) {
32907
33797
  const peg$c7 = "text";
32908
33798
  const peg$c8 = "~~~~";
32909
33799
  const peg$c9 = "footer";
32910
- const peg$c10 = "--";
32911
- const peg$c11 = "++";
32912
- const peg$c12 = "===";
32913
- const peg$c13 = "==";
32914
- const peg$c14 = "[@id";
32915
- const peg$c15 = "#";
32916
- const peg$c16 = "[\u25BC";
32917
- const peg$c17 = "[\u25BA";
32918
- const peg$c18 = "[@";
32919
- const peg$c19 = "[%";
32920
- const peg$c20 = "[!";
32921
- const peg$c21 = "[?";
32922
- const peg$c22 = "[+";
32923
- const peg$c23 = "[-";
32924
- const peg$c24 = "[$";
32925
- const peg$c25 = "[_";
32926
- const peg$c26 = "[=";
32927
- const peg$c27 = "[&";
32928
- const peg$c28 = "^]";
32929
- const peg$c29 = "id:";
32930
- const peg$c30 = ".";
32931
- const peg$c31 = "\n";
32932
- const peg$c32 = "\r\n";
33800
+ const peg$c10 = " ";
33801
+ const peg$c11 = "--";
33802
+ const peg$c12 = "++";
33803
+ const peg$c13 = "===";
33804
+ const peg$c14 = "==";
33805
+ const peg$c15 = "[@id";
33806
+ const peg$c16 = "#";
33807
+ const peg$c17 = "[\u25BC";
33808
+ const peg$c18 = "[\u25BA";
33809
+ const peg$c19 = "[@";
33810
+ const peg$c20 = "[%";
33811
+ const peg$c21 = "[!";
33812
+ const peg$c22 = "[?";
33813
+ const peg$c23 = "[+";
33814
+ const peg$c24 = "[-";
33815
+ const peg$c25 = "[$";
33816
+ const peg$c26 = "[_";
33817
+ const peg$c27 = "[=";
33818
+ const peg$c28 = "[&";
33819
+ const peg$c29 = "^]";
33820
+ const peg$c30 = "id:";
33821
+ const peg$c31 = ".";
33822
+ const peg$c32 = "\n";
33823
+ const peg$c33 = "\r\n";
32933
33824
  const peg$r0 = /^[^\]]/;
32934
- const peg$r1 = /^[^:\]]/;
32935
- const peg$r2 = /^[^&:\]]/;
32936
- const peg$r3 = /^[^\n\r\u2028\u2029]/;
32937
- const peg$r4 = /^[ \t]/;
32938
- const peg$r5 = /^[\r\u2028-\u2029]/;
32939
- const peg$r6 = /^[ \t\n\r\u2028\u2029]/;
33825
+ const peg$r1 = /^[a-z]/;
33826
+ const peg$r2 = /^[a-z0-9\-]/;
33827
+ const peg$r3 = /^[^:\]]/;
33828
+ const peg$r4 = /^[^&:\]]/;
33829
+ const peg$r5 = /^[^\n\r\u2028\u2029]/;
33830
+ const peg$r6 = /^[ \t]/;
33831
+ const peg$r7 = /^[\r\u2028-\u2029]/;
33832
+ const peg$r8 = /^[ \t\n\r\u2028\u2029]/;
32940
33833
  const peg$e0 = peg$literalExpectation("[.", false);
32941
33834
  const peg$e1 = peg$classExpectation(["]"], true, false, false);
32942
33835
  const peg$e2 = peg$literalExpectation("]", false);
@@ -32949,40 +33842,43 @@ function peg$parse2(input, options) {
32949
33842
  const peg$e9 = peg$literalExpectation("text", false);
32950
33843
  const peg$e10 = peg$literalExpectation("~~~~", false);
32951
33844
  const peg$e11 = peg$literalExpectation("footer", false);
32952
- const peg$e12 = peg$literalExpectation("--", false);
32953
- const peg$e13 = peg$literalExpectation("++", false);
32954
- const peg$e14 = peg$literalExpectation("===", false);
32955
- const peg$e15 = peg$literalExpectation("==", false);
32956
- const peg$e16 = peg$literalExpectation("[@id", false);
32957
- const peg$e17 = peg$literalExpectation("#", false);
32958
- const peg$e18 = peg$literalExpectation("[\u25BC", false);
32959
- const peg$e19 = peg$literalExpectation("[\u25BA", false);
32960
- const peg$e20 = peg$literalExpectation("[@", false);
32961
- const peg$e21 = peg$literalExpectation("[%", false);
32962
- const peg$e22 = peg$literalExpectation("[!", false);
32963
- const peg$e23 = peg$literalExpectation("[?", false);
32964
- const peg$e24 = peg$literalExpectation("[+", false);
32965
- const peg$e25 = peg$literalExpectation("[-", false);
32966
- const peg$e26 = peg$literalExpectation("[$", false);
32967
- const peg$e27 = peg$literalExpectation("[_", false);
32968
- const peg$e28 = peg$literalExpectation("[=", false);
32969
- const peg$e29 = peg$literalExpectation("[&", false);
32970
- const peg$e30 = peg$literalExpectation("^]", false);
32971
- const peg$e31 = peg$literalExpectation("id:", false);
32972
- const peg$e32 = peg$classExpectation([":", "]"], true, false, false);
32973
- const peg$e33 = peg$literalExpectation(".", false);
32974
- const peg$e34 = peg$classExpectation(["&", ":", "]"], true, false, false);
32975
- const peg$e35 = peg$otherExpectation("Character");
32976
- const peg$e36 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], true, false, false);
32977
- const peg$e37 = peg$otherExpectation("Blank Line");
32978
- const peg$e38 = peg$classExpectation([" ", " "], false, false, false);
32979
- const peg$e39 = peg$otherExpectation("Line Terminator");
32980
- const peg$e40 = peg$literalExpectation("\n", false);
32981
- const peg$e41 = peg$literalExpectation("\r\n", false);
32982
- const peg$e42 = peg$classExpectation(["\r", ["\u2028", "\u2029"]], false, false, false);
32983
- const peg$e43 = peg$otherExpectation("Whitespace, then Line Terminator");
32984
- const peg$e44 = peg$otherExpectation("whitespace");
32985
- const peg$e45 = peg$classExpectation([" ", " ", "\n", "\r", "\u2028", "\u2029"], false, false, false);
33845
+ const peg$e12 = peg$literalExpectation(" ", false);
33846
+ const peg$e13 = peg$literalExpectation("--", false);
33847
+ const peg$e14 = peg$literalExpectation("++", false);
33848
+ const peg$e15 = peg$literalExpectation("===", false);
33849
+ const peg$e16 = peg$literalExpectation("==", false);
33850
+ const peg$e17 = peg$classExpectation([["a", "z"]], false, false, false);
33851
+ const peg$e18 = peg$classExpectation([["a", "z"], ["0", "9"], "-"], false, false, false);
33852
+ const peg$e19 = peg$literalExpectation("[@id", false);
33853
+ const peg$e20 = peg$literalExpectation("#", false);
33854
+ const peg$e21 = peg$literalExpectation("[\u25BC", false);
33855
+ const peg$e22 = peg$literalExpectation("[\u25BA", false);
33856
+ const peg$e23 = peg$literalExpectation("[@", false);
33857
+ const peg$e24 = peg$literalExpectation("[%", false);
33858
+ const peg$e25 = peg$literalExpectation("[!", false);
33859
+ const peg$e26 = peg$literalExpectation("[?", false);
33860
+ const peg$e27 = peg$literalExpectation("[+", false);
33861
+ const peg$e28 = peg$literalExpectation("[-", false);
33862
+ const peg$e29 = peg$literalExpectation("[$", false);
33863
+ const peg$e30 = peg$literalExpectation("[_", false);
33864
+ const peg$e31 = peg$literalExpectation("[=", false);
33865
+ const peg$e32 = peg$literalExpectation("[&", false);
33866
+ const peg$e33 = peg$literalExpectation("^]", false);
33867
+ const peg$e34 = peg$literalExpectation("id:", false);
33868
+ const peg$e35 = peg$classExpectation([":", "]"], true, false, false);
33869
+ const peg$e36 = peg$literalExpectation(".", false);
33870
+ const peg$e37 = peg$classExpectation(["&", ":", "]"], true, false, false);
33871
+ const peg$e38 = peg$otherExpectation("Character");
33872
+ const peg$e39 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], true, false, false);
33873
+ const peg$e40 = peg$otherExpectation("Blank Line");
33874
+ const peg$e41 = peg$classExpectation([" ", " "], false, false, false);
33875
+ const peg$e42 = peg$otherExpectation("Line Terminator");
33876
+ const peg$e43 = peg$literalExpectation("\n", false);
33877
+ const peg$e44 = peg$literalExpectation("\r\n", false);
33878
+ const peg$e45 = peg$classExpectation(["\r", ["\u2028", "\u2029"]], false, false, false);
33879
+ const peg$e46 = peg$otherExpectation("Whitespace, then Line Terminator");
33880
+ const peg$e47 = peg$otherExpectation("whitespace");
33881
+ const peg$e48 = peg$classExpectation([" ", " ", "\n", "\r", "\u2028", "\u2029"], false, false, false);
32986
33882
  function peg$f0(firstBit, bits) {
32987
33883
  return processor.buildBits([firstBit, ...bits]);
32988
33884
  }
@@ -33055,91 +33951,112 @@ function peg$parse2(input, options) {
33055
33951
  function peg$f23(value) {
33056
33952
  return helper.handleCardLineOrDivider(value, 2);
33057
33953
  }
33058
- function peg$f24(value) {
33954
+ function peg$f24(qualifier) {
33955
+ return ["====", qualifier];
33956
+ }
33957
+ function peg$f25() {
33958
+ return ["===="];
33959
+ }
33960
+ function peg$f26(qualifier) {
33961
+ return ["--", qualifier];
33962
+ }
33963
+ function peg$f27() {
33964
+ return ["--"];
33965
+ }
33966
+ function peg$f28(qualifier) {
33967
+ return ["++", qualifier];
33968
+ }
33969
+ function peg$f29() {
33970
+ return ["++"];
33971
+ }
33972
+ function peg$f30(value) {
33059
33973
  return helper.handleCardLine(value);
33060
33974
  }
33061
- function peg$f25(value) {
33975
+ function peg$f31(value) {
33062
33976
  return helper.handleCardSet(value[1].flat());
33063
33977
  }
33064
- function peg$f26() {
33978
+ function peg$f32() {
33065
33979
  helper.handleCardSetStart();
33066
33980
  }
33067
- function peg$f27() {
33981
+ function peg$f33() {
33068
33982
  helper.handleCardSetEnd();
33069
33983
  }
33070
- function peg$f28(value) {
33984
+ function peg$f34(value) {
33071
33985
  return helper.handleCards(value);
33072
33986
  }
33073
- function peg$f29(value) {
33987
+ function peg$f35(value) {
33074
33988
  return helper.handleCardLineOrDivider(value, 1);
33075
33989
  }
33076
- function peg$f30(value) {
33990
+ function peg$f36(value) {
33077
33991
  return helper.handleCardLine(value);
33078
33992
  }
33079
- function peg$f31(value) {
33993
+ function peg$f37(value) {
33994
+ return value;
33995
+ }
33996
+ function peg$f38(value) {
33080
33997
  return helper.handleCardContent(value);
33081
33998
  }
33082
- function peg$f32(value) {
33999
+ function peg$f39(value) {
33083
34000
  return { type: TypeKey.CardChar, value };
33084
34001
  }
33085
- function peg$f33(value) {
34002
+ function peg$f40(value) {
33086
34003
  return helper.handlePropertyTag("id", value);
33087
34004
  }
33088
- function peg$f34(level, title) {
34005
+ function peg$f41(level, title) {
33089
34006
  return helper.handleTag(TypeKey.Title, { level, title });
33090
34007
  }
33091
- function peg$f35(value) {
34008
+ function peg$f42(value) {
33092
34009
  return helper.handleTag(TypeKey.Anchor, value);
33093
34010
  }
33094
- function peg$f36(value) {
34011
+ function peg$f43(value) {
33095
34012
  return helper.handleTag(TypeKey.Reference, value);
33096
34013
  }
33097
- function peg$f37(key, value) {
34014
+ function peg$f44(key, value) {
33098
34015
  return helper.handlePropertyTag(key, value);
33099
34016
  }
33100
- function peg$f38(value) {
34017
+ function peg$f45(value) {
33101
34018
  return helper.handleTag(TypeKey.ItemLead, value);
33102
34019
  }
33103
- function peg$f39(value) {
34020
+ function peg$f46(value) {
33104
34021
  return helper.handleTag(TypeKey.Instruction, value);
33105
34022
  }
33106
- function peg$f40(value) {
34023
+ function peg$f47(value) {
33107
34024
  return helper.handleTag(TypeKey.Hint, value);
33108
34025
  }
33109
- function peg$f41(value) {
34026
+ function peg$f48(value) {
33110
34027
  return helper.handleTag(TypeKey.True, value);
33111
34028
  }
33112
- function peg$f42(value) {
34029
+ function peg$f49(value) {
33113
34030
  return helper.handleTag(TypeKey.False, value);
33114
34031
  }
33115
- function peg$f43(value) {
34032
+ function peg$f50(value) {
33116
34033
  return helper.handleTag(TypeKey.SampleSolution, value);
33117
34034
  }
33118
- function peg$f44(value) {
34035
+ function peg$f51(value) {
33119
34036
  return helper.handleTag(TypeKey.Gap, value);
33120
34037
  }
33121
- function peg$f45(value) {
34038
+ function peg$f52(value) {
33122
34039
  return helper.handleTag(TypeKey.Mark, value);
33123
34040
  }
33124
- function peg$f46(key, value) {
34041
+ function peg$f53(key, value) {
33125
34042
  return helper.handleResourceTag(key, value);
33126
34043
  }
33127
- function peg$f47(value) {
34044
+ function peg$f54(value) {
33128
34045
  return value;
33129
34046
  }
33130
- function peg$f48(value) {
34047
+ function peg$f55(value) {
33131
34048
  return value ? value.trim() : "";
33132
34049
  }
33133
- function peg$f49(value) {
34050
+ function peg$f56(value) {
33134
34051
  return value.length;
33135
34052
  }
33136
- function peg$f50(value) {
34053
+ function peg$f57(value) {
33137
34054
  return value ? value.trim() : null;
33138
34055
  }
33139
- function peg$f51(value) {
34056
+ function peg$f58(value) {
33140
34057
  return value ? value.trim() : "";
33141
34058
  }
33142
- function peg$f52() {
34059
+ function peg$f59() {
33143
34060
  return true;
33144
34061
  }
33145
34062
  let peg$currPos = options.peg$currPos | 0;
@@ -34057,35 +34974,28 @@ function peg$parse2(input, options) {
34057
34974
  return s0;
34058
34975
  }
34059
34976
  function peg$parseCardSetStart_V2() {
34060
- let s0, s1, s2, s3, s4, s5;
34977
+ let s0, s1, s2, s3;
34061
34978
  s0 = peg$currPos;
34062
- s1 = peg$parseNL();
34979
+ s1 = [];
34980
+ s2 = peg$parseWNL();
34981
+ if (s2 === peg$FAILED) {
34982
+ s2 = peg$parseNL();
34983
+ }
34984
+ if (s2 !== peg$FAILED) {
34985
+ while (s2 !== peg$FAILED) {
34986
+ s1.push(s2);
34987
+ s2 = peg$parseWNL();
34988
+ if (s2 === peg$FAILED) {
34989
+ s2 = peg$parseNL();
34990
+ }
34991
+ }
34992
+ } else {
34993
+ s1 = peg$FAILED;
34994
+ }
34063
34995
  if (s1 !== peg$FAILED) {
34064
34996
  s2 = peg$currPos;
34065
34997
  peg$silentFails++;
34066
- s3 = peg$currPos;
34067
- if (input.substr(peg$currPos, 4) === peg$c6) {
34068
- s4 = peg$c6;
34069
- peg$currPos += 4;
34070
- } else {
34071
- s4 = peg$FAILED;
34072
- if (peg$silentFails === 0) {
34073
- peg$fail(peg$e8);
34074
- }
34075
- }
34076
- if (s4 !== peg$FAILED) {
34077
- s5 = peg$parseWNL();
34078
- if (s5 !== peg$FAILED) {
34079
- s4 = [s4, s5];
34080
- s3 = s4;
34081
- } else {
34082
- peg$currPos = s3;
34083
- s3 = peg$FAILED;
34084
- }
34085
- } else {
34086
- peg$currPos = s3;
34087
- s3 = peg$FAILED;
34088
- }
34998
+ s3 = peg$parseCardDividerLookahead_V2();
34089
34999
  peg$silentFails--;
34090
35000
  if (s3 !== peg$FAILED) {
34091
35001
  peg$currPos = s2;
@@ -34150,39 +35060,147 @@ function peg$parse2(input, options) {
34150
35060
  return s0;
34151
35061
  }
34152
35062
  function peg$parseCardLineOrDivider_V2() {
34153
- let s0, s1, s2, s3;
35063
+ let s0, s1;
35064
+ s0 = peg$currPos;
35065
+ s1 = peg$parseCardDividerToken_V2();
35066
+ if (s1 === peg$FAILED) {
35067
+ s1 = peg$parseCardSideDividerToken_V2();
35068
+ if (s1 === peg$FAILED) {
35069
+ s1 = peg$parseCardVariantDividerToken_V2();
35070
+ if (s1 === peg$FAILED) {
35071
+ s1 = peg$parseCardLine_V2();
35072
+ }
35073
+ }
35074
+ }
35075
+ if (s1 !== peg$FAILED) {
35076
+ peg$savedPos = s0;
35077
+ s1 = peg$f23(s1);
35078
+ }
35079
+ s0 = s1;
35080
+ return s0;
35081
+ }
35082
+ function peg$parseCardDividerToken_V2() {
35083
+ let s0, s1, s2, s3, s4, s5, s6;
34154
35084
  s0 = peg$currPos;
34155
- s1 = peg$currPos;
34156
35085
  if (input.substr(peg$currPos, 4) === peg$c6) {
34157
- s2 = peg$c6;
35086
+ s1 = peg$c6;
34158
35087
  peg$currPos += 4;
34159
35088
  } else {
34160
- s2 = peg$FAILED;
35089
+ s1 = peg$FAILED;
34161
35090
  if (peg$silentFails === 0) {
34162
35091
  peg$fail(peg$e8);
34163
35092
  }
34164
35093
  }
34165
- if (s2 !== peg$FAILED) {
34166
- s3 = peg$parseWNL();
34167
- if (s3 === peg$FAILED) {
34168
- s3 = peg$parseWEOL();
35094
+ if (s1 !== peg$FAILED) {
35095
+ if (input.charCodeAt(peg$currPos) === 32) {
35096
+ s2 = peg$c10;
35097
+ peg$currPos++;
35098
+ } else {
35099
+ s2 = peg$FAILED;
35100
+ if (peg$silentFails === 0) {
35101
+ peg$fail(peg$e12);
35102
+ }
34169
35103
  }
34170
- if (s3 !== peg$FAILED) {
34171
- s2 = [s2, s3];
34172
- s1 = s2;
35104
+ if (s2 !== peg$FAILED) {
35105
+ s3 = peg$parseQualifier();
35106
+ if (s3 !== peg$FAILED) {
35107
+ if (input.charCodeAt(peg$currPos) === 32) {
35108
+ s4 = peg$c10;
35109
+ peg$currPos++;
35110
+ } else {
35111
+ s4 = peg$FAILED;
35112
+ if (peg$silentFails === 0) {
35113
+ peg$fail(peg$e12);
35114
+ }
35115
+ }
35116
+ if (s4 !== peg$FAILED) {
35117
+ if (input.substr(peg$currPos, 4) === peg$c6) {
35118
+ s5 = peg$c6;
35119
+ peg$currPos += 4;
35120
+ } else {
35121
+ s5 = peg$FAILED;
35122
+ if (peg$silentFails === 0) {
35123
+ peg$fail(peg$e8);
35124
+ }
35125
+ }
35126
+ if (s5 !== peg$FAILED) {
35127
+ s6 = peg$parseWNL();
35128
+ if (s6 === peg$FAILED) {
35129
+ s6 = peg$parseWEOL();
35130
+ }
35131
+ if (s6 !== peg$FAILED) {
35132
+ peg$savedPos = s0;
35133
+ s0 = peg$f24(s3);
35134
+ } else {
35135
+ peg$currPos = s0;
35136
+ s0 = peg$FAILED;
35137
+ }
35138
+ } else {
35139
+ peg$currPos = s0;
35140
+ s0 = peg$FAILED;
35141
+ }
35142
+ } else {
35143
+ peg$currPos = s0;
35144
+ s0 = peg$FAILED;
35145
+ }
35146
+ } else {
35147
+ peg$currPos = s0;
35148
+ s0 = peg$FAILED;
35149
+ }
35150
+ } else {
35151
+ peg$currPos = s0;
35152
+ s0 = peg$FAILED;
35153
+ }
35154
+ } else {
35155
+ peg$currPos = s0;
35156
+ s0 = peg$FAILED;
35157
+ }
35158
+ if (s0 === peg$FAILED) {
35159
+ s0 = peg$currPos;
35160
+ if (input.substr(peg$currPos, 4) === peg$c6) {
35161
+ s1 = peg$c6;
35162
+ peg$currPos += 4;
34173
35163
  } else {
34174
- peg$currPos = s1;
34175
35164
  s1 = peg$FAILED;
35165
+ if (peg$silentFails === 0) {
35166
+ peg$fail(peg$e8);
35167
+ }
34176
35168
  }
35169
+ if (s1 !== peg$FAILED) {
35170
+ s2 = peg$parseWNL();
35171
+ if (s2 === peg$FAILED) {
35172
+ s2 = peg$parseWEOL();
35173
+ }
35174
+ if (s2 !== peg$FAILED) {
35175
+ peg$savedPos = s0;
35176
+ s0 = peg$f25();
35177
+ } else {
35178
+ peg$currPos = s0;
35179
+ s0 = peg$FAILED;
35180
+ }
35181
+ } else {
35182
+ peg$currPos = s0;
35183
+ s0 = peg$FAILED;
35184
+ }
35185
+ }
35186
+ return s0;
35187
+ }
35188
+ function peg$parseCardSideDividerToken_V2() {
35189
+ let s0, s1, s2, s3, s4, s5, s6;
35190
+ s0 = peg$currPos;
35191
+ if (input.substr(peg$currPos, 2) === peg$c11) {
35192
+ s1 = peg$c11;
35193
+ peg$currPos += 2;
34177
35194
  } else {
34178
- peg$currPos = s1;
34179
35195
  s1 = peg$FAILED;
35196
+ if (peg$silentFails === 0) {
35197
+ peg$fail(peg$e13);
35198
+ }
34180
35199
  }
34181
- if (s1 === peg$FAILED) {
34182
- s1 = peg$currPos;
34183
- if (input.substr(peg$currPos, 2) === peg$c10) {
35200
+ if (s1 !== peg$FAILED) {
35201
+ if (input.charCodeAt(peg$currPos) === 32) {
34184
35202
  s2 = peg$c10;
34185
- peg$currPos += 2;
35203
+ peg$currPos++;
34186
35204
  } else {
34187
35205
  s2 = peg$FAILED;
34188
35206
  if (peg$silentFails === 0) {
@@ -34190,58 +35208,277 @@ function peg$parse2(input, options) {
34190
35208
  }
34191
35209
  }
34192
35210
  if (s2 !== peg$FAILED) {
34193
- s3 = peg$parseWNL();
34194
- if (s3 === peg$FAILED) {
34195
- s3 = peg$parseWEOL();
34196
- }
35211
+ s3 = peg$parseQualifier();
34197
35212
  if (s3 !== peg$FAILED) {
34198
- s2 = [s2, s3];
34199
- s1 = s2;
35213
+ if (input.charCodeAt(peg$currPos) === 32) {
35214
+ s4 = peg$c10;
35215
+ peg$currPos++;
35216
+ } else {
35217
+ s4 = peg$FAILED;
35218
+ if (peg$silentFails === 0) {
35219
+ peg$fail(peg$e12);
35220
+ }
35221
+ }
35222
+ if (s4 !== peg$FAILED) {
35223
+ if (input.substr(peg$currPos, 2) === peg$c11) {
35224
+ s5 = peg$c11;
35225
+ peg$currPos += 2;
35226
+ } else {
35227
+ s5 = peg$FAILED;
35228
+ if (peg$silentFails === 0) {
35229
+ peg$fail(peg$e13);
35230
+ }
35231
+ }
35232
+ if (s5 !== peg$FAILED) {
35233
+ s6 = peg$parseWNL();
35234
+ if (s6 === peg$FAILED) {
35235
+ s6 = peg$parseWEOL();
35236
+ }
35237
+ if (s6 !== peg$FAILED) {
35238
+ peg$savedPos = s0;
35239
+ s0 = peg$f26(s3);
35240
+ } else {
35241
+ peg$currPos = s0;
35242
+ s0 = peg$FAILED;
35243
+ }
35244
+ } else {
35245
+ peg$currPos = s0;
35246
+ s0 = peg$FAILED;
35247
+ }
35248
+ } else {
35249
+ peg$currPos = s0;
35250
+ s0 = peg$FAILED;
35251
+ }
34200
35252
  } else {
34201
- peg$currPos = s1;
34202
- s1 = peg$FAILED;
35253
+ peg$currPos = s0;
35254
+ s0 = peg$FAILED;
34203
35255
  }
34204
35256
  } else {
34205
- peg$currPos = s1;
35257
+ peg$currPos = s0;
35258
+ s0 = peg$FAILED;
35259
+ }
35260
+ } else {
35261
+ peg$currPos = s0;
35262
+ s0 = peg$FAILED;
35263
+ }
35264
+ if (s0 === peg$FAILED) {
35265
+ s0 = peg$currPos;
35266
+ if (input.substr(peg$currPos, 2) === peg$c11) {
35267
+ s1 = peg$c11;
35268
+ peg$currPos += 2;
35269
+ } else {
34206
35270
  s1 = peg$FAILED;
35271
+ if (peg$silentFails === 0) {
35272
+ peg$fail(peg$e13);
35273
+ }
34207
35274
  }
34208
- if (s1 === peg$FAILED) {
34209
- s1 = peg$currPos;
34210
- if (input.substr(peg$currPos, 2) === peg$c11) {
34211
- s2 = peg$c11;
34212
- peg$currPos += 2;
34213
- } else {
34214
- s2 = peg$FAILED;
34215
- if (peg$silentFails === 0) {
34216
- peg$fail(peg$e13);
34217
- }
35275
+ if (s1 !== peg$FAILED) {
35276
+ s2 = peg$parseWNL();
35277
+ if (s2 === peg$FAILED) {
35278
+ s2 = peg$parseWEOL();
34218
35279
  }
34219
35280
  if (s2 !== peg$FAILED) {
34220
- s3 = peg$parseWNL();
34221
- if (s3 === peg$FAILED) {
34222
- s3 = peg$parseWEOL();
35281
+ peg$savedPos = s0;
35282
+ s0 = peg$f27();
35283
+ } else {
35284
+ peg$currPos = s0;
35285
+ s0 = peg$FAILED;
35286
+ }
35287
+ } else {
35288
+ peg$currPos = s0;
35289
+ s0 = peg$FAILED;
35290
+ }
35291
+ }
35292
+ return s0;
35293
+ }
35294
+ function peg$parseCardVariantDividerToken_V2() {
35295
+ let s0, s1, s2, s3, s4, s5, s6;
35296
+ s0 = peg$currPos;
35297
+ if (input.substr(peg$currPos, 2) === peg$c12) {
35298
+ s1 = peg$c12;
35299
+ peg$currPos += 2;
35300
+ } else {
35301
+ s1 = peg$FAILED;
35302
+ if (peg$silentFails === 0) {
35303
+ peg$fail(peg$e14);
35304
+ }
35305
+ }
35306
+ if (s1 !== peg$FAILED) {
35307
+ if (input.charCodeAt(peg$currPos) === 32) {
35308
+ s2 = peg$c10;
35309
+ peg$currPos++;
35310
+ } else {
35311
+ s2 = peg$FAILED;
35312
+ if (peg$silentFails === 0) {
35313
+ peg$fail(peg$e12);
35314
+ }
35315
+ }
35316
+ if (s2 !== peg$FAILED) {
35317
+ s3 = peg$parseQualifier();
35318
+ if (s3 !== peg$FAILED) {
35319
+ if (input.charCodeAt(peg$currPos) === 32) {
35320
+ s4 = peg$c10;
35321
+ peg$currPos++;
35322
+ } else {
35323
+ s4 = peg$FAILED;
35324
+ if (peg$silentFails === 0) {
35325
+ peg$fail(peg$e12);
35326
+ }
34223
35327
  }
34224
- if (s3 !== peg$FAILED) {
34225
- s2 = [s2, s3];
34226
- s1 = s2;
35328
+ if (s4 !== peg$FAILED) {
35329
+ if (input.substr(peg$currPos, 2) === peg$c12) {
35330
+ s5 = peg$c12;
35331
+ peg$currPos += 2;
35332
+ } else {
35333
+ s5 = peg$FAILED;
35334
+ if (peg$silentFails === 0) {
35335
+ peg$fail(peg$e14);
35336
+ }
35337
+ }
35338
+ if (s5 !== peg$FAILED) {
35339
+ s6 = peg$parseWNL();
35340
+ if (s6 === peg$FAILED) {
35341
+ s6 = peg$parseWEOL();
35342
+ }
35343
+ if (s6 !== peg$FAILED) {
35344
+ peg$savedPos = s0;
35345
+ s0 = peg$f28(s3);
35346
+ } else {
35347
+ peg$currPos = s0;
35348
+ s0 = peg$FAILED;
35349
+ }
35350
+ } else {
35351
+ peg$currPos = s0;
35352
+ s0 = peg$FAILED;
35353
+ }
34227
35354
  } else {
34228
- peg$currPos = s1;
34229
- s1 = peg$FAILED;
35355
+ peg$currPos = s0;
35356
+ s0 = peg$FAILED;
34230
35357
  }
34231
35358
  } else {
34232
- peg$currPos = s1;
34233
- s1 = peg$FAILED;
35359
+ peg$currPos = s0;
35360
+ s0 = peg$FAILED;
34234
35361
  }
34235
- if (s1 === peg$FAILED) {
34236
- s1 = peg$parseCardLine_V2();
35362
+ } else {
35363
+ peg$currPos = s0;
35364
+ s0 = peg$FAILED;
35365
+ }
35366
+ } else {
35367
+ peg$currPos = s0;
35368
+ s0 = peg$FAILED;
35369
+ }
35370
+ if (s0 === peg$FAILED) {
35371
+ s0 = peg$currPos;
35372
+ if (input.substr(peg$currPos, 2) === peg$c12) {
35373
+ s1 = peg$c12;
35374
+ peg$currPos += 2;
35375
+ } else {
35376
+ s1 = peg$FAILED;
35377
+ if (peg$silentFails === 0) {
35378
+ peg$fail(peg$e14);
34237
35379
  }
34238
35380
  }
35381
+ if (s1 !== peg$FAILED) {
35382
+ s2 = peg$parseWNL();
35383
+ if (s2 === peg$FAILED) {
35384
+ s2 = peg$parseWEOL();
35385
+ }
35386
+ if (s2 !== peg$FAILED) {
35387
+ peg$savedPos = s0;
35388
+ s0 = peg$f29();
35389
+ } else {
35390
+ peg$currPos = s0;
35391
+ s0 = peg$FAILED;
35392
+ }
35393
+ } else {
35394
+ peg$currPos = s0;
35395
+ s0 = peg$FAILED;
35396
+ }
35397
+ }
35398
+ return s0;
35399
+ }
35400
+ function peg$parseCardDividerLookahead_V2() {
35401
+ let s0, s1, s2, s3, s4, s5, s6;
35402
+ s0 = peg$currPos;
35403
+ if (input.substr(peg$currPos, 4) === peg$c6) {
35404
+ s1 = peg$c6;
35405
+ peg$currPos += 4;
35406
+ } else {
35407
+ s1 = peg$FAILED;
35408
+ if (peg$silentFails === 0) {
35409
+ peg$fail(peg$e8);
35410
+ }
34239
35411
  }
34240
35412
  if (s1 !== peg$FAILED) {
34241
- peg$savedPos = s0;
34242
- s1 = peg$f23(s1);
35413
+ s2 = peg$currPos;
35414
+ if (input.charCodeAt(peg$currPos) === 32) {
35415
+ s3 = peg$c10;
35416
+ peg$currPos++;
35417
+ } else {
35418
+ s3 = peg$FAILED;
35419
+ if (peg$silentFails === 0) {
35420
+ peg$fail(peg$e12);
35421
+ }
35422
+ }
35423
+ if (s3 !== peg$FAILED) {
35424
+ s4 = peg$parseQualifier();
35425
+ if (s4 !== peg$FAILED) {
35426
+ if (input.charCodeAt(peg$currPos) === 32) {
35427
+ s5 = peg$c10;
35428
+ peg$currPos++;
35429
+ } else {
35430
+ s5 = peg$FAILED;
35431
+ if (peg$silentFails === 0) {
35432
+ peg$fail(peg$e12);
35433
+ }
35434
+ }
35435
+ if (s5 !== peg$FAILED) {
35436
+ if (input.substr(peg$currPos, 4) === peg$c6) {
35437
+ s6 = peg$c6;
35438
+ peg$currPos += 4;
35439
+ } else {
35440
+ s6 = peg$FAILED;
35441
+ if (peg$silentFails === 0) {
35442
+ peg$fail(peg$e8);
35443
+ }
35444
+ }
35445
+ if (s6 !== peg$FAILED) {
35446
+ s3 = [s3, s4, s5, s6];
35447
+ s2 = s3;
35448
+ } else {
35449
+ peg$currPos = s2;
35450
+ s2 = peg$FAILED;
35451
+ }
35452
+ } else {
35453
+ peg$currPos = s2;
35454
+ s2 = peg$FAILED;
35455
+ }
35456
+ } else {
35457
+ peg$currPos = s2;
35458
+ s2 = peg$FAILED;
35459
+ }
35460
+ } else {
35461
+ peg$currPos = s2;
35462
+ s2 = peg$FAILED;
35463
+ }
35464
+ if (s2 === peg$FAILED) {
35465
+ s2 = null;
35466
+ }
35467
+ s3 = peg$parseWNL();
35468
+ if (s3 === peg$FAILED) {
35469
+ s3 = peg$parseWEOL();
35470
+ }
35471
+ if (s3 !== peg$FAILED) {
35472
+ s1 = [s1, s2, s3];
35473
+ s0 = s1;
35474
+ } else {
35475
+ peg$currPos = s0;
35476
+ s0 = peg$FAILED;
35477
+ }
35478
+ } else {
35479
+ peg$currPos = s0;
35480
+ s0 = peg$FAILED;
34243
35481
  }
34244
- s0 = s1;
34245
35482
  return s0;
34246
35483
  }
34247
35484
  function peg$parseCardLine_V2() {
@@ -34316,7 +35553,7 @@ function peg$parse2(input, options) {
34316
35553
  }
34317
35554
  if (s2 !== peg$FAILED) {
34318
35555
  peg$savedPos = s0;
34319
- s0 = peg$f24(s2);
35556
+ s0 = peg$f30(s2);
34320
35557
  } else {
34321
35558
  peg$currPos = s0;
34322
35559
  s0 = peg$FAILED;
@@ -34353,7 +35590,7 @@ function peg$parse2(input, options) {
34353
35590
  }
34354
35591
  if (s1 !== peg$FAILED) {
34355
35592
  peg$savedPos = s0;
34356
- s1 = peg$f25(s1);
35593
+ s1 = peg$f31(s1);
34357
35594
  }
34358
35595
  s0 = s1;
34359
35596
  return s0;
@@ -34361,18 +35598,33 @@ function peg$parse2(input, options) {
34361
35598
  function peg$parseCardSetStart_V1() {
34362
35599
  let s0, s1, s2, s3, s4, s5;
34363
35600
  s0 = peg$currPos;
34364
- s1 = peg$parseNL();
35601
+ s1 = [];
35602
+ s2 = peg$parseWNL();
35603
+ if (s2 === peg$FAILED) {
35604
+ s2 = peg$parseNL();
35605
+ }
35606
+ if (s2 !== peg$FAILED) {
35607
+ while (s2 !== peg$FAILED) {
35608
+ s1.push(s2);
35609
+ s2 = peg$parseWNL();
35610
+ if (s2 === peg$FAILED) {
35611
+ s2 = peg$parseNL();
35612
+ }
35613
+ }
35614
+ } else {
35615
+ s1 = peg$FAILED;
35616
+ }
34365
35617
  if (s1 !== peg$FAILED) {
34366
35618
  s2 = peg$currPos;
34367
35619
  peg$silentFails++;
34368
35620
  s3 = peg$currPos;
34369
- if (input.substr(peg$currPos, 3) === peg$c12) {
34370
- s4 = peg$c12;
35621
+ if (input.substr(peg$currPos, 3) === peg$c13) {
35622
+ s4 = peg$c13;
34371
35623
  peg$currPos += 3;
34372
35624
  } else {
34373
35625
  s4 = peg$FAILED;
34374
35626
  if (peg$silentFails === 0) {
34375
- peg$fail(peg$e14);
35627
+ peg$fail(peg$e15);
34376
35628
  }
34377
35629
  }
34378
35630
  if (s4 !== peg$FAILED) {
@@ -34397,7 +35649,7 @@ function peg$parse2(input, options) {
34397
35649
  }
34398
35650
  if (s2 !== peg$FAILED) {
34399
35651
  peg$savedPos = s0;
34400
- s0 = peg$f26();
35652
+ s0 = peg$f32();
34401
35653
  } else {
34402
35654
  peg$currPos = s0;
34403
35655
  s0 = peg$FAILED;
@@ -34435,7 +35687,7 @@ function peg$parse2(input, options) {
34435
35687
  }
34436
35688
  if (s1 !== peg$FAILED) {
34437
35689
  peg$savedPos = s0;
34438
- s1 = peg$f27();
35690
+ s1 = peg$f33();
34439
35691
  }
34440
35692
  s0 = s1;
34441
35693
  return s0;
@@ -34446,7 +35698,7 @@ function peg$parse2(input, options) {
34446
35698
  s1 = peg$parseCardLineOrDivider_V1();
34447
35699
  if (s1 !== peg$FAILED) {
34448
35700
  peg$savedPos = s0;
34449
- s1 = peg$f28(s1);
35701
+ s1 = peg$f34(s1);
34450
35702
  }
34451
35703
  s0 = s1;
34452
35704
  return s0;
@@ -34455,13 +35707,13 @@ function peg$parse2(input, options) {
34455
35707
  let s0, s1, s2, s3;
34456
35708
  s0 = peg$currPos;
34457
35709
  s1 = peg$currPos;
34458
- if (input.substr(peg$currPos, 3) === peg$c12) {
34459
- s2 = peg$c12;
35710
+ if (input.substr(peg$currPos, 3) === peg$c13) {
35711
+ s2 = peg$c13;
34460
35712
  peg$currPos += 3;
34461
35713
  } else {
34462
35714
  s2 = peg$FAILED;
34463
35715
  if (peg$silentFails === 0) {
34464
- peg$fail(peg$e14);
35716
+ peg$fail(peg$e15);
34465
35717
  }
34466
35718
  }
34467
35719
  if (s2 !== peg$FAILED) {
@@ -34482,13 +35734,13 @@ function peg$parse2(input, options) {
34482
35734
  }
34483
35735
  if (s1 === peg$FAILED) {
34484
35736
  s1 = peg$currPos;
34485
- if (input.substr(peg$currPos, 2) === peg$c13) {
34486
- s2 = peg$c13;
35737
+ if (input.substr(peg$currPos, 2) === peg$c14) {
35738
+ s2 = peg$c14;
34487
35739
  peg$currPos += 2;
34488
35740
  } else {
34489
35741
  s2 = peg$FAILED;
34490
35742
  if (peg$silentFails === 0) {
34491
- peg$fail(peg$e15);
35743
+ peg$fail(peg$e16);
34492
35744
  }
34493
35745
  }
34494
35746
  if (s2 !== peg$FAILED) {
@@ -34509,13 +35761,13 @@ function peg$parse2(input, options) {
34509
35761
  }
34510
35762
  if (s1 === peg$FAILED) {
34511
35763
  s1 = peg$currPos;
34512
- if (input.substr(peg$currPos, 2) === peg$c10) {
34513
- s2 = peg$c10;
35764
+ if (input.substr(peg$currPos, 2) === peg$c11) {
35765
+ s2 = peg$c11;
34514
35766
  peg$currPos += 2;
34515
35767
  } else {
34516
35768
  s2 = peg$FAILED;
34517
35769
  if (peg$silentFails === 0) {
34518
- peg$fail(peg$e12);
35770
+ peg$fail(peg$e13);
34519
35771
  }
34520
35772
  }
34521
35773
  if (s2 !== peg$FAILED) {
@@ -34541,7 +35793,7 @@ function peg$parse2(input, options) {
34541
35793
  }
34542
35794
  if (s1 !== peg$FAILED) {
34543
35795
  peg$savedPos = s0;
34544
- s1 = peg$f29(s1);
35796
+ s1 = peg$f35(s1);
34545
35797
  }
34546
35798
  s0 = s1;
34547
35799
  return s0;
@@ -34618,7 +35870,7 @@ function peg$parse2(input, options) {
34618
35870
  }
34619
35871
  if (s2 !== peg$FAILED) {
34620
35872
  peg$savedPos = s0;
34621
- s0 = peg$f30(s2);
35873
+ s0 = peg$f36(s2);
34622
35874
  } else {
34623
35875
  peg$currPos = s0;
34624
35876
  s0 = peg$FAILED;
@@ -34629,6 +35881,102 @@ function peg$parse2(input, options) {
34629
35881
  }
34630
35882
  return s0;
34631
35883
  }
35884
+ function peg$parseQualifier() {
35885
+ let s0, s1, s2;
35886
+ s0 = peg$currPos;
35887
+ s1 = peg$currPos;
35888
+ peg$silentFails++;
35889
+ if (input.substr(peg$currPos, 6) === peg$c9) {
35890
+ s2 = peg$c9;
35891
+ peg$currPos += 6;
35892
+ } else {
35893
+ s2 = peg$FAILED;
35894
+ if (peg$silentFails === 0) {
35895
+ peg$fail(peg$e11);
35896
+ }
35897
+ }
35898
+ if (s2 === peg$FAILED) {
35899
+ if (input.substr(peg$currPos, 4) === peg$c7) {
35900
+ s2 = peg$c7;
35901
+ peg$currPos += 4;
35902
+ } else {
35903
+ s2 = peg$FAILED;
35904
+ if (peg$silentFails === 0) {
35905
+ peg$fail(peg$e9);
35906
+ }
35907
+ }
35908
+ }
35909
+ peg$silentFails--;
35910
+ if (s2 === peg$FAILED) {
35911
+ s1 = void 0;
35912
+ } else {
35913
+ peg$currPos = s1;
35914
+ s1 = peg$FAILED;
35915
+ }
35916
+ if (s1 !== peg$FAILED) {
35917
+ s2 = peg$parseQualifierName();
35918
+ if (s2 !== peg$FAILED) {
35919
+ peg$savedPos = s0;
35920
+ s0 = peg$f37(s2);
35921
+ } else {
35922
+ peg$currPos = s0;
35923
+ s0 = peg$FAILED;
35924
+ }
35925
+ } else {
35926
+ peg$currPos = s0;
35927
+ s0 = peg$FAILED;
35928
+ }
35929
+ return s0;
35930
+ }
35931
+ function peg$parseQualifierName() {
35932
+ let s0, s1, s2, s3, s4;
35933
+ s0 = peg$currPos;
35934
+ s1 = peg$currPos;
35935
+ s2 = input.charAt(peg$currPos);
35936
+ if (peg$r1.test(s2)) {
35937
+ peg$currPos++;
35938
+ } else {
35939
+ s2 = peg$FAILED;
35940
+ if (peg$silentFails === 0) {
35941
+ peg$fail(peg$e17);
35942
+ }
35943
+ }
35944
+ if (s2 !== peg$FAILED) {
35945
+ s3 = [];
35946
+ s4 = input.charAt(peg$currPos);
35947
+ if (peg$r2.test(s4)) {
35948
+ peg$currPos++;
35949
+ } else {
35950
+ s4 = peg$FAILED;
35951
+ if (peg$silentFails === 0) {
35952
+ peg$fail(peg$e18);
35953
+ }
35954
+ }
35955
+ while (s4 !== peg$FAILED) {
35956
+ s3.push(s4);
35957
+ s4 = input.charAt(peg$currPos);
35958
+ if (peg$r2.test(s4)) {
35959
+ peg$currPos++;
35960
+ } else {
35961
+ s4 = peg$FAILED;
35962
+ if (peg$silentFails === 0) {
35963
+ peg$fail(peg$e18);
35964
+ }
35965
+ }
35966
+ }
35967
+ s2 = [s2, s3];
35968
+ s1 = s2;
35969
+ } else {
35970
+ peg$currPos = s1;
35971
+ s1 = peg$FAILED;
35972
+ }
35973
+ if (s1 !== peg$FAILED) {
35974
+ s0 = input.substring(s0, peg$currPos);
35975
+ } else {
35976
+ s0 = s1;
35977
+ }
35978
+ return s0;
35979
+ }
34632
35980
  function peg$parsecardContent() {
34633
35981
  let s0, s1, s2;
34634
35982
  s0 = peg$currPos;
@@ -34645,7 +35993,7 @@ function peg$parse2(input, options) {
34645
35993
  }
34646
35994
  }
34647
35995
  peg$savedPos = s0;
34648
- s1 = peg$f31(s1);
35996
+ s1 = peg$f38(s1);
34649
35997
  s0 = s1;
34650
35998
  return s0;
34651
35999
  }
@@ -34663,7 +36011,7 @@ function peg$parse2(input, options) {
34663
36011
  }
34664
36012
  if (s1 !== peg$FAILED) {
34665
36013
  peg$savedPos = s0;
34666
- s1 = peg$f32(s1);
36014
+ s1 = peg$f39(s1);
34667
36015
  }
34668
36016
  s0 = s1;
34669
36017
  return s0;
@@ -34671,13 +36019,13 @@ function peg$parse2(input, options) {
34671
36019
  function peg$parseIDTag() {
34672
36020
  let s0, s1, s2, s3;
34673
36021
  s0 = peg$currPos;
34674
- if (input.substr(peg$currPos, 4) === peg$c14) {
34675
- s1 = peg$c14;
36022
+ if (input.substr(peg$currPos, 4) === peg$c15) {
36023
+ s1 = peg$c15;
34676
36024
  peg$currPos += 4;
34677
36025
  } else {
34678
36026
  s1 = peg$FAILED;
34679
36027
  if (peg$silentFails === 0) {
34680
- peg$fail(peg$e16);
36028
+ peg$fail(peg$e19);
34681
36029
  }
34682
36030
  }
34683
36031
  if (s1 !== peg$FAILED) {
@@ -34686,7 +36034,7 @@ function peg$parse2(input, options) {
34686
36034
  s3 = peg$parseTag_Close();
34687
36035
  if (s3 !== peg$FAILED) {
34688
36036
  peg$savedPos = s0;
34689
- s0 = peg$f33(s2);
36037
+ s0 = peg$f40(s2);
34690
36038
  } else {
34691
36039
  peg$currPos = s0;
34692
36040
  s0 = peg$FAILED;
@@ -34716,24 +36064,24 @@ function peg$parse2(input, options) {
34716
36064
  if (s1 !== peg$FAILED) {
34717
36065
  s2 = [];
34718
36066
  if (input.charCodeAt(peg$currPos) === 35) {
34719
- s3 = peg$c15;
36067
+ s3 = peg$c16;
34720
36068
  peg$currPos++;
34721
36069
  } else {
34722
36070
  s3 = peg$FAILED;
34723
36071
  if (peg$silentFails === 0) {
34724
- peg$fail(peg$e17);
36072
+ peg$fail(peg$e20);
34725
36073
  }
34726
36074
  }
34727
36075
  if (s3 !== peg$FAILED) {
34728
36076
  while (s3 !== peg$FAILED) {
34729
36077
  s2.push(s3);
34730
36078
  if (input.charCodeAt(peg$currPos) === 35) {
34731
- s3 = peg$c15;
36079
+ s3 = peg$c16;
34732
36080
  peg$currPos++;
34733
36081
  } else {
34734
36082
  s3 = peg$FAILED;
34735
36083
  if (peg$silentFails === 0) {
34736
- peg$fail(peg$e17);
36084
+ peg$fail(peg$e20);
34737
36085
  }
34738
36086
  }
34739
36087
  }
@@ -34745,7 +36093,7 @@ function peg$parse2(input, options) {
34745
36093
  s4 = peg$parseTag_CloseOrEOF();
34746
36094
  if (s4 !== peg$FAILED) {
34747
36095
  peg$savedPos = s0;
34748
- s0 = peg$f34(s2, s3);
36096
+ s0 = peg$f41(s2, s3);
34749
36097
  } else {
34750
36098
  peg$currPos = s0;
34751
36099
  s0 = peg$FAILED;
@@ -34763,13 +36111,13 @@ function peg$parse2(input, options) {
34763
36111
  function peg$parseAnchorTag() {
34764
36112
  let s0, s1, s2, s3;
34765
36113
  s0 = peg$currPos;
34766
- if (input.substr(peg$currPos, 2) === peg$c16) {
34767
- s1 = peg$c16;
36114
+ if (input.substr(peg$currPos, 2) === peg$c17) {
36115
+ s1 = peg$c17;
34768
36116
  peg$currPos += 2;
34769
36117
  } else {
34770
36118
  s1 = peg$FAILED;
34771
36119
  if (peg$silentFails === 0) {
34772
- peg$fail(peg$e18);
36120
+ peg$fail(peg$e21);
34773
36121
  }
34774
36122
  }
34775
36123
  if (s1 !== peg$FAILED) {
@@ -34777,7 +36125,7 @@ function peg$parse2(input, options) {
34777
36125
  s3 = peg$parseTag_CloseOrEOF();
34778
36126
  if (s3 !== peg$FAILED) {
34779
36127
  peg$savedPos = s0;
34780
- s0 = peg$f35(s2);
36128
+ s0 = peg$f42(s2);
34781
36129
  } else {
34782
36130
  peg$currPos = s0;
34783
36131
  s0 = peg$FAILED;
@@ -34791,13 +36139,13 @@ function peg$parse2(input, options) {
34791
36139
  function peg$parseReferenceTag() {
34792
36140
  let s0, s1, s2, s3;
34793
36141
  s0 = peg$currPos;
34794
- if (input.substr(peg$currPos, 2) === peg$c17) {
34795
- s1 = peg$c17;
36142
+ if (input.substr(peg$currPos, 2) === peg$c18) {
36143
+ s1 = peg$c18;
34796
36144
  peg$currPos += 2;
34797
36145
  } else {
34798
36146
  s1 = peg$FAILED;
34799
36147
  if (peg$silentFails === 0) {
34800
- peg$fail(peg$e19);
36148
+ peg$fail(peg$e22);
34801
36149
  }
34802
36150
  }
34803
36151
  if (s1 !== peg$FAILED) {
@@ -34805,7 +36153,7 @@ function peg$parse2(input, options) {
34805
36153
  s3 = peg$parseTag_CloseOrEOF();
34806
36154
  if (s3 !== peg$FAILED) {
34807
36155
  peg$savedPos = s0;
34808
- s0 = peg$f36(s2);
36156
+ s0 = peg$f43(s2);
34809
36157
  } else {
34810
36158
  peg$currPos = s0;
34811
36159
  s0 = peg$FAILED;
@@ -34819,13 +36167,13 @@ function peg$parse2(input, options) {
34819
36167
  function peg$parsePropertyTag() {
34820
36168
  let s0, s1, s2, s3, s4;
34821
36169
  s0 = peg$currPos;
34822
- if (input.substr(peg$currPos, 2) === peg$c18) {
34823
- s1 = peg$c18;
36170
+ if (input.substr(peg$currPos, 2) === peg$c19) {
36171
+ s1 = peg$c19;
34824
36172
  peg$currPos += 2;
34825
36173
  } else {
34826
36174
  s1 = peg$FAILED;
34827
36175
  if (peg$silentFails === 0) {
34828
- peg$fail(peg$e20);
36176
+ peg$fail(peg$e23);
34829
36177
  }
34830
36178
  }
34831
36179
  if (s1 !== peg$FAILED) {
@@ -34836,7 +36184,7 @@ function peg$parse2(input, options) {
34836
36184
  s4 = peg$parseTag_CloseOrEOF();
34837
36185
  if (s4 !== peg$FAILED) {
34838
36186
  peg$savedPos = s0;
34839
- s0 = peg$f37(s2, s3);
36187
+ s0 = peg$f44(s2, s3);
34840
36188
  } else {
34841
36189
  peg$currPos = s0;
34842
36190
  s0 = peg$FAILED;
@@ -34858,13 +36206,13 @@ function peg$parse2(input, options) {
34858
36206
  function peg$parseItemLeadTag() {
34859
36207
  let s0, s1, s2, s3;
34860
36208
  s0 = peg$currPos;
34861
- if (input.substr(peg$currPos, 2) === peg$c19) {
34862
- s1 = peg$c19;
36209
+ if (input.substr(peg$currPos, 2) === peg$c20) {
36210
+ s1 = peg$c20;
34863
36211
  peg$currPos += 2;
34864
36212
  } else {
34865
36213
  s1 = peg$FAILED;
34866
36214
  if (peg$silentFails === 0) {
34867
- peg$fail(peg$e21);
36215
+ peg$fail(peg$e24);
34868
36216
  }
34869
36217
  }
34870
36218
  if (s1 !== peg$FAILED) {
@@ -34872,7 +36220,7 @@ function peg$parse2(input, options) {
34872
36220
  s3 = peg$parseTag_CloseOrEOF();
34873
36221
  if (s3 !== peg$FAILED) {
34874
36222
  peg$savedPos = s0;
34875
- s0 = peg$f38(s2);
36223
+ s0 = peg$f45(s2);
34876
36224
  } else {
34877
36225
  peg$currPos = s0;
34878
36226
  s0 = peg$FAILED;
@@ -34886,13 +36234,13 @@ function peg$parse2(input, options) {
34886
36234
  function peg$parseInstructionTag() {
34887
36235
  let s0, s1, s2, s3;
34888
36236
  s0 = peg$currPos;
34889
- if (input.substr(peg$currPos, 2) === peg$c20) {
34890
- s1 = peg$c20;
36237
+ if (input.substr(peg$currPos, 2) === peg$c21) {
36238
+ s1 = peg$c21;
34891
36239
  peg$currPos += 2;
34892
36240
  } else {
34893
36241
  s1 = peg$FAILED;
34894
36242
  if (peg$silentFails === 0) {
34895
- peg$fail(peg$e22);
36243
+ peg$fail(peg$e25);
34896
36244
  }
34897
36245
  }
34898
36246
  if (s1 !== peg$FAILED) {
@@ -34900,7 +36248,7 @@ function peg$parse2(input, options) {
34900
36248
  s3 = peg$parseTag_CloseOrEOF();
34901
36249
  if (s3 !== peg$FAILED) {
34902
36250
  peg$savedPos = s0;
34903
- s0 = peg$f39(s2);
36251
+ s0 = peg$f46(s2);
34904
36252
  } else {
34905
36253
  peg$currPos = s0;
34906
36254
  s0 = peg$FAILED;
@@ -34914,13 +36262,13 @@ function peg$parse2(input, options) {
34914
36262
  function peg$parseHintTag() {
34915
36263
  let s0, s1, s2, s3;
34916
36264
  s0 = peg$currPos;
34917
- if (input.substr(peg$currPos, 2) === peg$c21) {
34918
- s1 = peg$c21;
36265
+ if (input.substr(peg$currPos, 2) === peg$c22) {
36266
+ s1 = peg$c22;
34919
36267
  peg$currPos += 2;
34920
36268
  } else {
34921
36269
  s1 = peg$FAILED;
34922
36270
  if (peg$silentFails === 0) {
34923
- peg$fail(peg$e23);
36271
+ peg$fail(peg$e26);
34924
36272
  }
34925
36273
  }
34926
36274
  if (s1 !== peg$FAILED) {
@@ -34928,7 +36276,7 @@ function peg$parse2(input, options) {
34928
36276
  s3 = peg$parseTag_CloseOrEOF();
34929
36277
  if (s3 !== peg$FAILED) {
34930
36278
  peg$savedPos = s0;
34931
- s0 = peg$f40(s2);
36279
+ s0 = peg$f47(s2);
34932
36280
  } else {
34933
36281
  peg$currPos = s0;
34934
36282
  s0 = peg$FAILED;
@@ -34942,13 +36290,13 @@ function peg$parse2(input, options) {
34942
36290
  function peg$parseTrueTag() {
34943
36291
  let s0, s1, s2, s3;
34944
36292
  s0 = peg$currPos;
34945
- if (input.substr(peg$currPos, 2) === peg$c22) {
34946
- s1 = peg$c22;
36293
+ if (input.substr(peg$currPos, 2) === peg$c23) {
36294
+ s1 = peg$c23;
34947
36295
  peg$currPos += 2;
34948
36296
  } else {
34949
36297
  s1 = peg$FAILED;
34950
36298
  if (peg$silentFails === 0) {
34951
- peg$fail(peg$e24);
36299
+ peg$fail(peg$e27);
34952
36300
  }
34953
36301
  }
34954
36302
  if (s1 !== peg$FAILED) {
@@ -34956,7 +36304,7 @@ function peg$parse2(input, options) {
34956
36304
  s3 = peg$parseTag_CloseOrEOF();
34957
36305
  if (s3 !== peg$FAILED) {
34958
36306
  peg$savedPos = s0;
34959
- s0 = peg$f41(s2);
36307
+ s0 = peg$f48(s2);
34960
36308
  } else {
34961
36309
  peg$currPos = s0;
34962
36310
  s0 = peg$FAILED;
@@ -34970,13 +36318,13 @@ function peg$parse2(input, options) {
34970
36318
  function peg$parseFalseTag() {
34971
36319
  let s0, s1, s2, s3;
34972
36320
  s0 = peg$currPos;
34973
- if (input.substr(peg$currPos, 2) === peg$c23) {
34974
- s1 = peg$c23;
36321
+ if (input.substr(peg$currPos, 2) === peg$c24) {
36322
+ s1 = peg$c24;
34975
36323
  peg$currPos += 2;
34976
36324
  } else {
34977
36325
  s1 = peg$FAILED;
34978
36326
  if (peg$silentFails === 0) {
34979
- peg$fail(peg$e25);
36327
+ peg$fail(peg$e28);
34980
36328
  }
34981
36329
  }
34982
36330
  if (s1 !== peg$FAILED) {
@@ -34984,7 +36332,7 @@ function peg$parse2(input, options) {
34984
36332
  s3 = peg$parseTag_CloseOrEOF();
34985
36333
  if (s3 !== peg$FAILED) {
34986
36334
  peg$savedPos = s0;
34987
- s0 = peg$f42(s2);
36335
+ s0 = peg$f49(s2);
34988
36336
  } else {
34989
36337
  peg$currPos = s0;
34990
36338
  s0 = peg$FAILED;
@@ -34998,13 +36346,13 @@ function peg$parse2(input, options) {
34998
36346
  function peg$parseSampleSolutionTag() {
34999
36347
  let s0, s1, s2, s3;
35000
36348
  s0 = peg$currPos;
35001
- if (input.substr(peg$currPos, 2) === peg$c24) {
35002
- s1 = peg$c24;
36349
+ if (input.substr(peg$currPos, 2) === peg$c25) {
36350
+ s1 = peg$c25;
35003
36351
  peg$currPos += 2;
35004
36352
  } else {
35005
36353
  s1 = peg$FAILED;
35006
36354
  if (peg$silentFails === 0) {
35007
- peg$fail(peg$e26);
36355
+ peg$fail(peg$e29);
35008
36356
  }
35009
36357
  }
35010
36358
  if (s1 !== peg$FAILED) {
@@ -35012,7 +36360,7 @@ function peg$parse2(input, options) {
35012
36360
  s3 = peg$parseTag_CloseOrEOF();
35013
36361
  if (s3 !== peg$FAILED) {
35014
36362
  peg$savedPos = s0;
35015
- s0 = peg$f43(s2);
36363
+ s0 = peg$f50(s2);
35016
36364
  } else {
35017
36365
  peg$currPos = s0;
35018
36366
  s0 = peg$FAILED;
@@ -35026,13 +36374,13 @@ function peg$parse2(input, options) {
35026
36374
  function peg$parseGapTag() {
35027
36375
  let s0, s1, s2, s3;
35028
36376
  s0 = peg$currPos;
35029
- if (input.substr(peg$currPos, 2) === peg$c25) {
35030
- s1 = peg$c25;
36377
+ if (input.substr(peg$currPos, 2) === peg$c26) {
36378
+ s1 = peg$c26;
35031
36379
  peg$currPos += 2;
35032
36380
  } else {
35033
36381
  s1 = peg$FAILED;
35034
36382
  if (peg$silentFails === 0) {
35035
- peg$fail(peg$e27);
36383
+ peg$fail(peg$e30);
35036
36384
  }
35037
36385
  }
35038
36386
  if (s1 !== peg$FAILED) {
@@ -35040,7 +36388,7 @@ function peg$parse2(input, options) {
35040
36388
  s3 = peg$parseTag_CloseOrEOF();
35041
36389
  if (s3 !== peg$FAILED) {
35042
36390
  peg$savedPos = s0;
35043
- s0 = peg$f44(s2);
36391
+ s0 = peg$f51(s2);
35044
36392
  } else {
35045
36393
  peg$currPos = s0;
35046
36394
  s0 = peg$FAILED;
@@ -35054,13 +36402,13 @@ function peg$parse2(input, options) {
35054
36402
  function peg$parseMarkTag() {
35055
36403
  let s0, s1, s2, s3;
35056
36404
  s0 = peg$currPos;
35057
- if (input.substr(peg$currPos, 2) === peg$c26) {
35058
- s1 = peg$c26;
36405
+ if (input.substr(peg$currPos, 2) === peg$c27) {
36406
+ s1 = peg$c27;
35059
36407
  peg$currPos += 2;
35060
36408
  } else {
35061
36409
  s1 = peg$FAILED;
35062
36410
  if (peg$silentFails === 0) {
35063
- peg$fail(peg$e28);
36411
+ peg$fail(peg$e31);
35064
36412
  }
35065
36413
  }
35066
36414
  if (s1 !== peg$FAILED) {
@@ -35068,7 +36416,7 @@ function peg$parse2(input, options) {
35068
36416
  s3 = peg$parseTag_CloseOrEOF();
35069
36417
  if (s3 !== peg$FAILED) {
35070
36418
  peg$savedPos = s0;
35071
- s0 = peg$f45(s2);
36419
+ s0 = peg$f52(s2);
35072
36420
  } else {
35073
36421
  peg$currPos = s0;
35074
36422
  s0 = peg$FAILED;
@@ -35082,13 +36430,13 @@ function peg$parse2(input, options) {
35082
36430
  function peg$parseResourceTag() {
35083
36431
  let s0, s1, s2, s3, s4;
35084
36432
  s0 = peg$currPos;
35085
- if (input.substr(peg$currPos, 2) === peg$c27) {
35086
- s1 = peg$c27;
36433
+ if (input.substr(peg$currPos, 2) === peg$c28) {
36434
+ s1 = peg$c28;
35087
36435
  peg$currPos += 2;
35088
36436
  } else {
35089
36437
  s1 = peg$FAILED;
35090
36438
  if (peg$silentFails === 0) {
35091
- peg$fail(peg$e29);
36439
+ peg$fail(peg$e32);
35092
36440
  }
35093
36441
  }
35094
36442
  if (s1 !== peg$FAILED) {
@@ -35099,7 +36447,7 @@ function peg$parse2(input, options) {
35099
36447
  s4 = peg$parseTag_CloseOrEOF();
35100
36448
  if (s4 !== peg$FAILED) {
35101
36449
  peg$savedPos = s0;
35102
- s0 = peg$f46(s2, s3);
36450
+ s0 = peg$f53(s2, s3);
35103
36451
  } else {
35104
36452
  peg$currPos = s0;
35105
36453
  s0 = peg$FAILED;
@@ -35123,13 +36471,13 @@ function peg$parse2(input, options) {
35123
36471
  s0 = peg$currPos;
35124
36472
  s1 = peg$currPos;
35125
36473
  s2 = [];
35126
- if (input.substr(peg$currPos, 2) === peg$c28) {
35127
- s3 = peg$c28;
36474
+ if (input.substr(peg$currPos, 2) === peg$c29) {
36475
+ s3 = peg$c29;
35128
36476
  peg$currPos += 2;
35129
36477
  } else {
35130
36478
  s3 = peg$FAILED;
35131
36479
  if (peg$silentFails === 0) {
35132
- peg$fail(peg$e30);
36480
+ peg$fail(peg$e33);
35133
36481
  }
35134
36482
  }
35135
36483
  if (s3 === peg$FAILED) {
@@ -35145,13 +36493,13 @@ function peg$parse2(input, options) {
35145
36493
  }
35146
36494
  while (s3 !== peg$FAILED) {
35147
36495
  s2.push(s3);
35148
- if (input.substr(peg$currPos, 2) === peg$c28) {
35149
- s3 = peg$c28;
36496
+ if (input.substr(peg$currPos, 2) === peg$c29) {
36497
+ s3 = peg$c29;
35150
36498
  peg$currPos += 2;
35151
36499
  } else {
35152
36500
  s3 = peg$FAILED;
35153
36501
  if (peg$silentFails === 0) {
35154
- peg$fail(peg$e30);
36502
+ peg$fail(peg$e33);
35155
36503
  }
35156
36504
  }
35157
36505
  if (s3 === peg$FAILED) {
@@ -35168,7 +36516,7 @@ function peg$parse2(input, options) {
35168
36516
  }
35169
36517
  s1 = input.substring(s1, peg$currPos);
35170
36518
  peg$savedPos = s0;
35171
- s1 = peg$f47(s1);
36519
+ s1 = peg$f54(s1);
35172
36520
  s0 = s1;
35173
36521
  return s0;
35174
36522
  }
@@ -35177,13 +36525,13 @@ function peg$parse2(input, options) {
35177
36525
  s0 = peg$currPos;
35178
36526
  s1 = peg$currPos;
35179
36527
  peg$silentFails++;
35180
- if (input.substr(peg$currPos, 3) === peg$c29) {
35181
- s2 = peg$c29;
36528
+ if (input.substr(peg$currPos, 3) === peg$c30) {
36529
+ s2 = peg$c30;
35182
36530
  peg$currPos += 3;
35183
36531
  } else {
35184
36532
  s2 = peg$FAILED;
35185
36533
  if (peg$silentFails === 0) {
35186
- peg$fail(peg$e31);
36534
+ peg$fail(peg$e34);
35187
36535
  }
35188
36536
  }
35189
36537
  peg$silentFails--;
@@ -35197,29 +36545,29 @@ function peg$parse2(input, options) {
35197
36545
  s2 = peg$currPos;
35198
36546
  s3 = [];
35199
36547
  s4 = input.charAt(peg$currPos);
35200
- if (peg$r1.test(s4)) {
36548
+ if (peg$r3.test(s4)) {
35201
36549
  peg$currPos++;
35202
36550
  } else {
35203
36551
  s4 = peg$FAILED;
35204
36552
  if (peg$silentFails === 0) {
35205
- peg$fail(peg$e32);
36553
+ peg$fail(peg$e35);
35206
36554
  }
35207
36555
  }
35208
36556
  while (s4 !== peg$FAILED) {
35209
36557
  s3.push(s4);
35210
36558
  s4 = input.charAt(peg$currPos);
35211
- if (peg$r1.test(s4)) {
36559
+ if (peg$r3.test(s4)) {
35212
36560
  peg$currPos++;
35213
36561
  } else {
35214
36562
  s4 = peg$FAILED;
35215
36563
  if (peg$silentFails === 0) {
35216
- peg$fail(peg$e32);
36564
+ peg$fail(peg$e35);
35217
36565
  }
35218
36566
  }
35219
36567
  }
35220
36568
  s2 = input.substring(s2, peg$currPos);
35221
36569
  peg$savedPos = s0;
35222
- s0 = peg$f48(s2);
36570
+ s0 = peg$f55(s2);
35223
36571
  } else {
35224
36572
  peg$currPos = s0;
35225
36573
  s0 = peg$FAILED;
@@ -35274,24 +36622,24 @@ function peg$parse2(input, options) {
35274
36622
  s0 = peg$currPos;
35275
36623
  s1 = [];
35276
36624
  if (input.charCodeAt(peg$currPos) === 46) {
35277
- s2 = peg$c30;
36625
+ s2 = peg$c31;
35278
36626
  peg$currPos++;
35279
36627
  } else {
35280
36628
  s2 = peg$FAILED;
35281
36629
  if (peg$silentFails === 0) {
35282
- peg$fail(peg$e33);
36630
+ peg$fail(peg$e36);
35283
36631
  }
35284
36632
  }
35285
36633
  if (s2 !== peg$FAILED) {
35286
36634
  while (s2 !== peg$FAILED) {
35287
36635
  s1.push(s2);
35288
36636
  if (input.charCodeAt(peg$currPos) === 46) {
35289
- s2 = peg$c30;
36637
+ s2 = peg$c31;
35290
36638
  peg$currPos++;
35291
36639
  } else {
35292
36640
  s2 = peg$FAILED;
35293
36641
  if (peg$silentFails === 0) {
35294
- peg$fail(peg$e33);
36642
+ peg$fail(peg$e36);
35295
36643
  }
35296
36644
  }
35297
36645
  }
@@ -35300,7 +36648,7 @@ function peg$parse2(input, options) {
35300
36648
  }
35301
36649
  if (s1 !== peg$FAILED) {
35302
36650
  peg$savedPos = s0;
35303
- s1 = peg$f49(s1);
36651
+ s1 = peg$f56(s1);
35304
36652
  }
35305
36653
  s0 = s1;
35306
36654
  return s0;
@@ -35311,29 +36659,29 @@ function peg$parse2(input, options) {
35311
36659
  s1 = peg$currPos;
35312
36660
  s2 = [];
35313
36661
  s3 = input.charAt(peg$currPos);
35314
- if (peg$r2.test(s3)) {
36662
+ if (peg$r4.test(s3)) {
35315
36663
  peg$currPos++;
35316
36664
  } else {
35317
36665
  s3 = peg$FAILED;
35318
36666
  if (peg$silentFails === 0) {
35319
- peg$fail(peg$e34);
36667
+ peg$fail(peg$e37);
35320
36668
  }
35321
36669
  }
35322
36670
  while (s3 !== peg$FAILED) {
35323
36671
  s2.push(s3);
35324
36672
  s3 = input.charAt(peg$currPos);
35325
- if (peg$r2.test(s3)) {
36673
+ if (peg$r4.test(s3)) {
35326
36674
  peg$currPos++;
35327
36675
  } else {
35328
36676
  s3 = peg$FAILED;
35329
36677
  if (peg$silentFails === 0) {
35330
- peg$fail(peg$e34);
36678
+ peg$fail(peg$e37);
35331
36679
  }
35332
36680
  }
35333
36681
  }
35334
36682
  s1 = input.substring(s1, peg$currPos);
35335
36683
  peg$savedPos = s0;
35336
- s1 = peg$f50(s1);
36684
+ s1 = peg$f57(s1);
35337
36685
  s0 = s1;
35338
36686
  return s0;
35339
36687
  }
@@ -35352,7 +36700,7 @@ function peg$parse2(input, options) {
35352
36700
  if (s1 !== peg$FAILED) {
35353
36701
  s2 = peg$parseTag_Value();
35354
36702
  peg$savedPos = s0;
35355
- s0 = peg$f51(s2);
36703
+ s0 = peg$f58(s2);
35356
36704
  } else {
35357
36705
  peg$currPos = s0;
35358
36706
  s0 = peg$FAILED;
@@ -35361,7 +36709,7 @@ function peg$parse2(input, options) {
35361
36709
  s0 = peg$currPos;
35362
36710
  s1 = "";
35363
36711
  peg$savedPos = s0;
35364
- s1 = peg$f52();
36712
+ s1 = peg$f59();
35365
36713
  s0 = s1;
35366
36714
  }
35367
36715
  return s0;
@@ -35398,19 +36746,19 @@ function peg$parse2(input, options) {
35398
36746
  let s0, s1;
35399
36747
  peg$silentFails++;
35400
36748
  s0 = input.charAt(peg$currPos);
35401
- if (peg$r3.test(s0)) {
36749
+ if (peg$r5.test(s0)) {
35402
36750
  peg$currPos++;
35403
36751
  } else {
35404
36752
  s0 = peg$FAILED;
35405
36753
  if (peg$silentFails === 0) {
35406
- peg$fail(peg$e36);
36754
+ peg$fail(peg$e39);
35407
36755
  }
35408
36756
  }
35409
36757
  peg$silentFails--;
35410
36758
  if (s0 === peg$FAILED) {
35411
36759
  s1 = peg$FAILED;
35412
36760
  if (peg$silentFails === 0) {
35413
- peg$fail(peg$e35);
36761
+ peg$fail(peg$e38);
35414
36762
  }
35415
36763
  }
35416
36764
  return s0;
@@ -35433,23 +36781,23 @@ function peg$parse2(input, options) {
35433
36781
  s0 = peg$currPos;
35434
36782
  s1 = [];
35435
36783
  s2 = input.charAt(peg$currPos);
35436
- if (peg$r4.test(s2)) {
36784
+ if (peg$r6.test(s2)) {
35437
36785
  peg$currPos++;
35438
36786
  } else {
35439
36787
  s2 = peg$FAILED;
35440
36788
  if (peg$silentFails === 0) {
35441
- peg$fail(peg$e38);
36789
+ peg$fail(peg$e41);
35442
36790
  }
35443
36791
  }
35444
36792
  while (s2 !== peg$FAILED) {
35445
36793
  s1.push(s2);
35446
36794
  s2 = input.charAt(peg$currPos);
35447
- if (peg$r4.test(s2)) {
36795
+ if (peg$r6.test(s2)) {
35448
36796
  peg$currPos++;
35449
36797
  } else {
35450
36798
  s2 = peg$FAILED;
35451
36799
  if (peg$silentFails === 0) {
35452
- peg$fail(peg$e38);
36800
+ peg$fail(peg$e41);
35453
36801
  }
35454
36802
  }
35455
36803
  }
@@ -35465,7 +36813,7 @@ function peg$parse2(input, options) {
35465
36813
  if (s0 === peg$FAILED) {
35466
36814
  s1 = peg$FAILED;
35467
36815
  if (peg$silentFails === 0) {
35468
- peg$fail(peg$e37);
36816
+ peg$fail(peg$e40);
35469
36817
  }
35470
36818
  }
35471
36819
  return s0;
@@ -35474,32 +36822,32 @@ function peg$parse2(input, options) {
35474
36822
  let s0, s1;
35475
36823
  peg$silentFails++;
35476
36824
  if (input.charCodeAt(peg$currPos) === 10) {
35477
- s0 = peg$c31;
36825
+ s0 = peg$c32;
35478
36826
  peg$currPos++;
35479
36827
  } else {
35480
36828
  s0 = peg$FAILED;
35481
36829
  if (peg$silentFails === 0) {
35482
- peg$fail(peg$e40);
36830
+ peg$fail(peg$e43);
35483
36831
  }
35484
36832
  }
35485
36833
  if (s0 === peg$FAILED) {
35486
- if (input.substr(peg$currPos, 2) === peg$c32) {
35487
- s0 = peg$c32;
36834
+ if (input.substr(peg$currPos, 2) === peg$c33) {
36835
+ s0 = peg$c33;
35488
36836
  peg$currPos += 2;
35489
36837
  } else {
35490
36838
  s0 = peg$FAILED;
35491
36839
  if (peg$silentFails === 0) {
35492
- peg$fail(peg$e41);
36840
+ peg$fail(peg$e44);
35493
36841
  }
35494
36842
  }
35495
36843
  if (s0 === peg$FAILED) {
35496
36844
  s0 = input.charAt(peg$currPos);
35497
- if (peg$r5.test(s0)) {
36845
+ if (peg$r7.test(s0)) {
35498
36846
  peg$currPos++;
35499
36847
  } else {
35500
36848
  s0 = peg$FAILED;
35501
36849
  if (peg$silentFails === 0) {
35502
- peg$fail(peg$e42);
36850
+ peg$fail(peg$e45);
35503
36851
  }
35504
36852
  }
35505
36853
  }
@@ -35508,7 +36856,7 @@ function peg$parse2(input, options) {
35508
36856
  if (s0 === peg$FAILED) {
35509
36857
  s1 = peg$FAILED;
35510
36858
  if (peg$silentFails === 0) {
35511
- peg$fail(peg$e39);
36859
+ peg$fail(peg$e42);
35512
36860
  }
35513
36861
  }
35514
36862
  return s0;
@@ -35519,23 +36867,23 @@ function peg$parse2(input, options) {
35519
36867
  s0 = peg$currPos;
35520
36868
  s1 = [];
35521
36869
  s2 = input.charAt(peg$currPos);
35522
- if (peg$r4.test(s2)) {
36870
+ if (peg$r6.test(s2)) {
35523
36871
  peg$currPos++;
35524
36872
  } else {
35525
36873
  s2 = peg$FAILED;
35526
36874
  if (peg$silentFails === 0) {
35527
- peg$fail(peg$e38);
36875
+ peg$fail(peg$e41);
35528
36876
  }
35529
36877
  }
35530
36878
  while (s2 !== peg$FAILED) {
35531
36879
  s1.push(s2);
35532
36880
  s2 = input.charAt(peg$currPos);
35533
- if (peg$r4.test(s2)) {
36881
+ if (peg$r6.test(s2)) {
35534
36882
  peg$currPos++;
35535
36883
  } else {
35536
36884
  s2 = peg$FAILED;
35537
36885
  if (peg$silentFails === 0) {
35538
- peg$fail(peg$e38);
36886
+ peg$fail(peg$e41);
35539
36887
  }
35540
36888
  }
35541
36889
  }
@@ -35551,7 +36899,7 @@ function peg$parse2(input, options) {
35551
36899
  if (s0 === peg$FAILED) {
35552
36900
  s1 = peg$FAILED;
35553
36901
  if (peg$silentFails === 0) {
35554
- peg$fail(peg$e43);
36902
+ peg$fail(peg$e46);
35555
36903
  }
35556
36904
  }
35557
36905
  return s0;
@@ -35560,19 +36908,19 @@ function peg$parse2(input, options) {
35560
36908
  let s0, s1;
35561
36909
  peg$silentFails++;
35562
36910
  s0 = input.charAt(peg$currPos);
35563
- if (peg$r6.test(s0)) {
36911
+ if (peg$r8.test(s0)) {
35564
36912
  peg$currPos++;
35565
36913
  } else {
35566
36914
  s0 = peg$FAILED;
35567
36915
  if (peg$silentFails === 0) {
35568
- peg$fail(peg$e45);
36916
+ peg$fail(peg$e48);
35569
36917
  }
35570
36918
  }
35571
36919
  peg$silentFails--;
35572
36920
  if (s0 === peg$FAILED) {
35573
36921
  s1 = peg$FAILED;
35574
36922
  if (peg$silentFails === 0) {
35575
- peg$fail(peg$e44);
36923
+ peg$fail(peg$e47);
35576
36924
  }
35577
36925
  }
35578
36926
  return s0;