maxsim-flutter 1.26.0 → 1.27.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/plan/architecture-generator.d.ts +8 -0
- package/dist/plan/architecture-generator.d.ts.map +1 -0
- package/dist/plan/architecture-generator.js +222 -0
- package/dist/plan/architecture-generator.js.map +1 -0
- package/dist/plan/journey-to-stories.d.ts +7 -0
- package/dist/plan/journey-to-stories.d.ts.map +1 -0
- package/dist/plan/journey-to-stories.js +111 -0
- package/dist/plan/journey-to-stories.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProjectContext } from '../core/context.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generates an architecture.md document for the scaffolded Flutter project.
|
|
4
|
+
* Includes tech stack, module overview, ASCII provider tree, navigation flow,
|
|
5
|
+
* and (conditionally) a database schema outline.
|
|
6
|
+
*/
|
|
7
|
+
export declare function generateArchitectureDoc(context: ProjectContext): string;
|
|
8
|
+
//# sourceMappingURL=architecture-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture-generator.d.ts","sourceRoot":"","sources":["../../src/plan/architecture-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAevE"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates an architecture.md document for the scaffolded Flutter project.
|
|
3
|
+
* Includes tech stack, module overview, ASCII provider tree, navigation flow,
|
|
4
|
+
* and (conditionally) a database schema outline.
|
|
5
|
+
*/
|
|
6
|
+
export function generateArchitectureDoc(context) {
|
|
7
|
+
const sections = [
|
|
8
|
+
`# Architecture — ${context.projectName}`,
|
|
9
|
+
'',
|
|
10
|
+
buildTechStackSection(context),
|
|
11
|
+
buildModuleArchitectureSection(context),
|
|
12
|
+
buildProviderTreeSection(context),
|
|
13
|
+
buildNavigationFlowSection(context),
|
|
14
|
+
];
|
|
15
|
+
if (context.modules.database) {
|
|
16
|
+
sections.push(buildDatabaseSchemaSection(context.modules.database));
|
|
17
|
+
}
|
|
18
|
+
return sections.join('\n') + '\n';
|
|
19
|
+
}
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Tech Stack
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
function buildTechStackSection(context) {
|
|
24
|
+
const entries = [
|
|
25
|
+
'| Technology | Purpose | Rationale |',
|
|
26
|
+
'|-----------|---------|-----------|',
|
|
27
|
+
'| Flutter | UI framework | Cross-platform native UI |',
|
|
28
|
+
'| Riverpod | State management | Compile-safe, testable providers |',
|
|
29
|
+
'| go_router | Navigation | Type-safe, declarative routing |',
|
|
30
|
+
'| freezed | Immutable models | Code-gen for value types |',
|
|
31
|
+
'| dio | HTTP client | Interceptor-first, composable |',
|
|
32
|
+
];
|
|
33
|
+
if (context.modules.auth) {
|
|
34
|
+
const { provider } = context.modules.auth;
|
|
35
|
+
if (provider === 'firebase') {
|
|
36
|
+
entries.push('| Firebase Auth | Authentication | BaaS with Flutter SDK |');
|
|
37
|
+
}
|
|
38
|
+
else if (provider === 'supabase') {
|
|
39
|
+
entries.push('| Supabase | Authentication | Open-source BaaS |');
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
entries.push('| Custom Auth | Authentication | Project-specific auth logic |');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (context.modules.database) {
|
|
46
|
+
const { engine } = context.modules.database;
|
|
47
|
+
if (engine === 'drift') {
|
|
48
|
+
entries.push('| Drift | Local database | Type-safe SQLite ORM with code-gen |');
|
|
49
|
+
}
|
|
50
|
+
else if (engine === 'hive') {
|
|
51
|
+
entries.push('| Hive | Local database | Lightweight key-value NoSQL store |');
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
entries.push('| Isar | Local database | High-performance embedded NoSQL |');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (context.modules.push) {
|
|
58
|
+
const { provider } = context.modules.push;
|
|
59
|
+
if (provider === 'firebase') {
|
|
60
|
+
entries.push('| Firebase Cloud Messaging | Push notifications | Cross-platform push via Firebase |');
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
entries.push('| OneSignal | Push notifications | Managed push notification service |');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (context.modules.i18n) {
|
|
67
|
+
entries.push('| flutter_localizations | Internationalisation | ARB-based i18n with gen-l10n |');
|
|
68
|
+
}
|
|
69
|
+
if (context.modules.analytics) {
|
|
70
|
+
entries.push('| Analytics | Event tracking | Screen views and custom events |');
|
|
71
|
+
}
|
|
72
|
+
return ['## Tech Stack', '', ...entries].join('\n');
|
|
73
|
+
}
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
// Module Architecture
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
function buildModuleArchitectureSection(context) {
|
|
78
|
+
const { modules } = context;
|
|
79
|
+
const enabledModules = [];
|
|
80
|
+
if (modules.auth)
|
|
81
|
+
enabledModules.push('auth');
|
|
82
|
+
if (modules.api)
|
|
83
|
+
enabledModules.push('api');
|
|
84
|
+
if (modules.database)
|
|
85
|
+
enabledModules.push('database');
|
|
86
|
+
if (modules.i18n)
|
|
87
|
+
enabledModules.push('i18n');
|
|
88
|
+
if (modules.theme)
|
|
89
|
+
enabledModules.push('theme');
|
|
90
|
+
if (modules.push)
|
|
91
|
+
enabledModules.push('push');
|
|
92
|
+
if (modules.analytics)
|
|
93
|
+
enabledModules.push('analytics');
|
|
94
|
+
if (modules.cicd)
|
|
95
|
+
enabledModules.push('cicd');
|
|
96
|
+
if (modules.deepLinking)
|
|
97
|
+
enabledModules.push('deepLinking');
|
|
98
|
+
const lines = ['## Module Architecture', ''];
|
|
99
|
+
if (enabledModules.length === 0) {
|
|
100
|
+
lines.push('Core-only setup — no optional modules enabled.');
|
|
101
|
+
lines.push('');
|
|
102
|
+
lines.push('Each feature follows Clean Architecture:');
|
|
103
|
+
lines.push('');
|
|
104
|
+
lines.push('```');
|
|
105
|
+
lines.push('lib/features/<feature>/');
|
|
106
|
+
lines.push(' domain/ # entities, repository interfaces, use-cases');
|
|
107
|
+
lines.push(' data/ # repository impls, data sources');
|
|
108
|
+
lines.push(' presentation/ # pages, widgets, providers');
|
|
109
|
+
lines.push('```');
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
lines.push(`Enabled modules: **${enabledModules.join(', ')}**`);
|
|
113
|
+
lines.push('');
|
|
114
|
+
lines.push('Each module lives in `lib/features/<module>/` and follows Clean Architecture:');
|
|
115
|
+
lines.push('');
|
|
116
|
+
lines.push('```');
|
|
117
|
+
lines.push('lib/features/<module>/');
|
|
118
|
+
lines.push(' domain/ # entities, repository interfaces, use-cases');
|
|
119
|
+
lines.push(' data/ # repository impls, data sources');
|
|
120
|
+
lines.push(' presentation/ # pages, widgets, providers');
|
|
121
|
+
lines.push('```');
|
|
122
|
+
}
|
|
123
|
+
lines.push('');
|
|
124
|
+
return lines.join('\n');
|
|
125
|
+
}
|
|
126
|
+
// ---------------------------------------------------------------------------
|
|
127
|
+
// Provider Tree
|
|
128
|
+
// ---------------------------------------------------------------------------
|
|
129
|
+
function buildProviderTreeSection(context) {
|
|
130
|
+
const { modules } = context;
|
|
131
|
+
const lines = ['## Provider Tree', '', '```'];
|
|
132
|
+
lines.push('ProviderScope');
|
|
133
|
+
lines.push('├── routerProvider');
|
|
134
|
+
const providers = [];
|
|
135
|
+
if (modules.auth)
|
|
136
|
+
providers.push('authRepositoryProvider');
|
|
137
|
+
if (modules.api)
|
|
138
|
+
providers.push('dioClientProvider');
|
|
139
|
+
if (modules.database)
|
|
140
|
+
providers.push('databaseProvider');
|
|
141
|
+
if (modules.push)
|
|
142
|
+
providers.push('pushTokenProvider');
|
|
143
|
+
if (modules.analytics)
|
|
144
|
+
providers.push('analyticsServiceProvider');
|
|
145
|
+
if (modules.theme)
|
|
146
|
+
providers.push('appThemeModeProvider');
|
|
147
|
+
if (modules.i18n)
|
|
148
|
+
providers.push('localeProvider');
|
|
149
|
+
for (let i = 0; i < providers.length; i++) {
|
|
150
|
+
const isLast = i === providers.length - 1;
|
|
151
|
+
lines.push(`${isLast ? '└──' : '├──'} ${providers[i]}`);
|
|
152
|
+
}
|
|
153
|
+
lines.push('```');
|
|
154
|
+
lines.push('');
|
|
155
|
+
return lines.join('\n');
|
|
156
|
+
}
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
// Navigation Flow
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
function buildNavigationFlowSection(context) {
|
|
161
|
+
const { modules } = context;
|
|
162
|
+
const lines = ['## Navigation Flow', '', '```'];
|
|
163
|
+
lines.push('/ (HomeRoute)');
|
|
164
|
+
if (modules.auth) {
|
|
165
|
+
lines.push('├── /login (LoginRoute)');
|
|
166
|
+
lines.push('├── /register (RegisterRoute)');
|
|
167
|
+
}
|
|
168
|
+
if (modules.deepLinking) {
|
|
169
|
+
const { scheme, host } = modules.deepLinking;
|
|
170
|
+
const example = scheme && host ? `${scheme}://${host}` : 'app://host';
|
|
171
|
+
lines.push(`└── [deep-link] ${example} → resolved by go_router`);
|
|
172
|
+
}
|
|
173
|
+
lines.push('```');
|
|
174
|
+
lines.push('');
|
|
175
|
+
return lines.join('\n');
|
|
176
|
+
}
|
|
177
|
+
// ---------------------------------------------------------------------------
|
|
178
|
+
// Database Schema
|
|
179
|
+
// ---------------------------------------------------------------------------
|
|
180
|
+
function buildDatabaseSchemaSection(database) {
|
|
181
|
+
const { engine } = database;
|
|
182
|
+
const lines = ['## Database Schema', ''];
|
|
183
|
+
if (engine === 'drift') {
|
|
184
|
+
lines.push('Engine: **Drift** (type-safe SQLite ORM with code generation)');
|
|
185
|
+
lines.push('');
|
|
186
|
+
lines.push('```sql');
|
|
187
|
+
lines.push('-- Example Drift table (add your tables in lib/features/database/)');
|
|
188
|
+
lines.push('CREATE TABLE items (');
|
|
189
|
+
lines.push(' id INTEGER PRIMARY KEY AUTOINCREMENT,');
|
|
190
|
+
lines.push(' name TEXT NOT NULL,');
|
|
191
|
+
lines.push(' created_at INTEGER NOT NULL');
|
|
192
|
+
lines.push(');');
|
|
193
|
+
lines.push('```');
|
|
194
|
+
}
|
|
195
|
+
else if (engine === 'hive') {
|
|
196
|
+
lines.push('Engine: **Hive** (lightweight key-value NoSQL)');
|
|
197
|
+
lines.push('');
|
|
198
|
+
lines.push('```dart');
|
|
199
|
+
lines.push('// Example Hive box (define adapters in lib/features/database/)');
|
|
200
|
+
lines.push('@HiveType(typeId: 0)');
|
|
201
|
+
lines.push('class ItemModel extends HiveObject {');
|
|
202
|
+
lines.push(' @HiveField(0)');
|
|
203
|
+
lines.push(' late String name;');
|
|
204
|
+
lines.push('}');
|
|
205
|
+
lines.push('```');
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
lines.push('Engine: **Isar** (high-performance embedded NoSQL)');
|
|
209
|
+
lines.push('');
|
|
210
|
+
lines.push('```dart');
|
|
211
|
+
lines.push('// Example Isar collection (define in lib/features/database/)');
|
|
212
|
+
lines.push('@collection');
|
|
213
|
+
lines.push('class Item {');
|
|
214
|
+
lines.push(' Id id = Isar.autoIncrement;');
|
|
215
|
+
lines.push(' late String name;');
|
|
216
|
+
lines.push('}');
|
|
217
|
+
lines.push('```');
|
|
218
|
+
}
|
|
219
|
+
lines.push('');
|
|
220
|
+
return lines.join('\n');
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=architecture-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture-generator.js","sourceRoot":"","sources":["../../src/plan/architecture-generator.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAuB;IAC7D,MAAM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* Generates a prompt/template for decomposing user journeys into PRD stories.
|
|
3
|
+
* This prompt is embedded in the plan-app skill to instruct Claude on how
|
|
4
|
+
* to break each user journey into domain → data → presentation → tests layers.
|
|
5
|
+
*/
|
|
6
|
+
export declare function generateJourneyDecompositionPrompt(journeys: string[]): string;
|
|
7
|
+
//# sourceMappingURL=journey-to-stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-to-stories.d.ts","sourceRoot":"","sources":["../../src/plan/journey-to-stories.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CA0G7E"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates a prompt/template for decomposing user journeys into PRD stories.
|
|
3
|
+
* This prompt is embedded in the plan-app skill to instruct Claude on how
|
|
4
|
+
* to break each user journey into domain → data → presentation → tests layers.
|
|
5
|
+
*/
|
|
6
|
+
export function generateJourneyDecompositionPrompt(journeys) {
|
|
7
|
+
const journeyList = journeys.length > 0
|
|
8
|
+
? journeys.map((j, i) => `${i + 1}. ${j}`).join('\n')
|
|
9
|
+
: '_No journeys provided. Identify user journeys from the project brief first._';
|
|
10
|
+
return [
|
|
11
|
+
'# Journey-to-Stories Decomposition',
|
|
12
|
+
'',
|
|
13
|
+
'Decompose each user journey into PRD stories following Clean Architecture layers.',
|
|
14
|
+
'',
|
|
15
|
+
'## User Journeys to Decompose',
|
|
16
|
+
'',
|
|
17
|
+
journeyList,
|
|
18
|
+
'',
|
|
19
|
+
'## Decomposition Rules',
|
|
20
|
+
'',
|
|
21
|
+
'For each journey, create 2-4 stories following this layer order:',
|
|
22
|
+
'',
|
|
23
|
+
'1. **Domain story** — entities, repository interfaces, use cases (no dependencies)',
|
|
24
|
+
'2. **Data story** — models, data sources, repository implementations (depends on domain story)',
|
|
25
|
+
'3. **Presentation story** — providers, pages, widgets (depends on domain story)',
|
|
26
|
+
'4. **Tests story** (optional) — integration and widget tests for the full feature',
|
|
27
|
+
'',
|
|
28
|
+
'### Dependency Chain',
|
|
29
|
+
'',
|
|
30
|
+
'Always maintain this dependency ordering:',
|
|
31
|
+
'',
|
|
32
|
+
'```',
|
|
33
|
+
'domain ← data ← presentation ← tests',
|
|
34
|
+
'```',
|
|
35
|
+
'',
|
|
36
|
+
'- Domain story has no dependencies',
|
|
37
|
+
'- Data story depends on domain story',
|
|
38
|
+
'- Presentation story depends on domain story',
|
|
39
|
+
'- Tests story depends on presentation story (and implicitly all others)',
|
|
40
|
+
'',
|
|
41
|
+
'## Story Format',
|
|
42
|
+
'',
|
|
43
|
+
'Each story must follow this structure:',
|
|
44
|
+
'',
|
|
45
|
+
'```json',
|
|
46
|
+
'{',
|
|
47
|
+
' "phase": <number>,',
|
|
48
|
+
' "priority": "P0" | "P1" | "P2",',
|
|
49
|
+
' "title": "<imperative verb> <domain concept>",',
|
|
50
|
+
' "description": "<detailed implementation requirements>",',
|
|
51
|
+
' "layer": "domain" | "data" | "presentation" | "tests",',
|
|
52
|
+
' "storyPoints": <Fibonacci: 1, 2, 3, 5, 8>,',
|
|
53
|
+
' "dependencies": ["<story-id>"],',
|
|
54
|
+
' "acceptanceCriteria": [',
|
|
55
|
+
' {',
|
|
56
|
+
' "description": "<human-readable criterion>",',
|
|
57
|
+
' "predicate": "<machine-checkable assertion>"',
|
|
58
|
+
' }',
|
|
59
|
+
' ]',
|
|
60
|
+
'}',
|
|
61
|
+
'```',
|
|
62
|
+
'',
|
|
63
|
+
'## Acceptance Criteria Requirements',
|
|
64
|
+
'',
|
|
65
|
+
'- Each story must have >= 3 acceptance criteria',
|
|
66
|
+
'- Every criterion must include a `predicate` field (machine-checkable assertion)',
|
|
67
|
+
'- Predicates must be specific and testable (e.g., "authState is AuthStateAuthenticated")',
|
|
68
|
+
'- Predicates use present tense: "UserEntity has id, email, name fields"',
|
|
69
|
+
'',
|
|
70
|
+
'## Story Points (Fibonacci)',
|
|
71
|
+
'',
|
|
72
|
+
'| Layer | Typical Points |',
|
|
73
|
+
'|-------|---------------|',
|
|
74
|
+
'| Domain | 2-3 |',
|
|
75
|
+
'| Data | 3-5 |',
|
|
76
|
+
'| Presentation | 3-8 |',
|
|
77
|
+
'| Tests | 1-3 |',
|
|
78
|
+
'',
|
|
79
|
+
'Valid values: 1, 2, 3, 5, 8 (Fibonacci sequence only)',
|
|
80
|
+
'',
|
|
81
|
+
'## Example Output',
|
|
82
|
+
'',
|
|
83
|
+
'For journey "User signs up and logs in":',
|
|
84
|
+
'',
|
|
85
|
+
'1. **Domain** (3pts): Define Auth entities and repository interface',
|
|
86
|
+
' - `AuthRepository` abstract class with `signUp`, `signIn`, `signOut`',
|
|
87
|
+
' - `User` entity with freezed',
|
|
88
|
+
' - No dependencies',
|
|
89
|
+
'',
|
|
90
|
+
'2. **Data** (5pts): Implement auth data source and repository',
|
|
91
|
+
' - `AuthDataSourceImpl` connecting to backend',
|
|
92
|
+
' - `AuthRepositoryImpl` implementing domain interface',
|
|
93
|
+
' - Depends on domain story',
|
|
94
|
+
'',
|
|
95
|
+
'3. **Presentation** (5pts): Build login and register screens',
|
|
96
|
+
' - `LoginPage` and `RegisterPage` with ConsumerWidget',
|
|
97
|
+
' - `authNotifierProvider` with AsyncNotifier',
|
|
98
|
+
' - Depends on domain story',
|
|
99
|
+
'',
|
|
100
|
+
'4. **Tests** (2pts): Integration tests for auth flows',
|
|
101
|
+
' - Happy path sign-up and login flow',
|
|
102
|
+
' - Depends on presentation story',
|
|
103
|
+
'',
|
|
104
|
+
'## Output',
|
|
105
|
+
'',
|
|
106
|
+
'Return a JSON array of story objects for all journeys.',
|
|
107
|
+
'Maintain dependency ordering within each journey\'s stories.',
|
|
108
|
+
'Ensure every story ID is unique and referenced correctly in dependencies.',
|
|
109
|
+
].join('\n');
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=journey-to-stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-to-stories.js","sourceRoot":"","sources":["../../src/plan/journey-to-stories.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,kCAAkC,CAAC,QAAkB;IACnE,MAAM,WAAW,GACf,QAAQ,CAAC,MAAM,GAAG,CAAC;QACjB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACrD,CAAC,CAAC,8EAA8E,CAAC;IAErF,OAAO;QACL,oCAAoC;QACpC,EAAE;QACF,mFAAmF;QACnF,EAAE;QACF,+BAA+B;QAC/B,EAAE;QACF,WAAW;QACX,EAAE;QACF,wBAAwB;QACxB,EAAE;QACF,kEAAkE;QAClE,EAAE;QACF,oFAAoF;QACpF,gGAAgG;QAChG,iFAAiF;QACjF,mFAAmF;QACnF,EAAE;QACF,sBAAsB;QACtB,EAAE;QACF,2CAA2C;QAC3C,EAAE;QACF,KAAK;QACL,sCAAsC;QACtC,KAAK;QACL,EAAE;QACF,oCAAoC;QACpC,sCAAsC;QACtC,8CAA8C;QAC9C,yEAAyE;QACzE,EAAE;QACF,iBAAiB;QACjB,EAAE;QACF,wCAAwC;QACxC,EAAE;QACF,SAAS;QACT,GAAG;QACH,sBAAsB;QACtB,mCAAmC;QACnC,kDAAkD;QAClD,4DAA4D;QAC5D,0DAA0D;QAC1D,8CAA8C;QAC9C,mCAAmC;QACnC,2BAA2B;QAC3B,OAAO;QACP,oDAAoD;QACpD,oDAAoD;QACpD,OAAO;QACP,KAAK;QACL,GAAG;QACH,KAAK;QACL,EAAE;QACF,qCAAqC;QACrC,EAAE;QACF,iDAAiD;QACjD,kFAAkF;QAClF,0FAA0F;QAC1F,yEAAyE;QACzE,EAAE;QACF,6BAA6B;QAC7B,EAAE;QACF,4BAA4B;QAC5B,2BAA2B;QAC3B,kBAAkB;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