paperlint 10.1.1 → 10.3.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 (72) hide show
  1. package/README.md +2 -0
  2. package/dist/adapters/study-registry/index.d.ts +357 -0
  3. package/dist/adapters/study-registry/index.d.ts.map +1 -0
  4. package/dist/adapters/study-registry/index.js +221 -0
  5. package/dist/adapters/study-registry/index.js.map +1 -0
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +42 -2
  8. package/dist/cli.js.map +1 -1
  9. package/dist/domain/repro-layout.d.ts +12 -4
  10. package/dist/domain/repro-layout.d.ts.map +1 -1
  11. package/dist/domain/repro-layout.js +49 -18
  12. package/dist/domain/repro-layout.js.map +1 -1
  13. package/dist/domain/scaffold-layout.d.ts +4 -3
  14. package/dist/domain/scaffold-layout.d.ts.map +1 -1
  15. package/dist/domain/scaffold-layout.js +7 -4
  16. package/dist/domain/scaffold-layout.js.map +1 -1
  17. package/dist/domain/study-registry.d.ts +372 -0
  18. package/dist/domain/study-registry.d.ts.map +1 -0
  19. package/dist/domain/study-registry.js +593 -0
  20. package/dist/domain/study-registry.js.map +1 -0
  21. package/dist/ports/study-registry-codec.d.ts +15 -0
  22. package/dist/ports/study-registry-codec.d.ts.map +1 -0
  23. package/dist/ports/study-registry-codec.js +2 -0
  24. package/dist/ports/study-registry-codec.js.map +1 -0
  25. package/dist/repro-layout-rule.d.ts.map +1 -1
  26. package/dist/repro-layout-rule.js +4 -3
  27. package/dist/repro-layout-rule.js.map +1 -1
  28. package/dist/studies.d.ts +27 -0
  29. package/dist/studies.d.ts.map +1 -0
  30. package/dist/studies.js +163 -0
  31. package/dist/studies.js.map +1 -0
  32. package/dist/study-registry-rule.d.ts +24 -0
  33. package/dist/study-registry-rule.d.ts.map +1 -0
  34. package/dist/study-registry-rule.js +145 -0
  35. package/dist/study-registry-rule.js.map +1 -0
  36. package/docs/design/study-registry.md +246 -0
  37. package/docs/layout.md +51 -46
  38. package/docs/rules/paper/allowed-files-only.md +3 -2
  39. package/docs/rules/repro/allowed-files-only.md +40 -30
  40. package/docs/rules/repro/study-plan-name.md +70 -0
  41. package/docs/rules/repro/study-registered.md +320 -0
  42. package/docs/rules/study/declare-sample.md +1 -1
  43. package/docs/rules.md +53 -51
  44. package/package.json +1 -1
  45. package/skills/build-benchmark/SKILL.md +39 -8
  46. package/skills/build-benchmark/SKILL.md.spec.ts +38 -7
  47. package/skills/build-label-page/SKILL.md +14 -9
  48. package/skills/build-label-page/SKILL.md.spec.ts +13 -8
  49. package/skills/paper-pipeline/references/artifact-checklist.md +2 -1
  50. package/skills/paper-pipeline/references/pipeline-status-template.md +5 -3
  51. package/skills/run-agent-grid/SKILL.md +13 -1
  52. package/skills/run-agent-grid/SKILL.md.spec.ts +12 -0
  53. package/src/adapters/study-registry/index.test.ts +484 -0
  54. package/src/adapters/study-registry/index.ts +328 -0
  55. package/src/cli.ts +53 -2
  56. package/src/domain/paper-layout.test.ts +1 -1
  57. package/src/domain/repro-layout.test.ts +18 -9
  58. package/src/domain/repro-layout.ts +58 -18
  59. package/src/domain/scaffold-layout.ts +7 -4
  60. package/src/domain/study-measurements.test.ts +629 -0
  61. package/src/domain/study-registry.test.ts +666 -0
  62. package/src/domain/study-registry.ts +1044 -0
  63. package/src/folder-layout-hook.test.ts +10 -0
  64. package/src/new-paper.test.ts +29 -2
  65. package/src/ports/study-registry-codec.ts +15 -0
  66. package/src/repro-layout-rule.ts +4 -3
  67. package/src/rule-cases.test.ts +68 -0
  68. package/src/studies-cli.test.ts +113 -0
  69. package/src/studies.test.ts +359 -0
  70. package/src/studies.ts +268 -0
  71. package/src/study-registry-rule.test.ts +456 -0
  72. package/src/study-registry-rule.ts +239 -0
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold-layout.js","sourceRoot":"","sources":["../../src/domain/scaffold-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,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AC,CAAC;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;qFAIqD,SAAS;mBAC3E,QAAQ;CAC1B,CAAC;AAQF;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAA4B;IACrD,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,GAAG,EAA2B,EAAE,CACxD,GAAG,KAAK,SAAS;QACf,CAAC,CAAC;YACE,EAAE,IAAI,EAAE,GAAG,SAAS,IAAI,MAAM,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;YAC1D,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC7B,IAAI,EAAE,GAAG,SAAS,IAAI,CAAC,CAAC,IAAI,IAAI,OAAO,EAAE;gBACzC,IAAI,EAAE,EAAE;aACT,CAAC,CAAC;SACJ;QACH,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAC9C;CACF,CAAC"}
@@ -0,0 +1,372 @@
1
+ import { STUDIES_FILE } from "./repro-layout.ts";
2
+ /** The registry, at the top of the paper's `repro/`; the layout allows it there. */
3
+ export { STUDIES_FILE };
4
+ export declare const STUDY_KINDS: readonly ["measurement", "spike", "tooling", "data", "artifact", "salvage"];
5
+ export type StudyKind = (typeof STUDY_KINDS)[number];
6
+ export declare const STUDY_STATUSES: readonly ["designing", "running", "done", "stopped", "superseded", "dropped"];
7
+ export type StudyStatus = (typeof STUDY_STATUSES)[number];
8
+ /** `registry`: listed in the registry only, not in the paper's text. */
9
+ export declare const IN_PAPER: readonly ["yes", "no", "registry"];
10
+ export type InPaper = (typeof IN_PAPER)[number];
11
+ /** A title is a plain name, not a sentence. */
12
+ export declare const MAX_TITLE_WORDS = 8;
13
+ /** A paper's prefix: a capital letter, then capitals or digits (`P1`). */
14
+ export declare const PREFIX_PATTERN: RegExp;
15
+ /** The kind `paperlint studies new` gives a study when none is named. */
16
+ export declare const DEFAULT_KIND: StudyKind;
17
+ /** The markers around the generated index in `repro/README.md`. Fixed: the rule finds the block by them. */
18
+ export declare const INDEX_BEGIN = "<!-- studies:begin \u2014 generated from studies.json by `paperlint studies index`; do not edit -->";
19
+ export declare const INDEX_END = "<!-- studies:end -->";
20
+ /** What a measurement is to the paper: the claim it carries, or what that claim is compared with. */
21
+ export declare const MEASUREMENT_ROLES: readonly ["headline", "baseline"];
22
+ export type MeasurementRole = (typeof MEASUREMENT_ROLES)[number];
23
+ /**
24
+ * The statuses of a study that has run: its plan was due before the first run. A `designing` study
25
+ * has not run yet, and a `dropped` one never will.
26
+ */
27
+ export declare const RAN_STATUSES: readonly StudyStatus[];
28
+ /** A requirement of the author's on the paper's measurements, in their words. */
29
+ export interface Requirement {
30
+ readonly id: string;
31
+ /** The author's words, verbatim. */
32
+ readonly text: string;
33
+ readonly date: string;
34
+ /** Where they said it: a chat, a message, a review comment. */
35
+ readonly source: string;
36
+ }
37
+ /** Someone's approval, in their words: of a measurement, or of a study's drawn units. */
38
+ export interface Approval {
39
+ readonly by: string;
40
+ readonly date: string;
41
+ readonly quote: string;
42
+ readonly source?: string | undefined;
43
+ }
44
+ /**
45
+ * One measurement: what the paper measures, made of one or more studies (a pilot, the main run, a
46
+ * replication) whose rows name it in `measurement`. A measurement may carry more fields.
47
+ */
48
+ export interface Measurement {
49
+ readonly id: string;
50
+ readonly title: string;
51
+ /** The research question it answers. */
52
+ readonly rq?: string | undefined;
53
+ readonly role: MeasurementRole;
54
+ readonly approval?: Approval | undefined;
55
+ /** The ids of the requirements it must meet. */
56
+ readonly requirements?: readonly string[] | undefined;
57
+ readonly [extra: string]: unknown;
58
+ }
59
+ /**
60
+ * One study. The named fields are the registry's; a row may carry more (a paper merges its own
61
+ * measurement metadata into it), and they are kept as they are.
62
+ */
63
+ export interface Study {
64
+ readonly id: string;
65
+ readonly folder: string;
66
+ readonly title: string;
67
+ readonly question: string;
68
+ readonly kind: StudyKind;
69
+ readonly status: StudyStatus;
70
+ readonly date: string;
71
+ readonly result?: string | undefined;
72
+ readonly result_file?: string | undefined;
73
+ readonly superseded_by?: string | undefined;
74
+ readonly in_paper: InPaper;
75
+ /** The id of the measurement the study belongs to. */
76
+ readonly measurement?: string | undefined;
77
+ /** The study's plan: a path inside its folder, `plan.json`. */
78
+ readonly plan?: string | undefined;
79
+ readonly [extra: string]: unknown;
80
+ }
81
+ export interface StudyRegistry {
82
+ readonly prefix: string;
83
+ /** The paper's author: the one person whose approval makes a measurement the headline. */
84
+ readonly author?: string | undefined;
85
+ readonly requirements?: readonly Requirement[] | undefined;
86
+ /** When present, every row's `measurement` names one of them. */
87
+ readonly measurements?: readonly Measurement[] | undefined;
88
+ readonly studies: readonly Study[];
89
+ }
90
+ /** The file `paperlint studies new` writes a study's plan to, beside its README.md. */
91
+ export declare const PLAN_FILE = "plan.json";
92
+ /** The plan's name before it was a plan: still read as one, and reported by `repro/study-plan-name`. */
93
+ export declare const LEGACY_PLAN_FILE = "prereg.json";
94
+ /** The author's check of a study's drawn units, before the runs. */
95
+ export type AuthorCheck = Omit<Approval, "source">;
96
+ /**
97
+ * A study's plan, fixed before its runs: what it measures, on what population and how it is drawn,
98
+ * its arms, its primary outcome, and the author's check of the drawn units. Closed: a key the paper
99
+ * needs of its own goes in `extra`, so a misspelt key is an error, not a key nobody reads. "Not
100
+ * known" and "not yet" have one spelling each: null.
101
+ */
102
+ export interface StudyPlan {
103
+ readonly question: string;
104
+ readonly population: {
105
+ /** Where the units come from: the census, crawl or registry, with its date. */
106
+ readonly source: string;
107
+ readonly draw: Draw;
108
+ };
109
+ /** The conditions compared, each name once; none for a census. */
110
+ readonly arms: readonly {
111
+ readonly name: string;
112
+ }[];
113
+ readonly primary_outcome: string;
114
+ /** null: the author has not checked the drawn units yet. Only a ready plan carries one. */
115
+ readonly author_check: AuthorCheck | null;
116
+ /** The paper's own keys: hypotheses, models, budget … Kept, never read; none is a plan field. */
117
+ readonly extra?: Readonly<Record<string, unknown>> | undefined;
118
+ }
119
+ /**
120
+ * How the sample is drawn from the population: a seeded draw, whose seed is part of it, or all of
121
+ * the population (a census), which has none. The size of the population is not stored: it is
122
+ * counted from the source, and a stored copy would only contradict it.
123
+ */
124
+ export type Draw = {
125
+ readonly kind: "seeded";
126
+ /** `random`, `stratified` … */
127
+ readonly method: string;
128
+ readonly seed: string | number;
129
+ } | {
130
+ readonly kind: "all";
131
+ /** `census` … */
132
+ readonly method: string;
133
+ };
134
+ /** The top-level fields of a plan: none of them may be a key of `extra`. */
135
+ export declare const PLAN_FIELDS: readonly ["question", "population", "arms", "primary_outcome", "author_check", "extra"];
136
+ /** A plan with empty required texts: the author has not approved it. */
137
+ export type DraftPlan = StudyPlan & {
138
+ readonly author_check: null;
139
+ };
140
+ /** The texts a plan must fill before the study runs, in the order they are named. */
141
+ export declare const PLAN_TEXT_FIELDS: readonly ["question", "population.source", "population.draw.method", "primary_outcome"];
142
+ export type PlanTextField = (typeof PLAN_TEXT_FIELDS)[number];
143
+ /**
144
+ * A plan's text, parsed: ready (every required text filled), a draft (its empty texts named, and
145
+ * no check of the author's: only a complete plan is approved), or the reasons it is not a plan. Whether a plan is complete is decided here, once, by the parser.
146
+ */
147
+ export type ParsedPlan = {
148
+ readonly kind: "ready";
149
+ readonly plan: StudyPlan;
150
+ } | {
151
+ readonly kind: "draft";
152
+ readonly plan: DraftPlan;
153
+ readonly empty: readonly PlanTextField[];
154
+ } | {
155
+ readonly kind: "unreadable";
156
+ readonly why: string;
157
+ };
158
+ /** What a study's folder holds of the plan its row names: absent, or what its text parsed to. */
159
+ export type PlanState = {
160
+ readonly kind: "absent";
161
+ } | ParsedPlan;
162
+ /**
163
+ * The plan `paperlint studies new` writes: every field present, its value to fill. Its draw is of
164
+ * all the population (a census); a sampled study changes it to `{ "kind": "seeded", "method", "seed" }`.
165
+ */
166
+ export declare const planTemplate: () => DraftPlan;
167
+ /** A plan's text as `paperlint studies new` writes it: JSON, two-space indented, a final newline. */
168
+ export declare const planText: (p: StudyPlan) => string;
169
+ /** A registry's text, parsed: the registry, or the one reason it is not one. */
170
+ export type ParsedRegistry = {
171
+ readonly ok: true;
172
+ readonly registry: StudyRegistry;
173
+ } | {
174
+ readonly ok: false;
175
+ readonly why: string;
176
+ };
177
+ /** What the paper's `repro/` holds of a registry. */
178
+ export type RegistryState = {
179
+ readonly kind: "absent";
180
+ } | {
181
+ readonly kind: "unreadable";
182
+ readonly why: string;
183
+ } | {
184
+ readonly kind: "read";
185
+ readonly registry: StudyRegistry;
186
+ };
187
+ /** What the judge reads. */
188
+ export interface StudyInput {
189
+ /** The study folders at the top of `repro/`: every folder but the shared ones and the byproducts. */
190
+ readonly folders: readonly string[];
191
+ readonly registry: RegistryState;
192
+ /** `repro/README.md`'s text; null when there is none. */
193
+ readonly readme: string | null;
194
+ /** Each `<folder>/<result_file>` of the registry that is a file. */
195
+ readonly existingResults: ReadonlySet<string>;
196
+ /** The plan each row names, by `<folder>/<plan>`; one not listed is absent. */
197
+ readonly plans: ReadonlyMap<string, PlanState>;
198
+ }
199
+ /** One defect of the registry, of a row, or of the index. */
200
+ export type StudyFinding = {
201
+ readonly problem: "no-registry";
202
+ readonly folders: readonly string[];
203
+ } | {
204
+ readonly problem: "unreadable";
205
+ readonly why: string;
206
+ } | {
207
+ readonly problem: "unregistered";
208
+ readonly folder: string;
209
+ readonly next: string;
210
+ } | {
211
+ readonly problem: "no-folder";
212
+ readonly id: string;
213
+ readonly folder: string;
214
+ } | {
215
+ readonly problem: "two-rows";
216
+ readonly folder: string;
217
+ readonly ids: readonly string[];
218
+ } | {
219
+ readonly problem: "bad-id";
220
+ readonly id: string;
221
+ readonly prefix: string;
222
+ } | {
223
+ readonly problem: "duplicate-id";
224
+ readonly id: string;
225
+ } | {
226
+ readonly problem: "folder-name";
227
+ readonly id: string;
228
+ readonly folder: string;
229
+ } | {
230
+ readonly problem: "long-title";
231
+ readonly id: string;
232
+ readonly words: number;
233
+ } | {
234
+ readonly problem: "no-result";
235
+ readonly id: string;
236
+ readonly missing: readonly ("result" | "result_file")[];
237
+ } | {
238
+ readonly problem: "result-file";
239
+ readonly id: string;
240
+ readonly path: string;
241
+ readonly why: "missing" | "outside";
242
+ } | {
243
+ readonly problem: "no-successor";
244
+ readonly id: string;
245
+ readonly superseded_by: string | null;
246
+ } | {
247
+ readonly problem: "stale-index";
248
+ readonly why: "no-readme" | "no-markers" | "differs";
249
+ } | {
250
+ readonly problem: "unknown-measurement";
251
+ readonly id: string;
252
+ readonly measurement: string;
253
+ } | {
254
+ readonly problem: "empty-measurement";
255
+ readonly measurement: string;
256
+ } | {
257
+ readonly problem: "unknown-requirement";
258
+ readonly measurement: string;
259
+ readonly requirement: string;
260
+ } | {
261
+ readonly problem: "headline-approval";
262
+ readonly measurement: string;
263
+ readonly why: "missing";
264
+ readonly author: string | null;
265
+ } | {
266
+ readonly problem: "headline-approval";
267
+ readonly measurement: string;
268
+ readonly why: "not-author";
269
+ readonly by: string;
270
+ readonly author: string;
271
+ } | {
272
+ readonly problem: "bad-plan";
273
+ readonly id: string;
274
+ readonly path: string;
275
+ readonly why: "missing" | "outside";
276
+ } | {
277
+ readonly problem: "bad-plan";
278
+ readonly id: string;
279
+ readonly path: string;
280
+ readonly why: "unreadable";
281
+ readonly reasons: string;
282
+ } | {
283
+ readonly problem: "bad-plan";
284
+ readonly id: string;
285
+ readonly path: string;
286
+ readonly why: "unfilled";
287
+ readonly fields: readonly PlanTextField[];
288
+ readonly status: StudyStatus;
289
+ } | {
290
+ readonly problem: "author-check";
291
+ readonly id: string;
292
+ readonly measurement: string;
293
+ readonly status: StudyStatus;
294
+ readonly why: "no-plan" | "missing";
295
+ } | {
296
+ readonly problem: "author-check";
297
+ readonly id: string;
298
+ readonly measurement: string;
299
+ readonly status: StudyStatus;
300
+ readonly why: "not-author";
301
+ readonly by: string;
302
+ readonly author: string;
303
+ } | {
304
+ readonly problem: "legacy-plan";
305
+ readonly id: string;
306
+ readonly path: string;
307
+ };
308
+ /** The findings `repro/study-plan-name` reports, a warning; every other is `repro/study-registered`'s. */
309
+ export declare const PLAN_NAME_PROBLEMS: readonly StudyFinding["problem"][];
310
+ /** The id after the highest one in `r`, at least two digits: `P1-S01` in an empty registry. */
311
+ export declare function nextStudyId(r: StudyRegistry): string;
312
+ /** The slug of a title: lowercase Latin letters and digits, words joined by single hyphens; "" when none. */
313
+ export declare const studySlug: (title: string) => string;
314
+ /** The number of words in a title. */
315
+ export declare const titleWords: (title: string) => number;
316
+ /**
317
+ * The `<folder>/<plan>` of each row whose plan lies inside its folder: the files the judge needs read
318
+ * (`StudyInput.plans`). A plan outside its folder is reported without being read.
319
+ */
320
+ export declare const planKeys: (r: StudyRegistry) => readonly string[];
321
+ /**
322
+ * Every defect of a paper's study registry, in a fixed order: the registry itself; the unregistered
323
+ * folders; each row's; the index. Pure.
324
+ */
325
+ export declare function judgeStudies(input: StudyInput): readonly StudyFinding[];
326
+ /**
327
+ * The index of `r`: a markdown table, a row per study in registry order, each column padded to its
328
+ * widest cell (at least 3), the way prettier writes a table — so formatting the README leaves it as
329
+ * it is.
330
+ */
331
+ export declare function studyIndex(r: StudyRegistry): string;
332
+ /** Whether `readme` holds the index of `r`, whatever padding a formatter gave its table. */
333
+ export declare function indexInSync(readme: string | null, r: StudyRegistry): boolean;
334
+ /** The index between its markers, a blank line on each side. */
335
+ export declare const indexBlock: (r: StudyRegistry) => string;
336
+ /** The text between the markers of `readme`; null when it has no begin marker followed by an end one. */
337
+ export declare function embeddedIndex(readme: string): string | null;
338
+ /**
339
+ * `readme` with its index regenerated from `r`: the block replaced in place, appended when the README
340
+ * has none, a README of its own when there is none.
341
+ */
342
+ export declare function withIndex(readme: string | null, r: StudyRegistry): string;
343
+ /** The registry's text as `paperlint studies new` writes it: JSON, two-space indented, a final newline. */
344
+ export declare const registryText: (r: StudyRegistry) => string;
345
+ /** The one text a finding is reported with: what is wrong, what to do, and the rule's page. */
346
+ export declare const studyMessage: (f: StudyFinding) => string;
347
+ /** Whether `s` names a kind of study. */
348
+ export declare const isStudyKind: (s: string) => s is StudyKind;
349
+ /** What a new study is made from. */
350
+ export interface NewStudy {
351
+ readonly title: string;
352
+ readonly kind: StudyKind;
353
+ /** The day it is registered, `YYYY-MM-DD`. */
354
+ readonly date: string;
355
+ }
356
+ /** A registry with a study added, and the study; or why it could not be. */
357
+ export type Added = {
358
+ readonly ok: true;
359
+ readonly registry: StudyRegistry;
360
+ readonly study: Study;
361
+ } | {
362
+ readonly ok: false;
363
+ readonly why: string;
364
+ };
365
+ /**
366
+ * `r` with a new study appended: the next id, the folder `<id>-<slug>`, `status: designing`,
367
+ * `in_paper: no`, an empty question and its plan, `plan.json`; or why the title cannot make one.
368
+ */
369
+ export declare function addStudy(r: StudyRegistry, n: NewStudy): Added;
370
+ /** The `README.md` a new study's folder starts with: its id and title in frontmatter, then the sections. */
371
+ export declare const studyReadme: (s: Study) => string;
372
+ //# sourceMappingURL=study-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"study-registry.d.ts","sourceRoot":"","sources":["../../src/domain/study-registry.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAc,MAAM,mBAAmB,CAAC;AAE7D,oFAAoF;AACpF,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,eAAO,MAAM,WAAW,6EAOd,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,eAAO,MAAM,cAAc,+EAOjB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,wEAAwE;AACxE,eAAO,MAAM,QAAQ,oCAAqC,CAAC;AAC3D,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhD,+CAA+C;AAC/C,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,0E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