@ifc-lite/ids 1.15.10 → 1.15.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/coherence/regex.d.ts +7 -38
- package/dist/audit/coherence/regex.d.ts.map +1 -1
- package/dist/audit/coherence/regex.js +7 -77
- package/dist/audit/coherence/regex.js.map +1 -1
- package/dist/constraints/index.d.ts.map +1 -1
- package/dist/constraints/index.js +74 -30
- package/dist/constraints/index.js.map +1 -1
- package/dist/constraints/xsd-cast.d.ts +4 -10
- package/dist/constraints/xsd-cast.d.ts.map +1 -1
- package/dist/constraints/xsd-cast.js +39 -0
- package/dist/constraints/xsd-cast.js.map +1 -1
- package/dist/constraints/xsd-regex.d.ts +51 -0
- package/dist/constraints/xsd-regex.d.ts.map +1 -0
- package/dist/constraints/xsd-regex.js +141 -0
- package/dist/constraints/xsd-regex.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,42 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* - `\i` — XML name start char (letter, `_`, `:` plus a swathe of
|
|
9
|
-
* Unicode letters)
|
|
10
|
-
* - `\c` — XML name char (`\i` plus digits, `.`, `-`, U+00B7, etc.)
|
|
11
|
-
* - `\d` — Unicode digit (broader than JS `[0-9]`)
|
|
12
|
-
* - `\w` — Unicode word char (letters + digits, no `_`)
|
|
13
|
-
* - `\D`, `\C`, `\I`, `\W` — negations
|
|
14
|
-
* - char-class subtraction `[a-z-[aeiou]]` — the JS dialect doesn't
|
|
15
|
-
* support this; we fall back to a marker so the auditor can warn.
|
|
16
|
-
*
|
|
17
|
-
* The translation maps to JS Unicode property escapes (require `u` flag).
|
|
18
|
-
* `\d` and `\w` already exist in JS and map close enough that we leave
|
|
19
|
-
* them alone — same applies to `\D`/`\W`. The XML name char escapes are
|
|
20
|
-
* the only ones that genuinely need translation.
|
|
2
|
+
* Auditor-facing XSD-regex helpers. The translation itself now lives in
|
|
3
|
+
* the shared `constraints/xsd-regex` module so the auditor and the
|
|
4
|
+
* constraint matcher (`matchPattern`) can't drift apart; this file keeps
|
|
5
|
+
* the auditor-specific `compileXsdRegex` wrapper and re-exports the
|
|
6
|
+
* translator for existing call sites.
|
|
21
7
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
pattern: string;
|
|
25
|
-
/** Whether translation produced a faithful JS-compatible regex. */
|
|
26
|
-
supported: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Human-readable reason when `supported === false`. Empty string when
|
|
29
|
-
* fully supported.
|
|
30
|
-
*/
|
|
31
|
-
reason: string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Translate the XSD pattern. Returns the JS-compatible pattern plus a
|
|
35
|
-
* `supported` flag — when `false`, the auditor should warn rather than
|
|
36
|
-
* compile-test the result (the unsupported construct may produce
|
|
37
|
-
* spurious failures).
|
|
38
|
-
*/
|
|
39
|
-
export declare function translateXsdRegex(pattern: string): TranslateResult;
|
|
8
|
+
import { translateXsdRegex, type TranslateResult } from '../../constraints/xsd-regex.js';
|
|
9
|
+
export { translateXsdRegex, type TranslateResult };
|
|
40
10
|
/**
|
|
41
11
|
* Try to compile `pattern` as XSD regex semantics. Returns:
|
|
42
12
|
* - `{ ok: true }` when the pattern is valid (after translation).
|
|
@@ -53,5 +23,4 @@ export declare function compileXsdRegex(pattern: string): {
|
|
|
53
23
|
severity: 'error' | 'warning';
|
|
54
24
|
reason: string;
|
|
55
25
|
};
|
|
56
|
-
export {};
|
|
57
26
|
//# sourceMappingURL=regex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../../src/audit/coherence/regex.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../../src/audit/coherence/regex.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,EACL,iBAAiB,EACjB,KAAK,eAAe,EACrB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAE,KAAK,eAAe,EAAE,CAAC;AAEnD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAEb;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAkB/D"}
|
|
@@ -2,84 +2,14 @@
|
|
|
2
2
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* `
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Auditor-facing XSD-regex helpers. The translation itself now lives in
|
|
6
|
+
* the shared `constraints/xsd-regex` module so the auditor and the
|
|
7
|
+
* constraint matcher (`matchPattern`) can't drift apart; this file keeps
|
|
8
|
+
* the auditor-specific `compileXsdRegex` wrapper and re-exports the
|
|
9
|
+
* translator for existing call sites.
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// simple cases; in general it requires set algebra. Surface it as
|
|
13
|
-
// unsupported so the auditor warns.
|
|
14
|
-
if (/\[[^\]]*-\[/.test(pattern)) {
|
|
15
|
-
return {
|
|
16
|
-
pattern,
|
|
17
|
-
supported: false,
|
|
18
|
-
reason: 'XSD character-class subtraction is not supported in JS regex',
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
let translated = '';
|
|
22
|
-
let i = 0;
|
|
23
|
-
while (i < pattern.length) {
|
|
24
|
-
const ch = pattern.charAt(i);
|
|
25
|
-
if (ch === '\\' && i + 1 < pattern.length) {
|
|
26
|
-
const next = pattern.charAt(i + 1);
|
|
27
|
-
const replacement = mapEscape(next);
|
|
28
|
-
if (replacement) {
|
|
29
|
-
translated += replacement;
|
|
30
|
-
i += 2;
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
// Pass through any other escape (`\n`, `\.`, `\\`, …).
|
|
34
|
-
translated += ch + next;
|
|
35
|
-
i += 2;
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
translated += ch;
|
|
39
|
-
i++;
|
|
40
|
-
}
|
|
41
|
-
return { pattern: translated, supported: true, reason: '' };
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Map an XSD-specific escape character to its JS regex Unicode-property
|
|
45
|
-
* equivalent. Returns `undefined` when the escape is identical in both
|
|
46
|
-
* dialects (and thus needs no translation).
|
|
47
|
-
*
|
|
48
|
-
* The XML production rules these escape codes implement live in the
|
|
49
|
-
* W3C XML 1.0 spec § 2.3 (NameStartChar / NameChar) and § 2.5 (Digit /
|
|
50
|
-
* Letter). We use JS Unicode property escapes (`\p{L}`, `\p{Nd}`) which
|
|
51
|
-
* are equivalent for our purposes when the pattern is compiled with the
|
|
52
|
-
* `u` flag.
|
|
53
|
-
*/
|
|
54
|
-
function mapEscape(ch) {
|
|
55
|
-
switch (ch) {
|
|
56
|
-
case 'i':
|
|
57
|
-
// NameStartChar: letters + `_` + `:` + extended Unicode letters.
|
|
58
|
-
return '[\\p{L}_:]';
|
|
59
|
-
case 'I':
|
|
60
|
-
return '[^\\p{L}_:]';
|
|
61
|
-
case 'c':
|
|
62
|
-
// NameChar: NameStartChar + digits + `.` + `-` + U+00B7 + combining marks.
|
|
63
|
-
return '[\\p{L}\\p{Nd}_:.\\-\\u00B7\\u0300-\\u036F\\u203F-\\u2040]';
|
|
64
|
-
case 'C':
|
|
65
|
-
return '[^\\p{L}\\p{Nd}_:.\\-\\u00B7\\u0300-\\u036F\\u203F-\\u2040]';
|
|
66
|
-
case 'd':
|
|
67
|
-
// JS \d matches `[0-9]`; XSD \d matches all Unicode digits. Use
|
|
68
|
-
// \p{Nd} for full fidelity.
|
|
69
|
-
return '\\p{Nd}';
|
|
70
|
-
case 'D':
|
|
71
|
-
return '\\P{Nd}';
|
|
72
|
-
case 'w':
|
|
73
|
-
// JS \w matches `[A-Za-z0-9_]`; XSD \w matches Unicode letters +
|
|
74
|
-
// digits without underscore. Use a Unicode class that mirrors the
|
|
75
|
-
// XSD definition.
|
|
76
|
-
return '[\\p{L}\\p{Nd}]';
|
|
77
|
-
case 'W':
|
|
78
|
-
return '[^\\p{L}\\p{Nd}]';
|
|
79
|
-
default:
|
|
80
|
-
return undefined;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
11
|
+
import { translateXsdRegex, } from '../../constraints/xsd-regex.js';
|
|
12
|
+
export { translateXsdRegex };
|
|
83
13
|
/**
|
|
84
14
|
* Try to compile `pattern` as XSD regex semantics. Returns:
|
|
85
15
|
* - `{ ok: true }` when the pattern is valid (after translation).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regex.js","sourceRoot":"","sources":["../../../src/audit/coherence/regex.ts"],"names":[],"mappings":"AAAA;;+DAE+D;
|
|
1
|
+
{"version":3,"file":"regex.js","sourceRoot":"","sources":["../../../src/audit/coherence/regex.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;GAMG;AAEH,OAAO,EACL,iBAAiB,GAElB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAwB,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAe;IAIf,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;QACnB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;IACtE,CAAC;IACD,MAAM,UAAU,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC;IACvE,CAAC;IACD,IAAI,CAAC;QACH,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACpC,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC;IACrD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,EAAE,EAAE,KAAK;YACT,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;SACzD,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constraints/index.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EACV,aAAa,EAKd,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constraints/index.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EACV,aAAa,EAKd,MAAM,aAAa,CAAC;AAgBrB,sCAAsC;AACtC,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,aAAa,EACzB,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EACzD,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAmBT;AA2SD;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,aAAa,EACzB,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GACxD,MAAM,CAiBR;AAkDD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,aAAa,GAAG,MAAM,CAOlE"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
4
|
import { compareBoolean, compareNumeric, compareString, isStrictNumericLiteral, isBooleanLiteral, } from './comparators.js';
|
|
5
|
+
import { isNumericXsdBase, isBooleanXsdBase } from './xsd-cast.js';
|
|
6
|
+
import { translateXsdRegex } from './xsd-regex.js';
|
|
5
7
|
/** Tolerance for the bounds matcher's exclusive comparators. */
|
|
6
8
|
const NUMERIC_TOLERANCE = 1e-6;
|
|
7
9
|
/**
|
|
@@ -71,43 +73,85 @@ function matchSimpleValue(constraint, actualValue, caseInsensitive) {
|
|
|
71
73
|
* IDS uses XSD regex syntax which is slightly different from JavaScript
|
|
72
74
|
*/
|
|
73
75
|
function matchPattern(constraint, actualValue, caseInsensitive = false) {
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
// An XSD `xs:pattern` facet constrains the *lexical* space of its base
|
|
77
|
+
// datatype, so it matches the textual representation of the value — the
|
|
78
|
+
// official IDS reference (ifctester) does `re.fullmatch(pattern,
|
|
79
|
+
// str(value))`. A numeric value therefore satisfies e.g.
|
|
80
|
+
// `<restriction base="xs:decimal"><pattern value="^.*$"/>` ("any
|
|
81
|
+
// decimal value present"), which the previous blanket number/boolean
|
|
82
|
+
// bail-out wrongly failed on every numeric property.
|
|
83
|
+
//
|
|
84
|
+
// But the runtime value must first be type-compatible with the declared
|
|
85
|
+
// base: a number only matches a numeric base and a boolean only a
|
|
86
|
+
// boolean base. A number tested against `base="xs:string"` is a type
|
|
87
|
+
// mismatch — buildingSMART's corpus encodes exactly this as
|
|
88
|
+
// `patterns_always_fail_on_any_number`. (A string actual is already the
|
|
89
|
+
// lexical form, so it is matched directly regardless of base.)
|
|
90
|
+
if (typeof actualValue === 'number') {
|
|
91
|
+
if (!isNumericXsdBase(constraint.base))
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
else if (typeof actualValue === 'boolean') {
|
|
95
|
+
if (!isBooleanXsdBase(constraint.base))
|
|
96
|
+
return false;
|
|
80
97
|
}
|
|
81
98
|
const actualStr = String(actualValue);
|
|
99
|
+
const regex = compilePatternRegex(constraint, caseInsensitive);
|
|
100
|
+
// An un-compilable pattern can't match anything (e.g. an unbalanced
|
|
101
|
+
// `[`); treat it as a non-match rather than throwing.
|
|
102
|
+
return regex ? regex.test(actualStr) : false;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Compiled-pattern cache. Translating XSD → JS regex and building the
|
|
106
|
+
* `RegExp` on every value check dominated pattern-heavy validation; the
|
|
107
|
+
* compiled form depends only on (constraint, caseInsensitive), and the
|
|
108
|
+
* constraint object is stable per parsed document.
|
|
109
|
+
*/
|
|
110
|
+
const PATTERN_REGEX_CACHE = new WeakMap();
|
|
111
|
+
function compilePatternRegex(constraint, caseInsensitive) {
|
|
112
|
+
let entry = PATTERN_REGEX_CACHE.get(constraint);
|
|
113
|
+
if (!entry) {
|
|
114
|
+
entry = {};
|
|
115
|
+
PATTERN_REGEX_CACHE.set(constraint, entry);
|
|
116
|
+
}
|
|
117
|
+
const slot = caseInsensitive ? 'ci' : 'cs';
|
|
118
|
+
let regex = entry[slot];
|
|
119
|
+
if (regex === undefined) {
|
|
120
|
+
regex = buildPatternRegex(constraint.pattern, caseInsensitive);
|
|
121
|
+
entry[slot] = regex;
|
|
122
|
+
}
|
|
123
|
+
return regex;
|
|
124
|
+
}
|
|
125
|
+
function buildPatternRegex(xsdPattern, caseInsensitive) {
|
|
126
|
+
// XSD char-class subtraction `[a-z-[aeiou]]` has no JS equivalent;
|
|
127
|
+
// approximate as the positive class (drop the exclusion) so the rest
|
|
128
|
+
// of the pattern still evaluates, matching long-standing behaviour.
|
|
129
|
+
const desubtracted = xsdPattern.replace(/\[([^\]]+)-\[[^\]]+\]\]/g, '[$1]');
|
|
130
|
+
// Shared XSD → JS translation: `\i`/`\c`/`\d`/`\w` (and their
|
|
131
|
+
// negations) map to Unicode property escapes, and verbatim `\p{…}`
|
|
132
|
+
// classes pass through — both require the `u` flag for full fidelity.
|
|
133
|
+
const { pattern } = translateXsdRegex(desubtracted);
|
|
134
|
+
// IDS patterns must match the entire lexical value. Wrapping in a
|
|
135
|
+
// non-capturing group anchors top-level alternation correctly
|
|
136
|
+
// (`a|b` → `^(?:a|b)$`, not `^a|b$`). Case-insensitive matching is
|
|
137
|
+
// opt-in per the call site (entity / predefined-type names use it;
|
|
138
|
+
// property and attribute values do not).
|
|
139
|
+
const anchored = `^(?:${pattern})$`;
|
|
82
140
|
try {
|
|
83
|
-
|
|
84
|
-
const jsPattern = xsdToJsRegex(constraint.pattern);
|
|
85
|
-
// IDS patterns must match the entire string. Case-insensitive
|
|
86
|
-
// matching is opt-in per the call site (entity / predefined-type
|
|
87
|
-
// names use it; property and attribute values do not).
|
|
88
|
-
const flags = caseInsensitive ? 'i' : '';
|
|
89
|
-
const regex = new RegExp(`^${jsPattern}$`, flags);
|
|
90
|
-
return regex.test(actualStr);
|
|
141
|
+
return new RegExp(anchored, caseInsensitive ? 'iu' : 'u');
|
|
91
142
|
}
|
|
92
143
|
catch {
|
|
93
|
-
//
|
|
94
|
-
|
|
144
|
+
// Some patterns are valid under JS's lenient (Annex-B) dialect but
|
|
145
|
+
// rejected under `u`. Retry without it so plain patterns keep
|
|
146
|
+
// matching; this loses `\p{…}` fidelity for that one pattern only.
|
|
147
|
+
try {
|
|
148
|
+
return new RegExp(anchored, caseInsensitive ? 'i' : '');
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
95
153
|
}
|
|
96
154
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Convert XSD regex syntax to JavaScript regex
|
|
99
|
-
*/
|
|
100
|
-
function xsdToJsRegex(xsdPattern) {
|
|
101
|
-
return (xsdPattern
|
|
102
|
-
// XSD \i (initial name char) -> [A-Za-z_:]
|
|
103
|
-
.replace(/\\i/g, '[A-Za-z_:]')
|
|
104
|
-
// XSD \c (name char) -> [A-Za-z0-9._:-]
|
|
105
|
-
.replace(/\\c/g, '[A-Za-z0-9._:-]')
|
|
106
|
-
// XSD \p{...} character classes - simplified handling
|
|
107
|
-
.replace(/\\p\{[^}]+\}/g, '.')
|
|
108
|
-
// XSD subtraction [a-z-[aeiou]] not supported in JS - simplify
|
|
109
|
-
.replace(/\[([^\]]+)-\[[^\]]+\]\]/g, '[$1]'));
|
|
110
|
-
}
|
|
111
155
|
/**
|
|
112
156
|
* Compiled exact-match sets per enumeration constraint. Real-world IDS
|
|
113
157
|
* code lists carry hundreds of values and are matched against every
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constraints/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAc/D,OAAO,EACL,cAAc,EACd,cAAc,EACd,aAAa,EAEb,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAE1B,gEAAgE;AAChE,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAa/B;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,UAAyB,EACzB,WAAyD,EACzD,OAAsB;IAEtB,IAAI,WAAW,KAAK,IAAI,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QACtD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,EAAE,GAAG,OAAO,EAAE,eAAe,IAAI,KAAK,CAAC;IAE7C,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;QACxB,KAAK,aAAa;YAChB,OAAO,gBAAgB,CAAC,UAAU,EAAE,WAAW,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K,QAAQ;YACX,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC;QAClC;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,UAA+B;IACnD,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,IACE,UAAU,CAAC,YAAY,KAAK,SAAS;QACrC,UAAU,CAAC,YAAY,KAAK,SAAS,EACrC,CAAC;QACD,OAAO,WAAW,UAAU,CAAC,YAAY,QAAQ,UAAU,CAAC,YAAY,EAAE,CAAC;IAC7E,CAAC;IAED,IAAI,UAAU,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CAAC,MAAM,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,UAAU,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CAAC,MAAM,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,UAAU,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CAAC,KAAK,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,IAAI,UAAU,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CAAC,KAAK,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,WAAW,CAAC;AAC5C,CAAC"}
|
|
@@ -6,15 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare function literalCastsUnderAnyType(value: string, xsdTypes: readonly string[] | undefined): boolean;
|
|
8
8
|
export declare function literalCastsUnder(value: string, xsdType: string): boolean;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* gate to property literals — properties carry their measure name
|
|
14
|
-
* (not an XSD type) so we map first.
|
|
15
|
-
*
|
|
16
|
-
* Returns an empty array for measures we don't have a mapping for —
|
|
17
|
-
* `literalCastsUnderAnyType` then no-ops.
|
|
18
|
-
*/
|
|
9
|
+
/** True iff the restriction `@base` declares a numeric value space. */
|
|
10
|
+
export declare function isNumericXsdBase(base: string | undefined): boolean;
|
|
11
|
+
/** True iff the restriction `@base` declares the boolean value space. */
|
|
12
|
+
export declare function isBooleanXsdBase(base: string | undefined): boolean;
|
|
19
13
|
export declare function ifcMeasureToXsdTypes(measure: string | undefined): readonly string[];
|
|
20
14
|
//# sourceMappingURL=xsd-cast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xsd-cast.d.ts","sourceRoot":"","sources":["../../src/constraints/xsd-cast.ts"],"names":[],"mappings":"AAsBA;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACtC,OAAO,CAGT;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAoBzE;AAED
|
|
1
|
+
{"version":3,"file":"xsd-cast.d.ts","sourceRoot":"","sources":["../../src/constraints/xsd-cast.ts"],"names":[],"mappings":"AAsBA;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACtC,OAAO,CAGT;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAoBzE;AA4CD,uEAAuE;AACvE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAElE;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAElE;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,MAAM,EAAE,CAuBnF"}
|
|
@@ -57,6 +57,45 @@ export function literalCastsUnder(value, xsdType) {
|
|
|
57
57
|
* Returns an empty array for measures we don't have a mapping for —
|
|
58
58
|
* `literalCastsUnderAnyType` then no-ops.
|
|
59
59
|
*/
|
|
60
|
+
/**
|
|
61
|
+
* XSD base local-names (the part after `xs:`) whose value space is
|
|
62
|
+
* numeric. Used to decide whether a numeric runtime value is
|
|
63
|
+
* type-compatible with a restriction's declared `@base` before its
|
|
64
|
+
* lexical form is pattern-matched.
|
|
65
|
+
*/
|
|
66
|
+
const NUMERIC_BASE_LOCALS = new Set([
|
|
67
|
+
'decimal',
|
|
68
|
+
'double',
|
|
69
|
+
'float',
|
|
70
|
+
'integer',
|
|
71
|
+
'long',
|
|
72
|
+
'int',
|
|
73
|
+
'short',
|
|
74
|
+
'byte',
|
|
75
|
+
'nonnegativeinteger',
|
|
76
|
+
'positiveinteger',
|
|
77
|
+
'nonpositiveinteger',
|
|
78
|
+
'negativeinteger',
|
|
79
|
+
'unsignedlong',
|
|
80
|
+
'unsignedint',
|
|
81
|
+
'unsignedshort',
|
|
82
|
+
'unsignedbyte',
|
|
83
|
+
]);
|
|
84
|
+
/** Strip any namespace prefix (`xs:`, `xsd:`) and lower-case the base. */
|
|
85
|
+
function baseLocalName(base) {
|
|
86
|
+
if (!base)
|
|
87
|
+
return '';
|
|
88
|
+
const colon = base.lastIndexOf(':');
|
|
89
|
+
return (colon >= 0 ? base.slice(colon + 1) : base).toLowerCase();
|
|
90
|
+
}
|
|
91
|
+
/** True iff the restriction `@base` declares a numeric value space. */
|
|
92
|
+
export function isNumericXsdBase(base) {
|
|
93
|
+
return NUMERIC_BASE_LOCALS.has(baseLocalName(base));
|
|
94
|
+
}
|
|
95
|
+
/** True iff the restriction `@base` declares the boolean value space. */
|
|
96
|
+
export function isBooleanXsdBase(base) {
|
|
97
|
+
return baseLocalName(base) === 'boolean';
|
|
98
|
+
}
|
|
60
99
|
export function ifcMeasureToXsdTypes(measure) {
|
|
61
100
|
if (!measure)
|
|
62
101
|
return [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xsd-cast.js","sourceRoot":"","sources":["../../src/constraints/xsd-cast.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;GAQG;AAEH,MAAM,UAAU,GAAG,YAAY,CAAC;AAChC,MAAM,SAAS,GAAG,yCAAyC,CAAC;AAC5D,MAAM,OAAO,GAAG,yCAAyC,CAAC;AAC1D,MAAM,WAAW,GACf,mEAAmE,CAAC;AACtE,MAAM,WAAW,GACf,6EAA6E,CAAC;AAEhF;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,KAAa,EACb,QAAuC;IAEvC,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACpD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAa,EAAE,OAAe;IAC9D,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,YAAY;YACf,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,KAAK,WAAW;YACd,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/B,KAAK,YAAY;YACf,OAAO,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,OAAO,CAAC;QAC/C,KAAK,SAAS;YACZ,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,KAAK,aAAa;YAChB,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjC,KAAK,aAAa;YAChB,OAAO,WAAW,CAAC,IAAI,CAAC,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C;IACxC,IAAI,CAAC,KAAK,aAAa;QAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAChD,IAAI,CAAC,KAAK,aAAa,IAAI,CAAC,KAAK,cAAc;QAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACxE,gEAAgE;IAChE,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACpE,OAAO,CAAC,WAAW,CAAC,CAAC;IACvB,CAAC;IACD,yDAAyD;IACzD,IACE,CAAC,KAAK,UAAU;QAChB,CAAC,KAAK,SAAS;QACf,CAAC,KAAK,eAAe;QACrB,CAAC,KAAK,WAAW,EACjB,CAAC;QACD,OAAO,CAAC,WAAW,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical XSD-regex → JavaScript-regex translator shared by the
|
|
3
|
+
* constraint matcher (`matchPattern`) and the document auditor
|
|
4
|
+
* (`audit/coherence`). Keeping a single implementation avoids the two
|
|
5
|
+
* dialects drifting apart.
|
|
6
|
+
*
|
|
7
|
+
* Ported from `IdsLib/IdsSchema/XsNodes/XmlRegex.cs` (MIT) which itself
|
|
8
|
+
* mirrors Microsoft's reference XSD facet checker. XSD regex extends
|
|
9
|
+
* the JS dialect with:
|
|
10
|
+
*
|
|
11
|
+
* - `\i` — XML name start char (letter, `_`, `:` plus a swathe of
|
|
12
|
+
* Unicode letters)
|
|
13
|
+
* - `\c` — XML name char (`\i` plus digits, `.`, `-`, U+00B7, etc.)
|
|
14
|
+
* - `\d` — Unicode digit (broader than JS `[0-9]`)
|
|
15
|
+
* - `\w` — Unicode word char (letters + digits, no `_`)
|
|
16
|
+
* - `\D`, `\C`, `\I`, `\W` — negations
|
|
17
|
+
* - `\p{IsBasicLatin}`-style Unicode *block* escapes — .NET supports
|
|
18
|
+
* these but JS does not, so they are approximated.
|
|
19
|
+
* - char-class subtraction `[a-z-[aeiou]]` — no JS equivalent.
|
|
20
|
+
*
|
|
21
|
+
* The translation maps to JS Unicode property escapes, so the compiled
|
|
22
|
+
* `RegExp` MUST use the `u` flag. Verbatim `\p{…}` / `\P{…}` *category*
|
|
23
|
+
* classes pass through unchanged — they too require `u`.
|
|
24
|
+
*
|
|
25
|
+
* Translation is character-class aware: a multi-character escape like
|
|
26
|
+
* `\w` expands to a bracketed class `[\p{L}\p{Nd}]` at top level but to
|
|
27
|
+
* its bare members `\p{L}\p{Nd}` when it already sits inside `[ … ]`, so
|
|
28
|
+
* `[\w]` does not become the invalid nested class `[[\p{L}\p{Nd}]]`.
|
|
29
|
+
* Constructs with no faithful JS form (block escapes, a negated class
|
|
30
|
+
* escape inside `[ … ]`) are replaced with an any-character placeholder
|
|
31
|
+
* and `supported` is set to `false` so callers can warn instead of
|
|
32
|
+
* trusting the (approximate) result.
|
|
33
|
+
*/
|
|
34
|
+
export interface TranslateResult {
|
|
35
|
+
/** The pattern usable with the JS `RegExp` constructor (under `u`). */
|
|
36
|
+
pattern: string;
|
|
37
|
+
/** Whether translation produced a faithful JS-compatible regex. */
|
|
38
|
+
supported: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Human-readable reason when `supported === false`. Empty string when
|
|
41
|
+
* fully supported.
|
|
42
|
+
*/
|
|
43
|
+
reason: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Translate the XSD pattern. Returns the JS-compatible pattern plus a
|
|
47
|
+
* `supported` flag — when `false`, callers should warn / treat the
|
|
48
|
+
* result leniently (an untranslatable construct was approximated).
|
|
49
|
+
*/
|
|
50
|
+
export declare function translateXsdRegex(pattern: string): TranslateResult;
|
|
51
|
+
//# sourceMappingURL=xsd-regex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xsd-regex.d.ts","sourceRoot":"","sources":["../../src/constraints/xsd-regex.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,MAAM,WAAW,eAAe;IAC9B,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAMD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAsElE"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/** Any single character — placeholder for untranslatable constructs. */
|
|
5
|
+
const ANY_OUTSIDE_CLASS = '[\\s\\S]';
|
|
6
|
+
const ANY_INSIDE_CLASS = '\\s\\S';
|
|
7
|
+
/**
|
|
8
|
+
* Translate the XSD pattern. Returns the JS-compatible pattern plus a
|
|
9
|
+
* `supported` flag — when `false`, callers should warn / treat the
|
|
10
|
+
* result leniently (an untranslatable construct was approximated).
|
|
11
|
+
*/
|
|
12
|
+
export function translateXsdRegex(pattern) {
|
|
13
|
+
let out = '';
|
|
14
|
+
let i = 0;
|
|
15
|
+
let inClass = false;
|
|
16
|
+
let reason = '';
|
|
17
|
+
const flag = (r) => {
|
|
18
|
+
if (!reason)
|
|
19
|
+
reason = r;
|
|
20
|
+
};
|
|
21
|
+
while (i < pattern.length) {
|
|
22
|
+
const ch = pattern.charAt(i);
|
|
23
|
+
if (ch === '\\' && i + 1 < pattern.length) {
|
|
24
|
+
const next = pattern.charAt(i + 1);
|
|
25
|
+
// `\p{…}` / `\P{…}` — pass through category classes JS recognises;
|
|
26
|
+
// approximate block escapes (e.g. `\p{IsBasicLatin}`) it does not.
|
|
27
|
+
if (next === 'p' || next === 'P') {
|
|
28
|
+
const m = /^\\[pP]\{([^}]*)\}/.exec(pattern.slice(i));
|
|
29
|
+
if (m) {
|
|
30
|
+
if (isJsUnicodeProperty(next, m[1])) {
|
|
31
|
+
out += m[0];
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
flag(`Unicode property \\${next}{${m[1]}} has no JS equivalent`);
|
|
35
|
+
out += inClass ? ANY_INSIDE_CLASS : ANY_OUTSIDE_CLASS;
|
|
36
|
+
}
|
|
37
|
+
i += m[0].length;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
out += ch + next;
|
|
41
|
+
i += 2;
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const mapped = mapEscape(next, inClass);
|
|
45
|
+
if (mapped === UNSUPPORTED_IN_CLASS) {
|
|
46
|
+
flag(`\\${next} cannot be expressed inside a character class in JS`);
|
|
47
|
+
out += ANY_INSIDE_CLASS;
|
|
48
|
+
}
|
|
49
|
+
else if (mapped !== undefined) {
|
|
50
|
+
out += mapped;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
// Pass through any other escape (`\n`, `\.`, `\\`, `\[`, …).
|
|
54
|
+
out += ch + next;
|
|
55
|
+
}
|
|
56
|
+
i += 2;
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
if (ch === '[' && !inClass) {
|
|
60
|
+
// Char-class subtraction `[a-z-[aeiou]]` has no JS equivalent.
|
|
61
|
+
if (/^\[[^\]]*-\[/.test(pattern.slice(i))) {
|
|
62
|
+
flag('XSD character-class subtraction is not supported in JS regex');
|
|
63
|
+
}
|
|
64
|
+
inClass = true;
|
|
65
|
+
out += ch;
|
|
66
|
+
i++;
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (ch === ']' && inClass) {
|
|
70
|
+
inClass = false;
|
|
71
|
+
out += ch;
|
|
72
|
+
i++;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
out += ch;
|
|
76
|
+
i++;
|
|
77
|
+
}
|
|
78
|
+
return { pattern: out, supported: reason === '', reason };
|
|
79
|
+
}
|
|
80
|
+
/** Sentinel: escape has no faithful form inside a `[ … ]` character class. */
|
|
81
|
+
const UNSUPPORTED_IN_CLASS = '\0unsupported-in-class';
|
|
82
|
+
/**
|
|
83
|
+
* Map an XSD-specific escape to its JS Unicode-property equivalent.
|
|
84
|
+
* Returns `undefined` when the escape is identical in both dialects (and
|
|
85
|
+
* thus needs no translation), or `UNSUPPORTED_IN_CLASS` when the escape
|
|
86
|
+
* is a negated class that can't be inlined inside `[ … ]`.
|
|
87
|
+
*
|
|
88
|
+
* The XML production rules these escapes implement live in the W3C XML
|
|
89
|
+
* 1.0 spec § 2.3 (NameStartChar / NameChar) and § 2.5 (Digit / Letter).
|
|
90
|
+
* JS Unicode property escapes (`\p{L}`, `\p{Nd}`) are equivalent for our
|
|
91
|
+
* purposes under the `u` flag. `inClass` selects the bare-members form
|
|
92
|
+
* so the result can be spliced into a surrounding class.
|
|
93
|
+
*/
|
|
94
|
+
function mapEscape(ch, inClass) {
|
|
95
|
+
switch (ch) {
|
|
96
|
+
case 'i':
|
|
97
|
+
// NameStartChar: letters + `_` + `:` + extended Unicode letters.
|
|
98
|
+
return inClass ? '\\p{L}_:' : '[\\p{L}_:]';
|
|
99
|
+
case 'c':
|
|
100
|
+
// NameChar: NameStartChar + digits + `.` + `-` + U+00B7 + combining marks.
|
|
101
|
+
return inClass
|
|
102
|
+
? '\\p{L}\\p{Nd}_:.\\-\\u00B7\\u0300-\\u036F\\u203F-\\u2040'
|
|
103
|
+
: '[\\p{L}\\p{Nd}_:.\\-\\u00B7\\u0300-\\u036F\\u203F-\\u2040]';
|
|
104
|
+
case 'd':
|
|
105
|
+
// JS \d matches `[0-9]`; XSD \d matches all Unicode digits.
|
|
106
|
+
return '\\p{Nd}';
|
|
107
|
+
case 'D':
|
|
108
|
+
return '\\P{Nd}';
|
|
109
|
+
case 'w':
|
|
110
|
+
// JS \w matches `[A-Za-z0-9_]`; XSD \w is Unicode letters + digits
|
|
111
|
+
// without underscore.
|
|
112
|
+
return inClass ? '\\p{L}\\p{Nd}' : '[\\p{L}\\p{Nd}]';
|
|
113
|
+
case 'I':
|
|
114
|
+
return inClass ? UNSUPPORTED_IN_CLASS : '[^\\p{L}_:]';
|
|
115
|
+
case 'C':
|
|
116
|
+
return inClass
|
|
117
|
+
? UNSUPPORTED_IN_CLASS
|
|
118
|
+
: '[^\\p{L}\\p{Nd}_:.\\-\\u00B7\\u0300-\\u036F\\u203F-\\u2040]';
|
|
119
|
+
case 'W':
|
|
120
|
+
return inClass ? UNSUPPORTED_IN_CLASS : '[^\\p{L}\\p{Nd}]';
|
|
121
|
+
default:
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Whether JS's Unicode regex dialect recognises the property name in a
|
|
127
|
+
* `\p{name}` / `\P{name}` escape. Delegates to the engine itself rather
|
|
128
|
+
* than maintaining a name list — XSD `\p{L}` etc. compile, while block
|
|
129
|
+
* escapes like `\p{IsBasicLatin}` throw.
|
|
130
|
+
*/
|
|
131
|
+
function isJsUnicodeProperty(pOrP, name) {
|
|
132
|
+
try {
|
|
133
|
+
// eslint-disable-next-line no-new
|
|
134
|
+
new RegExp(`\\${pOrP}{${name}}`, 'u');
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=xsd-regex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xsd-regex.js","sourceRoot":"","sources":["../../src/constraints/xsd-regex.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAgD/D,wEAAwE;AACxE,MAAM,iBAAiB,GAAG,UAAU,CAAC;AACrC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAElC;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/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