@cedarjs/structure 2.2.1 → 2.2.2-next.31
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/README.md +8 -24
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -23
- package/dist/model/RWCell.d.ts +4 -3
- package/dist/model/RWCell.d.ts.map +1 -1
- package/dist/model/RWCell.js +7 -8
- package/dist/model/RWComponent.d.ts +1 -1
- package/dist/model/RWComponent.d.ts.map +1 -1
- package/dist/model/RWComponent.js +2 -2
- package/dist/model/RWEnvHelper.d.ts +3 -7
- package/dist/model/RWEnvHelper.d.ts.map +1 -1
- package/dist/model/RWEnvHelper.js +33 -114
- package/dist/model/RWFunction.d.ts +1 -1
- package/dist/model/RWFunction.d.ts.map +1 -1
- package/dist/model/RWFunction.js +2 -2
- package/dist/model/RWLayout.d.ts +1 -1
- package/dist/model/RWLayout.d.ts.map +1 -1
- package/dist/model/RWLayout.js +2 -2
- package/dist/model/RWPage.d.ts +1 -1
- package/dist/model/RWPage.d.ts.map +1 -1
- package/dist/model/RWPage.js +2 -2
- package/dist/model/RWProject.d.ts +1 -4
- package/dist/model/RWProject.d.ts.map +1 -1
- package/dist/model/RWProject.js +17 -19
- package/dist/model/RWRoute.d.ts +3 -16
- package/dist/model/RWRoute.d.ts.map +1 -1
- package/dist/model/RWRoute.js +11 -137
- package/dist/model/RWRouter.d.ts +2 -6
- package/dist/model/RWRouter.d.ts.map +1 -1
- package/dist/model/RWRouter.js +10 -62
- package/dist/model/RWSDL.d.ts +2 -2
- package/dist/model/RWSDL.d.ts.map +1 -1
- package/dist/model/RWSDL.js +4 -4
- package/dist/model/RWSDLField.d.ts +3 -7
- package/dist/model/RWSDLField.d.ts.map +1 -1
- package/dist/model/RWSDLField.js +10 -59
- package/dist/model/RWService.d.ts +1 -1
- package/dist/model/RWService.d.ts.map +1 -1
- package/dist/model/RWService.js +2 -2
- package/dist/model/RWServiceFunction.d.ts +2 -2
- package/dist/model/RWServiceFunction.d.ts.map +1 -1
- package/dist/model/RWServiceFunction.js +5 -6
- package/dist/model/RWTOML.d.ts +2 -2
- package/dist/model/RWTOML.d.ts.map +1 -1
- package/dist/model/RWTOML.js +6 -6
- package/dist/model/util/process_env.d.ts +9 -18
- package/dist/model/util/process_env.d.ts.map +1 -1
- package/dist/model/util/process_env.js +25 -34
- package/dist/nodes.d.ts +62 -0
- package/dist/nodes.d.ts.map +1 -0
- package/dist/nodes.js +175 -0
- package/dist/x/Location.d.ts +9 -0
- package/dist/x/Location.d.ts.map +1 -0
- package/dist/x/Location.js +18 -0
- package/dist/x/Position.d.ts +12 -0
- package/dist/x/Position.d.ts.map +1 -0
- package/dist/x/Position.js +35 -0
- package/dist/x/Range.d.ts +8 -0
- package/dist/x/Range.d.ts.map +1 -0
- package/dist/x/Range.js +22 -0
- package/dist/x/{vscode-languageserver-types.d.ts → diagnostics.d.ts} +27 -36
- package/dist/x/diagnostics.d.ts.map +1 -0
- package/dist/x/{vscode-languageserver-types.js → diagnostics.js} +30 -135
- package/dist/x/path.d.ts +1 -0
- package/dist/x/path.d.ts.map +1 -1
- package/dist/x/path.js +25 -17
- package/dist/x/prisma.d.ts +2 -3
- package/dist/x/prisma.d.ts.map +1 -1
- package/dist/x/prisma.js +5 -5
- package/package.json +3 -8
- package/dist/hosts.d.ts +0 -23
- package/dist/hosts.d.ts.map +0 -1
- package/dist/hosts.js +0 -44
- package/dist/ide.d.ts +0 -122
- package/dist/ide.d.ts.map +0 -1
- package/dist/ide.js +0 -240
- package/dist/interactive_cli/RedwoodCommandString.d.ts +0 -20
- package/dist/interactive_cli/RedwoodCommandString.d.ts.map +0 -1
- package/dist/interactive_cli/RedwoodCommandString.js +0 -72
- package/dist/interactive_cli/command_builder.d.ts +0 -10
- package/dist/interactive_cli/command_builder.d.ts.map +0 -1
- package/dist/interactive_cli/command_builder.js +0 -196
- package/dist/interactive_cli/dry_run.d.ts +0 -28
- package/dist/interactive_cli/dry_run.d.ts.map +0 -1
- package/dist/interactive_cli/dry_run.js +0 -104
- package/dist/interactive_cli/ui.d.ts +0 -32
- package/dist/interactive_cli/ui.d.ts.map +0 -1
- package/dist/interactive_cli/ui.js +0 -84
- package/dist/language_server/RWLanguageServer.d.ts +0 -30
- package/dist/language_server/RWLanguageServer.d.ts.map +0 -1
- package/dist/language_server/RWLanguageServer.js +0 -201
- package/dist/language_server/commands.d.ts +0 -14
- package/dist/language_server/commands.d.ts.map +0 -1
- package/dist/language_server/commands.js +0 -122
- package/dist/language_server/diagnostics.d.ts +0 -10
- package/dist/language_server/diagnostics.d.ts.map +0 -1
- package/dist/language_server/diagnostics.js +0 -61
- package/dist/language_server/outline.d.ts +0 -7
- package/dist/language_server/outline.d.ts.map +0 -1
- package/dist/language_server/outline.js +0 -37
- package/dist/language_server/start.d.ts +0 -2
- package/dist/language_server/start.d.ts.map +0 -1
- package/dist/language_server/start.js +0 -4
- package/dist/language_server/xmethods.d.ts +0 -11
- package/dist/language_server/xmethods.d.ts.map +0 -1
- package/dist/language_server/xmethods.js +0 -42
- package/dist/model/util/advanced_path_parser.d.ts +0 -12
- package/dist/model/util/advanced_path_parser.d.ts.map +0 -1
- package/dist/model/util/advanced_path_parser.js +0 -38
- package/dist/outline/index.d.ts +0 -3
- package/dist/outline/index.d.ts.map +0 -1
- package/dist/outline/index.js +0 -31
- package/dist/outline/outline.d.ts +0 -4
- package/dist/outline/outline.d.ts.map +0 -1
- package/dist/outline/outline.js +0 -262
- package/dist/outline/types.d.ts +0 -87
- package/dist/outline/types.d.ts.map +0 -1
- package/dist/outline/types.js +0 -72
- package/dist/x/vscode-languageserver-types.d.ts.map +0 -1
- package/dist/x/vscode-languageserver.d.ts +0 -12
- package/dist/x/vscode-languageserver.d.ts.map +0 -1
- package/dist/x/vscode-languageserver.js +0 -61
- package/dist/x/vscode.d.ts +0 -126
- package/dist/x/vscode.d.ts.map +0 -1
- package/dist/x/vscode.js +0 -294
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface Position {
|
|
2
|
+
line: number;
|
|
3
|
+
character: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function Position_create(line: number, character: number): Position;
|
|
6
|
+
/**
|
|
7
|
+
* p1 is greater|smaller|equal than/to p2
|
|
8
|
+
* @param p1
|
|
9
|
+
* @param p2
|
|
10
|
+
*/
|
|
11
|
+
export declare function Position_compare(p1: Position, p2: Position): 'greater' | 'smaller' | 'equal';
|
|
12
|
+
//# sourceMappingURL=Position.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Position.d.ts","sourceRoot":"","sources":["../../src/x/Position.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,QAAQ,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,QAAQ,EACZ,EAAE,EAAE,QAAQ,GACX,SAAS,GAAG,SAAS,GAAG,OAAO,CAcjC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Position_compare = Position_compare;
|
|
8
|
+
exports.Position_create = Position_create;
|
|
9
|
+
function Position_create(line, character) {
|
|
10
|
+
return {
|
|
11
|
+
line,
|
|
12
|
+
character
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* p1 is greater|smaller|equal than/to p2
|
|
18
|
+
* @param p1
|
|
19
|
+
* @param p2
|
|
20
|
+
*/
|
|
21
|
+
function Position_compare(p1, p2) {
|
|
22
|
+
if (p1.line > p2.line) {
|
|
23
|
+
return 'greater';
|
|
24
|
+
}
|
|
25
|
+
if (p2.line > p1.line) {
|
|
26
|
+
return 'smaller';
|
|
27
|
+
}
|
|
28
|
+
if (p1.character > p2.character) {
|
|
29
|
+
return 'greater';
|
|
30
|
+
}
|
|
31
|
+
if (p2.character > p1.character) {
|
|
32
|
+
return 'smaller';
|
|
33
|
+
}
|
|
34
|
+
return 'equal';
|
|
35
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Position } from './Position';
|
|
2
|
+
export interface Range {
|
|
3
|
+
start: Position;
|
|
4
|
+
end: Position;
|
|
5
|
+
}
|
|
6
|
+
export declare function Range_create(startLine: number, startCharacter: number, endLine: number, endCharacter: number): Range;
|
|
7
|
+
export declare function Range_create(start: Position, end: Position): Range;
|
|
8
|
+
//# sourceMappingURL=Range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Range.d.ts","sourceRoot":"","sources":["../../src/x/Range.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAG1C,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,QAAQ,CAAA;IACf,GAAG,EAAE,QAAQ,CAAA;CACd;AAED,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,KAAK,CAAA;AACR,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,GAAG,KAAK,CAAA"}
|
package/dist/x/Range.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Range_create = Range_create;
|
|
8
|
+
var _Position = require("./Position");
|
|
9
|
+
function Range_create(one, two, three, four) {
|
|
10
|
+
if (typeof one === 'number' && typeof two === 'number' && typeof three === 'number' && typeof four === 'number') {
|
|
11
|
+
return {
|
|
12
|
+
start: (0, _Position.Position_create)(one, two),
|
|
13
|
+
end: (0, _Position.Position_create)(three, four)
|
|
14
|
+
};
|
|
15
|
+
} else if (typeof one === 'object' && typeof two === 'object') {
|
|
16
|
+
return {
|
|
17
|
+
start: one,
|
|
18
|
+
end: two
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
throw new Error('Invalid arguments to Range_create');
|
|
22
|
+
}
|
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
import * as tsm from 'ts-morph';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
export declare
|
|
7
|
-
|
|
2
|
+
import type { Location } from './Location';
|
|
3
|
+
import type { Position } from './Position';
|
|
4
|
+
import type { Range } from './Range';
|
|
5
|
+
export type DocumentUri = string;
|
|
6
|
+
export declare enum DiagnosticSeverity {
|
|
7
|
+
Error = 1,
|
|
8
|
+
Warning = 2,
|
|
9
|
+
Information = 3,
|
|
10
|
+
Hint = 4
|
|
11
|
+
}
|
|
12
|
+
export interface Diagnostic {
|
|
13
|
+
range: Range;
|
|
14
|
+
severity?: DiagnosticSeverity;
|
|
15
|
+
code?: number | string;
|
|
16
|
+
source?: string;
|
|
17
|
+
message: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function Diagnostic_is(value: any): value is Diagnostic;
|
|
8
20
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @param p2
|
|
21
|
+
* The Diagnostic interface does not include the document URI.
|
|
22
|
+
* This interface adds that, and a few other things.
|
|
12
23
|
*/
|
|
13
|
-
export
|
|
24
|
+
export interface ExtendedDiagnostic {
|
|
25
|
+
uri: DocumentUri;
|
|
26
|
+
diagnostic: Diagnostic;
|
|
27
|
+
}
|
|
28
|
+
export declare function Range_contains(range: Range, pos: Position): boolean;
|
|
29
|
+
export declare function Range_overlaps(range1: Range, range2: Range, consider0000: boolean): boolean;
|
|
14
30
|
/**
|
|
15
31
|
* Create a new position relative to this position.
|
|
16
32
|
*
|
|
@@ -42,31 +58,15 @@ export declare function ExtendedDiagnostic_is(x: any): x is ExtendedDiagnostic;
|
|
|
42
58
|
export declare function ExtendedDiagnostic_groupByUri(ds: ExtendedDiagnostic[]): {
|
|
43
59
|
[uri: string]: Diagnostic[];
|
|
44
60
|
};
|
|
45
|
-
export declare function ExtendedDiagnostic_findRelevantQuickFixes(xd: ExtendedDiagnostic, context: CodeActionContext): Promise<CodeAction[]>;
|
|
46
61
|
export declare function Position_fromTSMorphOffset(offset: number, sf: tsm.SourceFile): Position;
|
|
47
62
|
export declare function Position_fromOffset(offset: number, text: string): Position | undefined;
|
|
48
63
|
export declare function Position_fromOffsetOrFail(offset: number, text: string): Position;
|
|
49
|
-
/**
|
|
50
|
-
* The Diagnostic interface defined in vscode-languageserver-types
|
|
51
|
-
* does not include the document URI.
|
|
52
|
-
* This interface adds that, and a few other things.
|
|
53
|
-
*/
|
|
54
|
-
export interface ExtendedDiagnostic {
|
|
55
|
-
uri: DocumentUri;
|
|
56
|
-
diagnostic: Diagnostic;
|
|
57
|
-
/**
|
|
58
|
-
* A function that returns a quickfix associated to this diagnostic.
|
|
59
|
-
*/
|
|
60
|
-
quickFix?: () => Promise<CodeAction | undefined>;
|
|
61
|
-
}
|
|
62
64
|
/**
|
|
63
65
|
* Helper method to create diagnostics
|
|
64
66
|
* @param node
|
|
65
67
|
* @param message
|
|
66
68
|
*/
|
|
67
69
|
export declare function err(loc: LocationLike, message: string, code?: number | string): ExtendedDiagnostic;
|
|
68
|
-
export declare function Diagnostic_compare(d1: Diagnostic, d2: Diagnostic): boolean;
|
|
69
|
-
export declare function Range_equals(r1: Range, r2: Range): boolean;
|
|
70
70
|
declare function DiagnosticSeverity_getLabel(severity?: DiagnosticSeverity): string;
|
|
71
71
|
export type GetSeverityLabelFunction = typeof DiagnosticSeverity_getLabel;
|
|
72
72
|
interface ExtendedDiagnosticFormatOpts {
|
|
@@ -80,14 +80,5 @@ interface ExtendedDiagnosticFormatOpts {
|
|
|
80
80
|
* ex: "/path/to/app/b.ts:1:2: info: this is a message"
|
|
81
81
|
*/
|
|
82
82
|
export declare function ExtendedDiagnostic_format(d: ExtendedDiagnostic, opts?: ExtendedDiagnosticFormatOpts): string;
|
|
83
|
-
/**
|
|
84
|
-
* a value of "null" means this file needs to be deleted
|
|
85
|
-
*/
|
|
86
|
-
export type FileSet = {
|
|
87
|
-
[fileURI: string]: string | null;
|
|
88
|
-
};
|
|
89
|
-
export declare function FileSet_fromTextDocuments(documents: TextDocuments<TextDocument>): FileSet;
|
|
90
|
-
export declare function WorkspaceEdit_fromFileSet(files: FileSet, getExistingFileText?: (fileURI: string) => string | undefined): WorkspaceEdit;
|
|
91
|
-
export declare function Range_full(text: string, cr?: string): Range;
|
|
92
83
|
export {};
|
|
93
|
-
//# sourceMappingURL=
|
|
84
|
+
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/x/diagnostics.ts"],"names":[],"mappings":"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"}
|
|
@@ -7,45 +7,57 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
|
7
7
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
10
|
+
exports.DiagnosticSeverity = void 0;
|
|
11
|
+
exports.Diagnostic_is = Diagnostic_is;
|
|
12
12
|
exports.ExtendedDiagnostic_format = ExtendedDiagnostic_format;
|
|
13
13
|
exports.ExtendedDiagnostic_groupByUri = ExtendedDiagnostic_groupByUri;
|
|
14
14
|
exports.ExtendedDiagnostic_is = ExtendedDiagnostic_is;
|
|
15
|
-
exports.FileSet_fromTextDocuments = FileSet_fromTextDocuments;
|
|
16
15
|
exports.LocationLike_toHashLink = LocationLike_toHashLink;
|
|
17
16
|
exports.LocationLike_toLocation = LocationLike_toLocation;
|
|
18
17
|
exports.LocationLike_toTerminalLink = LocationLike_toTerminalLink;
|
|
19
18
|
exports.Location_fromFilePath = Location_fromFilePath;
|
|
20
19
|
exports.Location_fromNode = Location_fromNode;
|
|
21
20
|
exports.Location_overlaps = Location_overlaps;
|
|
22
|
-
exports.Position_compare = Position_compare;
|
|
23
21
|
exports.Position_fromOffset = Position_fromOffset;
|
|
24
22
|
exports.Position_fromOffsetOrFail = Position_fromOffsetOrFail;
|
|
25
23
|
exports.Position_fromTSMorphOffset = Position_fromTSMorphOffset;
|
|
26
24
|
exports.Position_translate = Position_translate;
|
|
27
25
|
exports.Range_contains = Range_contains;
|
|
28
|
-
exports.Range_equals = Range_equals;
|
|
29
26
|
exports.Range_fromNode = Range_fromNode;
|
|
30
|
-
exports.Range_full = Range_full;
|
|
31
27
|
exports.Range_overlaps = Range_overlaps;
|
|
32
|
-
exports.WorkspaceEdit_fromFileSet = WorkspaceEdit_fromFileSet;
|
|
33
28
|
exports.err = err;
|
|
34
29
|
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/map"));
|
|
35
30
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/json/stringify"));
|
|
36
31
|
var _endsWith = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/ends-with"));
|
|
37
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/keys"));
|
|
38
|
-
var _keys2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/object/keys"));
|
|
39
32
|
var _lineColumn = _interopRequireDefault(require("line-column"));
|
|
40
33
|
var _lodash = require("lodash");
|
|
41
34
|
var tsm = _interopRequireWildcard(require("ts-morph"));
|
|
42
|
-
var
|
|
35
|
+
var _Location = require("./Location");
|
|
36
|
+
var _Position = require("./Position");
|
|
37
|
+
var _Range = require("./Range");
|
|
43
38
|
var _URL = require("./URL");
|
|
39
|
+
let DiagnosticSeverity = exports.DiagnosticSeverity = /*#__PURE__*/function (DiagnosticSeverity) {
|
|
40
|
+
DiagnosticSeverity[DiagnosticSeverity["Error"] = 1] = "Error";
|
|
41
|
+
DiagnosticSeverity[DiagnosticSeverity["Warning"] = 2] = "Warning";
|
|
42
|
+
DiagnosticSeverity[DiagnosticSeverity["Information"] = 3] = "Information";
|
|
43
|
+
DiagnosticSeverity[DiagnosticSeverity["Hint"] = 4] = "Hint";
|
|
44
|
+
return DiagnosticSeverity;
|
|
45
|
+
}({});
|
|
46
|
+
function Diagnostic_is(value) {
|
|
47
|
+
const candidate = value;
|
|
48
|
+
return candidate && typeof candidate.message === 'string' && typeof candidate.range === 'object' && candidate.range.start !== undefined && candidate.range.end !== undefined;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The Diagnostic interface does not include the document URI.
|
|
53
|
+
* This interface adds that, and a few other things.
|
|
54
|
+
*/
|
|
55
|
+
|
|
44
56
|
function Range_contains(range, pos) {
|
|
45
|
-
if (Position_compare(range.start, pos) === 'greater') {
|
|
57
|
+
if ((0, _Position.Position_compare)(range.start, pos) === 'greater') {
|
|
46
58
|
return false;
|
|
47
59
|
}
|
|
48
|
-
if (Position_compare(range.end, pos) === 'smaller') {
|
|
60
|
+
if ((0, _Position.Position_compare)(range.end, pos) === 'smaller') {
|
|
49
61
|
return false;
|
|
50
62
|
}
|
|
51
63
|
return true;
|
|
@@ -69,27 +81,6 @@ function Range_overlaps(range1, range2, consider0000) {
|
|
|
69
81
|
return true;
|
|
70
82
|
}
|
|
71
83
|
|
|
72
|
-
/**
|
|
73
|
-
* p1 is greater|smaller|equal than/to p2
|
|
74
|
-
* @param p1
|
|
75
|
-
* @param p2
|
|
76
|
-
*/
|
|
77
|
-
function Position_compare(p1, p2) {
|
|
78
|
-
if (p1.line > p2.line) {
|
|
79
|
-
return 'greater';
|
|
80
|
-
}
|
|
81
|
-
if (p2.line > p1.line) {
|
|
82
|
-
return 'smaller';
|
|
83
|
-
}
|
|
84
|
-
if (p1.character > p2.character) {
|
|
85
|
-
return 'greater';
|
|
86
|
-
}
|
|
87
|
-
if (p2.character > p1.character) {
|
|
88
|
-
return 'smaller';
|
|
89
|
-
}
|
|
90
|
-
return 'equal';
|
|
91
|
-
}
|
|
92
|
-
|
|
93
84
|
/**
|
|
94
85
|
* Create a new position relative to this position.
|
|
95
86
|
*
|
|
@@ -121,7 +112,7 @@ function Location_fromNode(node) {
|
|
|
121
112
|
function Location_fromFilePath(filePath) {
|
|
122
113
|
return {
|
|
123
114
|
uri: (0, _URL.URL_file)(filePath),
|
|
124
|
-
range:
|
|
115
|
+
range: (0, _Range.Range_create)(0, 0, 0, 0)
|
|
125
116
|
};
|
|
126
117
|
}
|
|
127
118
|
|
|
@@ -164,14 +155,14 @@ function LocationLike_toLocation(x) {
|
|
|
164
155
|
if (typeof x === 'string') {
|
|
165
156
|
return {
|
|
166
157
|
uri: (0, _URL.URL_file)(x),
|
|
167
|
-
range:
|
|
158
|
+
range: (0, _Range.Range_create)(0, 0, 0, 0)
|
|
168
159
|
};
|
|
169
160
|
}
|
|
170
161
|
if (typeof x === 'object') {
|
|
171
162
|
if (x instanceof tsm.Node) {
|
|
172
163
|
return Location_fromNode(x);
|
|
173
164
|
}
|
|
174
|
-
if (
|
|
165
|
+
if ((0, _Location.Location_is)(x)) {
|
|
175
166
|
return x;
|
|
176
167
|
}
|
|
177
168
|
if (ExtendedDiagnostic_is(x)) {
|
|
@@ -214,7 +205,7 @@ function ExtendedDiagnostic_is(x) {
|
|
|
214
205
|
if (typeof x.uri !== 'string') {
|
|
215
206
|
return false;
|
|
216
207
|
}
|
|
217
|
-
if (!
|
|
208
|
+
if (!Diagnostic_is(x.diagnostic)) {
|
|
218
209
|
return false;
|
|
219
210
|
}
|
|
220
211
|
return true;
|
|
@@ -227,23 +218,6 @@ function ExtendedDiagnostic_groupByUri(ds) {
|
|
|
227
218
|
});
|
|
228
219
|
return dss;
|
|
229
220
|
}
|
|
230
|
-
async function ExtendedDiagnostic_findRelevantQuickFixes(xd, context) {
|
|
231
|
-
// check context to see if any of the context.diagnostics are equivalent
|
|
232
|
-
for (const ctx_d of context.diagnostics) {
|
|
233
|
-
const node_d = xd.diagnostic;
|
|
234
|
-
if (Diagnostic_compare(ctx_d, node_d)) {
|
|
235
|
-
if (xd.quickFix) {
|
|
236
|
-
const a = await xd.quickFix();
|
|
237
|
-
if (a) {
|
|
238
|
-
a.kind = 'quickfix';
|
|
239
|
-
a.diagnostics = [ctx_d];
|
|
240
|
-
return [a];
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
return [];
|
|
246
|
-
}
|
|
247
221
|
function Position_fromTSMorphOffset(offset, sf) {
|
|
248
222
|
const {
|
|
249
223
|
line,
|
|
@@ -276,12 +250,6 @@ function Position_fromOffsetOrFail(offset, text) {
|
|
|
276
250
|
return p;
|
|
277
251
|
}
|
|
278
252
|
|
|
279
|
-
/**
|
|
280
|
-
* The Diagnostic interface defined in vscode-languageserver-types
|
|
281
|
-
* does not include the document URI.
|
|
282
|
-
* This interface adds that, and a few other things.
|
|
283
|
-
*/
|
|
284
|
-
|
|
285
253
|
/**
|
|
286
254
|
* Helper method to create diagnostics
|
|
287
255
|
* @param node
|
|
@@ -297,36 +265,18 @@ function err(loc, message, code) {
|
|
|
297
265
|
diagnostic: {
|
|
298
266
|
range,
|
|
299
267
|
message,
|
|
300
|
-
severity:
|
|
268
|
+
severity: DiagnosticSeverity.Error,
|
|
301
269
|
code
|
|
302
270
|
}
|
|
303
271
|
};
|
|
304
272
|
}
|
|
305
|
-
function Diagnostic_compare(d1, d2) {
|
|
306
|
-
if (d1.code !== d2.code) {
|
|
307
|
-
return false;
|
|
308
|
-
}
|
|
309
|
-
if (d1.message !== d2.message) {
|
|
310
|
-
return false;
|
|
311
|
-
}
|
|
312
|
-
if (!Range_equals(d1.range, d2.range)) {
|
|
313
|
-
return false;
|
|
314
|
-
}
|
|
315
|
-
return true;
|
|
316
|
-
}
|
|
317
|
-
function Range_equals(r1, r2) {
|
|
318
|
-
return toArr(r1).join(',') === toArr(r2).join(',');
|
|
319
|
-
function toArr(r) {
|
|
320
|
-
return [r.start.line, r.start.character, r.end.line, r.end.character];
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
273
|
function DiagnosticSeverity_getLabel(severity) {
|
|
324
274
|
const {
|
|
325
275
|
Information,
|
|
326
276
|
Error,
|
|
327
277
|
Hint,
|
|
328
278
|
Warning
|
|
329
|
-
} =
|
|
279
|
+
} = DiagnosticSeverity;
|
|
330
280
|
const labels = {
|
|
331
281
|
[Information]: 'info',
|
|
332
282
|
[Error]: 'error',
|
|
@@ -363,59 +313,4 @@ function ExtendedDiagnostic_format(d, opts) {
|
|
|
363
313
|
const errorCode = code ? ` (${code})` : '';
|
|
364
314
|
const str = `${file}: ${severityLabel}${errorCode}: ${message}`;
|
|
365
315
|
return str;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* a value of "null" means this file needs to be deleted
|
|
370
|
-
*/
|
|
371
|
-
|
|
372
|
-
function FileSet_fromTextDocuments(documents) {
|
|
373
|
-
const files = {};
|
|
374
|
-
for (const uri of (0, _keys.default)(documents).call(documents)) {
|
|
375
|
-
files[uri] = documents.get(uri).getText();
|
|
376
|
-
}
|
|
377
|
-
return files;
|
|
378
|
-
}
|
|
379
|
-
function WorkspaceEdit_fromFileSet(files, getExistingFileText) {
|
|
380
|
-
const change = new _vscodeLanguageserverTypes.WorkspaceChange({
|
|
381
|
-
documentChanges: []
|
|
382
|
-
});
|
|
383
|
-
for (const uri of (0, _keys2.default)(files)) {
|
|
384
|
-
const content = files[uri];
|
|
385
|
-
if (typeof content !== 'string') {
|
|
386
|
-
change.deleteFile(uri, {
|
|
387
|
-
ignoreIfNotExists: true
|
|
388
|
-
});
|
|
389
|
-
continue;
|
|
390
|
-
} else {
|
|
391
|
-
const text = getExistingFileText?.(uri);
|
|
392
|
-
if (text) {
|
|
393
|
-
// file exists
|
|
394
|
-
//change.createFile(uri, { overwrite: true })
|
|
395
|
-
change.getTextEditChange({
|
|
396
|
-
uri,
|
|
397
|
-
version: null
|
|
398
|
-
}).replace(Range_full(text), content); // TODO: we could be more granular here
|
|
399
|
-
} else {
|
|
400
|
-
change.createFile(uri);
|
|
401
|
-
change.getTextEditChange({
|
|
402
|
-
uri,
|
|
403
|
-
version: null
|
|
404
|
-
}).insert(_vscodeLanguageserverTypes.Position.create(0, 0), content);
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
return change.edit;
|
|
409
|
-
}
|
|
410
|
-
function Range_full(text, cr = '\n') {
|
|
411
|
-
if (text === '') {
|
|
412
|
-
return _vscodeLanguageserverTypes.Range.create(0, 0, 0, 0);
|
|
413
|
-
}
|
|
414
|
-
const lines = text.split(cr);
|
|
415
|
-
if (lines.length === 0) {
|
|
416
|
-
return _vscodeLanguageserverTypes.Range.create(0, 0, 0, 0);
|
|
417
|
-
}
|
|
418
|
-
const start = _vscodeLanguageserverTypes.Position.create(0, 0);
|
|
419
|
-
const end = _vscodeLanguageserverTypes.Position.create(lines.length - 1, lines[lines.length - 1].length);
|
|
420
|
-
return _vscodeLanguageserverTypes.Range.create(start, end);
|
|
421
316
|
}
|
package/dist/x/path.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare function globSync(pattern: string): string[];
|
|
1
2
|
export declare function directoryNameResolver(dirName: string): string | undefined;
|
|
2
3
|
export declare function followsDirNameConvention(filePath: string): boolean;
|
|
3
4
|
export declare function basenameNoExt(path: string): string;
|
package/dist/x/path.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/x/path.ts"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAazE;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIlE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAGnD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAGjD"}
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/x/path.ts"],"names":[],"mappings":"AAGA,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAGlD;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAazE;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIlE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAGnD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAGjD"}
|
package/dist/x/path.js
CHANGED
|
@@ -8,46 +8,54 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.basenameNoExt = basenameNoExt;
|
|
9
9
|
exports.directoryNameResolver = directoryNameResolver;
|
|
10
10
|
exports.followsDirNameConvention = followsDirNameConvention;
|
|
11
|
+
exports.globSync = globSync;
|
|
11
12
|
exports.isCellFileName = isCellFileName;
|
|
12
13
|
exports.isLayoutFileName = isLayoutFileName;
|
|
13
|
-
var _endsWith = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/ends-with"));
|
|
14
14
|
require("core-js/modules/es.array.push.js");
|
|
15
|
-
var
|
|
16
|
-
var
|
|
15
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/map"));
|
|
16
|
+
var _replaceAll = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/replace-all"));
|
|
17
|
+
var _endsWith = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/ends-with"));
|
|
18
|
+
var _nodeFs = _interopRequireDefault(require("node:fs"));
|
|
19
|
+
var _nodePath = require("node:path");
|
|
20
|
+
function globSync(pattern) {
|
|
21
|
+
var _context;
|
|
22
|
+
// fs.globSync requires forward slashes as path separators in patterns, even on Windows.
|
|
23
|
+
return (0, _map.default)(_context = _nodeFs.default.globSync((0, _replaceAll.default)(pattern).call(pattern, '\\', '/'))).call(_context, p => p.toString());
|
|
24
|
+
}
|
|
17
25
|
function directoryNameResolver(dirName) {
|
|
18
|
-
dirName = (0,
|
|
19
|
-
const parts = dirName.split(
|
|
26
|
+
dirName = (0, _nodePath.normalize)(dirName);
|
|
27
|
+
const parts = dirName.split(_nodePath.sep);
|
|
20
28
|
const pp = parts[parts.length - 1];
|
|
21
29
|
parts.push(pp);
|
|
22
30
|
const extensions = ['.js', '.jsx', '.ts', '.tsx'];
|
|
23
|
-
const pathNoExt = parts.join(
|
|
31
|
+
const pathNoExt = parts.join(_nodePath.sep);
|
|
24
32
|
for (const ext of extensions) {
|
|
25
33
|
const path = pathNoExt + ext;
|
|
26
|
-
if (
|
|
34
|
+
if (_nodeFs.default.existsSync(path)) {
|
|
27
35
|
return path;
|
|
28
36
|
}
|
|
29
37
|
}
|
|
30
38
|
}
|
|
31
39
|
function followsDirNameConvention(filePath) {
|
|
32
|
-
filePath = (0,
|
|
33
|
-
const ending = basenameNoExt(filePath) +
|
|
40
|
+
filePath = (0, _nodePath.normalize)(filePath);
|
|
41
|
+
const ending = basenameNoExt(filePath) + _nodePath.sep + (0, _nodePath.basename)(filePath);
|
|
34
42
|
return (0, _endsWith.default)(filePath).call(filePath, ending);
|
|
35
43
|
}
|
|
36
44
|
function basenameNoExt(path) {
|
|
37
|
-
path = (0,
|
|
38
|
-
const parts = (0,
|
|
45
|
+
path = (0, _nodePath.normalize)(path);
|
|
46
|
+
const parts = (0, _nodePath.basename)(path).split('.');
|
|
39
47
|
if (parts.length > 1) {
|
|
40
48
|
parts.pop();
|
|
41
49
|
}
|
|
42
50
|
return parts.join('.');
|
|
43
51
|
}
|
|
44
52
|
function isLayoutFileName(f) {
|
|
45
|
-
var
|
|
46
|
-
f = (0,
|
|
47
|
-
return (0, _endsWith.default)(
|
|
53
|
+
var _context2;
|
|
54
|
+
f = (0, _nodePath.normalize)(f);
|
|
55
|
+
return (0, _endsWith.default)(_context2 = basenameNoExt(f)).call(_context2, 'Layout');
|
|
48
56
|
}
|
|
49
57
|
function isCellFileName(f) {
|
|
50
|
-
var
|
|
51
|
-
f = (0,
|
|
52
|
-
return (0, _endsWith.default)(
|
|
58
|
+
var _context3;
|
|
59
|
+
f = (0, _nodePath.normalize)(f);
|
|
60
|
+
return (0, _endsWith.default)(_context3 = basenameNoExt(f)).call(_context3, 'Cell');
|
|
53
61
|
}
|
package/dist/x/prisma.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Location } from '
|
|
2
|
-
import { Range } from 'vscode-languageserver';
|
|
1
|
+
import type { Location } from './Location';
|
|
3
2
|
/**
|
|
4
3
|
* find "env()" expressions in a prisma file using regex
|
|
5
4
|
* @param prismaSchemaFilePath
|
|
@@ -13,7 +12,7 @@ export declare function prisma_parseEnvExpressionsInFile(prismaSchemaFilePath: s
|
|
|
13
12
|
* @param src
|
|
14
13
|
*/
|
|
15
14
|
export declare function prisma_parseEnvExpressions(src: string): Generator<{
|
|
16
|
-
range: Range;
|
|
15
|
+
range: import("./Range").Range;
|
|
17
16
|
key: any;
|
|
18
17
|
}, void, unknown>;
|
|
19
18
|
//# sourceMappingURL=prisma.d.ts.map
|
package/dist/x/prisma.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../src/x/prisma.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../src/x/prisma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAI1C;;;GAGG;AACH,wBAAiB,gCAAgC,CAC/C,oBAAoB,EAAE,MAAM;;;iCAa7B;AAED;;;GAGG;AACH,wBAAiB,0BAA0B,CAAC,GAAG,EAAE,MAAM;;;kBActD"}
|
package/dist/x/prisma.js
CHANGED
|
@@ -10,9 +10,9 @@ exports.prisma_parseEnvExpressionsInFile = prisma_parseEnvExpressionsInFile;
|
|
|
10
10
|
require("core-js/modules/esnext.json.parse.js");
|
|
11
11
|
var _matchAll = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/match-all"));
|
|
12
12
|
var _nodeFs = require("node:fs");
|
|
13
|
-
var
|
|
13
|
+
var _diagnostics = require("./diagnostics");
|
|
14
|
+
var _Range = require("./Range");
|
|
14
15
|
var _URL = require("./URL");
|
|
15
|
-
var _vscodeLanguageserverTypes = require("./vscode-languageserver-types");
|
|
16
16
|
/**
|
|
17
17
|
* find "env()" expressions in a prisma file using regex
|
|
18
18
|
* @param prismaSchemaFilePath
|
|
@@ -49,9 +49,9 @@ function* prisma_parseEnvExpressions(src) {
|
|
|
49
49
|
for (const match of (0, _matchAll.default)(_context = src).call(_context, re)) {
|
|
50
50
|
var _context;
|
|
51
51
|
try {
|
|
52
|
-
const start = (0,
|
|
53
|
-
const end = (0,
|
|
54
|
-
const range =
|
|
52
|
+
const start = (0, _diagnostics.Position_fromOffsetOrFail)(match.index, src);
|
|
53
|
+
const end = (0, _diagnostics.Position_fromOffsetOrFail)(match.index + match[0].length, src);
|
|
54
|
+
const range = (0, _Range.Range_create)(start, end);
|
|
55
55
|
const key = JSON.parse(match[1]);
|
|
56
56
|
yield {
|
|
57
57
|
range,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/structure",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2-next.31+ff2776832",
|
|
4
4
|
"description": "noun: the arrangement of and relations between the parts or elements of something complex",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@babel/runtime-corejs3": "7.28.4",
|
|
29
|
-
"@cedarjs/project-config": "2.2.
|
|
29
|
+
"@cedarjs/project-config": "2.2.2-next.31+ff2776832",
|
|
30
30
|
"@prisma/internals": "6.19.1",
|
|
31
31
|
"@types/line-column": "1.0.2",
|
|
32
32
|
"camelcase": "6.3.0",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"deepmerge": "4.3.1",
|
|
35
35
|
"dotenv-defaults": "5.0.2",
|
|
36
36
|
"enquirer": "2.4.1",
|
|
37
|
-
"fast-glob": "3.3.3",
|
|
38
37
|
"graphql": "16.12.0",
|
|
39
38
|
"lazy-get-decorator": "2.2.1",
|
|
40
39
|
"line-column": "1.0.2",
|
|
@@ -44,9 +43,6 @@
|
|
|
44
43
|
"proxyquire": "2.1.3",
|
|
45
44
|
"smol-toml": "1.6.0",
|
|
46
45
|
"ts-morph": "23.0.0",
|
|
47
|
-
"vscode-languageserver": "6.1.1",
|
|
48
|
-
"vscode-languageserver-textdocument": "1.0.12",
|
|
49
|
-
"vscode-languageserver-types": "3.17.5",
|
|
50
46
|
"yargs-parser": "21.1.1"
|
|
51
47
|
},
|
|
52
48
|
"devDependencies": {
|
|
@@ -54,12 +50,11 @@
|
|
|
54
50
|
"@babel/core": "^7.26.10",
|
|
55
51
|
"@types/lodash": "4.17.21",
|
|
56
52
|
"@types/node": "24.10.4",
|
|
57
|
-
"@types/vscode": "1.107.0",
|
|
58
53
|
"typescript": "5.9.3",
|
|
59
54
|
"vitest": "3.2.4"
|
|
60
55
|
},
|
|
61
56
|
"publishConfig": {
|
|
62
57
|
"access": "public"
|
|
63
58
|
},
|
|
64
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "ff2776832afcb70cd4ca38986ec4e37043e1c44b"
|
|
65
60
|
}
|
package/dist/hosts.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Paths } from '@cedarjs/project-config';
|
|
2
|
-
/**
|
|
3
|
-
* The host interface allows us to decouple the "model/*"
|
|
4
|
-
* classes from access to the file system.
|
|
5
|
-
* This is critical for editor support (ex: showing diagnostics on unsaved files)
|
|
6
|
-
*/
|
|
7
|
-
export interface Host {
|
|
8
|
-
existsSync(path: string): boolean;
|
|
9
|
-
readFileSync(path: string): string;
|
|
10
|
-
readdirSync(path: string): string[];
|
|
11
|
-
globSync(pattern: string): string[];
|
|
12
|
-
writeFileSync(path: string, contents: string): void;
|
|
13
|
-
paths: Paths;
|
|
14
|
-
}
|
|
15
|
-
export declare class DefaultHost implements Host {
|
|
16
|
-
existsSync(path: string): boolean;
|
|
17
|
-
readFileSync(path: string): string;
|
|
18
|
-
readdirSync(path: string): string[];
|
|
19
|
-
globSync(pattern: string): string[];
|
|
20
|
-
writeFileSync(path: string, contents: string): void;
|
|
21
|
-
get paths(): Paths;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=hosts.d.ts.map
|
package/dist/hosts.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosts.d.ts","sourceRoot":"","sources":["../src/hosts.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAKpD;;;;GAIG;AACH,MAAM,WAAW,IAAI;IACnB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IACjC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IAClC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACnC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACnD,KAAK,EAAE,KAAK,CAAA;CACb;AAED,qBAAa,WAAY,YAAW,IAAI;IACtC,UAAU,CAAC,IAAI,EAAE,MAAM;IAGvB,YAAY,CAAC,IAAI,EAAE,MAAM;IAGzB,WAAW,CAAC,IAAI,EAAE,MAAM;IAGxB,QAAQ,CAAC,OAAO,EAAE,MAAM;IAIxB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAG5C,IACI,KAAK,UAER;CACF"}
|