@bairock/lenz 0.0.14 → 0.0.16

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.
Files changed (120) hide show
  1. package/README.md +119 -8
  2. package/dist/cli/commands/generate.d.ts.map +1 -1
  3. package/dist/cli/commands/generate.js +66 -79
  4. package/dist/cli/commands/generate.js.map +1 -1
  5. package/dist/cli/commands/init.d.ts.map +1 -1
  6. package/dist/cli/commands/init.js +22 -30
  7. package/dist/cli/commands/init.js.map +1 -1
  8. package/dist/cli/commands/studio.js +15 -21
  9. package/dist/cli/commands/studio.js.map +1 -1
  10. package/dist/cli/index.js +11 -18
  11. package/dist/cli/index.js.map +1 -1
  12. package/dist/config/index.d.ts +4 -6
  13. package/dist/config/index.d.ts.map +1 -1
  14. package/dist/config/index.js +31 -15
  15. package/dist/config/index.js.map +1 -1
  16. package/dist/engine/CodeGenerator.d.ts +8 -28
  17. package/dist/engine/CodeGenerator.d.ts.map +1 -1
  18. package/dist/engine/CodeGenerator.js +26 -1935
  19. package/dist/engine/CodeGenerator.js.map +1 -1
  20. package/dist/engine/GraphQLParseHelpers.d.ts +25 -0
  21. package/dist/engine/GraphQLParseHelpers.d.ts.map +1 -0
  22. package/dist/engine/GraphQLParseHelpers.js +128 -0
  23. package/dist/engine/GraphQLParseHelpers.js.map +1 -0
  24. package/dist/engine/GraphQLParser.d.ts +23 -8
  25. package/dist/engine/GraphQLParser.d.ts.map +1 -1
  26. package/dist/engine/GraphQLParser.js +165 -248
  27. package/dist/engine/GraphQLParser.js.map +1 -1
  28. package/dist/engine/GraphQLRelationAnalyzer.d.ts +10 -0
  29. package/dist/engine/GraphQLRelationAnalyzer.d.ts.map +1 -0
  30. package/dist/engine/GraphQLRelationAnalyzer.js +117 -0
  31. package/dist/engine/GraphQLRelationAnalyzer.js.map +1 -0
  32. package/dist/engine/LenzEngine.d.ts +4 -4
  33. package/dist/engine/LenzEngine.d.ts.map +1 -1
  34. package/dist/engine/LenzEngine.js +59 -46
  35. package/dist/engine/LenzEngine.js.map +1 -1
  36. package/dist/engine/SchemaRelationValidator.d.ts +15 -0
  37. package/dist/engine/SchemaRelationValidator.d.ts.map +1 -0
  38. package/dist/engine/SchemaRelationValidator.js +133 -0
  39. package/dist/engine/SchemaRelationValidator.js.map +1 -0
  40. package/dist/engine/SchemaValidator.d.ts +12 -11
  41. package/dist/engine/SchemaValidator.d.ts.map +1 -1
  42. package/dist/engine/SchemaValidator.js +163 -169
  43. package/dist/engine/SchemaValidator.js.map +1 -1
  44. package/dist/engine/directives.d.ts +10 -0
  45. package/dist/engine/directives.d.ts.map +1 -1
  46. package/dist/engine/directives.js +192 -47
  47. package/dist/engine/directives.js.map +1 -1
  48. package/dist/engine/generators/ClientGenerator.d.ts +7 -0
  49. package/dist/engine/generators/ClientGenerator.d.ts.map +1 -0
  50. package/dist/engine/generators/ClientGenerator.js +386 -0
  51. package/dist/engine/generators/ClientGenerator.js.map +1 -0
  52. package/dist/engine/generators/DelegateGenerator.d.ts +9 -0
  53. package/dist/engine/generators/DelegateGenerator.d.ts.map +1 -0
  54. package/dist/engine/generators/DelegateGenerator.js +453 -0
  55. package/dist/engine/generators/DelegateGenerator.js.map +1 -0
  56. package/dist/engine/generators/DelegateHelpers.d.ts +7 -0
  57. package/dist/engine/generators/DelegateHelpers.d.ts.map +1 -0
  58. package/dist/engine/generators/DelegateHelpers.js +144 -0
  59. package/dist/engine/generators/DelegateHelpers.js.map +1 -0
  60. package/dist/engine/generators/DelegateRelations.d.ts +11 -0
  61. package/dist/engine/generators/DelegateRelations.d.ts.map +1 -0
  62. package/dist/engine/generators/DelegateRelations.js +794 -0
  63. package/dist/engine/generators/DelegateRelations.js.map +1 -0
  64. package/dist/engine/generators/DelegateTemplateBody.d.ts +8 -0
  65. package/dist/engine/generators/DelegateTemplateBody.d.ts.map +1 -0
  66. package/dist/engine/generators/DelegateTemplateBody.js +776 -0
  67. package/dist/engine/generators/DelegateTemplateBody.js.map +1 -0
  68. package/dist/engine/generators/GenerateRuntimeErrors.d.ts +2 -0
  69. package/dist/engine/generators/GenerateRuntimeErrors.d.ts.map +1 -0
  70. package/dist/engine/generators/GenerateRuntimeErrors.js +140 -0
  71. package/dist/engine/generators/GenerateRuntimeErrors.js.map +1 -0
  72. package/dist/engine/generators/GenerateRuntimeIndex.d.ts +2 -0
  73. package/dist/engine/generators/GenerateRuntimeIndex.d.ts.map +1 -0
  74. package/dist/engine/generators/GenerateRuntimeIndex.js +21 -0
  75. package/dist/engine/generators/GenerateRuntimeIndex.js.map +1 -0
  76. package/dist/engine/generators/GenerateRuntimeLogger.d.ts +2 -0
  77. package/dist/engine/generators/GenerateRuntimeLogger.d.ts.map +1 -0
  78. package/dist/engine/generators/GenerateRuntimeLogger.js +125 -0
  79. package/dist/engine/generators/GenerateRuntimeLogger.js.map +1 -0
  80. package/dist/engine/generators/GenerateRuntimePagination.d.ts +2 -0
  81. package/dist/engine/generators/GenerateRuntimePagination.d.ts.map +1 -0
  82. package/dist/engine/generators/GenerateRuntimePagination.js +159 -0
  83. package/dist/engine/generators/GenerateRuntimePagination.js.map +1 -0
  84. package/dist/engine/generators/GenerateRuntimeQuery.d.ts +2 -0
  85. package/dist/engine/generators/GenerateRuntimeQuery.d.ts.map +1 -0
  86. package/dist/engine/generators/GenerateRuntimeQuery.js +427 -0
  87. package/dist/engine/generators/GenerateRuntimeQuery.js.map +1 -0
  88. package/dist/engine/generators/GenerateRuntimeRelations.d.ts +2 -0
  89. package/dist/engine/generators/GenerateRuntimeRelations.d.ts.map +1 -0
  90. package/dist/engine/generators/GenerateRuntimeRelations.js +130 -0
  91. package/dist/engine/generators/GenerateRuntimeRelations.js.map +1 -0
  92. package/dist/engine/generators/RuntimeGenerator.d.ts +16 -0
  93. package/dist/engine/generators/RuntimeGenerator.d.ts.map +1 -0
  94. package/dist/engine/generators/RuntimeGenerator.js +16 -0
  95. package/dist/engine/generators/RuntimeGenerator.js.map +1 -0
  96. package/dist/engine/generators/TypeFilterTypes.d.ts +2 -0
  97. package/dist/engine/generators/TypeFilterTypes.d.ts.map +1 -0
  98. package/dist/engine/generators/TypeFilterTypes.js +220 -0
  99. package/dist/engine/generators/TypeFilterTypes.js.map +1 -0
  100. package/dist/engine/generators/TypeGenerator.d.ts +16 -0
  101. package/dist/engine/generators/TypeGenerator.d.ts.map +1 -0
  102. package/dist/engine/generators/TypeGenerator.js +493 -0
  103. package/dist/engine/generators/TypeGenerator.js.map +1 -0
  104. package/dist/engine/generators/helpers.d.ts +13 -0
  105. package/dist/engine/generators/helpers.d.ts.map +1 -0
  106. package/dist/engine/generators/helpers.js +316 -0
  107. package/dist/engine/generators/helpers.js.map +1 -0
  108. package/dist/engine/index.d.ts +3 -3
  109. package/dist/engine/index.d.ts.map +1 -1
  110. package/dist/engine/index.js +3 -9
  111. package/dist/engine/index.js.map +1 -1
  112. package/dist/errors/index.d.ts +3 -0
  113. package/dist/errors/index.d.ts.map +1 -1
  114. package/dist/errors/index.js +25 -32
  115. package/dist/errors/index.js.map +1 -1
  116. package/dist/index.d.ts +4 -5
  117. package/dist/index.d.ts.map +1 -1
  118. package/dist/index.js +10 -30
  119. package/dist/index.js.map +1 -1
  120. package/package.json +6 -7
@@ -1,99 +1,244 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lenzDirectives = exports.hideDirective = exports.embeddedDirective = exports.updatedAtDirective = exports.createdAtDirective = exports.relationDirective = exports.defaultDirective = exports.indexDirective = exports.uniqueDirective = exports.idDirective = exports.modelDirective = void 0;
4
- exports.isLenzDirective = isLenzDirective;
5
- exports.getDirectiveDefinition = getDirectiveDefinition;
6
- const graphql_1 = require("graphql");
1
+ import { GraphQLDirective, DirectiveLocation, GraphQLString, GraphQLNonNull, GraphQLBoolean, GraphQLList } from 'graphql';
7
2
  // Определение всех директив Lenz ORM
8
- exports.modelDirective = new graphql_1.GraphQLDirective({
3
+ export const modelDirective = new GraphQLDirective({
9
4
  name: 'model',
10
- locations: [graphql_1.DirectiveLocation.OBJECT],
5
+ locations: [DirectiveLocation.OBJECT],
11
6
  description: 'Marks a GraphQL type as a database model'
12
7
  });
13
- exports.idDirective = new graphql_1.GraphQLDirective({
8
+ export const idDirective = new GraphQLDirective({
14
9
  name: 'id',
15
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
10
+ locations: [DirectiveLocation.FIELD_DEFINITION],
11
+ args: {
12
+ name: {
13
+ type: GraphQLString,
14
+ description: 'Name for the primary key constraint (Prisma @id map parameter)'
15
+ },
16
+ map: {
17
+ type: GraphQLString,
18
+ description: 'Custom name for the underlying index in the database'
19
+ }
20
+ },
16
21
  description: 'Marks a field as primary key (auto-generated ObjectId)'
17
22
  });
18
- exports.uniqueDirective = new graphql_1.GraphQLDirective({
23
+ export const uniqueDirective = new GraphQLDirective({
19
24
  name: 'unique',
20
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
25
+ locations: [DirectiveLocation.FIELD_DEFINITION],
26
+ args: {
27
+ name: {
28
+ type: GraphQLString,
29
+ description: 'Name for the unique constraint (Prisma @unique map parameter)'
30
+ },
31
+ map: {
32
+ type: GraphQLString,
33
+ description: 'Custom name for the underlying index in the database'
34
+ }
35
+ },
21
36
  description: 'Creates a unique index on the field'
22
37
  });
23
- exports.indexDirective = new graphql_1.GraphQLDirective({
38
+ export const indexDirective = new GraphQLDirective({
24
39
  name: 'index',
25
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
40
+ locations: [DirectiveLocation.FIELD_DEFINITION],
26
41
  description: 'Creates a regular index on the field'
27
42
  });
28
- exports.defaultDirective = new graphql_1.GraphQLDirective({
43
+ export const defaultDirective = new GraphQLDirective({
29
44
  name: 'default',
30
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
45
+ locations: [DirectiveLocation.FIELD_DEFINITION],
31
46
  args: {
32
47
  value: {
33
- type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
34
- description: 'Default value for the field'
48
+ type: GraphQLString,
49
+ description: 'Default value for the field (static value)'
50
+ },
51
+ generator: {
52
+ type: GraphQLString,
53
+ description: 'Default value generator: "uuid", "now", "cuid"'
35
54
  }
36
55
  },
37
- description: 'Sets a default value for a field'
56
+ description: 'Sets a default value or generator for a field'
38
57
  });
39
- exports.relationDirective = new graphql_1.GraphQLDirective({
58
+ export const relationDirective = new GraphQLDirective({
40
59
  name: 'relation',
41
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
60
+ locations: [DirectiveLocation.FIELD_DEFINITION],
42
61
  args: {
62
+ name: {
63
+ type: GraphQLString,
64
+ description: 'Name for the relation (required when a model has multiple relations to the same target model)'
65
+ },
43
66
  field: {
44
- type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
67
+ type: new GraphQLNonNull(GraphQLString),
45
68
  description: 'The field that stores the foreign key'
46
69
  },
47
70
  strategy: {
48
- type: graphql_1.GraphQLString,
71
+ type: GraphQLString,
49
72
  description: 'Strategy for loading related data: "populate" (default) or "lookup"'
50
73
  },
51
74
  index: {
52
- type: graphql_1.GraphQLBoolean,
75
+ type: GraphQLBoolean,
53
76
  description: 'Whether to create an index on the foreign key field (default: true)'
77
+ },
78
+ onDelete: {
79
+ type: GraphQLString,
80
+ description: 'Cascade delete behavior: "Cascade" (delete related), "SetNull" (nullify FK), "Restrict" (prevent delete), or "NoAction" (default, no cascade)'
81
+ },
82
+ onUpdate: {
83
+ type: GraphQLString,
84
+ description: 'Cascade update behavior: "SetNull" (nullify FK), "Cascade" (update related), "Restrict" (prevent update), or "NoAction" (default, no cascade)'
54
85
  }
55
86
  },
56
87
  description: 'Defines a relationship between models'
57
88
  });
58
- exports.createdAtDirective = new graphql_1.GraphQLDirective({
89
+ export const createdAtDirective = new GraphQLDirective({
59
90
  name: 'createdAt',
60
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
91
+ locations: [DirectiveLocation.FIELD_DEFINITION],
61
92
  description: 'Automatically sets timestamp on creation'
62
93
  });
63
- exports.updatedAtDirective = new graphql_1.GraphQLDirective({
94
+ export const updatedAtDirective = new GraphQLDirective({
64
95
  name: 'updatedAt',
65
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
96
+ locations: [DirectiveLocation.FIELD_DEFINITION],
66
97
  description: 'Automatically updates timestamp on modification'
67
98
  });
68
- exports.embeddedDirective = new graphql_1.GraphQLDirective({
99
+ export const embeddedDirective = new GraphQLDirective({
69
100
  name: 'embedded',
70
- locations: [graphql_1.DirectiveLocation.OBJECT],
101
+ locations: [DirectiveLocation.OBJECT],
71
102
  description: 'Marks a type as embedded document (not stored in separate collection)'
72
103
  });
73
- exports.hideDirective = new graphql_1.GraphQLDirective({
104
+ export const hideDirective = new GraphQLDirective({
74
105
  name: 'hide',
75
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
106
+ locations: [DirectiveLocation.FIELD_DEFINITION],
76
107
  description: 'Excludes field from query results by default. Can be explicitly selected via select option.'
77
108
  });
109
+ export const mapDirective = new GraphQLDirective({
110
+ name: 'map',
111
+ locations: [DirectiveLocation.FIELD_DEFINITION],
112
+ args: {
113
+ name: {
114
+ type: new GraphQLNonNull(GraphQLString),
115
+ description: 'The database field name to map to'
116
+ }
117
+ },
118
+ description: 'Maps a field to a different database column name (Prisma @map)'
119
+ });
120
+ export const modelMapDirective = new GraphQLDirective({
121
+ name: 'modelMap',
122
+ locations: [DirectiveLocation.OBJECT],
123
+ args: {
124
+ name: {
125
+ type: new GraphQLNonNull(GraphQLString),
126
+ description: 'The database collection name to map to (Prisma @@map)'
127
+ }
128
+ },
129
+ description: 'Maps a model to a different database collection name (Prisma @@map)'
130
+ });
131
+ export const ignoreDirective = new GraphQLDirective({
132
+ name: 'ignore',
133
+ locations: [DirectiveLocation.FIELD_DEFINITION],
134
+ description: 'Excludes a field from database operations entirely (Prisma @ignore)'
135
+ });
136
+ export const compoundUniqueDirective = new GraphQLDirective({
137
+ name: 'compoundUnique',
138
+ locations: [DirectiveLocation.OBJECT],
139
+ args: {
140
+ fields: {
141
+ type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))),
142
+ description: 'Field names to include in the compound unique index'
143
+ },
144
+ name: {
145
+ type: GraphQLString,
146
+ description: 'Optional name for the unique constraint (maps to Prisma @@unique map parameter)'
147
+ }
148
+ },
149
+ description: 'Creates a compound unique index on multiple fields (Prisma @@unique)'
150
+ });
151
+ export const compoundIndexDirective = new GraphQLDirective({
152
+ name: 'compoundIndex',
153
+ locations: [DirectiveLocation.OBJECT],
154
+ args: {
155
+ fields: {
156
+ type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))),
157
+ description: 'Field names to include in the compound index'
158
+ },
159
+ name: {
160
+ type: GraphQLString,
161
+ description: 'Optional name for the index (maps to Prisma @@index map parameter)'
162
+ }
163
+ },
164
+ description: 'Creates a compound index on multiple fields (Prisma @@index)'
165
+ });
166
+ export const compoundIdDirective = new GraphQLDirective({
167
+ name: 'compoundId',
168
+ locations: [DirectiveLocation.OBJECT],
169
+ args: {
170
+ fields: {
171
+ type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))),
172
+ description: 'Field names to include in the compound primary key'
173
+ },
174
+ name: {
175
+ type: GraphQLString,
176
+ description: 'Optional name for the primary key constraint'
177
+ }
178
+ },
179
+ description: 'Defines a compound primary key on multiple fields (Prisma @@id)'
180
+ });
181
+ export const fulltextDirective = new GraphQLDirective({
182
+ name: 'fulltext',
183
+ locations: [DirectiveLocation.OBJECT, DirectiveLocation.FIELD_DEFINITION],
184
+ args: {
185
+ fields: {
186
+ type: new GraphQLList(new GraphQLNonNull(GraphQLString)),
187
+ description: 'Field names to include in the full-text index (for object-level usage: @@fulltext(fields: ["title", "description"]))'
188
+ }
189
+ },
190
+ description: 'Creates a MongoDB text index on specified field(s) for full-text search'
191
+ });
192
+ export const emailDirective = new GraphQLDirective({
193
+ name: 'email',
194
+ locations: [DirectiveLocation.FIELD_DEFINITION],
195
+ description: 'Validates that the field value is a valid email address'
196
+ });
197
+ export const urlDirective = new GraphQLDirective({
198
+ name: 'url',
199
+ locations: [DirectiveLocation.FIELD_DEFINITION],
200
+ description: 'Validates that the field value is a valid URL'
201
+ });
202
+ export const regexDirective = new GraphQLDirective({
203
+ name: 'regex',
204
+ locations: [DirectiveLocation.FIELD_DEFINITION],
205
+ args: {
206
+ pattern: {
207
+ type: new GraphQLNonNull(GraphQLString),
208
+ description: 'Regular expression pattern to validate the field value against'
209
+ }
210
+ },
211
+ description: 'Validates that the field value matches a regular expression pattern'
212
+ });
78
213
  // Экспорт всех директив
79
- exports.lenzDirectives = [
80
- exports.modelDirective,
81
- exports.idDirective,
82
- exports.uniqueDirective,
83
- exports.indexDirective,
84
- exports.defaultDirective,
85
- exports.relationDirective,
86
- exports.createdAtDirective,
87
- exports.updatedAtDirective,
88
- exports.embeddedDirective,
89
- exports.hideDirective
214
+ export const lenzDirectives = [
215
+ modelDirective,
216
+ idDirective,
217
+ uniqueDirective,
218
+ indexDirective,
219
+ defaultDirective,
220
+ relationDirective,
221
+ createdAtDirective,
222
+ updatedAtDirective,
223
+ embeddedDirective,
224
+ hideDirective,
225
+ mapDirective,
226
+ modelMapDirective,
227
+ ignoreDirective,
228
+ compoundUniqueDirective,
229
+ compoundIndexDirective,
230
+ compoundIdDirective,
231
+ fulltextDirective,
232
+ emailDirective,
233
+ urlDirective,
234
+ regexDirective
90
235
  ];
91
236
  // Утилита для проверки, является ли директива директивой Lenz
92
- function isLenzDirective(directiveName) {
93
- return exports.lenzDirectives.some(d => d.name === directiveName);
237
+ export function isLenzDirective(directiveName) {
238
+ return lenzDirectives.some(d => d.name === directiveName);
94
239
  }
95
240
  // Утилита для получения определения директивы по имени
96
- function getDirectiveDefinition(directiveName) {
97
- return exports.lenzDirectives.find(d => d.name === directiveName);
241
+ export function getDirectiveDefinition(directiveName) {
242
+ return lenzDirectives.find(d => d.name === directiveName);
98
243
  }
99
244
  //# sourceMappingURL=directives.js.map
@@ -1 +1 @@
1
- {"version":3,"file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AAI,EAAE,IAAI,cAAc,CAAC,aAAa,CAAC;YACvC,WAAW,EAAE,gEAAgE;SAC9E;KACF;IACD,WAAW,EAAE,qEAAqE;CACnF,CAAC,CAAC;AAEH,wBAAwB;AACxB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,cAAc;IACd,WAAW;IACX,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;IAClB,iBAAiB;IACjB,aAAa;IACb,YAAY;IACZ,iBAAiB;IACjB,eAAe;IACf,uBAAuB;IACvB,sBAAsB;IACtB,mBAAmB;IACnB,iBAAiB;IACjB,cAAc;IACd,YAAY;IACZ,cAAc;CACf,CAAC;AAEF,8DAA8D;AAC9D,MAAM,UAAU,eAAe,CAAC,aAAqB;IACnD,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;AAC5D,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,sBAAsB,CAAC,aAAqB;IAC1D,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { GraphQLModel } from '../GraphQLParser.js';
2
+ export declare class ClientGenerator {
3
+ generateIndex(clientName: string): string;
4
+ generateClient(clientName: string, models: GraphQLModel[]): string;
5
+ getModelsForRuntime(models: GraphQLModel[]): any[];
6
+ }
7
+ //# sourceMappingURL=ClientGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientGenerator.d.ts","sourceRoot":"","sources":["../../../src/engine/generators/ClientGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,qBAAa,eAAe;IAC1B,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAkBzC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM;IA4VlE,mBAAmB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,GAAG,EAAE;CAmBnD"}