context-mapper-mcp 1.0.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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +238 -0
  3. package/dist/generators/plantuml.d.ts +17 -0
  4. package/dist/generators/plantuml.d.ts.map +1 -0
  5. package/dist/generators/plantuml.js +244 -0
  6. package/dist/generators/plantuml.js.map +1 -0
  7. package/dist/index.d.ts +7 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +897 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/model/parser.d.ts +51 -0
  12. package/dist/model/parser.d.ts.map +1 -0
  13. package/dist/model/parser.js +934 -0
  14. package/dist/model/parser.js.map +1 -0
  15. package/dist/model/types.d.ts +121 -0
  16. package/dist/model/types.d.ts.map +1 -0
  17. package/dist/model/types.js +12 -0
  18. package/dist/model/types.js.map +1 -0
  19. package/dist/model/validation.d.ts +36 -0
  20. package/dist/model/validation.d.ts.map +1 -0
  21. package/dist/model/validation.js +411 -0
  22. package/dist/model/validation.js.map +1 -0
  23. package/dist/model/writer.d.ts +30 -0
  24. package/dist/model/writer.d.ts.map +1 -0
  25. package/dist/model/writer.js +305 -0
  26. package/dist/model/writer.js.map +1 -0
  27. package/dist/tools/aggregate-tools.d.ts +295 -0
  28. package/dist/tools/aggregate-tools.d.ts.map +1 -0
  29. package/dist/tools/aggregate-tools.js +965 -0
  30. package/dist/tools/aggregate-tools.js.map +1 -0
  31. package/dist/tools/context-tools.d.ts +60 -0
  32. package/dist/tools/context-tools.d.ts.map +1 -0
  33. package/dist/tools/context-tools.js +166 -0
  34. package/dist/tools/context-tools.js.map +1 -0
  35. package/dist/tools/generation-tools.d.ts +29 -0
  36. package/dist/tools/generation-tools.d.ts.map +1 -0
  37. package/dist/tools/generation-tools.js +62 -0
  38. package/dist/tools/generation-tools.js.map +1 -0
  39. package/dist/tools/model-tools.d.ts +72 -0
  40. package/dist/tools/model-tools.d.ts.map +1 -0
  41. package/dist/tools/model-tools.js +186 -0
  42. package/dist/tools/model-tools.js.map +1 -0
  43. package/dist/tools/query-tools.d.ts +170 -0
  44. package/dist/tools/query-tools.d.ts.map +1 -0
  45. package/dist/tools/query-tools.js +322 -0
  46. package/dist/tools/query-tools.js.map +1 -0
  47. package/dist/tools/relationship-tools.d.ts +68 -0
  48. package/dist/tools/relationship-tools.d.ts.map +1 -0
  49. package/dist/tools/relationship-tools.js +178 -0
  50. package/dist/tools/relationship-tools.js.map +1 -0
  51. package/package.json +52 -0
@@ -0,0 +1,411 @@
1
+ /**
2
+ * CML Validation Rules
3
+ */
4
+ export function validateModel(model) {
5
+ const errors = [];
6
+ // Validate context map
7
+ if (model.contextMap) {
8
+ validateContextMap(model, errors);
9
+ }
10
+ // Validate bounded contexts
11
+ for (const bc of model.boundedContexts) {
12
+ validateBoundedContext(bc, errors);
13
+ }
14
+ // Check for duplicate bounded context names
15
+ const bcNames = new Set();
16
+ for (const bc of model.boundedContexts) {
17
+ if (bcNames.has(bc.name)) {
18
+ errors.push({
19
+ type: 'error',
20
+ message: `Duplicate bounded context name: ${bc.name}`,
21
+ location: { element: bc.name },
22
+ });
23
+ }
24
+ bcNames.add(bc.name);
25
+ }
26
+ // Check for duplicate domain object names across bounded contexts
27
+ // This prevents ambiguous type references (e.g., multiple "AgentId" definitions)
28
+ validateNoDuplicateDomainObjectNames(model, errors);
29
+ return {
30
+ valid: errors.filter(e => e.type === 'error').length === 0,
31
+ errors,
32
+ };
33
+ }
34
+ /**
35
+ * Validates that domain object names (Value Objects, Entities, Domain Events, Commands)
36
+ * are unique across all bounded contexts to prevent ambiguous type references.
37
+ *
38
+ * Example of what this prevents:
39
+ * - A2AServer has "AgentId" Value Object
40
+ * - DatabricksPlatform has "AgentId" Value Object
41
+ * - This causes "The reference to the type 'AgentId' is ambiguous" error in CML tools
42
+ *
43
+ * Solution: Use unique prefixed names like "A2AAgentId" and "DatabricksAgentId"
44
+ */
45
+ function validateNoDuplicateDomainObjectNames(model, errors) {
46
+ // Track all domain object names and their locations
47
+ const domainObjectLocations = new Map();
48
+ for (const bc of model.boundedContexts) {
49
+ const allAggregates = [
50
+ ...bc.aggregates,
51
+ ...bc.modules.flatMap(m => m.aggregates),
52
+ ];
53
+ for (const agg of allAggregates) {
54
+ // Check Value Objects (most common source of duplicates like "AgentId")
55
+ for (const vo of agg.valueObjects) {
56
+ const locations = domainObjectLocations.get(vo.name) || [];
57
+ locations.push(`${bc.name}.${agg.name}`);
58
+ domainObjectLocations.set(vo.name, locations);
59
+ }
60
+ // Check Entities
61
+ for (const entity of agg.entities) {
62
+ const locations = domainObjectLocations.get(entity.name) || [];
63
+ locations.push(`${bc.name}.${agg.name}`);
64
+ domainObjectLocations.set(entity.name, locations);
65
+ }
66
+ // Check Domain Events
67
+ for (const event of agg.domainEvents) {
68
+ const locations = domainObjectLocations.get(event.name) || [];
69
+ locations.push(`${bc.name}.${agg.name}`);
70
+ domainObjectLocations.set(event.name, locations);
71
+ }
72
+ // Check Commands
73
+ for (const cmd of agg.commands) {
74
+ const locations = domainObjectLocations.get(cmd.name) || [];
75
+ locations.push(`${bc.name}.${agg.name}`);
76
+ domainObjectLocations.set(cmd.name, locations);
77
+ }
78
+ }
79
+ }
80
+ // Report errors for any duplicate names
81
+ for (const [name, locations] of domainObjectLocations.entries()) {
82
+ if (locations.length > 1) {
83
+ errors.push({
84
+ type: 'error',
85
+ message: `Ambiguous domain object name '${name}' defined in multiple locations: ${locations.join(', ')}. Use unique prefixed names (e.g., 'A2A${name}', 'Databricks${name}') to avoid ambiguous type references.`,
86
+ location: { element: name },
87
+ });
88
+ }
89
+ }
90
+ }
91
+ function validateContextMap(model, errors) {
92
+ const contextMap = model.contextMap;
93
+ const bcNames = new Set(model.boundedContexts.map(bc => bc.name));
94
+ // Check that all referenced contexts exist
95
+ for (const ctxName of contextMap.boundedContexts) {
96
+ if (!bcNames.has(ctxName)) {
97
+ errors.push({
98
+ type: 'error',
99
+ message: `Context map references non-existent bounded context: ${ctxName}`,
100
+ location: { element: ctxName },
101
+ });
102
+ }
103
+ }
104
+ // Validate relationships
105
+ for (const rel of contextMap.relationships) {
106
+ validateRelationship(rel, bcNames, errors);
107
+ }
108
+ }
109
+ function validateRelationship(rel, bcNames, errors) {
110
+ if (rel.type === 'Partnership' || rel.type === 'SharedKernel') {
111
+ const symRel = rel;
112
+ if (!bcNames.has(symRel.participant1)) {
113
+ errors.push({
114
+ type: 'error',
115
+ message: `Relationship references non-existent bounded context: ${symRel.participant1}`,
116
+ location: { element: rel.id },
117
+ });
118
+ }
119
+ if (!bcNames.has(symRel.participant2)) {
120
+ errors.push({
121
+ type: 'error',
122
+ message: `Relationship references non-existent bounded context: ${symRel.participant2}`,
123
+ location: { element: rel.id },
124
+ });
125
+ }
126
+ if (symRel.participant1 === symRel.participant2) {
127
+ errors.push({
128
+ type: 'warning',
129
+ message: `Symmetric relationship between same context: ${symRel.participant1}`,
130
+ location: { element: rel.id },
131
+ });
132
+ }
133
+ }
134
+ else if (rel.type === 'UpstreamDownstream') {
135
+ const udRel = rel;
136
+ if (!bcNames.has(udRel.upstream)) {
137
+ errors.push({
138
+ type: 'error',
139
+ message: `Relationship references non-existent upstream context: ${udRel.upstream}`,
140
+ location: { element: rel.id },
141
+ });
142
+ }
143
+ if (!bcNames.has(udRel.downstream)) {
144
+ errors.push({
145
+ type: 'error',
146
+ message: `Relationship references non-existent downstream context: ${udRel.downstream}`,
147
+ location: { element: rel.id },
148
+ });
149
+ }
150
+ if (udRel.upstream === udRel.downstream) {
151
+ errors.push({
152
+ type: 'error',
153
+ message: `Upstream-downstream relationship cannot be between same context: ${udRel.upstream}`,
154
+ location: { element: rel.id },
155
+ });
156
+ }
157
+ }
158
+ }
159
+ function validateBoundedContext(bc, errors) {
160
+ // Check for empty bounded context
161
+ if (bc.aggregates.length === 0 && bc.modules.length === 0) {
162
+ errors.push({
163
+ type: 'warning',
164
+ message: `Bounded context '${bc.name}' has no aggregates or modules`,
165
+ location: { element: bc.name },
166
+ });
167
+ }
168
+ // Check for duplicate aggregate names within context
169
+ const aggNames = new Set();
170
+ for (const agg of bc.aggregates) {
171
+ if (aggNames.has(agg.name)) {
172
+ errors.push({
173
+ type: 'error',
174
+ message: `Duplicate aggregate name '${agg.name}' in bounded context '${bc.name}'`,
175
+ location: { element: agg.name },
176
+ });
177
+ }
178
+ aggNames.add(agg.name);
179
+ validateAggregate(agg, bc.name, errors);
180
+ }
181
+ // Check modules
182
+ for (const mod of bc.modules) {
183
+ for (const agg of mod.aggregates) {
184
+ if (aggNames.has(agg.name)) {
185
+ errors.push({
186
+ type: 'error',
187
+ message: `Duplicate aggregate name '${agg.name}' in bounded context '${bc.name}'`,
188
+ location: { element: agg.name },
189
+ });
190
+ }
191
+ aggNames.add(agg.name);
192
+ validateAggregate(agg, bc.name, errors);
193
+ }
194
+ }
195
+ }
196
+ function validateAggregate(agg, bcName, errors) {
197
+ // Check for aggregate root
198
+ const roots = agg.entities.filter(e => e.aggregateRoot);
199
+ if (roots.length === 0 && agg.entities.length > 0) {
200
+ errors.push({
201
+ type: 'warning',
202
+ message: `Aggregate '${agg.name}' in '${bcName}' has entities but no aggregate root defined`,
203
+ location: { element: agg.name },
204
+ });
205
+ }
206
+ if (roots.length > 1) {
207
+ errors.push({
208
+ type: 'error',
209
+ message: `Aggregate '${agg.name}' in '${bcName}' has multiple aggregate roots`,
210
+ location: { element: agg.name },
211
+ });
212
+ }
213
+ // Check for duplicate entity names
214
+ const entityNames = new Set();
215
+ for (const entity of agg.entities) {
216
+ if (entityNames.has(entity.name)) {
217
+ errors.push({
218
+ type: 'error',
219
+ message: `Duplicate entity name '${entity.name}' in aggregate '${agg.name}'`,
220
+ location: { element: entity.name },
221
+ });
222
+ }
223
+ entityNames.add(entity.name);
224
+ }
225
+ // Check for duplicate value object names
226
+ const voNames = new Set();
227
+ for (const vo of agg.valueObjects) {
228
+ if (voNames.has(vo.name)) {
229
+ errors.push({
230
+ type: 'error',
231
+ message: `Duplicate value object name '${vo.name}' in aggregate '${agg.name}'`,
232
+ location: { element: vo.name },
233
+ });
234
+ }
235
+ voNames.add(vo.name);
236
+ }
237
+ }
238
+ // Utility function to check if a name is valid CML identifier
239
+ export function isValidIdentifier(name) {
240
+ return /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(name);
241
+ }
242
+ // Utility function to sanitize a name to valid identifier
243
+ export function sanitizeIdentifier(name) {
244
+ // Replace invalid characters with underscores
245
+ let sanitized = name.replace(/[^a-zA-Z0-9_]/g, '_');
246
+ // Ensure it starts with a letter or underscore
247
+ if (/^[0-9]/.test(sanitized)) {
248
+ sanitized = '_' + sanitized;
249
+ }
250
+ return sanitized || '_unnamed';
251
+ }
252
+ // CML reserved keywords that CANNOT be used as domain object names (Entity, ValueObject, etc.)
253
+ // These are different from attribute names - attribute names can be escaped with ^, but
254
+ // domain object names cannot be escaped and will cause syntax errors.
255
+ const RESERVED_DOMAIN_OBJECT_NAMES = new Set([
256
+ // CML structural keywords (case-insensitive check)
257
+ 'aggregate', 'application', 'boundedcontext', 'command', 'consumer', 'context',
258
+ 'domain', 'domainevent', 'entity', 'enum', 'event', 'flow', 'module',
259
+ 'process', 'projection', 'repository', 'resource', 'responsibilities',
260
+ 'saga', 'service', 'subdomain', 'usecase', 'valueobject',
261
+ // Common programming keywords that cause issues
262
+ 'abstract', 'class', 'extends', 'implements', 'import', 'interface',
263
+ 'package', 'private', 'protected', 'public', 'static',
264
+ // Other problematic names
265
+ 'list', 'map', 'set', 'string', 'int', 'boolean', 'void', 'null', 'true', 'false',
266
+ ]);
267
+ /**
268
+ * Checks if a name is a reserved keyword that cannot be used for domain objects.
269
+ * Domain object names (Entity, ValueObject, Aggregate, etc.) cannot be escaped with ^
270
+ * unlike attribute names, so they must be rejected outright.
271
+ */
272
+ export function isReservedDomainObjectName(name) {
273
+ const lowerName = name.toLowerCase();
274
+ if (RESERVED_DOMAIN_OBJECT_NAMES.has(lowerName)) {
275
+ // Generate a helpful suggestion
276
+ const suggestions = {
277
+ 'resource': 'MCPResource, DomainResource, or ResourceDefinition',
278
+ 'entity': 'DomainEntity or a more specific name',
279
+ 'service': 'DomainService or ApplicationService',
280
+ 'event': 'DomainEvent or a more specific event name',
281
+ 'command': 'DomainCommand or a more specific command name',
282
+ 'aggregate': 'AggregateRoot or a more specific name',
283
+ 'repository': 'DataRepository or a more specific name',
284
+ 'module': 'DomainModule or a more specific name',
285
+ 'context': 'DomainContext or a more specific name',
286
+ 'process': 'BusinessProcess or WorkflowProcess',
287
+ 'flow': 'WorkFlow or DataFlow',
288
+ 'projection': 'ReadProjection or QueryProjection',
289
+ };
290
+ return {
291
+ isReserved: true,
292
+ suggestion: suggestions[lowerName] || `${name}Definition, ${name}Model, or a more specific domain name`,
293
+ };
294
+ }
295
+ return { isReserved: false };
296
+ }
297
+ // Valid CML primitive types
298
+ const VALID_PRIMITIVE_TYPES = new Set([
299
+ 'String', 'string',
300
+ 'int', 'Integer',
301
+ 'long', 'Long',
302
+ 'float', 'Float',
303
+ 'double', 'Double',
304
+ 'boolean', 'Boolean',
305
+ 'Date', 'DateTime', 'Timestamp',
306
+ 'Blob', 'Clob',
307
+ 'BigDecimal', 'BigInteger',
308
+ 'byte', 'Byte',
309
+ 'short', 'Short',
310
+ 'char', 'Character',
311
+ 'Object', // Generic object reference
312
+ 'UUID',
313
+ ]);
314
+ // Types that are NOT valid in CML
315
+ const INVALID_TYPE_PATTERNS = [
316
+ { pattern: /^Map\s*</, message: 'Map<K,V> is not supported in CML. Use a Value Object with named fields instead.' },
317
+ { pattern: /^Dictionary\s*</, message: 'Dictionary<K,V> is not supported in CML. Use a Value Object with named fields instead.' },
318
+ { pattern: /^Tuple\s*</, message: 'Tuple is not supported in CML. Use a Value Object with named fields instead.' },
319
+ { pattern: /^Tuple$/, message: 'Tuple is not supported in CML. Use a Value Object with named fields instead.' },
320
+ { pattern: /^Any$/, message: 'Any is not supported in CML. Use a specific type or Object instead.' },
321
+ { pattern: /^any$/, message: 'any is not supported in CML. Use a specific type or Object instead.' },
322
+ { pattern: /^dynamic$/, message: 'dynamic is not supported in CML. Use a specific type or Object instead.' },
323
+ { pattern: /^void$/, message: 'void is not valid for attributes. Remove this attribute or use a specific type.' },
324
+ { pattern: /^Callbacks?$/, message: 'Callback types are not supported in CML. Model the callback contract as a separate Value Object or omit.' },
325
+ { pattern: /^Function\s*</, message: 'Function types are not supported in CML. Model behavior in Services instead.' },
326
+ { pattern: /^Runnable$/, message: 'Runnable is not supported in CML. This is an implementation detail, not a domain concept.' },
327
+ ];
328
+ /**
329
+ * Validates that an attribute type is valid CML syntax.
330
+ * Returns { valid: true } or { valid: false, error: string, suggestion?: string }
331
+ */
332
+ export function validateAttributeType(type) {
333
+ const trimmedType = type.trim();
334
+ // Check for explicitly invalid patterns first
335
+ for (const { pattern, message } of INVALID_TYPE_PATTERNS) {
336
+ if (pattern.test(trimmedType)) {
337
+ return { valid: false, error: message };
338
+ }
339
+ }
340
+ // Check for reference type (- TypeName)
341
+ if (trimmedType.startsWith('- ')) {
342
+ const refType = trimmedType.slice(2).trim();
343
+ if (!isValidIdentifier(refType)) {
344
+ return {
345
+ valid: false,
346
+ error: `Invalid reference type '${refType}'. Reference types must be valid identifiers.`
347
+ };
348
+ }
349
+ return { valid: true };
350
+ }
351
+ // Check for List or Set collections
352
+ const collectionMatch = trimmedType.match(/^(List|Set)\s*<\s*(.+)\s*>$/);
353
+ if (collectionMatch) {
354
+ const innerType = collectionMatch[2].trim();
355
+ // Check for nested generics (not allowed)
356
+ if (innerType.includes('<')) {
357
+ return {
358
+ valid: false,
359
+ error: `Nested generic types like '${trimmedType}' are not supported in CML.`,
360
+ suggestion: 'Use a Value Object to wrap complex nested structures.'
361
+ };
362
+ }
363
+ // Check for invalid inner types
364
+ for (const { pattern, message } of INVALID_TYPE_PATTERNS) {
365
+ if (pattern.test(innerType)) {
366
+ return { valid: false, error: `Invalid collection element type: ${message}` };
367
+ }
368
+ }
369
+ // Inner type should be a valid identifier (either primitive or domain object reference)
370
+ if (!isValidIdentifier(innerType) && !VALID_PRIMITIVE_TYPES.has(innerType)) {
371
+ return {
372
+ valid: false,
373
+ error: `Invalid collection element type '${innerType}'.`,
374
+ suggestion: `Use a valid type like List<String> or List<YourValueObject>.`
375
+ };
376
+ }
377
+ return { valid: true };
378
+ }
379
+ // Check if it's a primitive type
380
+ if (VALID_PRIMITIVE_TYPES.has(trimmedType)) {
381
+ return { valid: true };
382
+ }
383
+ // Check if it's a valid identifier (domain object reference without -)
384
+ if (isValidIdentifier(trimmedType)) {
385
+ return { valid: true };
386
+ }
387
+ // Unknown or invalid type
388
+ return {
389
+ valid: false,
390
+ error: `Invalid type '${trimmedType}'.`,
391
+ suggestion: `Valid types include: String, int, boolean, DateTime, List<Type>, Set<Type>, or domain object names. Use '- TypeName' for explicit references.`
392
+ };
393
+ }
394
+ /**
395
+ * Validates all attributes and returns errors for any invalid types.
396
+ */
397
+ export function validateAttributes(attributes, elementName) {
398
+ const errors = [];
399
+ for (const attr of attributes) {
400
+ const typeValidation = validateAttributeType(attr.type);
401
+ if (!typeValidation.valid) {
402
+ let errorMsg = `Attribute '${attr.name}' in '${elementName}' has invalid type: ${typeValidation.error}`;
403
+ if (typeValidation.suggestion) {
404
+ errorMsg += ` ${typeValidation.suggestion}`;
405
+ }
406
+ errors.push(errorMsg);
407
+ }
408
+ }
409
+ return { valid: errors.length === 0, errors };
410
+ }
411
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/model/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,MAAM,UAAU,aAAa,CAAC,KAAe;IAC3C,MAAM,MAAM,GAAsB,EAAE,CAAC;IAErC,uBAAuB;IACvB,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;QACrB,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,4BAA4B;IAC5B,KAAK,MAAM,EAAE,IAAI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AAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;AAChD,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * CML Writer - Serializes CML model to text format
3
+ */
4
+ import type { CMLModel } from './types.js';
5
+ declare class CMLWriter {
6
+ private indent;
7
+ private lines;
8
+ private escapeIdentifier;
9
+ private write;
10
+ private writeLine;
11
+ private increaseIndent;
12
+ private decreaseIndent;
13
+ serialize(model: CMLModel): string;
14
+ private writeContextMap;
15
+ private writeRelationship;
16
+ private writeBoundedContext;
17
+ private writeModule;
18
+ private writeAggregate;
19
+ private writeEntity;
20
+ private writeValueObject;
21
+ private writeDomainEvent;
22
+ private writeCommand;
23
+ private writeService;
24
+ private writeAttribute;
25
+ private writeOperation;
26
+ private escapeString;
27
+ }
28
+ export declare function serializeCML(model: CMLModel): string;
29
+ export { CMLWriter };
30
+ //# sourceMappingURL=writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../src/model/writer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,QAAQ,EAiBT,MAAM,YAAY,CAAC;AA4BpB,cAAM,SAAS;IACb,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,KAAK,CAAgB;IAG7B,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,cAAc;IAIf,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM;IAmBzC,OAAO,CAAC,eAAe;IAyBvB,OAAO,CAAC,iBAAiB;IAqCzB,OAAO,CAAC,mBAAmB;IAsC3B,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,cAAc;IAgDtB,OAAO,CAAC,WAAW;IA2BnB,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,YAAY;CAGrB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAGpD;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}