@swagger-api/apidom-parser-adapter-openapi-yaml-3-1 1.0.0-beta.32 → 1.0.0-beta.34

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.
@@ -292,6 +292,36 @@ class MediaTypeExamples extends _swagger_api_apidom_core__WEBPACK_IMPORTED_MODUL
292
292
 
293
293
  /***/ }),
294
294
 
295
+ /***/ 675:
296
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
297
+
298
+ "use strict";
299
+ __webpack_require__.r(__webpack_exports__);
300
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
301
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
302
+ /* harmony export */ });
303
+ /* harmony import */ var _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(924);
304
+
305
+ class JSONPointerTypeError extends _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
306
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerTypeError);
307
+
308
+ /***/ }),
309
+
310
+ /***/ 924:
311
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
312
+
313
+ "use strict";
314
+ __webpack_require__.r(__webpack_exports__);
315
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
316
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
317
+ /* harmony export */ });
318
+ /* harmony import */ var _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12008);
319
+
320
+ class JSONPointerEvaluateError extends _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
321
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerEvaluateError);
322
+
323
+ /***/ }),
324
+
295
325
  /***/ 929:
296
326
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
297
327
 
@@ -827,6 +857,21 @@ var nodeUtil = (function() {
827
857
  module.exports = nodeUtil;
828
858
 
829
859
 
860
+ /***/ }),
861
+
862
+ /***/ 2325:
863
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
864
+
865
+ "use strict";
866
+ __webpack_require__.r(__webpack_exports__);
867
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
868
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
869
+ /* harmony export */ });
870
+ /* harmony import */ var _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(924);
871
+
872
+ class JSONPointerIndexError extends _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
873
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerIndexError);
874
+
830
875
  /***/ }),
831
876
 
832
877
  /***/ 2459:
@@ -1954,6 +1999,32 @@ module.exports = function (argument, $default) {
1954
1999
  };
1955
2000
 
1956
2001
 
2002
+ /***/ }),
2003
+
2004
+ /***/ 4896:
2005
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2006
+
2007
+ "use strict";
2008
+ __webpack_require__.r(__webpack_exports__);
2009
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2010
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2011
+ /* harmony export */ });
2012
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
2013
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36585);
2014
+
2015
+
2016
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
2017
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
2018
+ const testArrayLocation = referenceToken => {
2019
+ if (typeof referenceToken !== 'string') return false;
2020
+ try {
2021
+ return parser.parse(grammar, 'array-location', referenceToken).success;
2022
+ } catch {
2023
+ return false;
2024
+ }
2025
+ };
2026
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testArrayLocation);
2027
+
1957
2028
  /***/ }),
1958
2029
 
1959
2030
  /***/ 4930:
@@ -3046,6 +3117,56 @@ class OpenApi3_0Visitor extends (0,ts_mixer__WEBPACK_IMPORTED_MODULE_0__.Mixin)(
3046
3117
 
3047
3118
  /***/ }),
3048
3119
 
3120
+ /***/ 8750:
3121
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
3122
+
3123
+ "use strict";
3124
+ __webpack_require__.r(__webpack_exports__);
3125
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3126
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3127
+ /* harmony export */ });
3128
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
3129
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36585);
3130
+ /* harmony import */ var _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26490);
3131
+ /* harmony import */ var _translators_ASTTranslator_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23020);
3132
+ /* harmony import */ var _trace_Trace_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17431);
3133
+
3134
+
3135
+
3136
+
3137
+
3138
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]();
3139
+ const parse = (jsonPointer, {
3140
+ translator = new _translators_ASTTranslator_mjs__WEBPACK_IMPORTED_MODULE_2__["default"](),
3141
+ stats = false,
3142
+ trace = false
3143
+ } = {}) => {
3144
+ if (typeof jsonPointer !== 'string') {
3145
+ throw new TypeError('JSON Pointer must be a string');
3146
+ }
3147
+ try {
3148
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
3149
+ if (translator) parser.ast = translator;
3150
+ if (stats) parser.stats = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Stats();
3151
+ if (trace) parser.trace = new _trace_Trace_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]();
3152
+ const result = parser.parse(grammar, 'json-pointer', jsonPointer);
3153
+ return {
3154
+ result,
3155
+ tree: result.success && translator ? parser.ast.getTree() : undefined,
3156
+ stats: parser.stats,
3157
+ trace: parser.trace
3158
+ };
3159
+ } catch (error) {
3160
+ throw new _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]('Unexpected error during JSON Pointer parsing', {
3161
+ cause: error,
3162
+ jsonPointer
3163
+ });
3164
+ }
3165
+ };
3166
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parse);
3167
+
3168
+ /***/ }),
3169
+
3049
3170
  /***/ 8867:
3050
3171
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
3051
3172
 
@@ -4306,6 +4427,57 @@ var isNull = (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(null);
4306
4427
 
4307
4428
  /***/ }),
4308
4429
 
4430
+ /***/ 12008:
4431
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4432
+
4433
+ "use strict";
4434
+ __webpack_require__.r(__webpack_exports__);
4435
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4436
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4437
+ /* harmony export */ });
4438
+ class JSONPointerError extends Error {
4439
+ constructor(message, options = undefined) {
4440
+ super(message, options);
4441
+ this.name = this.constructor.name;
4442
+ if (typeof message === 'string') {
4443
+ this.message = message;
4444
+ }
4445
+ if (typeof Error.captureStackTrace === 'function') {
4446
+ Error.captureStackTrace(this, this.constructor);
4447
+ } else {
4448
+ this.stack = new Error(message).stack;
4449
+ }
4450
+
4451
+ /**
4452
+ * This needs to stay here until our minimum supported version of Node.js is >= 16.9.0.
4453
+ * Node.js is >= 16.9.0 supports error causes natively.
4454
+ */
4455
+ if (options != null && typeof options === 'object' && Object.prototype.hasOwnProperty.call(options, 'cause') && !('cause' in this)) {
4456
+ const {
4457
+ cause
4458
+ } = options;
4459
+ this.cause = cause;
4460
+ if (cause instanceof Error && 'stack' in cause) {
4461
+ this.stack = `${this.stack}\nCAUSE: ${cause.stack}`;
4462
+ }
4463
+ }
4464
+
4465
+ /**
4466
+ * Allows to assign arbitrary properties to the error object.
4467
+ */
4468
+ if (options != null && typeof options === 'object') {
4469
+ const {
4470
+ cause,
4471
+ ...causelessOptions
4472
+ } = options;
4473
+ Object.assign(this, causelessOptions);
4474
+ }
4475
+ }
4476
+ }
4477
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerError);
4478
+
4479
+ /***/ }),
4480
+
4309
4481
  /***/ 12066:
4310
4482
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4311
4483
 
@@ -10170,6 +10342,50 @@ visitor, {
10170
10342
 
10171
10343
  /***/ }),
10172
10344
 
10345
+ /***/ 17431:
10346
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
10347
+
10348
+ "use strict";
10349
+ __webpack_require__.r(__webpack_exports__);
10350
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10351
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
10352
+ /* harmony export */ });
10353
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
10354
+ /* harmony import */ var _Expectations_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83421);
10355
+
10356
+
10357
+ class Trace extends apg_lite__WEBPACK_IMPORTED_MODULE_0__.Trace {
10358
+ inferExpectations() {
10359
+ const lines = this.displayTrace().split('\n');
10360
+ const expectations = new Set();
10361
+ let collecting = false;
10362
+ let lastMatchedIndex = -1;
10363
+ for (let i = 0; i < lines.length; i++) {
10364
+ const line = lines[i];
10365
+
10366
+ // capture the max match line (first one that ends in a single character match)
10367
+ if (!collecting && line.includes('M|')) {
10368
+ const textMatch = line.match(/]'(.*)'$/);
10369
+ if (textMatch && textMatch[1]) {
10370
+ lastMatchedIndex = i;
10371
+ }
10372
+ }
10373
+
10374
+ // begin collecting after the deepest successful match
10375
+ if (i > lastMatchedIndex) {
10376
+ const terminalFailMatch = line.match(/N\|\[TLS\(([^)]+)\)]/);
10377
+ if (terminalFailMatch) {
10378
+ expectations.add(terminalFailMatch[1]);
10379
+ }
10380
+ }
10381
+ }
10382
+ return new _Expectations_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](...expectations);
10383
+ }
10384
+ }
10385
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Trace);
10386
+
10387
+ /***/ }),
10388
+
10173
10389
  /***/ 17534:
10174
10390
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
10175
10391
 
@@ -11097,6 +11313,30 @@ function _functionName(f) {
11097
11313
 
11098
11314
  /***/ }),
11099
11315
 
11316
+ /***/ 20439:
11317
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11318
+
11319
+ "use strict";
11320
+ __webpack_require__.r(__webpack_exports__);
11321
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11322
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
11323
+ /* harmony export */ });
11324
+ /* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8750);
11325
+
11326
+ const testJSONPointer = jsonPointer => {
11327
+ try {
11328
+ const parseResult = (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(jsonPointer, {
11329
+ translator: null
11330
+ });
11331
+ return parseResult.result.success;
11332
+ } catch {
11333
+ return false;
11334
+ }
11335
+ };
11336
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testJSONPointer);
11337
+
11338
+ /***/ }),
11339
+
11100
11340
  /***/ 20650:
11101
11341
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11102
11342
 
@@ -11697,6 +11937,32 @@ function isBoolean(value) {
11697
11937
  module.exports = isBoolean;
11698
11938
 
11699
11939
 
11940
+ /***/ }),
11941
+
11942
+ /***/ 22587:
11943
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11944
+
11945
+ "use strict";
11946
+ __webpack_require__.r(__webpack_exports__);
11947
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11948
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
11949
+ /* harmony export */ });
11950
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
11951
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36585);
11952
+
11953
+
11954
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
11955
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
11956
+ const testArrayIndex = referenceToken => {
11957
+ if (typeof referenceToken !== 'string') return false;
11958
+ try {
11959
+ return parser.parse(grammar, 'array-index', referenceToken).success;
11960
+ } catch {
11961
+ return false;
11962
+ }
11963
+ };
11964
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testArrayIndex);
11965
+
11700
11966
  /***/ }),
11701
11967
 
11702
11968
  /***/ 22695:
@@ -12655,6 +12921,34 @@ Object.defineProperty(Header.prototype, 'description', {
12655
12921
 
12656
12922
  /***/ }),
12657
12923
 
12924
+ /***/ 23020:
12925
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12926
+
12927
+ "use strict";
12928
+ __webpack_require__.r(__webpack_exports__);
12929
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12930
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
12931
+ /* harmony export */ });
12932
+ /* harmony import */ var _CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92802);
12933
+ /* harmony import */ var _unescape_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82182);
12934
+
12935
+
12936
+ class ASTTranslator extends _CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
12937
+ getTree() {
12938
+ const {
12939
+ root
12940
+ } = super.getTree();
12941
+ return root.children.filter(({
12942
+ type
12943
+ }) => type === 'reference-token').map(({
12944
+ text
12945
+ }) => (0,_unescape_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(text));
12946
+ }
12947
+ }
12948
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ASTTranslator);
12949
+
12950
+ /***/ }),
12951
+
12658
12952
  /***/ 23031:
12659
12953
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12660
12954
 
@@ -14300,6 +14594,21 @@ class Schema extends _swagger_api_apidom_ns_json_schema_2020_12__WEBPACK_IMPORTE
14300
14594
 
14301
14595
  /***/ }),
14302
14596
 
14597
+ /***/ 26490:
14598
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14599
+
14600
+ "use strict";
14601
+ __webpack_require__.r(__webpack_exports__);
14602
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14603
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14604
+ /* harmony export */ });
14605
+ /* harmony import */ var _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12008);
14606
+
14607
+ class JSONPointerParseError extends _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
14608
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerParseError);
14609
+
14610
+ /***/ }),
14611
+
14303
14612
  /***/ 26517:
14304
14613
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14305
14614
 
@@ -14407,6 +14716,24 @@ var path = __webpack_require__(68099);
14407
14716
  module.exports = path.AggregateError;
14408
14717
 
14409
14718
 
14719
+ /***/ }),
14720
+
14721
+ /***/ 27123:
14722
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14723
+
14724
+ "use strict";
14725
+ __webpack_require__.r(__webpack_exports__);
14726
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14727
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14728
+ /* harmony export */ });
14729
+ const escape = referenceToken => {
14730
+ if (typeof referenceToken !== 'string' && typeof referenceToken !== 'number') {
14731
+ throw new TypeError('Reference token must be a string or number');
14732
+ }
14733
+ return String(referenceToken).replace(/~/g, '~0').replace(/\//g, '~1');
14734
+ };
14735
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (escape);
14736
+
14410
14737
  /***/ }),
14411
14738
 
14412
14739
  /***/ 27488:
@@ -15305,25 +15632,6 @@ class AlternatingVisitor extends _SpecificationVisitor_mjs__WEBPACK_IMPORTED_MOD
15305
15632
 
15306
15633
  /***/ }),
15307
15634
 
15308
- /***/ 29217:
15309
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
15310
-
15311
- "use strict";
15312
- __webpack_require__.r(__webpack_exports__);
15313
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15314
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
15315
- /* harmony export */ });
15316
- /* harmony import */ var _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44641);
15317
-
15318
-
15319
- /**
15320
- * @public
15321
- */
15322
- class JsonPointerError extends _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__["default"] {}
15323
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JsonPointerError);
15324
-
15325
- /***/ }),
15326
-
15327
15635
  /***/ 29498:
15328
15636
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
15329
15637
 
@@ -18212,6 +18520,266 @@ const createRefractor = specPath => (value, options = {}) => refract(value, {
18212
18520
 
18213
18521
  /***/ }),
18214
18522
 
18523
+ /***/ 36585:
18524
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18525
+
18526
+ "use strict";
18527
+ __webpack_require__.r(__webpack_exports__);
18528
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18529
+ /* harmony export */ "default": () => (/* binding */ grammar)
18530
+ /* harmony export */ });
18531
+ // copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved<br>
18532
+ // license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br>
18533
+ //
18534
+ // Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)
18535
+ function grammar() {
18536
+ // ```
18537
+ // SUMMARY
18538
+ // rules = 8
18539
+ // udts = 0
18540
+ // opcodes = 28
18541
+ // --- ABNF original opcodes
18542
+ // ALT = 5
18543
+ // CAT = 3
18544
+ // REP = 3
18545
+ // RNM = 6
18546
+ // TLS = 5
18547
+ // TBS = 1
18548
+ // TRG = 5
18549
+ // --- SABNF superset opcodes
18550
+ // UDT = 0
18551
+ // AND = 0
18552
+ // NOT = 0
18553
+ // characters = [0 - 1114111]
18554
+ // ```
18555
+ /* OBJECT IDENTIFIER (for internal parser use) */
18556
+ this.grammarObject = 'grammarObject';
18557
+
18558
+ /* RULES */
18559
+ this.rules = [];
18560
+ this.rules[0] = {
18561
+ name: 'json-pointer',
18562
+ lower: 'json-pointer',
18563
+ index: 0,
18564
+ isBkr: false
18565
+ };
18566
+ this.rules[1] = {
18567
+ name: 'reference-token',
18568
+ lower: 'reference-token',
18569
+ index: 1,
18570
+ isBkr: false
18571
+ };
18572
+ this.rules[2] = {
18573
+ name: 'unescaped',
18574
+ lower: 'unescaped',
18575
+ index: 2,
18576
+ isBkr: false
18577
+ };
18578
+ this.rules[3] = {
18579
+ name: 'escaped',
18580
+ lower: 'escaped',
18581
+ index: 3,
18582
+ isBkr: false
18583
+ };
18584
+ this.rules[4] = {
18585
+ name: 'array-location',
18586
+ lower: 'array-location',
18587
+ index: 4,
18588
+ isBkr: false
18589
+ };
18590
+ this.rules[5] = {
18591
+ name: 'array-index',
18592
+ lower: 'array-index',
18593
+ index: 5,
18594
+ isBkr: false
18595
+ };
18596
+ this.rules[6] = {
18597
+ name: 'array-dash',
18598
+ lower: 'array-dash',
18599
+ index: 6,
18600
+ isBkr: false
18601
+ };
18602
+ this.rules[7] = {
18603
+ name: 'slash',
18604
+ lower: 'slash',
18605
+ index: 7,
18606
+ isBkr: false
18607
+ };
18608
+
18609
+ /* UDTS */
18610
+ this.udts = [];
18611
+
18612
+ /* OPCODES */
18613
+ /* json-pointer */
18614
+ this.rules[0].opcodes = [];
18615
+ this.rules[0].opcodes[0] = {
18616
+ type: 3,
18617
+ min: 0,
18618
+ max: Infinity
18619
+ }; // REP
18620
+ this.rules[0].opcodes[1] = {
18621
+ type: 2,
18622
+ children: [2, 3]
18623
+ }; // CAT
18624
+ this.rules[0].opcodes[2] = {
18625
+ type: 4,
18626
+ index: 7
18627
+ }; // RNM(slash)
18628
+ this.rules[0].opcodes[3] = {
18629
+ type: 4,
18630
+ index: 1
18631
+ }; // RNM(reference-token)
18632
+
18633
+ /* reference-token */
18634
+ this.rules[1].opcodes = [];
18635
+ this.rules[1].opcodes[0] = {
18636
+ type: 3,
18637
+ min: 0,
18638
+ max: Infinity
18639
+ }; // REP
18640
+ this.rules[1].opcodes[1] = {
18641
+ type: 1,
18642
+ children: [2, 3]
18643
+ }; // ALT
18644
+ this.rules[1].opcodes[2] = {
18645
+ type: 4,
18646
+ index: 2
18647
+ }; // RNM(unescaped)
18648
+ this.rules[1].opcodes[3] = {
18649
+ type: 4,
18650
+ index: 3
18651
+ }; // RNM(escaped)
18652
+
18653
+ /* unescaped */
18654
+ this.rules[2].opcodes = [];
18655
+ this.rules[2].opcodes[0] = {
18656
+ type: 1,
18657
+ children: [1, 2, 3]
18658
+ }; // ALT
18659
+ this.rules[2].opcodes[1] = {
18660
+ type: 5,
18661
+ min: 0,
18662
+ max: 46
18663
+ }; // TRG
18664
+ this.rules[2].opcodes[2] = {
18665
+ type: 5,
18666
+ min: 48,
18667
+ max: 125
18668
+ }; // TRG
18669
+ this.rules[2].opcodes[3] = {
18670
+ type: 5,
18671
+ min: 127,
18672
+ max: 1114111
18673
+ }; // TRG
18674
+
18675
+ /* escaped */
18676
+ this.rules[3].opcodes = [];
18677
+ this.rules[3].opcodes[0] = {
18678
+ type: 2,
18679
+ children: [1, 2]
18680
+ }; // CAT
18681
+ this.rules[3].opcodes[1] = {
18682
+ type: 7,
18683
+ string: [126]
18684
+ }; // TLS
18685
+ this.rules[3].opcodes[2] = {
18686
+ type: 1,
18687
+ children: [3, 4]
18688
+ }; // ALT
18689
+ this.rules[3].opcodes[3] = {
18690
+ type: 7,
18691
+ string: [48]
18692
+ }; // TLS
18693
+ this.rules[3].opcodes[4] = {
18694
+ type: 7,
18695
+ string: [49]
18696
+ }; // TLS
18697
+
18698
+ /* array-location */
18699
+ this.rules[4].opcodes = [];
18700
+ this.rules[4].opcodes[0] = {
18701
+ type: 1,
18702
+ children: [1, 2]
18703
+ }; // ALT
18704
+ this.rules[4].opcodes[1] = {
18705
+ type: 4,
18706
+ index: 5
18707
+ }; // RNM(array-index)
18708
+ this.rules[4].opcodes[2] = {
18709
+ type: 4,
18710
+ index: 6
18711
+ }; // RNM(array-dash)
18712
+
18713
+ /* array-index */
18714
+ this.rules[5].opcodes = [];
18715
+ this.rules[5].opcodes[0] = {
18716
+ type: 1,
18717
+ children: [1, 2]
18718
+ }; // ALT
18719
+ this.rules[5].opcodes[1] = {
18720
+ type: 6,
18721
+ string: [48]
18722
+ }; // TBS
18723
+ this.rules[5].opcodes[2] = {
18724
+ type: 2,
18725
+ children: [3, 4]
18726
+ }; // CAT
18727
+ this.rules[5].opcodes[3] = {
18728
+ type: 5,
18729
+ min: 49,
18730
+ max: 57
18731
+ }; // TRG
18732
+ this.rules[5].opcodes[4] = {
18733
+ type: 3,
18734
+ min: 0,
18735
+ max: Infinity
18736
+ }; // REP
18737
+ this.rules[5].opcodes[5] = {
18738
+ type: 5,
18739
+ min: 48,
18740
+ max: 57
18741
+ }; // TRG
18742
+
18743
+ /* array-dash */
18744
+ this.rules[6].opcodes = [];
18745
+ this.rules[6].opcodes[0] = {
18746
+ type: 7,
18747
+ string: [45]
18748
+ }; // TLS
18749
+
18750
+ /* slash */
18751
+ this.rules[7].opcodes = [];
18752
+ this.rules[7].opcodes[0] = {
18753
+ type: 7,
18754
+ string: [47]
18755
+ }; // TLS
18756
+
18757
+ // The `toString()` function will display the original grammar file(s) that produced these opcodes.
18758
+ this.toString = function toString() {
18759
+ let str = "";
18760
+ str += "; JavaScript Object Notation (JSON) Pointer ABNF syntax\n";
18761
+ str += "; https://datatracker.ietf.org/doc/html/rfc6901\n";
18762
+ str += "json-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\n";
18763
+ str += "reference-token = *( unescaped / escaped )\n";
18764
+ str += "unescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n";
18765
+ str += " ; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'\n";
18766
+ str += "escaped = \"~\" ( \"0\" / \"1\" )\n";
18767
+ str += " ; representing '~' and '/', respectively\n";
18768
+ str += "\n";
18769
+ str += "; https://datatracker.ietf.org/doc/html/rfc6901#section-4\n";
18770
+ str += "array-location = array-index / array-dash\n";
18771
+ str += "array-index = %x30 / ( %x31-39 *(%x30-39) )\n";
18772
+ str += " ; \"0\", or digits without a leading \"0\"\n";
18773
+ str += "array-dash = \"-\"\n";
18774
+ str += "\n";
18775
+ str += "; Surrogate named rules\n";
18776
+ str += "slash = \"/\"\n";
18777
+ return str;
18778
+ };
18779
+ }
18780
+
18781
+ /***/ }),
18782
+
18215
18783
  /***/ 36882:
18216
18784
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18217
18785
 
@@ -18946,6 +19514,64 @@ class InfoVisitor extends (0,ts_mixer__WEBPACK_IMPORTED_MODULE_0__.Mixin)(_gener
18946
19514
 
18947
19515
  /***/ }),
18948
19516
 
19517
+ /***/ 39150:
19518
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19519
+
19520
+ "use strict";
19521
+ __webpack_require__.r(__webpack_exports__);
19522
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19523
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
19524
+ /* harmony export */ });
19525
+ /* harmony import */ var _EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59408);
19526
+ /* harmony import */ var _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2325);
19527
+
19528
+
19529
+ class JSONEvaluationRealm extends _EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
19530
+ name = 'json';
19531
+ isArray(node) {
19532
+ return Array.isArray(node);
19533
+ }
19534
+ isObject(node) {
19535
+ return typeof node === 'object' && node !== null && !this.isArray(node);
19536
+ }
19537
+ sizeOf(node) {
19538
+ if (this.isArray(node)) {
19539
+ return node.length;
19540
+ }
19541
+ if (this.isObject(node)) {
19542
+ return Object.keys(node).length;
19543
+ }
19544
+ return 0;
19545
+ }
19546
+ has(node, referenceToken) {
19547
+ if (this.isArray(node)) {
19548
+ const index = Number(referenceToken);
19549
+ const indexUint32 = index >>> 0;
19550
+ if (index !== indexUint32) {
19551
+ throw new _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](`Invalid array index "${referenceToken}": index must be an unsinged 32-bit integer`, {
19552
+ referenceToken,
19553
+ currentValue: node,
19554
+ realm: this.name
19555
+ });
19556
+ }
19557
+ return indexUint32 < this.sizeOf(node);
19558
+ }
19559
+ if (this.isObject(node)) {
19560
+ return Object.prototype.hasOwnProperty.call(node, referenceToken);
19561
+ }
19562
+ return false;
19563
+ }
19564
+ evaluate(node, referenceToken) {
19565
+ if (this.isArray(node)) {
19566
+ return node[Number(referenceToken)];
19567
+ }
19568
+ return node[referenceToken];
19569
+ }
19570
+ }
19571
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONEvaluationRealm);
19572
+
19573
+ /***/ }),
19574
+
18949
19575
  /***/ 39361:
18950
19576
  /***/ ((module) => {
18951
19577
 
@@ -19436,35 +20062,6 @@ class HeadersVisitor extends (0,ts_mixer__WEBPACK_IMPORTED_MODULE_0__.Mixin)(_ge
19436
20062
 
19437
20063
  /***/ }),
19438
20064
 
19439
- /***/ 41428:
19440
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19441
-
19442
- "use strict";
19443
- __webpack_require__.r(__webpack_exports__);
19444
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19445
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
19446
- /* harmony export */ });
19447
- /* harmony import */ var _JsonPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29217);
19448
-
19449
- /**
19450
- * @public
19451
- */
19452
- /**
19453
- * @public
19454
- */
19455
- class CompilationJsonPointerError extends _JsonPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
19456
- tokens;
19457
- constructor(message, structuredOptions) {
19458
- super(message, structuredOptions);
19459
- if (typeof structuredOptions !== 'undefined') {
19460
- this.tokens = [...structuredOptions.tokens];
19461
- }
19462
- }
19463
- }
19464
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CompilationJsonPointerError);
19465
-
19466
- /***/ }),
19467
-
19468
20065
  /***/ 41551:
19469
20066
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19470
20067
 
@@ -19760,6 +20357,21 @@ class Server extends _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.Objec
19760
20357
 
19761
20358
  /***/ }),
19762
20359
 
20360
+ /***/ 42144:
20361
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
20362
+
20363
+ "use strict";
20364
+ __webpack_require__.r(__webpack_exports__);
20365
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20366
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
20367
+ /* harmony export */ });
20368
+ /* harmony import */ var _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12008);
20369
+
20370
+ class JSONPointerCompileError extends _JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
20371
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerCompileError);
20372
+
20373
+ /***/ }),
20374
+
19763
20375
  /***/ 42937:
19764
20376
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
19765
20377
 
@@ -22683,6 +23295,1256 @@ class GenericMapping extends _Tag_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
22683
23295
 
22684
23296
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GenericMapping);
22685
23297
 
23298
+ /***/ }),
23299
+
23300
+ /***/ 51751:
23301
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23302
+
23303
+ "use strict";
23304
+ __webpack_require__.r(__webpack_exports__);
23305
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23306
+ /* harmony export */ Ast: () => (/* binding */ Ast),
23307
+ /* harmony export */ Parser: () => (/* binding */ Parser),
23308
+ /* harmony export */ Stats: () => (/* binding */ Stats),
23309
+ /* harmony export */ Trace: () => (/* binding */ Trace),
23310
+ /* harmony export */ identifiers: () => (/* binding */ identifiers),
23311
+ /* harmony export */ utilities: () => (/* binding */ utilities)
23312
+ /* harmony export */ });
23313
+ /* *************************************************************************************
23314
+ * copyright: Copyright (c) 2023 Lowell D. Thomas, all rights reserved
23315
+ * license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)
23316
+ *
23317
+ * Redistribution and use in source and binary forms, with or without
23318
+ * modification, are permitted provided that the following conditions are met:
23319
+ *
23320
+ * 1. Redistributions of source code must retain the above copyright notice, this
23321
+ * list of conditions and the following disclaimer.
23322
+ *
23323
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
23324
+ * this list of conditions and the following disclaimer in the documentation
23325
+ * and/or other materials provided with the distribution.
23326
+ *
23327
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23328
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23329
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23330
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23331
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23332
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23333
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23334
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23335
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23336
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23337
+ *
23338
+ * ********************************************************************************* */
23339
+
23340
+
23341
+ const Parser = function fnparser() {
23342
+ const id = identifiers;
23343
+ const utils = utilities;
23344
+ const p = this;
23345
+ const thisFileName = 'parser.js: Parser(): ';
23346
+ const systemData = function systemData() {
23347
+ this.state = id.ACTIVE;
23348
+ this.phraseLength = 0;
23349
+ this.refresh = () => {
23350
+ this.state = id.ACTIVE;
23351
+ this.phraseLength = 0;
23352
+ };
23353
+ };
23354
+ p.ast = undefined;
23355
+ p.stats = undefined;
23356
+ p.trace = undefined;
23357
+ p.callbacks = [];
23358
+ let lookAhead = 0;
23359
+ let treeDepth = 0;
23360
+ let maxTreeDepth = 0;
23361
+ let nodeHits = 0;
23362
+ let maxMatched = 0;
23363
+ let rules = undefined;
23364
+ let udts = undefined;
23365
+ let opcodes = undefined;
23366
+ let chars = undefined;
23367
+ let sysData = new systemData();
23368
+ let ruleCallbacks = undefined;
23369
+ let udtCallbacks = undefined;
23370
+ let userData = undefined;
23371
+ const clear = () => {
23372
+ lookAhead = 0;
23373
+ treeDepth = 0;
23374
+ maxTreeDepth = 0;
23375
+ nodeHits = 0;
23376
+ maxMatched = 0;
23377
+ rules = undefined;
23378
+ udts = undefined;
23379
+ opcodes = undefined;
23380
+ chars = undefined;
23381
+ sysData.refresh();
23382
+ ruleCallbacks = undefined;
23383
+ udtCallbacks = undefined;
23384
+ userData = undefined;
23385
+ };
23386
+
23387
+ const initializeCallbacks = () => {
23388
+ const functionName = `${thisFileName}initializeCallbacks(): `;
23389
+ let i;
23390
+ ruleCallbacks = [];
23391
+ udtCallbacks = [];
23392
+ for (i = 0; i < rules.length; i += 1) {
23393
+ ruleCallbacks[i] = undefined;
23394
+ }
23395
+ for (i = 0; i < udts.length; i += 1) {
23396
+ udtCallbacks[i] = undefined;
23397
+ }
23398
+ let func;
23399
+ const list = [];
23400
+ for (i = 0; i < rules.length; i += 1) {
23401
+ list.push(rules[i].lower);
23402
+ }
23403
+ for (i = 0; i < udts.length; i += 1) {
23404
+ list.push(udts[i].lower);
23405
+ }
23406
+ for (const index in p.callbacks) {
23407
+ if (p.callbacks.hasOwnProperty(index)) {
23408
+ i = list.indexOf(index.toLowerCase());
23409
+ if (i < 0) {
23410
+ throw new Error(`${functionName}syntax callback '${index}' not a rule or udt name`);
23411
+ }
23412
+ func = p.callbacks[index] ? p.callbacks[index] : undefined;
23413
+ if (typeof func === 'function' || func === undefined) {
23414
+ if (i < rules.length) {
23415
+ ruleCallbacks[i] = func;
23416
+ } else {
23417
+ udtCallbacks[i - rules.length] = func;
23418
+ }
23419
+ } else {
23420
+ throw new Error(`${functionName}syntax callback[${index}] must be function reference or falsy)`);
23421
+ }
23422
+ }
23423
+ }
23424
+ };
23425
+
23426
+ p.parse = (grammar, startName, inputString, callbackData) => {
23427
+ const functionName = `${thisFileName}parse(): `;
23428
+ clear();
23429
+ chars = utils.stringToChars(inputString);
23430
+ rules = grammar.rules;
23431
+ udts = grammar.udts;
23432
+ const lower = startName.toLowerCase();
23433
+ let startIndex = undefined;
23434
+ for (const i in rules) {
23435
+ if (rules.hasOwnProperty(i)) {
23436
+ if (lower === rules[i].lower) {
23437
+ startIndex = rules[i].index;
23438
+ break;
23439
+ }
23440
+ }
23441
+ }
23442
+ if (startIndex === undefined) {
23443
+ throw new Error(`${functionName}start rule name '${startRule}' not recognized`);
23444
+ }
23445
+ initializeCallbacks();
23446
+ if (p.trace) {
23447
+ p.trace.init(rules, udts, chars);
23448
+ }
23449
+ if (p.stats) {
23450
+ p.stats.init(rules, udts);
23451
+ }
23452
+ if (p.ast) {
23453
+ p.ast.init(rules, udts, chars);
23454
+ }
23455
+ userData = callbackData;
23456
+ /* create a dummy opcode for the start rule */
23457
+ opcodes = [
23458
+ {
23459
+ type: id.RNM,
23460
+ index: startIndex,
23461
+ },
23462
+ ];
23463
+ /* execute the start rule */
23464
+ opExecute(0, 0);
23465
+ opcodes = undefined;
23466
+ /* test and return the sysData */
23467
+ let success = false;
23468
+ switch (sysData.state) {
23469
+ case id.ACTIVE:
23470
+ throw new Error(`${functionName}final state should never be 'ACTIVE'`);
23471
+ case id.NOMATCH:
23472
+ success = false;
23473
+ break;
23474
+ case id.EMPTY:
23475
+ case id.MATCH:
23476
+ if (sysData.phraseLength === chars.length) {
23477
+ success = true;
23478
+ } else {
23479
+ success = false;
23480
+ }
23481
+ break;
23482
+ default:
23483
+ throw new Error('unrecognized state');
23484
+ }
23485
+ return {
23486
+ success,
23487
+ state: sysData.state,
23488
+ stateName: id.idName(sysData.state),
23489
+ length: chars.length,
23490
+ matched: sysData.phraseLength,
23491
+ maxMatched,
23492
+ maxTreeDepth,
23493
+ nodeHits,
23494
+ };
23495
+ };
23496
+ // The `ALT` operator.<br>
23497
+ // Executes its child nodes, from left to right, until it finds a match.
23498
+ // Fails if *all* of its child nodes fail.
23499
+ const opALT = (opIndex, phraseIndex) => {
23500
+ const op = opcodes[opIndex];
23501
+ for (let i = 0; i < op.children.length; i += 1) {
23502
+ opExecute(op.children[i], phraseIndex);
23503
+ if (sysData.state !== id.NOMATCH) {
23504
+ break;
23505
+ }
23506
+ }
23507
+ };
23508
+ // The `CAT` operator.<br>
23509
+ // Executes all of its child nodes, from left to right,
23510
+ // concatenating the matched phrases.
23511
+ // Fails if *any* child nodes fail.
23512
+ const opCAT = (opIndex, phraseIndex) => {
23513
+ let success;
23514
+ let astLength;
23515
+ let catCharIndex;
23516
+ let catPhrase;
23517
+ const op = opcodes[opIndex];
23518
+ if (p.ast) {
23519
+ astLength = p.ast.getLength();
23520
+ }
23521
+ success = true;
23522
+ catCharIndex = phraseIndex;
23523
+ catPhrase = 0;
23524
+ for (let i = 0; i < op.children.length; i += 1) {
23525
+ opExecute(op.children[i], catCharIndex);
23526
+ if (sysData.state === id.NOMATCH) {
23527
+ success = false;
23528
+ break;
23529
+ } else {
23530
+ catCharIndex += sysData.phraseLength;
23531
+ catPhrase += sysData.phraseLength;
23532
+ }
23533
+ }
23534
+ if (success) {
23535
+ sysData.state = catPhrase === 0 ? id.EMPTY : id.MATCH;
23536
+ sysData.phraseLength = catPhrase;
23537
+ } else {
23538
+ sysData.state = id.NOMATCH;
23539
+ sysData.phraseLength = 0;
23540
+ if (p.ast) {
23541
+ p.ast.setLength(astLength);
23542
+ }
23543
+ }
23544
+ };
23545
+ // The `REP` operator.<br>
23546
+ // Repeatedly executes its single child node,
23547
+ // concatenating each of the matched phrases found.
23548
+ // The number of repetitions executed and its final sysData depends
23549
+ // on its `min` & `max` repetition values.
23550
+ const opREP = (opIndex, phraseIndex) => {
23551
+ let astLength;
23552
+ let repCharIndex;
23553
+ let repPhrase;
23554
+ let repCount;
23555
+ const op = opcodes[opIndex];
23556
+ if (op.max === 0) {
23557
+ // this is an empty-string acceptor
23558
+ // deprecated: use the TLS empty string operator, "", instead
23559
+ sysData.state = id.EMPTY;
23560
+ sysData.phraseLength = 0;
23561
+ return;
23562
+ }
23563
+ repCharIndex = phraseIndex;
23564
+ repPhrase = 0;
23565
+ repCount = 0;
23566
+ if (p.ast) {
23567
+ astLength = p.ast.getLength();
23568
+ }
23569
+ while (1) {
23570
+ if (repCharIndex >= chars.length) {
23571
+ /* exit on end of input string */
23572
+ break;
23573
+ }
23574
+ opExecute(opIndex + 1, repCharIndex);
23575
+ if (sysData.state === id.NOMATCH) {
23576
+ /* always end if the child node fails */
23577
+ break;
23578
+ }
23579
+ if (sysData.state === id.EMPTY) {
23580
+ /* REP always succeeds when the child node returns an empty phrase */
23581
+ /* this may not seem obvious, but that's the way it works out */
23582
+ break;
23583
+ }
23584
+ repCount += 1;
23585
+ repPhrase += sysData.phraseLength;
23586
+ repCharIndex += sysData.phraseLength;
23587
+ if (repCount === op.max) {
23588
+ /* end on maxed out reps */
23589
+ break;
23590
+ }
23591
+ }
23592
+ /* evaluate the match count according to the min, max values */
23593
+ if (sysData.state === id.EMPTY) {
23594
+ sysData.state = repPhrase === 0 ? id.EMPTY : id.MATCH;
23595
+ sysData.phraseLength = repPhrase;
23596
+ } else if (repCount >= op.min) {
23597
+ sysData.state = repPhrase === 0 ? id.EMPTY : id.MATCH;
23598
+ sysData.phraseLength = repPhrase;
23599
+ } else {
23600
+ sysData.state = id.NOMATCH;
23601
+ sysData.phraseLength = 0;
23602
+ if (p.ast) {
23603
+ p.ast.setLength(astLength);
23604
+ }
23605
+ }
23606
+ };
23607
+ // Validate the callback function's returned sysData values.
23608
+ // It's the user's responsibility to get them right
23609
+ // but `RNM` fails if not.
23610
+ const validateRnmCallbackResult = (rule, sysData, charsLeft, down) => {
23611
+ if (sysData.phraseLength > charsLeft) {
23612
+ let str = `${thisFileName}opRNM(${rule.name}): callback function error: `;
23613
+ str += `sysData.phraseLength: ${sysData.phraseLength}`;
23614
+ str += ` must be <= remaining chars: ${charsLeft}`;
23615
+ throw new Error(str);
23616
+ }
23617
+ switch (sysData.state) {
23618
+ case id.ACTIVE:
23619
+ if (!down) {
23620
+ throw new Error(
23621
+ `${thisFileName}opRNM(${rule.name}): callback function return error. ACTIVE state not allowed.`
23622
+ );
23623
+ }
23624
+ break;
23625
+ case id.EMPTY:
23626
+ sysData.phraseLength = 0;
23627
+ break;
23628
+ case id.MATCH:
23629
+ if (sysData.phraseLength === 0) {
23630
+ sysData.state = id.EMPTY;
23631
+ }
23632
+ break;
23633
+ case id.NOMATCH:
23634
+ sysData.phraseLength = 0;
23635
+ break;
23636
+ default:
23637
+ throw new Error(
23638
+ `${thisFileName}opRNM(${rule.name}): callback function return error. Unrecognized return state: ${sysData.state}`
23639
+ );
23640
+ }
23641
+ };
23642
+ // The `RNM` operator.<br>
23643
+ // This operator will acts as a root node for a parse tree branch below and
23644
+ // returns the matched phrase to its parent.
23645
+ // However, its larger responsibility is handling user-defined callback functions and `AST` nodes.
23646
+ // Note that the `AST` is a separate object, but `RNM` calls its functions to create its nodes.
23647
+ const opRNM = (opIndex, phraseIndex) => {
23648
+ let astLength;
23649
+ let astDefined;
23650
+ let savedOpcodes;
23651
+ const op = opcodes[opIndex];
23652
+ const rule = rules[op.index];
23653
+ const callback = ruleCallbacks[rule.index];
23654
+ /* ignore AST in look ahead (AND or NOT operator above) */
23655
+ if (!lookAhead) {
23656
+ astDefined = p.ast && p.ast.ruleDefined(op.index);
23657
+ if (astDefined) {
23658
+ astLength = p.ast.getLength();
23659
+ p.ast.down(op.index, rules[op.index].name);
23660
+ }
23661
+ }
23662
+ if (callback) {
23663
+ /* call user's callback going down the parse tree*/
23664
+ const charsLeft = chars.length - phraseIndex;
23665
+ callback(sysData, chars, phraseIndex, userData);
23666
+ validateRnmCallbackResult(rule, sysData, charsLeft, true);
23667
+ if (sysData.state === id.ACTIVE) {
23668
+ savedOpcodes = opcodes;
23669
+ opcodes = rule.opcodes;
23670
+ opExecute(0, phraseIndex);
23671
+ opcodes = savedOpcodes;
23672
+ /* call user's callback going up the parse tree*/
23673
+ callback(sysData, chars, phraseIndex, userData);
23674
+ validateRnmCallbackResult(rule, sysData, charsLeft, false);
23675
+ } /* implied else clause: just accept the callback sysData - RNM acting as UDT */
23676
+ } else {
23677
+ /* no callback - just execute the rule */
23678
+ savedOpcodes = opcodes;
23679
+ opcodes = rule.opcodes;
23680
+ opExecute(0, phraseIndex, sysData);
23681
+ opcodes = savedOpcodes;
23682
+ }
23683
+ if (!lookAhead) {
23684
+ /* end AST */
23685
+ if (astDefined) {
23686
+ if (sysData.state === id.NOMATCH) {
23687
+ p.ast.setLength(astLength);
23688
+ } else {
23689
+ p.ast.up(op.index, rule.name, phraseIndex, sysData.phraseLength);
23690
+ }
23691
+ }
23692
+ }
23693
+ };
23694
+ // The `TRG` operator.<br>
23695
+ // Succeeds if the single first character of the phrase is
23696
+ // within the `min - max` range.
23697
+ const opTRG = (opIndex, phraseIndex) => {
23698
+ const op = opcodes[opIndex];
23699
+ sysData.state = id.NOMATCH;
23700
+ if (phraseIndex < chars.length) {
23701
+ if (op.min <= chars[phraseIndex] && chars[phraseIndex] <= op.max) {
23702
+ sysData.state = id.MATCH;
23703
+ sysData.phraseLength = 1;
23704
+ }
23705
+ }
23706
+ };
23707
+ // The `TBS` operator.<br>
23708
+ // Matches its pre-defined phrase against the input string.
23709
+ // All characters must match exactly.
23710
+ // Case-sensitive literal strings (`'string'` & `%s"string"`) are translated to `TBS`
23711
+ // operators by `apg`.
23712
+ // Phrase length of zero is not allowed.
23713
+ // Empty phrases can only be defined with `TLS` operators.
23714
+ const opTBS = (opIndex, phraseIndex) => {
23715
+ const op = opcodes[opIndex];
23716
+ const len = op.string.length;
23717
+ sysData.state = id.NOMATCH;
23718
+ if (phraseIndex + len <= chars.length) {
23719
+ for (let i = 0; i < len; i += 1) {
23720
+ if (chars[phraseIndex + i] !== op.string[i]) {
23721
+ return;
23722
+ }
23723
+ }
23724
+ sysData.state = id.MATCH;
23725
+ sysData.phraseLength = len;
23726
+ } /* implied else NOMATCH */
23727
+ };
23728
+ // The `TLS` operator.<br>
23729
+ // Matches its pre-defined phrase against the input string.
23730
+ // A case-insensitive match is attempted for ASCII alphbetical characters.
23731
+ // `TLS` is the only operator that explicitly allows empty phrases.
23732
+ // `apg` will fail for empty `TBS`, case-sensitive strings (`''`) or
23733
+ // zero repetitions (`0*0RuleName` or `0RuleName`).
23734
+ const opTLS = (opIndex, phraseIndex) => {
23735
+ let code;
23736
+ const op = opcodes[opIndex];
23737
+ sysData.state = id.NOMATCH;
23738
+ const len = op.string.length;
23739
+ if (len === 0) {
23740
+ /* EMPTY match allowed for TLS */
23741
+ sysData.state = id.EMPTY;
23742
+ return;
23743
+ }
23744
+ if (phraseIndex + len <= chars.length) {
23745
+ for (let i = 0; i < len; i += 1) {
23746
+ code = chars[phraseIndex + i];
23747
+ if (code >= 65 && code <= 90) {
23748
+ code += 32;
23749
+ }
23750
+ if (code !== op.string[i]) {
23751
+ return;
23752
+ }
23753
+ }
23754
+ sysData.state = id.MATCH;
23755
+ sysData.phraseLength = len;
23756
+ } /* implied else NOMATCH */
23757
+ };
23758
+ // Validate the callback function's returned sysData values.
23759
+ // It's the user's responsibility to get it right but `UDT` fails if not.
23760
+ const validateUdtCallbackResult = (udt, sysData, charsLeft) => {
23761
+ if (sysData.phraseLength > charsLeft) {
23762
+ let str = `${thisFileName}opUDT(${udt.name}): callback function error: `;
23763
+ str += `sysData.phraseLength: ${sysData.phraseLength}`;
23764
+ str += ` must be <= remaining chars: ${charsLeft}`;
23765
+ throw new Error(str);
23766
+ }
23767
+ switch (sysData.state) {
23768
+ case id.ACTIVE:
23769
+ throw new Error(`${thisFileName}opUDT(${udt.name}) ACTIVE state return not allowed.`);
23770
+ case id.EMPTY:
23771
+ if (udt.empty) {
23772
+ sysData.phraseLength = 0;
23773
+ } else {
23774
+ throw new Error(`${thisFileName}opUDT(${udt.name}) may not return EMPTY.`);
23775
+ }
23776
+ break;
23777
+ case id.MATCH:
23778
+ if (sysData.phraseLength === 0) {
23779
+ if (udt.empty) {
23780
+ sysData.state = id.EMPTY;
23781
+ } else {
23782
+ throw new Error(`${thisFileName}opUDT(${udt.name}) may not return EMPTY.`);
23783
+ }
23784
+ }
23785
+ break;
23786
+ case id.NOMATCH:
23787
+ sysData.phraseLength = 0;
23788
+ break;
23789
+ default:
23790
+ throw new Error(
23791
+ `${thisFileName}opUDT(${udt.name}): callback function return error. Unrecognized return state: ${sysData.state}`
23792
+ );
23793
+ }
23794
+ };
23795
+ // The `UDT` operator.<br>
23796
+ // Simply calls the user's callback function, but operates like `RNM` with regard to the `AST`
23797
+ // and back referencing.
23798
+ // There is some ambiguity here. `UDT`s act as terminals for phrase recognition but as named rules
23799
+ // for `AST` nodes and back referencing.
23800
+ // See [`ast.js`](./ast.html) for usage.
23801
+ const opUDT = (opIndex, phraseIndex) => {
23802
+ let astLength;
23803
+ let astIndex;
23804
+ let astDefined;
23805
+ const op = opcodes[opIndex];
23806
+ const udt = udts[op.index];
23807
+ sysData.UdtIndex = udt.index;
23808
+ /* ignore AST in look ahead */
23809
+ if (!lookAhead) {
23810
+ astDefined = p.ast && p.ast.udtDefined(op.index);
23811
+ if (astDefined) {
23812
+ astIndex = rules.length + op.index;
23813
+ astLength = p.ast.getLength();
23814
+ p.ast.down(astIndex, udt.name);
23815
+ }
23816
+ }
23817
+ /* call the UDT */
23818
+ const charsLeft = chars.length - phraseIndex;
23819
+ udtCallbacks[op.index](sysData, chars, phraseIndex, userData);
23820
+ validateUdtCallbackResult(udt, sysData, charsLeft);
23821
+ if (!lookAhead) {
23822
+ /* end AST */
23823
+ if (astDefined) {
23824
+ if (sysData.state === id.NOMATCH) {
23825
+ p.ast.setLength(astLength);
23826
+ } else {
23827
+ p.ast.up(astIndex, udt.name, phraseIndex, sysData.phraseLength);
23828
+ }
23829
+ }
23830
+ }
23831
+ };
23832
+ // The `AND` operator.<br>
23833
+ // This is the positive `look ahead` operator.
23834
+ // Executes its single child node, returning the EMPTY state
23835
+ // if it succeedsand NOMATCH if it fails.
23836
+ // *Always* backtracks on any matched phrase and returns EMPTY on success.
23837
+ const opAND = (opIndex, phraseIndex) => {
23838
+ lookAhead += 1;
23839
+ opExecute(opIndex + 1, phraseIndex);
23840
+ lookAhead -= 1;
23841
+ sysData.phraseLength = 0;
23842
+ switch (sysData.state) {
23843
+ case id.EMPTY:
23844
+ sysData.state = id.EMPTY;
23845
+ break;
23846
+ case id.MATCH:
23847
+ sysData.state = id.EMPTY;
23848
+ break;
23849
+ case id.NOMATCH:
23850
+ sysData.state = id.NOMATCH;
23851
+ break;
23852
+ default:
23853
+ throw new Error(`opAND: invalid state ${sysData.state}`);
23854
+ }
23855
+ };
23856
+ // The `NOT` operator.<br>
23857
+ // This is the negative `look ahead` operator.
23858
+ // Executes its single child node, returning the EMPTY state
23859
+ // if it *fails* and NOMATCH if it succeeds.
23860
+ // *Always* backtracks on any matched phrase and returns EMPTY
23861
+ // on success (failure of its child node).
23862
+ const opNOT = (opIndex, phraseIndex) => {
23863
+ lookAhead += 1;
23864
+ opExecute(opIndex + 1, phraseIndex);
23865
+ lookAhead -= 1;
23866
+ sysData.phraseLength = 0;
23867
+ switch (sysData.state) {
23868
+ case id.EMPTY:
23869
+ case id.MATCH:
23870
+ sysData.state = id.NOMATCH;
23871
+ break;
23872
+ case id.NOMATCH:
23873
+ sysData.state = id.EMPTY;
23874
+ break;
23875
+ default:
23876
+ throw new Error(`opNOT: invalid state ${sysData.state}`);
23877
+ }
23878
+ };
23879
+
23880
+ const opExecute = (opIndex, phraseIndex) => {
23881
+ const functionName = `${thisFileName}opExecute(): `;
23882
+ const op = opcodes[opIndex];
23883
+ nodeHits += 1;
23884
+ if (treeDepth > maxTreeDepth) {
23885
+ maxTreeDepth = treeDepth;
23886
+ }
23887
+ treeDepth += 1;
23888
+ sysData.refresh();
23889
+ if (p.trace) {
23890
+ p.trace.down(op, phraseIndex);
23891
+ }
23892
+ switch (op.type) {
23893
+ case id.ALT:
23894
+ opALT(opIndex, phraseIndex);
23895
+ break;
23896
+ case id.CAT:
23897
+ opCAT(opIndex, phraseIndex);
23898
+ break;
23899
+ case id.REP:
23900
+ opREP(opIndex, phraseIndex);
23901
+ break;
23902
+ case id.RNM:
23903
+ opRNM(opIndex, phraseIndex);
23904
+ break;
23905
+ case id.TRG:
23906
+ opTRG(opIndex, phraseIndex);
23907
+ break;
23908
+ case id.TBS:
23909
+ opTBS(opIndex, phraseIndex);
23910
+ break;
23911
+ case id.TLS:
23912
+ opTLS(opIndex, phraseIndex);
23913
+ break;
23914
+ case id.UDT:
23915
+ opUDT(opIndex, phraseIndex);
23916
+ break;
23917
+ case id.AND:
23918
+ opAND(opIndex, phraseIndex);
23919
+ break;
23920
+ case id.NOT:
23921
+ opNOT(opIndex, phraseIndex);
23922
+ break;
23923
+ default:
23924
+ throw new Error(`${functionName}unrecognized operator`);
23925
+ }
23926
+ if (!lookAhead) {
23927
+ if (phraseIndex + sysData.phraseLength > maxMatched) {
23928
+ maxMatched = phraseIndex + sysData.phraseLength;
23929
+ }
23930
+ }
23931
+ if (p.stats) {
23932
+ p.stats.collect(op, sysData);
23933
+ }
23934
+ if (p.trace) {
23935
+ p.trace.up(op, sysData.state, phraseIndex, sysData.phraseLength);
23936
+ }
23937
+ treeDepth -= 1;
23938
+ };
23939
+ };
23940
+
23941
+ const Ast = function fnast() {
23942
+ const thisFileName = 'parser.js: Ast()): ';
23943
+ const id = identifiers;
23944
+ const utils = utilities;
23945
+ const a = this;
23946
+ let rules = undefined;
23947
+ let udts = undefined;
23948
+ let chars = undefined;
23949
+ let nodeCount = 0;
23950
+ const nodeCallbacks = [];
23951
+ const stack = [];
23952
+ const records = [];
23953
+ a.callbacks = [];
23954
+ /* called by the parser to initialize the AST with the rules, UDTs and the input characters */
23955
+ a.init = (rulesIn, udtsIn, charsIn) => {
23956
+ stack.length = 0;
23957
+ records.length = 0;
23958
+ nodeCount = 0;
23959
+ rules = rulesIn;
23960
+ udts = udtsIn;
23961
+ chars = charsIn;
23962
+ let i;
23963
+ const list = [];
23964
+ for (i = 0; i < rules.length; i += 1) {
23965
+ list.push(rules[i].lower);
23966
+ }
23967
+ for (i = 0; i < udts.length; i += 1) {
23968
+ list.push(udts[i].lower);
23969
+ }
23970
+ nodeCount = rules.length + udts.length;
23971
+ for (i = 0; i < nodeCount; i += 1) {
23972
+ nodeCallbacks[i] = undefined;
23973
+ }
23974
+ for (const index in a.callbacks) {
23975
+ if (a.callbacks.hasOwnProperty(index)) {
23976
+ const lower = index.toLowerCase();
23977
+ i = list.indexOf(lower);
23978
+ if (i < 0) {
23979
+ throw new Error(`${thisFileName}init: node '${index}' not a rule or udt name`);
23980
+ }
23981
+ nodeCallbacks[i] = a.callbacks[index];
23982
+ }
23983
+ }
23984
+ };
23985
+ /* AST node rule callbacks - called by the parser's `RNM` operator */
23986
+ a.ruleDefined = (index) => !!nodeCallbacks[index];
23987
+ /* AST node UDT callbacks - called by the parser's `UDT` operator */
23988
+ a.udtDefined = (index) => !!nodeCallbacks[rules.length + index];
23989
+ /* called by the parser's `RNM` & `UDT` operators
23990
+ builds a record for the downward traversal of the node */
23991
+ a.down = (callbackIndex, name) => {
23992
+ const thisIndex = records.length;
23993
+ stack.push(thisIndex);
23994
+ records.push({
23995
+ name,
23996
+ thisIndex,
23997
+ thatIndex: undefined,
23998
+ state: id.SEM_PRE,
23999
+ callbackIndex,
24000
+ phraseIndex: undefined,
24001
+ phraseLength: undefined,
24002
+ stack: stack.length,
24003
+ });
24004
+ return thisIndex;
24005
+ };
24006
+ /* called by the parser's `RNM` & `UDT` operators */
24007
+ /* builds a record for the upward traversal of the node */
24008
+ a.up = (callbackIndex, name, phraseIndex, phraseLength) => {
24009
+ const thisIndex = records.length;
24010
+ const thatIndex = stack.pop();
24011
+ records.push({
24012
+ name,
24013
+ thisIndex,
24014
+ thatIndex,
24015
+ state: id.SEM_POST,
24016
+ callbackIndex,
24017
+ phraseIndex,
24018
+ phraseLength,
24019
+ stack: stack.length,
24020
+ });
24021
+ records[thatIndex].thatIndex = thisIndex;
24022
+ records[thatIndex].phraseIndex = phraseIndex;
24023
+ records[thatIndex].phraseLength = phraseLength;
24024
+ return thisIndex;
24025
+ };
24026
+ // Called by the user to translate the AST.
24027
+ // Translate means to associate or apply some semantic action to the
24028
+ // phrases that were syntactically matched to the AST nodes according
24029
+ // to the defining grammar.
24030
+ // ```
24031
+ // data - optional user-defined data
24032
+ // passed to the callback functions by the translator
24033
+ // ```
24034
+ a.translate = (data) => {
24035
+ let ret;
24036
+ let callback;
24037
+ let record;
24038
+ for (let i = 0; i < records.length; i += 1) {
24039
+ record = records[i];
24040
+ callback = nodeCallbacks[record.callbackIndex];
24041
+ if (callback) {
24042
+ if (record.state === id.SEM_PRE) {
24043
+ callback(id.SEM_PRE, chars, record.phraseIndex, record.phraseLength, data);
24044
+ } else if (callback) {
24045
+ callback(id.SEM_POST, chars, record.phraseIndex, record.phraseLength, data);
24046
+ }
24047
+ }
24048
+ }
24049
+ };
24050
+ /* called by the parser to reset the length of the records array */
24051
+ /* necessary on backtracking */
24052
+ a.setLength = (length) => {
24053
+ records.length = length;
24054
+ if (length > 0) {
24055
+ stack.length = records[length - 1].stack;
24056
+ } else {
24057
+ stack.length = 0;
24058
+ }
24059
+ };
24060
+ /* called by the parser to get the length of the records array */
24061
+ a.getLength = () => records.length;
24062
+ /* helper for XML display */
24063
+ function indent(n) {
24064
+ let ret = '';
24065
+ while (n-- > 0) {
24066
+ ret += ' ';
24067
+ }
24068
+ return ret;
24069
+ }
24070
+ // Generate an `XML` version of the AST.
24071
+ // Useful if you want to use a special or favorite XML parser to translate the
24072
+ // AST. Node data are JavaScript strings.
24073
+ a.toXml = () => {
24074
+ let xml = '';
24075
+ let depth = 0;
24076
+ xml += '<?xml version="1.0" encoding="utf-8"?>\n';
24077
+ xml += `<root nodes="${records.length / 2}" characters="${chars.length}">\n`;
24078
+ xml += `<!-- input string -->\n`;
24079
+ xml += indent(depth + 2);
24080
+ xml += utils.charsToString(chars);
24081
+ xml += '\n';
24082
+ records.forEach((rec) => {
24083
+ if (rec.state === id.SEM_PRE) {
24084
+ depth += 1;
24085
+ xml += indent(depth);
24086
+ xml += `<node name="${rec.name}" index="${rec.phraseIndex}" length="${rec.phraseLength}">\n`;
24087
+ xml += indent(depth + 2);
24088
+ xml += utils.charsToString(chars, rec.phraseIndex, rec.phraseLength);
24089
+ xml += '\n';
24090
+ } else {
24091
+ xml += indent(depth);
24092
+ xml += `</node><!-- name="${rec.name}" -->\n`;
24093
+ depth -= 1;
24094
+ }
24095
+ });
24096
+
24097
+ xml += '</root>\n';
24098
+ return xml;
24099
+ };
24100
+ };
24101
+
24102
+ const Trace = function fntrace() {
24103
+ const id = identifiers;
24104
+ const utils = utilities;
24105
+ const thisFile = 'parser.js: Trace(): ';
24106
+ let chars = undefined;
24107
+ let rules = undefined;
24108
+ let udts = undefined;
24109
+ let out = '';
24110
+ let treeDepth = 0;
24111
+ const MAX_PHRASE = 100;
24112
+ const t = this;
24113
+ const indent = (n) => {
24114
+ let ret = '';
24115
+ let count = 0;
24116
+ if (n >= 0) {
24117
+ while (n--) {
24118
+ count += 1;
24119
+ if (count === 5) {
24120
+ ret += '|';
24121
+ count = 0;
24122
+ } else {
24123
+ ret += '.';
24124
+ }
24125
+ }
24126
+ }
24127
+ return ret;
24128
+ };
24129
+ t.init = (r, u, c) => {
24130
+ rules = r;
24131
+ udts = u;
24132
+ chars = c;
24133
+ };
24134
+ const opName = (op) => {
24135
+ let name;
24136
+ switch (op.type) {
24137
+ case id.ALT:
24138
+ name = 'ALT';
24139
+ break;
24140
+ case id.CAT:
24141
+ name = 'CAT';
24142
+ break;
24143
+ case id.REP:
24144
+ if (op.max === Infinity) {
24145
+ name = `REP(${op.min},inf)`;
24146
+ } else {
24147
+ name = `REP(${op.min},${op.max})`;
24148
+ }
24149
+ break;
24150
+ case id.RNM:
24151
+ name = `RNM(${rules[op.index].name})`;
24152
+ break;
24153
+ case id.TRG:
24154
+ name = `TRG(${op.min},${op.max})`;
24155
+ break;
24156
+ case id.TBS:
24157
+ if (op.string.length > 6) {
24158
+ name = `TBS(${utils.charsToString(op.string, 0, 3)}...)`;
24159
+ } else {
24160
+ name = `TBS(${utils.charsToString(op.string, 0, 6)})`;
24161
+ }
24162
+ break;
24163
+ case id.TLS:
24164
+ if (op.string.length > 6) {
24165
+ name = `TLS(${utils.charsToString(op.string, 0, 3)}...)`;
24166
+ } else {
24167
+ name = `TLS(${utils.charsToString(op.string, 0, 6)})`;
24168
+ }
24169
+ break;
24170
+ case id.UDT:
24171
+ name = `UDT(${udts[op.index].name})`;
24172
+ break;
24173
+ case id.AND:
24174
+ name = 'AND';
24175
+ break;
24176
+ case id.NOT:
24177
+ name = 'NOT';
24178
+ break;
24179
+ default:
24180
+ throw new Error(`${thisFile}Trace: opName: unrecognized opcode`);
24181
+ }
24182
+ return name;
24183
+ };
24184
+ t.down = (op, offset) => {
24185
+ const lead = indent(treeDepth);
24186
+ const len = Math.min(MAX_PHRASE, chars.length - offset);
24187
+ let phrase = utils.charsToString(chars, offset, len);
24188
+ if (len < chars.length - offset) {
24189
+ phrase += '...';
24190
+ }
24191
+ phrase = `${lead}|-|[${opName(op)}]${phrase}\n`;
24192
+ out += phrase;
24193
+ treeDepth += 1;
24194
+ };
24195
+ t.up = (op, state, offset, phraseLength) => {
24196
+ const thisFunc = `${thisFile}trace.up: `;
24197
+ treeDepth -= 1;
24198
+ const lead = indent(treeDepth);
24199
+ let len;
24200
+ let phrase;
24201
+ let st;
24202
+ switch (state) {
24203
+ case id.EMPTY:
24204
+ st = '|E|';
24205
+ phrase = `''`;
24206
+ break;
24207
+ case id.MATCH:
24208
+ st = '|M|';
24209
+ len = Math.min(MAX_PHRASE, phraseLength);
24210
+ if (len < phraseLength) {
24211
+ phrase = `'${utils.charsToString(chars, offset, len)}...'`;
24212
+ } else {
24213
+ phrase = `'${utils.charsToString(chars, offset, len)}'`;
24214
+ }
24215
+ break;
24216
+ case id.NOMATCH:
24217
+ st = '|N|';
24218
+ phrase = '';
24219
+ break;
24220
+ default:
24221
+ throw new Error(`${thisFunc} unrecognized state`);
24222
+ }
24223
+ phrase = `${lead}${st}[${opName(op)}]${phrase}\n`;
24224
+ out += phrase;
24225
+ };
24226
+ t.displayTrace = () => out;
24227
+ };
24228
+
24229
+ const Stats = function fnstats() {
24230
+ const id = identifiers;
24231
+ const thisFileName = 'parser.js: Stats(): ';
24232
+ let rules;
24233
+ let udts;
24234
+ let totals;
24235
+ const stats = [];
24236
+ const ruleStats = [];
24237
+ const udtStats = [];
24238
+ /* called by parser to initialize the stats */
24239
+ this.init = (r, u) => {
24240
+ rules = r;
24241
+ udts = u;
24242
+ clear();
24243
+ };
24244
+ /* This function is the main interaction with the parser. */
24245
+ /* The parser calls it after each node has been traversed. */
24246
+ this.collect = (op, sys) => {
24247
+ incStat(totals, sys.state, sys.phraseLength);
24248
+ incStat(stats[op.type], sys.state, sys.phraseLength);
24249
+ if (op.type === id.RNM) {
24250
+ incStat(ruleStats[op.index], sys.state, sys.phraseLength);
24251
+ }
24252
+ if (op.type === id.UDT) {
24253
+ incStat(udtStats[op.index], sys.state, sys.phraseLength);
24254
+ }
24255
+ };
24256
+ this.displayStats = () => {
24257
+ let out = '';
24258
+ const totals = {
24259
+ match: 0,
24260
+ empty: 0,
24261
+ nomatch: 0,
24262
+ total: 0,
24263
+ };
24264
+ const displayRow = (op, m, e, n, t) => {
24265
+ totals.match += m;
24266
+ totals.empty += e;
24267
+ totals.nomatch += n;
24268
+ totals.total += t;
24269
+ const mm = normalize(m);
24270
+ const ee = normalize(e);
24271
+ const nn = normalize(n);
24272
+ const tt = normalize(t);
24273
+ return `${op} | ${mm} | ${ee} | ${nn} | ${tt} |\n`;
24274
+ };
24275
+ out += ' OPERATOR STATS\n';
24276
+ out += ' | MATCH | EMPTY | NOMATCH | TOTAL |\n';
24277
+ out += displayRow(' ALT', stats[id.ALT].match, stats[id.ALT].empty, stats[id.ALT].nomatch, stats[id.ALT].total);
24278
+ out += displayRow(' CAT', stats[id.CAT].match, stats[id.CAT].empty, stats[id.CAT].nomatch, stats[id.CAT].total);
24279
+ out += displayRow(' REP', stats[id.REP].match, stats[id.REP].empty, stats[id.REP].nomatch, stats[id.REP].total);
24280
+ out += displayRow(' RNM', stats[id.RNM].match, stats[id.RNM].empty, stats[id.RNM].nomatch, stats[id.RNM].total);
24281
+ out += displayRow(' TRG', stats[id.TRG].match, stats[id.TRG].empty, stats[id.TRG].nomatch, stats[id.TRG].total);
24282
+ out += displayRow(' TBS', stats[id.TBS].match, stats[id.TBS].empty, stats[id.TBS].nomatch, stats[id.TBS].total);
24283
+ out += displayRow(' TLS', stats[id.TLS].match, stats[id.TLS].empty, stats[id.TLS].nomatch, stats[id.TLS].total);
24284
+ out += displayRow(' UDT', stats[id.UDT].match, stats[id.UDT].empty, stats[id.UDT].nomatch, stats[id.UDT].total);
24285
+ out += displayRow(' AND', stats[id.AND].match, stats[id.AND].empty, stats[id.AND].nomatch, stats[id.AND].total);
24286
+ out += displayRow(' NOT', stats[id.NOT].match, stats[id.NOT].empty, stats[id.NOT].nomatch, stats[id.NOT].total);
24287
+ out += displayRow('TOTAL', totals.match, totals.empty, totals.nomatch, totals.total);
24288
+ return out;
24289
+ };
24290
+ /*
24291
+ Display rule/udt
24292
+ */
24293
+ this.displayHits = (type) => {
24294
+ let out = '';
24295
+ const displayRow = (m, e, n, t, name) => {
24296
+ totals.match += m;
24297
+ totals.empty += e;
24298
+ totals.nomatch += n;
24299
+ totals.total += t;
24300
+ const mm = normalize(m);
24301
+ const ee = normalize(e);
24302
+ const nn = normalize(n);
24303
+ const tt = normalize(t);
24304
+ return `| ${mm} | ${ee} | ${nn} | ${tt} | ${name}\n`;
24305
+ };
24306
+ if (typeof type === 'string' && type.toLowerCase()[0] === 'a') {
24307
+ ruleStats.sort(sortAlpha);
24308
+ udtStats.sort(sortAlpha);
24309
+ out += ' RULES/UDTS ALPHABETICALLY\n';
24310
+ } else if (typeof type === 'string' && type.toLowerCase()[0] === 'i') {
24311
+ ruleStats.sort(sortIndex);
24312
+ udtStats.sort(sortIndex);
24313
+ out += ' RULES/UDTS BY INDEX\n';
24314
+ } else {
24315
+ ruleStats.sort(sortHits);
24316
+ udtStats.sort(sortHits);
24317
+ out += ' RULES/UDTS BY HIT COUNT\n';
24318
+ }
24319
+ out += '| MATCH | EMPTY | NOMATCH | TOTAL | NAME\n';
24320
+ for (let i = 0; i < ruleStats.length; i += 1) {
24321
+ let r = ruleStats[i];
24322
+ if (r.total) {
24323
+ out += displayRow(r.match, r.empty, r.nomatch, r.total, r.name);
24324
+ }
24325
+ }
24326
+ for (let i = 0; i < udtStats.length; i += 1) {
24327
+ let r = udtStats[i];
24328
+ if (r.total) {
24329
+ out += displayRow(r.match, r.empty, r.nomatch, r.total, r.name);
24330
+ }
24331
+ }
24332
+ return out;
24333
+ };
24334
+ const normalize = (n) => {
24335
+ if (n < 10) {
24336
+ return ` ${n}`;
24337
+ }
24338
+ if (n < 100) {
24339
+ return ` ${n}`;
24340
+ }
24341
+ if (n < 1000) {
24342
+ return ` ${n}`;
24343
+ }
24344
+ if (n < 10000) {
24345
+ return ` ${n}`;
24346
+ }
24347
+ if (n < 100000) {
24348
+ return ` ${n}`;
24349
+ }
24350
+ if (n < 1000000) {
24351
+ return ` ${n}`;
24352
+ }
24353
+ return `${n}`;
24354
+ };
24355
+ const sortAlpha = (lhs, rhs) => {
24356
+ if (lhs.lower < rhs.lower) {
24357
+ return -1;
24358
+ }
24359
+ if (lhs.lower > rhs.lower) {
24360
+ return 1;
24361
+ }
24362
+ return 0;
24363
+ };
24364
+ const sortHits = (lhs, rhs) => {
24365
+ if (lhs.total < rhs.total) {
24366
+ return 1;
24367
+ }
24368
+ if (lhs.total > rhs.total) {
24369
+ return -1;
24370
+ }
24371
+ return sortAlpha(lhs, rhs);
24372
+ };
24373
+ const sortIndex = (lhs, rhs) => {
24374
+ if (lhs.index < rhs.index) {
24375
+ return -1;
24376
+ }
24377
+ if (lhs.index > rhs.index) {
24378
+ return 1;
24379
+ }
24380
+ return 0;
24381
+ };
24382
+ const EmptyStat = function fnempty() {
24383
+ this.empty = 0;
24384
+ this.match = 0;
24385
+ this.nomatch = 0;
24386
+ this.total = 0;
24387
+ };
24388
+ /* Zero out all stats */
24389
+ const clear = () => {
24390
+ stats.length = 0;
24391
+ totals = new EmptyStat();
24392
+ stats[id.ALT] = new EmptyStat();
24393
+ stats[id.CAT] = new EmptyStat();
24394
+ stats[id.REP] = new EmptyStat();
24395
+ stats[id.RNM] = new EmptyStat();
24396
+ stats[id.TRG] = new EmptyStat();
24397
+ stats[id.TBS] = new EmptyStat();
24398
+ stats[id.TLS] = new EmptyStat();
24399
+ stats[id.UDT] = new EmptyStat();
24400
+ stats[id.AND] = new EmptyStat();
24401
+ stats[id.NOT] = new EmptyStat();
24402
+ ruleStats.length = 0;
24403
+ for (let i = 0; i < rules.length; i += 1) {
24404
+ ruleStats.push({
24405
+ empty: 0,
24406
+ match: 0,
24407
+ nomatch: 0,
24408
+ total: 0,
24409
+ name: rules[i].name,
24410
+ lower: rules[i].lower,
24411
+ index: rules[i].index,
24412
+ });
24413
+ }
24414
+ if (udts.length > 0) {
24415
+ udtStats.length = 0;
24416
+ for (let i = 0; i < udts.length; i += 1) {
24417
+ udtStats.push({
24418
+ empty: 0,
24419
+ match: 0,
24420
+ nomatch: 0,
24421
+ total: 0,
24422
+ name: udts[i].name,
24423
+ lower: udts[i].lower,
24424
+ index: udts[i].index,
24425
+ });
24426
+ }
24427
+ }
24428
+ };
24429
+ /* increment the designated operator hit count by one */
24430
+ const incStat = (stat, state) => {
24431
+ stat.total += 1;
24432
+ switch (state) {
24433
+ case id.EMPTY:
24434
+ stat.empty += 1;
24435
+ break;
24436
+ case id.MATCH:
24437
+ stat.match += 1;
24438
+ break;
24439
+ case id.NOMATCH:
24440
+ stat.nomatch += 1;
24441
+ break;
24442
+ default:
24443
+ throw new Error(`${thisFileName}collect(): incStat(): unrecognized state: ${state}`);
24444
+ }
24445
+ };
24446
+ };
24447
+
24448
+ const utilities = {
24449
+ // utility functions
24450
+ stringToChars: (string) => [...string].map((cp) => cp.codePointAt(0)),
24451
+ charsToString: (chars, beg, len) => {
24452
+ let subChars = chars;
24453
+ while (1) {
24454
+ if (beg === undefined || beg < 0) {
24455
+ break;
24456
+ }
24457
+ if (len === undefined) {
24458
+ subChars = chars.slice(beg);
24459
+ break;
24460
+ }
24461
+ if (len <= 0) {
24462
+ // always an empty string
24463
+ return '';
24464
+ }
24465
+ subChars = chars.slice(beg, beg + len);
24466
+ break;
24467
+ }
24468
+ return String.fromCodePoint(...subChars);
24469
+ },
24470
+ };
24471
+
24472
+ const identifiers = {
24473
+ // Identifies the operator type.
24474
+ // NB: These must match the values in apg-js 4.3.0, apg-lib/identifiers.
24475
+ /* the original ABNF operators */
24476
+ ALT: 1 /* alternation */,
24477
+ CAT: 2 /* concatenation */,
24478
+ REP: 3 /* repetition */,
24479
+ RNM: 4 /* rule name */,
24480
+ TRG: 5 /* terminal range */,
24481
+ TBS: 6 /* terminal binary string, case sensitive */,
24482
+ TLS: 7 /* terminal literal string, case insensitive */,
24483
+ /* the super set, SABNF operators */
24484
+ UDT: 11 /* user-defined terminal */,
24485
+ AND: 12 /* positive look ahead */,
24486
+ NOT: 13 /* negative look ahead */,
24487
+ // Used by the parser and the user's `RNM` and `UDT` callback functions.
24488
+ // Identifies the parser state as it traverses the parse tree nodes.
24489
+ // - *ACTIVE* - indicates the downward direction through the parse tree node.
24490
+ // - *MATCH* - indicates the upward direction and a phrase, of length \> 0, has been successfully matched
24491
+ // - *EMPTY* - indicates the upward direction and a phrase, of length = 0, has been successfully matched
24492
+ // - *NOMATCH* - indicates the upward direction and the parser failed to match any phrase at all
24493
+ ACTIVE: 100,
24494
+ MATCH: 101,
24495
+ EMPTY: 102,
24496
+ NOMATCH: 103,
24497
+ // Used by [`AST` translator](./ast.html) (semantic analysis) and the user's callback functions
24498
+ // to indicate the direction of flow through the `AST` nodes.
24499
+ // - *SEM_PRE* - indicates the downward (pre-branch) direction through the `AST` node.
24500
+ // - *SEM_POST* - indicates the upward (post-branch) direction through the `AST` node.
24501
+ SEM_PRE: 200,
24502
+ SEM_POST: 201,
24503
+ // Ignored. Retained for backwords compatibility.
24504
+ SEM_OK: 300,
24505
+ idName: (s) => {
24506
+ switch (s) {
24507
+ case identifiers.ALT:
24508
+ return 'ALT';
24509
+ case identifiers.CAT:
24510
+ return 'CAT';
24511
+ case identifiers.REP:
24512
+ return 'REP';
24513
+ case identifiers.RNM:
24514
+ return 'RNM';
24515
+ case identifiers.TRG:
24516
+ return 'TRG';
24517
+ case identifiers.TBS:
24518
+ return 'TBS';
24519
+ case identifiers.TLS:
24520
+ return 'TLS';
24521
+ case identifiers.UDT:
24522
+ return 'UDT';
24523
+ case identifiers.AND:
24524
+ return 'AND';
24525
+ case identifiers.NOT:
24526
+ return 'NOT';
24527
+ case identifiers.ACTIVE:
24528
+ return 'ACTIVE';
24529
+ case identifiers.EMPTY:
24530
+ return 'EMPTY';
24531
+ case identifiers.MATCH:
24532
+ return 'MATCH';
24533
+ case identifiers.NOMATCH:
24534
+ return 'NOMATCH';
24535
+ case identifiers.SEM_PRE:
24536
+ return 'SEM_PRE';
24537
+ case identifiers.SEM_POST:
24538
+ return 'SEM_POST';
24539
+ case identifiers.SEM_OK:
24540
+ return 'SEM_OK';
24541
+ default:
24542
+ return 'UNRECOGNIZED STATE';
24543
+ }
24544
+ },
24545
+ };
24546
+
24547
+
22686
24548
  /***/ }),
22687
24549
 
22688
24550
  /***/ 51865:
@@ -23081,6 +24943,48 @@ class ExternalValueVisitor extends _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE
23081
24943
 
23082
24944
  /***/ }),
23083
24945
 
24946
+ /***/ 52725:
24947
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24948
+
24949
+ "use strict";
24950
+ __webpack_require__.r(__webpack_exports__);
24951
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24952
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
24953
+ /* harmony export */ });
24954
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
24955
+ /* harmony import */ var _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26490);
24956
+
24957
+
24958
+ const cst = ruleName => {
24959
+ return (state, chars, phraseIndex, phraseLength, data) => {
24960
+ if (!(typeof data === 'object' && data !== null && !Array.isArray(data))) {
24961
+ throw new _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]("parser's user data must be an object");
24962
+ }
24963
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
24964
+ const node = {
24965
+ type: ruleName,
24966
+ text: apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength),
24967
+ start: phraseIndex,
24968
+ length: phraseLength,
24969
+ children: []
24970
+ };
24971
+ if (data.stack.length > 0) {
24972
+ const parent = data.stack[data.stack.length - 1];
24973
+ parent.children.push(node);
24974
+ } else {
24975
+ data.root = node;
24976
+ }
24977
+ data.stack.push(node);
24978
+ }
24979
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
24980
+ data.stack.pop();
24981
+ }
24982
+ };
24983
+ };
24984
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cst);
24985
+
24986
+ /***/ }),
24987
+
23084
24988
  /***/ 52769:
23085
24989
  /***/ ((module) => {
23086
24990
 
@@ -25287,6 +27191,63 @@ class OperationVisitor extends BaseOperationVisitor {
25287
27191
 
25288
27192
  /***/ }),
25289
27193
 
27194
+ /***/ 56660:
27195
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
27196
+
27197
+ "use strict";
27198
+ __webpack_require__.r(__webpack_exports__);
27199
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27200
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
27201
+ /* harmony export */ });
27202
+ class TraceBuilder {
27203
+ #trace;
27204
+ #path;
27205
+ #realm;
27206
+ constructor(trace, context = {}) {
27207
+ this.#trace = trace;
27208
+ this.#trace.steps = [];
27209
+ this.#trace.failed = false;
27210
+ this.#trace.failedAt = -1;
27211
+ this.#trace.message = `JSON Pointer "${context.jsonPointer}" was successfully evaluated against the provided value`;
27212
+ this.#trace.context = {
27213
+ ...context,
27214
+ realm: context.realm.name
27215
+ };
27216
+ this.#path = [];
27217
+ this.#realm = context.realm;
27218
+ }
27219
+ step({
27220
+ referenceToken,
27221
+ input,
27222
+ output,
27223
+ success = true,
27224
+ reason
27225
+ }) {
27226
+ const position = this.#path.length;
27227
+ this.#path.push(referenceToken);
27228
+ const step = {
27229
+ referenceToken,
27230
+ referenceTokenPosition: position,
27231
+ input,
27232
+ inputType: this.#realm.isObject(input) ? 'object' : this.#realm.isArray(input) ? 'array' : 'unrecognized',
27233
+ output,
27234
+ success
27235
+ };
27236
+ if (reason) {
27237
+ step.reason = reason;
27238
+ }
27239
+ this.#trace.steps.push(step);
27240
+ if (!success) {
27241
+ this.#trace.failed = true;
27242
+ this.#trace.failedAt = position;
27243
+ this.#trace.message = reason;
27244
+ }
27245
+ }
27246
+ }
27247
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TraceBuilder);
27248
+
27249
+ /***/ }),
27250
+
25290
27251
  /***/ 56935:
25291
27252
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25292
27253
 
@@ -26511,6 +28472,38 @@ class DependenciesVisitor extends (0,ts_mixer__WEBPACK_IMPORTED_MODULE_0__.Mixin
26511
28472
 
26512
28473
  /***/ }),
26513
28474
 
28475
+ /***/ 59408:
28476
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28477
+
28478
+ "use strict";
28479
+ __webpack_require__.r(__webpack_exports__);
28480
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28481
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
28482
+ /* harmony export */ });
28483
+ /* harmony import */ var _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12008);
28484
+
28485
+ class EvaluationRealm {
28486
+ name = '';
28487
+ isArray(node) {
28488
+ throw new _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Realm.isArray(node) must be implemented in a subclass');
28489
+ }
28490
+ isObject(node) {
28491
+ throw new _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Realm.isObject(node) must be implemented in a subclass');
28492
+ }
28493
+ sizeOf(node) {
28494
+ throw new _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Realm.sizeOf(node) must be implemented in a subclass');
28495
+ }
28496
+ has(node, referenceToken) {
28497
+ throw new _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Realm.has(node) must be implemented in a subclass');
28498
+ }
28499
+ evaluate(node, referenceToken) {
28500
+ throw new _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Realm.evaluate(node) must be implemented in a subclass');
28501
+ }
28502
+ }
28503
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EvaluationRealm);
28504
+
28505
+ /***/ }),
28506
+
26514
28507
  /***/ 59425:
26515
28508
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
26516
28509
 
@@ -27550,6 +29543,32 @@ visitor, {
27550
29543
 
27551
29544
  /***/ }),
27552
29545
 
29546
+ /***/ 60357:
29547
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29548
+
29549
+ "use strict";
29550
+ __webpack_require__.r(__webpack_exports__);
29551
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
29552
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
29553
+ /* harmony export */ });
29554
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
29555
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36585);
29556
+
29557
+
29558
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
29559
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
29560
+ const testArrayDash = referenceToken => {
29561
+ if (typeof referenceToken !== 'string') return false;
29562
+ try {
29563
+ return parser.parse(grammar, 'array-dash', referenceToken).success;
29564
+ } catch {
29565
+ return false;
29566
+ }
29567
+ };
29568
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testArrayDash);
29569
+
29570
+ /***/ }),
29571
+
27553
29572
  /***/ 60493:
27554
29573
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
27555
29574
 
@@ -27761,6 +29780,92 @@ module.exports = {
27761
29780
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
27762
29781
  indexOf: createMethod(false)
27763
29782
  };
29783
+
29784
+
29785
+ /***/ }),
29786
+
29787
+ /***/ 61198:
29788
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
29789
+
29790
+ "use strict";
29791
+ __webpack_require__.r(__webpack_exports__);
29792
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
29793
+ /* harmony export */ ASTTranslator: () => (/* reexport safe */ _parse_translators_ASTTranslator_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]),
29794
+ /* harmony export */ CSTTranslator: () => (/* reexport safe */ _parse_translators_CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]),
29795
+ /* harmony export */ EvaluationRealm: () => (/* reexport safe */ _evaluate_realms_EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_16__["default"]),
29796
+ /* harmony export */ Grammar: () => (/* reexport safe */ _grammar_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]),
29797
+ /* harmony export */ JSONPointerCompileError: () => (/* reexport safe */ _errors_JSONPointerCompileError_mjs__WEBPACK_IMPORTED_MODULE_20__["default"]),
29798
+ /* harmony export */ JSONPointerError: () => (/* reexport safe */ _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_18__["default"]),
29799
+ /* harmony export */ JSONPointerEvaluateError: () => (/* reexport safe */ _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_21__["default"]),
29800
+ /* harmony export */ JSONPointerIndexError: () => (/* reexport safe */ _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_24__["default"]),
29801
+ /* harmony export */ JSONPointerKeyError: () => (/* reexport safe */ _errors_JSONPointerKeyError_mjs__WEBPACK_IMPORTED_MODULE_23__["default"]),
29802
+ /* harmony export */ JSONPointerParseError: () => (/* reexport safe */ _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_19__["default"]),
29803
+ /* harmony export */ JSONPointerTypeError: () => (/* reexport safe */ _errors_JSONPointerTypeError_mjs__WEBPACK_IMPORTED_MODULE_22__["default"]),
29804
+ /* harmony export */ JSONString: () => (/* reexport module object */ _representation_json_string_mjs__WEBPACK_IMPORTED_MODULE_0__),
29805
+ /* harmony export */ URIFragmentIdentifier: () => (/* reexport module object */ _representation_uri_fragment_identifier_mjs__WEBPACK_IMPORTED_MODULE_1__),
29806
+ /* harmony export */ XMLTranslator: () => (/* reexport safe */ _parse_translators_XMLTranslator_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]),
29807
+ /* harmony export */ compile: () => (/* reexport safe */ _compile_mjs__WEBPACK_IMPORTED_MODULE_12__["default"]),
29808
+ /* harmony export */ composeRealms: () => (/* reexport safe */ _evaluate_realms_compose_mjs__WEBPACK_IMPORTED_MODULE_17__["default"]),
29809
+ /* harmony export */ escape: () => (/* reexport safe */ _escape_mjs__WEBPACK_IMPORTED_MODULE_13__["default"]),
29810
+ /* harmony export */ evaluate: () => (/* reexport safe */ _evaluate_index_mjs__WEBPACK_IMPORTED_MODULE_15__["default"]),
29811
+ /* harmony export */ parse: () => (/* reexport safe */ _parse_index_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]),
29812
+ /* harmony export */ testArrayDash: () => (/* reexport safe */ _test_array_dash_mjs__WEBPACK_IMPORTED_MODULE_11__["default"]),
29813
+ /* harmony export */ testArrayIndex: () => (/* reexport safe */ _test_array_index_mjs__WEBPACK_IMPORTED_MODULE_10__["default"]),
29814
+ /* harmony export */ testArrayLocation: () => (/* reexport safe */ _test_array_location_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]),
29815
+ /* harmony export */ testJSONPointer: () => (/* reexport safe */ _test_json_pointer_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
29816
+ /* harmony export */ testReferenceToken: () => (/* reexport safe */ _test_reference_token_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]),
29817
+ /* harmony export */ unescape: () => (/* reexport safe */ _unescape_mjs__WEBPACK_IMPORTED_MODULE_14__["default"])
29818
+ /* harmony export */ });
29819
+ /* harmony import */ var _representation_json_string_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70204);
29820
+ /* harmony import */ var _representation_uri_fragment_identifier_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86181);
29821
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36585);
29822
+ /* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8750);
29823
+ /* harmony import */ var _parse_translators_CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92802);
29824
+ /* harmony import */ var _parse_translators_ASTTranslator_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23020);
29825
+ /* harmony import */ var _parse_translators_XMLTranslator_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(70979);
29826
+ /* harmony import */ var _test_json_pointer_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(20439);
29827
+ /* harmony import */ var _test_reference_token_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(91560);
29828
+ /* harmony import */ var _test_array_location_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(4896);
29829
+ /* harmony import */ var _test_array_index_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(22587);
29830
+ /* harmony import */ var _test_array_dash_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(60357);
29831
+ /* harmony import */ var _compile_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(96901);
29832
+ /* harmony import */ var _escape_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(27123);
29833
+ /* harmony import */ var _unescape_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(82182);
29834
+ /* harmony import */ var _evaluate_index_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(89274);
29835
+ /* harmony import */ var _evaluate_realms_EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(59408);
29836
+ /* harmony import */ var _evaluate_realms_compose_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(99799);
29837
+ /* harmony import */ var _errors_JSONPointerError_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(12008);
29838
+ /* harmony import */ var _errors_JSONPointerParseError_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(26490);
29839
+ /* harmony import */ var _errors_JSONPointerCompileError_mjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(42144);
29840
+ /* harmony import */ var _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(924);
29841
+ /* harmony import */ var _errors_JSONPointerTypeError_mjs__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(675);
29842
+ /* harmony import */ var _errors_JSONPointerKeyError_mjs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(82414);
29843
+ /* harmony import */ var _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(2325);
29844
+
29845
+
29846
+
29847
+
29848
+
29849
+
29850
+
29851
+
29852
+
29853
+
29854
+
29855
+
29856
+
29857
+
29858
+
29859
+
29860
+
29861
+
29862
+
29863
+
29864
+
29865
+
29866
+
29867
+
29868
+
27764
29869
 
27765
29870
 
27766
29871
  /***/ }),
@@ -30675,6 +32780,28 @@ const createPredicate = predicateCreator => {
30675
32780
 
30676
32781
  /***/ }),
30677
32782
 
32783
+ /***/ 70204:
32784
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
32785
+
32786
+ "use strict";
32787
+ __webpack_require__.r(__webpack_exports__);
32788
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
32789
+ /* harmony export */ from: () => (/* binding */ from),
32790
+ /* harmony export */ to: () => (/* binding */ to)
32791
+ /* harmony export */ });
32792
+ const to = jsonPointer => {
32793
+ return JSON.stringify(jsonPointer);
32794
+ };
32795
+ const from = jsonString => {
32796
+ try {
32797
+ return String(JSON.parse(jsonString));
32798
+ } catch {
32799
+ return jsonString;
32800
+ }
32801
+ };
32802
+
32803
+ /***/ }),
32804
+
30678
32805
  /***/ 70369:
30679
32806
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
30680
32807
 
@@ -31129,6 +33256,25 @@ class YamlScalar extends _YamlNode_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
31129
33256
 
31130
33257
  /***/ }),
31131
33258
 
33259
+ /***/ 70979:
33260
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
33261
+
33262
+ "use strict";
33263
+ __webpack_require__.r(__webpack_exports__);
33264
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33265
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
33266
+ /* harmony export */ });
33267
+ /* harmony import */ var _CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92802);
33268
+
33269
+ class XMLTranslator extends _CSTTranslator_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
33270
+ getTree() {
33271
+ return this.toXml();
33272
+ }
33273
+ }
33274
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (XMLTranslator);
33275
+
33276
+ /***/ }),
33277
+
31132
33278
  /***/ 71020:
31133
33279
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
31134
33280
 
@@ -35008,6 +37154,24 @@ var isNotUndefined = (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(_isUndefi
35008
37154
 
35009
37155
  /***/ }),
35010
37156
 
37157
+ /***/ 82182:
37158
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
37159
+
37160
+ "use strict";
37161
+ __webpack_require__.r(__webpack_exports__);
37162
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
37163
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
37164
+ /* harmony export */ });
37165
+ const unescape = referenceToken => {
37166
+ if (typeof referenceToken !== 'string') {
37167
+ throw new TypeError('Reference token must be a string');
37168
+ }
37169
+ return referenceToken.replace(/~1/g, '/').replace(/~0/g, '~');
37170
+ };
37171
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (unescape);
37172
+
37173
+ /***/ }),
37174
+
35011
37175
  /***/ 82258:
35012
37176
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
35013
37177
 
@@ -35091,6 +37255,21 @@ class KeyValuePair {
35091
37255
  module.exports = KeyValuePair;
35092
37256
 
35093
37257
 
37258
+ /***/ }),
37259
+
37260
+ /***/ 82414:
37261
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
37262
+
37263
+ "use strict";
37264
+ __webpack_require__.r(__webpack_exports__);
37265
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
37266
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
37267
+ /* harmony export */ });
37268
+ /* harmony import */ var _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(924);
37269
+
37270
+ class JSONPointerKeyError extends _JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
37271
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JSONPointerKeyError);
37272
+
35094
37273
  /***/ }),
35095
37274
 
35096
37275
  /***/ 82719:
@@ -35777,6 +37956,23 @@ module.exports = function (it) {
35777
37956
  };
35778
37957
 
35779
37958
 
37959
+ /***/ }),
37960
+
37961
+ /***/ 83421:
37962
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
37963
+
37964
+ "use strict";
37965
+ __webpack_require__.r(__webpack_exports__);
37966
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
37967
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
37968
+ /* harmony export */ });
37969
+ class Expectations extends Array {
37970
+ toString() {
37971
+ return this.map(c => `"${String(c)}"`).join(', ');
37972
+ }
37973
+ }
37974
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Expectations);
37975
+
35780
37976
  /***/ }),
35781
37977
 
35782
37978
  /***/ 83479:
@@ -36730,6 +38926,36 @@ var hasPath = /*#__PURE__*/(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["
36730
38926
 
36731
38927
  /***/ }),
36732
38928
 
38929
+ /***/ 86181:
38930
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
38931
+
38932
+ "use strict";
38933
+ __webpack_require__.r(__webpack_exports__);
38934
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38935
+ /* harmony export */ from: () => (/* binding */ from),
38936
+ /* harmony export */ fromURIReference: () => (/* binding */ fromURIReference),
38937
+ /* harmony export */ to: () => (/* binding */ to)
38938
+ /* harmony export */ });
38939
+ const to = jsonPointer => {
38940
+ const encodedFragment = [...jsonPointer].map(char => /^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/.test(char) ? char : encodeURIComponent(char)).join('');
38941
+ return `#${encodedFragment}`;
38942
+ };
38943
+ const from = fragment => {
38944
+ try {
38945
+ const rfc3986Fragment = fragment.startsWith('#') ? fragment.slice(1) : fragment;
38946
+ return decodeURIComponent(rfc3986Fragment);
38947
+ } catch {
38948
+ return fragment;
38949
+ }
38950
+ };
38951
+ const fromURIReference = uriReference => {
38952
+ const fragmentIndex = uriReference.indexOf('#');
38953
+ const fragment = fragmentIndex === -1 ? '#' : uriReference.substring(fragmentIndex);
38954
+ return from(fragment);
38955
+ };
38956
+
38957
+ /***/ }),
38958
+
36733
38959
  /***/ 86339:
36734
38960
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
36735
38961
 
@@ -36839,26 +39065,6 @@ class SecurityRequirement extends _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IM
36839
39065
 
36840
39066
  /***/ }),
36841
39067
 
36842
- /***/ 87129:
36843
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
36844
-
36845
- "use strict";
36846
- __webpack_require__.r(__webpack_exports__);
36847
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36848
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
36849
- /* harmony export */ });
36850
- /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27567);
36851
- /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98675);
36852
-
36853
-
36854
- /**
36855
- * @public
36856
- */
36857
- const escape = (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(/~/g, '~0'), (0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(/\//g, '~1'), encodeURIComponent);
36858
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (escape);
36859
-
36860
- /***/ }),
36861
-
36862
39068
  /***/ 87161:
36863
39069
  /***/ ((__unused_webpack_module, exports) => {
36864
39070
 
@@ -37177,7 +39383,7 @@ __webpack_require__.r(__webpack_exports__);
37177
39383
  /* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50726);
37178
39384
  /* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81776);
37179
39385
  /* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(78866);
37180
- /* harmony import */ var _swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92935);
39386
+ /* harmony import */ var _swagger_api_apidom_json_pointer_modern__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61198);
37181
39387
  /* harmony import */ var _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32131);
37182
39388
  /* harmony import */ var _predicates_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(76332);
37183
39389
  /* harmony import */ var _namespace_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57195);
@@ -37215,7 +39421,7 @@ const ancestorLineageToJSONPointer = elementPath => {
37215
39421
  }
37216
39422
  return path;
37217
39423
  }, []);
37218
- return (0,_swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_2__["default"])(jsonPointerTokens);
39424
+ return (0,_swagger_api_apidom_json_pointer_modern__WEBPACK_IMPORTED_MODULE_2__.compile)(jsonPointerTokens);
37219
39425
  };
37220
39426
 
37221
39427
  /**
@@ -37418,6 +39624,174 @@ module.exports = function (input, pref) {
37418
39624
  };
37419
39625
 
37420
39626
 
39627
+ /***/ }),
39628
+
39629
+ /***/ 89274:
39630
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39631
+
39632
+ "use strict";
39633
+ __webpack_require__.r(__webpack_exports__);
39634
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39635
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39636
+ /* harmony export */ });
39637
+ /* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8750);
39638
+ /* harmony import */ var _test_array_dash_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60357);
39639
+ /* harmony import */ var _test_array_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22587);
39640
+ /* harmony import */ var _trace_TraceBuilder_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(56660);
39641
+ /* harmony import */ var _realms_json_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39150);
39642
+ /* harmony import */ var _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(924);
39643
+ /* harmony import */ var _errors_JSONPointerTypeError_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(675);
39644
+ /* harmony import */ var _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2325);
39645
+ /* harmony import */ var _errors_JSONPointerKeyError_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(82414);
39646
+
39647
+
39648
+
39649
+
39650
+
39651
+
39652
+
39653
+
39654
+
39655
+ const evaluate = (value, jsonPointer, {
39656
+ strictArrays = true,
39657
+ strictObjects = true,
39658
+ realm = new _realms_json_index_mjs__WEBPACK_IMPORTED_MODULE_3__["default"](),
39659
+ trace = true
39660
+ } = {}) => {
39661
+ const {
39662
+ result: parseResult,
39663
+ tree: referenceTokens,
39664
+ trace: parseTrace
39665
+ } = (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(jsonPointer, {
39666
+ trace: !!trace
39667
+ });
39668
+ const tracer = typeof trace === 'object' && trace !== null ? new _trace_TraceBuilder_mjs__WEBPACK_IMPORTED_MODULE_8__["default"](trace, {
39669
+ jsonPointer,
39670
+ referenceTokens,
39671
+ strictArrays,
39672
+ strictObjects,
39673
+ realm,
39674
+ value
39675
+ }) : null;
39676
+ try {
39677
+ let output;
39678
+ if (!parseResult.success) {
39679
+ let message = `Invalid JSON Pointer: "${jsonPointer}". Syntax error at position ${parseResult.maxMatched}`;
39680
+ message += parseTrace ? `, expected ${parseTrace.inferExpectations()}` : '';
39681
+ throw new _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_4__["default"](message, {
39682
+ jsonPointer,
39683
+ currentValue: value,
39684
+ realm: realm.name
39685
+ });
39686
+ }
39687
+ return referenceTokens.reduce((current, referenceToken, referenceTokenPosition) => {
39688
+ if (realm.isArray(current)) {
39689
+ if ((0,_test_array_dash_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(referenceToken)) {
39690
+ if (strictArrays) {
39691
+ throw new _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"](`Invalid array index "-" at position ${referenceTokenPosition} in "${jsonPointer}". The "-" token always refers to a nonexistent element during evaluation`, {
39692
+ jsonPointer,
39693
+ referenceTokens,
39694
+ referenceToken,
39695
+ referenceTokenPosition,
39696
+ currentValue: current,
39697
+ realm: realm.name
39698
+ });
39699
+ } else {
39700
+ output = realm.evaluate(current, String(realm.sizeOf(current)));
39701
+ tracer === null || tracer === void 0 || tracer.step({
39702
+ referenceToken,
39703
+ input: current,
39704
+ output
39705
+ });
39706
+ return output;
39707
+ }
39708
+ }
39709
+ if (strictArrays && !(0,_test_array_index_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(referenceToken)) {
39710
+ throw new _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"](`Invalid array index "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": index MUST be "0", or digits without a leading "0"`, {
39711
+ jsonPointer,
39712
+ referenceTokens,
39713
+ referenceToken,
39714
+ referenceTokenPosition,
39715
+ currentValue: current,
39716
+ realm: realm.name
39717
+ });
39718
+ }
39719
+ const index = Number(referenceToken);
39720
+ if (!Number.isSafeInteger(index)) {
39721
+ throw new _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"](`Invalid array index "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": index must be a safe integer`, {
39722
+ jsonPointer,
39723
+ referenceTokens,
39724
+ referenceToken,
39725
+ referenceTokenPosition,
39726
+ currentValue: current,
39727
+ realm: realm.name
39728
+ });
39729
+ }
39730
+ if (!realm.has(current, referenceToken) && strictArrays) {
39731
+ throw new _errors_JSONPointerIndexError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"](`Invalid array index "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": out of bounds`, {
39732
+ jsonPointer,
39733
+ referenceTokens,
39734
+ referenceToken,
39735
+ referenceTokenPosition,
39736
+ currentValue: current,
39737
+ realm: realm.name
39738
+ });
39739
+ }
39740
+ output = realm.evaluate(current, referenceToken);
39741
+ tracer === null || tracer === void 0 || tracer.step({
39742
+ referenceToken,
39743
+ input: current,
39744
+ output
39745
+ });
39746
+ return output;
39747
+ }
39748
+ if (realm.isObject(current)) {
39749
+ if (!realm.has(current, referenceToken) && strictObjects) {
39750
+ throw new _errors_JSONPointerKeyError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"](`Invalid object key "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": key not found in object`, {
39751
+ jsonPointer,
39752
+ referenceTokens,
39753
+ referenceToken,
39754
+ referenceTokenPosition,
39755
+ currentValue: current,
39756
+ realm: realm.name
39757
+ });
39758
+ }
39759
+ output = realm.evaluate(current, referenceToken);
39760
+ tracer === null || tracer === void 0 || tracer.step({
39761
+ referenceToken,
39762
+ input: current,
39763
+ output
39764
+ });
39765
+ return output;
39766
+ }
39767
+ throw new _errors_JSONPointerTypeError_mjs__WEBPACK_IMPORTED_MODULE_5__["default"](`Invalid reference token "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": cannot be applied to a non-object/non-array value`, {
39768
+ jsonPointer,
39769
+ referenceTokens,
39770
+ referenceToken,
39771
+ referenceTokenPosition,
39772
+ currentValue: current,
39773
+ realm: realm.name
39774
+ });
39775
+ }, value);
39776
+ } catch (error) {
39777
+ tracer === null || tracer === void 0 || tracer.step({
39778
+ referenceToken: error.referenceToken,
39779
+ input: error.currentValue,
39780
+ success: false,
39781
+ reason: error.message
39782
+ });
39783
+ if (error instanceof _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]) {
39784
+ throw error;
39785
+ }
39786
+ throw new _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]('Unexpected error during JSON Pointer evaluation', {
39787
+ cause: error,
39788
+ jsonPointer,
39789
+ referenceTokens
39790
+ });
39791
+ }
39792
+ };
39793
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (evaluate);
39794
+
37421
39795
  /***/ }),
37422
39796
 
37423
39797
  /***/ 89319:
@@ -38966,6 +41340,32 @@ class SourceMap extends minim__WEBPACK_IMPORTED_MODULE_0__.ArrayElement {
38966
41340
 
38967
41341
  /***/ }),
38968
41342
 
41343
+ /***/ 91560:
41344
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
41345
+
41346
+ "use strict";
41347
+ __webpack_require__.r(__webpack_exports__);
41348
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
41349
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
41350
+ /* harmony export */ });
41351
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
41352
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36585);
41353
+
41354
+
41355
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
41356
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
41357
+ const testReferenceToken = referenceToken => {
41358
+ if (typeof referenceToken !== 'string') return false;
41359
+ try {
41360
+ return parser.parse(grammar, 'reference-token', referenceToken).success;
41361
+ } catch {
41362
+ return false;
41363
+ }
41364
+ };
41365
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testReferenceToken);
41366
+
41367
+ /***/ }),
41368
+
38969
41369
  /***/ 91613:
38970
41370
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
38971
41371
 
@@ -39312,7 +41712,7 @@ var trimEnd = (0,_isFunction_js__WEBPACK_IMPORTED_MODULE_2__["default"])(String.
39312
41712
 
39313
41713
  /***/ }),
39314
41714
 
39315
- /***/ 92935:
41715
+ /***/ 92802:
39316
41716
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39317
41717
 
39318
41718
  "use strict";
@@ -39320,27 +41720,28 @@ __webpack_require__.r(__webpack_exports__);
39320
41720
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39321
41721
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39322
41722
  /* harmony export */ });
39323
- /* harmony import */ var _escape_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87129);
39324
- /* harmony import */ var _errors_CompilationJsonPointerError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41428);
41723
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51751);
41724
+ /* harmony import */ var _callbacks_cst_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(52725);
39325
41725
 
39326
41726
 
39327
- /**
39328
- * @public
39329
- */
39330
- const compile = tokens => {
39331
- try {
39332
- if (tokens.length === 0) {
39333
- return '';
39334
- }
39335
- return `/${tokens.map(_escape_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]).join('/')}`;
39336
- } catch (error) {
39337
- throw new _errors_CompilationJsonPointerError_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]('JSON Pointer compilation of tokens encountered an error.', {
39338
- tokens,
39339
- cause: error
39340
- });
41727
+ class CSTTranslator extends apg_lite__WEBPACK_IMPORTED_MODULE_0__.Ast {
41728
+ constructor() {
41729
+ super();
41730
+ this.callbacks['json-pointer'] = (0,_callbacks_cst_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])('json-pointer');
41731
+ this.callbacks['reference-token'] = (0,_callbacks_cst_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])('reference-token');
41732
+ this.callbacks['slash'] = (0,_callbacks_cst_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])('text');
41733
+ }
41734
+ getTree() {
41735
+ const data = {
41736
+ stack: [],
41737
+ root: null
41738
+ };
41739
+ this.translate(data);
41740
+ delete data.stack;
41741
+ return data;
39341
41742
  }
39342
- };
39343
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (compile);
41743
+ }
41744
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CSTTranslator);
39344
41745
 
39345
41746
  /***/ }),
39346
41747
 
@@ -41226,6 +43627,43 @@ const specification = (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(
41226
43627
 
41227
43628
  /***/ }),
41228
43629
 
43630
+ /***/ 96901:
43631
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
43632
+
43633
+ "use strict";
43634
+ __webpack_require__.r(__webpack_exports__);
43635
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
43636
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
43637
+ /* harmony export */ });
43638
+ /* harmony import */ var _escape_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27123);
43639
+ /* harmony import */ var _errors_JSONPointerCompileError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42144);
43640
+
43641
+
43642
+ const compile = referenceTokens => {
43643
+ if (!Array.isArray(referenceTokens)) {
43644
+ throw new TypeError('Reference tokens must be a list of strings or numbers');
43645
+ }
43646
+ try {
43647
+ if (referenceTokens.length === 0) {
43648
+ return '';
43649
+ }
43650
+ return `/${referenceTokens.map(referenceToken => {
43651
+ if (typeof referenceToken !== 'string' && typeof referenceToken !== 'number') {
43652
+ throw new TypeError('Reference token must be a string or number');
43653
+ }
43654
+ return (0,_escape_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(String(referenceToken));
43655
+ }).join('/')}`;
43656
+ } catch (error) {
43657
+ throw new _errors_JSONPointerCompileError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]('Unexpected error during JSON Pointer compilation', {
43658
+ cause: error,
43659
+ referenceTokens
43660
+ });
43661
+ }
43662
+ };
43663
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (compile);
43664
+
43665
+ /***/ }),
43666
+
41229
43667
  /***/ 96903:
41230
43668
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
41231
43669
 
@@ -42172,6 +44610,64 @@ class HeaderContent extends _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0_
42172
44610
 
42173
44611
  /***/ }),
42174
44612
 
44613
+ /***/ 99799:
44614
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
44615
+
44616
+ "use strict";
44617
+ __webpack_require__.r(__webpack_exports__);
44618
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
44619
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
44620
+ /* harmony export */ });
44621
+ /* harmony import */ var _EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59408);
44622
+ /* harmony import */ var _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(924);
44623
+ function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
44624
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
44625
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
44626
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
44627
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
44628
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
44629
+
44630
+
44631
+ var _CompositeEvaluationRealm_brand = /*#__PURE__*/new WeakSet();
44632
+ class CompositeEvaluationRealm extends _EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
44633
+ constructor(realms) {
44634
+ super();
44635
+ _classPrivateMethodInitSpec(this, _CompositeEvaluationRealm_brand);
44636
+ _defineProperty(this, "name", 'composite');
44637
+ _defineProperty(this, "realms", []);
44638
+ this.realms = realms;
44639
+ }
44640
+ isArray(node) {
44641
+ return _assertClassBrand(_CompositeEvaluationRealm_brand, this, _findRealm).call(this, node).isArray(node);
44642
+ }
44643
+ isObject(node) {
44644
+ return _assertClassBrand(_CompositeEvaluationRealm_brand, this, _findRealm).call(this, node).isObject(node);
44645
+ }
44646
+ sizeOf(node) {
44647
+ return _assertClassBrand(_CompositeEvaluationRealm_brand, this, _findRealm).call(this, node).sizeOf(node);
44648
+ }
44649
+ has(node, referenceToken) {
44650
+ return _assertClassBrand(_CompositeEvaluationRealm_brand, this, _findRealm).call(this, node).has(node, referenceToken);
44651
+ }
44652
+ evaluate(node, referenceToken) {
44653
+ return _assertClassBrand(_CompositeEvaluationRealm_brand, this, _findRealm).call(this, node).evaluate(node, referenceToken);
44654
+ }
44655
+ }
44656
+ function _findRealm(node) {
44657
+ for (const realm of this.realms) {
44658
+ if (realm.isArray(node) || realm.isObject(node)) {
44659
+ return realm;
44660
+ }
44661
+ }
44662
+ throw new _errors_JSONPointerEvaluateError_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]('No suitable evaluation realm found for value', {
44663
+ currentValue: node
44664
+ });
44665
+ }
44666
+ const compose = (...realms) => new CompositeEvaluationRealm(realms);
44667
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (compose);
44668
+
44669
+ /***/ }),
44670
+
42175
44671
  /***/ 99852:
42176
44672
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
42177
44673