@nmshd/content 2.8.5 → 2.8.7
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/ValidationErrorWithoutProperty.d.ts +5 -0
- package/dist/ValidationErrorWithoutProperty.d.ts.map +1 -0
- package/dist/ValidationErrorWithoutProperty.js +12 -0
- package/dist/ValidationErrorWithoutProperty.js.map +1 -0
- package/dist/attributes/types/birth/BirthDate.d.ts +2 -0
- package/dist/attributes/types/birth/BirthDate.d.ts.map +1 -1
- package/dist/attributes/types/birth/BirthDate.js +17 -1
- package/dist/attributes/types/birth/BirthDate.js.map +1 -1
- package/dist/buildInformation.js +5 -5
- package/lib-web/nmshd.content.js +92 -42
- package/lib-web/nmshd.content.min.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidationErrorWithoutProperty.d.ts","sourceRoot":"","sources":["../src/ValidationErrorWithoutProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,8BAA+B,SAAQ,eAAe;gBAC5C,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAKjE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationErrorWithoutProperty = void 0;
|
|
4
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
5
|
+
class ValidationErrorWithoutProperty extends ts_serval_1.ValidationError {
|
|
6
|
+
constructor(type, reason, cause) {
|
|
7
|
+
super(type, "n/a", reason, cause);
|
|
8
|
+
this.message = `${type} :: ${reason}`;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.ValidationErrorWithoutProperty = ValidationErrorWithoutProperty;
|
|
12
|
+
//# sourceMappingURL=ValidationErrorWithoutProperty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidationErrorWithoutProperty.js","sourceRoot":"","sources":["../src/ValidationErrorWithoutProperty.ts"],"names":[],"mappings":";;;AAAA,kDAAqD;AAErD,MAAa,8BAA+B,SAAQ,2BAAe;IAC/D,YAAmB,IAAY,EAAE,MAAc,EAAE,KAAa;QAC1D,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAElC,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,OAAO,MAAM,EAAE,CAAC;IAC1C,CAAC;CACJ;AAND,wEAMC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Serializable } from "@js-soft/ts-serval";
|
|
1
2
|
import { AbstractComplexValue, AbstractComplexValueJSON, IAbstractComplexValue } from "../../AbstractComplexValue";
|
|
2
3
|
import { RenderHints, ValueHints } from "../../hints";
|
|
3
4
|
import { BirthDay, IBirthDay } from "./BirthDay";
|
|
@@ -1123,6 +1124,7 @@ export declare class BirthDate extends AbstractComplexValue implements IBirthDat
|
|
|
1123
1124
|
day: BirthDay;
|
|
1124
1125
|
month: BirthMonth;
|
|
1125
1126
|
year: BirthYear;
|
|
1127
|
+
protected static postFrom<T extends Serializable>(value: T): T;
|
|
1126
1128
|
static get valueHints(): ValueHints;
|
|
1127
1129
|
static get renderHints(): RenderHints;
|
|
1128
1130
|
static from(value: IBirthDate | Omit<BirthDateJSON, "@type">): BirthDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BirthDate.d.ts","sourceRoot":"","sources":["../../../../src/attributes/types/birth/BirthDate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BirthDate.d.ts","sourceRoot":"","sources":["../../../../src/attributes/types/birth/BirthDate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA6B,MAAM,oBAAoB,CAAC;AAK7E,OAAO,EAAE,oBAAoB,EAAE,wBAA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EAAE,OAAO,GAAG,SAAS,GAAG,aAAa;CAGhH"}
|
|
@@ -11,11 +11,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
|
+
var BirthDate_1;
|
|
14
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
16
|
exports.BirthDate = void 0;
|
|
16
17
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
17
18
|
const easy_tsnameof_1 = __importDefault(require("easy-tsnameof"));
|
|
18
19
|
const luxon_1 = require("luxon");
|
|
20
|
+
const ValidationErrorWithoutProperty_1 = require("../../../ValidationErrorWithoutProperty");
|
|
19
21
|
const AbstractAttributeValue_1 = require("../../AbstractAttributeValue");
|
|
20
22
|
const AbstractComplexValue_1 = require("../../AbstractComplexValue");
|
|
21
23
|
const hints_1 = require("../../hints");
|
|
@@ -23,7 +25,21 @@ const BirthDay_1 = require("./BirthDay");
|
|
|
23
25
|
const BirthMonth_1 = require("./BirthMonth");
|
|
24
26
|
const BirthYear_1 = require("./BirthYear");
|
|
25
27
|
let BirthDate = class BirthDate extends AbstractComplexValue_1.AbstractComplexValue {
|
|
28
|
+
static { BirthDate_1 = this; }
|
|
26
29
|
static { this.propertyNames = (0, easy_tsnameof_1.default)(); }
|
|
30
|
+
static postFrom(value) {
|
|
31
|
+
if (!(value instanceof BirthDate_1))
|
|
32
|
+
throw new Error("this should never happen");
|
|
33
|
+
const dateTime = luxon_1.DateTime.fromObject({ day: value.day.value, month: value.month.value, year: value.year.value });
|
|
34
|
+
const isValid = dateTime.isValid;
|
|
35
|
+
if (!isValid) {
|
|
36
|
+
throw new ValidationErrorWithoutProperty_1.ValidationErrorWithoutProperty(BirthDate_1.name, "The BirthDate is not a valid date.");
|
|
37
|
+
}
|
|
38
|
+
if (luxon_1.DateTime.utc() < dateTime) {
|
|
39
|
+
throw new ValidationErrorWithoutProperty_1.ValidationErrorWithoutProperty(BirthDate_1.name, "You cannot enter a BirthDate that is in the future.");
|
|
40
|
+
}
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
27
43
|
static get valueHints() {
|
|
28
44
|
return hints_1.ValueHints.from({
|
|
29
45
|
propertyHints: {
|
|
@@ -72,7 +88,7 @@ __decorate([
|
|
|
72
88
|
(0, ts_serval_1.validate)(),
|
|
73
89
|
__metadata("design:type", BirthYear_1.BirthYear)
|
|
74
90
|
], BirthDate.prototype, "year", void 0);
|
|
75
|
-
exports.BirthDate = BirthDate = __decorate([
|
|
91
|
+
exports.BirthDate = BirthDate = BirthDate_1 = __decorate([
|
|
76
92
|
(0, ts_serval_1.type)("BirthDate")
|
|
77
93
|
], BirthDate);
|
|
78
94
|
//# sourceMappingURL=BirthDate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BirthDate.js","sourceRoot":"","sources":["../../../../src/attributes/types/birth/BirthDate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BirthDate.js","sourceRoot":"","sources":["../../../../src/attributes/types/birth/BirthDate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA6E;AAC7E,kEAAmC;AACnC,iCAAiC;AACjC,4FAAyF;AACzF,yEAAsE;AACtE,qEAAmH;AACnH,uCAAsD;AACtD,yCAAiD;AACjD,6CAAuD;AACvD,2CAAoD;AAgB7C,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,2CAAoB;;aACxB,kBAAa,GAAG,IAAA,uBAAM,GAAoB,AAA7B,CAA8B;IAcxD,MAAM,CAAU,QAAQ,CAAyB,KAAQ;QAC/D,IAAI,CAAC,CAAC,KAAK,YAAY,WAAS,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAE/E,MAAM,QAAQ,GAAG,gBAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,C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CAAC;IACP,CAAC;IAEM,MAAM,CAAC,IAAI,CAAC,KAAgD;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAEe,QAAQ;QACpB,OAAO,gBAAQ,CAAC,UAAU,CAAC;YACvB,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;SACxB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC9B,CAAC;IAEe,MAAM,CAAC,OAA6B,EAAE,iBAAuC;QACzF,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,CAAkB,CAAC;IACrE,CAAC;;AAlEQ,8BAAS;AAKX;IAFN,IAAA,qBAAS,EAAC,EAAE,eAAe,EAAE,+CAAsB,CAAC,cAAc,EAAE,CAAC;IACrE,IAAA,oBAAQ,GAAE;8BACC,mBAAQ;sCAAC;AAId;IAFN,IAAA,qBAAS,EAAC,EAAE,eAAe,EAAE,+CAAsB,CAAC,cAAc,EAAE,CAAC;IACrE,IAAA,oBAAQ,GAAE;8BACG,uBAAU;wCAAC;AAIlB;IAFN,IAAA,qBAAS,EAAC,EAAE,eAAe,EAAE,+CAAsB,CAAC,cAAc,EAAE,CAAC;IACrE,IAAA,oBAAQ,GAAE;8BACE,qBAAS;uCAAC;oBAbd,SAAS;IADrB,IAAA,gBAAI,EAAC,WAAW,CAAC;GACL,SAAS,CAmErB"}
|
package/dist/buildInformation.js
CHANGED
|
@@ -5,11 +5,11 @@ const ts_serval_1 = require("@js-soft/ts-serval");
|
|
|
5
5
|
const crypto_1 = require("@nmshd/crypto");
|
|
6
6
|
const transport_1 = require("@nmshd/transport");
|
|
7
7
|
exports.buildInformation = {
|
|
8
|
-
version: "2.8.
|
|
9
|
-
build: "
|
|
10
|
-
date: "2024-02-
|
|
11
|
-
commit: "
|
|
12
|
-
dependencies: {"@js-soft/logging-abstractions":"^1.0.1","@nmshd/iql":"^1.0.
|
|
8
|
+
version: "2.8.7",
|
|
9
|
+
build: "30",
|
|
10
|
+
date: "2024-02-23T11:56:04+00:00",
|
|
11
|
+
commit: "f595da4c58bfeccdfa4911aa46532be9b0898a44",
|
|
12
|
+
dependencies: {"@js-soft/logging-abstractions":"^1.0.1","@nmshd/iql":"^1.0.2","easy-tsnameof":"^3.0.6"},
|
|
13
13
|
libraries: {
|
|
14
14
|
serval: ts_serval_1.buildInformation,
|
|
15
15
|
crypto: crypto_1.buildInformation,
|
package/lib-web/nmshd.content.js
CHANGED
|
@@ -7575,6 +7575,27 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
7575
7575
|
|
|
7576
7576
|
/***/ }),
|
|
7577
7577
|
|
|
7578
|
+
/***/ "./dist/ValidationErrorWithoutProperty.js":
|
|
7579
|
+
/*!************************************************!*\
|
|
7580
|
+
!*** ./dist/ValidationErrorWithoutProperty.js ***!
|
|
7581
|
+
\************************************************/
|
|
7582
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7583
|
+
|
|
7584
|
+
|
|
7585
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7586
|
+
exports.ValidationErrorWithoutProperty = void 0;
|
|
7587
|
+
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
7588
|
+
class ValidationErrorWithoutProperty extends ts_serval_1.ValidationError {
|
|
7589
|
+
constructor(type, reason, cause) {
|
|
7590
|
+
super(type, "n/a", reason, cause);
|
|
7591
|
+
this.message = `${type} :: ${reason}`;
|
|
7592
|
+
}
|
|
7593
|
+
}
|
|
7594
|
+
exports.ValidationErrorWithoutProperty = ValidationErrorWithoutProperty;
|
|
7595
|
+
//# sourceMappingURL=ValidationErrorWithoutProperty.js.map
|
|
7596
|
+
|
|
7597
|
+
/***/ }),
|
|
7598
|
+
|
|
7578
7599
|
/***/ "./dist/attributes/AbstractAttribute.js":
|
|
7579
7600
|
/*!**********************************************!*\
|
|
7580
7601
|
!*** ./dist/attributes/AbstractAttribute.js ***!
|
|
@@ -10943,11 +10964,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10943
10964
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10944
10965
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10945
10966
|
};
|
|
10967
|
+
var BirthDate_1;
|
|
10946
10968
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10947
10969
|
exports.BirthDate = void 0;
|
|
10948
10970
|
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
10949
10971
|
const easy_tsnameof_1 = __importDefault(__webpack_require__(/*! easy-tsnameof */ "../../node_modules/easy-tsnameof/dist/easy-tsnameof.esm.js"));
|
|
10950
10972
|
const luxon_1 = __webpack_require__(/*! luxon */ "../../node_modules/luxon/build/node/luxon.js");
|
|
10973
|
+
const ValidationErrorWithoutProperty_1 = __webpack_require__(/*! ../../../ValidationErrorWithoutProperty */ "./dist/ValidationErrorWithoutProperty.js");
|
|
10951
10974
|
const AbstractAttributeValue_1 = __webpack_require__(/*! ../../AbstractAttributeValue */ "./dist/attributes/AbstractAttributeValue.js");
|
|
10952
10975
|
const AbstractComplexValue_1 = __webpack_require__(/*! ../../AbstractComplexValue */ "./dist/attributes/AbstractComplexValue.js");
|
|
10953
10976
|
const hints_1 = __webpack_require__(/*! ../../hints */ "./dist/attributes/hints/index.js");
|
|
@@ -10955,7 +10978,21 @@ const BirthDay_1 = __webpack_require__(/*! ./BirthDay */ "./dist/attributes/type
|
|
|
10955
10978
|
const BirthMonth_1 = __webpack_require__(/*! ./BirthMonth */ "./dist/attributes/types/birth/BirthMonth.js");
|
|
10956
10979
|
const BirthYear_1 = __webpack_require__(/*! ./BirthYear */ "./dist/attributes/types/birth/BirthYear.js");
|
|
10957
10980
|
let BirthDate = class BirthDate extends AbstractComplexValue_1.AbstractComplexValue {
|
|
10981
|
+
static { BirthDate_1 = this; }
|
|
10958
10982
|
static { this.propertyNames = (0, easy_tsnameof_1.default)(); }
|
|
10983
|
+
static postFrom(value) {
|
|
10984
|
+
if (!(value instanceof BirthDate_1))
|
|
10985
|
+
throw new Error("this should never happen");
|
|
10986
|
+
const dateTime = luxon_1.DateTime.fromObject({ day: value.day.value, month: value.month.value, year: value.year.value });
|
|
10987
|
+
const isValid = dateTime.isValid;
|
|
10988
|
+
if (!isValid) {
|
|
10989
|
+
throw new ValidationErrorWithoutProperty_1.ValidationErrorWithoutProperty(BirthDate_1.name, "The BirthDate is not a valid date.");
|
|
10990
|
+
}
|
|
10991
|
+
if (luxon_1.DateTime.utc() < dateTime) {
|
|
10992
|
+
throw new ValidationErrorWithoutProperty_1.ValidationErrorWithoutProperty(BirthDate_1.name, "You cannot enter a BirthDate that is in the future.");
|
|
10993
|
+
}
|
|
10994
|
+
return value;
|
|
10995
|
+
}
|
|
10959
10996
|
static get valueHints() {
|
|
10960
10997
|
return hints_1.ValueHints.from({
|
|
10961
10998
|
propertyHints: {
|
|
@@ -11004,7 +11041,7 @@ __decorate([
|
|
|
11004
11041
|
(0, ts_serval_1.validate)(),
|
|
11005
11042
|
__metadata("design:type", BirthYear_1.BirthYear)
|
|
11006
11043
|
], BirthDate.prototype, "year", void 0);
|
|
11007
|
-
exports.BirthDate = BirthDate = __decorate([
|
|
11044
|
+
exports.BirthDate = BirthDate = BirthDate_1 = __decorate([
|
|
11008
11045
|
(0, ts_serval_1.type)("BirthDate")
|
|
11009
11046
|
], BirthDate);
|
|
11010
11047
|
//# sourceMappingURL=BirthDate.js.map
|
|
@@ -14701,11 +14738,11 @@ const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-s
|
|
|
14701
14738
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
14702
14739
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
14703
14740
|
exports.buildInformation = {
|
|
14704
|
-
version: "2.8.
|
|
14705
|
-
build: "
|
|
14706
|
-
date: "2024-02-
|
|
14707
|
-
commit: "
|
|
14708
|
-
dependencies: {"@js-soft/logging-abstractions":"^1.0.1","@nmshd/iql":"^1.0.
|
|
14741
|
+
version: "2.8.7",
|
|
14742
|
+
build: "30",
|
|
14743
|
+
date: "2024-02-23T11:56:04+00:00",
|
|
14744
|
+
commit: "f595da4c58bfeccdfa4911aa46532be9b0898a44",
|
|
14745
|
+
dependencies: {"@js-soft/logging-abstractions":"^1.0.1","@nmshd/iql":"^1.0.2","easy-tsnameof":"^3.0.6"},
|
|
14709
14746
|
libraries: {
|
|
14710
14747
|
serval: ts_serval_1.buildInformation,
|
|
14711
14748
|
crypto: crypto_1.buildInformation,
|
|
@@ -16438,7 +16475,7 @@ exports.validate = validate;
|
|
|
16438
16475
|
\******************************/
|
|
16439
16476
|
/***/ ((module) => {
|
|
16440
16477
|
|
|
16441
|
-
//
|
|
16478
|
+
// @generated by Peggy 4.0.0.
|
|
16442
16479
|
//
|
|
16443
16480
|
// https://peggyjs.org/
|
|
16444
16481
|
|
|
@@ -16768,14 +16805,14 @@ function peg$parse(input, options) {
|
|
|
16768
16805
|
var peg$f11 = function (val) {
|
|
16769
16806
|
return val.join("").replaceAll("\\\\", "\\").replaceAll("\\'", "'");
|
|
16770
16807
|
};
|
|
16771
|
-
var peg$currPos = 0;
|
|
16772
|
-
var peg$savedPos =
|
|
16808
|
+
var peg$currPos = options.peg$currPos | 0;
|
|
16809
|
+
var peg$savedPos = peg$currPos;
|
|
16773
16810
|
var peg$posDetailsCache = [{ line: 1, column: 1 }];
|
|
16774
|
-
var peg$maxFailPos =
|
|
16775
|
-
var peg$maxFailExpected = [];
|
|
16776
|
-
var peg$silentFails = 0;
|
|
16811
|
+
var peg$maxFailPos = peg$currPos;
|
|
16812
|
+
var peg$maxFailExpected = options.peg$maxFailExpected || [];
|
|
16813
|
+
var peg$silentFails = options.peg$silentFails | 0;
|
|
16777
16814
|
var peg$result;
|
|
16778
|
-
if (
|
|
16815
|
+
if (options.startRule) {
|
|
16779
16816
|
if (!(options.startRule in peg$startRuleFunctions)) {
|
|
16780
16817
|
throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
|
|
16781
16818
|
}
|
|
@@ -16831,9 +16868,12 @@ function peg$parse(input, options) {
|
|
|
16831
16868
|
return details;
|
|
16832
16869
|
}
|
|
16833
16870
|
else {
|
|
16834
|
-
|
|
16835
|
-
|
|
16836
|
-
|
|
16871
|
+
if (pos >= peg$posDetailsCache.length) {
|
|
16872
|
+
p = peg$posDetailsCache.length - 1;
|
|
16873
|
+
}
|
|
16874
|
+
else {
|
|
16875
|
+
p = pos;
|
|
16876
|
+
while (!peg$posDetailsCache[--p]) { }
|
|
16837
16877
|
}
|
|
16838
16878
|
details = peg$posDetailsCache[p];
|
|
16839
16879
|
details = {
|
|
@@ -17536,8 +17576,8 @@ function peg$parse(input, options) {
|
|
|
17536
17576
|
function peg$parsePredicate() {
|
|
17537
17577
|
var s0, s1, s2;
|
|
17538
17578
|
s0 = peg$currPos;
|
|
17539
|
-
|
|
17540
|
-
|
|
17579
|
+
s1 = input.charAt(peg$currPos);
|
|
17580
|
+
if (peg$r0.test(s1)) {
|
|
17541
17581
|
peg$currPos++;
|
|
17542
17582
|
}
|
|
17543
17583
|
else {
|
|
@@ -17563,8 +17603,8 @@ function peg$parse(input, options) {
|
|
|
17563
17603
|
}
|
|
17564
17604
|
if (s0 === peg$FAILED) {
|
|
17565
17605
|
s0 = peg$currPos;
|
|
17566
|
-
|
|
17567
|
-
|
|
17606
|
+
s1 = input.charAt(peg$currPos);
|
|
17607
|
+
if (peg$r1.test(s1)) {
|
|
17568
17608
|
peg$currPos++;
|
|
17569
17609
|
}
|
|
17570
17610
|
else {
|
|
@@ -17618,8 +17658,8 @@ function peg$parse(input, options) {
|
|
|
17618
17658
|
}
|
|
17619
17659
|
}
|
|
17620
17660
|
if (s3 === peg$FAILED) {
|
|
17621
|
-
|
|
17622
|
-
|
|
17661
|
+
s3 = input.charAt(peg$currPos);
|
|
17662
|
+
if (peg$r2.test(s3)) {
|
|
17623
17663
|
peg$currPos++;
|
|
17624
17664
|
}
|
|
17625
17665
|
else {
|
|
@@ -17654,8 +17694,8 @@ function peg$parse(input, options) {
|
|
|
17654
17694
|
}
|
|
17655
17695
|
}
|
|
17656
17696
|
if (s3 === peg$FAILED) {
|
|
17657
|
-
|
|
17658
|
-
|
|
17697
|
+
s3 = input.charAt(peg$currPos);
|
|
17698
|
+
if (peg$r2.test(s3)) {
|
|
17659
17699
|
peg$currPos++;
|
|
17660
17700
|
}
|
|
17661
17701
|
else {
|
|
@@ -17715,8 +17755,8 @@ function peg$parse(input, options) {
|
|
|
17715
17755
|
}
|
|
17716
17756
|
}
|
|
17717
17757
|
if (s2 === peg$FAILED) {
|
|
17718
|
-
|
|
17719
|
-
|
|
17758
|
+
s2 = input.charAt(peg$currPos);
|
|
17759
|
+
if (peg$r3.test(s2)) {
|
|
17720
17760
|
peg$currPos++;
|
|
17721
17761
|
}
|
|
17722
17762
|
else {
|
|
@@ -17751,8 +17791,8 @@ function peg$parse(input, options) {
|
|
|
17751
17791
|
}
|
|
17752
17792
|
}
|
|
17753
17793
|
if (s2 === peg$FAILED) {
|
|
17754
|
-
|
|
17755
|
-
|
|
17794
|
+
s2 = input.charAt(peg$currPos);
|
|
17795
|
+
if (peg$r3.test(s2)) {
|
|
17756
17796
|
peg$currPos++;
|
|
17757
17797
|
}
|
|
17758
17798
|
else {
|
|
@@ -17774,8 +17814,8 @@ function peg$parse(input, options) {
|
|
|
17774
17814
|
var s0, s1, s2, s3, s4;
|
|
17775
17815
|
s0 = peg$currPos;
|
|
17776
17816
|
s1 = peg$currPos;
|
|
17777
|
-
|
|
17778
|
-
|
|
17817
|
+
s2 = input.charAt(peg$currPos);
|
|
17818
|
+
if (peg$r4.test(s2)) {
|
|
17779
17819
|
peg$currPos++;
|
|
17780
17820
|
}
|
|
17781
17821
|
else {
|
|
@@ -17786,8 +17826,8 @@ function peg$parse(input, options) {
|
|
|
17786
17826
|
}
|
|
17787
17827
|
if (s2 !== peg$FAILED) {
|
|
17788
17828
|
s3 = [];
|
|
17789
|
-
|
|
17790
|
-
|
|
17829
|
+
s4 = input.charAt(peg$currPos);
|
|
17830
|
+
if (peg$r5.test(s4)) {
|
|
17791
17831
|
peg$currPos++;
|
|
17792
17832
|
}
|
|
17793
17833
|
else {
|
|
@@ -17799,8 +17839,8 @@ function peg$parse(input, options) {
|
|
|
17799
17839
|
if (s4 !== peg$FAILED) {
|
|
17800
17840
|
while (s4 !== peg$FAILED) {
|
|
17801
17841
|
s3.push(s4);
|
|
17802
|
-
|
|
17803
|
-
|
|
17842
|
+
s4 = input.charAt(peg$currPos);
|
|
17843
|
+
if (peg$r5.test(s4)) {
|
|
17804
17844
|
peg$currPos++;
|
|
17805
17845
|
}
|
|
17806
17846
|
else {
|
|
@@ -17840,8 +17880,8 @@ function peg$parse(input, options) {
|
|
|
17840
17880
|
peg$silentFails++;
|
|
17841
17881
|
s0 = peg$currPos;
|
|
17842
17882
|
s1 = peg$currPos;
|
|
17843
|
-
|
|
17844
|
-
|
|
17883
|
+
s2 = input.charAt(peg$currPos);
|
|
17884
|
+
if (peg$r6.test(s2)) {
|
|
17845
17885
|
peg$currPos++;
|
|
17846
17886
|
}
|
|
17847
17887
|
else {
|
|
@@ -17852,8 +17892,8 @@ function peg$parse(input, options) {
|
|
|
17852
17892
|
}
|
|
17853
17893
|
if (s2 !== peg$FAILED) {
|
|
17854
17894
|
s3 = [];
|
|
17855
|
-
|
|
17856
|
-
|
|
17895
|
+
s4 = input.charAt(peg$currPos);
|
|
17896
|
+
if (peg$r5.test(s4)) {
|
|
17857
17897
|
peg$currPos++;
|
|
17858
17898
|
}
|
|
17859
17899
|
else {
|
|
@@ -17864,8 +17904,8 @@ function peg$parse(input, options) {
|
|
|
17864
17904
|
}
|
|
17865
17905
|
while (s4 !== peg$FAILED) {
|
|
17866
17906
|
s3.push(s4);
|
|
17867
|
-
|
|
17868
|
-
|
|
17907
|
+
s4 = input.charAt(peg$currPos);
|
|
17908
|
+
if (peg$r5.test(s4)) {
|
|
17869
17909
|
peg$currPos++;
|
|
17870
17910
|
}
|
|
17871
17911
|
else {
|
|
@@ -17900,8 +17940,8 @@ function peg$parse(input, options) {
|
|
|
17900
17940
|
function peg$parse_() {
|
|
17901
17941
|
var s0, s1;
|
|
17902
17942
|
peg$silentFails++;
|
|
17903
|
-
|
|
17904
|
-
|
|
17943
|
+
s0 = input.charAt(peg$currPos);
|
|
17944
|
+
if (peg$r7.test(s0)) {
|
|
17905
17945
|
peg$currPos++;
|
|
17906
17946
|
}
|
|
17907
17947
|
else {
|
|
@@ -17920,6 +17960,15 @@ function peg$parse(input, options) {
|
|
|
17920
17960
|
return s0;
|
|
17921
17961
|
}
|
|
17922
17962
|
peg$result = peg$startRuleFunction();
|
|
17963
|
+
if (options.peg$library) {
|
|
17964
|
+
return /** @type {any} */ ({
|
|
17965
|
+
peg$result,
|
|
17966
|
+
peg$currPos,
|
|
17967
|
+
peg$FAILED,
|
|
17968
|
+
peg$maxFailExpected,
|
|
17969
|
+
peg$maxFailPos
|
|
17970
|
+
});
|
|
17971
|
+
}
|
|
17923
17972
|
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
|
|
17924
17973
|
return peg$result;
|
|
17925
17974
|
}
|
|
@@ -17933,6 +17982,7 @@ function peg$parse(input, options) {
|
|
|
17933
17982
|
}
|
|
17934
17983
|
}
|
|
17935
17984
|
module.exports = {
|
|
17985
|
+
StartRules: ["Expr"],
|
|
17936
17986
|
SyntaxError: peg$SyntaxError,
|
|
17937
17987
|
parse: peg$parse
|
|
17938
17988
|
};
|