@ifc-lite/parser 5.1.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classification-resolver.d.ts.map +1 -1
- package/dist/classification-resolver.js +35 -10
- package/dist/classification-resolver.js.map +1 -1
- package/dist/columnar-entity-preparation.d.ts +25 -0
- package/dist/columnar-entity-preparation.d.ts.map +1 -0
- package/dist/columnar-entity-preparation.js +282 -0
- package/dist/columnar-entity-preparation.js.map +1 -0
- package/dist/columnar-parser-indexes.d.ts +17 -1
- package/dist/columnar-parser-indexes.d.ts.map +1 -1
- package/dist/columnar-parser-indexes.js +31 -21
- package/dist/columnar-parser-indexes.js.map +1 -1
- package/dist/columnar-parser-root-attributes.d.ts +66 -0
- package/dist/columnar-parser-root-attributes.d.ts.map +1 -0
- package/dist/columnar-parser-root-attributes.js +245 -0
- package/dist/columnar-parser-root-attributes.js.map +1 -0
- package/dist/columnar-parser.d.ts +26 -63
- package/dist/columnar-parser.d.ts.map +1 -1
- package/dist/columnar-parser.js +384 -751
- package/dist/columnar-parser.js.map +1 -1
- package/dist/compact-entity-index-columns.d.ts +17 -0
- package/dist/compact-entity-index-columns.d.ts.map +1 -0
- package/dist/compact-entity-index-columns.js +15 -0
- package/dist/compact-entity-index-columns.js.map +1 -0
- package/dist/compact-entity-index-transport.d.ts +2 -12
- package/dist/compact-entity-index-transport.d.ts.map +1 -1
- package/dist/compact-entity-index-transport.js +1 -11
- package/dist/compact-entity-index-transport.js.map +1 -1
- package/dist/compact-entity-index.d.ts +6 -0
- package/dist/compact-entity-index.d.ts.map +1 -1
- package/dist/compact-entity-index.js +12 -20
- package/dist/compact-entity-index.js.map +1 -1
- package/dist/cost-extractor.d.ts +10 -0
- package/dist/cost-extractor.d.ts.map +1 -0
- package/dist/cost-extractor.js +369 -0
- package/dist/cost-extractor.js.map +1 -0
- package/dist/cost-schedule-2x3.d.ts +31 -0
- package/dist/cost-schedule-2x3.d.ts.map +1 -0
- package/dist/cost-schedule-2x3.js +75 -0
- package/dist/cost-schedule-2x3.js.map +1 -0
- package/dist/cost-types.d.ts +105 -0
- package/dist/cost-types.d.ts.map +1 -0
- package/dist/cost-types.js +5 -0
- package/dist/cost-types.js.map +1 -0
- package/dist/data-store-transport.d.ts +3 -2
- package/dist/data-store-transport.d.ts.map +1 -1
- package/dist/data-store-transport.js +10 -34
- package/dist/data-store-transport.js.map +1 -1
- package/dist/drop-census.d.ts +136 -0
- package/dist/drop-census.d.ts.map +1 -0
- package/dist/drop-census.js +53 -0
- package/dist/drop-census.js.map +1 -0
- package/dist/entity-refs-from-index.d.ts +10 -0
- package/dist/entity-refs-from-index.d.ts.map +1 -1
- package/dist/entity-refs-from-index.js +52 -36
- package/dist/entity-refs-from-index.js.map +1 -1
- package/dist/entity-scanner.d.ts +5 -0
- package/dist/entity-scanner.d.ts.map +1 -1
- package/dist/entity-scanner.js +30 -12
- package/dist/entity-scanner.js.map +1 -1
- package/dist/entity-type-byte-interner.d.ts +12 -0
- package/dist/entity-type-byte-interner.d.ts.map +1 -0
- package/dist/entity-type-byte-interner.js +66 -0
- package/dist/entity-type-byte-interner.js.map +1 -0
- package/dist/generated/ifc2x3/schema-registry.d.ts +50 -0
- package/dist/generated/ifc2x3/schema-registry.d.ts.map +1 -0
- package/dist/generated/ifc2x3/schema-registry.js +50052 -0
- package/dist/generated/ifc2x3/schema-registry.js.map +1 -0
- package/dist/generated/ifc4x3/schema-registry.d.ts +50 -0
- package/dist/generated/ifc4x3/schema-registry.d.ts.map +1 -0
- package/dist/generated/ifc4x3/schema-registry.js +71299 -0
- package/dist/generated/ifc4x3/schema-registry.js.map +1 -0
- package/dist/generated/schema-registry-by-version.d.ts +61 -0
- package/dist/generated/schema-registry-by-version.d.ts.map +1 -0
- package/dist/generated/schema-registry-by-version.js +86 -0
- package/dist/generated/schema-registry-by-version.js.map +1 -0
- package/dist/group-assignment-factor.d.ts +13 -0
- package/dist/group-assignment-factor.d.ts.map +1 -0
- package/dist/group-assignment-factor.js +30 -0
- package/dist/group-assignment-factor.js.map +1 -0
- package/dist/ifczip.d.ts +6 -0
- package/dist/ifczip.d.ts.map +1 -1
- package/dist/ifczip.js +20 -11
- package/dist/ifczip.js.map +1 -1
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/on-demand-extractors.d.ts +1 -0
- package/dist/on-demand-extractors.d.ts.map +1 -1
- package/dist/on-demand-extractors.js +2 -1
- package/dist/on-demand-extractors.js.map +1 -1
- package/dist/parser.worker.d.ts +6 -3
- package/dist/parser.worker.d.ts.map +1 -1
- package/dist/parser.worker.js +24 -12
- package/dist/parser.worker.js.map +1 -1
- package/dist/prepass-source-fingerprint.d.ts +3 -0
- package/dist/prepass-source-fingerprint.d.ts.map +1 -0
- package/dist/prepass-source-fingerprint.js +13 -0
- package/dist/prepass-source-fingerprint.js.map +1 -0
- package/dist/property-value-parser.d.ts +10 -0
- package/dist/property-value-parser.d.ts.map +1 -1
- package/dist/property-value-parser.js +40 -1
- package/dist/property-value-parser.js.map +1 -1
- package/dist/scan-entities-balanced.d.ts.map +1 -1
- package/dist/scan-entities-balanced.js +8 -6
- package/dist/scan-entities-balanced.js.map +1 -1
- package/dist/scan-worker-lexing.d.ts +14 -0
- package/dist/scan-worker-lexing.d.ts.map +1 -0
- package/dist/scan-worker-lexing.js +101 -0
- package/dist/scan-worker-lexing.js.map +1 -0
- package/dist/scan-worker-source.d.ts +1 -1
- package/dist/scan-worker-source.d.ts.map +1 -1
- package/dist/scan-worker-source.js +61 -59
- package/dist/scan-worker-source.js.map +1 -1
- package/dist/schedule-extractor.d.ts +2 -80
- package/dist/schedule-extractor.d.ts.map +1 -1
- package/dist/schedule-extractor.js +100 -225
- package/dist/schedule-extractor.js.map +1 -1
- package/dist/schedule-serializer-builders.d.ts +28 -0
- package/dist/schedule-serializer-builders.d.ts.map +1 -0
- package/dist/schedule-serializer-builders.js +163 -0
- package/dist/schedule-serializer-builders.js.map +1 -0
- package/dist/schedule-serializer.d.ts +6 -0
- package/dist/schedule-serializer.d.ts.map +1 -1
- package/dist/schedule-serializer.js +26 -165
- package/dist/schedule-serializer.js.map +1 -1
- package/dist/schedule-types.d.ts +211 -0
- package/dist/schedule-types.d.ts.map +1 -0
- package/dist/schedule-types.js +221 -0
- package/dist/schedule-types.js.map +1 -0
- package/dist/select-entity-columns.d.ts +7 -0
- package/dist/select-entity-columns.d.ts.map +1 -0
- package/dist/select-entity-columns.js +43 -0
- package/dist/select-entity-columns.js.map +1 -0
- package/dist/spatial-hierarchy-ambiguity.d.ts +39 -0
- package/dist/spatial-hierarchy-ambiguity.d.ts.map +1 -0
- package/dist/spatial-hierarchy-ambiguity.js +25 -0
- package/dist/spatial-hierarchy-ambiguity.js.map +1 -0
- package/dist/spatial-hierarchy-attributes.d.ts +54 -0
- package/dist/spatial-hierarchy-attributes.d.ts.map +1 -0
- package/dist/spatial-hierarchy-attributes.js +145 -0
- package/dist/spatial-hierarchy-attributes.js.map +1 -0
- package/dist/spatial-hierarchy-builder.d.ts +6 -38
- package/dist/spatial-hierarchy-builder.d.ts.map +1 -1
- package/dist/spatial-hierarchy-builder.js +48 -166
- package/dist/spatial-hierarchy-builder.js.map +1 -1
- package/dist/spatial-hierarchy-canonical-parent.d.ts +86 -0
- package/dist/spatial-hierarchy-canonical-parent.d.ts.map +1 -0
- package/dist/spatial-hierarchy-canonical-parent.js +212 -0
- package/dist/spatial-hierarchy-canonical-parent.js.map +1 -0
- package/dist/step-lexing.d.ts +1 -1
- package/dist/step-lexing.d.ts.map +1 -1
- package/dist/step-lexing.js +1 -56
- package/dist/step-lexing.js.map +1 -1
- package/dist/step-record-boundary.d.ts +28 -0
- package/dist/step-record-boundary.d.ts.map +1 -0
- package/dist/step-record-boundary.js +108 -0
- package/dist/step-record-boundary.js.map +1 -0
- package/dist/step-record-boundary.vectors.d.ts +58 -0
- package/dist/step-record-boundary.vectors.d.ts.map +1 -0
- package/dist/step-record-boundary.vectors.js +80 -0
- package/dist/step-record-boundary.vectors.js.map +1 -0
- package/dist/structural-extractor.d.ts +9 -0
- package/dist/structural-extractor.d.ts.map +1 -0
- package/dist/structural-extractor.js +310 -0
- package/dist/structural-extractor.js.map +1 -0
- package/dist/structural-load-extractor.d.ts +147 -0
- package/dist/structural-load-extractor.d.ts.map +1 -0
- package/dist/structural-load-extractor.js +178 -0
- package/dist/structural-load-extractor.js.map +1 -0
- package/dist/structural-step-values.d.ts +51 -0
- package/dist/structural-step-values.d.ts.map +1 -0
- package/dist/structural-step-values.js +109 -0
- package/dist/structural-step-values.js.map +1 -0
- package/dist/structural-types.d.ts +145 -0
- package/dist/structural-types.d.ts.map +1 -0
- package/dist/structural-types.js +5 -0
- package/dist/structural-types.js.map +1 -0
- package/dist/tokenizer.d.ts +11 -5
- package/dist/tokenizer.d.ts.map +1 -1
- package/dist/tokenizer.js +75 -21
- package/dist/tokenizer.js.map +1 -1
- package/dist/wasm-init-retry.d.ts +6 -42
- package/dist/wasm-init-retry.d.ts.map +1 -1
- package/dist/wasm-init-retry.js +6 -99
- package/dist/wasm-init-retry.js.map +1 -1
- package/dist/wasm-panic-forward.d.ts +7 -63
- package/dist/wasm-panic-forward.d.ts.map +1 -1
- package/dist/wasm-panic-forward.js +7 -100
- package/dist/wasm-panic-forward.js.map +1 -1
- package/dist/worker-index-publication.d.ts +43 -0
- package/dist/worker-index-publication.d.ts.map +1 -0
- package/dist/worker-index-publication.js +129 -0
- package/dist/worker-index-publication.js.map +1 -0
- package/dist/worker-parser.d.ts +5 -2
- package/dist/worker-parser.d.ts.map +1 -1
- package/dist/worker-parser.js +22 -10
- package/dist/worker-parser.js.map +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-hierarchy-canonical-parent.js","sourceRoot":"","sources":["../src/spatial-hierarchy-canonical-parent.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAQ/D,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AAI,CAAC,OAAO,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/step-lexing.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ export interface Skip {
|
|
|
8
8
|
}
|
|
9
9
|
export declare function skipLexical(buf: Uint8Array, pos: number, len: number): Skip;
|
|
10
10
|
export declare function opensLiteralOrComment(buf: Uint8Array, pos: number, len: number): boolean;
|
|
11
|
+
export declare function isSpaceByte(b: number): boolean;
|
|
11
12
|
export declare function skipTrivia(buf: Uint8Array, pos: number, len: number): Skip;
|
|
12
13
|
export declare function countNewlines(buf: Uint8Array, from: number, to: number): number;
|
|
13
|
-
export declare function findEntityLength(buf: Uint8Array, pos: number, startOffset: number): number;
|
|
14
14
|
/**
|
|
15
15
|
* A scan of one decoded string.
|
|
16
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-lexing.d.ts","sourceRoot":"","sources":["../src/step-lexing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"step-lexing.d.ts","sourceRoot":"","sources":["../src/step-lexing.ts"],"names":[],"mappings":"AAyBA,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE/E;AA0BD,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAO7E;AAaD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAanF;AAED,MAAM,WAAW,IAAI;IAEnB,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IAKd,IAAI,EAAE,OAAO,CAAC;CACf;AAKD,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,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 0x28; // '('
|
|
23
|
-
const RPAREN = 0x29; // ')'
|
|
24
22
|
// Whether a comment opens at `pos`.
|
|
25
23
|
export function opensComment(buf, pos, len) {
|
|
26
24
|
return buf[pos] === SLASH && pos + 1 < len && buf[pos + 1] === STAR;
|
|
@@ -117,7 +115,7 @@ export function opensLiteralOrComment(buf, pos, len) {
|
|
|
117
115
|
// definition and excludes vertical tab, so reaching for it on either side
|
|
118
116
|
// reintroduces the exact FF/VT divergence issue #3733 reported (dropped
|
|
119
117
|
// entity on a leading form feed) rather than closing it.
|
|
120
|
-
function isSpaceByte(b) {
|
|
118
|
+
export function isSpaceByte(b) {
|
|
121
119
|
return (b === 0x20 || b === 0x09 || b === 0x0d || b === NEWLINE || b === 0x0c || b === 0x0b);
|
|
122
120
|
}
|
|
123
121
|
// Skip STEP trivia from `pos`: whitespace, comments, and any run of the two.
|
|
@@ -166,59 +164,6 @@ export function countNewlines(buf, from, to) {
|
|
|
166
164
|
}
|
|
167
165
|
return n;
|
|
168
166
|
}
|
|
169
|
-
// Byte length of the record that starts at `startOffset` and whose argument
|
|
170
|
-
// list opens at `pos`: the span up to and including the ')' balancing that '(',
|
|
171
|
-
// or 0 when the input runs out first.
|
|
172
|
-
//
|
|
173
|
-
// A string literal is jumped over by skipStringLiteral above rather than
|
|
174
|
-
// counted, so the '(' in 'Storey (Level 1)' is text and not depth, and STEP's
|
|
175
|
-
// doubled-quote escape ('') stays inside the literal instead of closing it.
|
|
176
|
-
// Sharing that helper is what keeps the escape rule in one place: an
|
|
177
|
-
// open-coded `inString` flag here would be a second copy of it, free to drift
|
|
178
|
-
// from the one every other scanner in this file uses.
|
|
179
|
-
//
|
|
180
|
-
// A comment is jumped over for the same reason, in the same order: the literal
|
|
181
|
-
// test comes first, so a '/*' inside a value is text; the comment is then taken
|
|
182
|
-
// whole, so a '(' or a quote inside it is text. Without that, the comment in
|
|
183
|
-
// `#1=IFCWALL('a', /* see IFCWALL( */ $);` opened a paren depth that never
|
|
184
|
-
// closed and the record came back with length 0.
|
|
185
|
-
export function findEntityLength(buf, pos, startOffset) {
|
|
186
|
-
const len = buf.length;
|
|
187
|
-
let depth = 0;
|
|
188
|
-
while (pos < len) {
|
|
189
|
-
const char = buf[pos];
|
|
190
|
-
if (char === QUOTE) {
|
|
191
|
-
// Returns `-1` on an unterminated literal (see skipStringLiteral's own
|
|
192
|
-
// doc): no balancing ')' can follow, same 0 as running off the end.
|
|
193
|
-
const next = skipStringLiteral(buf, pos, len);
|
|
194
|
-
if (next < 0)
|
|
195
|
-
return 0;
|
|
196
|
-
pos = next;
|
|
197
|
-
}
|
|
198
|
-
else if (opensComment(buf, pos, len)) {
|
|
199
|
-
const end = skipComment(buf, pos, len);
|
|
200
|
-
// Unterminated: the rest of the input is inside the comment, so no
|
|
201
|
-
// balancing ')' can follow. Same 0 as running off the end.
|
|
202
|
-
if (end < 0)
|
|
203
|
-
return 0;
|
|
204
|
-
pos = end;
|
|
205
|
-
}
|
|
206
|
-
else if (char === LPAREN) {
|
|
207
|
-
depth++;
|
|
208
|
-
pos++;
|
|
209
|
-
}
|
|
210
|
-
else if (char === RPAREN) {
|
|
211
|
-
depth--;
|
|
212
|
-
pos++;
|
|
213
|
-
if (depth === 0)
|
|
214
|
-
return pos - startOffset;
|
|
215
|
-
}
|
|
216
|
-
else {
|
|
217
|
-
pos++;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return 0; // no matching ')'
|
|
221
|
-
}
|
|
222
167
|
// ---------------------------------------------------------------------------
|
|
223
168
|
// The same rule over a decoded string.
|
|
224
169
|
//
|
package/dist/step-lexing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-lexing.js","sourceRoot":"","sources":["../src/step-lexing.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,6EAA6E;AAC7E,2EAA2E;AAC3E,+EAA+E;AAC/E,gDAAgD;AAChD,EAAE;AACF,uEAAuE;AACvE,gFAAgF;AAChF,gFAAgF;A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,CAAC;gBAAE,CAAC,EAAE,CAAC;YACrD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YACnC,IAAI,IAAI,GAAG,CAAC;gBAAE,OAAO,CAAC,CAAC;YACvB,CAAC,GAAG,IAAI,CAAC;QACX,CAAC;IACH,CAAC;CACF;AAED,wEAAwE;AACxE,SAAS,YAAY,CAAC,EAAsB;IAC1C,OAAO,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,CAAC;AAC/F,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,CAAS,EAAE,OAAe;IACvE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,yCAAyC;QACzE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG;YAAE,CAAC,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;IAChD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const UNBALANCED_RECORD = -1;
|
|
2
|
+
export declare const UNREADABLE_RECORD = -2;
|
|
3
|
+
export declare function findEntityLength(buf: Uint8Array, pos: number, startOffset: number): number;
|
|
4
|
+
/**
|
|
5
|
+
* Offset just past the `)` balancing the record's own `(`, or one of
|
|
6
|
+
* `UNBALANCED_RECORD` / `UNREADABLE_RECORD`.
|
|
7
|
+
*
|
|
8
|
+
* The byte a scan resumes at after dropping a record it refused, and the two
|
|
9
|
+
* failures a caller must tell apart to know whether it may resume at all.
|
|
10
|
+
*/
|
|
11
|
+
export declare function recordCloseOffset(buf: Uint8Array, parenPos: number, startOffset: number): number;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the `;` at `semi` terminates the record that closes at `close` (from
|
|
14
|
+
* `recordCloseOffset`).
|
|
15
|
+
*
|
|
16
|
+
* Only for the case a caller's backwards whitespace walk could not settle: on
|
|
17
|
+
* a record with a trailing comment before its `;` the walk lands on the last
|
|
18
|
+
* byte of the comment close, and it cannot see through a comment (searching
|
|
19
|
+
* back for the opener would find one written inside a string literal).
|
|
20
|
+
* Skipping the trivia after
|
|
21
|
+
* the closing `)` answers it exactly, for any run of comments, and runs only
|
|
22
|
+
* here -- never on a record whose `)` sits directly before its `;`.
|
|
23
|
+
*
|
|
24
|
+
* Takes `close` rather than recomputing it so the caller, which needs the same
|
|
25
|
+
* offset to resume from when this returns false, balances the record once.
|
|
26
|
+
*/
|
|
27
|
+
export declare function semicolonClosesRecord(buf: Uint8Array, close: number, semi: number): boolean;
|
|
28
|
+
//# sourceMappingURL=step-record-boundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-record-boundary.d.ts","sourceRoot":"","sources":["../src/step-record-boundary.ts"],"names":[],"mappings":"AAyCA,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CA+B1F;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,UAAU,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB,MAAM,CAGR;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,OAAO,CAIT"}
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* Where one STEP record ends, and whether a given `;` is its own (#4179).
|
|
6
|
+
*
|
|
7
|
+
* The TypeScript half of the rule argued in `close_step_record` in
|
|
8
|
+
* rust/core/src/parser/lexical.rs. Rust is the source of truth
|
|
9
|
+
* per AGENTS.md; read the two rules, the general property they approximate,
|
|
10
|
+
* and why a refusal recovers rather than stops, THERE, and change the halves
|
|
11
|
+
* together. `StepTokenizer.scanEntitiesFast` (tokenizer.ts) calls into here;
|
|
12
|
+
* `WORKER_CODE` (scan-worker-source.ts) hand-duplicates it because a Blob
|
|
13
|
+
* worker cannot import at runtime.
|
|
14
|
+
*/
|
|
15
|
+
import { opensComment, skipComment, skipStringLiteral, skipTrivia } from './step-lexing.js';
|
|
16
|
+
const QUOTE = 0x27; // '\''
|
|
17
|
+
const LPAREN = 0x28; // '('
|
|
18
|
+
const RPAREN = 0x29; // ')'
|
|
19
|
+
// Byte length of the record starting at `startOffset` whose argument list
|
|
20
|
+
// opens at `pos`: up to and including the ')' balancing that '('.
|
|
21
|
+
//
|
|
22
|
+
// A failure is CLASSIFIED, because the two kinds call for opposite answers
|
|
23
|
+
// from a scan that wants to recover (#4179). UNBALANCED_RECORD: every literal
|
|
24
|
+
// and comment closed, so bytes after this record are readable and a caller may
|
|
25
|
+
// resume there. UNREADABLE_RECORD: one never closed, so everything to end of
|
|
26
|
+
// input is inside it and nothing can be resumed.
|
|
27
|
+
//
|
|
28
|
+
// A string literal is jumped over by skipStringLiteral rather than counted, so
|
|
29
|
+
// the '(' in 'Storey (Level 1)' is text and not depth, and STEP's doubled-quote
|
|
30
|
+
// escape ('') stays inside the literal instead of closing it. Sharing that
|
|
31
|
+
// helper keeps the escape rule in one place: an open-coded `inString` flag here
|
|
32
|
+
// would be a second copy, free to drift from the one every other scanner uses.
|
|
33
|
+
//
|
|
34
|
+
// A comment is jumped over for the same reason, in the same order: the literal
|
|
35
|
+
// test comes first, so a '/*' inside a value is text; the comment is then taken
|
|
36
|
+
// whole, so a '(' or a quote inside it is text. Without that, the comment in
|
|
37
|
+
// `#1=IFCWALL('a', /* see IFCWALL( */ $);` opened a depth that never closed.
|
|
38
|
+
export const UNBALANCED_RECORD = -1;
|
|
39
|
+
export const UNREADABLE_RECORD = -2;
|
|
40
|
+
export function findEntityLength(buf, pos, startOffset) {
|
|
41
|
+
const len = buf.length;
|
|
42
|
+
let depth = 0;
|
|
43
|
+
while (pos < len) {
|
|
44
|
+
const char = buf[pos];
|
|
45
|
+
if (char === QUOTE) {
|
|
46
|
+
// Returns `-1` on an unterminated literal (see skipStringLiteral's own
|
|
47
|
+
// doc): nothing after it is readable.
|
|
48
|
+
const next = skipStringLiteral(buf, pos, len);
|
|
49
|
+
if (next < 0)
|
|
50
|
+
return UNREADABLE_RECORD;
|
|
51
|
+
pos = next;
|
|
52
|
+
}
|
|
53
|
+
else if (opensComment(buf, pos, len)) {
|
|
54
|
+
const end = skipComment(buf, pos, len);
|
|
55
|
+
// Unterminated: the rest of the input is inside the comment.
|
|
56
|
+
if (end < 0)
|
|
57
|
+
return UNREADABLE_RECORD;
|
|
58
|
+
pos = end;
|
|
59
|
+
}
|
|
60
|
+
else if (char === LPAREN) {
|
|
61
|
+
depth++;
|
|
62
|
+
pos++;
|
|
63
|
+
}
|
|
64
|
+
else if (char === RPAREN) {
|
|
65
|
+
depth--;
|
|
66
|
+
pos++;
|
|
67
|
+
if (depth === 0)
|
|
68
|
+
return pos - startOffset;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
pos++;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return UNBALANCED_RECORD; // ran out of input with the '(' still open
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Offset just past the `)` balancing the record's own `(`, or one of
|
|
78
|
+
* `UNBALANCED_RECORD` / `UNREADABLE_RECORD`.
|
|
79
|
+
*
|
|
80
|
+
* The byte a scan resumes at after dropping a record it refused, and the two
|
|
81
|
+
* failures a caller must tell apart to know whether it may resume at all.
|
|
82
|
+
*/
|
|
83
|
+
export function recordCloseOffset(buf, parenPos, startOffset) {
|
|
84
|
+
const length = findEntityLength(buf, parenPos, startOffset);
|
|
85
|
+
return length > 0 ? startOffset + length : length;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Whether the `;` at `semi` terminates the record that closes at `close` (from
|
|
89
|
+
* `recordCloseOffset`).
|
|
90
|
+
*
|
|
91
|
+
* Only for the case a caller's backwards whitespace walk could not settle: on
|
|
92
|
+
* a record with a trailing comment before its `;` the walk lands on the last
|
|
93
|
+
* byte of the comment close, and it cannot see through a comment (searching
|
|
94
|
+
* back for the opener would find one written inside a string literal).
|
|
95
|
+
* Skipping the trivia after
|
|
96
|
+
* the closing `)` answers it exactly, for any run of comments, and runs only
|
|
97
|
+
* here -- never on a record whose `)` sits directly before its `;`.
|
|
98
|
+
*
|
|
99
|
+
* Takes `close` rather than recomputing it so the caller, which needs the same
|
|
100
|
+
* offset to resume from when this returns false, balances the record once.
|
|
101
|
+
*/
|
|
102
|
+
export function semicolonClosesRecord(buf, close, semi) {
|
|
103
|
+
if (close <= 0)
|
|
104
|
+
return false;
|
|
105
|
+
const after = skipTrivia(buf, close, buf.length);
|
|
106
|
+
return !after.stop && after.next === semi;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=step-record-boundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-record-boundary.js","sourceRoot":"","sources":["../src/step-record-boundary.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,E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icated because a Blob worker cannot import at
|
|
5
|
+
* runtime. A test file is an ordinary module and has no such excuse, so the
|
|
6
|
+
* vectors live here once and `tokenizer.test.ts` and
|
|
7
|
+
* `scan-worker-source.malformed-record.test.ts` supply only their own driver.
|
|
8
|
+
* They were copies for one commit and had already drifted inside it.
|
|
9
|
+
*/
|
|
10
|
+
/** What a scan returned: each record as `[expressId, source text]`. */
|
|
11
|
+
export type ScanSpans = {
|
|
12
|
+
spans: (readonly [number, string])[];
|
|
13
|
+
malformed: number;
|
|
14
|
+
};
|
|
15
|
+
/** Drives one scan implementation over `text`. */
|
|
16
|
+
export type ScanDriver = (text: string) => ScanSpans;
|
|
17
|
+
/**
|
|
18
|
+
* Records that must be ACCEPTED, i.e. the false-positive direction.
|
|
19
|
+
*
|
|
20
|
+
* Every shape is hand-constructed because a 487-file, 14,282,864-record sweep
|
|
21
|
+
* of this repo's IFC corpus contains NONE of them: zero records with a comment
|
|
22
|
+
* between the ')' and the ';', and zero with any whitespace there either. A
|
|
23
|
+
* clean sweep over a population without the case is not evidence about the
|
|
24
|
+
* case. What the corpus DOES carry, and so does attest: 6,816,392 records
|
|
25
|
+
* ending in a nested '))', 234,391 spanning several lines, and 15,111 with an
|
|
26
|
+
* '=' inside a string or comment, all accepted.
|
|
27
|
+
*/
|
|
28
|
+
export declare const LEGAL_BODIES: readonly string[];
|
|
29
|
+
/**
|
|
30
|
+
* A record with no closing ')' at all costs ONE record, not the tail.
|
|
31
|
+
*
|
|
32
|
+
* `close_step_record`'s two failures are not interchangeable: this one leaves
|
|
33
|
+
* every literal and comment closed, so the bytes after are readable and the
|
|
34
|
+
* scan re-hunts from past the record's '#'. Collapsing it with the
|
|
35
|
+
* unreadable case below took `[1]` from an input the parent scanner read as
|
|
36
|
+
* `[1, 2, 3, 4]`, which is the amplification #4179 exists to remove.
|
|
37
|
+
*/
|
|
38
|
+
export declare const UNBALANCED_CASE: {
|
|
39
|
+
text: string;
|
|
40
|
+
spans: readonly [readonly [1, "#1=IFCA(1);"], readonly [3, "#3=IFCC(3);"], readonly [4, "#4=IFCD(4);"]];
|
|
41
|
+
};
|
|
42
|
+
/** Bodies with no ';' of their own AND no balancing ')' to resume at. */
|
|
43
|
+
export declare const UNRESUMABLE_BODIES: readonly string[];
|
|
44
|
+
/** The two shapes #4179 is about, as `[label, text, expected spans]`. */
|
|
45
|
+
/**
|
|
46
|
+
* Records whose LINE numbers a cold re-walk must not disturb.
|
|
47
|
+
*
|
|
48
|
+
* The worker's comment skip advances its line counter as a side effect, so a
|
|
49
|
+
* caller that balances the record again to settle the ')' rule inflates every
|
|
50
|
+
* later line unless it saves and restores. `#2` here landed on line 4 in the
|
|
51
|
+
* worker and line 3 in the tokenizer for the same bytes.
|
|
52
|
+
*/
|
|
53
|
+
export declare const LINE_NUMBER_CASE: {
|
|
54
|
+
text: string;
|
|
55
|
+
lines: readonly [1, 3];
|
|
56
|
+
};
|
|
57
|
+
export declare const SWALLOW_CASES: readonly (readonly [string, string, (readonly [number, string])[]])[];
|
|
58
|
+
//# sourceMappingURL=step-record-boundary.vectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-record-boundary.vectors.d.ts","sourceRoot":"","sources":["../src/step-record-boundary.vectors.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,uEAAuE;AACvE,MAAM,MAAM,SAAS,GAAG;IAAE,KAAK,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpF,kDAAkD;AAClD,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC;AAErD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAgBzC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;;CAG3B,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAG/C,CAAC;AAEF,yEAAyE;AACzE;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAgB9F,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* Records that must be ACCEPTED, i.e. the false-positive direction.
|
|
6
|
+
*
|
|
7
|
+
* Every shape is hand-constructed because a 487-file, 14,282,864-record sweep
|
|
8
|
+
* of this repo's IFC corpus contains NONE of them: zero records with a comment
|
|
9
|
+
* between the ')' and the ';', and zero with any whitespace there either. A
|
|
10
|
+
* clean sweep over a population without the case is not evidence about the
|
|
11
|
+
* case. What the corpus DOES carry, and so does attest: 6,816,392 records
|
|
12
|
+
* ending in a nested '))', 234,391 spanning several lines, and 15,111 with an
|
|
13
|
+
* '=' inside a string or comment, all accepted.
|
|
14
|
+
*/
|
|
15
|
+
export const LEGAL_BODIES = [
|
|
16
|
+
"IFCWALL('a=b',$);",
|
|
17
|
+
'IFCWALL($ /* a=b */);',
|
|
18
|
+
"IFCDOCUMENTREFERENCE('http://h/q?a=b&c=d',$);",
|
|
19
|
+
'IFCWALL($)/* trailing */;',
|
|
20
|
+
'IFCWALL($)/* one *//* two */;',
|
|
21
|
+
'IFCWALL($) /* spaced */ \t /* twice */ ;',
|
|
22
|
+
'IFCWALL($)/* multi\nline */;',
|
|
23
|
+
"IFCWALL(('a'),(1.,2.));",
|
|
24
|
+
"IFCWALL(\n 'a',\n $\n);",
|
|
25
|
+
// isSpaceByte includes vertical tab and form feed; a form feed silently
|
|
26
|
+
// dropping an entity is exactly what #3733 was.
|
|
27
|
+
...[' ', '\t', '\r', '\n', '\v', '\f'].flatMap((sp) => [
|
|
28
|
+
`IFCWALL($)${sp};`,
|
|
29
|
+
`IFCWALL($)${sp}/* c */${sp};`,
|
|
30
|
+
]),
|
|
31
|
+
];
|
|
32
|
+
/**
|
|
33
|
+
* A record with no closing ')' at all costs ONE record, not the tail.
|
|
34
|
+
*
|
|
35
|
+
* `close_step_record`'s two failures are not interchangeable: this one leaves
|
|
36
|
+
* every literal and comment closed, so the bytes after are readable and the
|
|
37
|
+
* scan re-hunts from past the record's '#'. Collapsing it with the
|
|
38
|
+
* unreadable case below took `[1]` from an input the parent scanner read as
|
|
39
|
+
* `[1, 2, 3, 4]`, which is the amplification #4179 exists to remove.
|
|
40
|
+
*/
|
|
41
|
+
export const UNBALANCED_CASE = {
|
|
42
|
+
text: '#1=IFCA(1);\n#2=IFCB(2;\n#3=IFCC(3);\n#4=IFCD(4);\n',
|
|
43
|
+
spans: [[1, '#1=IFCA(1);'], [3, '#3=IFCC(3);'], [4, '#4=IFCD(4);']],
|
|
44
|
+
};
|
|
45
|
+
/** Bodies with no ';' of their own AND no balancing ')' to resume at. */
|
|
46
|
+
export const UNRESUMABLE_BODIES = [
|
|
47
|
+
"IFCWALL('never closes,$)",
|
|
48
|
+
'IFCWALL(/* never closes $)',
|
|
49
|
+
];
|
|
50
|
+
/** The two shapes #4179 is about, as `[label, text, expected spans]`. */
|
|
51
|
+
/**
|
|
52
|
+
* Records whose LINE numbers a cold re-walk must not disturb.
|
|
53
|
+
*
|
|
54
|
+
* The worker's comment skip advances its line counter as a side effect, so a
|
|
55
|
+
* caller that balances the record again to settle the ')' rule inflates every
|
|
56
|
+
* later line unless it saves and restores. `#2` here landed on line 4 in the
|
|
57
|
+
* worker and line 3 in the tokenizer for the same bytes.
|
|
58
|
+
*/
|
|
59
|
+
export const LINE_NUMBER_CASE = {
|
|
60
|
+
text: '#1=IFCWALL(/* a\nb */$)/* c */;\n#2=IFCDOOR($);\n',
|
|
61
|
+
lines: [1, 3],
|
|
62
|
+
};
|
|
63
|
+
export const SWALLOW_CASES = [
|
|
64
|
+
[
|
|
65
|
+
// Pre-fix: [#1, #2, #4] -- #3 gone, #2's span covering #3's whole record,
|
|
66
|
+
// and no diagnostic. The broken record is DROPPED, not the tail: #3 and #4
|
|
67
|
+
// both survive, because the scan resumes at the ')' balancing #2's own '('.
|
|
68
|
+
'a record missing its own ";" does not swallow the next record',
|
|
69
|
+
'#1=IFCA(1);\n#2=IFCB(2)\n#3=IFCC(3);\n#4=IFCD(4);\n',
|
|
70
|
+
[[1, '#1=IFCA(1);'], [3, '#3=IFCC(3);'], [4, '#4=IFCD(4);']],
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
// Pre-fix: #2's span absorbed "ENDSEC;" and nothing was reported, so the
|
|
74
|
+
// file read as fully successful having lost a structural marker.
|
|
75
|
+
'a truncated last record does not swallow the footer',
|
|
76
|
+
"#1=IFCPROJECT('a');\n#2=IFCWALL('b')\nENDSEC;\nEND-ISO-10303-21;\n",
|
|
77
|
+
[[1, "#1=IFCPROJECT('a');"]],
|
|
78
|
+
],
|
|
79
|
+
];
|
|
80
|
+
//# sourceMappingURL=step-record-boundary.vectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-record-boundary.vectors.js","sourceRoot":"","sources":["../src/step-record-boundary.vectors.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAkB/D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC7C,mBAAmB;IACnB,uBAAuB;IACvB,+CAA+C;IAC/C,2BAA2B;IAC3B,+BAA+B;IAC/B,0CAA0C;IAC1C,8BAA8B;IAC9B,yBAAyB;IACzB,2BAA2B;IAC3B,wEAAwE;IACxE,gDAAgD;IAChD,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC;QACrD,aAAa,EAAE,GAAG;QAClB,aAAa,EAAE,UAAU,EAAE,GAAG;KAC/B,CAAC;CACH,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,qDAAqD;IAC3D,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,CAAU;CAC7E,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,0BAA0B;IAC1B,4BAA4B;CAC7B,CAAC;AAEF,yEAAyE;AACzE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,mDAAmD;IACzD,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAU;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAA0E;IAClG;QACE,0EAA0E;QAC1E,2EAA2E;QAC3E,4EAA4E;QAC5E,+DAA+D;QAC/D,qDAAqD;QACrD,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;KAC7D;IACD;QACE,yEAAyE;QACzE,iEAAiE;QACjE,qDAAqD;QACrD,oEAAoE;QACpE,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC;KAC7B;CACF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IfcDataStore } from './columnar-parser.js';
|
|
2
|
+
import { type BoundaryConditionInfo, type StructuralLoadConfigurationEntry, type StructuralLoadConfigurationInfo, type StructuralLoadDropReason, type StructuralLoadInfo } from './structural-load-extractor.js';
|
|
3
|
+
import type { StructuralActivityInfo, StructuralAnalysisModelInfo, StructuralConnectionInfo, StructuralExtraction, StructuralLoadGroupInfo, StructuralMemberInfo, StructuralResultGroupInfo } from './structural-types.js';
|
|
4
|
+
export type { BoundaryConditionInfo, StructuralActivityInfo, StructuralAnalysisModelInfo, StructuralConnectionInfo, StructuralExtraction, StructuralLoadConfigurationEntry, StructuralLoadConfigurationInfo, StructuralLoadDropReason, StructuralLoadGroupInfo, StructuralLoadInfo, StructuralMemberInfo, StructuralResultGroupInfo, };
|
|
5
|
+
/**
|
|
6
|
+
* Extract all structural analysis data from a parsed IFC store.
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractStructuralOnDemand(store: IfcDataStore): StructuralExtraction;
|
|
9
|
+
//# sourceMappingURL=structural-extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structural-extractor.d.ts","sourceRoot":"","sources":["../src/structural-extractor.ts"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AAcxC,OAAO,KAAK,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,EACxB,oBAAoB,EACpB,gCAAgC,EAChC,+BAA+B,EAC/B,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,GAC1B,CAAC;AAmEF;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,YAAY,GAAG,oBAAoB,CAkOnF"}
|