@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.
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/browser/cjs/index.cjs +1786 -438
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +301 -17
- package/dist/browser/esm/index.d.ts +301 -17
- package/dist/browser/esm/index.js +1786 -438
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/index.cjs +1786 -438
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +301 -17
- package/dist/index.d.ts +301 -17
- package/dist/index.js +1786 -438
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -161,6 +161,7 @@ var BitType = (0, import_superenum.superenum)({
|
|
|
161
161
|
botActionSend: "bot-action-send",
|
|
162
162
|
botActionTrueFalse: "bot-action-true-false",
|
|
163
163
|
botInterview: "bot-interview",
|
|
164
|
+
brandColor: "brand-color",
|
|
164
165
|
browserImage: "browser-image",
|
|
165
166
|
bug: "bug",
|
|
166
167
|
bugAlt: "bug-alt",
|
|
@@ -475,7 +476,18 @@ var BitType = (0, import_superenum.superenum)({
|
|
|
475
476
|
pageSubscribe: "page-subscribe",
|
|
476
477
|
parameters: "parameters",
|
|
477
478
|
photo: "photo",
|
|
479
|
+
platform: "platform",
|
|
480
|
+
platformHeader: "platform-header",
|
|
481
|
+
platformMain: "platform-main",
|
|
482
|
+
platformMainButton: "platform-main-button",
|
|
483
|
+
platformMainInput: "platform-main-input",
|
|
478
484
|
platformPath: "platform-path",
|
|
485
|
+
platformSection: "platform-section",
|
|
486
|
+
platformSectionButton: "platform-section-button",
|
|
487
|
+
platformSectionChat: "platform-section-chat",
|
|
488
|
+
platformSectionHeader: "platform-section-header",
|
|
489
|
+
platformSectionInput: "platform-section-input",
|
|
490
|
+
platformSystemIcon: "platform-system-icon",
|
|
479
491
|
preparationNote: "preparation-note",
|
|
480
492
|
pronunciationTable: "pronunciation-table",
|
|
481
493
|
prototypeImages: "prototype-images",
|
|
@@ -606,6 +618,7 @@ var BitType = (0, import_superenum.superenum)({
|
|
|
606
618
|
surveyRatingOnce: "survey-rating-once",
|
|
607
619
|
table: "table",
|
|
608
620
|
tableAlt: "table-alt",
|
|
621
|
+
tableExtended: "table-extended",
|
|
609
622
|
tableImage: "table-image",
|
|
610
623
|
tableImageAlt: "table-image-alt",
|
|
611
624
|
takePicture: "take-picture",
|
|
@@ -736,6 +749,7 @@ var CardSetConfigKey = (0, import_superenum7.superenum)({
|
|
|
736
749
|
matchImagePairs: "matchImagePairs",
|
|
737
750
|
matchMatrix: "matchMatrix",
|
|
738
751
|
table: "table",
|
|
752
|
+
tableExtended: "tableExtended",
|
|
739
753
|
pronunciationTable: "pronunciationTable",
|
|
740
754
|
botActionResponses: "botActionResponses",
|
|
741
755
|
exampleBitList: "exampleBitList",
|
|
@@ -1102,6 +1116,7 @@ var groupKeys = {
|
|
|
1102
1116
|
group_bookCommon: "group_bookCommon",
|
|
1103
1117
|
group_learningPathCommon: "group_learningPathCommon",
|
|
1104
1118
|
group_advertisingCommon: "group_advertisingCommon",
|
|
1119
|
+
group_platformColorsCommon: "group_platformColorsCommon",
|
|
1105
1120
|
group_quizCommon: "group_quizCommon",
|
|
1106
1121
|
group_resourceBitTags: "group_resourceBitTags",
|
|
1107
1122
|
group_resourceCommon: "group_resourceCommon",
|
|
@@ -1156,6 +1171,8 @@ var propertyKeys = {
|
|
|
1156
1171
|
property_author: "@author",
|
|
1157
1172
|
property_autoplay: "@autoplay",
|
|
1158
1173
|
property_availableClassifications: "@availableClassifications",
|
|
1174
|
+
property_brandColor: "@brandColor",
|
|
1175
|
+
property_brandColorName: "@brandColorName",
|
|
1159
1176
|
property_blockId: "@blockId",
|
|
1160
1177
|
property_book: "@book",
|
|
1161
1178
|
property_bookAlias: "@bookAlias",
|
|
@@ -1222,6 +1239,8 @@ var propertyKeys = {
|
|
|
1222
1239
|
property_imageSource: "@imageSource",
|
|
1223
1240
|
property_index: "@index",
|
|
1224
1241
|
property_internalComment: "@internalComment",
|
|
1242
|
+
property_internalPrintPdf: "@internalPrintPdf",
|
|
1243
|
+
property_hasPrintRestriction: "@hasPrintRestriction",
|
|
1225
1244
|
property_isCaseSensitive: "@isCaseSensitive",
|
|
1226
1245
|
property_isInfoOnly: "@isInfoOnly",
|
|
1227
1246
|
property_isPublic: "@isPublic",
|
|
@@ -1262,6 +1281,18 @@ var propertyKeys = {
|
|
|
1262
1281
|
property_partner: "@partner",
|
|
1263
1282
|
// Deprecated, replaced by person
|
|
1264
1283
|
property_path: "@path",
|
|
1284
|
+
property_platformBackgroundColor: "@platformBackgroundColor",
|
|
1285
|
+
property_platformButtonBackgroundColor: "@platformButtonBackgroundColor",
|
|
1286
|
+
property_platformButtonPrimaryColor: "@platformButtonPrimaryColor",
|
|
1287
|
+
property_platformMessageBackgroundColor: "@platformMessageBackgroundColor",
|
|
1288
|
+
property_platformName: "@platformName",
|
|
1289
|
+
property_platformPlaceholderColor: "@platformPlaceholderColor",
|
|
1290
|
+
property_platformPrimaryColor: "@platformPrimaryColor",
|
|
1291
|
+
property_platformScrollbarColor: "@platformScrollbarColor",
|
|
1292
|
+
property_platformSecondaryColor: "@platformSecondaryColor",
|
|
1293
|
+
property_platformSelectionColor: "@platformSelectionColor",
|
|
1294
|
+
property_platformSeparatorColor: "@platformSeparatorColor",
|
|
1295
|
+
property_platformTextSelectionColor: "@platformTextSelectionColor",
|
|
1265
1296
|
property_person: "@person",
|
|
1266
1297
|
property_pointerLeft: "@pointerLeft",
|
|
1267
1298
|
property_pointerTop: "@pointerTop",
|
|
@@ -1311,6 +1342,7 @@ var propertyKeys = {
|
|
|
1311
1342
|
property_size: "@size",
|
|
1312
1343
|
property_slug: "@slug",
|
|
1313
1344
|
property_sourceDocument: "@sourceDocument",
|
|
1345
|
+
property_sourceRL: "@sourceRL",
|
|
1314
1346
|
property_spaceId: "@spaceId",
|
|
1315
1347
|
property_src1x: "@src1x",
|
|
1316
1348
|
property_src2x: "@src2x",
|
|
@@ -1332,6 +1364,10 @@ var propertyKeys = {
|
|
|
1332
1364
|
property_tableSearch: "@tableSearch",
|
|
1333
1365
|
property_tableSort: "@tableSort",
|
|
1334
1366
|
property_tableWhitespaceNoWrap: "@tableWhitespaceNoWrap",
|
|
1367
|
+
property_tableCellType: "@tableCellType",
|
|
1368
|
+
property_tableRowSpan: "@tableRowSpan",
|
|
1369
|
+
property_tableColSpan: "@tableColSpan",
|
|
1370
|
+
property_tableScope: "@tableScope",
|
|
1335
1371
|
property_tag: "@tag",
|
|
1336
1372
|
property_target: "@target",
|
|
1337
1373
|
property_technicalTerm: "@technicalTerm",
|
|
@@ -1385,6 +1421,9 @@ var resourceKeys = {
|
|
|
1385
1421
|
resource_appLink: "&appLink",
|
|
1386
1422
|
resource_websiteLink: "&websiteLink",
|
|
1387
1423
|
resource_icon: "&icon",
|
|
1424
|
+
resource_platformBackgroundImage: "&platformBackgroundImage",
|
|
1425
|
+
resource_platformIcon: "&platformIcon",
|
|
1426
|
+
resource_platformLogo: "&platformLogo",
|
|
1388
1427
|
resource_backgroundWallpaper: "&backgroundWallpaper",
|
|
1389
1428
|
resource_imagePlaceholder: "&imagePlaceholder"
|
|
1390
1429
|
};
|
|
@@ -1611,7 +1650,10 @@ var ResourceType = (0, import_superenum13.superenum)({
|
|
|
1611
1650
|
// Aliases for image
|
|
1612
1651
|
icon: "icon",
|
|
1613
1652
|
backgroundWallpaper: "backgroundWallpaper",
|
|
1614
|
-
imagePlaceholder: "imagePlaceholder"
|
|
1653
|
+
imagePlaceholder: "imagePlaceholder",
|
|
1654
|
+
platformIcon: "platformIcon",
|
|
1655
|
+
platformLogo: "platformLogo",
|
|
1656
|
+
platformBackgroundImage: "platformBackgroundImage"
|
|
1615
1657
|
});
|
|
1616
1658
|
function resourceTypeToConfigKey(type) {
|
|
1617
1659
|
return `&${stringUtils.kebabToCamel(type)}`;
|
|
@@ -2408,6 +2450,47 @@ var CARDSETS = {
|
|
|
2408
2450
|
]
|
|
2409
2451
|
]
|
|
2410
2452
|
},
|
|
2453
|
+
[CardSetConfigKey.tableExtended]: {
|
|
2454
|
+
variants: [
|
|
2455
|
+
// Side 1
|
|
2456
|
+
[
|
|
2457
|
+
// Variant 1..N
|
|
2458
|
+
{
|
|
2459
|
+
tags: [
|
|
2460
|
+
{
|
|
2461
|
+
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
2462
|
+
description: "Standard tags for lead, instruction, and hint."
|
|
2463
|
+
},
|
|
2464
|
+
{
|
|
2465
|
+
key: ConfigKey.tag_title,
|
|
2466
|
+
description: "Title of the table."
|
|
2467
|
+
},
|
|
2468
|
+
{
|
|
2469
|
+
key: ConfigKey.property_tableCellType,
|
|
2470
|
+
description: "Table cell type (th/td).",
|
|
2471
|
+
format: TagFormat.plainText
|
|
2472
|
+
},
|
|
2473
|
+
{
|
|
2474
|
+
key: ConfigKey.property_tableRowSpan,
|
|
2475
|
+
description: "Number of rows the cell spans.",
|
|
2476
|
+
format: TagFormat.number
|
|
2477
|
+
},
|
|
2478
|
+
{
|
|
2479
|
+
key: ConfigKey.property_tableColSpan,
|
|
2480
|
+
description: "Number of columns the cell spans.",
|
|
2481
|
+
format: TagFormat.number
|
|
2482
|
+
},
|
|
2483
|
+
{
|
|
2484
|
+
key: ConfigKey.property_tableScope,
|
|
2485
|
+
description: "Scope attribute for header cells.",
|
|
2486
|
+
format: TagFormat.plainText
|
|
2487
|
+
}
|
|
2488
|
+
],
|
|
2489
|
+
repeatCount: Count.infinity
|
|
2490
|
+
}
|
|
2491
|
+
]
|
|
2492
|
+
]
|
|
2493
|
+
},
|
|
2411
2494
|
[CardSetConfigKey.pronunciationTable]: {
|
|
2412
2495
|
variants: [
|
|
2413
2496
|
// Side 1
|
|
@@ -2626,6 +2709,11 @@ var GROUPS = {
|
|
|
2626
2709
|
format: TagFormat.plainText,
|
|
2627
2710
|
maxCount: Count.infinity
|
|
2628
2711
|
},
|
|
2712
|
+
{
|
|
2713
|
+
key: ConfigKey.property_sourceRL,
|
|
2714
|
+
description: "The original location of the information in the original source material",
|
|
2715
|
+
format: TagFormat.plainText
|
|
2716
|
+
},
|
|
2629
2717
|
{
|
|
2630
2718
|
key: ConfigKey.property_isTemplate,
|
|
2631
2719
|
description: "If true, the bit is a template",
|
|
@@ -3272,6 +3360,17 @@ var GROUPS = {
|
|
|
3272
3360
|
key: ConfigKey.property_sourceDocument,
|
|
3273
3361
|
description: "Url of the source document for the book (for example, a PDF file)",
|
|
3274
3362
|
format: TagFormat.plainText
|
|
3363
|
+
},
|
|
3364
|
+
{
|
|
3365
|
+
key: ConfigKey.property_internalPrintPdf,
|
|
3366
|
+
description: "Url of the internal print PDF for the book",
|
|
3367
|
+
format: TagFormat.plainText
|
|
3368
|
+
},
|
|
3369
|
+
{
|
|
3370
|
+
key: ConfigKey.property_hasPrintRestriction,
|
|
3371
|
+
description: "If true, the book has print restrictions",
|
|
3372
|
+
format: TagFormat.boolean,
|
|
3373
|
+
defaultValue: "true"
|
|
3275
3374
|
}
|
|
3276
3375
|
]
|
|
3277
3376
|
},
|
|
@@ -3361,6 +3460,67 @@ var GROUPS = {
|
|
|
3361
3460
|
}
|
|
3362
3461
|
]
|
|
3363
3462
|
},
|
|
3463
|
+
[ConfigKey.group_platformColorsCommon]: {
|
|
3464
|
+
type: GroupConfigType.standard,
|
|
3465
|
+
description: "Common platform colors",
|
|
3466
|
+
tags: [
|
|
3467
|
+
{
|
|
3468
|
+
key: ConfigKey.property_platformPrimaryColor,
|
|
3469
|
+
description: "The platform system primary color",
|
|
3470
|
+
format: TagFormat.plainText
|
|
3471
|
+
},
|
|
3472
|
+
{
|
|
3473
|
+
key: ConfigKey.property_platformSecondaryColor,
|
|
3474
|
+
description: "The platform section secondary color",
|
|
3475
|
+
format: TagFormat.plainText
|
|
3476
|
+
},
|
|
3477
|
+
{
|
|
3478
|
+
key: ConfigKey.property_platformBackgroundColor,
|
|
3479
|
+
description: "The platform system background color",
|
|
3480
|
+
format: TagFormat.plainText
|
|
3481
|
+
},
|
|
3482
|
+
{
|
|
3483
|
+
key: ConfigKey.property_platformButtonPrimaryColor,
|
|
3484
|
+
description: "The platform section header button primary color",
|
|
3485
|
+
format: TagFormat.plainText
|
|
3486
|
+
},
|
|
3487
|
+
{
|
|
3488
|
+
key: ConfigKey.property_platformButtonBackgroundColor,
|
|
3489
|
+
description: "The platform section header button background color",
|
|
3490
|
+
format: TagFormat.plainText
|
|
3491
|
+
},
|
|
3492
|
+
{
|
|
3493
|
+
key: ConfigKey.property_platformScrollbarColor,
|
|
3494
|
+
description: "The platform main scrollbar color",
|
|
3495
|
+
format: TagFormat.plainText
|
|
3496
|
+
},
|
|
3497
|
+
{
|
|
3498
|
+
key: ConfigKey.property_platformSelectionColor,
|
|
3499
|
+
description: "The platform main selection color",
|
|
3500
|
+
format: TagFormat.plainText
|
|
3501
|
+
},
|
|
3502
|
+
{
|
|
3503
|
+
key: ConfigKey.property_platformTextSelectionColor,
|
|
3504
|
+
description: "The platform main input text selection color",
|
|
3505
|
+
format: TagFormat.plainText
|
|
3506
|
+
},
|
|
3507
|
+
{
|
|
3508
|
+
key: ConfigKey.property_platformSeparatorColor,
|
|
3509
|
+
description: "The platform main separator color",
|
|
3510
|
+
format: TagFormat.plainText
|
|
3511
|
+
},
|
|
3512
|
+
{
|
|
3513
|
+
key: ConfigKey.property_platformPlaceholderColor,
|
|
3514
|
+
description: "The platform main input placeholder color",
|
|
3515
|
+
format: TagFormat.plainText
|
|
3516
|
+
},
|
|
3517
|
+
{
|
|
3518
|
+
key: ConfigKey.property_platformMessageBackgroundColor,
|
|
3519
|
+
description: "The platform section chat message background color",
|
|
3520
|
+
format: TagFormat.plainText
|
|
3521
|
+
}
|
|
3522
|
+
]
|
|
3523
|
+
},
|
|
3364
3524
|
[ConfigKey.group_quizCommon]: {
|
|
3365
3525
|
type: GroupConfigType.standard,
|
|
3366
3526
|
description: "Common quiz tags",
|
|
@@ -7162,6 +7322,23 @@ var BITS = {
|
|
|
7162
7322
|
baseBitType: BitType.interview,
|
|
7163
7323
|
description: "Bot interview bit, used to create bot interviews in articles or books"
|
|
7164
7324
|
},
|
|
7325
|
+
[BitType.brandColor]: {
|
|
7326
|
+
since: "4.12.0",
|
|
7327
|
+
baseBitType: BitType._standard,
|
|
7328
|
+
description: "Brand color bit, used to define brand colors",
|
|
7329
|
+
tags: [
|
|
7330
|
+
{
|
|
7331
|
+
key: ConfigKey.property_brandColor,
|
|
7332
|
+
description: "The brand color",
|
|
7333
|
+
format: TagFormat.plainText
|
|
7334
|
+
},
|
|
7335
|
+
{
|
|
7336
|
+
key: ConfigKey.property_brandColorName,
|
|
7337
|
+
description: "The brand color name",
|
|
7338
|
+
format: TagFormat.plainText
|
|
7339
|
+
}
|
|
7340
|
+
]
|
|
7341
|
+
},
|
|
7165
7342
|
[BitType.learningPathBook]: {
|
|
7166
7343
|
since: "1.3.0",
|
|
7167
7344
|
baseBitType: BitType._standard,
|
|
@@ -7920,6 +8097,160 @@ var BITS = {
|
|
|
7920
8097
|
baseBitType: BitType.image,
|
|
7921
8098
|
description: "Photo bit, used to create photo bits in articles or books"
|
|
7922
8099
|
},
|
|
8100
|
+
[BitType.platform]: {
|
|
8101
|
+
since: "4.12.0",
|
|
8102
|
+
baseBitType: BitType._standard,
|
|
8103
|
+
description: "Platform bit, used to define platform properties",
|
|
8104
|
+
tags: [
|
|
8105
|
+
{
|
|
8106
|
+
key: ConfigKey.property_platformName,
|
|
8107
|
+
description: "The platform name",
|
|
8108
|
+
format: TagFormat.plainText
|
|
8109
|
+
},
|
|
8110
|
+
{
|
|
8111
|
+
key: ConfigKey.resource_platformIcon,
|
|
8112
|
+
description: "The platform icon",
|
|
8113
|
+
chain: [
|
|
8114
|
+
{
|
|
8115
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
8116
|
+
description: "Common image properties for the platform icon resource"
|
|
8117
|
+
}
|
|
8118
|
+
],
|
|
8119
|
+
maxCount: 1
|
|
8120
|
+
}
|
|
8121
|
+
]
|
|
8122
|
+
},
|
|
8123
|
+
[BitType.platformHeader]: {
|
|
8124
|
+
since: "4.12.0",
|
|
8125
|
+
baseBitType: BitType._standard,
|
|
8126
|
+
description: "Platform header bit, used to define platform header properties",
|
|
8127
|
+
tags: [
|
|
8128
|
+
{
|
|
8129
|
+
key: ConfigKey.resource_platformLogo,
|
|
8130
|
+
description: "The platform logo",
|
|
8131
|
+
chain: [
|
|
8132
|
+
{
|
|
8133
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
8134
|
+
description: "Common image properties for the platform logo resource"
|
|
8135
|
+
}
|
|
8136
|
+
],
|
|
8137
|
+
maxCount: 1
|
|
8138
|
+
},
|
|
8139
|
+
{
|
|
8140
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8141
|
+
description: "Common platform colors"
|
|
8142
|
+
}
|
|
8143
|
+
]
|
|
8144
|
+
},
|
|
8145
|
+
[BitType.platformMain]: {
|
|
8146
|
+
since: "4.12.0",
|
|
8147
|
+
baseBitType: BitType._standard,
|
|
8148
|
+
description: "Platform main bit, used to define platform main properties",
|
|
8149
|
+
tags: [
|
|
8150
|
+
{
|
|
8151
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8152
|
+
description: "Common platform colors"
|
|
8153
|
+
}
|
|
8154
|
+
]
|
|
8155
|
+
},
|
|
8156
|
+
[BitType.platformMainButton]: {
|
|
8157
|
+
since: "4.12.0",
|
|
8158
|
+
baseBitType: BitType._standard,
|
|
8159
|
+
description: "Platform main button bit, used to define platform main button properties",
|
|
8160
|
+
tags: [
|
|
8161
|
+
{
|
|
8162
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8163
|
+
description: "Common platform colors"
|
|
8164
|
+
}
|
|
8165
|
+
]
|
|
8166
|
+
},
|
|
8167
|
+
[BitType.platformMainInput]: {
|
|
8168
|
+
since: "4.12.0",
|
|
8169
|
+
baseBitType: BitType._standard,
|
|
8170
|
+
description: "Platform main input bit, used to define platform main input properties",
|
|
8171
|
+
tags: [
|
|
8172
|
+
{
|
|
8173
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8174
|
+
description: "Common platform colors"
|
|
8175
|
+
}
|
|
8176
|
+
]
|
|
8177
|
+
},
|
|
8178
|
+
[BitType.platformSection]: {
|
|
8179
|
+
since: "4.12.0",
|
|
8180
|
+
baseBitType: BitType._standard,
|
|
8181
|
+
description: "Platform section bit, used to define platform section properties",
|
|
8182
|
+
tags: [
|
|
8183
|
+
{
|
|
8184
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8185
|
+
description: "Common platform colors"
|
|
8186
|
+
}
|
|
8187
|
+
]
|
|
8188
|
+
},
|
|
8189
|
+
[BitType.platformSectionButton]: {
|
|
8190
|
+
since: "4.12.0",
|
|
8191
|
+
baseBitType: BitType._standard,
|
|
8192
|
+
description: "Platform section button bit, used to define platform section button properties",
|
|
8193
|
+
tags: [
|
|
8194
|
+
{
|
|
8195
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8196
|
+
description: "Common platform colors"
|
|
8197
|
+
}
|
|
8198
|
+
]
|
|
8199
|
+
},
|
|
8200
|
+
[BitType.platformSectionChat]: {
|
|
8201
|
+
since: "4.12.0",
|
|
8202
|
+
baseBitType: BitType._standard,
|
|
8203
|
+
description: "Platform section chat bit, used to define platform section chat properties",
|
|
8204
|
+
tags: [
|
|
8205
|
+
{
|
|
8206
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8207
|
+
description: "Common platform colors"
|
|
8208
|
+
},
|
|
8209
|
+
{
|
|
8210
|
+
key: ConfigKey.resource_platformBackgroundImage,
|
|
8211
|
+
description: "The platform section chat background image",
|
|
8212
|
+
chain: [
|
|
8213
|
+
{
|
|
8214
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
8215
|
+
description: "Common image properties for the platform background image resource"
|
|
8216
|
+
}
|
|
8217
|
+
]
|
|
8218
|
+
}
|
|
8219
|
+
]
|
|
8220
|
+
},
|
|
8221
|
+
[BitType.platformSectionHeader]: {
|
|
8222
|
+
since: "4.12.0",
|
|
8223
|
+
baseBitType: BitType._standard,
|
|
8224
|
+
description: "Platform section header bit, used to define platform section header properties",
|
|
8225
|
+
tags: [
|
|
8226
|
+
{
|
|
8227
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8228
|
+
description: "Common platform colors"
|
|
8229
|
+
}
|
|
8230
|
+
]
|
|
8231
|
+
},
|
|
8232
|
+
[BitType.platformSectionInput]: {
|
|
8233
|
+
since: "4.12.0",
|
|
8234
|
+
baseBitType: BitType._standard,
|
|
8235
|
+
description: "Platform section input bit, used to define platform section input properties",
|
|
8236
|
+
tags: [
|
|
8237
|
+
{
|
|
8238
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8239
|
+
description: "Common platform colors"
|
|
8240
|
+
}
|
|
8241
|
+
]
|
|
8242
|
+
},
|
|
8243
|
+
[BitType.platformSystemIcon]: {
|
|
8244
|
+
since: "4.12.0",
|
|
8245
|
+
baseBitType: BitType._standard,
|
|
8246
|
+
description: "Platform system icon bit, used to define platform system icon properties",
|
|
8247
|
+
tags: [
|
|
8248
|
+
{
|
|
8249
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8250
|
+
description: "Common platform colors"
|
|
8251
|
+
}
|
|
8252
|
+
]
|
|
8253
|
+
},
|
|
7923
8254
|
[BitType.quote]: {
|
|
7924
8255
|
since: "1.3.0",
|
|
7925
8256
|
baseBitType: BitType._standard,
|
|
@@ -8287,6 +8618,12 @@ var BITS = {
|
|
|
8287
8618
|
],
|
|
8288
8619
|
cardSet: CardSetConfigKey.table
|
|
8289
8620
|
},
|
|
8621
|
+
[BitType.tableExtended]: {
|
|
8622
|
+
since: "4.14.0",
|
|
8623
|
+
baseBitType: BitType.table,
|
|
8624
|
+
description: "Extended table bit, used to create complex tables with all HTML table features",
|
|
8625
|
+
cardSet: CardSetConfigKey.tableExtended
|
|
8626
|
+
},
|
|
8290
8627
|
[BitType.tableAlt]: {
|
|
8291
8628
|
since: "1.16.0",
|
|
8292
8629
|
baseBitType: BitType.table,
|
|
@@ -9268,7 +9605,7 @@ var instance2 = new Config();
|
|
|
9268
9605
|
// src/generated/package_info.ts
|
|
9269
9606
|
var PACKAGE_INFO = {
|
|
9270
9607
|
"name": "@gmb/bitmark-parser-generator",
|
|
9271
|
-
"version": "4.
|
|
9608
|
+
"version": "4.14.0",
|
|
9272
9609
|
"author": "Get More Brain Ltd",
|
|
9273
9610
|
"license": "ISC",
|
|
9274
9611
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -9613,6 +9950,10 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9613
9950
|
advertisingClickUrl: "advertisingClickUrl",
|
|
9614
9951
|
advertisingClickUrlValue: "advertisingClickUrlValue",
|
|
9615
9952
|
ageRange: "ageRange",
|
|
9953
|
+
brandColor: "brandColor",
|
|
9954
|
+
brandColorValue: "brandColorValue",
|
|
9955
|
+
brandColorName: "brandColorName",
|
|
9956
|
+
brandColorNameValue: "brandColorNameValue",
|
|
9616
9957
|
ageRangeValue: "ageRangeValue",
|
|
9617
9958
|
aiGenerated: "aiGenerated",
|
|
9618
9959
|
aiGeneratedValue: "aiGeneratedValue",
|
|
@@ -9765,6 +10106,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9765
10106
|
durationValue: "durationValue",
|
|
9766
10107
|
elements: "elements",
|
|
9767
10108
|
elementsValue: "elementsValue",
|
|
10109
|
+
elementsValueValue: "elementsValueValue",
|
|
9768
10110
|
emphasis: "emphasis",
|
|
9769
10111
|
end: "end",
|
|
9770
10112
|
errors: "errors",
|
|
@@ -9793,6 +10135,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9793
10135
|
focusY: "focusY",
|
|
9794
10136
|
focusYValue: "focusYValue",
|
|
9795
10137
|
footer: "footer",
|
|
10138
|
+
footerValue: "footerValue",
|
|
9796
10139
|
footerText: "footerText",
|
|
9797
10140
|
forKeys: "forKeys",
|
|
9798
10141
|
format: "format",
|
|
@@ -9815,11 +10158,13 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9815
10158
|
hasBookNavigationValue: "hasBookNavigationValue",
|
|
9816
10159
|
hasMarkAsDone: "hasMarkAsDone",
|
|
9817
10160
|
hasMarkAsDoneValue: "hasMarkAsDoneValue",
|
|
10161
|
+
head: "head",
|
|
9818
10162
|
heading: "heading",
|
|
9819
10163
|
height: "height",
|
|
9820
10164
|
heightValue: "heightValue",
|
|
9821
10165
|
highlight: "highlight",
|
|
9822
10166
|
hint: "hint",
|
|
10167
|
+
hintValue: "hintValue",
|
|
9823
10168
|
href: "href",
|
|
9824
10169
|
icon: "icon",
|
|
9825
10170
|
iconTag: "iconTag",
|
|
@@ -9841,8 +10186,13 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9841
10186
|
ingredients: "ingredients",
|
|
9842
10187
|
ingredientsValue: "ingredientsValue",
|
|
9843
10188
|
instruction: "instruction",
|
|
10189
|
+
instructionValue: "instructionValue",
|
|
9844
10190
|
internalComment: "internalComment",
|
|
9845
10191
|
internalCommentValue: "internalCommentValue",
|
|
10192
|
+
internalPrintPdf: "internalPrintPdf",
|
|
10193
|
+
internalPrintPdfValue: "internalPrintPdfValue",
|
|
10194
|
+
hasPrintRestriction: "hasPrintRestriction",
|
|
10195
|
+
hasPrintRestrictionValue: "hasPrintRestrictionValue",
|
|
9846
10196
|
isCaseSensitive: "isCaseSensitive",
|
|
9847
10197
|
isCommented: "isCommented",
|
|
9848
10198
|
isCorrect: "isCorrect",
|
|
@@ -9861,6 +10211,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9861
10211
|
isTracked: "isTracked",
|
|
9862
10212
|
isTrackedValue: "isTrackedValue",
|
|
9863
10213
|
item: "item",
|
|
10214
|
+
itemValue: "itemValue",
|
|
9864
10215
|
itemLead: "itemLead",
|
|
9865
10216
|
jobTitle: "jobTitle",
|
|
9866
10217
|
jobTitleValue: "jobTitleValue",
|
|
@@ -9887,6 +10238,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9887
10238
|
layerRoleValue: "layerRoleValue",
|
|
9888
10239
|
layerValue: "layerValue",
|
|
9889
10240
|
lead: "lead",
|
|
10241
|
+
leadValue: "leadValue",
|
|
9890
10242
|
level: "level",
|
|
9891
10243
|
levelACTFL: "levelACTFL",
|
|
9892
10244
|
levelACTFLValue: "levelACTFLValue",
|
|
@@ -9908,6 +10260,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9908
10260
|
machineTranslatedValue: "machineTranslatedValue",
|
|
9909
10261
|
mailingList: "mailingList",
|
|
9910
10262
|
marginNumber: "marginNumber",
|
|
10263
|
+
marginNumberValue: "marginNumberValue",
|
|
9911
10264
|
mark: "mark",
|
|
9912
10265
|
markConfig: "markConfig",
|
|
9913
10266
|
markConfigValue: "markConfigValue",
|
|
@@ -9936,6 +10289,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9936
10289
|
pageNo: "pageNo",
|
|
9937
10290
|
pageNoValue: "pageNoValue",
|
|
9938
10291
|
pageNumber: "pageNumber",
|
|
10292
|
+
pageNumberValue: "pageNumberValue",
|
|
9939
10293
|
pageValue: "pageValue",
|
|
9940
10294
|
pairs: "pairs",
|
|
9941
10295
|
pairsValue: "pairsValue",
|
|
@@ -9945,6 +10299,36 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9945
10299
|
partialAnswerValue: "partialAnswerValue",
|
|
9946
10300
|
path: "path",
|
|
9947
10301
|
pathValue: "pathValue",
|
|
10302
|
+
platformName: "platformName",
|
|
10303
|
+
platformNameValue: "platformNameValue",
|
|
10304
|
+
platformIcon: "platformIcon",
|
|
10305
|
+
platformIconValue: "platformIconValue",
|
|
10306
|
+
platformLogo: "platformLogo",
|
|
10307
|
+
platformLogoValue: "platformLogoValue",
|
|
10308
|
+
platformPrimaryColor: "platformPrimaryColor",
|
|
10309
|
+
platformPrimaryColorValue: "platformPrimaryColorValue",
|
|
10310
|
+
platformSecondaryColor: "platformSecondaryColor",
|
|
10311
|
+
platformSecondaryColorValue: "platformSecondaryColorValue",
|
|
10312
|
+
platformBackgroundColor: "platformBackgroundColor",
|
|
10313
|
+
platformBackgroundColorValue: "platformBackgroundColorValue",
|
|
10314
|
+
platformScrollbarColor: "platformScrollbarColor",
|
|
10315
|
+
platformScrollbarColorValue: "platformScrollbarColorValue",
|
|
10316
|
+
platformSelectionColor: "platformSelectionColor",
|
|
10317
|
+
platformSelectionColorValue: "platformSelectionColorValue",
|
|
10318
|
+
platformSeparatorColor: "platformSeparatorColor",
|
|
10319
|
+
platformSeparatorColorValue: "platformSeparatorColorValue",
|
|
10320
|
+
platformPlaceholderColor: "platformPlaceholderColor",
|
|
10321
|
+
platformPlaceholderColorValue: "platformPlaceholderColorValue",
|
|
10322
|
+
platformTextSelectionColor: "platformTextSelectionColor",
|
|
10323
|
+
platformTextSelectionColorValue: "platformTextSelectionColorValue",
|
|
10324
|
+
platformButtonPrimaryColor: "platformButtonPrimaryColor",
|
|
10325
|
+
platformButtonPrimaryColorValue: "platformButtonPrimaryColorValue",
|
|
10326
|
+
platformButtonBackgroundColor: "platformButtonBackgroundColor",
|
|
10327
|
+
platformButtonBackgroundColorValue: "platformButtonBackgroundColorValue",
|
|
10328
|
+
platformMessageBackgroundColor: "platformMessageBackgroundColor",
|
|
10329
|
+
platformMessageBackgroundColorValue: "platformMessageBackgroundColorValue",
|
|
10330
|
+
platformBackgroundImage: "platformBackgroundImage",
|
|
10331
|
+
platformBackgroundImageValue: "platformBackgroundImageValue",
|
|
9948
10332
|
person: "person",
|
|
9949
10333
|
pointerLeft: "pointerLeft",
|
|
9950
10334
|
pointerLeftValue: "pointerLeftValue",
|
|
@@ -9989,6 +10373,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
9989
10373
|
publisherValue: "publisherValue",
|
|
9990
10374
|
quantity: "quantity",
|
|
9991
10375
|
question: "question",
|
|
10376
|
+
questionValue: "questionValue",
|
|
9992
10377
|
questions: "questions",
|
|
9993
10378
|
questionsValue: "questionsValue",
|
|
9994
10379
|
quizCountItems: "quizCountItems",
|
|
@@ -10041,6 +10426,10 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10041
10426
|
revealSolutions: "revealSolutions",
|
|
10042
10427
|
root: "root",
|
|
10043
10428
|
// bit type (root)
|
|
10429
|
+
rows: "rows",
|
|
10430
|
+
rowsValue: "rowsValue",
|
|
10431
|
+
rubric: "rubric",
|
|
10432
|
+
rubricValue: "rubricValue",
|
|
10044
10433
|
sampleSolution: "sampleSolution",
|
|
10045
10434
|
sampleSolutionValue: "sampleSolutionValue",
|
|
10046
10435
|
scormSource: "scormSource",
|
|
@@ -10063,7 +10452,8 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10063
10452
|
solutionsValue: "solutionsValue",
|
|
10064
10453
|
sourceDocument: "sourceDocument",
|
|
10065
10454
|
sourceDocumentValue: "sourceDocumentValue",
|
|
10066
|
-
|
|
10455
|
+
sourceRL: "sourceRL",
|
|
10456
|
+
sourceRLValue: "sourceRLValue",
|
|
10067
10457
|
spaceId: "spaceId",
|
|
10068
10458
|
spaceIdValue: "spaceIdValue",
|
|
10069
10459
|
src: "src",
|
|
@@ -10645,6 +11035,103 @@ var DeprecatedTextFormat = (0, import_superenum23.superenum)({
|
|
|
10645
11035
|
// bitmark-- text format, deprecated
|
|
10646
11036
|
});
|
|
10647
11037
|
|
|
11038
|
+
// src/parser/json/TableUtils.ts
|
|
11039
|
+
function isTableBasicFormat(table) {
|
|
11040
|
+
const t = table;
|
|
11041
|
+
return !!(t.columns || t.data) && !(t.head || t.body || t.foot);
|
|
11042
|
+
}
|
|
11043
|
+
function isTableExtendedFormat(table) {
|
|
11044
|
+
const t = table;
|
|
11045
|
+
return !!(t.head || t.body || t.foot);
|
|
11046
|
+
}
|
|
11047
|
+
function isMixedTableFormat(table) {
|
|
11048
|
+
const t = table;
|
|
11049
|
+
const hasOld = !!(t.columns || t.data);
|
|
11050
|
+
const hasNew = !!(t.head || t.body || t.foot);
|
|
11051
|
+
return hasOld && hasNew;
|
|
11052
|
+
}
|
|
11053
|
+
function convertBasicToExtendedTableFormat(table) {
|
|
11054
|
+
const tableExtended = {};
|
|
11055
|
+
if (table.columns && table.columns.length > 0) {
|
|
11056
|
+
tableExtended.head = {
|
|
11057
|
+
rows: [
|
|
11058
|
+
{
|
|
11059
|
+
cells: table.columns.map((col) => ({
|
|
11060
|
+
content: col,
|
|
11061
|
+
title: true
|
|
11062
|
+
}))
|
|
11063
|
+
}
|
|
11064
|
+
]
|
|
11065
|
+
};
|
|
11066
|
+
}
|
|
11067
|
+
if (table.data && table.data.length > 0) {
|
|
11068
|
+
tableExtended.body = {
|
|
11069
|
+
rows: table.data.map((row) => ({
|
|
11070
|
+
cells: row.map((cell) => ({
|
|
11071
|
+
content: cell
|
|
11072
|
+
}))
|
|
11073
|
+
}))
|
|
11074
|
+
};
|
|
11075
|
+
}
|
|
11076
|
+
return tableExtended;
|
|
11077
|
+
}
|
|
11078
|
+
function convertExtendedToBasicTableFormat(tableExtended) {
|
|
11079
|
+
const table = {};
|
|
11080
|
+
const extractRowCells = (row) => {
|
|
11081
|
+
if (!row || !Array.isArray(row.cells)) {
|
|
11082
|
+
return [];
|
|
11083
|
+
}
|
|
11084
|
+
return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
|
|
11085
|
+
};
|
|
11086
|
+
const dataRows = [];
|
|
11087
|
+
const headRows = tableExtended.head?.rows ?? [];
|
|
11088
|
+
if (headRows.length > 0) {
|
|
11089
|
+
const primaryHeader = extractRowCells(headRows[0]);
|
|
11090
|
+
if (primaryHeader.length > 0) {
|
|
11091
|
+
table.columns = primaryHeader;
|
|
11092
|
+
}
|
|
11093
|
+
const remainingHeadRows = headRows.slice(1);
|
|
11094
|
+
remainingHeadRows.forEach((row) => {
|
|
11095
|
+
const cells = extractRowCells(row);
|
|
11096
|
+
if (cells.length > 0) {
|
|
11097
|
+
dataRows.push(cells);
|
|
11098
|
+
}
|
|
11099
|
+
});
|
|
11100
|
+
}
|
|
11101
|
+
const appendSectionRows = (section) => {
|
|
11102
|
+
if (!section || !Array.isArray(section.rows)) {
|
|
11103
|
+
return;
|
|
11104
|
+
}
|
|
11105
|
+
section.rows.forEach((row) => {
|
|
11106
|
+
const cells = extractRowCells(row);
|
|
11107
|
+
if (cells.length > 0) {
|
|
11108
|
+
dataRows.push(cells);
|
|
11109
|
+
}
|
|
11110
|
+
});
|
|
11111
|
+
};
|
|
11112
|
+
appendSectionRows(tableExtended.body);
|
|
11113
|
+
appendSectionRows(tableExtended.foot);
|
|
11114
|
+
if (dataRows.length > 0) {
|
|
11115
|
+
table.data = dataRows;
|
|
11116
|
+
}
|
|
11117
|
+
return table;
|
|
11118
|
+
}
|
|
11119
|
+
function normalizeTableFormat(bitType, table) {
|
|
11120
|
+
if (isMixedTableFormat(table)) {
|
|
11121
|
+
const t = table;
|
|
11122
|
+
delete t.columns;
|
|
11123
|
+
delete t.data;
|
|
11124
|
+
}
|
|
11125
|
+
const isExtended = instance2.isOfBitType(bitType, BitType.tableExtended);
|
|
11126
|
+
if (isExtended && isTableBasicFormat(table)) {
|
|
11127
|
+
return convertBasicToExtendedTableFormat(table);
|
|
11128
|
+
}
|
|
11129
|
+
if (!isExtended && isTableExtendedFormat(table)) {
|
|
11130
|
+
return convertExtendedToBasicTableFormat(table);
|
|
11131
|
+
}
|
|
11132
|
+
return table;
|
|
11133
|
+
}
|
|
11134
|
+
|
|
10648
11135
|
// src/utils/ArrayUtils.ts
|
|
10649
11136
|
var ArrayUtils = class {
|
|
10650
11137
|
/**
|
|
@@ -21462,6 +21949,9 @@ var ResourceBuilder = class extends BaseBuilder {
|
|
|
21462
21949
|
case ResourceType.backgroundWallpaper:
|
|
21463
21950
|
case ResourceType.imagePlaceholder:
|
|
21464
21951
|
case ResourceType.icon:
|
|
21952
|
+
case ResourceType.platformIcon:
|
|
21953
|
+
case ResourceType.platformLogo:
|
|
21954
|
+
case ResourceType.platformBackgroundImage:
|
|
21465
21955
|
node = this.imageResource(context, finalData, type);
|
|
21466
21956
|
break;
|
|
21467
21957
|
// case ResourceType.imageResponsive: {
|
|
@@ -22435,6 +22925,7 @@ var Builder = class extends BaseBuilder {
|
|
|
22435
22925
|
* @returns
|
|
22436
22926
|
*/
|
|
22437
22927
|
buildBit(data, options) {
|
|
22928
|
+
data = structuredClone(data);
|
|
22438
22929
|
const bitType = data.bitType;
|
|
22439
22930
|
const bitConfig = instance2.getBitConfig(bitType);
|
|
22440
22931
|
const deprecatedTextFormat = DeprecatedTextFormat.fromValue(data.textFormat);
|
|
@@ -22498,6 +22989,7 @@ var Builder = class extends BaseBuilder {
|
|
|
22498
22989
|
data.jupyterExecutionCount,
|
|
22499
22990
|
options
|
|
22500
22991
|
),
|
|
22992
|
+
sourceRL: this.toAstProperty(bitType, ConfigKey.property_sourceRL, data.sourceRL, options),
|
|
22501
22993
|
isPublic: this.toAstProperty(bitType, ConfigKey.property_isPublic, data.isPublic, options),
|
|
22502
22994
|
isTemplate: this.toAstProperty(
|
|
22503
22995
|
bitType,
|
|
@@ -23021,6 +23513,18 @@ var Builder = class extends BaseBuilder {
|
|
|
23021
23513
|
data.advertisingClickUrl,
|
|
23022
23514
|
options
|
|
23023
23515
|
),
|
|
23516
|
+
brandColor: this.toAstProperty(
|
|
23517
|
+
bitType,
|
|
23518
|
+
ConfigKey.property_brandColor,
|
|
23519
|
+
data.brandColor,
|
|
23520
|
+
options
|
|
23521
|
+
),
|
|
23522
|
+
brandColorName: this.toAstProperty(
|
|
23523
|
+
bitType,
|
|
23524
|
+
ConfigKey.property_brandColorName,
|
|
23525
|
+
data.brandColorName,
|
|
23526
|
+
options
|
|
23527
|
+
),
|
|
23024
23528
|
caption: this.handleJsonText(context, TextLocation2.tag, data.caption),
|
|
23025
23529
|
quotedPerson: this.toAstProperty(
|
|
23026
23530
|
bitType,
|
|
@@ -23084,6 +23588,18 @@ var Builder = class extends BaseBuilder {
|
|
|
23084
23588
|
data.sourceDocument,
|
|
23085
23589
|
options
|
|
23086
23590
|
),
|
|
23591
|
+
internalPrintPdf: this.toAstProperty(
|
|
23592
|
+
bitType,
|
|
23593
|
+
ConfigKey.property_internalPrintPdf,
|
|
23594
|
+
data.internalPrintPdf,
|
|
23595
|
+
options
|
|
23596
|
+
),
|
|
23597
|
+
hasPrintRestriction: this.toAstProperty(
|
|
23598
|
+
bitType,
|
|
23599
|
+
ConfigKey.property_hasPrintRestriction,
|
|
23600
|
+
data.hasPrintRestriction,
|
|
23601
|
+
options
|
|
23602
|
+
),
|
|
23087
23603
|
tocResource: this.toAstProperty(
|
|
23088
23604
|
bitType,
|
|
23089
23605
|
ConfigKey.property_tocResource,
|
|
@@ -23097,6 +23613,81 @@ var Builder = class extends BaseBuilder {
|
|
|
23097
23613
|
options
|
|
23098
23614
|
),
|
|
23099
23615
|
page: this.toAstProperty(bitType, ConfigKey.property_page, data.page, options),
|
|
23616
|
+
platformName: this.toAstProperty(
|
|
23617
|
+
bitType,
|
|
23618
|
+
ConfigKey.property_platformName,
|
|
23619
|
+
data.platformName,
|
|
23620
|
+
options
|
|
23621
|
+
),
|
|
23622
|
+
platformIcon: this.toImageResource(context, data.platformIcon),
|
|
23623
|
+
platformLogo: this.toImageResource(context, data.platformLogo),
|
|
23624
|
+
platformPrimaryColor: this.toAstProperty(
|
|
23625
|
+
bitType,
|
|
23626
|
+
ConfigKey.property_platformPrimaryColor,
|
|
23627
|
+
data.platformPrimaryColor,
|
|
23628
|
+
options
|
|
23629
|
+
),
|
|
23630
|
+
platformSecondaryColor: this.toAstProperty(
|
|
23631
|
+
bitType,
|
|
23632
|
+
ConfigKey.property_platformSecondaryColor,
|
|
23633
|
+
data.platformSecondaryColor,
|
|
23634
|
+
options
|
|
23635
|
+
),
|
|
23636
|
+
platformBackgroundColor: this.toAstProperty(
|
|
23637
|
+
bitType,
|
|
23638
|
+
ConfigKey.property_platformBackgroundColor,
|
|
23639
|
+
data.platformBackgroundColor,
|
|
23640
|
+
options
|
|
23641
|
+
),
|
|
23642
|
+
platformScrollbarColor: this.toAstProperty(
|
|
23643
|
+
bitType,
|
|
23644
|
+
ConfigKey.property_platformScrollbarColor,
|
|
23645
|
+
data.platformScrollbarColor,
|
|
23646
|
+
options
|
|
23647
|
+
),
|
|
23648
|
+
platformSelectionColor: this.toAstProperty(
|
|
23649
|
+
bitType,
|
|
23650
|
+
ConfigKey.property_platformSelectionColor,
|
|
23651
|
+
data.platformSelectionColor,
|
|
23652
|
+
options
|
|
23653
|
+
),
|
|
23654
|
+
platformSeparatorColor: this.toAstProperty(
|
|
23655
|
+
bitType,
|
|
23656
|
+
ConfigKey.property_platformSeparatorColor,
|
|
23657
|
+
data.platformSeparatorColor,
|
|
23658
|
+
options
|
|
23659
|
+
),
|
|
23660
|
+
platformPlaceholderColor: this.toAstProperty(
|
|
23661
|
+
bitType,
|
|
23662
|
+
ConfigKey.property_platformPlaceholderColor,
|
|
23663
|
+
data.platformPlaceholderColor,
|
|
23664
|
+
options
|
|
23665
|
+
),
|
|
23666
|
+
platformTextSelectionColor: this.toAstProperty(
|
|
23667
|
+
bitType,
|
|
23668
|
+
ConfigKey.property_platformTextSelectionColor,
|
|
23669
|
+
data.platformTextSelectionColor,
|
|
23670
|
+
options
|
|
23671
|
+
),
|
|
23672
|
+
platformButtonPrimaryColor: this.toAstProperty(
|
|
23673
|
+
bitType,
|
|
23674
|
+
ConfigKey.property_platformButtonPrimaryColor,
|
|
23675
|
+
data.platformButtonPrimaryColor,
|
|
23676
|
+
options
|
|
23677
|
+
),
|
|
23678
|
+
platformButtonBackgroundColor: this.toAstProperty(
|
|
23679
|
+
bitType,
|
|
23680
|
+
ConfigKey.property_platformButtonBackgroundColor,
|
|
23681
|
+
data.platformButtonBackgroundColor,
|
|
23682
|
+
options
|
|
23683
|
+
),
|
|
23684
|
+
platformMessageBackgroundColor: this.toAstProperty(
|
|
23685
|
+
bitType,
|
|
23686
|
+
ConfigKey.property_platformMessageBackgroundColor,
|
|
23687
|
+
data.platformMessageBackgroundColor,
|
|
23688
|
+
options
|
|
23689
|
+
),
|
|
23690
|
+
platformBackgroundImage: this.toImageResource(context, data.platformBackgroundImage),
|
|
23100
23691
|
productId: this.toAstProperty(bitType, ConfigKey.property_productId, data.productId, options),
|
|
23101
23692
|
product: this.toAstProperty(bitType, ConfigKey.property_product, data.product, options),
|
|
23102
23693
|
// productList: this.toAstProperty(
|
|
@@ -23168,7 +23759,6 @@ var Builder = class extends BaseBuilder {
|
|
|
23168
23759
|
item: this.handleJsonText(context, TextLocation2.tag, data.item),
|
|
23169
23760
|
lead: this.handleJsonText(context, TextLocation2.tag, data.lead),
|
|
23170
23761
|
pageNumber: this.handleJsonText(context, TextLocation2.tag, data.pageNumber),
|
|
23171
|
-
sourcePageNumber: this.handleJsonText(context, TextLocation2.tag, data.sourcePageNumber),
|
|
23172
23762
|
marginNumber: this.handleJsonText(context, TextLocation2.tag, data.marginNumber),
|
|
23173
23763
|
hint: this.handleJsonText(context, TextLocation2.tag, data.hint),
|
|
23174
23764
|
instruction: this.handleJsonText(context, TextLocation2.tag, data.instruction),
|
|
@@ -23271,15 +23861,7 @@ var Builder = class extends BaseBuilder {
|
|
|
23271
23861
|
objectUtils.removeUnwantedProperties(node, {
|
|
23272
23862
|
ignoreAllFalse: true,
|
|
23273
23863
|
ignoreUndefined: ["example"],
|
|
23274
|
-
ignoreEmptyArrays: [
|
|
23275
|
-
"item",
|
|
23276
|
-
"lead",
|
|
23277
|
-
"pageNumber",
|
|
23278
|
-
"sourcePageNumber",
|
|
23279
|
-
"marginNumber",
|
|
23280
|
-
"hint",
|
|
23281
|
-
"instruction"
|
|
23282
|
-
]
|
|
23864
|
+
ignoreEmptyArrays: ["item", "lead", "pageNumber", "marginNumber", "hint", "instruction"]
|
|
23283
23865
|
});
|
|
23284
23866
|
return nodeValidator.validateBit(node);
|
|
23285
23867
|
}
|
|
@@ -23787,21 +24369,53 @@ var Builder = class extends BaseBuilder {
|
|
|
23787
24369
|
return node;
|
|
23788
24370
|
}
|
|
23789
24371
|
/**
|
|
23790
|
-
* Build table node
|
|
24372
|
+
* Build table / table extended node
|
|
23791
24373
|
*
|
|
23792
24374
|
* @param data - data for the node
|
|
23793
24375
|
* @returns
|
|
23794
24376
|
*/
|
|
23795
24377
|
buildTable(context, dataIn) {
|
|
23796
24378
|
if (!dataIn) return void 0;
|
|
23797
|
-
const node =
|
|
23798
|
-
|
|
24379
|
+
const node = normalizeTableFormat(context.bitType, dataIn);
|
|
24380
|
+
const nodeTable = node;
|
|
24381
|
+
const nodeTableExtended = node;
|
|
24382
|
+
if (Array.isArray(nodeTable.columns) && nodeTable.columns.length > 0) {
|
|
24383
|
+
nodeTable.columns = nodeTable.columns.map(
|
|
23799
24384
|
(col) => this.handleJsonText(context, TextLocation2.tag, col)
|
|
23800
|
-
)
|
|
23801
|
-
|
|
24385
|
+
);
|
|
24386
|
+
}
|
|
24387
|
+
if (Array.isArray(nodeTable.data) && nodeTable.data.length > 0) {
|
|
24388
|
+
nodeTable.data = nodeTable.data.map(
|
|
23802
24389
|
(row) => (row || []).map((cell) => this.handleJsonText(context, TextLocation2.tag, cell))
|
|
23803
|
-
)
|
|
24390
|
+
);
|
|
24391
|
+
}
|
|
24392
|
+
const buildSection = (section) => {
|
|
24393
|
+
if (!section || !Array.isArray(section.rows)) return void 0;
|
|
24394
|
+
const rows = section.rows.map((row) => {
|
|
24395
|
+
const cells = (row.cells || []).map((cell) => {
|
|
24396
|
+
const tableCell = {
|
|
24397
|
+
content: this.handleJsonText(context, TextLocation2.tag, cell.content)
|
|
24398
|
+
};
|
|
24399
|
+
if (cell.title != null) tableCell.title = cell.title;
|
|
24400
|
+
if (cell.rowspan != null) tableCell.rowspan = cell.rowspan;
|
|
24401
|
+
if (cell.colspan != null) tableCell.colspan = cell.colspan;
|
|
24402
|
+
if (cell.scope) tableCell.scope = cell.scope;
|
|
24403
|
+
return tableCell;
|
|
24404
|
+
});
|
|
24405
|
+
return {
|
|
24406
|
+
cells
|
|
24407
|
+
};
|
|
24408
|
+
});
|
|
24409
|
+
return {
|
|
24410
|
+
rows
|
|
24411
|
+
};
|
|
23804
24412
|
};
|
|
24413
|
+
const head = buildSection(nodeTableExtended.head);
|
|
24414
|
+
if (head && head.rows?.length > 0) nodeTableExtended.head = head;
|
|
24415
|
+
const body = buildSection(nodeTableExtended.body);
|
|
24416
|
+
if (body && body.rows?.length > 0) nodeTableExtended.body = body;
|
|
24417
|
+
const foot = buildSection(nodeTableExtended.foot);
|
|
24418
|
+
if (foot && foot.rows?.length > 0) nodeTableExtended.foot = foot;
|
|
23805
24419
|
return node;
|
|
23806
24420
|
}
|
|
23807
24421
|
/**
|
|
@@ -23825,7 +24439,7 @@ var Builder = class extends BaseBuilder {
|
|
|
23825
24439
|
if (!data) return void 0;
|
|
23826
24440
|
const defaultExample = data.__sampleSolutionAst;
|
|
23827
24441
|
const node = {
|
|
23828
|
-
question: data.question
|
|
24442
|
+
question: this.handleJsonText(context, TextLocation2.body, data.question),
|
|
23829
24443
|
partialAnswer: data.partialAnswer ?? "",
|
|
23830
24444
|
sampleSolution: data.sampleSolution ?? "",
|
|
23831
24445
|
additionalSolutions: data.additionalSolutions ?? void 0,
|
|
@@ -23839,9 +24453,9 @@ var Builder = class extends BaseBuilder {
|
|
|
23839
24453
|
};
|
|
23840
24454
|
objectUtils.removeUnwantedProperties(node, {
|
|
23841
24455
|
ignoreAllFalse: true,
|
|
23842
|
-
ignoreEmptyArrays: ["item", "hint", "instruction"],
|
|
24456
|
+
ignoreEmptyArrays: ["question", "item", "hint", "instruction"],
|
|
23843
24457
|
ignoreUndefined: ["example"],
|
|
23844
|
-
ignoreEmptyString: ["
|
|
24458
|
+
ignoreEmptyString: ["partialAnswer", "sampleSolution"]
|
|
23845
24459
|
});
|
|
23846
24460
|
return node;
|
|
23847
24461
|
}
|
|
@@ -24379,7 +24993,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24379
24993
|
buildStatement(context, data) {
|
|
24380
24994
|
if (!data) return void 0;
|
|
24381
24995
|
const node = {
|
|
24382
|
-
statement: data.statement
|
|
24996
|
+
statement: this.handleJsonText(context, TextLocation2.tag, data.statement),
|
|
24383
24997
|
isCorrect: !!data.isCorrect,
|
|
24384
24998
|
item: this.handleJsonText(context, TextLocation2.tag, data.item),
|
|
24385
24999
|
lead: this.handleJsonText(context, TextLocation2.tag, data.lead),
|
|
@@ -24389,7 +25003,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24389
25003
|
};
|
|
24390
25004
|
objectUtils.removeUnwantedProperties(node, {
|
|
24391
25005
|
ignoreAllFalse: true,
|
|
24392
|
-
|
|
25006
|
+
ignoreEmptyArrays: ["statement"],
|
|
24393
25007
|
ignoreUndefined: ["example"]
|
|
24394
25008
|
});
|
|
24395
25009
|
return node;
|
|
@@ -24601,7 +25215,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24601
25215
|
const node = {
|
|
24602
25216
|
heading: this.buildHeading(context, data.heading),
|
|
24603
25217
|
questions: this.buildQuestions(context, data.questions),
|
|
24604
|
-
elements: data.elements,
|
|
25218
|
+
elements: this.handleJsonText(context, TextLocation2.body, data.elements),
|
|
24605
25219
|
flashcards: this.buildFlashcards(context, data.flashcards),
|
|
24606
25220
|
definitions: this.buildDefinitionList(context, data.definitions ?? data.legend),
|
|
24607
25221
|
statement: this.buildStatement(context, data.statement),
|
|
@@ -24620,7 +25234,9 @@ var Builder = class extends BaseBuilder {
|
|
|
24620
25234
|
// captionDefinitionList: this.buildCaptionDefinitionList(context, data.captionDefinitionList),
|
|
24621
25235
|
cardBits: this.buildCardBits(context, data.cardBits)
|
|
24622
25236
|
};
|
|
24623
|
-
objectUtils.removeUnwantedProperties(node
|
|
25237
|
+
objectUtils.removeUnwantedProperties(node, {
|
|
25238
|
+
ignoreEmptyObjects: ["table"]
|
|
25239
|
+
});
|
|
24624
25240
|
return Object.keys(node).length > 0 ? node : void 0;
|
|
24625
25241
|
}
|
|
24626
25242
|
/**
|
|
@@ -25124,6 +25740,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25124
25740
|
__publicField(this, "hasCardSet", false);
|
|
25125
25741
|
__publicField(this, "hasFooter", false);
|
|
25126
25742
|
__publicField(this, "inTag", true);
|
|
25743
|
+
__publicField(this, "skipTableTraversal", false);
|
|
25127
25744
|
this.enter = this.enter.bind(this);
|
|
25128
25745
|
this.between = this.between.bind(this);
|
|
25129
25746
|
this.exit = this.exit.bind(this);
|
|
@@ -25592,7 +26209,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25592
26209
|
if (this.isEmptyText(item)) return false;
|
|
25593
26210
|
if (!this.isEmptyText(parent?.value?.lead)) return true;
|
|
25594
26211
|
if (!this.isEmptyText(parent?.value?.pageNumber)) return true;
|
|
25595
|
-
if (!this.isEmptyText(parent?.value?.sourcePageNumber)) return true;
|
|
25596
26212
|
if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
|
|
25597
26213
|
this.writeNL_IfNotChain(route);
|
|
25598
26214
|
this.writeOPC();
|
|
@@ -25606,7 +26222,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25606
26222
|
const parent = this.getParentNode(route);
|
|
25607
26223
|
if (this.isEmptyText(lead)) return false;
|
|
25608
26224
|
if (!this.isEmptyText(parent?.value?.pageNumber)) return true;
|
|
25609
|
-
if (!this.isEmptyText(parent?.value?.sourcePageNumber)) return true;
|
|
25610
26225
|
if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
|
|
25611
26226
|
this.writeNL_IfNotChain(route);
|
|
25612
26227
|
this.writeOPC();
|
|
@@ -25622,7 +26237,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25622
26237
|
const pageNumber = node.value;
|
|
25623
26238
|
const parent = this.getParentNode(route);
|
|
25624
26239
|
if (this.isEmptyText(pageNumber)) return false;
|
|
25625
|
-
if (!this.isEmptyText(parent?.value?.sourcePageNumber)) return true;
|
|
25626
26240
|
if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
|
|
25627
26241
|
this.writeNL_IfNotChain(route);
|
|
25628
26242
|
this.writeOPC();
|
|
@@ -25636,31 +26250,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25636
26250
|
this.writeCL();
|
|
25637
26251
|
return true;
|
|
25638
26252
|
}
|
|
25639
|
-
// bitmarkAst -> bits -> bitsValue -> sourcePageNumber
|
|
25640
|
-
enter_sourcePageNumber(node, route) {
|
|
25641
|
-
const sourcePageNumber = node.value;
|
|
25642
|
-
const parent = this.getParentNode(route);
|
|
25643
|
-
if (this.isEmptyText(sourcePageNumber)) return false;
|
|
25644
|
-
if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
|
|
25645
|
-
this.writeNL_IfNotChain(route);
|
|
25646
|
-
this.writeOPC();
|
|
25647
|
-
this.writeTextOrValue(parent?.value?.item ?? "", TextFormat2.bitmarkText, TextLocation2.tag);
|
|
25648
|
-
this.writeCL();
|
|
25649
|
-
this.writeOPC();
|
|
25650
|
-
this.writeTextOrValue(parent?.value?.lead ?? "", TextFormat2.bitmarkText, TextLocation2.tag);
|
|
25651
|
-
this.writeCL();
|
|
25652
|
-
this.writeOPC();
|
|
25653
|
-
this.writeTextOrValue(
|
|
25654
|
-
parent?.value?.pageNumber ?? "",
|
|
25655
|
-
TextFormat2.bitmarkText,
|
|
25656
|
-
TextLocation2.tag
|
|
25657
|
-
);
|
|
25658
|
-
this.writeCL();
|
|
25659
|
-
this.writeOPC();
|
|
25660
|
-
this.writeTextOrValue(sourcePageNumber ?? "", TextFormat2.bitmarkText, TextLocation2.tag);
|
|
25661
|
-
this.writeCL();
|
|
25662
|
-
return true;
|
|
25663
|
-
}
|
|
25664
26253
|
// bitmarkAst -> bits -> bitsValue -> marginNumber
|
|
25665
26254
|
enter_marginNumber(node, route) {
|
|
25666
26255
|
const marginNumber = node.value;
|
|
@@ -25681,13 +26270,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25681
26270
|
);
|
|
25682
26271
|
this.writeCL();
|
|
25683
26272
|
this.writeOPC();
|
|
25684
|
-
this.writeTextOrValue(
|
|
25685
|
-
parent?.value?.sourcePageNumber ?? "",
|
|
25686
|
-
TextFormat2.bitmarkText,
|
|
25687
|
-
TextLocation2.tag
|
|
25688
|
-
);
|
|
25689
|
-
this.writeCL();
|
|
25690
|
-
this.writeOPC();
|
|
25691
26273
|
this.writeTextOrValue(marginNumber, TextFormat2.bitmarkText, TextLocation2.tag);
|
|
25692
26274
|
this.writeCL();
|
|
25693
26275
|
return true;
|
|
@@ -25861,7 +26443,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25861
26443
|
enter_elements(_node, _route) {
|
|
25862
26444
|
}
|
|
25863
26445
|
between_elements(_node, _left, _right, _route) {
|
|
25864
|
-
this.
|
|
26446
|
+
this.writeCardSetSideDivider();
|
|
25865
26447
|
}
|
|
25866
26448
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards
|
|
25867
26449
|
between_flashcards(_node, _left, _right, _route) {
|
|
@@ -25988,6 +26570,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25988
26570
|
enter_matrix(_node, _route) {
|
|
25989
26571
|
}
|
|
25990
26572
|
between_matrix(_node, _left, _right, _route) {
|
|
26573
|
+
if (!this.isCardAllowed) return;
|
|
25991
26574
|
this.writeCardSetCardDivider();
|
|
25992
26575
|
}
|
|
25993
26576
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> pairs -> pairsValue -> values
|
|
@@ -26008,12 +26591,83 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26008
26591
|
this.writeCardSetCardDivider();
|
|
26009
26592
|
}
|
|
26010
26593
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> table
|
|
26594
|
+
enter_table(node, route) {
|
|
26595
|
+
const parent = this.getParentNode(route);
|
|
26596
|
+
if (parent?.key !== NodeType.cardNode) return true;
|
|
26597
|
+
const table = node.value;
|
|
26598
|
+
if (!table) return true;
|
|
26599
|
+
if (this.writeAdvancedTable(table)) {
|
|
26600
|
+
return false;
|
|
26601
|
+
}
|
|
26602
|
+
return true;
|
|
26603
|
+
}
|
|
26011
26604
|
between_table(_node, _left, _right, route) {
|
|
26012
26605
|
const parent = this.getParentNode(route);
|
|
26013
26606
|
if (parent?.key !== NodeType.cardNode) return;
|
|
26014
26607
|
if (!this.isCardAllowed) return;
|
|
26015
26608
|
this.writeCardSetCardDivider();
|
|
26016
26609
|
}
|
|
26610
|
+
writeAdvancedTable(table) {
|
|
26611
|
+
const normalized = normalizeTableFormat(BitType.tableExtended, table);
|
|
26612
|
+
const sections = [
|
|
26613
|
+
{ key: "thead", qualifier: "thead", section: normalized.head },
|
|
26614
|
+
{ key: "tbody", qualifier: void 0, section: normalized.body },
|
|
26615
|
+
{ key: "tfoot", qualifier: "tfoot", section: normalized.foot }
|
|
26616
|
+
];
|
|
26617
|
+
let rowCount = 0;
|
|
26618
|
+
for (const { key, qualifier, section } of sections) {
|
|
26619
|
+
const rows = section?.rows ?? [];
|
|
26620
|
+
if (rows.length === 0) {
|
|
26621
|
+
continue;
|
|
26622
|
+
}
|
|
26623
|
+
for (const row of rows) {
|
|
26624
|
+
this.writeCardSetCardDivider(qualifier);
|
|
26625
|
+
this.writeTableRow(row, key);
|
|
26626
|
+
rowCount++;
|
|
26627
|
+
}
|
|
26628
|
+
}
|
|
26629
|
+
return rowCount > 0;
|
|
26630
|
+
}
|
|
26631
|
+
writeTableRow(row, section) {
|
|
26632
|
+
const cells = row?.cells ?? [];
|
|
26633
|
+
if (cells.length === 0) return;
|
|
26634
|
+
for (let index = 0; index < cells.length; index++) {
|
|
26635
|
+
if (index > 0) {
|
|
26636
|
+
this.writeCardSetSideDivider();
|
|
26637
|
+
}
|
|
26638
|
+
this.writeNL();
|
|
26639
|
+
this.writeTableCell(cells[index], section);
|
|
26640
|
+
}
|
|
26641
|
+
}
|
|
26642
|
+
writeTableCell(cell, section) {
|
|
26643
|
+
const defaultCellType = section === "tbody" ? "td" : "th";
|
|
26644
|
+
const cellType = cell.title ? "th" : "td";
|
|
26645
|
+
if (cellType !== defaultCellType) {
|
|
26646
|
+
this.writeTableCellProperty("tableCellType", cellType);
|
|
26647
|
+
this.writeNL();
|
|
26648
|
+
}
|
|
26649
|
+
if (cell.rowspan && cell.rowspan > 1) {
|
|
26650
|
+
this.writeTableCellProperty("tableRowSpan", cell.rowspan);
|
|
26651
|
+
this.writeNL();
|
|
26652
|
+
}
|
|
26653
|
+
if (cell.colspan && cell.colspan > 1) {
|
|
26654
|
+
this.writeTableCellProperty("tableColSpan", cell.colspan);
|
|
26655
|
+
this.writeNL();
|
|
26656
|
+
}
|
|
26657
|
+
if (cell.scope) {
|
|
26658
|
+
this.writeTableCellProperty("tableScope", cell.scope);
|
|
26659
|
+
this.writeNL();
|
|
26660
|
+
}
|
|
26661
|
+
const content = cell.content ?? instance3.EMPTY_STRING;
|
|
26662
|
+
this.writeTextOrValue(content, this.textFormat, TextLocation2.body);
|
|
26663
|
+
}
|
|
26664
|
+
writeTableCellProperty(name, value) {
|
|
26665
|
+
this.writeOPA();
|
|
26666
|
+
this.writeTagKey(name);
|
|
26667
|
+
this.writeColon();
|
|
26668
|
+
this.writeTextOrValue(`${value}`, TextFormat2.plainText, TextLocation2.tag);
|
|
26669
|
+
this.writeCL();
|
|
26670
|
+
}
|
|
26017
26671
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> table -> data
|
|
26018
26672
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> pronunciationTable -> data
|
|
26019
26673
|
between_data(_node, _left, _right, route) {
|
|
@@ -26242,6 +26896,27 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26242
26896
|
this.writePropertyStyleResource(node.key, resource);
|
|
26243
26897
|
return true;
|
|
26244
26898
|
}
|
|
26899
|
+
// bitmarkAst -> bits -> bitsValue -> platformIcon
|
|
26900
|
+
enter_platformIcon(node, _route) {
|
|
26901
|
+
const resource = node.value;
|
|
26902
|
+
this.writeNL();
|
|
26903
|
+
this.writePropertyStyleResource(node.key, resource);
|
|
26904
|
+
return true;
|
|
26905
|
+
}
|
|
26906
|
+
// bitmarkAst -> bits -> bitsValue -> platformLogo
|
|
26907
|
+
enter_platformLogo(node, _route) {
|
|
26908
|
+
const resource = node.value;
|
|
26909
|
+
this.writeNL();
|
|
26910
|
+
this.writePropertyStyleResource(node.key, resource);
|
|
26911
|
+
return true;
|
|
26912
|
+
}
|
|
26913
|
+
// bitmarkAst -> bits -> bitsValue -> platformBackgroundImage
|
|
26914
|
+
enter_platformBackgroundImage(node, _route) {
|
|
26915
|
+
const resource = node.value;
|
|
26916
|
+
this.writeNL();
|
|
26917
|
+
this.writePropertyStyleResource(node.key, resource);
|
|
26918
|
+
return true;
|
|
26919
|
+
}
|
|
26245
26920
|
exit_imagePlaceholder(_node, _route) {
|
|
26246
26921
|
}
|
|
26247
26922
|
// bitmarkAst -> bits -> bitsValue -> posterImage
|
|
@@ -26514,8 +27189,8 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26514
27189
|
} else {
|
|
26515
27190
|
}
|
|
26516
27191
|
}
|
|
26517
|
-
// bitmarkAst -> bits -> bitsValue -> elements -> elementsValue
|
|
26518
|
-
|
|
27192
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> elements -> elementsValue
|
|
27193
|
+
enter_elementsValue(node, _route) {
|
|
26519
27194
|
if (node.value) {
|
|
26520
27195
|
this.writeNL();
|
|
26521
27196
|
this.writeTextOrValue(node.value, this.textFormat, TextLocation2.body);
|
|
@@ -26598,10 +27273,19 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26598
27273
|
}
|
|
26599
27274
|
}
|
|
26600
27275
|
// bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> question
|
|
27276
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> questions -> questionsValue -> question
|
|
27277
|
+
enter_question(node, route) {
|
|
27278
|
+
const parent = this.getParentNode(route);
|
|
27279
|
+
if (parent?.key !== NodeType.questionsValue) return;
|
|
27280
|
+
if (node.value) {
|
|
27281
|
+
this.writeNL();
|
|
27282
|
+
this.writeTextOrValue(node.value, this.textFormat, TextLocation2.body);
|
|
27283
|
+
}
|
|
27284
|
+
}
|
|
26601
27285
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards -> flashcardsValue -> question
|
|
26602
27286
|
leaf_question(node, route) {
|
|
26603
27287
|
const parent = this.getParentNode(route);
|
|
26604
|
-
if (parent?.key !== NodeType.
|
|
27288
|
+
if (parent?.key !== NodeType.flashcardsValue) return;
|
|
26605
27289
|
if (node.value) {
|
|
26606
27290
|
this.writeNL();
|
|
26607
27291
|
this.writeTextOrValue(node.value, this.textFormat, TextLocation2.body);
|
|
@@ -27077,12 +27761,12 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27077
27761
|
} else {
|
|
27078
27762
|
}
|
|
27079
27763
|
}
|
|
27080
|
-
writeCardSetCardDivider() {
|
|
27764
|
+
writeCardSetCardDivider(qualifier) {
|
|
27081
27765
|
this.writeNL();
|
|
27082
|
-
|
|
27083
|
-
|
|
27084
|
-
|
|
27085
|
-
this.
|
|
27766
|
+
const divider = this.getCardDividerMarker();
|
|
27767
|
+
this.write(divider);
|
|
27768
|
+
if (qualifier) {
|
|
27769
|
+
this.appendCardDividerQualifier(qualifier);
|
|
27086
27770
|
}
|
|
27087
27771
|
}
|
|
27088
27772
|
writeCardSetSideDivider() {
|
|
@@ -27101,6 +27785,20 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27101
27785
|
this.write("++");
|
|
27102
27786
|
}
|
|
27103
27787
|
}
|
|
27788
|
+
getCardDividerMarker() {
|
|
27789
|
+
return this.options.cardSetVersion === CardSetVersion.v1 ? "===" : "====";
|
|
27790
|
+
}
|
|
27791
|
+
appendCardDividerQualifier(qualifier) {
|
|
27792
|
+
const marker = this.getCardDividerMarker();
|
|
27793
|
+
const normalizedQualifier = instance3.breakscape(qualifier, {
|
|
27794
|
+
format: TextFormat2.plainText,
|
|
27795
|
+
location: TextLocation2.tag
|
|
27796
|
+
});
|
|
27797
|
+
this.write(" ");
|
|
27798
|
+
this.write(normalizedQualifier);
|
|
27799
|
+
this.write(" ");
|
|
27800
|
+
this.write(marker);
|
|
27801
|
+
}
|
|
27104
27802
|
writeNL_IfNotChain(route) {
|
|
27105
27803
|
if (!this.isChain(route)) {
|
|
27106
27804
|
this.writeNL();
|
|
@@ -27205,7 +27903,10 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27205
27903
|
return !!writeFormat;
|
|
27206
27904
|
}
|
|
27207
27905
|
calculateIsCardAllowed() {
|
|
27208
|
-
return this.isBodyBitmarkText && !this.isOfBitType1();
|
|
27906
|
+
return this.isBodyBitmarkText && !this.isOfBitType1() && !this.isTableBitType();
|
|
27907
|
+
}
|
|
27908
|
+
isTableBitType() {
|
|
27909
|
+
return this.isOfBitType([BitType.table]);
|
|
27209
27910
|
}
|
|
27210
27911
|
isOfBitType1() {
|
|
27211
27912
|
return this.isOfBitType([
|
|
@@ -27512,10 +28213,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
27512
28213
|
enter_pageNumber(node, route) {
|
|
27513
28214
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
|
|
27514
28215
|
}
|
|
27515
|
-
// bitmarkAst -> bits -> bitsValue -> sourcePageNumber
|
|
27516
|
-
enter_sourcePageNumber(node, route) {
|
|
27517
|
-
return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
|
|
27518
|
-
}
|
|
27519
28216
|
// bitmarkAst -> bits -> bitsValue -> marginNumber
|
|
27520
28217
|
enter_marginNumber(node, route) {
|
|
27521
28218
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
|
|
@@ -27726,7 +28423,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
27726
28423
|
const parent = this.getParentNode(route);
|
|
27727
28424
|
if (parent?.key !== NodeType.cardNode) return;
|
|
27728
28425
|
if (statement) {
|
|
27729
|
-
this.bitJson.statement = statement.statement ??
|
|
28426
|
+
this.bitJson.statement = statement.statement ?? [];
|
|
27730
28427
|
this.bitJson.isCorrect = statement.isCorrect ?? false;
|
|
27731
28428
|
this.bitJson.example = statement.example;
|
|
27732
28429
|
this.bitJson.isExample = statement.isExample;
|
|
@@ -27802,6 +28499,18 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
27802
28499
|
enter_imagePlaceholder(node, route) {
|
|
27803
28500
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
27804
28501
|
}
|
|
28502
|
+
// bitmarkAst -> bits -> bitsValue -> platformIcon
|
|
28503
|
+
enter_platformIcon(node, route) {
|
|
28504
|
+
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
28505
|
+
}
|
|
28506
|
+
// bitmarkAst -> bits -> bitsValue -> platformLogo
|
|
28507
|
+
enter_platformLogo(node, route) {
|
|
28508
|
+
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
28509
|
+
}
|
|
28510
|
+
// bitmarkAst -> bits -> bitsValue -> platformBackgroundImage
|
|
28511
|
+
enter_platformBackgroundImage(node, route) {
|
|
28512
|
+
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
28513
|
+
}
|
|
27805
28514
|
// bitmarkAst -> bits -> bitsValue -> resources
|
|
27806
28515
|
enter_resources(node, route) {
|
|
27807
28516
|
const resources = node.value;
|
|
@@ -28238,7 +28947,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28238
28947
|
delete bitJson.item;
|
|
28239
28948
|
delete bitJson.lead;
|
|
28240
28949
|
delete bitJson.pageNumber;
|
|
28241
|
-
delete bitJson.sourcePageNumber;
|
|
28242
28950
|
delete bitJson.marginNumber;
|
|
28243
28951
|
delete bitJson.hint;
|
|
28244
28952
|
delete bitJson.instruction;
|
|
@@ -28250,8 +28958,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28250
28958
|
if (bitJson.lead == null || bitJson.lead?.length === 0) delete bitJson.lead;
|
|
28251
28959
|
if (bitJson.pageNumber == null || bitJson.pageNumber?.length === 0)
|
|
28252
28960
|
delete bitJson.pageNumber;
|
|
28253
|
-
if (bitJson.sourcePageNumber == null || bitJson.sourcePageNumber?.length === 0)
|
|
28254
|
-
delete bitJson.sourcePageNumber;
|
|
28255
28961
|
if (bitJson.marginNumber == null || bitJson.marginNumber?.length === 0)
|
|
28256
28962
|
delete bitJson.marginNumber;
|
|
28257
28963
|
if (bitJson.hint == null || bitJson.hint?.length === 0) delete bitJson.hint;
|
|
@@ -28263,7 +28969,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28263
28969
|
if (bitJson.hint == null) bitJson.hint = this.textDefault;
|
|
28264
28970
|
if (bitJson.instruction == null) bitJson.instruction = this.textDefault;
|
|
28265
28971
|
if (bitJson.pageNumber == null) bitJson.pageNumber = this.textDefault;
|
|
28266
|
-
if (bitJson.sourcePageNumber == null) bitJson.sourcePageNumber = this.textDefault;
|
|
28267
28972
|
if (bitJson.marginNumber == null) bitJson.marginNumber = this.textDefault;
|
|
28268
28973
|
}
|
|
28269
28974
|
if (bitJson.body == null) bitJson.body = this.bodyDefault;
|
|
@@ -28340,6 +29045,9 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28340
29045
|
if (bitJson.footer == null) bitJson.footer = this.textDefault;
|
|
28341
29046
|
if (bitJson.questions == null) bitJson.questions = [];
|
|
28342
29047
|
}
|
|
29048
|
+
if (instance2.isOfBitType(bitType, BitType.sequence)) {
|
|
29049
|
+
if (bitJson.elements == null) bitJson.elements = [];
|
|
29050
|
+
}
|
|
28343
29051
|
if (bitType === BitType.matchMatrix) {
|
|
28344
29052
|
isTopLevelExample = true;
|
|
28345
29053
|
}
|
|
@@ -28400,6 +29108,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28400
29108
|
}
|
|
28401
29109
|
if (instance2.isOfBitType(bitType, BitType.book)) {
|
|
28402
29110
|
if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
|
|
29111
|
+
if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;
|
|
28403
29112
|
if (bitJson.hasMarkAsDone == null) bitJson.hasMarkAsDone = false;
|
|
28404
29113
|
if (bitJson.processHandIn == null) bitJson.processHandIn = false;
|
|
28405
29114
|
if (bitJson.isPublic == null) bitJson.isPublic = false;
|
|
@@ -29053,6 +29762,9 @@ var BitmarkPegParserHelper = class {
|
|
|
29053
29762
|
__publicField(this, "cardIndex", 0);
|
|
29054
29763
|
__publicField(this, "cardSideIndex", 0);
|
|
29055
29764
|
__publicField(this, "cardVariantIndex", 0);
|
|
29765
|
+
__publicField(this, "currentCardQualifier");
|
|
29766
|
+
__publicField(this, "currentSideQualifier");
|
|
29767
|
+
__publicField(this, "currentVariantQualifier");
|
|
29056
29768
|
__publicField(this, "parse");
|
|
29057
29769
|
__publicField(this, "parserText");
|
|
29058
29770
|
__publicField(this, "parserLocation");
|
|
@@ -29221,30 +29933,43 @@ var BitmarkPegParserHelper = class {
|
|
|
29221
29933
|
cardIndex,
|
|
29222
29934
|
cardSideIndex,
|
|
29223
29935
|
cardVariantIndex: cardContentIndex,
|
|
29224
|
-
value: value2
|
|
29936
|
+
value: value2,
|
|
29937
|
+
cardQualifier,
|
|
29938
|
+
cardSideQualifier,
|
|
29939
|
+
cardVariantQualifier
|
|
29225
29940
|
} = cardData;
|
|
29226
29941
|
let card = unparsedCardSet.cards[cardIndex];
|
|
29227
29942
|
if (!card) {
|
|
29228
29943
|
card = {
|
|
29229
|
-
sides: []
|
|
29944
|
+
sides: [],
|
|
29945
|
+
qualifier: cardQualifier
|
|
29230
29946
|
};
|
|
29231
29947
|
unparsedCardSet.cards[cardIndex] = card;
|
|
29948
|
+
} else if (cardQualifier && !card.qualifier) {
|
|
29949
|
+
card.qualifier = cardQualifier;
|
|
29232
29950
|
}
|
|
29233
29951
|
let side = card.sides[cardSideIndex];
|
|
29234
29952
|
if (!side) {
|
|
29235
29953
|
side = {
|
|
29236
|
-
variants: []
|
|
29954
|
+
variants: [],
|
|
29955
|
+
qualifier: cardSideQualifier
|
|
29237
29956
|
};
|
|
29238
29957
|
card.sides[cardSideIndex] = side;
|
|
29958
|
+
} else if (cardSideQualifier && !side.qualifier) {
|
|
29959
|
+
side.qualifier = cardSideQualifier;
|
|
29239
29960
|
}
|
|
29240
29961
|
const variant = side.variants[cardContentIndex];
|
|
29241
29962
|
if (!variant) {
|
|
29242
29963
|
side.variants[cardContentIndex] = {
|
|
29243
29964
|
value: value2,
|
|
29244
|
-
parser: parser3
|
|
29965
|
+
parser: parser3,
|
|
29966
|
+
qualifier: cardVariantQualifier
|
|
29245
29967
|
};
|
|
29246
29968
|
} else {
|
|
29247
29969
|
side.variants[cardContentIndex].value += value2;
|
|
29970
|
+
if (cardVariantQualifier && !variant.qualifier) {
|
|
29971
|
+
variant.qualifier = cardVariantQualifier;
|
|
29972
|
+
}
|
|
29248
29973
|
}
|
|
29249
29974
|
}
|
|
29250
29975
|
unparsedCardSet.cards = unparsedCardSet.cards.filter((card) => {
|
|
@@ -29257,12 +29982,14 @@ var BitmarkPegParserHelper = class {
|
|
|
29257
29982
|
});
|
|
29258
29983
|
for (const unparsedCard of unparsedCardSet.cards) {
|
|
29259
29984
|
const card = {
|
|
29260
|
-
sides: []
|
|
29985
|
+
sides: [],
|
|
29986
|
+
qualifier: unparsedCard.qualifier
|
|
29261
29987
|
};
|
|
29262
29988
|
cardSet.cards.push(card);
|
|
29263
29989
|
for (const unparsedSide of unparsedCard.sides) {
|
|
29264
29990
|
const side = {
|
|
29265
|
-
variants: []
|
|
29991
|
+
variants: [],
|
|
29992
|
+
qualifier: unparsedSide.qualifier
|
|
29266
29993
|
};
|
|
29267
29994
|
card.sides.push(side);
|
|
29268
29995
|
for (const unparsedContent of unparsedSide.variants) {
|
|
@@ -29287,7 +30014,8 @@ var BitmarkPegParserHelper = class {
|
|
|
29287
30014
|
if (DEBUG_TRACE_CARD_PARSED) this.debugPrint("parsedCardContent", content);
|
|
29288
30015
|
side.variants.push({
|
|
29289
30016
|
parser: parser2,
|
|
29290
|
-
content
|
|
30017
|
+
content,
|
|
30018
|
+
qualifier: unparsedContent.qualifier
|
|
29291
30019
|
});
|
|
29292
30020
|
}
|
|
29293
30021
|
}
|
|
@@ -29307,12 +30035,18 @@ var BitmarkPegParserHelper = class {
|
|
|
29307
30035
|
this.cardIndex = -1;
|
|
29308
30036
|
this.cardSideIndex = 0;
|
|
29309
30037
|
this.cardVariantIndex = 0;
|
|
30038
|
+
this.currentCardQualifier = void 0;
|
|
30039
|
+
this.currentSideQualifier = void 0;
|
|
30040
|
+
this.currentVariantQualifier = void 0;
|
|
29310
30041
|
}
|
|
29311
30042
|
handleCardSetEnd() {
|
|
29312
30043
|
if (DEBUG_TRACE_CARD_SET_END) this.debugPrint("CardSetEnd");
|
|
29313
30044
|
this.cardIndex = 0;
|
|
29314
30045
|
this.cardSideIndex = 0;
|
|
29315
30046
|
this.cardVariantIndex = 0;
|
|
30047
|
+
this.currentCardQualifier = void 0;
|
|
30048
|
+
this.currentSideQualifier = void 0;
|
|
30049
|
+
this.currentVariantQualifier = void 0;
|
|
29316
30050
|
}
|
|
29317
30051
|
handleCards(value) {
|
|
29318
30052
|
return value;
|
|
@@ -29322,27 +30056,45 @@ var BitmarkPegParserHelper = class {
|
|
|
29322
30056
|
let isCardDivider = false;
|
|
29323
30057
|
let isSideDivider = false;
|
|
29324
30058
|
let isVariantDivider = false;
|
|
30059
|
+
let qualifier;
|
|
29325
30060
|
if (Array.isArray(value) && value.length === 2) {
|
|
29326
|
-
|
|
29327
|
-
if (
|
|
29328
|
-
|
|
29329
|
-
|
|
29330
|
-
|
|
30061
|
+
const [divider, maybeQualifier] = value;
|
|
30062
|
+
if (typeof divider === "string") {
|
|
30063
|
+
value = divider;
|
|
30064
|
+
if (typeof maybeQualifier === "string" && maybeQualifier.trim() === maybeQualifier && maybeQualifier.length > 0) {
|
|
30065
|
+
qualifier = maybeQualifier;
|
|
30066
|
+
}
|
|
29331
30067
|
} else {
|
|
29332
|
-
|
|
29333
|
-
isSideDivider = value === CARD_SIDE_DIVIDER_V2;
|
|
29334
|
-
isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
|
|
30068
|
+
value = divider;
|
|
29335
30069
|
}
|
|
30070
|
+
} else if (Array.isArray(value) && value.length === 1) {
|
|
30071
|
+
const [divider] = value;
|
|
30072
|
+
value = divider;
|
|
30073
|
+
}
|
|
30074
|
+
if (version === CardSetVersion.v1) {
|
|
30075
|
+
isCardDivider = value === CARD_DIVIDER_V1;
|
|
30076
|
+
isSideDivider = value === CARD_SIDE_DIVIDER_V1;
|
|
30077
|
+
isVariantDivider = value === CARD_VARIANT_DIVIDER_V1;
|
|
30078
|
+
} else {
|
|
30079
|
+
isCardDivider = value === CARD_DIVIDER_V2;
|
|
30080
|
+
isSideDivider = value === CARD_SIDE_DIVIDER_V2;
|
|
30081
|
+
isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
|
|
29336
30082
|
}
|
|
29337
30083
|
if (isCardDivider) {
|
|
29338
30084
|
this.cardIndex++;
|
|
29339
30085
|
this.cardSideIndex = 0;
|
|
29340
30086
|
this.cardVariantIndex = 0;
|
|
30087
|
+
this.currentCardQualifier = qualifier;
|
|
30088
|
+
this.currentSideQualifier = void 0;
|
|
30089
|
+
this.currentVariantQualifier = void 0;
|
|
29341
30090
|
} else if (isSideDivider) {
|
|
29342
30091
|
this.cardSideIndex++;
|
|
29343
30092
|
this.cardVariantIndex = 0;
|
|
30093
|
+
this.currentSideQualifier = qualifier;
|
|
30094
|
+
this.currentVariantQualifier = void 0;
|
|
29344
30095
|
} else if (isVariantDivider) {
|
|
29345
30096
|
this.cardVariantIndex++;
|
|
30097
|
+
this.currentVariantQualifier = qualifier;
|
|
29346
30098
|
}
|
|
29347
30099
|
if (this.isType(value, TypeKey.Card)) return value;
|
|
29348
30100
|
return {
|
|
@@ -29351,7 +30103,10 @@ var BitmarkPegParserHelper = class {
|
|
|
29351
30103
|
cardIndex: this.cardIndex,
|
|
29352
30104
|
cardSideIndex: this.cardSideIndex,
|
|
29353
30105
|
cardVariantIndex: this.cardVariantIndex,
|
|
29354
|
-
value: ""
|
|
30106
|
+
value: "",
|
|
30107
|
+
cardQualifier: this.currentCardQualifier,
|
|
30108
|
+
cardSideQualifier: this.currentSideQualifier,
|
|
30109
|
+
cardVariantQualifier: this.currentVariantQualifier
|
|
29355
30110
|
},
|
|
29356
30111
|
parser: {
|
|
29357
30112
|
text: this.parserText(),
|
|
@@ -29372,7 +30127,10 @@ var BitmarkPegParserHelper = class {
|
|
|
29372
30127
|
cardIndex: this.cardIndex,
|
|
29373
30128
|
cardSideIndex: this.cardSideIndex,
|
|
29374
30129
|
cardVariantIndex: this.cardVariantIndex,
|
|
29375
|
-
value
|
|
30130
|
+
value,
|
|
30131
|
+
cardQualifier: this.currentCardQualifier,
|
|
30132
|
+
cardSideQualifier: this.currentSideQualifier,
|
|
30133
|
+
cardVariantQualifier: this.currentVariantQualifier
|
|
29376
30134
|
},
|
|
29377
30135
|
parser: {
|
|
29378
30136
|
text: this.parserText(),
|
|
@@ -29718,7 +30476,7 @@ var BitmarkPegParserValidator = class {
|
|
|
29718
30476
|
let tagData = validTypeKeys.get(validTypeKey);
|
|
29719
30477
|
if (!tagData && typeKey === TypeKey.Property) {
|
|
29720
30478
|
const resourceKey = key.replace(/^@/, "&");
|
|
29721
|
-
if (resourceKey === ConfigKey.resource_backgroundWallpaper || resourceKey === ConfigKey.resource_imagePlaceholder) {
|
|
30479
|
+
if (resourceKey === ConfigKey.resource_backgroundWallpaper || resourceKey === ConfigKey.resource_imagePlaceholder || resourceKey === ConfigKey.resource_platformIcon || resourceKey === ConfigKey.resource_platformLogo || resourceKey === ConfigKey.resource_platformBackgroundImage) {
|
|
29722
30480
|
tagData = validTypeKeys.get(resourceKey);
|
|
29723
30481
|
if (tagData) {
|
|
29724
30482
|
typeKey = TypeKey.Resource;
|
|
@@ -30455,6 +31213,7 @@ function buildCards(context, bitType, textFormat, parsedCardSet, statementV1, st
|
|
|
30455
31213
|
result = parsePronunciationTable(context, bitType, processedCardSet);
|
|
30456
31214
|
break;
|
|
30457
31215
|
case CardSetConfigKey.table:
|
|
31216
|
+
case CardSetConfigKey.tableExtended:
|
|
30458
31217
|
result = parseTable(context, bitType, processedCardSet);
|
|
30459
31218
|
break;
|
|
30460
31219
|
case CardSetConfigKey.botActionResponses:
|
|
@@ -30491,20 +31250,23 @@ function processCardSet(context, parsedCardSet) {
|
|
|
30491
31250
|
for (const card of parsedCardSet.cards) {
|
|
30492
31251
|
const processedCard = {
|
|
30493
31252
|
no: cardNo++,
|
|
30494
|
-
sides: []
|
|
31253
|
+
sides: [],
|
|
31254
|
+
qualifier: card.qualifier
|
|
30495
31255
|
};
|
|
30496
31256
|
processedCardSet.cards.push(processedCard);
|
|
30497
31257
|
for (const side of card.sides) {
|
|
30498
31258
|
const processedSide = {
|
|
30499
31259
|
no: sideNo++,
|
|
30500
|
-
variants: []
|
|
31260
|
+
variants: [],
|
|
31261
|
+
qualifier: side.qualifier
|
|
30501
31262
|
};
|
|
30502
31263
|
processedCard.sides.push(processedSide);
|
|
30503
31264
|
for (const variant of side.variants) {
|
|
30504
31265
|
const { parser: parser2, content } = variant;
|
|
30505
31266
|
const processedVariant = {
|
|
30506
31267
|
parser: parser2,
|
|
30507
|
-
no: variantNo
|
|
31268
|
+
no: variantNo++,
|
|
31269
|
+
qualifier: variant.qualifier
|
|
30508
31270
|
};
|
|
30509
31271
|
processedSide.variants.push(processedVariant);
|
|
30510
31272
|
const tagsConfig = instance2.getTagsConfigForCardSet(bitType, sideNo, variantNo);
|
|
@@ -30618,7 +31380,8 @@ function parseElements(_context, _bitType, cardSet) {
|
|
|
30618
31380
|
for (const side of card.sides) {
|
|
30619
31381
|
for (const content of side.variants) {
|
|
30620
31382
|
const tags2 = content.data;
|
|
30621
|
-
|
|
31383
|
+
const element = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
|
|
31384
|
+
elements.push(element);
|
|
30622
31385
|
}
|
|
30623
31386
|
}
|
|
30624
31387
|
}
|
|
@@ -30635,7 +31398,7 @@ function parseStatements(_context, _bitType, cardSet, statementV1, statementsV1)
|
|
|
30635
31398
|
if (Array.isArray(chainedStatements)) {
|
|
30636
31399
|
for (const s of chainedStatements) {
|
|
30637
31400
|
const statement = {
|
|
30638
|
-
statement: s.statement ??
|
|
31401
|
+
statement: s.statement ?? [],
|
|
30639
31402
|
isCorrect: s.isCorrect,
|
|
30640
31403
|
item: s.item,
|
|
30641
31404
|
lead: s.lead,
|
|
@@ -30777,7 +31540,7 @@ function parseQuestions(_context, _bitType, cardSet) {
|
|
|
30777
31540
|
for (const content of side.variants) {
|
|
30778
31541
|
const tags2 = content.data;
|
|
30779
31542
|
const q = {
|
|
30780
|
-
question: tags2.cardBodyStr ??
|
|
31543
|
+
question: tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING,
|
|
30781
31544
|
...tags2
|
|
30782
31545
|
};
|
|
30783
31546
|
if (q) questions.push(q);
|
|
@@ -30981,37 +31744,158 @@ function parsePronunciationTable(_context, _bitType, cardSet) {
|
|
|
30981
31744
|
};
|
|
30982
31745
|
return { pronunciationTable: table };
|
|
30983
31746
|
}
|
|
30984
|
-
function parseTable(
|
|
30985
|
-
|
|
30986
|
-
|
|
30987
|
-
|
|
30988
|
-
|
|
31747
|
+
function parseTable(context, _bitType, cardSet) {
|
|
31748
|
+
const sectionRows = {
|
|
31749
|
+
thead: [],
|
|
31750
|
+
tbody: [],
|
|
31751
|
+
tfoot: []
|
|
31752
|
+
};
|
|
31753
|
+
const getNormalizedQualifier = (rawQualifier) => {
|
|
31754
|
+
if (!rawQualifier) return void 0;
|
|
31755
|
+
const normalized = rawQualifier.trim().toLowerCase();
|
|
31756
|
+
if (normalized === "thead" || normalized === "tbody" || normalized === "tfoot") {
|
|
31757
|
+
return normalized;
|
|
31758
|
+
}
|
|
31759
|
+
context.addWarning(`Unknown table section qualifier '${rawQualifier}', defaulting to tbody.`);
|
|
31760
|
+
return void 0;
|
|
31761
|
+
};
|
|
31762
|
+
const isLegacyHeadingRow = (card, cardIndex) => {
|
|
31763
|
+
if (cardIndex !== 0) return false;
|
|
31764
|
+
return card.sides.some(
|
|
31765
|
+
(side) => side.variants.some((variant) => {
|
|
31766
|
+
const titles = variant.data.title;
|
|
31767
|
+
return Array.isArray(titles) && titles[1]?.titleAst;
|
|
31768
|
+
})
|
|
31769
|
+
);
|
|
31770
|
+
};
|
|
31771
|
+
const readExtraProperty = (extra, key) => {
|
|
31772
|
+
if (!extra) return void 0;
|
|
31773
|
+
const value = extra[key];
|
|
31774
|
+
return Array.isArray(value) ? value[0] : value;
|
|
31775
|
+
};
|
|
31776
|
+
const cleanupExtraProperties = (tags2, keys) => {
|
|
31777
|
+
const extra = tags2.extraProperties;
|
|
31778
|
+
if (!extra) return;
|
|
31779
|
+
for (const key of keys) {
|
|
31780
|
+
if (Object.prototype.hasOwnProperty.call(extra, key)) delete extra[key];
|
|
31781
|
+
}
|
|
31782
|
+
if (Object.keys(extra).length === 0) {
|
|
31783
|
+
delete tags2.extraProperties;
|
|
31784
|
+
}
|
|
31785
|
+
};
|
|
31786
|
+
const normalizeCellType = (raw, section) => {
|
|
31787
|
+
if (typeof raw === "string") {
|
|
31788
|
+
const normalized = raw.trim().toLowerCase();
|
|
31789
|
+
if (normalized === "th" || normalized === "td") {
|
|
31790
|
+
return normalized;
|
|
31791
|
+
}
|
|
31792
|
+
context.addWarning(
|
|
31793
|
+
`Invalid table cell type '${raw}', using default for section '${section}'.`
|
|
31794
|
+
);
|
|
31795
|
+
}
|
|
31796
|
+
return section === "tbody" ? "td" : "th";
|
|
31797
|
+
};
|
|
31798
|
+
const normalizeSpan = (raw, kind) => {
|
|
31799
|
+
if (raw == null) return 1;
|
|
31800
|
+
const numeric = instance6.asNumber(raw);
|
|
31801
|
+
if (numeric == null || !Number.isInteger(numeric) || numeric < 1) {
|
|
31802
|
+
context.addWarning(`Invalid table ${kind} '${raw}', defaulting to 1.`);
|
|
31803
|
+
return 1;
|
|
31804
|
+
}
|
|
31805
|
+
return numeric;
|
|
31806
|
+
};
|
|
31807
|
+
const normalizeScope = (raw) => {
|
|
31808
|
+
if (raw == null) return void 0;
|
|
31809
|
+
if (typeof raw !== "string") {
|
|
31810
|
+
context.addWarning(`Invalid table scope '${raw}', ignoring.`);
|
|
31811
|
+
return void 0;
|
|
31812
|
+
}
|
|
31813
|
+
const normalized = raw.trim().toLowerCase();
|
|
31814
|
+
switch (normalized) {
|
|
31815
|
+
case "row":
|
|
31816
|
+
case "col":
|
|
31817
|
+
case "rowgroup":
|
|
31818
|
+
case "colgroup":
|
|
31819
|
+
return normalized;
|
|
31820
|
+
default:
|
|
31821
|
+
context.addWarning(`Invalid table scope '${raw}', ignoring.`);
|
|
31822
|
+
return void 0;
|
|
31823
|
+
}
|
|
31824
|
+
};
|
|
31825
|
+
const buildCell = (variant, section) => {
|
|
31826
|
+
const tags2 = variant.data;
|
|
31827
|
+
const heading = tags2.title && tags2.title[1]?.titleAst;
|
|
31828
|
+
const bodyContent = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
|
|
31829
|
+
const content = heading ?? bodyContent;
|
|
31830
|
+
const cellTypeRaw = tags2.tableCellType ?? readExtraProperty(tags2.extraProperties, "tableCellType");
|
|
31831
|
+
const rowSpanRaw = tags2.tableRowSpan ?? readExtraProperty(tags2.extraProperties, "tableRowSpan");
|
|
31832
|
+
const colSpanRaw = tags2.tableColSpan ?? readExtraProperty(tags2.extraProperties, "tableColSpan");
|
|
31833
|
+
const scopeRaw = tags2.tableScope ?? readExtraProperty(tags2.extraProperties, "tableScope");
|
|
31834
|
+
cleanupExtraProperties(tags2, ["tableCellType", "tableRowSpan", "tableColSpan", "tableScope"]);
|
|
31835
|
+
const cellType = normalizeCellType(cellTypeRaw, section);
|
|
31836
|
+
const rowspan = normalizeSpan(rowSpanRaw, "rowspan");
|
|
31837
|
+
const colspan = normalizeSpan(colSpanRaw, "colspan");
|
|
31838
|
+
const scope = normalizeScope(scopeRaw);
|
|
31839
|
+
const cell = {
|
|
31840
|
+
content
|
|
31841
|
+
};
|
|
31842
|
+
if (cellType === "th") cell.title = true;
|
|
31843
|
+
if (rowspan > 1) cell.rowspan = rowspan;
|
|
31844
|
+
if (colspan > 1) cell.colspan = colspan;
|
|
31845
|
+
if (scope) cell.scope = scope;
|
|
31846
|
+
return cell;
|
|
31847
|
+
};
|
|
31848
|
+
const resolveSectionQualifier = (card) => {
|
|
31849
|
+
const cardQualifier = getNormalizedQualifier(card.qualifier);
|
|
31850
|
+
if (cardQualifier) return cardQualifier;
|
|
31851
|
+
for (const side of card.sides) {
|
|
31852
|
+
const sideQualifier = getNormalizedQualifier(side.qualifier);
|
|
31853
|
+
if (sideQualifier) return sideQualifier;
|
|
31854
|
+
for (const variant of side.variants) {
|
|
31855
|
+
const variantQualifier = getNormalizedQualifier(variant.qualifier);
|
|
31856
|
+
if (variantQualifier) return variantQualifier;
|
|
31857
|
+
}
|
|
31858
|
+
}
|
|
31859
|
+
return void 0;
|
|
31860
|
+
};
|
|
30989
31861
|
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
30990
31862
|
const card = cardSet.cards[cardIdx];
|
|
30991
|
-
|
|
30992
|
-
|
|
31863
|
+
const qualifier = resolveSectionQualifier(card);
|
|
31864
|
+
const section = qualifier ? qualifier : isLegacyHeadingRow(card, cardIdx) ? "thead" : "tbody";
|
|
31865
|
+
const cells = [];
|
|
30993
31866
|
for (const side of card.sides) {
|
|
30994
|
-
for (const
|
|
30995
|
-
|
|
30996
|
-
const { title, cardBody } = tags2;
|
|
30997
|
-
const heading = title && title[1].titleAst;
|
|
30998
|
-
if (cardIdx === 0 && heading != null) isHeading = true;
|
|
30999
|
-
if (isHeading) {
|
|
31000
|
-
columns.push(heading ?? []);
|
|
31001
|
-
} else {
|
|
31002
|
-
const value = cardBody?.body ?? [];
|
|
31003
|
-
rowValues.push(value);
|
|
31004
|
-
}
|
|
31867
|
+
for (const variant of side.variants) {
|
|
31868
|
+
cells.push(buildCell(variant, section));
|
|
31005
31869
|
}
|
|
31006
31870
|
}
|
|
31007
|
-
|
|
31008
|
-
|
|
31009
|
-
}
|
|
31871
|
+
sectionRows[section].push({
|
|
31872
|
+
cells
|
|
31873
|
+
});
|
|
31874
|
+
}
|
|
31875
|
+
const table = {};
|
|
31876
|
+
const hasHeadRows = sectionRows.thead.length > 0;
|
|
31877
|
+
const hasBodyRows = sectionRows.tbody.length > 0;
|
|
31878
|
+
const hasFootRows = sectionRows.tfoot.length > 0;
|
|
31879
|
+
if (hasHeadRows) {
|
|
31880
|
+
table.head = {
|
|
31881
|
+
rows: sectionRows.thead
|
|
31882
|
+
};
|
|
31883
|
+
}
|
|
31884
|
+
if (hasBodyRows) {
|
|
31885
|
+
table.body = {
|
|
31886
|
+
rows: sectionRows.tbody
|
|
31887
|
+
};
|
|
31888
|
+
}
|
|
31889
|
+
if (hasFootRows) {
|
|
31890
|
+
table.foot = {
|
|
31891
|
+
rows: sectionRows.tfoot
|
|
31892
|
+
};
|
|
31893
|
+
}
|
|
31894
|
+
if (!hasHeadRows && !hasBodyRows && !hasFootRows) {
|
|
31895
|
+
table.head = { rows: [] };
|
|
31896
|
+
table.body = { rows: [] };
|
|
31897
|
+
table.foot = { rows: [] };
|
|
31010
31898
|
}
|
|
31011
|
-
const table = {
|
|
31012
|
-
columns,
|
|
31013
|
-
data: rows
|
|
31014
|
-
};
|
|
31015
31899
|
return { table };
|
|
31016
31900
|
}
|
|
31017
31901
|
function parseBotActionResponses(_context, _bitType, cardSet) {
|
|
@@ -31162,11 +32046,11 @@ function extractHeadingCard(cardSet, valuesIsArray = false) {
|
|
|
31162
32046
|
function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
|
|
31163
32047
|
const { type, value } = content;
|
|
31164
32048
|
const { textFormat } = context;
|
|
31165
|
-
const
|
|
32049
|
+
const textParser10 = new TextParser();
|
|
31166
32050
|
const trimmedStringValue = stringUtils.trimmedString(value);
|
|
31167
32051
|
switch (type) {
|
|
31168
32052
|
case TypeKey.Instruction: {
|
|
31169
|
-
target.instruction =
|
|
32053
|
+
target.instruction = textParser10.toAst(trimmedStringValue, {
|
|
31170
32054
|
format: textFormat,
|
|
31171
32055
|
location: TextLocation2.tag
|
|
31172
32056
|
});
|
|
@@ -31177,7 +32061,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
|
|
|
31177
32061
|
break;
|
|
31178
32062
|
}
|
|
31179
32063
|
case TypeKey.Hint: {
|
|
31180
|
-
target.hint =
|
|
32064
|
+
target.hint = textParser10.toAst(trimmedStringValue, {
|
|
31181
32065
|
format: textFormat,
|
|
31182
32066
|
location: TextLocation2.tag
|
|
31183
32067
|
});
|
|
@@ -31207,7 +32091,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
|
|
|
31207
32091
|
format: TextFormat2.bitmarkText,
|
|
31208
32092
|
location: TextLocation2.tag
|
|
31209
32093
|
});
|
|
31210
|
-
target.__sampleSolutionAst =
|
|
32094
|
+
target.__sampleSolutionAst = textParser10.toAst(trimmedStringValue, {
|
|
31211
32095
|
format: textFormat,
|
|
31212
32096
|
location: TextLocation2.tag
|
|
31213
32097
|
});
|
|
@@ -31314,10 +32198,10 @@ function buildGap(context, _contentDepth, tagsConfig, content) {
|
|
|
31314
32198
|
function itemLeadTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
|
|
31315
32199
|
const { textFormat } = context;
|
|
31316
32200
|
const { value } = content;
|
|
31317
|
-
const
|
|
32201
|
+
const textParser10 = new TextParser();
|
|
31318
32202
|
const trimmedStringValue = stringUtils.trimmedString(value);
|
|
31319
32203
|
if (!target.itemLead) target.itemLead = [];
|
|
31320
|
-
const text =
|
|
32204
|
+
const text = textParser10.toAst(trimmedStringValue, {
|
|
31321
32205
|
format: textFormat,
|
|
31322
32206
|
location: TextLocation2.tag
|
|
31323
32207
|
});
|
|
@@ -31995,7 +32879,7 @@ function resourceContentProcessor(context, _contentDepth, tagsConfig, content, t
|
|
|
31995
32879
|
...tags2
|
|
31996
32880
|
});
|
|
31997
32881
|
if (resource) {
|
|
31998
|
-
if (configKey === ConfigKey.resource_backgroundWallpaper || configKey === ConfigKey.resource_imagePlaceholder) {
|
|
32882
|
+
if (configKey === ConfigKey.resource_backgroundWallpaper || configKey === ConfigKey.resource_imagePlaceholder || configKey === ConfigKey.resource_platformIcon || configKey === ConfigKey.resource_platformLogo || configKey === ConfigKey.resource_platformBackgroundImage) {
|
|
31999
32883
|
if (target.propertyStyleResources) target.propertyStyleResources[resourceType] = resource;
|
|
32000
32884
|
} else {
|
|
32001
32885
|
resources.push(resource);
|
|
@@ -32068,7 +32952,9 @@ function buildTitles(_context, bitType, title) {
|
|
|
32068
32952
|
}
|
|
32069
32953
|
|
|
32070
32954
|
// src/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.ts
|
|
32071
|
-
|
|
32955
|
+
var textParser9 = new TextParser();
|
|
32956
|
+
function trueFalseTagContentProcessor(context, _contentDepth, content, target) {
|
|
32957
|
+
const { textFormat } = context;
|
|
32072
32958
|
const { type, value } = content;
|
|
32073
32959
|
const trueFalse = target.trueFalse;
|
|
32074
32960
|
if (!trueFalse) return;
|
|
@@ -32079,8 +32965,13 @@ function trueFalseTagContentProcessor(_context, _contentDepth, content, target)
|
|
|
32079
32965
|
location: TextLocation2.tag
|
|
32080
32966
|
}
|
|
32081
32967
|
);
|
|
32968
|
+
const textAst = textParser9.toAst(trimmedStringValue ?? "", {
|
|
32969
|
+
format: textFormat,
|
|
32970
|
+
location: TextLocation2.tag
|
|
32971
|
+
});
|
|
32082
32972
|
trueFalse.push({
|
|
32083
32973
|
text: trimmedStringValue,
|
|
32974
|
+
textAst,
|
|
32084
32975
|
isCorrect: type === TypeKey.True,
|
|
32085
32976
|
__isDefaultExample: false
|
|
32086
32977
|
});
|
|
@@ -32184,7 +33075,7 @@ function buildStatementsChoicesResponses(context, tagsConfig, trueFalseContent)
|
|
|
32184
33075
|
const { statement: _ignore, ...tagsRest } = tags2;
|
|
32185
33076
|
const statement = {
|
|
32186
33077
|
...firstTrueFalse,
|
|
32187
|
-
statement: firstTrueFalse.
|
|
33078
|
+
statement: firstTrueFalse.textAst ?? [],
|
|
32188
33079
|
...tagsRest
|
|
32189
33080
|
};
|
|
32190
33081
|
if (statement) statements.push(statement);
|
|
@@ -32703,8 +33594,7 @@ var BitmarkPegParserProcessor = class {
|
|
|
32703
33594
|
if (l > 0) result.item = result.itemLead[0];
|
|
32704
33595
|
if (l > 1) result.lead = result.itemLead[1];
|
|
32705
33596
|
if (l > 2) result.pageNumber = result.itemLead[2];
|
|
32706
|
-
if (l > 3) result.
|
|
32707
|
-
if (l > 4) result.marginNumber = result.itemLead[l - 1];
|
|
33597
|
+
if (l > 3) result.marginNumber = result.itemLead[l - 1];
|
|
32708
33598
|
}
|
|
32709
33599
|
if (inBit) {
|
|
32710
33600
|
result.body = instance11.process(
|
|
@@ -32952,36 +33842,39 @@ function peg$parse2(input, options) {
|
|
|
32952
33842
|
const peg$c7 = "text";
|
|
32953
33843
|
const peg$c8 = "~~~~";
|
|
32954
33844
|
const peg$c9 = "footer";
|
|
32955
|
-
const peg$c10 = "
|
|
32956
|
-
const peg$c11 = "
|
|
32957
|
-
const peg$c12 = "
|
|
32958
|
-
const peg$c13 = "
|
|
32959
|
-
const peg$c14 = "
|
|
32960
|
-
const peg$c15 = "
|
|
32961
|
-
const peg$c16 = "
|
|
32962
|
-
const peg$c17 = "[\
|
|
32963
|
-
const peg$c18 = "[
|
|
32964
|
-
const peg$c19 = "[
|
|
32965
|
-
const peg$c20 = "[
|
|
32966
|
-
const peg$c21 = "[
|
|
32967
|
-
const peg$c22 = "[
|
|
32968
|
-
const peg$c23 = "[
|
|
32969
|
-
const peg$c24 = "[
|
|
32970
|
-
const peg$c25 = "[
|
|
32971
|
-
const peg$c26 = "[
|
|
32972
|
-
const peg$c27 = "[
|
|
32973
|
-
const peg$c28 = "
|
|
32974
|
-
const peg$c29 = "
|
|
32975
|
-
const peg$c30 = "
|
|
32976
|
-
const peg$c31 = "
|
|
32977
|
-
const peg$c32 = "\
|
|
33845
|
+
const peg$c10 = " ";
|
|
33846
|
+
const peg$c11 = "--";
|
|
33847
|
+
const peg$c12 = "++";
|
|
33848
|
+
const peg$c13 = "===";
|
|
33849
|
+
const peg$c14 = "==";
|
|
33850
|
+
const peg$c15 = "[@id";
|
|
33851
|
+
const peg$c16 = "#";
|
|
33852
|
+
const peg$c17 = "[\u25BC";
|
|
33853
|
+
const peg$c18 = "[\u25BA";
|
|
33854
|
+
const peg$c19 = "[@";
|
|
33855
|
+
const peg$c20 = "[%";
|
|
33856
|
+
const peg$c21 = "[!";
|
|
33857
|
+
const peg$c22 = "[?";
|
|
33858
|
+
const peg$c23 = "[+";
|
|
33859
|
+
const peg$c24 = "[-";
|
|
33860
|
+
const peg$c25 = "[$";
|
|
33861
|
+
const peg$c26 = "[_";
|
|
33862
|
+
const peg$c27 = "[=";
|
|
33863
|
+
const peg$c28 = "[&";
|
|
33864
|
+
const peg$c29 = "^]";
|
|
33865
|
+
const peg$c30 = "id:";
|
|
33866
|
+
const peg$c31 = ".";
|
|
33867
|
+
const peg$c32 = "\n";
|
|
33868
|
+
const peg$c33 = "\r\n";
|
|
32978
33869
|
const peg$r0 = /^[^\]]/;
|
|
32979
|
-
const peg$r1 = /^[
|
|
32980
|
-
const peg$r2 = /^[
|
|
32981
|
-
const peg$r3 = /^[
|
|
32982
|
-
const peg$r4 = /^[
|
|
32983
|
-
const peg$r5 = /^[\r\u2028
|
|
32984
|
-
const peg$r6 = /^[ \t
|
|
33870
|
+
const peg$r1 = /^[a-z]/;
|
|
33871
|
+
const peg$r2 = /^[a-z0-9\-]/;
|
|
33872
|
+
const peg$r3 = /^[^:\]]/;
|
|
33873
|
+
const peg$r4 = /^[^&:\]]/;
|
|
33874
|
+
const peg$r5 = /^[^\n\r\u2028\u2029]/;
|
|
33875
|
+
const peg$r6 = /^[ \t]/;
|
|
33876
|
+
const peg$r7 = /^[\r\u2028-\u2029]/;
|
|
33877
|
+
const peg$r8 = /^[ \t\n\r\u2028\u2029]/;
|
|
32985
33878
|
const peg$e0 = peg$literalExpectation("[.", false);
|
|
32986
33879
|
const peg$e1 = peg$classExpectation(["]"], true, false, false);
|
|
32987
33880
|
const peg$e2 = peg$literalExpectation("]", false);
|
|
@@ -32994,40 +33887,43 @@ function peg$parse2(input, options) {
|
|
|
32994
33887
|
const peg$e9 = peg$literalExpectation("text", false);
|
|
32995
33888
|
const peg$e10 = peg$literalExpectation("~~~~", false);
|
|
32996
33889
|
const peg$e11 = peg$literalExpectation("footer", false);
|
|
32997
|
-
const peg$e12 = peg$literalExpectation("
|
|
32998
|
-
const peg$e13 = peg$literalExpectation("
|
|
32999
|
-
const peg$e14 = peg$literalExpectation("
|
|
33000
|
-
const peg$e15 = peg$literalExpectation("
|
|
33001
|
-
const peg$e16 = peg$literalExpectation("
|
|
33002
|
-
const peg$e17 = peg$
|
|
33003
|
-
const peg$e18 = peg$
|
|
33004
|
-
const peg$e19 = peg$literalExpectation("[
|
|
33005
|
-
const peg$e20 = peg$literalExpectation("
|
|
33006
|
-
const peg$e21 = peg$literalExpectation("[
|
|
33007
|
-
const peg$e22 = peg$literalExpectation("[
|
|
33008
|
-
const peg$e23 = peg$literalExpectation("[
|
|
33009
|
-
const peg$e24 = peg$literalExpectation("[
|
|
33010
|
-
const peg$e25 = peg$literalExpectation("[
|
|
33011
|
-
const peg$e26 = peg$literalExpectation("[
|
|
33012
|
-
const peg$e27 = peg$literalExpectation("[
|
|
33013
|
-
const peg$e28 = peg$literalExpectation("[
|
|
33014
|
-
const peg$e29 = peg$literalExpectation("[
|
|
33015
|
-
const peg$e30 = peg$literalExpectation("
|
|
33016
|
-
const peg$e31 = peg$literalExpectation("
|
|
33017
|
-
const peg$e32 = peg$
|
|
33018
|
-
const peg$e33 = peg$literalExpectation("
|
|
33019
|
-
const peg$e34 = peg$
|
|
33020
|
-
const peg$e35 = peg$
|
|
33021
|
-
const peg$e36 = peg$
|
|
33022
|
-
const peg$e37 = peg$
|
|
33023
|
-
const peg$e38 = peg$
|
|
33024
|
-
const peg$e39 = peg$
|
|
33025
|
-
const peg$e40 = peg$
|
|
33026
|
-
const peg$e41 = peg$
|
|
33027
|
-
const peg$e42 = peg$
|
|
33028
|
-
const peg$e43 = peg$
|
|
33029
|
-
const peg$e44 = peg$
|
|
33030
|
-
const peg$e45 = peg$classExpectation(["
|
|
33890
|
+
const peg$e12 = peg$literalExpectation(" ", false);
|
|
33891
|
+
const peg$e13 = peg$literalExpectation("--", false);
|
|
33892
|
+
const peg$e14 = peg$literalExpectation("++", false);
|
|
33893
|
+
const peg$e15 = peg$literalExpectation("===", false);
|
|
33894
|
+
const peg$e16 = peg$literalExpectation("==", false);
|
|
33895
|
+
const peg$e17 = peg$classExpectation([["a", "z"]], false, false, false);
|
|
33896
|
+
const peg$e18 = peg$classExpectation([["a", "z"], ["0", "9"], "-"], false, false, false);
|
|
33897
|
+
const peg$e19 = peg$literalExpectation("[@id", false);
|
|
33898
|
+
const peg$e20 = peg$literalExpectation("#", false);
|
|
33899
|
+
const peg$e21 = peg$literalExpectation("[\u25BC", false);
|
|
33900
|
+
const peg$e22 = peg$literalExpectation("[\u25BA", false);
|
|
33901
|
+
const peg$e23 = peg$literalExpectation("[@", false);
|
|
33902
|
+
const peg$e24 = peg$literalExpectation("[%", false);
|
|
33903
|
+
const peg$e25 = peg$literalExpectation("[!", false);
|
|
33904
|
+
const peg$e26 = peg$literalExpectation("[?", false);
|
|
33905
|
+
const peg$e27 = peg$literalExpectation("[+", false);
|
|
33906
|
+
const peg$e28 = peg$literalExpectation("[-", false);
|
|
33907
|
+
const peg$e29 = peg$literalExpectation("[$", false);
|
|
33908
|
+
const peg$e30 = peg$literalExpectation("[_", false);
|
|
33909
|
+
const peg$e31 = peg$literalExpectation("[=", false);
|
|
33910
|
+
const peg$e32 = peg$literalExpectation("[&", false);
|
|
33911
|
+
const peg$e33 = peg$literalExpectation("^]", false);
|
|
33912
|
+
const peg$e34 = peg$literalExpectation("id:", false);
|
|
33913
|
+
const peg$e35 = peg$classExpectation([":", "]"], true, false, false);
|
|
33914
|
+
const peg$e36 = peg$literalExpectation(".", false);
|
|
33915
|
+
const peg$e37 = peg$classExpectation(["&", ":", "]"], true, false, false);
|
|
33916
|
+
const peg$e38 = peg$otherExpectation("Character");
|
|
33917
|
+
const peg$e39 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], true, false, false);
|
|
33918
|
+
const peg$e40 = peg$otherExpectation("Blank Line");
|
|
33919
|
+
const peg$e41 = peg$classExpectation([" ", " "], false, false, false);
|
|
33920
|
+
const peg$e42 = peg$otherExpectation("Line Terminator");
|
|
33921
|
+
const peg$e43 = peg$literalExpectation("\n", false);
|
|
33922
|
+
const peg$e44 = peg$literalExpectation("\r\n", false);
|
|
33923
|
+
const peg$e45 = peg$classExpectation(["\r", ["\u2028", "\u2029"]], false, false, false);
|
|
33924
|
+
const peg$e46 = peg$otherExpectation("Whitespace, then Line Terminator");
|
|
33925
|
+
const peg$e47 = peg$otherExpectation("whitespace");
|
|
33926
|
+
const peg$e48 = peg$classExpectation([" ", " ", "\n", "\r", "\u2028", "\u2029"], false, false, false);
|
|
33031
33927
|
function peg$f0(firstBit, bits) {
|
|
33032
33928
|
return processor.buildBits([firstBit, ...bits]);
|
|
33033
33929
|
}
|
|
@@ -33100,91 +33996,112 @@ function peg$parse2(input, options) {
|
|
|
33100
33996
|
function peg$f23(value) {
|
|
33101
33997
|
return helper.handleCardLineOrDivider(value, 2);
|
|
33102
33998
|
}
|
|
33103
|
-
function peg$f24(
|
|
33999
|
+
function peg$f24(qualifier) {
|
|
34000
|
+
return ["====", qualifier];
|
|
34001
|
+
}
|
|
34002
|
+
function peg$f25() {
|
|
34003
|
+
return ["===="];
|
|
34004
|
+
}
|
|
34005
|
+
function peg$f26(qualifier) {
|
|
34006
|
+
return ["--", qualifier];
|
|
34007
|
+
}
|
|
34008
|
+
function peg$f27() {
|
|
34009
|
+
return ["--"];
|
|
34010
|
+
}
|
|
34011
|
+
function peg$f28(qualifier) {
|
|
34012
|
+
return ["++", qualifier];
|
|
34013
|
+
}
|
|
34014
|
+
function peg$f29() {
|
|
34015
|
+
return ["++"];
|
|
34016
|
+
}
|
|
34017
|
+
function peg$f30(value) {
|
|
33104
34018
|
return helper.handleCardLine(value);
|
|
33105
34019
|
}
|
|
33106
|
-
function peg$
|
|
34020
|
+
function peg$f31(value) {
|
|
33107
34021
|
return helper.handleCardSet(value[1].flat());
|
|
33108
34022
|
}
|
|
33109
|
-
function peg$
|
|
34023
|
+
function peg$f32() {
|
|
33110
34024
|
helper.handleCardSetStart();
|
|
33111
34025
|
}
|
|
33112
|
-
function peg$
|
|
34026
|
+
function peg$f33() {
|
|
33113
34027
|
helper.handleCardSetEnd();
|
|
33114
34028
|
}
|
|
33115
|
-
function peg$
|
|
34029
|
+
function peg$f34(value) {
|
|
33116
34030
|
return helper.handleCards(value);
|
|
33117
34031
|
}
|
|
33118
|
-
function peg$
|
|
34032
|
+
function peg$f35(value) {
|
|
33119
34033
|
return helper.handleCardLineOrDivider(value, 1);
|
|
33120
34034
|
}
|
|
33121
|
-
function peg$
|
|
34035
|
+
function peg$f36(value) {
|
|
33122
34036
|
return helper.handleCardLine(value);
|
|
33123
34037
|
}
|
|
33124
|
-
function peg$
|
|
34038
|
+
function peg$f37(value) {
|
|
34039
|
+
return value;
|
|
34040
|
+
}
|
|
34041
|
+
function peg$f38(value) {
|
|
33125
34042
|
return helper.handleCardContent(value);
|
|
33126
34043
|
}
|
|
33127
|
-
function peg$
|
|
34044
|
+
function peg$f39(value) {
|
|
33128
34045
|
return { type: TypeKey.CardChar, value };
|
|
33129
34046
|
}
|
|
33130
|
-
function peg$
|
|
34047
|
+
function peg$f40(value) {
|
|
33131
34048
|
return helper.handlePropertyTag("id", value);
|
|
33132
34049
|
}
|
|
33133
|
-
function peg$
|
|
34050
|
+
function peg$f41(level, title) {
|
|
33134
34051
|
return helper.handleTag(TypeKey.Title, { level, title });
|
|
33135
34052
|
}
|
|
33136
|
-
function peg$
|
|
34053
|
+
function peg$f42(value) {
|
|
33137
34054
|
return helper.handleTag(TypeKey.Anchor, value);
|
|
33138
34055
|
}
|
|
33139
|
-
function peg$
|
|
34056
|
+
function peg$f43(value) {
|
|
33140
34057
|
return helper.handleTag(TypeKey.Reference, value);
|
|
33141
34058
|
}
|
|
33142
|
-
function peg$
|
|
34059
|
+
function peg$f44(key, value) {
|
|
33143
34060
|
return helper.handlePropertyTag(key, value);
|
|
33144
34061
|
}
|
|
33145
|
-
function peg$
|
|
34062
|
+
function peg$f45(value) {
|
|
33146
34063
|
return helper.handleTag(TypeKey.ItemLead, value);
|
|
33147
34064
|
}
|
|
33148
|
-
function peg$
|
|
34065
|
+
function peg$f46(value) {
|
|
33149
34066
|
return helper.handleTag(TypeKey.Instruction, value);
|
|
33150
34067
|
}
|
|
33151
|
-
function peg$
|
|
34068
|
+
function peg$f47(value) {
|
|
33152
34069
|
return helper.handleTag(TypeKey.Hint, value);
|
|
33153
34070
|
}
|
|
33154
|
-
function peg$
|
|
34071
|
+
function peg$f48(value) {
|
|
33155
34072
|
return helper.handleTag(TypeKey.True, value);
|
|
33156
34073
|
}
|
|
33157
|
-
function peg$
|
|
34074
|
+
function peg$f49(value) {
|
|
33158
34075
|
return helper.handleTag(TypeKey.False, value);
|
|
33159
34076
|
}
|
|
33160
|
-
function peg$
|
|
34077
|
+
function peg$f50(value) {
|
|
33161
34078
|
return helper.handleTag(TypeKey.SampleSolution, value);
|
|
33162
34079
|
}
|
|
33163
|
-
function peg$
|
|
34080
|
+
function peg$f51(value) {
|
|
33164
34081
|
return helper.handleTag(TypeKey.Gap, value);
|
|
33165
34082
|
}
|
|
33166
|
-
function peg$
|
|
34083
|
+
function peg$f52(value) {
|
|
33167
34084
|
return helper.handleTag(TypeKey.Mark, value);
|
|
33168
34085
|
}
|
|
33169
|
-
function peg$
|
|
34086
|
+
function peg$f53(key, value) {
|
|
33170
34087
|
return helper.handleResourceTag(key, value);
|
|
33171
34088
|
}
|
|
33172
|
-
function peg$
|
|
34089
|
+
function peg$f54(value) {
|
|
33173
34090
|
return value;
|
|
33174
34091
|
}
|
|
33175
|
-
function peg$
|
|
34092
|
+
function peg$f55(value) {
|
|
33176
34093
|
return value ? value.trim() : "";
|
|
33177
34094
|
}
|
|
33178
|
-
function peg$
|
|
34095
|
+
function peg$f56(value) {
|
|
33179
34096
|
return value.length;
|
|
33180
34097
|
}
|
|
33181
|
-
function peg$
|
|
34098
|
+
function peg$f57(value) {
|
|
33182
34099
|
return value ? value.trim() : null;
|
|
33183
34100
|
}
|
|
33184
|
-
function peg$
|
|
34101
|
+
function peg$f58(value) {
|
|
33185
34102
|
return value ? value.trim() : "";
|
|
33186
34103
|
}
|
|
33187
|
-
function peg$
|
|
34104
|
+
function peg$f59() {
|
|
33188
34105
|
return true;
|
|
33189
34106
|
}
|
|
33190
34107
|
let peg$currPos = options.peg$currPos | 0;
|
|
@@ -34102,35 +35019,28 @@ function peg$parse2(input, options) {
|
|
|
34102
35019
|
return s0;
|
|
34103
35020
|
}
|
|
34104
35021
|
function peg$parseCardSetStart_V2() {
|
|
34105
|
-
let s0, s1, s2, s3
|
|
35022
|
+
let s0, s1, s2, s3;
|
|
34106
35023
|
s0 = peg$currPos;
|
|
34107
|
-
s1 =
|
|
35024
|
+
s1 = [];
|
|
35025
|
+
s2 = peg$parseWNL();
|
|
35026
|
+
if (s2 === peg$FAILED) {
|
|
35027
|
+
s2 = peg$parseNL();
|
|
35028
|
+
}
|
|
35029
|
+
if (s2 !== peg$FAILED) {
|
|
35030
|
+
while (s2 !== peg$FAILED) {
|
|
35031
|
+
s1.push(s2);
|
|
35032
|
+
s2 = peg$parseWNL();
|
|
35033
|
+
if (s2 === peg$FAILED) {
|
|
35034
|
+
s2 = peg$parseNL();
|
|
35035
|
+
}
|
|
35036
|
+
}
|
|
35037
|
+
} else {
|
|
35038
|
+
s1 = peg$FAILED;
|
|
35039
|
+
}
|
|
34108
35040
|
if (s1 !== peg$FAILED) {
|
|
34109
35041
|
s2 = peg$currPos;
|
|
34110
35042
|
peg$silentFails++;
|
|
34111
|
-
s3 = peg$
|
|
34112
|
-
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
34113
|
-
s4 = peg$c6;
|
|
34114
|
-
peg$currPos += 4;
|
|
34115
|
-
} else {
|
|
34116
|
-
s4 = peg$FAILED;
|
|
34117
|
-
if (peg$silentFails === 0) {
|
|
34118
|
-
peg$fail(peg$e8);
|
|
34119
|
-
}
|
|
34120
|
-
}
|
|
34121
|
-
if (s4 !== peg$FAILED) {
|
|
34122
|
-
s5 = peg$parseWNL();
|
|
34123
|
-
if (s5 !== peg$FAILED) {
|
|
34124
|
-
s4 = [s4, s5];
|
|
34125
|
-
s3 = s4;
|
|
34126
|
-
} else {
|
|
34127
|
-
peg$currPos = s3;
|
|
34128
|
-
s3 = peg$FAILED;
|
|
34129
|
-
}
|
|
34130
|
-
} else {
|
|
34131
|
-
peg$currPos = s3;
|
|
34132
|
-
s3 = peg$FAILED;
|
|
34133
|
-
}
|
|
35043
|
+
s3 = peg$parseCardDividerLookahead_V2();
|
|
34134
35044
|
peg$silentFails--;
|
|
34135
35045
|
if (s3 !== peg$FAILED) {
|
|
34136
35046
|
peg$currPos = s2;
|
|
@@ -34195,39 +35105,147 @@ function peg$parse2(input, options) {
|
|
|
34195
35105
|
return s0;
|
|
34196
35106
|
}
|
|
34197
35107
|
function peg$parseCardLineOrDivider_V2() {
|
|
34198
|
-
let s0, s1
|
|
35108
|
+
let s0, s1;
|
|
35109
|
+
s0 = peg$currPos;
|
|
35110
|
+
s1 = peg$parseCardDividerToken_V2();
|
|
35111
|
+
if (s1 === peg$FAILED) {
|
|
35112
|
+
s1 = peg$parseCardSideDividerToken_V2();
|
|
35113
|
+
if (s1 === peg$FAILED) {
|
|
35114
|
+
s1 = peg$parseCardVariantDividerToken_V2();
|
|
35115
|
+
if (s1 === peg$FAILED) {
|
|
35116
|
+
s1 = peg$parseCardLine_V2();
|
|
35117
|
+
}
|
|
35118
|
+
}
|
|
35119
|
+
}
|
|
35120
|
+
if (s1 !== peg$FAILED) {
|
|
35121
|
+
peg$savedPos = s0;
|
|
35122
|
+
s1 = peg$f23(s1);
|
|
35123
|
+
}
|
|
35124
|
+
s0 = s1;
|
|
35125
|
+
return s0;
|
|
35126
|
+
}
|
|
35127
|
+
function peg$parseCardDividerToken_V2() {
|
|
35128
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
34199
35129
|
s0 = peg$currPos;
|
|
34200
|
-
s1 = peg$currPos;
|
|
34201
35130
|
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
34202
|
-
|
|
35131
|
+
s1 = peg$c6;
|
|
34203
35132
|
peg$currPos += 4;
|
|
34204
35133
|
} else {
|
|
34205
|
-
|
|
35134
|
+
s1 = peg$FAILED;
|
|
34206
35135
|
if (peg$silentFails === 0) {
|
|
34207
35136
|
peg$fail(peg$e8);
|
|
34208
35137
|
}
|
|
34209
35138
|
}
|
|
34210
|
-
if (
|
|
34211
|
-
|
|
34212
|
-
|
|
34213
|
-
|
|
35139
|
+
if (s1 !== peg$FAILED) {
|
|
35140
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35141
|
+
s2 = peg$c10;
|
|
35142
|
+
peg$currPos++;
|
|
35143
|
+
} else {
|
|
35144
|
+
s2 = peg$FAILED;
|
|
35145
|
+
if (peg$silentFails === 0) {
|
|
35146
|
+
peg$fail(peg$e12);
|
|
35147
|
+
}
|
|
34214
35148
|
}
|
|
34215
|
-
if (
|
|
34216
|
-
|
|
34217
|
-
|
|
35149
|
+
if (s2 !== peg$FAILED) {
|
|
35150
|
+
s3 = peg$parseQualifier();
|
|
35151
|
+
if (s3 !== peg$FAILED) {
|
|
35152
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35153
|
+
s4 = peg$c10;
|
|
35154
|
+
peg$currPos++;
|
|
35155
|
+
} else {
|
|
35156
|
+
s4 = peg$FAILED;
|
|
35157
|
+
if (peg$silentFails === 0) {
|
|
35158
|
+
peg$fail(peg$e12);
|
|
35159
|
+
}
|
|
35160
|
+
}
|
|
35161
|
+
if (s4 !== peg$FAILED) {
|
|
35162
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35163
|
+
s5 = peg$c6;
|
|
35164
|
+
peg$currPos += 4;
|
|
35165
|
+
} else {
|
|
35166
|
+
s5 = peg$FAILED;
|
|
35167
|
+
if (peg$silentFails === 0) {
|
|
35168
|
+
peg$fail(peg$e8);
|
|
35169
|
+
}
|
|
35170
|
+
}
|
|
35171
|
+
if (s5 !== peg$FAILED) {
|
|
35172
|
+
s6 = peg$parseWNL();
|
|
35173
|
+
if (s6 === peg$FAILED) {
|
|
35174
|
+
s6 = peg$parseWEOL();
|
|
35175
|
+
}
|
|
35176
|
+
if (s6 !== peg$FAILED) {
|
|
35177
|
+
peg$savedPos = s0;
|
|
35178
|
+
s0 = peg$f24(s3);
|
|
35179
|
+
} else {
|
|
35180
|
+
peg$currPos = s0;
|
|
35181
|
+
s0 = peg$FAILED;
|
|
35182
|
+
}
|
|
35183
|
+
} else {
|
|
35184
|
+
peg$currPos = s0;
|
|
35185
|
+
s0 = peg$FAILED;
|
|
35186
|
+
}
|
|
35187
|
+
} else {
|
|
35188
|
+
peg$currPos = s0;
|
|
35189
|
+
s0 = peg$FAILED;
|
|
35190
|
+
}
|
|
35191
|
+
} else {
|
|
35192
|
+
peg$currPos = s0;
|
|
35193
|
+
s0 = peg$FAILED;
|
|
35194
|
+
}
|
|
35195
|
+
} else {
|
|
35196
|
+
peg$currPos = s0;
|
|
35197
|
+
s0 = peg$FAILED;
|
|
35198
|
+
}
|
|
35199
|
+
} else {
|
|
35200
|
+
peg$currPos = s0;
|
|
35201
|
+
s0 = peg$FAILED;
|
|
35202
|
+
}
|
|
35203
|
+
if (s0 === peg$FAILED) {
|
|
35204
|
+
s0 = peg$currPos;
|
|
35205
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35206
|
+
s1 = peg$c6;
|
|
35207
|
+
peg$currPos += 4;
|
|
34218
35208
|
} else {
|
|
34219
|
-
peg$currPos = s1;
|
|
34220
35209
|
s1 = peg$FAILED;
|
|
35210
|
+
if (peg$silentFails === 0) {
|
|
35211
|
+
peg$fail(peg$e8);
|
|
35212
|
+
}
|
|
34221
35213
|
}
|
|
35214
|
+
if (s1 !== peg$FAILED) {
|
|
35215
|
+
s2 = peg$parseWNL();
|
|
35216
|
+
if (s2 === peg$FAILED) {
|
|
35217
|
+
s2 = peg$parseWEOL();
|
|
35218
|
+
}
|
|
35219
|
+
if (s2 !== peg$FAILED) {
|
|
35220
|
+
peg$savedPos = s0;
|
|
35221
|
+
s0 = peg$f25();
|
|
35222
|
+
} else {
|
|
35223
|
+
peg$currPos = s0;
|
|
35224
|
+
s0 = peg$FAILED;
|
|
35225
|
+
}
|
|
35226
|
+
} else {
|
|
35227
|
+
peg$currPos = s0;
|
|
35228
|
+
s0 = peg$FAILED;
|
|
35229
|
+
}
|
|
35230
|
+
}
|
|
35231
|
+
return s0;
|
|
35232
|
+
}
|
|
35233
|
+
function peg$parseCardSideDividerToken_V2() {
|
|
35234
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35235
|
+
s0 = peg$currPos;
|
|
35236
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35237
|
+
s1 = peg$c11;
|
|
35238
|
+
peg$currPos += 2;
|
|
34222
35239
|
} else {
|
|
34223
|
-
peg$currPos = s1;
|
|
34224
35240
|
s1 = peg$FAILED;
|
|
35241
|
+
if (peg$silentFails === 0) {
|
|
35242
|
+
peg$fail(peg$e13);
|
|
35243
|
+
}
|
|
34225
35244
|
}
|
|
34226
|
-
if (s1
|
|
34227
|
-
|
|
34228
|
-
if (input.substr(peg$currPos, 2) === peg$c10) {
|
|
35245
|
+
if (s1 !== peg$FAILED) {
|
|
35246
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
34229
35247
|
s2 = peg$c10;
|
|
34230
|
-
peg$currPos
|
|
35248
|
+
peg$currPos++;
|
|
34231
35249
|
} else {
|
|
34232
35250
|
s2 = peg$FAILED;
|
|
34233
35251
|
if (peg$silentFails === 0) {
|
|
@@ -34235,58 +35253,277 @@ function peg$parse2(input, options) {
|
|
|
34235
35253
|
}
|
|
34236
35254
|
}
|
|
34237
35255
|
if (s2 !== peg$FAILED) {
|
|
34238
|
-
s3 = peg$
|
|
34239
|
-
if (s3 === peg$FAILED) {
|
|
34240
|
-
s3 = peg$parseWEOL();
|
|
34241
|
-
}
|
|
35256
|
+
s3 = peg$parseQualifier();
|
|
34242
35257
|
if (s3 !== peg$FAILED) {
|
|
34243
|
-
|
|
34244
|
-
|
|
35258
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35259
|
+
s4 = peg$c10;
|
|
35260
|
+
peg$currPos++;
|
|
35261
|
+
} else {
|
|
35262
|
+
s4 = peg$FAILED;
|
|
35263
|
+
if (peg$silentFails === 0) {
|
|
35264
|
+
peg$fail(peg$e12);
|
|
35265
|
+
}
|
|
35266
|
+
}
|
|
35267
|
+
if (s4 !== peg$FAILED) {
|
|
35268
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35269
|
+
s5 = peg$c11;
|
|
35270
|
+
peg$currPos += 2;
|
|
35271
|
+
} else {
|
|
35272
|
+
s5 = peg$FAILED;
|
|
35273
|
+
if (peg$silentFails === 0) {
|
|
35274
|
+
peg$fail(peg$e13);
|
|
35275
|
+
}
|
|
35276
|
+
}
|
|
35277
|
+
if (s5 !== peg$FAILED) {
|
|
35278
|
+
s6 = peg$parseWNL();
|
|
35279
|
+
if (s6 === peg$FAILED) {
|
|
35280
|
+
s6 = peg$parseWEOL();
|
|
35281
|
+
}
|
|
35282
|
+
if (s6 !== peg$FAILED) {
|
|
35283
|
+
peg$savedPos = s0;
|
|
35284
|
+
s0 = peg$f26(s3);
|
|
35285
|
+
} else {
|
|
35286
|
+
peg$currPos = s0;
|
|
35287
|
+
s0 = peg$FAILED;
|
|
35288
|
+
}
|
|
35289
|
+
} else {
|
|
35290
|
+
peg$currPos = s0;
|
|
35291
|
+
s0 = peg$FAILED;
|
|
35292
|
+
}
|
|
35293
|
+
} else {
|
|
35294
|
+
peg$currPos = s0;
|
|
35295
|
+
s0 = peg$FAILED;
|
|
35296
|
+
}
|
|
34245
35297
|
} else {
|
|
34246
|
-
peg$currPos =
|
|
34247
|
-
|
|
35298
|
+
peg$currPos = s0;
|
|
35299
|
+
s0 = peg$FAILED;
|
|
34248
35300
|
}
|
|
34249
35301
|
} else {
|
|
34250
|
-
peg$currPos =
|
|
35302
|
+
peg$currPos = s0;
|
|
35303
|
+
s0 = peg$FAILED;
|
|
35304
|
+
}
|
|
35305
|
+
} else {
|
|
35306
|
+
peg$currPos = s0;
|
|
35307
|
+
s0 = peg$FAILED;
|
|
35308
|
+
}
|
|
35309
|
+
if (s0 === peg$FAILED) {
|
|
35310
|
+
s0 = peg$currPos;
|
|
35311
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35312
|
+
s1 = peg$c11;
|
|
35313
|
+
peg$currPos += 2;
|
|
35314
|
+
} else {
|
|
34251
35315
|
s1 = peg$FAILED;
|
|
35316
|
+
if (peg$silentFails === 0) {
|
|
35317
|
+
peg$fail(peg$e13);
|
|
35318
|
+
}
|
|
34252
35319
|
}
|
|
34253
|
-
if (s1
|
|
34254
|
-
|
|
34255
|
-
if (
|
|
34256
|
-
s2 = peg$
|
|
34257
|
-
peg$currPos += 2;
|
|
34258
|
-
} else {
|
|
34259
|
-
s2 = peg$FAILED;
|
|
34260
|
-
if (peg$silentFails === 0) {
|
|
34261
|
-
peg$fail(peg$e13);
|
|
34262
|
-
}
|
|
35320
|
+
if (s1 !== peg$FAILED) {
|
|
35321
|
+
s2 = peg$parseWNL();
|
|
35322
|
+
if (s2 === peg$FAILED) {
|
|
35323
|
+
s2 = peg$parseWEOL();
|
|
34263
35324
|
}
|
|
34264
35325
|
if (s2 !== peg$FAILED) {
|
|
34265
|
-
|
|
34266
|
-
|
|
34267
|
-
|
|
35326
|
+
peg$savedPos = s0;
|
|
35327
|
+
s0 = peg$f27();
|
|
35328
|
+
} else {
|
|
35329
|
+
peg$currPos = s0;
|
|
35330
|
+
s0 = peg$FAILED;
|
|
35331
|
+
}
|
|
35332
|
+
} else {
|
|
35333
|
+
peg$currPos = s0;
|
|
35334
|
+
s0 = peg$FAILED;
|
|
35335
|
+
}
|
|
35336
|
+
}
|
|
35337
|
+
return s0;
|
|
35338
|
+
}
|
|
35339
|
+
function peg$parseCardVariantDividerToken_V2() {
|
|
35340
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35341
|
+
s0 = peg$currPos;
|
|
35342
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35343
|
+
s1 = peg$c12;
|
|
35344
|
+
peg$currPos += 2;
|
|
35345
|
+
} else {
|
|
35346
|
+
s1 = peg$FAILED;
|
|
35347
|
+
if (peg$silentFails === 0) {
|
|
35348
|
+
peg$fail(peg$e14);
|
|
35349
|
+
}
|
|
35350
|
+
}
|
|
35351
|
+
if (s1 !== peg$FAILED) {
|
|
35352
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35353
|
+
s2 = peg$c10;
|
|
35354
|
+
peg$currPos++;
|
|
35355
|
+
} else {
|
|
35356
|
+
s2 = peg$FAILED;
|
|
35357
|
+
if (peg$silentFails === 0) {
|
|
35358
|
+
peg$fail(peg$e12);
|
|
35359
|
+
}
|
|
35360
|
+
}
|
|
35361
|
+
if (s2 !== peg$FAILED) {
|
|
35362
|
+
s3 = peg$parseQualifier();
|
|
35363
|
+
if (s3 !== peg$FAILED) {
|
|
35364
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35365
|
+
s4 = peg$c10;
|
|
35366
|
+
peg$currPos++;
|
|
35367
|
+
} else {
|
|
35368
|
+
s4 = peg$FAILED;
|
|
35369
|
+
if (peg$silentFails === 0) {
|
|
35370
|
+
peg$fail(peg$e12);
|
|
35371
|
+
}
|
|
34268
35372
|
}
|
|
34269
|
-
if (
|
|
34270
|
-
|
|
34271
|
-
|
|
35373
|
+
if (s4 !== peg$FAILED) {
|
|
35374
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35375
|
+
s5 = peg$c12;
|
|
35376
|
+
peg$currPos += 2;
|
|
35377
|
+
} else {
|
|
35378
|
+
s5 = peg$FAILED;
|
|
35379
|
+
if (peg$silentFails === 0) {
|
|
35380
|
+
peg$fail(peg$e14);
|
|
35381
|
+
}
|
|
35382
|
+
}
|
|
35383
|
+
if (s5 !== peg$FAILED) {
|
|
35384
|
+
s6 = peg$parseWNL();
|
|
35385
|
+
if (s6 === peg$FAILED) {
|
|
35386
|
+
s6 = peg$parseWEOL();
|
|
35387
|
+
}
|
|
35388
|
+
if (s6 !== peg$FAILED) {
|
|
35389
|
+
peg$savedPos = s0;
|
|
35390
|
+
s0 = peg$f28(s3);
|
|
35391
|
+
} else {
|
|
35392
|
+
peg$currPos = s0;
|
|
35393
|
+
s0 = peg$FAILED;
|
|
35394
|
+
}
|
|
35395
|
+
} else {
|
|
35396
|
+
peg$currPos = s0;
|
|
35397
|
+
s0 = peg$FAILED;
|
|
35398
|
+
}
|
|
34272
35399
|
} else {
|
|
34273
|
-
peg$currPos =
|
|
34274
|
-
|
|
35400
|
+
peg$currPos = s0;
|
|
35401
|
+
s0 = peg$FAILED;
|
|
34275
35402
|
}
|
|
34276
35403
|
} else {
|
|
34277
|
-
peg$currPos =
|
|
34278
|
-
|
|
35404
|
+
peg$currPos = s0;
|
|
35405
|
+
s0 = peg$FAILED;
|
|
34279
35406
|
}
|
|
34280
|
-
|
|
34281
|
-
|
|
35407
|
+
} else {
|
|
35408
|
+
peg$currPos = s0;
|
|
35409
|
+
s0 = peg$FAILED;
|
|
35410
|
+
}
|
|
35411
|
+
} else {
|
|
35412
|
+
peg$currPos = s0;
|
|
35413
|
+
s0 = peg$FAILED;
|
|
35414
|
+
}
|
|
35415
|
+
if (s0 === peg$FAILED) {
|
|
35416
|
+
s0 = peg$currPos;
|
|
35417
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35418
|
+
s1 = peg$c12;
|
|
35419
|
+
peg$currPos += 2;
|
|
35420
|
+
} else {
|
|
35421
|
+
s1 = peg$FAILED;
|
|
35422
|
+
if (peg$silentFails === 0) {
|
|
35423
|
+
peg$fail(peg$e14);
|
|
34282
35424
|
}
|
|
34283
35425
|
}
|
|
35426
|
+
if (s1 !== peg$FAILED) {
|
|
35427
|
+
s2 = peg$parseWNL();
|
|
35428
|
+
if (s2 === peg$FAILED) {
|
|
35429
|
+
s2 = peg$parseWEOL();
|
|
35430
|
+
}
|
|
35431
|
+
if (s2 !== peg$FAILED) {
|
|
35432
|
+
peg$savedPos = s0;
|
|
35433
|
+
s0 = peg$f29();
|
|
35434
|
+
} else {
|
|
35435
|
+
peg$currPos = s0;
|
|
35436
|
+
s0 = peg$FAILED;
|
|
35437
|
+
}
|
|
35438
|
+
} else {
|
|
35439
|
+
peg$currPos = s0;
|
|
35440
|
+
s0 = peg$FAILED;
|
|
35441
|
+
}
|
|
35442
|
+
}
|
|
35443
|
+
return s0;
|
|
35444
|
+
}
|
|
35445
|
+
function peg$parseCardDividerLookahead_V2() {
|
|
35446
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35447
|
+
s0 = peg$currPos;
|
|
35448
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35449
|
+
s1 = peg$c6;
|
|
35450
|
+
peg$currPos += 4;
|
|
35451
|
+
} else {
|
|
35452
|
+
s1 = peg$FAILED;
|
|
35453
|
+
if (peg$silentFails === 0) {
|
|
35454
|
+
peg$fail(peg$e8);
|
|
35455
|
+
}
|
|
34284
35456
|
}
|
|
34285
35457
|
if (s1 !== peg$FAILED) {
|
|
34286
|
-
|
|
34287
|
-
|
|
35458
|
+
s2 = peg$currPos;
|
|
35459
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35460
|
+
s3 = peg$c10;
|
|
35461
|
+
peg$currPos++;
|
|
35462
|
+
} else {
|
|
35463
|
+
s3 = peg$FAILED;
|
|
35464
|
+
if (peg$silentFails === 0) {
|
|
35465
|
+
peg$fail(peg$e12);
|
|
35466
|
+
}
|
|
35467
|
+
}
|
|
35468
|
+
if (s3 !== peg$FAILED) {
|
|
35469
|
+
s4 = peg$parseQualifier();
|
|
35470
|
+
if (s4 !== peg$FAILED) {
|
|
35471
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35472
|
+
s5 = peg$c10;
|
|
35473
|
+
peg$currPos++;
|
|
35474
|
+
} else {
|
|
35475
|
+
s5 = peg$FAILED;
|
|
35476
|
+
if (peg$silentFails === 0) {
|
|
35477
|
+
peg$fail(peg$e12);
|
|
35478
|
+
}
|
|
35479
|
+
}
|
|
35480
|
+
if (s5 !== peg$FAILED) {
|
|
35481
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35482
|
+
s6 = peg$c6;
|
|
35483
|
+
peg$currPos += 4;
|
|
35484
|
+
} else {
|
|
35485
|
+
s6 = peg$FAILED;
|
|
35486
|
+
if (peg$silentFails === 0) {
|
|
35487
|
+
peg$fail(peg$e8);
|
|
35488
|
+
}
|
|
35489
|
+
}
|
|
35490
|
+
if (s6 !== peg$FAILED) {
|
|
35491
|
+
s3 = [s3, s4, s5, s6];
|
|
35492
|
+
s2 = s3;
|
|
35493
|
+
} else {
|
|
35494
|
+
peg$currPos = s2;
|
|
35495
|
+
s2 = peg$FAILED;
|
|
35496
|
+
}
|
|
35497
|
+
} else {
|
|
35498
|
+
peg$currPos = s2;
|
|
35499
|
+
s2 = peg$FAILED;
|
|
35500
|
+
}
|
|
35501
|
+
} else {
|
|
35502
|
+
peg$currPos = s2;
|
|
35503
|
+
s2 = peg$FAILED;
|
|
35504
|
+
}
|
|
35505
|
+
} else {
|
|
35506
|
+
peg$currPos = s2;
|
|
35507
|
+
s2 = peg$FAILED;
|
|
35508
|
+
}
|
|
35509
|
+
if (s2 === peg$FAILED) {
|
|
35510
|
+
s2 = null;
|
|
35511
|
+
}
|
|
35512
|
+
s3 = peg$parseWNL();
|
|
35513
|
+
if (s3 === peg$FAILED) {
|
|
35514
|
+
s3 = peg$parseWEOL();
|
|
35515
|
+
}
|
|
35516
|
+
if (s3 !== peg$FAILED) {
|
|
35517
|
+
s1 = [s1, s2, s3];
|
|
35518
|
+
s0 = s1;
|
|
35519
|
+
} else {
|
|
35520
|
+
peg$currPos = s0;
|
|
35521
|
+
s0 = peg$FAILED;
|
|
35522
|
+
}
|
|
35523
|
+
} else {
|
|
35524
|
+
peg$currPos = s0;
|
|
35525
|
+
s0 = peg$FAILED;
|
|
34288
35526
|
}
|
|
34289
|
-
s0 = s1;
|
|
34290
35527
|
return s0;
|
|
34291
35528
|
}
|
|
34292
35529
|
function peg$parseCardLine_V2() {
|
|
@@ -34361,7 +35598,7 @@ function peg$parse2(input, options) {
|
|
|
34361
35598
|
}
|
|
34362
35599
|
if (s2 !== peg$FAILED) {
|
|
34363
35600
|
peg$savedPos = s0;
|
|
34364
|
-
s0 = peg$
|
|
35601
|
+
s0 = peg$f30(s2);
|
|
34365
35602
|
} else {
|
|
34366
35603
|
peg$currPos = s0;
|
|
34367
35604
|
s0 = peg$FAILED;
|
|
@@ -34398,7 +35635,7 @@ function peg$parse2(input, options) {
|
|
|
34398
35635
|
}
|
|
34399
35636
|
if (s1 !== peg$FAILED) {
|
|
34400
35637
|
peg$savedPos = s0;
|
|
34401
|
-
s1 = peg$
|
|
35638
|
+
s1 = peg$f31(s1);
|
|
34402
35639
|
}
|
|
34403
35640
|
s0 = s1;
|
|
34404
35641
|
return s0;
|
|
@@ -34406,18 +35643,33 @@ function peg$parse2(input, options) {
|
|
|
34406
35643
|
function peg$parseCardSetStart_V1() {
|
|
34407
35644
|
let s0, s1, s2, s3, s4, s5;
|
|
34408
35645
|
s0 = peg$currPos;
|
|
34409
|
-
s1 =
|
|
35646
|
+
s1 = [];
|
|
35647
|
+
s2 = peg$parseWNL();
|
|
35648
|
+
if (s2 === peg$FAILED) {
|
|
35649
|
+
s2 = peg$parseNL();
|
|
35650
|
+
}
|
|
35651
|
+
if (s2 !== peg$FAILED) {
|
|
35652
|
+
while (s2 !== peg$FAILED) {
|
|
35653
|
+
s1.push(s2);
|
|
35654
|
+
s2 = peg$parseWNL();
|
|
35655
|
+
if (s2 === peg$FAILED) {
|
|
35656
|
+
s2 = peg$parseNL();
|
|
35657
|
+
}
|
|
35658
|
+
}
|
|
35659
|
+
} else {
|
|
35660
|
+
s1 = peg$FAILED;
|
|
35661
|
+
}
|
|
34410
35662
|
if (s1 !== peg$FAILED) {
|
|
34411
35663
|
s2 = peg$currPos;
|
|
34412
35664
|
peg$silentFails++;
|
|
34413
35665
|
s3 = peg$currPos;
|
|
34414
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
34415
|
-
s4 = peg$
|
|
35666
|
+
if (input.substr(peg$currPos, 3) === peg$c13) {
|
|
35667
|
+
s4 = peg$c13;
|
|
34416
35668
|
peg$currPos += 3;
|
|
34417
35669
|
} else {
|
|
34418
35670
|
s4 = peg$FAILED;
|
|
34419
35671
|
if (peg$silentFails === 0) {
|
|
34420
|
-
peg$fail(peg$
|
|
35672
|
+
peg$fail(peg$e15);
|
|
34421
35673
|
}
|
|
34422
35674
|
}
|
|
34423
35675
|
if (s4 !== peg$FAILED) {
|
|
@@ -34442,7 +35694,7 @@ function peg$parse2(input, options) {
|
|
|
34442
35694
|
}
|
|
34443
35695
|
if (s2 !== peg$FAILED) {
|
|
34444
35696
|
peg$savedPos = s0;
|
|
34445
|
-
s0 = peg$
|
|
35697
|
+
s0 = peg$f32();
|
|
34446
35698
|
} else {
|
|
34447
35699
|
peg$currPos = s0;
|
|
34448
35700
|
s0 = peg$FAILED;
|
|
@@ -34480,7 +35732,7 @@ function peg$parse2(input, options) {
|
|
|
34480
35732
|
}
|
|
34481
35733
|
if (s1 !== peg$FAILED) {
|
|
34482
35734
|
peg$savedPos = s0;
|
|
34483
|
-
s1 = peg$
|
|
35735
|
+
s1 = peg$f33();
|
|
34484
35736
|
}
|
|
34485
35737
|
s0 = s1;
|
|
34486
35738
|
return s0;
|
|
@@ -34491,7 +35743,7 @@ function peg$parse2(input, options) {
|
|
|
34491
35743
|
s1 = peg$parseCardLineOrDivider_V1();
|
|
34492
35744
|
if (s1 !== peg$FAILED) {
|
|
34493
35745
|
peg$savedPos = s0;
|
|
34494
|
-
s1 = peg$
|
|
35746
|
+
s1 = peg$f34(s1);
|
|
34495
35747
|
}
|
|
34496
35748
|
s0 = s1;
|
|
34497
35749
|
return s0;
|
|
@@ -34500,13 +35752,13 @@ function peg$parse2(input, options) {
|
|
|
34500
35752
|
let s0, s1, s2, s3;
|
|
34501
35753
|
s0 = peg$currPos;
|
|
34502
35754
|
s1 = peg$currPos;
|
|
34503
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
34504
|
-
s2 = peg$
|
|
35755
|
+
if (input.substr(peg$currPos, 3) === peg$c13) {
|
|
35756
|
+
s2 = peg$c13;
|
|
34505
35757
|
peg$currPos += 3;
|
|
34506
35758
|
} else {
|
|
34507
35759
|
s2 = peg$FAILED;
|
|
34508
35760
|
if (peg$silentFails === 0) {
|
|
34509
|
-
peg$fail(peg$
|
|
35761
|
+
peg$fail(peg$e15);
|
|
34510
35762
|
}
|
|
34511
35763
|
}
|
|
34512
35764
|
if (s2 !== peg$FAILED) {
|
|
@@ -34527,13 +35779,13 @@ function peg$parse2(input, options) {
|
|
|
34527
35779
|
}
|
|
34528
35780
|
if (s1 === peg$FAILED) {
|
|
34529
35781
|
s1 = peg$currPos;
|
|
34530
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34531
|
-
s2 = peg$
|
|
35782
|
+
if (input.substr(peg$currPos, 2) === peg$c14) {
|
|
35783
|
+
s2 = peg$c14;
|
|
34532
35784
|
peg$currPos += 2;
|
|
34533
35785
|
} else {
|
|
34534
35786
|
s2 = peg$FAILED;
|
|
34535
35787
|
if (peg$silentFails === 0) {
|
|
34536
|
-
peg$fail(peg$
|
|
35788
|
+
peg$fail(peg$e16);
|
|
34537
35789
|
}
|
|
34538
35790
|
}
|
|
34539
35791
|
if (s2 !== peg$FAILED) {
|
|
@@ -34554,13 +35806,13 @@ function peg$parse2(input, options) {
|
|
|
34554
35806
|
}
|
|
34555
35807
|
if (s1 === peg$FAILED) {
|
|
34556
35808
|
s1 = peg$currPos;
|
|
34557
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34558
|
-
s2 = peg$
|
|
35809
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35810
|
+
s2 = peg$c11;
|
|
34559
35811
|
peg$currPos += 2;
|
|
34560
35812
|
} else {
|
|
34561
35813
|
s2 = peg$FAILED;
|
|
34562
35814
|
if (peg$silentFails === 0) {
|
|
34563
|
-
peg$fail(peg$
|
|
35815
|
+
peg$fail(peg$e13);
|
|
34564
35816
|
}
|
|
34565
35817
|
}
|
|
34566
35818
|
if (s2 !== peg$FAILED) {
|
|
@@ -34586,7 +35838,7 @@ function peg$parse2(input, options) {
|
|
|
34586
35838
|
}
|
|
34587
35839
|
if (s1 !== peg$FAILED) {
|
|
34588
35840
|
peg$savedPos = s0;
|
|
34589
|
-
s1 = peg$
|
|
35841
|
+
s1 = peg$f35(s1);
|
|
34590
35842
|
}
|
|
34591
35843
|
s0 = s1;
|
|
34592
35844
|
return s0;
|
|
@@ -34663,7 +35915,7 @@ function peg$parse2(input, options) {
|
|
|
34663
35915
|
}
|
|
34664
35916
|
if (s2 !== peg$FAILED) {
|
|
34665
35917
|
peg$savedPos = s0;
|
|
34666
|
-
s0 = peg$
|
|
35918
|
+
s0 = peg$f36(s2);
|
|
34667
35919
|
} else {
|
|
34668
35920
|
peg$currPos = s0;
|
|
34669
35921
|
s0 = peg$FAILED;
|
|
@@ -34674,6 +35926,102 @@ function peg$parse2(input, options) {
|
|
|
34674
35926
|
}
|
|
34675
35927
|
return s0;
|
|
34676
35928
|
}
|
|
35929
|
+
function peg$parseQualifier() {
|
|
35930
|
+
let s0, s1, s2;
|
|
35931
|
+
s0 = peg$currPos;
|
|
35932
|
+
s1 = peg$currPos;
|
|
35933
|
+
peg$silentFails++;
|
|
35934
|
+
if (input.substr(peg$currPos, 6) === peg$c9) {
|
|
35935
|
+
s2 = peg$c9;
|
|
35936
|
+
peg$currPos += 6;
|
|
35937
|
+
} else {
|
|
35938
|
+
s2 = peg$FAILED;
|
|
35939
|
+
if (peg$silentFails === 0) {
|
|
35940
|
+
peg$fail(peg$e11);
|
|
35941
|
+
}
|
|
35942
|
+
}
|
|
35943
|
+
if (s2 === peg$FAILED) {
|
|
35944
|
+
if (input.substr(peg$currPos, 4) === peg$c7) {
|
|
35945
|
+
s2 = peg$c7;
|
|
35946
|
+
peg$currPos += 4;
|
|
35947
|
+
} else {
|
|
35948
|
+
s2 = peg$FAILED;
|
|
35949
|
+
if (peg$silentFails === 0) {
|
|
35950
|
+
peg$fail(peg$e9);
|
|
35951
|
+
}
|
|
35952
|
+
}
|
|
35953
|
+
}
|
|
35954
|
+
peg$silentFails--;
|
|
35955
|
+
if (s2 === peg$FAILED) {
|
|
35956
|
+
s1 = void 0;
|
|
35957
|
+
} else {
|
|
35958
|
+
peg$currPos = s1;
|
|
35959
|
+
s1 = peg$FAILED;
|
|
35960
|
+
}
|
|
35961
|
+
if (s1 !== peg$FAILED) {
|
|
35962
|
+
s2 = peg$parseQualifierName();
|
|
35963
|
+
if (s2 !== peg$FAILED) {
|
|
35964
|
+
peg$savedPos = s0;
|
|
35965
|
+
s0 = peg$f37(s2);
|
|
35966
|
+
} else {
|
|
35967
|
+
peg$currPos = s0;
|
|
35968
|
+
s0 = peg$FAILED;
|
|
35969
|
+
}
|
|
35970
|
+
} else {
|
|
35971
|
+
peg$currPos = s0;
|
|
35972
|
+
s0 = peg$FAILED;
|
|
35973
|
+
}
|
|
35974
|
+
return s0;
|
|
35975
|
+
}
|
|
35976
|
+
function peg$parseQualifierName() {
|
|
35977
|
+
let s0, s1, s2, s3, s4;
|
|
35978
|
+
s0 = peg$currPos;
|
|
35979
|
+
s1 = peg$currPos;
|
|
35980
|
+
s2 = input.charAt(peg$currPos);
|
|
35981
|
+
if (peg$r1.test(s2)) {
|
|
35982
|
+
peg$currPos++;
|
|
35983
|
+
} else {
|
|
35984
|
+
s2 = peg$FAILED;
|
|
35985
|
+
if (peg$silentFails === 0) {
|
|
35986
|
+
peg$fail(peg$e17);
|
|
35987
|
+
}
|
|
35988
|
+
}
|
|
35989
|
+
if (s2 !== peg$FAILED) {
|
|
35990
|
+
s3 = [];
|
|
35991
|
+
s4 = input.charAt(peg$currPos);
|
|
35992
|
+
if (peg$r2.test(s4)) {
|
|
35993
|
+
peg$currPos++;
|
|
35994
|
+
} else {
|
|
35995
|
+
s4 = peg$FAILED;
|
|
35996
|
+
if (peg$silentFails === 0) {
|
|
35997
|
+
peg$fail(peg$e18);
|
|
35998
|
+
}
|
|
35999
|
+
}
|
|
36000
|
+
while (s4 !== peg$FAILED) {
|
|
36001
|
+
s3.push(s4);
|
|
36002
|
+
s4 = input.charAt(peg$currPos);
|
|
36003
|
+
if (peg$r2.test(s4)) {
|
|
36004
|
+
peg$currPos++;
|
|
36005
|
+
} else {
|
|
36006
|
+
s4 = peg$FAILED;
|
|
36007
|
+
if (peg$silentFails === 0) {
|
|
36008
|
+
peg$fail(peg$e18);
|
|
36009
|
+
}
|
|
36010
|
+
}
|
|
36011
|
+
}
|
|
36012
|
+
s2 = [s2, s3];
|
|
36013
|
+
s1 = s2;
|
|
36014
|
+
} else {
|
|
36015
|
+
peg$currPos = s1;
|
|
36016
|
+
s1 = peg$FAILED;
|
|
36017
|
+
}
|
|
36018
|
+
if (s1 !== peg$FAILED) {
|
|
36019
|
+
s0 = input.substring(s0, peg$currPos);
|
|
36020
|
+
} else {
|
|
36021
|
+
s0 = s1;
|
|
36022
|
+
}
|
|
36023
|
+
return s0;
|
|
36024
|
+
}
|
|
34677
36025
|
function peg$parsecardContent() {
|
|
34678
36026
|
let s0, s1, s2;
|
|
34679
36027
|
s0 = peg$currPos;
|
|
@@ -34690,7 +36038,7 @@ function peg$parse2(input, options) {
|
|
|
34690
36038
|
}
|
|
34691
36039
|
}
|
|
34692
36040
|
peg$savedPos = s0;
|
|
34693
|
-
s1 = peg$
|
|
36041
|
+
s1 = peg$f38(s1);
|
|
34694
36042
|
s0 = s1;
|
|
34695
36043
|
return s0;
|
|
34696
36044
|
}
|
|
@@ -34708,7 +36056,7 @@ function peg$parse2(input, options) {
|
|
|
34708
36056
|
}
|
|
34709
36057
|
if (s1 !== peg$FAILED) {
|
|
34710
36058
|
peg$savedPos = s0;
|
|
34711
|
-
s1 = peg$
|
|
36059
|
+
s1 = peg$f39(s1);
|
|
34712
36060
|
}
|
|
34713
36061
|
s0 = s1;
|
|
34714
36062
|
return s0;
|
|
@@ -34716,13 +36064,13 @@ function peg$parse2(input, options) {
|
|
|
34716
36064
|
function peg$parseIDTag() {
|
|
34717
36065
|
let s0, s1, s2, s3;
|
|
34718
36066
|
s0 = peg$currPos;
|
|
34719
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
34720
|
-
s1 = peg$
|
|
36067
|
+
if (input.substr(peg$currPos, 4) === peg$c15) {
|
|
36068
|
+
s1 = peg$c15;
|
|
34721
36069
|
peg$currPos += 4;
|
|
34722
36070
|
} else {
|
|
34723
36071
|
s1 = peg$FAILED;
|
|
34724
36072
|
if (peg$silentFails === 0) {
|
|
34725
|
-
peg$fail(peg$
|
|
36073
|
+
peg$fail(peg$e19);
|
|
34726
36074
|
}
|
|
34727
36075
|
}
|
|
34728
36076
|
if (s1 !== peg$FAILED) {
|
|
@@ -34731,7 +36079,7 @@ function peg$parse2(input, options) {
|
|
|
34731
36079
|
s3 = peg$parseTag_Close();
|
|
34732
36080
|
if (s3 !== peg$FAILED) {
|
|
34733
36081
|
peg$savedPos = s0;
|
|
34734
|
-
s0 = peg$
|
|
36082
|
+
s0 = peg$f40(s2);
|
|
34735
36083
|
} else {
|
|
34736
36084
|
peg$currPos = s0;
|
|
34737
36085
|
s0 = peg$FAILED;
|
|
@@ -34761,24 +36109,24 @@ function peg$parse2(input, options) {
|
|
|
34761
36109
|
if (s1 !== peg$FAILED) {
|
|
34762
36110
|
s2 = [];
|
|
34763
36111
|
if (input.charCodeAt(peg$currPos) === 35) {
|
|
34764
|
-
s3 = peg$
|
|
36112
|
+
s3 = peg$c16;
|
|
34765
36113
|
peg$currPos++;
|
|
34766
36114
|
} else {
|
|
34767
36115
|
s3 = peg$FAILED;
|
|
34768
36116
|
if (peg$silentFails === 0) {
|
|
34769
|
-
peg$fail(peg$
|
|
36117
|
+
peg$fail(peg$e20);
|
|
34770
36118
|
}
|
|
34771
36119
|
}
|
|
34772
36120
|
if (s3 !== peg$FAILED) {
|
|
34773
36121
|
while (s3 !== peg$FAILED) {
|
|
34774
36122
|
s2.push(s3);
|
|
34775
36123
|
if (input.charCodeAt(peg$currPos) === 35) {
|
|
34776
|
-
s3 = peg$
|
|
36124
|
+
s3 = peg$c16;
|
|
34777
36125
|
peg$currPos++;
|
|
34778
36126
|
} else {
|
|
34779
36127
|
s3 = peg$FAILED;
|
|
34780
36128
|
if (peg$silentFails === 0) {
|
|
34781
|
-
peg$fail(peg$
|
|
36129
|
+
peg$fail(peg$e20);
|
|
34782
36130
|
}
|
|
34783
36131
|
}
|
|
34784
36132
|
}
|
|
@@ -34790,7 +36138,7 @@ function peg$parse2(input, options) {
|
|
|
34790
36138
|
s4 = peg$parseTag_CloseOrEOF();
|
|
34791
36139
|
if (s4 !== peg$FAILED) {
|
|
34792
36140
|
peg$savedPos = s0;
|
|
34793
|
-
s0 = peg$
|
|
36141
|
+
s0 = peg$f41(s2, s3);
|
|
34794
36142
|
} else {
|
|
34795
36143
|
peg$currPos = s0;
|
|
34796
36144
|
s0 = peg$FAILED;
|
|
@@ -34808,13 +36156,13 @@ function peg$parse2(input, options) {
|
|
|
34808
36156
|
function peg$parseAnchorTag() {
|
|
34809
36157
|
let s0, s1, s2, s3;
|
|
34810
36158
|
s0 = peg$currPos;
|
|
34811
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34812
|
-
s1 = peg$
|
|
36159
|
+
if (input.substr(peg$currPos, 2) === peg$c17) {
|
|
36160
|
+
s1 = peg$c17;
|
|
34813
36161
|
peg$currPos += 2;
|
|
34814
36162
|
} else {
|
|
34815
36163
|
s1 = peg$FAILED;
|
|
34816
36164
|
if (peg$silentFails === 0) {
|
|
34817
|
-
peg$fail(peg$
|
|
36165
|
+
peg$fail(peg$e21);
|
|
34818
36166
|
}
|
|
34819
36167
|
}
|
|
34820
36168
|
if (s1 !== peg$FAILED) {
|
|
@@ -34822,7 +36170,7 @@ function peg$parse2(input, options) {
|
|
|
34822
36170
|
s3 = peg$parseTag_CloseOrEOF();
|
|
34823
36171
|
if (s3 !== peg$FAILED) {
|
|
34824
36172
|
peg$savedPos = s0;
|
|
34825
|
-
s0 = peg$
|
|
36173
|
+
s0 = peg$f42(s2);
|
|
34826
36174
|
} else {
|
|
34827
36175
|
peg$currPos = s0;
|
|
34828
36176
|
s0 = peg$FAILED;
|
|
@@ -34836,13 +36184,13 @@ function peg$parse2(input, options) {
|
|
|
34836
36184
|
function peg$parseReferenceTag() {
|
|
34837
36185
|
let s0, s1, s2, s3;
|
|
34838
36186
|
s0 = peg$currPos;
|
|
34839
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34840
|
-
s1 = peg$
|
|
36187
|
+
if (input.substr(peg$currPos, 2) === peg$c18) {
|
|
36188
|
+
s1 = peg$c18;
|
|
34841
36189
|
peg$currPos += 2;
|
|
34842
36190
|
} else {
|
|
34843
36191
|
s1 = peg$FAILED;
|
|
34844
36192
|
if (peg$silentFails === 0) {
|
|
34845
|
-
peg$fail(peg$
|
|
36193
|
+
peg$fail(peg$e22);
|
|
34846
36194
|
}
|
|
34847
36195
|
}
|
|
34848
36196
|
if (s1 !== peg$FAILED) {
|
|
@@ -34850,7 +36198,7 @@ function peg$parse2(input, options) {
|
|
|
34850
36198
|
s3 = peg$parseTag_CloseOrEOF();
|
|
34851
36199
|
if (s3 !== peg$FAILED) {
|
|
34852
36200
|
peg$savedPos = s0;
|
|
34853
|
-
s0 = peg$
|
|
36201
|
+
s0 = peg$f43(s2);
|
|
34854
36202
|
} else {
|
|
34855
36203
|
peg$currPos = s0;
|
|
34856
36204
|
s0 = peg$FAILED;
|
|
@@ -34864,13 +36212,13 @@ function peg$parse2(input, options) {
|
|
|
34864
36212
|
function peg$parsePropertyTag() {
|
|
34865
36213
|
let s0, s1, s2, s3, s4;
|
|
34866
36214
|
s0 = peg$currPos;
|
|
34867
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34868
|
-
s1 = peg$
|
|
36215
|
+
if (input.substr(peg$currPos, 2) === peg$c19) {
|
|
36216
|
+
s1 = peg$c19;
|
|
34869
36217
|
peg$currPos += 2;
|
|
34870
36218
|
} else {
|
|
34871
36219
|
s1 = peg$FAILED;
|
|
34872
36220
|
if (peg$silentFails === 0) {
|
|
34873
|
-
peg$fail(peg$
|
|
36221
|
+
peg$fail(peg$e23);
|
|
34874
36222
|
}
|
|
34875
36223
|
}
|
|
34876
36224
|
if (s1 !== peg$FAILED) {
|
|
@@ -34881,7 +36229,7 @@ function peg$parse2(input, options) {
|
|
|
34881
36229
|
s4 = peg$parseTag_CloseOrEOF();
|
|
34882
36230
|
if (s4 !== peg$FAILED) {
|
|
34883
36231
|
peg$savedPos = s0;
|
|
34884
|
-
s0 = peg$
|
|
36232
|
+
s0 = peg$f44(s2, s3);
|
|
34885
36233
|
} else {
|
|
34886
36234
|
peg$currPos = s0;
|
|
34887
36235
|
s0 = peg$FAILED;
|
|
@@ -34903,13 +36251,13 @@ function peg$parse2(input, options) {
|
|
|
34903
36251
|
function peg$parseItemLeadTag() {
|
|
34904
36252
|
let s0, s1, s2, s3;
|
|
34905
36253
|
s0 = peg$currPos;
|
|
34906
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34907
|
-
s1 = peg$
|
|
36254
|
+
if (input.substr(peg$currPos, 2) === peg$c20) {
|
|
36255
|
+
s1 = peg$c20;
|
|
34908
36256
|
peg$currPos += 2;
|
|
34909
36257
|
} else {
|
|
34910
36258
|
s1 = peg$FAILED;
|
|
34911
36259
|
if (peg$silentFails === 0) {
|
|
34912
|
-
peg$fail(peg$
|
|
36260
|
+
peg$fail(peg$e24);
|
|
34913
36261
|
}
|
|
34914
36262
|
}
|
|
34915
36263
|
if (s1 !== peg$FAILED) {
|
|
@@ -34917,7 +36265,7 @@ function peg$parse2(input, options) {
|
|
|
34917
36265
|
s3 = peg$parseTag_CloseOrEOF();
|
|
34918
36266
|
if (s3 !== peg$FAILED) {
|
|
34919
36267
|
peg$savedPos = s0;
|
|
34920
|
-
s0 = peg$
|
|
36268
|
+
s0 = peg$f45(s2);
|
|
34921
36269
|
} else {
|
|
34922
36270
|
peg$currPos = s0;
|
|
34923
36271
|
s0 = peg$FAILED;
|
|
@@ -34931,13 +36279,13 @@ function peg$parse2(input, options) {
|
|
|
34931
36279
|
function peg$parseInstructionTag() {
|
|
34932
36280
|
let s0, s1, s2, s3;
|
|
34933
36281
|
s0 = peg$currPos;
|
|
34934
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34935
|
-
s1 = peg$
|
|
36282
|
+
if (input.substr(peg$currPos, 2) === peg$c21) {
|
|
36283
|
+
s1 = peg$c21;
|
|
34936
36284
|
peg$currPos += 2;
|
|
34937
36285
|
} else {
|
|
34938
36286
|
s1 = peg$FAILED;
|
|
34939
36287
|
if (peg$silentFails === 0) {
|
|
34940
|
-
peg$fail(peg$
|
|
36288
|
+
peg$fail(peg$e25);
|
|
34941
36289
|
}
|
|
34942
36290
|
}
|
|
34943
36291
|
if (s1 !== peg$FAILED) {
|
|
@@ -34945,7 +36293,7 @@ function peg$parse2(input, options) {
|
|
|
34945
36293
|
s3 = peg$parseTag_CloseOrEOF();
|
|
34946
36294
|
if (s3 !== peg$FAILED) {
|
|
34947
36295
|
peg$savedPos = s0;
|
|
34948
|
-
s0 = peg$
|
|
36296
|
+
s0 = peg$f46(s2);
|
|
34949
36297
|
} else {
|
|
34950
36298
|
peg$currPos = s0;
|
|
34951
36299
|
s0 = peg$FAILED;
|
|
@@ -34959,13 +36307,13 @@ function peg$parse2(input, options) {
|
|
|
34959
36307
|
function peg$parseHintTag() {
|
|
34960
36308
|
let s0, s1, s2, s3;
|
|
34961
36309
|
s0 = peg$currPos;
|
|
34962
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34963
|
-
s1 = peg$
|
|
36310
|
+
if (input.substr(peg$currPos, 2) === peg$c22) {
|
|
36311
|
+
s1 = peg$c22;
|
|
34964
36312
|
peg$currPos += 2;
|
|
34965
36313
|
} else {
|
|
34966
36314
|
s1 = peg$FAILED;
|
|
34967
36315
|
if (peg$silentFails === 0) {
|
|
34968
|
-
peg$fail(peg$
|
|
36316
|
+
peg$fail(peg$e26);
|
|
34969
36317
|
}
|
|
34970
36318
|
}
|
|
34971
36319
|
if (s1 !== peg$FAILED) {
|
|
@@ -34973,7 +36321,7 @@ function peg$parse2(input, options) {
|
|
|
34973
36321
|
s3 = peg$parseTag_CloseOrEOF();
|
|
34974
36322
|
if (s3 !== peg$FAILED) {
|
|
34975
36323
|
peg$savedPos = s0;
|
|
34976
|
-
s0 = peg$
|
|
36324
|
+
s0 = peg$f47(s2);
|
|
34977
36325
|
} else {
|
|
34978
36326
|
peg$currPos = s0;
|
|
34979
36327
|
s0 = peg$FAILED;
|
|
@@ -34987,13 +36335,13 @@ function peg$parse2(input, options) {
|
|
|
34987
36335
|
function peg$parseTrueTag() {
|
|
34988
36336
|
let s0, s1, s2, s3;
|
|
34989
36337
|
s0 = peg$currPos;
|
|
34990
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34991
|
-
s1 = peg$
|
|
36338
|
+
if (input.substr(peg$currPos, 2) === peg$c23) {
|
|
36339
|
+
s1 = peg$c23;
|
|
34992
36340
|
peg$currPos += 2;
|
|
34993
36341
|
} else {
|
|
34994
36342
|
s1 = peg$FAILED;
|
|
34995
36343
|
if (peg$silentFails === 0) {
|
|
34996
|
-
peg$fail(peg$
|
|
36344
|
+
peg$fail(peg$e27);
|
|
34997
36345
|
}
|
|
34998
36346
|
}
|
|
34999
36347
|
if (s1 !== peg$FAILED) {
|
|
@@ -35001,7 +36349,7 @@ function peg$parse2(input, options) {
|
|
|
35001
36349
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35002
36350
|
if (s3 !== peg$FAILED) {
|
|
35003
36351
|
peg$savedPos = s0;
|
|
35004
|
-
s0 = peg$
|
|
36352
|
+
s0 = peg$f48(s2);
|
|
35005
36353
|
} else {
|
|
35006
36354
|
peg$currPos = s0;
|
|
35007
36355
|
s0 = peg$FAILED;
|
|
@@ -35015,13 +36363,13 @@ function peg$parse2(input, options) {
|
|
|
35015
36363
|
function peg$parseFalseTag() {
|
|
35016
36364
|
let s0, s1, s2, s3;
|
|
35017
36365
|
s0 = peg$currPos;
|
|
35018
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35019
|
-
s1 = peg$
|
|
36366
|
+
if (input.substr(peg$currPos, 2) === peg$c24) {
|
|
36367
|
+
s1 = peg$c24;
|
|
35020
36368
|
peg$currPos += 2;
|
|
35021
36369
|
} else {
|
|
35022
36370
|
s1 = peg$FAILED;
|
|
35023
36371
|
if (peg$silentFails === 0) {
|
|
35024
|
-
peg$fail(peg$
|
|
36372
|
+
peg$fail(peg$e28);
|
|
35025
36373
|
}
|
|
35026
36374
|
}
|
|
35027
36375
|
if (s1 !== peg$FAILED) {
|
|
@@ -35029,7 +36377,7 @@ function peg$parse2(input, options) {
|
|
|
35029
36377
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35030
36378
|
if (s3 !== peg$FAILED) {
|
|
35031
36379
|
peg$savedPos = s0;
|
|
35032
|
-
s0 = peg$
|
|
36380
|
+
s0 = peg$f49(s2);
|
|
35033
36381
|
} else {
|
|
35034
36382
|
peg$currPos = s0;
|
|
35035
36383
|
s0 = peg$FAILED;
|
|
@@ -35043,13 +36391,13 @@ function peg$parse2(input, options) {
|
|
|
35043
36391
|
function peg$parseSampleSolutionTag() {
|
|
35044
36392
|
let s0, s1, s2, s3;
|
|
35045
36393
|
s0 = peg$currPos;
|
|
35046
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35047
|
-
s1 = peg$
|
|
36394
|
+
if (input.substr(peg$currPos, 2) === peg$c25) {
|
|
36395
|
+
s1 = peg$c25;
|
|
35048
36396
|
peg$currPos += 2;
|
|
35049
36397
|
} else {
|
|
35050
36398
|
s1 = peg$FAILED;
|
|
35051
36399
|
if (peg$silentFails === 0) {
|
|
35052
|
-
peg$fail(peg$
|
|
36400
|
+
peg$fail(peg$e29);
|
|
35053
36401
|
}
|
|
35054
36402
|
}
|
|
35055
36403
|
if (s1 !== peg$FAILED) {
|
|
@@ -35057,7 +36405,7 @@ function peg$parse2(input, options) {
|
|
|
35057
36405
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35058
36406
|
if (s3 !== peg$FAILED) {
|
|
35059
36407
|
peg$savedPos = s0;
|
|
35060
|
-
s0 = peg$
|
|
36408
|
+
s0 = peg$f50(s2);
|
|
35061
36409
|
} else {
|
|
35062
36410
|
peg$currPos = s0;
|
|
35063
36411
|
s0 = peg$FAILED;
|
|
@@ -35071,13 +36419,13 @@ function peg$parse2(input, options) {
|
|
|
35071
36419
|
function peg$parseGapTag() {
|
|
35072
36420
|
let s0, s1, s2, s3;
|
|
35073
36421
|
s0 = peg$currPos;
|
|
35074
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35075
|
-
s1 = peg$
|
|
36422
|
+
if (input.substr(peg$currPos, 2) === peg$c26) {
|
|
36423
|
+
s1 = peg$c26;
|
|
35076
36424
|
peg$currPos += 2;
|
|
35077
36425
|
} else {
|
|
35078
36426
|
s1 = peg$FAILED;
|
|
35079
36427
|
if (peg$silentFails === 0) {
|
|
35080
|
-
peg$fail(peg$
|
|
36428
|
+
peg$fail(peg$e30);
|
|
35081
36429
|
}
|
|
35082
36430
|
}
|
|
35083
36431
|
if (s1 !== peg$FAILED) {
|
|
@@ -35085,7 +36433,7 @@ function peg$parse2(input, options) {
|
|
|
35085
36433
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35086
36434
|
if (s3 !== peg$FAILED) {
|
|
35087
36435
|
peg$savedPos = s0;
|
|
35088
|
-
s0 = peg$
|
|
36436
|
+
s0 = peg$f51(s2);
|
|
35089
36437
|
} else {
|
|
35090
36438
|
peg$currPos = s0;
|
|
35091
36439
|
s0 = peg$FAILED;
|
|
@@ -35099,13 +36447,13 @@ function peg$parse2(input, options) {
|
|
|
35099
36447
|
function peg$parseMarkTag() {
|
|
35100
36448
|
let s0, s1, s2, s3;
|
|
35101
36449
|
s0 = peg$currPos;
|
|
35102
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35103
|
-
s1 = peg$
|
|
36450
|
+
if (input.substr(peg$currPos, 2) === peg$c27) {
|
|
36451
|
+
s1 = peg$c27;
|
|
35104
36452
|
peg$currPos += 2;
|
|
35105
36453
|
} else {
|
|
35106
36454
|
s1 = peg$FAILED;
|
|
35107
36455
|
if (peg$silentFails === 0) {
|
|
35108
|
-
peg$fail(peg$
|
|
36456
|
+
peg$fail(peg$e31);
|
|
35109
36457
|
}
|
|
35110
36458
|
}
|
|
35111
36459
|
if (s1 !== peg$FAILED) {
|
|
@@ -35113,7 +36461,7 @@ function peg$parse2(input, options) {
|
|
|
35113
36461
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35114
36462
|
if (s3 !== peg$FAILED) {
|
|
35115
36463
|
peg$savedPos = s0;
|
|
35116
|
-
s0 = peg$
|
|
36464
|
+
s0 = peg$f52(s2);
|
|
35117
36465
|
} else {
|
|
35118
36466
|
peg$currPos = s0;
|
|
35119
36467
|
s0 = peg$FAILED;
|
|
@@ -35127,13 +36475,13 @@ function peg$parse2(input, options) {
|
|
|
35127
36475
|
function peg$parseResourceTag() {
|
|
35128
36476
|
let s0, s1, s2, s3, s4;
|
|
35129
36477
|
s0 = peg$currPos;
|
|
35130
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35131
|
-
s1 = peg$
|
|
36478
|
+
if (input.substr(peg$currPos, 2) === peg$c28) {
|
|
36479
|
+
s1 = peg$c28;
|
|
35132
36480
|
peg$currPos += 2;
|
|
35133
36481
|
} else {
|
|
35134
36482
|
s1 = peg$FAILED;
|
|
35135
36483
|
if (peg$silentFails === 0) {
|
|
35136
|
-
peg$fail(peg$
|
|
36484
|
+
peg$fail(peg$e32);
|
|
35137
36485
|
}
|
|
35138
36486
|
}
|
|
35139
36487
|
if (s1 !== peg$FAILED) {
|
|
@@ -35144,7 +36492,7 @@ function peg$parse2(input, options) {
|
|
|
35144
36492
|
s4 = peg$parseTag_CloseOrEOF();
|
|
35145
36493
|
if (s4 !== peg$FAILED) {
|
|
35146
36494
|
peg$savedPos = s0;
|
|
35147
|
-
s0 = peg$
|
|
36495
|
+
s0 = peg$f53(s2, s3);
|
|
35148
36496
|
} else {
|
|
35149
36497
|
peg$currPos = s0;
|
|
35150
36498
|
s0 = peg$FAILED;
|
|
@@ -35168,13 +36516,13 @@ function peg$parse2(input, options) {
|
|
|
35168
36516
|
s0 = peg$currPos;
|
|
35169
36517
|
s1 = peg$currPos;
|
|
35170
36518
|
s2 = [];
|
|
35171
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35172
|
-
s3 = peg$
|
|
36519
|
+
if (input.substr(peg$currPos, 2) === peg$c29) {
|
|
36520
|
+
s3 = peg$c29;
|
|
35173
36521
|
peg$currPos += 2;
|
|
35174
36522
|
} else {
|
|
35175
36523
|
s3 = peg$FAILED;
|
|
35176
36524
|
if (peg$silentFails === 0) {
|
|
35177
|
-
peg$fail(peg$
|
|
36525
|
+
peg$fail(peg$e33);
|
|
35178
36526
|
}
|
|
35179
36527
|
}
|
|
35180
36528
|
if (s3 === peg$FAILED) {
|
|
@@ -35190,13 +36538,13 @@ function peg$parse2(input, options) {
|
|
|
35190
36538
|
}
|
|
35191
36539
|
while (s3 !== peg$FAILED) {
|
|
35192
36540
|
s2.push(s3);
|
|
35193
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35194
|
-
s3 = peg$
|
|
36541
|
+
if (input.substr(peg$currPos, 2) === peg$c29) {
|
|
36542
|
+
s3 = peg$c29;
|
|
35195
36543
|
peg$currPos += 2;
|
|
35196
36544
|
} else {
|
|
35197
36545
|
s3 = peg$FAILED;
|
|
35198
36546
|
if (peg$silentFails === 0) {
|
|
35199
|
-
peg$fail(peg$
|
|
36547
|
+
peg$fail(peg$e33);
|
|
35200
36548
|
}
|
|
35201
36549
|
}
|
|
35202
36550
|
if (s3 === peg$FAILED) {
|
|
@@ -35213,7 +36561,7 @@ function peg$parse2(input, options) {
|
|
|
35213
36561
|
}
|
|
35214
36562
|
s1 = input.substring(s1, peg$currPos);
|
|
35215
36563
|
peg$savedPos = s0;
|
|
35216
|
-
s1 = peg$
|
|
36564
|
+
s1 = peg$f54(s1);
|
|
35217
36565
|
s0 = s1;
|
|
35218
36566
|
return s0;
|
|
35219
36567
|
}
|
|
@@ -35222,13 +36570,13 @@ function peg$parse2(input, options) {
|
|
|
35222
36570
|
s0 = peg$currPos;
|
|
35223
36571
|
s1 = peg$currPos;
|
|
35224
36572
|
peg$silentFails++;
|
|
35225
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
35226
|
-
s2 = peg$
|
|
36573
|
+
if (input.substr(peg$currPos, 3) === peg$c30) {
|
|
36574
|
+
s2 = peg$c30;
|
|
35227
36575
|
peg$currPos += 3;
|
|
35228
36576
|
} else {
|
|
35229
36577
|
s2 = peg$FAILED;
|
|
35230
36578
|
if (peg$silentFails === 0) {
|
|
35231
|
-
peg$fail(peg$
|
|
36579
|
+
peg$fail(peg$e34);
|
|
35232
36580
|
}
|
|
35233
36581
|
}
|
|
35234
36582
|
peg$silentFails--;
|
|
@@ -35242,29 +36590,29 @@ function peg$parse2(input, options) {
|
|
|
35242
36590
|
s2 = peg$currPos;
|
|
35243
36591
|
s3 = [];
|
|
35244
36592
|
s4 = input.charAt(peg$currPos);
|
|
35245
|
-
if (peg$
|
|
36593
|
+
if (peg$r3.test(s4)) {
|
|
35246
36594
|
peg$currPos++;
|
|
35247
36595
|
} else {
|
|
35248
36596
|
s4 = peg$FAILED;
|
|
35249
36597
|
if (peg$silentFails === 0) {
|
|
35250
|
-
peg$fail(peg$
|
|
36598
|
+
peg$fail(peg$e35);
|
|
35251
36599
|
}
|
|
35252
36600
|
}
|
|
35253
36601
|
while (s4 !== peg$FAILED) {
|
|
35254
36602
|
s3.push(s4);
|
|
35255
36603
|
s4 = input.charAt(peg$currPos);
|
|
35256
|
-
if (peg$
|
|
36604
|
+
if (peg$r3.test(s4)) {
|
|
35257
36605
|
peg$currPos++;
|
|
35258
36606
|
} else {
|
|
35259
36607
|
s4 = peg$FAILED;
|
|
35260
36608
|
if (peg$silentFails === 0) {
|
|
35261
|
-
peg$fail(peg$
|
|
36609
|
+
peg$fail(peg$e35);
|
|
35262
36610
|
}
|
|
35263
36611
|
}
|
|
35264
36612
|
}
|
|
35265
36613
|
s2 = input.substring(s2, peg$currPos);
|
|
35266
36614
|
peg$savedPos = s0;
|
|
35267
|
-
s0 = peg$
|
|
36615
|
+
s0 = peg$f55(s2);
|
|
35268
36616
|
} else {
|
|
35269
36617
|
peg$currPos = s0;
|
|
35270
36618
|
s0 = peg$FAILED;
|
|
@@ -35319,24 +36667,24 @@ function peg$parse2(input, options) {
|
|
|
35319
36667
|
s0 = peg$currPos;
|
|
35320
36668
|
s1 = [];
|
|
35321
36669
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
35322
|
-
s2 = peg$
|
|
36670
|
+
s2 = peg$c31;
|
|
35323
36671
|
peg$currPos++;
|
|
35324
36672
|
} else {
|
|
35325
36673
|
s2 = peg$FAILED;
|
|
35326
36674
|
if (peg$silentFails === 0) {
|
|
35327
|
-
peg$fail(peg$
|
|
36675
|
+
peg$fail(peg$e36);
|
|
35328
36676
|
}
|
|
35329
36677
|
}
|
|
35330
36678
|
if (s2 !== peg$FAILED) {
|
|
35331
36679
|
while (s2 !== peg$FAILED) {
|
|
35332
36680
|
s1.push(s2);
|
|
35333
36681
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
35334
|
-
s2 = peg$
|
|
36682
|
+
s2 = peg$c31;
|
|
35335
36683
|
peg$currPos++;
|
|
35336
36684
|
} else {
|
|
35337
36685
|
s2 = peg$FAILED;
|
|
35338
36686
|
if (peg$silentFails === 0) {
|
|
35339
|
-
peg$fail(peg$
|
|
36687
|
+
peg$fail(peg$e36);
|
|
35340
36688
|
}
|
|
35341
36689
|
}
|
|
35342
36690
|
}
|
|
@@ -35345,7 +36693,7 @@ function peg$parse2(input, options) {
|
|
|
35345
36693
|
}
|
|
35346
36694
|
if (s1 !== peg$FAILED) {
|
|
35347
36695
|
peg$savedPos = s0;
|
|
35348
|
-
s1 = peg$
|
|
36696
|
+
s1 = peg$f56(s1);
|
|
35349
36697
|
}
|
|
35350
36698
|
s0 = s1;
|
|
35351
36699
|
return s0;
|
|
@@ -35356,29 +36704,29 @@ function peg$parse2(input, options) {
|
|
|
35356
36704
|
s1 = peg$currPos;
|
|
35357
36705
|
s2 = [];
|
|
35358
36706
|
s3 = input.charAt(peg$currPos);
|
|
35359
|
-
if (peg$
|
|
36707
|
+
if (peg$r4.test(s3)) {
|
|
35360
36708
|
peg$currPos++;
|
|
35361
36709
|
} else {
|
|
35362
36710
|
s3 = peg$FAILED;
|
|
35363
36711
|
if (peg$silentFails === 0) {
|
|
35364
|
-
peg$fail(peg$
|
|
36712
|
+
peg$fail(peg$e37);
|
|
35365
36713
|
}
|
|
35366
36714
|
}
|
|
35367
36715
|
while (s3 !== peg$FAILED) {
|
|
35368
36716
|
s2.push(s3);
|
|
35369
36717
|
s3 = input.charAt(peg$currPos);
|
|
35370
|
-
if (peg$
|
|
36718
|
+
if (peg$r4.test(s3)) {
|
|
35371
36719
|
peg$currPos++;
|
|
35372
36720
|
} else {
|
|
35373
36721
|
s3 = peg$FAILED;
|
|
35374
36722
|
if (peg$silentFails === 0) {
|
|
35375
|
-
peg$fail(peg$
|
|
36723
|
+
peg$fail(peg$e37);
|
|
35376
36724
|
}
|
|
35377
36725
|
}
|
|
35378
36726
|
}
|
|
35379
36727
|
s1 = input.substring(s1, peg$currPos);
|
|
35380
36728
|
peg$savedPos = s0;
|
|
35381
|
-
s1 = peg$
|
|
36729
|
+
s1 = peg$f57(s1);
|
|
35382
36730
|
s0 = s1;
|
|
35383
36731
|
return s0;
|
|
35384
36732
|
}
|
|
@@ -35397,7 +36745,7 @@ function peg$parse2(input, options) {
|
|
|
35397
36745
|
if (s1 !== peg$FAILED) {
|
|
35398
36746
|
s2 = peg$parseTag_Value();
|
|
35399
36747
|
peg$savedPos = s0;
|
|
35400
|
-
s0 = peg$
|
|
36748
|
+
s0 = peg$f58(s2);
|
|
35401
36749
|
} else {
|
|
35402
36750
|
peg$currPos = s0;
|
|
35403
36751
|
s0 = peg$FAILED;
|
|
@@ -35406,7 +36754,7 @@ function peg$parse2(input, options) {
|
|
|
35406
36754
|
s0 = peg$currPos;
|
|
35407
36755
|
s1 = "";
|
|
35408
36756
|
peg$savedPos = s0;
|
|
35409
|
-
s1 = peg$
|
|
36757
|
+
s1 = peg$f59();
|
|
35410
36758
|
s0 = s1;
|
|
35411
36759
|
}
|
|
35412
36760
|
return s0;
|
|
@@ -35443,19 +36791,19 @@ function peg$parse2(input, options) {
|
|
|
35443
36791
|
let s0, s1;
|
|
35444
36792
|
peg$silentFails++;
|
|
35445
36793
|
s0 = input.charAt(peg$currPos);
|
|
35446
|
-
if (peg$
|
|
36794
|
+
if (peg$r5.test(s0)) {
|
|
35447
36795
|
peg$currPos++;
|
|
35448
36796
|
} else {
|
|
35449
36797
|
s0 = peg$FAILED;
|
|
35450
36798
|
if (peg$silentFails === 0) {
|
|
35451
|
-
peg$fail(peg$
|
|
36799
|
+
peg$fail(peg$e39);
|
|
35452
36800
|
}
|
|
35453
36801
|
}
|
|
35454
36802
|
peg$silentFails--;
|
|
35455
36803
|
if (s0 === peg$FAILED) {
|
|
35456
36804
|
s1 = peg$FAILED;
|
|
35457
36805
|
if (peg$silentFails === 0) {
|
|
35458
|
-
peg$fail(peg$
|
|
36806
|
+
peg$fail(peg$e38);
|
|
35459
36807
|
}
|
|
35460
36808
|
}
|
|
35461
36809
|
return s0;
|
|
@@ -35478,23 +36826,23 @@ function peg$parse2(input, options) {
|
|
|
35478
36826
|
s0 = peg$currPos;
|
|
35479
36827
|
s1 = [];
|
|
35480
36828
|
s2 = input.charAt(peg$currPos);
|
|
35481
|
-
if (peg$
|
|
36829
|
+
if (peg$r6.test(s2)) {
|
|
35482
36830
|
peg$currPos++;
|
|
35483
36831
|
} else {
|
|
35484
36832
|
s2 = peg$FAILED;
|
|
35485
36833
|
if (peg$silentFails === 0) {
|
|
35486
|
-
peg$fail(peg$
|
|
36834
|
+
peg$fail(peg$e41);
|
|
35487
36835
|
}
|
|
35488
36836
|
}
|
|
35489
36837
|
while (s2 !== peg$FAILED) {
|
|
35490
36838
|
s1.push(s2);
|
|
35491
36839
|
s2 = input.charAt(peg$currPos);
|
|
35492
|
-
if (peg$
|
|
36840
|
+
if (peg$r6.test(s2)) {
|
|
35493
36841
|
peg$currPos++;
|
|
35494
36842
|
} else {
|
|
35495
36843
|
s2 = peg$FAILED;
|
|
35496
36844
|
if (peg$silentFails === 0) {
|
|
35497
|
-
peg$fail(peg$
|
|
36845
|
+
peg$fail(peg$e41);
|
|
35498
36846
|
}
|
|
35499
36847
|
}
|
|
35500
36848
|
}
|
|
@@ -35510,7 +36858,7 @@ function peg$parse2(input, options) {
|
|
|
35510
36858
|
if (s0 === peg$FAILED) {
|
|
35511
36859
|
s1 = peg$FAILED;
|
|
35512
36860
|
if (peg$silentFails === 0) {
|
|
35513
|
-
peg$fail(peg$
|
|
36861
|
+
peg$fail(peg$e40);
|
|
35514
36862
|
}
|
|
35515
36863
|
}
|
|
35516
36864
|
return s0;
|
|
@@ -35519,32 +36867,32 @@ function peg$parse2(input, options) {
|
|
|
35519
36867
|
let s0, s1;
|
|
35520
36868
|
peg$silentFails++;
|
|
35521
36869
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
35522
|
-
s0 = peg$
|
|
36870
|
+
s0 = peg$c32;
|
|
35523
36871
|
peg$currPos++;
|
|
35524
36872
|
} else {
|
|
35525
36873
|
s0 = peg$FAILED;
|
|
35526
36874
|
if (peg$silentFails === 0) {
|
|
35527
|
-
peg$fail(peg$
|
|
36875
|
+
peg$fail(peg$e43);
|
|
35528
36876
|
}
|
|
35529
36877
|
}
|
|
35530
36878
|
if (s0 === peg$FAILED) {
|
|
35531
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35532
|
-
s0 = peg$
|
|
36879
|
+
if (input.substr(peg$currPos, 2) === peg$c33) {
|
|
36880
|
+
s0 = peg$c33;
|
|
35533
36881
|
peg$currPos += 2;
|
|
35534
36882
|
} else {
|
|
35535
36883
|
s0 = peg$FAILED;
|
|
35536
36884
|
if (peg$silentFails === 0) {
|
|
35537
|
-
peg$fail(peg$
|
|
36885
|
+
peg$fail(peg$e44);
|
|
35538
36886
|
}
|
|
35539
36887
|
}
|
|
35540
36888
|
if (s0 === peg$FAILED) {
|
|
35541
36889
|
s0 = input.charAt(peg$currPos);
|
|
35542
|
-
if (peg$
|
|
36890
|
+
if (peg$r7.test(s0)) {
|
|
35543
36891
|
peg$currPos++;
|
|
35544
36892
|
} else {
|
|
35545
36893
|
s0 = peg$FAILED;
|
|
35546
36894
|
if (peg$silentFails === 0) {
|
|
35547
|
-
peg$fail(peg$
|
|
36895
|
+
peg$fail(peg$e45);
|
|
35548
36896
|
}
|
|
35549
36897
|
}
|
|
35550
36898
|
}
|
|
@@ -35553,7 +36901,7 @@ function peg$parse2(input, options) {
|
|
|
35553
36901
|
if (s0 === peg$FAILED) {
|
|
35554
36902
|
s1 = peg$FAILED;
|
|
35555
36903
|
if (peg$silentFails === 0) {
|
|
35556
|
-
peg$fail(peg$
|
|
36904
|
+
peg$fail(peg$e42);
|
|
35557
36905
|
}
|
|
35558
36906
|
}
|
|
35559
36907
|
return s0;
|
|
@@ -35564,23 +36912,23 @@ function peg$parse2(input, options) {
|
|
|
35564
36912
|
s0 = peg$currPos;
|
|
35565
36913
|
s1 = [];
|
|
35566
36914
|
s2 = input.charAt(peg$currPos);
|
|
35567
|
-
if (peg$
|
|
36915
|
+
if (peg$r6.test(s2)) {
|
|
35568
36916
|
peg$currPos++;
|
|
35569
36917
|
} else {
|
|
35570
36918
|
s2 = peg$FAILED;
|
|
35571
36919
|
if (peg$silentFails === 0) {
|
|
35572
|
-
peg$fail(peg$
|
|
36920
|
+
peg$fail(peg$e41);
|
|
35573
36921
|
}
|
|
35574
36922
|
}
|
|
35575
36923
|
while (s2 !== peg$FAILED) {
|
|
35576
36924
|
s1.push(s2);
|
|
35577
36925
|
s2 = input.charAt(peg$currPos);
|
|
35578
|
-
if (peg$
|
|
36926
|
+
if (peg$r6.test(s2)) {
|
|
35579
36927
|
peg$currPos++;
|
|
35580
36928
|
} else {
|
|
35581
36929
|
s2 = peg$FAILED;
|
|
35582
36930
|
if (peg$silentFails === 0) {
|
|
35583
|
-
peg$fail(peg$
|
|
36931
|
+
peg$fail(peg$e41);
|
|
35584
36932
|
}
|
|
35585
36933
|
}
|
|
35586
36934
|
}
|
|
@@ -35596,7 +36944,7 @@ function peg$parse2(input, options) {
|
|
|
35596
36944
|
if (s0 === peg$FAILED) {
|
|
35597
36945
|
s1 = peg$FAILED;
|
|
35598
36946
|
if (peg$silentFails === 0) {
|
|
35599
|
-
peg$fail(peg$
|
|
36947
|
+
peg$fail(peg$e46);
|
|
35600
36948
|
}
|
|
35601
36949
|
}
|
|
35602
36950
|
return s0;
|
|
@@ -35605,19 +36953,19 @@ function peg$parse2(input, options) {
|
|
|
35605
36953
|
let s0, s1;
|
|
35606
36954
|
peg$silentFails++;
|
|
35607
36955
|
s0 = input.charAt(peg$currPos);
|
|
35608
|
-
if (peg$
|
|
36956
|
+
if (peg$r8.test(s0)) {
|
|
35609
36957
|
peg$currPos++;
|
|
35610
36958
|
} else {
|
|
35611
36959
|
s0 = peg$FAILED;
|
|
35612
36960
|
if (peg$silentFails === 0) {
|
|
35613
|
-
peg$fail(peg$
|
|
36961
|
+
peg$fail(peg$e48);
|
|
35614
36962
|
}
|
|
35615
36963
|
}
|
|
35616
36964
|
peg$silentFails--;
|
|
35617
36965
|
if (s0 === peg$FAILED) {
|
|
35618
36966
|
s1 = peg$FAILED;
|
|
35619
36967
|
if (peg$silentFails === 0) {
|
|
35620
|
-
peg$fail(peg$
|
|
36968
|
+
peg$fail(peg$e47);
|
|
35621
36969
|
}
|
|
35622
36970
|
}
|
|
35623
36971
|
return s0;
|