@cat-factory/contracts 0.258.0 → 0.259.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/reports.d.ts +78 -7
- package/dist/reports.d.ts.map +1 -1
- package/dist/reports.js +67 -6
- package/dist/reports.js.map +1 -1
- package/dist/routes/accounts.d.ts +11 -0
- package/dist/routes/accounts.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/reports.d.ts
CHANGED
|
@@ -1,19 +1,54 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* The time window every breakdown aggregates over. `24h`/`7d` are scanned live off the
|
|
4
|
+
* `token_usage` ledger; `30d`/`90d` are served from the DURABLE `spend_days` rollup the
|
|
5
|
+
* retention sweep materialises, which carries each run's board shape frozen at the time the
|
|
6
|
+
* money was spent. Which source answered is carried on the projection
|
|
7
|
+
* ({@link reportSpendSourceSchema}) rather than left to be inferred from the window.
|
|
8
|
+
*/
|
|
3
9
|
export declare const reportWindowSchema: v.PicklistSchema<["24h", "7d", "30d", "90d"], undefined>;
|
|
4
10
|
export type ReportWindow = v.InferOutput<typeof reportWindowSchema>;
|
|
11
|
+
/**
|
|
12
|
+
* Where a window's spend breakdowns and trend came from: a live scan of the `token_usage`
|
|
13
|
+
* ledger (`ledger`) or the durable daily cost-attribution rollup (`daily-rollup`).
|
|
14
|
+
*
|
|
15
|
+
* The two differ in more than cost. The ledger is exact to the millisecond and resolves a
|
|
16
|
+
* repository or a ticket through the LIVE links, so it re-attributes history whenever a
|
|
17
|
+
* service is re-pointed or an issue re-imported, and it forgets everything the retention
|
|
18
|
+
* sweep prunes. The rollup froze that attribution while the spend was happening and keeps it
|
|
19
|
+
* with no retention at all, at the cost of being as fresh as the last sweep. A reader has to
|
|
20
|
+
* know which one is talking, so it is reported rather than derived.
|
|
21
|
+
*/
|
|
22
|
+
export declare const reportSpendSourceSchema: v.PicklistSchema<["ledger", "daily-rollup"], undefined>;
|
|
23
|
+
export type ReportSpendSource = v.InferOutput<typeof reportSpendSourceSchema>;
|
|
24
|
+
/** One UTC day in milliseconds: the grain the durable spend rollup is materialised at. */
|
|
25
|
+
export declare const ROLLUP_DAY_MS: number;
|
|
26
|
+
/**
|
|
27
|
+
* The newest UTC day that is COMPLETE at `atEpochMs` (its midnight, epoch ms): the day
|
|
28
|
+
* before the one `atEpochMs` falls in, and `atEpochMs` itself when that is exactly midnight.
|
|
29
|
+
*
|
|
30
|
+
* Both sides of the wire have to agree about this, which is why it lives here rather than in
|
|
31
|
+
* either of them. The WRITER uses it to stamp `rolledUpThrough`: a sweep firing at noon has
|
|
32
|
+
* folded only part of today, so recording today would present a bucket still accruing as a
|
|
33
|
+
* finished one, and the panel's "complete through <date>" would name a day that is missing up
|
|
34
|
+
* to a day of spend. The READER uses it to judge how far behind the rollup is, and it can only
|
|
35
|
+
* do that against the newest day the sweep COULD have covered by now: measuring against the
|
|
36
|
+
* wall clock instead makes the same healthy rollup read as fresh in the morning and stale by
|
|
37
|
+
* the evening, purely from the time of day the report was opened.
|
|
38
|
+
*/
|
|
39
|
+
export declare function lastCompleteRollupDay(atEpochMs: number): number;
|
|
5
40
|
/**
|
|
6
41
|
* What a SPEND breakdown groups by. `model` keys on the canonical `provider:model`
|
|
7
42
|
* id; `agentKind` on the metered call's agent kind; the rest resolve through the
|
|
8
43
|
* call's run (`workspace` directly, the others via the run's service and block).
|
|
9
44
|
*
|
|
10
|
-
* `repo` and `ticket` are the TCO axes: the
|
|
11
|
-
* budgets against. They key on the run's service repo and on the
|
|
12
|
-
* to the run's block
|
|
13
|
-
*
|
|
14
|
-
* against the database.
|
|
45
|
+
* `run`, `repo` and `ticket` are the TCO axes: the dimensions an organisation actually
|
|
46
|
+
* budgets against. They key on the run itself, on the run's service repo, and on the
|
|
47
|
+
* tracker issue linked to the run's block, so "what did this repository cost us this
|
|
48
|
+
* quarter", "what did this ticket cost" and "what did that pipeline run cost" are one
|
|
49
|
+
* grouped query rather than a hand-written join against the database.
|
|
15
50
|
*/
|
|
16
|
-
export declare const reportSpendDimensionSchema: v.PicklistSchema<["model", "agentKind", "workspace", "service", "repo", "taskType", "ticket"], undefined>;
|
|
51
|
+
export declare const reportSpendDimensionSchema: v.PicklistSchema<["model", "agentKind", "workspace", "service", "repo", "taskType", "ticket", "run"], undefined>;
|
|
17
52
|
export type ReportSpendDimension = v.InferOutput<typeof reportSpendDimensionSchema>;
|
|
18
53
|
/**
|
|
19
54
|
* What an ACTIVITY breakdown groups by. A run carries no single agent kind or model
|
|
@@ -102,6 +137,24 @@ export declare const reportsViewSchema: v.ObjectSchema<{
|
|
|
102
137
|
readonly workspaceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
103
138
|
/** The deployment's spend currency, so the SPA formats costs without a second call. */
|
|
104
139
|
readonly currency: v.StringSchema<undefined>;
|
|
140
|
+
/**
|
|
141
|
+
* Which store answered every SPEND breakdown, the totals and the trend for this window.
|
|
142
|
+
* The activity breakdowns always come off `agent_runs` and are unaffected.
|
|
143
|
+
*/
|
|
144
|
+
readonly source: v.PicklistSchema<["ledger", "daily-rollup"], undefined>;
|
|
145
|
+
/**
|
|
146
|
+
* On a `daily-rollup` window: the newest day (epoch ms, UTC midnight) the rollup SWEEP has
|
|
147
|
+
* covered, or NULL when no pass has ever completed. Always null on a `ledger` window,
|
|
148
|
+
* where there is no rollup in the path to be behind.
|
|
149
|
+
*
|
|
150
|
+
* Null is why the field exists. A rollup that has never run and an account that has spent
|
|
151
|
+
* nothing produce the same empty breakdown, and the operator response to each is the
|
|
152
|
+
* opposite of the other's. It is also how a reader tells a genuinely cheap tail-end of the
|
|
153
|
+
* window from one the sweep has not reached yet, which matters most on the facade whose
|
|
154
|
+
* sweep is a daily cron. The value is the SWEEP's own recorded coverage, deployment-wide,
|
|
155
|
+
* never `max(day)` over the rolled-up rows, which cannot tell either pair apart.
|
|
156
|
+
*/
|
|
157
|
+
readonly rolledUpThrough: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
105
158
|
readonly totals: v.ObjectSchema<{
|
|
106
159
|
readonly inputTokens: v.NumberSchema<undefined>;
|
|
107
160
|
readonly outputTokens: v.NumberSchema<undefined>;
|
|
@@ -208,6 +261,24 @@ export declare const reportsViewSchema: v.ObjectSchema<{
|
|
|
208
261
|
/** Illustrative equivalent-API cost of flat-rate subscription usage. Never real spend. */
|
|
209
262
|
readonly subscriptionCost: v.NumberSchema<undefined>;
|
|
210
263
|
}, undefined>, undefined>;
|
|
264
|
+
/**
|
|
265
|
+
* Spend per agent RUN, keyed by the run id and labelled with the title of the block the
|
|
266
|
+
* run targets (null for a run that carries none, such as a repo bootstrap). The finest
|
|
267
|
+
* TCO axis: what one pipeline execution cost, end to end.
|
|
268
|
+
*/
|
|
269
|
+
readonly byRun: v.ArraySchema<v.ObjectSchema<{
|
|
270
|
+
readonly key: v.StringSchema<undefined>;
|
|
271
|
+
/** Human-readable name for `key` when the store can resolve one (workspace/service); else null. */
|
|
272
|
+
readonly label: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
273
|
+
readonly inputTokens: v.NumberSchema<undefined>;
|
|
274
|
+
readonly outputTokens: v.NumberSchema<undefined>;
|
|
275
|
+
/** Number of metered LLM calls in this slice (both billing kinds). */
|
|
276
|
+
readonly calls: v.NumberSchema<undefined>;
|
|
277
|
+
/** Real per-token cost, in the deployment's spend currency. */
|
|
278
|
+
readonly meteredCost: v.NumberSchema<undefined>;
|
|
279
|
+
/** Illustrative equivalent-API cost of flat-rate subscription usage. Never real spend. */
|
|
280
|
+
readonly subscriptionCost: v.NumberSchema<undefined>;
|
|
281
|
+
}, undefined>, undefined>;
|
|
211
282
|
}, undefined>;
|
|
212
283
|
/** Run activity sliced every way, each busiest-first. */
|
|
213
284
|
readonly activity: v.ObjectSchema<{
|
package/dist/reports.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reports.d.ts","sourceRoot":"","sources":["../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,oDAAoD;;;;YAIpD,wCAAwC;;YAExC,6DAA6D;;YAE7D,qFAAqF;;;;;;YARrF,oDAAoD;;;;YAIpD,wCAAwC;;YAExC,6DAA6D;;YAE7D,qFAAqF;;;;;;YARrF,oDAAoD;;;;YAIpD,wCAAwC;;YAExC,6DAA6D;;YAE7D,qFAAqF;;;;IA0FrF,gDAAgD;;;;YAnFhD,oCAAoC;;;;;;;;;aAwFpC,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
package/dist/reports.js
CHANGED
|
@@ -11,18 +11,54 @@ import * as v from 'valibot';
|
|
|
11
11
|
// scoped and admin-gated like the operator dashboard, with an optional single
|
|
12
12
|
// workspace filter that narrows every breakdown at once.
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The time window every breakdown aggregates over. `24h`/`7d` are scanned live off the
|
|
16
|
+
* `token_usage` ledger; `30d`/`90d` are served from the DURABLE `spend_days` rollup the
|
|
17
|
+
* retention sweep materialises, which carries each run's board shape frozen at the time the
|
|
18
|
+
* money was spent. Which source answered is carried on the projection
|
|
19
|
+
* ({@link reportSpendSourceSchema}) rather than left to be inferred from the window.
|
|
20
|
+
*/
|
|
15
21
|
export const reportWindowSchema = v.picklist(['24h', '7d', '30d', '90d']);
|
|
22
|
+
/**
|
|
23
|
+
* Where a window's spend breakdowns and trend came from: a live scan of the `token_usage`
|
|
24
|
+
* ledger (`ledger`) or the durable daily cost-attribution rollup (`daily-rollup`).
|
|
25
|
+
*
|
|
26
|
+
* The two differ in more than cost. The ledger is exact to the millisecond and resolves a
|
|
27
|
+
* repository or a ticket through the LIVE links, so it re-attributes history whenever a
|
|
28
|
+
* service is re-pointed or an issue re-imported, and it forgets everything the retention
|
|
29
|
+
* sweep prunes. The rollup froze that attribution while the spend was happening and keeps it
|
|
30
|
+
* with no retention at all, at the cost of being as fresh as the last sweep. A reader has to
|
|
31
|
+
* know which one is talking, so it is reported rather than derived.
|
|
32
|
+
*/
|
|
33
|
+
export const reportSpendSourceSchema = v.picklist(['ledger', 'daily-rollup']);
|
|
34
|
+
/** One UTC day in milliseconds: the grain the durable spend rollup is materialised at. */
|
|
35
|
+
export const ROLLUP_DAY_MS = 24 * 60 * 60 * 1000;
|
|
36
|
+
/**
|
|
37
|
+
* The newest UTC day that is COMPLETE at `atEpochMs` (its midnight, epoch ms): the day
|
|
38
|
+
* before the one `atEpochMs` falls in, and `atEpochMs` itself when that is exactly midnight.
|
|
39
|
+
*
|
|
40
|
+
* Both sides of the wire have to agree about this, which is why it lives here rather than in
|
|
41
|
+
* either of them. The WRITER uses it to stamp `rolledUpThrough`: a sweep firing at noon has
|
|
42
|
+
* folded only part of today, so recording today would present a bucket still accruing as a
|
|
43
|
+
* finished one, and the panel's "complete through <date>" would name a day that is missing up
|
|
44
|
+
* to a day of spend. The READER uses it to judge how far behind the rollup is, and it can only
|
|
45
|
+
* do that against the newest day the sweep COULD have covered by now: measuring against the
|
|
46
|
+
* wall clock instead makes the same healthy rollup read as fresh in the morning and stale by
|
|
47
|
+
* the evening, purely from the time of day the report was opened.
|
|
48
|
+
*/
|
|
49
|
+
export function lastCompleteRollupDay(atEpochMs) {
|
|
50
|
+
return Math.floor(atEpochMs / ROLLUP_DAY_MS) * ROLLUP_DAY_MS - ROLLUP_DAY_MS;
|
|
51
|
+
}
|
|
16
52
|
/**
|
|
17
53
|
* What a SPEND breakdown groups by. `model` keys on the canonical `provider:model`
|
|
18
54
|
* id; `agentKind` on the metered call's agent kind; the rest resolve through the
|
|
19
55
|
* call's run (`workspace` directly, the others via the run's service and block).
|
|
20
56
|
*
|
|
21
|
-
* `repo` and `ticket` are the TCO axes: the
|
|
22
|
-
* budgets against. They key on the run's service repo and on the
|
|
23
|
-
* to the run's block
|
|
24
|
-
*
|
|
25
|
-
* against the database.
|
|
57
|
+
* `run`, `repo` and `ticket` are the TCO axes: the dimensions an organisation actually
|
|
58
|
+
* budgets against. They key on the run itself, on the run's service repo, and on the
|
|
59
|
+
* tracker issue linked to the run's block, so "what did this repository cost us this
|
|
60
|
+
* quarter", "what did this ticket cost" and "what did that pipeline run cost" are one
|
|
61
|
+
* grouped query rather than a hand-written join against the database.
|
|
26
62
|
*/
|
|
27
63
|
export const reportSpendDimensionSchema = v.picklist([
|
|
28
64
|
'model',
|
|
@@ -32,6 +68,7 @@ export const reportSpendDimensionSchema = v.picklist([
|
|
|
32
68
|
'repo',
|
|
33
69
|
'taskType',
|
|
34
70
|
'ticket',
|
|
71
|
+
'run',
|
|
35
72
|
]);
|
|
36
73
|
/**
|
|
37
74
|
* What an ACTIVITY breakdown groups by. A run carries no single agent kind or model
|
|
@@ -115,6 +152,24 @@ export const reportsViewSchema = v.object({
|
|
|
115
152
|
workspaceId: v.nullable(v.string()),
|
|
116
153
|
/** The deployment's spend currency, so the SPA formats costs without a second call. */
|
|
117
154
|
currency: v.string(),
|
|
155
|
+
/**
|
|
156
|
+
* Which store answered every SPEND breakdown, the totals and the trend for this window.
|
|
157
|
+
* The activity breakdowns always come off `agent_runs` and are unaffected.
|
|
158
|
+
*/
|
|
159
|
+
source: reportSpendSourceSchema,
|
|
160
|
+
/**
|
|
161
|
+
* On a `daily-rollup` window: the newest day (epoch ms, UTC midnight) the rollup SWEEP has
|
|
162
|
+
* covered, or NULL when no pass has ever completed. Always null on a `ledger` window,
|
|
163
|
+
* where there is no rollup in the path to be behind.
|
|
164
|
+
*
|
|
165
|
+
* Null is why the field exists. A rollup that has never run and an account that has spent
|
|
166
|
+
* nothing produce the same empty breakdown, and the operator response to each is the
|
|
167
|
+
* opposite of the other's. It is also how a reader tells a genuinely cheap tail-end of the
|
|
168
|
+
* window from one the sweep has not reached yet, which matters most on the facade whose
|
|
169
|
+
* sweep is a daily cron. The value is the SWEEP's own recorded coverage, deployment-wide,
|
|
170
|
+
* never `max(day)` over the rolled-up rows, which cannot tell either pair apart.
|
|
171
|
+
*/
|
|
172
|
+
rolledUpThrough: v.nullable(v.number()),
|
|
118
173
|
totals: reportTotalsSchema,
|
|
119
174
|
/** Spend sliced every way, each heaviest-first. */
|
|
120
175
|
spend: v.object({
|
|
@@ -131,6 +186,12 @@ export const reportsViewSchema = v.object({
|
|
|
131
186
|
* otherwise be labelled with one ticket's title beside the other's ref.
|
|
132
187
|
*/
|
|
133
188
|
byTicket: v.array(reportSpendRowSchema),
|
|
189
|
+
/**
|
|
190
|
+
* Spend per agent RUN, keyed by the run id and labelled with the title of the block the
|
|
191
|
+
* run targets (null for a run that carries none, such as a repo bootstrap). The finest
|
|
192
|
+
* TCO axis: what one pipeline execution cost, end to end.
|
|
193
|
+
*/
|
|
194
|
+
byRun: v.array(reportSpendRowSchema),
|
|
134
195
|
}),
|
|
135
196
|
/** Run activity sliced every way, each busiest-first. */
|
|
136
197
|
activity: v.object({
|
package/dist/reports.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../src/reports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,8EAA8E;AAC9E,+EAA+E;AAC/E,kFAAkF;AAClF,kFAAkF;AAClF,8EAA8E;AAC9E,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,yDAAyD;AACzD,8EAA8E;AAE9E
|
|
1
|
+
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../src/reports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,8EAA8E;AAC9E,+EAA+E;AAC/E,kFAAkF;AAClF,kFAAkF;AAClF,8EAA8E;AAC9E,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,yDAAyD;AACzD,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG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jB,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC;QAC7C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC;QAC3C,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC;KAC7C,CAAC;IACF,gDAAgD;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;KACxC,CAAC;CACH,CAAC,CAAA"}
|
|
@@ -1140,6 +1140,8 @@ export declare const getReportsContract: {
|
|
|
1140
1140
|
readonly since: v.NumberSchema<undefined>;
|
|
1141
1141
|
readonly workspaceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1142
1142
|
readonly currency: v.StringSchema<undefined>;
|
|
1143
|
+
readonly source: v.PicklistSchema<["ledger", "daily-rollup"], undefined>;
|
|
1144
|
+
readonly rolledUpThrough: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
1143
1145
|
readonly totals: v.ObjectSchema<{
|
|
1144
1146
|
readonly inputTokens: v.NumberSchema<undefined>;
|
|
1145
1147
|
readonly outputTokens: v.NumberSchema<undefined>;
|
|
@@ -1211,6 +1213,15 @@ export declare const getReportsContract: {
|
|
|
1211
1213
|
readonly meteredCost: v.NumberSchema<undefined>;
|
|
1212
1214
|
readonly subscriptionCost: v.NumberSchema<undefined>;
|
|
1213
1215
|
}, undefined>, undefined>;
|
|
1216
|
+
readonly byRun: v.ArraySchema<v.ObjectSchema<{
|
|
1217
|
+
readonly key: v.StringSchema<undefined>;
|
|
1218
|
+
readonly label: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1219
|
+
readonly inputTokens: v.NumberSchema<undefined>;
|
|
1220
|
+
readonly outputTokens: v.NumberSchema<undefined>;
|
|
1221
|
+
readonly calls: v.NumberSchema<undefined>;
|
|
1222
|
+
readonly meteredCost: v.NumberSchema<undefined>;
|
|
1223
|
+
readonly subscriptionCost: v.NumberSchema<undefined>;
|
|
1224
|
+
}, undefined>, undefined>;
|
|
1214
1225
|
}, undefined>;
|
|
1215
1226
|
readonly activity: v.ObjectSchema<{
|
|
1216
1227
|
readonly byWorkspace: v.ArraySchema<v.ObjectSchema<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/routes/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqC,MAAM,yBAAyB,CAAA;AAC3F,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAgD5B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI/B,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKhC,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhC,CAAA;AAIF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKrC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMnC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMjC,CAAA;AAIF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKlC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMnC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnC,CAAA;AAIF,eAAO,MAAM,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