@miller-tech/uap 1.172.15 → 1.173.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/.tsbuildinfo +1 -1
- package/dist/delivery/agentic-executor.d.ts.map +1 -1
- package/dist/delivery/agentic-executor.js +52 -0
- package/dist/delivery/agentic-executor.js.map +1 -1
- package/dist/delivery/applier.d.ts.map +1 -1
- package/dist/delivery/applier.js +53 -0
- package/dist/delivery/applier.js.map +1 -1
- package/dist/delivery/contract-extractor.d.ts +16 -0
- package/dist/delivery/contract-extractor.d.ts.map +1 -1
- package/dist/delivery/contract-extractor.js +136 -3
- package/dist/delivery/contract-extractor.js.map +1 -1
- package/dist/delivery/mission-acceptance.d.ts.map +1 -1
- package/dist/delivery/mission-acceptance.js +48 -3
- package/dist/delivery/mission-acceptance.js.map +1 -1
- package/dist/delivery/stub-detector.d.ts +150 -0
- package/dist/delivery/stub-detector.d.ts.map +1 -0
- package/dist/delivery/stub-detector.js +474 -0
- package/dist/delivery/stub-detector.js.map +1 -0
- package/dist/delivery/visual-gate.d.ts +58 -0
- package/dist/delivery/visual-gate.d.ts.map +1 -1
- package/dist/delivery/visual-gate.js +87 -3
- package/dist/delivery/visual-gate.js.map +1 -1
- package/package.json +1 -1
- package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/deliver_autoroute.cpython-312.pyc +0 -0
- package/tools/agents/scripts/__pycache__/toolcall_path_normalizer.cpython-312.pyc +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-extractor.js","sourceRoot":"","sources":["../../src/delivery/contract-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"contract-extractor.js","sourceRoot":"","sources":["../../src/delivery/contract-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,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AAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC;IAC3E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mission-acceptance.d.ts","sourceRoot":"","sources":["../../src/delivery/mission-acceptance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EACL,iBAAiB,EAEjB,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"mission-acceptance.d.ts","sourceRoot":"","sources":["../../src/delivery/mission-acceptance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EACL,iBAAiB,EAEjB,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAyC,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,CAAC,EAAE,gBAAgB,EACnB,iBAAiB,EAAE,OAAO,GACzB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAavD;AAED,MAAM,WAAW,qBAAqB;IACpC,yEAAyE;IACzE,OAAO,EAAE,OAAO,CAAC;IACjB,oEAAoE;IACpE,KAAK,EAAE,YAAY,CAAC;IACpB,oDAAoD;IACpD,aAAa,EAAE,YAAY,CAAC;IAC5B;8EAC0E;IAC1E,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,8CAA8C;IAC9C,aAAa,CAAC,EAAE,OAAO,gBAAgB,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,aAAa,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,kBAAkB,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,wBAAwB,CAAC;IAC/C,KAAK,CAAC,EAAE,OAAO,iBAAiB,CAAC;IACjC,aAAa,CAAC,EAAE,OAAO,kBAAkB,CAAC;CAC3C;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA2BxB;AAED,iFAAiF;AACjF,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,qBAAqB,GAAG,cAAc,CA6KtF"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import { runAcceptanceGate, formatAcceptanceReport, } from './acceptance-judge.js';
|
|
20
20
|
import { runExecutionGate } from './execution-gate.js';
|
|
21
|
-
import { runVisualGate, visualRuntimeNote } from './visual-gate.js';
|
|
21
|
+
import { runVisualGate, visualRuntimeNote, structuralFeedback } from './visual-gate.js';
|
|
22
22
|
import { runInteractionGate } from './interaction-gate.js';
|
|
23
23
|
import { resolveFidelity } from './fidelity.js';
|
|
24
24
|
import { buildUserPathsNote } from './user-validation.js';
|
|
@@ -164,8 +164,21 @@ export function buildMissionAcceptanceGate(deps) {
|
|
|
164
164
|
// judge evidence (a code-evidence judge cannot see a never-started
|
|
165
165
|
// animation; this can).
|
|
166
166
|
const visual = await visualGate(root);
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
// STRUCTURAL findings block in EVERY mode. Previously a visual failure
|
|
168
|
+
// was blocking only in primary mode, so in secondary mode a page that
|
|
169
|
+
// threw or painted nothing was demoted to a note for the text judge —
|
|
170
|
+
// "the code loads and the suite is green" was then sufficient to be
|
|
171
|
+
// accepted. That is the exact gap the stub-write class exploits: a
|
|
172
|
+
// skeleton loads cleanly. Graded richness floors stay mode-dependent
|
|
173
|
+
// (a scaffold epic may legitimately render sparsely); binary facts
|
|
174
|
+
// about the page do not.
|
|
175
|
+
// `!passed` is required alongside `structural`: it is what makes the
|
|
176
|
+
// non-final-epic allowance apply here too (a compliant SCAFFOLD epic's
|
|
177
|
+
// throw-TODO bodies are uncaught errors, and downgrading to passed is
|
|
178
|
+
// how that stays satisfiable), and it keeps a "renders clean" verdict
|
|
179
|
+
// from ever being returned as a blocking failure.
|
|
180
|
+
if (!visual.skipped && !visual.passed && (deps.primary || visual.structural)) {
|
|
181
|
+
return { passed: false, feedback: structuralFeedback(visual) };
|
|
169
182
|
}
|
|
170
183
|
visualNote = visualRuntimeNote(visual);
|
|
171
184
|
// Fidelity-max: the loop must converge against the SAME aesthetic bar
|
|
@@ -183,6 +196,38 @@ export function buildMissionAcceptanceGate(deps) {
|
|
|
183
196
|
}
|
|
184
197
|
}
|
|
185
198
|
}
|
|
199
|
+
else {
|
|
200
|
+
// SECONDARY mode, ordinary fidelity: none of the observation gates above
|
|
201
|
+
// ran at all, so acceptance rested on the objective gates plus a
|
|
202
|
+
// code-reading judge. "It builds, the suite is green, the page loads" was
|
|
203
|
+
// therefore sufficient — and that is exactly what a skeleton satisfies: a
|
|
204
|
+
// stub compiles, imports, and loads without complaint.
|
|
205
|
+
//
|
|
206
|
+
// Observe the running artifact here too, and block on STRUCTURAL findings
|
|
207
|
+
// only (see structuralProblems): a page that threw, never loaded, lost a
|
|
208
|
+
// dependency, or demands a canvas that does not exist. The graded richness
|
|
209
|
+
// floors stay advisory in this mode — a sparse canvas has legitimate
|
|
210
|
+
// explanations mid-build and hard-failing it re-creates the
|
|
211
|
+
// unsatisfiable-gate class the epic controller already solved for.
|
|
212
|
+
//
|
|
213
|
+
// The observation also becomes judge evidence, which the note further down
|
|
214
|
+
// has always claimed to do in BOTH modes ("discarding it in secondary mode
|
|
215
|
+
// meant paying for a headless browser pass and then throwing the result
|
|
216
|
+
// away") but could not, because visualNote was only ever assigned inside
|
|
217
|
+
// the branch above. It costs one browser pass per acceptance turn, and
|
|
218
|
+
// self-skips on projects with no entry pages.
|
|
219
|
+
//
|
|
220
|
+
// The interaction gate is deliberately NOT promoted here: its verdicts have
|
|
221
|
+
// a live history of false positives, and adding a second browser pass to
|
|
222
|
+
// every turn is not worth importing that risk. It stays primary/max-gated.
|
|
223
|
+
const visual = await visualGate(root);
|
|
224
|
+
if (!visual.skipped) {
|
|
225
|
+
if (!visual.passed && visual.structural) {
|
|
226
|
+
return { passed: false, feedback: structuralFeedback(visual) };
|
|
227
|
+
}
|
|
228
|
+
visualNote = visualRuntimeNote(visual);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
186
231
|
const resolvedSpec = deps.specs.resolve(root);
|
|
187
232
|
const uvNote = userPathsNote(root);
|
|
188
233
|
// The secondary-mode note asserts the objective gates passed. That was safe
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mission-acceptance.js","sourceRoot":"","sources":["../../src/delivery/mission-acceptance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EACL,iBAAiB,EACjB,sBAAsB,GAEvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
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ation.
|
|
3
|
+
*
|
|
4
|
+
* The existing P3 anti-gutting guard (agentic-executor) compares BYTE SIZES and
|
|
5
|
+
* only fires when the target already exists. That leaves the failure actually
|
|
6
|
+
* observed wide open: a weak model writing brand-new files as stubs. From a real
|
|
7
|
+
* run (octopus_invaders_v3, 2026-07-30) — SEVEN modules written straight to disk
|
|
8
|
+
* as skeletons, then re-read by the model and used as the house style for more of
|
|
9
|
+
* them. A first write has nothing to shrink from, and a stub→stub rewrite is no
|
|
10
|
+
* shrink, so neither tripped the size guard. Nor do the run gates catch it: a
|
|
11
|
+
* stub LOADS cleanly, which is exactly why execution-gate.ts documents the
|
|
12
|
+
* "frozen game" class it could not detect.
|
|
13
|
+
*
|
|
14
|
+
* WHY EMPTY BODIES, NOT THE WORD "STUB"
|
|
15
|
+
* The header said "— Stub" in every one of those files, which is trivially
|
|
16
|
+
* greppable — and equally trivially omitted by the next model. The durable
|
|
17
|
+
* signal is semantic: a module that declares a full API surface and implements
|
|
18
|
+
* none of it.
|
|
19
|
+
*
|
|
20
|
+
* WHAT COUNTS AS A CALLABLE (and why this is not one regex)
|
|
21
|
+
* The ratio is only meaningful if the denominator is right, and the first cut of
|
|
22
|
+
* this file got it wrong in three ways that review caught, each of which biased
|
|
23
|
+
* toward refusing REAL code:
|
|
24
|
+
*
|
|
25
|
+
* - `if (…) {`, `while (…) {`, `catch (e) {` all match "identifier, parens,
|
|
26
|
+
* brace", so control flow was counted as API surface. A defensive module of
|
|
27
|
+
* three real functions wrapped in three ignore-catches scored 50% empty.
|
|
28
|
+
* - a `}` inside a comment or string terminated the brace scan early, so real
|
|
29
|
+
* bodies were measured as empty ("// clamp to } of the arena" emptied its
|
|
30
|
+
* function).
|
|
31
|
+
* - `export const init = () => {}` matched NOTHING, because every alternative
|
|
32
|
+
* required a word character or `)` before the paren. The dominant modern stub
|
|
33
|
+
* idiom scored zero callables and sailed through — and it is the first shape
|
|
34
|
+
* a model reaches for after one refusal.
|
|
35
|
+
*
|
|
36
|
+
* So: strip comments and string literals first (length-preserving, to keep
|
|
37
|
+
* indices valid), then find bodies by scanning BACKWARD from each `{` to decide
|
|
38
|
+
* whether it opens a callable. That handles return-type annotations, generics,
|
|
39
|
+
* and nested parens in parameter lists, none of which a `[^()]*` regex can.
|
|
40
|
+
*
|
|
41
|
+
* MEASURED POPULATIONS (all figures produced BY this implementation, not recalled
|
|
42
|
+
* from an earlier one — the first draft of this header cited numbers from a
|
|
43
|
+
* scanner that counted `if` blocks as callables, and they no longer reproduced)
|
|
44
|
+
*
|
|
45
|
+
* the 7 live stubs 4–10 callables, 75–90% empty, ~300–390 bytes each
|
|
46
|
+
* config.js (real, same directory, same run) 10 callables, 0% empty, 7.0 KB
|
|
47
|
+
* this repo, every .ts under src/ 324 files, 0 flagged
|
|
48
|
+
* worst real file anywhere here execution-gate.ts, 50% empty / 72 callables
|
|
49
|
+
*
|
|
50
|
+
* The gap between "worst real file" and the unlabelled bar is what the thresholds
|
|
51
|
+
* actually rest on, so a negative-control test re-derives it on every run instead
|
|
52
|
+
* of trusting this comment.
|
|
53
|
+
*/
|
|
54
|
+
export interface StubVerdict {
|
|
55
|
+
isStub: boolean;
|
|
56
|
+
/** Human-facing explanation, used verbatim in the refusal. */
|
|
57
|
+
reason: string;
|
|
58
|
+
callables: number;
|
|
59
|
+
emptyRatio: number;
|
|
60
|
+
marker: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Blank out comments and string/template literals, replacing their contents with
|
|
64
|
+
* spaces so every index in the result still lines up with the input.
|
|
65
|
+
*
|
|
66
|
+
* Needed because the brace scan and the signature scan both count raw
|
|
67
|
+
* punctuation, and a `}` or `(` inside a comment or a string is not code. The
|
|
68
|
+
* length-preserving choice matters: bodies are sliced by index afterwards.
|
|
69
|
+
*/
|
|
70
|
+
export declare function stripNonCode(src: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* Bodies of function-like constructs, brace-matched over stripped source.
|
|
73
|
+
*
|
|
74
|
+
* A regex cannot do this: `\{[^{}]*\}` only ever matches innermost braces, so a
|
|
75
|
+
* real file full of nested logic reports a handful of callables and the ratio
|
|
76
|
+
* becomes meaningless (measured during design — the naive version found 1–2
|
|
77
|
+
* callables in 1000-line modules).
|
|
78
|
+
*/
|
|
79
|
+
export declare function extractFunctionBodies(src: string): string[];
|
|
80
|
+
/**
|
|
81
|
+
* Is a body empty of executable content? Comments do not count as substance.
|
|
82
|
+
*
|
|
83
|
+
* `return true` / `return 0` were originally counted as empty too. They are not:
|
|
84
|
+
* `canShoot() { return true; }` is an ordinary predicate, and treating it as a
|
|
85
|
+
* stub put a real module three points from a false refusal — and, because
|
|
86
|
+
* contract-extractor reuses this predicate, annotated real exports as "declared
|
|
87
|
+
* but NOT implemented" in the text handed to dependent epics. Only genuinely
|
|
88
|
+
* vacuous returns count.
|
|
89
|
+
*/
|
|
90
|
+
export declare function isEmptyBody(body: string): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Decide whether `content` is a stub for `path`.
|
|
93
|
+
*
|
|
94
|
+
* Thresholds are set from the measured populations, biased toward letting things
|
|
95
|
+
* through: a false refusal blocks legitimate work and trains the operator to set
|
|
96
|
+
* the override, which costs more than an occasional miss.
|
|
97
|
+
*
|
|
98
|
+
* - ≥6 callables and ≥60% empty → stub, no label needed.
|
|
99
|
+
* - ≥3 callables and ≥45% empty AND a self-label → stub.
|
|
100
|
+
*
|
|
101
|
+
* The two bars differ because a self-label is strong evidence and should lower
|
|
102
|
+
* the ratio required, not merely the surface size. Replaying the real corpus
|
|
103
|
+
* caught this: background.js is unambiguously a stub ("Background Module —
|
|
104
|
+
* Stub") but sits at 50% empty, so a single 60% bar let it through — 6 of 7
|
|
105
|
+
* blocked, a miss on a file the guard exists for.
|
|
106
|
+
*
|
|
107
|
+
* A file with one or two empty bodies is never flagged, on either bar: no-op
|
|
108
|
+
* defaults and intentional no-op handlers are ordinary, and there is no evidence
|
|
109
|
+
* to separate them from a stub at that size. That promise is what the labelled
|
|
110
|
+
* bar's `empties >= 3` floor keeps — with only `ratio >= 0.45`, a 3-body file
|
|
111
|
+
* with 2 empties and a "TODO: implement" header would have been refused.
|
|
112
|
+
*
|
|
113
|
+
* NOT flagged, by design: `throw new Error("TODO")` / `todo!()` /
|
|
114
|
+
* `raise NotImplementedError` bodies. Those are what a SCAFFOLD epic is
|
|
115
|
+
* explicitly instructed to produce (epic-mission.ts), and they are honest —
|
|
116
|
+
* they announce themselves at runtime instead of silently succeeding, which is
|
|
117
|
+
* the whole problem with `{}`.
|
|
118
|
+
*/
|
|
119
|
+
export declare function detectStub(path: string, content: string, prior?: string): StubVerdict;
|
|
120
|
+
/**
|
|
121
|
+
* The refusal text handed back to the model.
|
|
122
|
+
*
|
|
123
|
+
* Says what to do instead, because a bare refusal on the agentic path produces a
|
|
124
|
+
* retry of the identical content — the same reason the P3 guard spells out
|
|
125
|
+
* edit_file. Names the override so a human reading the transcript can unblock a
|
|
126
|
+
* legitimate case without reading this source.
|
|
127
|
+
*/
|
|
128
|
+
export declare function stubRefusal(path: string, verdict: StubVerdict): string;
|
|
129
|
+
/**
|
|
130
|
+
* Operator opt-out, matching UAP_DELIVER_ALLOW_GUTTING's shape. ENV ONLY.
|
|
131
|
+
*
|
|
132
|
+
* There was briefly a second disjunct here, `UAP_EPIC_STUBS_OK`, set by the epic
|
|
133
|
+
* controller for CONTRACTS and SCAFFOLD epics — the two phases whose prompts say
|
|
134
|
+
* stub bodies are the DELIVERABLE. It is gone, because it was SELF-GRANTABLE:
|
|
135
|
+
* `epic.scaffold` and `epic.contracts` come out of the PLANNER MODEL's JSON
|
|
136
|
+
* (decompose.ts), and the planner and the executor are the same model. Labelling
|
|
137
|
+
* a phase `"scaffold": true` would have switched the guard off for it. An
|
|
138
|
+
* override the constrained party can set is not an override, it is an off switch
|
|
139
|
+
* — the same reasoning that made expert-review's inline waiver indefensible.
|
|
140
|
+
*
|
|
141
|
+
* Nothing is lost by removing it. A COMPLIANT scaffold already passes: the prompt
|
|
142
|
+
* asks for `throw new Error("TODO")` / `todo!()` / `raise NotImplementedError`
|
|
143
|
+
* bodies, and those are not empty. The exemption would only ever have permitted
|
|
144
|
+
* the one shape the prompt does not ask for, bare `{}` — which is also the only
|
|
145
|
+
* shape that fails silently at runtime instead of announcing itself. So the
|
|
146
|
+
* refusal names the compliant form instead of waiving the check, which keeps the
|
|
147
|
+
* phase satisfiable without handing the model a switch.
|
|
148
|
+
*/
|
|
149
|
+
export declare function stubGuardDisabled(): boolean;
|
|
150
|
+
//# sourceMappingURL=stub-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stub-detector.d.ts","sourceRoot":"","sources":["../../src/delivery/stub-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAqEH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAwChD;AAiGD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAiB3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMjD;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,CAoErF;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAWtE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C"}
|