@seedprotocol/query 0.7.5 → 0.7.6-next.957.g6bb7768
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/README.md +31 -5
- package/dist/api.d.ts +9 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/assembleSeeds.d.ts +21 -1
- package/dist/assembleSeeds.d.ts.map +1 -1
- package/dist/cache/changes.d.ts +13 -0
- package/dist/cache/changes.d.ts.map +1 -1
- package/dist/cache/types.d.ts +2 -0
- package/dist/cache/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.node.js +5 -5
- package/dist/index.node.js.map +1 -1
- package/dist/node.js +2 -2
- package/dist/{registerNodeArweave-Ceg2Bv0d.js → registerNodeArweave-rFbHhv2d.js} +2 -2
- package/dist/{registerNodeArweave-Ceg2Bv0d.js.map → registerNodeArweave-rFbHhv2d.js.map} +1 -1
- package/dist/{src-BowznSl-.js → src-D20xeLMs.js} +420 -273
- package/dist/src-D20xeLMs.js.map +1 -0
- package/dist/{types-Dx2hRPNB.js → types-BgGzWcrW.js} +7 -3
- package/dist/types-BgGzWcrW.js.map +1 -0
- package/dist/types.d.ts +17 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/src-BowznSl-.js.map +0 -1
- package/dist/types-Dx2hRPNB.js.map +0 -1
package/README.md
CHANGED
|
@@ -10,10 +10,11 @@ SDK EAS sync (`client.syncFromEas()`) persists the same EAS graph into SQLite us
|
|
|
10
10
|
|
|
11
11
|
## Scope
|
|
12
12
|
|
|
13
|
-
- `getSeed(seedUid)` — one seed’s canonical JSON envelope, optional **changelog
|
|
13
|
+
- `getSeed(seedUid)` — one seed’s canonical JSON envelope, optional **changelog**, at its latest version or a pinned one
|
|
14
|
+
- `getSeeds(seedUids)` — many seeds of any schemas in one set of requests, keyed by UID
|
|
14
15
|
- `queryBySchema(schemaName, { limit, skip })` — paginated collection (latest-only)
|
|
15
16
|
- `queryBySchemaForMonth` — calendar-month listing (used by feed archives)
|
|
16
|
-
- Resolve mode: **latest Version
|
|
17
|
+
- Resolve mode: **latest Version** (or a pinned one), then newest property attestation per `(version, schemaId)`
|
|
17
18
|
- **`source: 'local' | 'remote' | 'auto'`** — pluggable backends (default `'remote'`)
|
|
18
19
|
- **Shared collection + item cache** for **remote** reads (memory → disk)
|
|
19
20
|
|
|
@@ -73,7 +74,32 @@ const { items: matches } = await queryBySchema('post', { uidPrefix: 'fd8c50ca',
|
|
|
73
74
|
}
|
|
74
75
|
```
|
|
75
76
|
|
|
76
|
-
Options on
|
|
77
|
+
Options on every API: `expandRelations` (default `true`), `hydrateStorage` (default `true`), `cache` (default: follow env; pass `false` to bypass), `source` (default `'remote'`).
|
|
78
|
+
|
|
79
|
+
## Many seeds (`getSeeds`)
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
const clips = await getSeeds(clipUids, { hydrateStorage: false })
|
|
83
|
+
// Map<string, SeedRecord>, keyed by each UID as given, in order
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Seeds may be of different schemas; each record's `schemaName` is its own. Seeds that aren't found, are revoked, or lack their pinned version are left out of the map. UIDs are read lowercase and deduplicated in any case; the map keeps the first spelling of each.
|
|
87
|
+
|
|
88
|
+
The seeds not in the cache are assembled together, so the number of indexer requests doesn't grow with the number of seeds: seeds, versions and properties, then the same for related seeds, plus storage bodies when `hydrateStorage` is on. Cached seeds are checked for changes in one request. Records share the item cache with `getSeed` under the same options. With `source: 'auto'`, seeds the local source doesn't have are read from remote. There's no changelog option.
|
|
89
|
+
|
|
90
|
+
## One version (`versionUid`, `asOf`)
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
// The version a clip pins, as it was when the clip was made
|
|
94
|
+
const post = await getSeed(postUid, { versionUid: pinnedVersionUid, asOf: clip.timeCreated })
|
|
95
|
+
|
|
96
|
+
// Several, in one call
|
|
97
|
+
const posts = await getSeeds(postUids, {
|
|
98
|
+
pins: new Map([[postUid, { versionUid: pinnedVersionUid, asOf: clip.timeCreated }]]),
|
|
99
|
+
})
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`versionUid` names one of the seed's live versions by its attester; it returns null (or no map entry) when the seed has no such version. A `patch` publish adds property attestations to the seed's current version instead of making a new one, so a version uid alone shows later patches to that version. `asOf` (unix seconds) leaves out attestations made after it, so the read shows the version as it was then; with `asOf` alone, the seed's newest version created by then is read. Relations, storage and attester filtering work as for the latest version, and related seeds are assembled at their latest version. With `include: 'data+changelog'`, `data` is the pinned version and the changelog still covers every version. See [ADR 0011](../../docs/adr/0011-reading-a-seed-at-a-version.md).
|
|
77
103
|
|
|
78
104
|
## Source (`local` / `remote` / `auto`)
|
|
79
105
|
|
|
@@ -146,7 +172,7 @@ Behavior:
|
|
|
146
172
|
|
|
147
173
|
- **Change checks** — every cache hit asks EAS, in one request, for attestations created or revoked since the entry was last checked that touch what it was built from: the seed, its head Version, and the seeds it relates to (and their head Versions). New Versions, property edits on the same Version (the default `patch` publish), and revocations are all seen. Only changed seeds are assembled again; a cached seed that was revoked drops out. The TTL is a backstop for anything a check can't see (e.g. relations of related seeds).
|
|
148
174
|
- **Collection cache** — only for **remote** `queryBySchema` with `skip === 0`, per schema and options fingerprint. Each hit fetches the seed list (cheap; shows new and revoked seeds), checks cached seeds for changes, and assembles only new or changed ones.
|
|
149
|
-
- **Item cache** — keyed by `seedUid` + options fingerprint (`expandRelations` / `hydrateStorage` / `include` / changelog filters). Default latest-only key remains `e1-h1`. Filled by remote `getSeed` and write-through from collection/month queries; a `getSeed` hit is checked for changes first.
|
|
175
|
+
- **Item cache** — keyed by `seedUid` + options fingerprint (`expandRelations` / `hydrateStorage` / `include` / changelog filters / `versionUid` / `asOf`). Default latest-only key remains `e1-h1`. Filled by remote `getSeed` and `getSeeds` and write-through from collection/month queries; a `getSeed` or `getSeeds` hit is checked for changes first.
|
|
150
176
|
- **ETags** — from content, so they change with any edit (not only a new `versionUid`).
|
|
151
177
|
- **Arweave bodies** — cached in memory by transaction id (their content never changes), whether or not the query cache is enabled.
|
|
152
178
|
- **Read-only results** — records from a cached read are the cache's own objects, shared with every later caller, so `SeedRecord` is typed read-only (`data: SeedData`, `changelog: readonly ChangelogEntry[]`). Outside `NODE_ENV=production`, records are also deep-frozen as they enter the memory cache (stored, or loaded from disk), so a write throws a `TypeError` instead of silently changing what later callers see and leaving the ETag stale. Production skips the freeze. Copy before changing anything, nested values included (copy-on-write, as feed's `applyFeedDefaultsDeep` does). `queryBySchema`'s `items` array is the caller's own. Set `freezeRecords` on the cache config to override.
|
|
@@ -159,7 +185,7 @@ Feed still owns serialized RSS/Atom/JSON bodies, HTTP `ETag` / 304, and image-me
|
|
|
159
185
|
|
|
160
186
|
## Init
|
|
161
187
|
|
|
162
|
-
Call `initializeQueryPlatform()` once, or rely on `getSeed` / `queryBySchema` which initialize automatically.
|
|
188
|
+
Call `initializeQueryPlatform()` once, or rely on `getSeed` / `getSeeds` / `queryBySchema` which initialize automatically.
|
|
163
189
|
|
|
164
190
|
Init only fills in what is missing. EAS and Arweave clients that are already registered, such as SeedClient's in a page or process running the SDK, are used as they are, along with the SDK's chain and Arweave gateway. So query can run beside SeedClient without replacing its clients.
|
|
165
191
|
|
package/dist/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AssembleOptions, GetSeedOptions, GetSeedResult, QueryBySchemaOptions, QueryBySchemaResult, SeedRecord } from './types.js';
|
|
1
|
+
import type { AssembleOptions, GetSeedOptions, GetSeedResult, GetSeedsOptions, QueryBySchemaOptions, QueryBySchemaResult, SeedRecord } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* `0x` + lowercase hex for a seed UID prefix given with or without `0x`, in any case (EAS indexes
|
|
4
4
|
* UIDs lowercase and matches prefixes case-sensitively). Null when it isn't 4–64 hex digits.
|
|
@@ -6,6 +6,14 @@ import type { AssembleOptions, GetSeedOptions, GetSeedResult, QueryBySchemaOptio
|
|
|
6
6
|
export declare function normalizeUidPrefix(prefix: string): string | null;
|
|
7
7
|
export declare function queryBySchema(schemaName: string, options?: QueryBySchemaOptions): Promise<QueryBySchemaResult>;
|
|
8
8
|
export declare function getSeed(seedUid: string, options?: GetSeedOptions): Promise<GetSeedResult | null>;
|
|
9
|
+
/**
|
|
10
|
+
* Many seeds, of any schemas, keyed by UID as given (first spelling of each, in order). Seeds
|
|
11
|
+
* not found, revoked, or without their pinned version are left out. Uncached seeds are
|
|
12
|
+
* assembled together, in one set of requests (see assembleSeedRecords), and cached ones are
|
|
13
|
+
* checked for changes in one request; records are shared with `getSeed` (same item cache).
|
|
14
|
+
* A seed can be read at one version per call.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getSeeds(seedUids: readonly string[], options?: GetSeedsOptions): Promise<Map<string, SeedRecord>>;
|
|
9
17
|
/**
|
|
10
18
|
* Query seeds of a schema created within a calendar month (local timezone bounds).
|
|
11
19
|
* No collection cache; may write-through to item cache when remote.
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EAEnB,UAAU,EAEX,MAAM,YAAY,CAAA;AAwKnB;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKhE;AAED,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CA8C9B;AA0DD,wBAAsB,OAAO,CAC3B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAgH/B;AAED;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAC5B,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CA6FlC;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,UAAU,EAAE,CAAC,CAuBvB"}
|
package/dist/assembleSeeds.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { QueryDataSource } from './source/types.js';
|
|
2
|
-
import type { AssembleOptions, AttestationLike, SeedRecord } from './types.js';
|
|
2
|
+
import type { AssembleOptions, AttestationLike, SeedRecord, VersionPin } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* What an assembled record was built from, so a cache can tell when it changed: an attestation
|
|
5
5
|
* created or revoked later that references one of `refUIDs` (a new or revoked Version of the seed
|
|
@@ -10,6 +10,17 @@ export type SeedDependencies = {
|
|
|
10
10
|
refUIDs: string[];
|
|
11
11
|
ids: string[];
|
|
12
12
|
};
|
|
13
|
+
export type AssembleRequest = {
|
|
14
|
+
/** The schema name every record gets. Default: each seed's own (its first schema name). */
|
|
15
|
+
schemaName?: string;
|
|
16
|
+
/** Versions of the seeds already fetched with `includeRevoked: true` (see getSeed). */
|
|
17
|
+
versions?: AttestationLike[];
|
|
18
|
+
/**
|
|
19
|
+
* Versions to assemble instead of the latest, by seed UID. Applies to `seeds` only: related
|
|
20
|
+
* seeds are always assembled at their latest version.
|
|
21
|
+
*/
|
|
22
|
+
pins?: ReadonlyMap<string, VersionPin>;
|
|
23
|
+
};
|
|
13
24
|
/**
|
|
14
25
|
* Like assembleSeeds, plus each record's dependencies by seedUid (see SeedDependencies).
|
|
15
26
|
*/
|
|
@@ -21,6 +32,15 @@ prefetched?: {
|
|
|
21
32
|
records: SeedRecord[];
|
|
22
33
|
dependencies: Map<string, SeedDependencies>;
|
|
23
34
|
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Records for `seeds`, in order, which may be of different schemas, with each record's
|
|
37
|
+
* dependencies by seedUid. One set of requests for all of them: seeds and versions, properties,
|
|
38
|
+
* related seeds and their versions, related properties, then storage bodies.
|
|
39
|
+
*/
|
|
40
|
+
export declare function assembleSeedRecords(seeds: AttestationLike[], options: AssembleOptions | undefined, dataSource: QueryDataSource, request?: AssembleRequest): Promise<{
|
|
41
|
+
records: SeedRecord[];
|
|
42
|
+
dependencies: Map<string, SeedDependencies>;
|
|
43
|
+
}>;
|
|
24
44
|
/**
|
|
25
45
|
* Assemble canonical SeedRecords from Seed attestations (latest Version + canonical properties).
|
|
26
46
|
* Uses per-call state (safe for concurrent requests).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembleSeeds.d.ts","sourceRoot":"","sources":["../src/assembleSeeds.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"assembleSeeds.d.ts","sourceRoot":"","sources":["../src/assembleSeeds.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AA0hB1F;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,GAAG,EAAE,MAAM,EAAE,CAAA;CACd,CAAA;AAUD,MAAM,MAAM,eAAe,GAAG;IAC5B,2FAA2F;IAC3F,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;IAC5B;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;CACvC,CAAA;AAED;;GAEG;AACH,wBAAsB,6BAA6B,CACjD,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,eAAe,EAAE,EACxB,OAAO,CAAC,EAAE,eAAe,EACzB,UAAU,GAAE,eAA4C;AACxD,qFAAqF;AACrF,UAAU,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAAE,GAC5C,OAAO,CAAC;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;CAAE,CAAC,CAKjF;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,eAAe,EAAE,EACxB,OAAO,EAAE,eAAe,GAAG,SAAS,EACpC,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;CAAE,CAAC,CA4CjF;AAED;;;GAGG;AACH,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,eAAe,EAAE,EACxB,OAAO,CAAC,EAAE,eAAe,EACzB,UAAU,GAAE,eAA4C,GACvD,OAAO,CAAC,UAAU,EAAE,CAAC,CAEvB"}
|
package/dist/cache/changes.d.ts
CHANGED
|
@@ -25,4 +25,17 @@ export declare function findChangedSeeds(dataSource: QueryDataSource, dependenci
|
|
|
25
25
|
changed: Set<string>;
|
|
26
26
|
seenChangeKeys: string[];
|
|
27
27
|
} | null>;
|
|
28
|
+
/** A cached item to check: what it depends on, and its own check window. */
|
|
29
|
+
export type ItemChangeCheck = ChangeCheck & {
|
|
30
|
+
dependencies: SeedDependencies;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Like findChangedSeeds for items checked at different times: one request from the oldest
|
|
34
|
+
* `checkedAt`, then each item counts only changes after its own `checkedAt` that it hasn't seen.
|
|
35
|
+
* `seenChangeKeys` is per item. Returns null when the data source can't list changes.
|
|
36
|
+
*/
|
|
37
|
+
export declare function findChangedItems(dataSource: QueryDataSource, checks: Map<string, ItemChangeCheck>): Promise<{
|
|
38
|
+
changed: Set<string>;
|
|
39
|
+
seenChangeKeys: Map<string, string[]>;
|
|
40
|
+
} | null>;
|
|
28
41
|
//# sourceMappingURL=changes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../src/cache/changes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,MAAM,CAAA;AAE/C,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,2DAA2D;AAC3D,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAE9E;AAID;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,eAAe,EAC3B,qBAAqB,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACpD,KAAK,EAAE,WAAW,GACjB,OAAO,CAAC;IAAE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC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G,IAAI,CAAC,CAkCjF"}
|
package/dist/cache/types.d.ts
CHANGED
|
@@ -77,6 +77,8 @@ export declare function buildAssembleOptionsKey(options?: {
|
|
|
77
77
|
hydrateStorage?: boolean;
|
|
78
78
|
include?: ChangelogInclude;
|
|
79
79
|
changelog?: GetSeedOptions['changelog'];
|
|
80
|
+
versionUid?: string;
|
|
81
|
+
asOf?: number;
|
|
80
82
|
}): string;
|
|
81
83
|
/**
|
|
82
84
|
* Sanitize seedUid for use as a filename segment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cache/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,UAAU,EACX,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;AAED,qDAAqD;AACrD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,YAAY,EAAE,gBAAgB,CAAA;IAC9B,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG;IAC/C,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IACtC,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG;IACzC,MAAM,EAAE,aAAa,CAAA;IACrB,YAAY,EAAE,gBAAgB,CAAA;IAC9B,4EAA4E;IAC5E,WAAW,E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AA;IACxB,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B,SAAS,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;IACvC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,MAAM,CAoBT;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE9D"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ export { initializeQueryPlatform, teardownQueryPlatform, isQueryPlatformInitiali
|
|
|
2
2
|
export type { InitializeQueryPlatformOptions } from './bootstrap.js';
|
|
3
3
|
export { assembleSeeds } from './assembleSeeds.js';
|
|
4
4
|
export { assembleSeedChangelog } from './assembleChangelog.js';
|
|
5
|
-
export { getSeed, normalizeUidPrefix, queryBySchema, queryBySchemaForMonth } from './api.js';
|
|
5
|
+
export { getSeed, getSeeds, normalizeUidPrefix, queryBySchema, queryBySchemaForMonth, } from './api.js';
|
|
6
6
|
export { registerLocalQuerySource, clearLocalQuerySource, getRegisteredLocalQuerySource, hasLocalQuerySource, createRemoteQueryDataSource, getRemoteQueryDataSource, resolveQuerySource, normalizeSourceMode, } from './source/index.js';
|
|
7
7
|
export type { QueryDataSource, ResolvedQuerySource } from './source/index.js';
|
|
8
8
|
export { buildFlatSnapshotFromProperties, diffVersionSnapshots, diffPropertyAttestations, applyChangelogFilters, decodePropertyAttestation, changelogValuesEqual, } from './changelog.js';
|
|
9
|
-
export type { SeedData, SeedRecord, AssembleOptions, QuerySourceMode, GetSeedOptions, GetSeedResult, ChangelogInclude, ChangelogOptions, ChangelogEntry, VersionChangelogEntry, PropertyChangelogEntry, QueryBySchemaOptions, QueryBySchemaResult, AttestationChange, AttestationLike, } from './types.js';
|
|
9
|
+
export type { SeedData, SeedRecord, AssembleOptions, QuerySourceMode, GetSeedOptions, GetSeedResult, GetSeedsOptions, VersionPin, ChangelogInclude, ChangelogOptions, ChangelogEntry, VersionChangelogEntry, PropertyChangelogEntry, QueryBySchemaOptions, QueryBySchemaResult, AttestationChange, AttestationLike, } from './types.js';
|
|
10
10
|
export { getQueryCacheManager, resetQueryCacheManager, createQueryCacheManager, loadQueryCacheConfig, CacheManager, buildAssembleOptionsKey, } from './cache/index.js';
|
|
11
11
|
export type { CachedCollectionData, CachedItemData, PersistentCache, QueryCacheConfig, QueryCacheStats, } from './cache/index.js';
|
|
12
12
|
export { getArweaveUrlForTransaction } from './arweaveUrl.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAA;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAA;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EACL,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,aAAa,EACb,qBAAqB,GACtB,MAAM,UAAU,CAAA;AAEjB,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,6BAA6B,EAC7B,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EAC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,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,EAC/B,oBAAoB,EACpB,wBAAwB,EACxB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EACL,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,8BAA8B,CAAA;AAErC,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,6BAA6B,CAAA;AACpC,YAAY,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as e, o as t, r as n, s as r, t as i } from "./types-
|
|
2
|
-
import { $ as a, A as o, B as s, C as c, D as l, E as u, F as d, G as f, H as p, I as m, J as h, K as g, L as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, T, U as E, V as D, W as O, X as k, Y as A, Z as j, _ as M, a as N, b as P, c as F, d as I,
|
|
3
|
-
export {
|
|
1
|
+
import { a as e, o as t, r as n, s as r, t as i } from "./types-BgGzWcrW.js";
|
|
2
|
+
import { $ as a, A as o, B as s, C as c, D as l, E as u, F as d, G as f, H as p, I as m, J as h, K as g, L as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, T, U as E, V as D, W as O, X as k, Y as A, Z as j, _ as M, a as N, b as P, c as F, d as I, et as L, f as R, h as z, i as B, j as V, k as H, l as U, m as W, n as G, o as K, p as q, q as J, r as Y, s as X, t as Z, u as Q, v as $, w as ee, x as te, y as ne, z as re } from "./src-D20xeLMs.js";
|
|
3
|
+
export { z as CacheManager, n as DEFAULT_ARWEAVE_HOST, d as FEED_RICH_BODY_STORAGE_SCHEMAS, m as RICH_BODY_STORAGE_SCHEMAS, ne as applyChangelogFilters, $ as assembleSeedChangelog, T as assembleSeeds, i as buildAssembleOptionsKey, P as buildFlatSnapshotFromProperties, te as changelogValuesEqual, F as clearLocalQuerySource, R as createQueryCacheManager, u as createRemoteQueryDataSource, w as decodePropertyAttestation, c as diffPropertyAttestations, ee as diffVersionSnapshots, A as enrichImageSeedClone, k as enrichImageSeedCloneForFeed, _ as feedRichBodyModelPriority, L as getArweaveUrlForTransaction, C as getFeedFieldStorageModels, re as getFeedListElementStorageModels, s as getFieldStorageModels, D as getListElementStorageModels, q as getQueryCacheManager, U as getRegisteredLocalQuerySource, l as getRemoteQueryDataSource, Z as getSeed, G as getSeeds, Q as hasLocalQuerySource, V as hydrateArweaveRichTextInFeedItems, v as hydrateArweaveRichTextInItems, e as initializeQueryPlatform, y as isArweaveTransactionGatewayUrl, p as isFeedRichBodyStorageSchema, t as isQueryPlatformInitialized, E as isRichBodyStorageSchema, M as loadQueryCacheConfig, K as normalizeSourceMode, Y as normalizeUidPrefix, H as parseEasPropertyMetadata, o as parseEasPropertyMetadataForFeed, b as parseEasRelationPropertyName, j as publicListRelationPropertyKey, B as queryBySchema, N as queryBySchemaForMonth, I as registerLocalQuerySource, x as resetArweaveBodyCache, W as resetQueryCacheManager, X as resolveQuerySource, O as richBodyModelPriority, f as setFeedFieldStorageModel, g as setFeedListElementStorageModels, J as setFieldStorageModel, h as setListElementStorageModels, S as stripListRelationStorageAliasesForPublicKey, r as teardownQueryPlatform, a as tryCoerceJsonStringArray };
|
package/dist/index.node.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as e, i as t, o as n, r as ee, s as r, t as i } from "./types-
|
|
2
|
-
import { $ as a, A as o, B as s, C as c, D as l, E as u, F as d, G as f, H as p, I as m, J as h, K as g, L as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, T, U as E, V as D, W as O, X as k, Y as te, Z as A, _ as j, a as M, b as N, c as P, d as F,
|
|
3
|
-
import { n as $, t as
|
|
4
|
-
R((e) => new $(e)), t(
|
|
1
|
+
import { a as e, i as t, o as n, r as ee, s as r, t as i } from "./types-BgGzWcrW.js";
|
|
2
|
+
import { $ as a, A as o, B as s, C as c, D as l, E as u, F as d, G as f, H as p, I as m, J as h, K as g, L as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, T, U as E, V as D, W as O, X as k, Y as te, Z as A, _ as j, a as M, b as N, c as P, d as F, et as I, f as L, g as R, h as z, i as B, j as V, k as H, l as U, m as W, n as G, o as K, p as q, q as J, r as Y, s as X, t as Z, u as Q, v as ne, w as re, x as ie, y as ae, z as oe } from "./src-D20xeLMs.js";
|
|
3
|
+
import { n as $, t as se } from "./registerNodeArweave-rFbHhv2d.js";
|
|
4
|
+
R((e) => new $(e)), t(se);
|
|
5
5
|
//#endregion
|
|
6
|
-
export {
|
|
6
|
+
export { z as CacheManager, ee as DEFAULT_ARWEAVE_HOST, d as FEED_RICH_BODY_STORAGE_SCHEMAS, $ as FileCache, m as RICH_BODY_STORAGE_SCHEMAS, ae as applyChangelogFilters, ne as assembleSeedChangelog, T as assembleSeeds, i as buildAssembleOptionsKey, N as buildFlatSnapshotFromProperties, ie as changelogValuesEqual, P as clearLocalQuerySource, L as createQueryCacheManager, u as createRemoteQueryDataSource, w as decodePropertyAttestation, c as diffPropertyAttestations, re as diffVersionSnapshots, te as enrichImageSeedClone, k as enrichImageSeedCloneForFeed, _ as feedRichBodyModelPriority, I as getArweaveUrlForTransaction, C as getFeedFieldStorageModels, oe as getFeedListElementStorageModels, s as getFieldStorageModels, D as getListElementStorageModels, q as getQueryCacheManager, U as getRegisteredLocalQuerySource, l as getRemoteQueryDataSource, Z as getSeed, G as getSeeds, Q as hasLocalQuerySource, V as hydrateArweaveRichTextInFeedItems, v as hydrateArweaveRichTextInItems, e as initializeQueryPlatform, y as isArweaveTransactionGatewayUrl, p as isFeedRichBodyStorageSchema, n as isQueryPlatformInitialized, E as isRichBodyStorageSchema, j as loadQueryCacheConfig, K as normalizeSourceMode, Y as normalizeUidPrefix, H as parseEasPropertyMetadata, o as parseEasPropertyMetadataForFeed, b as parseEasRelationPropertyName, A as publicListRelationPropertyKey, B as queryBySchema, M as queryBySchemaForMonth, F as registerLocalQuerySource, x as resetArweaveBodyCache, W as resetQueryCacheManager, X as resolveQuerySource, O as richBodyModelPriority, f as setFeedFieldStorageModel, g as setFeedListElementStorageModels, J as setFieldStorageModel, h as setListElementStorageModels, S as stripListRelationStorageAliasesForPublicKey, r as teardownQueryPlatform, a as tryCoerceJsonStringArray };
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=index.node.js.map
|
package/dist/index.node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.node.js","names":["initializeQueryPlatform","configureQueryArweavePlatform","isQueryPlatformInitialized","DEFAULT_ARWEAVE_HOST","teardownQueryPlatform","buildAssembleOptionsKey","
|
|
1
|
+
{"version":3,"file":"index.node.js","names":["initializeQueryPlatform","configureQueryArweavePlatform","isQueryPlatformInitialized","DEFAULT_ARWEAVE_HOST","teardownQueryPlatform","buildAssembleOptionsKey","tryCoerceJsonStringArray","parseEasPropertyMetadataForFeed","getFieldStorageModels","diffPropertyAttestations","getRemoteQueryDataSource","createRemoteQueryDataSource","FEED_RICH_BODY_STORAGE_SCHEMAS","setFeedFieldStorageModel","isFeedRichBodyStorageSchema","RICH_BODY_STORAGE_SCHEMAS","setListElementStorageModels","setFeedListElementStorageModels","feedRichBodyModelPriority","hydrateArweaveRichTextInItems","isArweaveTransactionGatewayUrl","parseEasRelationPropertyName","resetArweaveBodyCache","stripListRelationStorageAliasesForPublicKey","getFeedFieldStorageModels","decodePropertyAttestation","isRichBodyStorageSchema","getListElementStorageModels","richBodyModelPriority","enrichImageSeedCloneForFeed","enrichImageSeedClone","publicListRelationPropertyKey","loadQueryCacheConfig","queryBySchemaForMonth","buildFlatSnapshotFromProperties","clearLocalQuerySource","registerLocalQuerySource","getArweaveUrlForTransaction","createQueryCacheManager","configurePersistentCacheFactory","CacheManager","queryBySchema","hydrateArweaveRichTextInFeedItems","parseEasPropertyMetadata","getRegisteredLocalQuerySource","resetQueryCacheManager","getSeeds","normalizeSourceMode","getQueryCacheManager","setFieldStorageModel","normalizeUidPrefix","resolveQuerySource","getSeed","hasLocalQuerySource","assembleSeedChangelog","diffVersionSnapshots","changelogValuesEqual","applyChangelogFilters","getFeedListElementStorageModels","FileCache","registerNodeArweave","config","assembleSeeds"],"sources":["../src/index.node.ts"],"sourcesContent":["import { FileCache } from './cache/FileCache.js'\nimport { configurePersistentCacheFactory } from './cache/CacheManager.js'\nimport { configureQueryArweavePlatform } from './bootstrap.js'\nimport { registerNodeArweave } from './node/registerNodeArweave.js'\n\nconfigurePersistentCacheFactory((config) => new FileCache(config))\nconfigureQueryArweavePlatform(registerNodeArweave)\n\nexport * from './index.js'\nexport { FileCache } from './cache/FileCache.js'\n"],"mappings":";;;AAKAuC,GAAiC,MAAW,IAAIoB,EAAUE,CAAM,CAAC,GACjE5D,EAA8B2D,EAAmB"}
|
package/dist/node.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, i as t, o as n, s as r } from "./types-
|
|
2
|
-
import { n as i, t as a } from "./registerNodeArweave-
|
|
1
|
+
import { a as e, i as t, o as n, s as r } from "./types-BgGzWcrW.js";
|
|
2
|
+
import { n as i, t as a } from "./registerNodeArweave-rFbHhv2d.js";
|
|
3
3
|
//#region src/node/index.ts
|
|
4
4
|
t(a);
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./types-
|
|
1
|
+
import { n as e } from "./types-BgGzWcrW.js";
|
|
2
2
|
import { promises as t } from "fs";
|
|
3
3
|
import { join as n } from "path";
|
|
4
4
|
//#region src/cache/FileCache.ts
|
|
@@ -100,4 +100,4 @@ var r = class {
|
|
|
100
100
|
//#endregion
|
|
101
101
|
export { r as n, i as t };
|
|
102
102
|
|
|
103
|
-
//# sourceMappingURL=registerNodeArweave-
|
|
103
|
+
//# sourceMappingURL=registerNodeArweave-rFbHhv2d.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerNodeArweave-
|
|
1
|
+
{"version":3,"file":"registerNodeArweave-rFbHhv2d.js","names":["fs","sanitizeSeedUidForPath","FileCache","config","err","promises","error","join","schemaName","optionsKey","safe","seedUid","path","data","cached","prefix","files","file","dir","dirFiles","registerNodeArweave"],"sources":["../src/cache/FileCache.ts","../src/node/registerNodeArweave.ts"],"sourcesContent":["import { promises as fs } from 'fs'\nimport { join } from 'path'\nimport type {\n CachedCollectionData,\n CachedItemData,\n QueryCacheConfig,\n} from './types.js'\nimport { sanitizeSeedUidForPath } from './types.js'\n\n/**\n * File-based persistent cache for collections and items (Node / best-effort).\n */\nexport class FileCache {\n private cacheDir: string\n private config: QueryCacheConfig\n\n constructor(config: QueryCacheConfig) {\n this.cacheDir = config.cacheDir\n this.config = config\n this.ensureCacheDir().catch((err) => {\n console.error('Failed to create query cache directory:', err)\n })\n }\n\n private async ensureCacheDir(): Promise<void> {\n try {\n await fs.mkdir(this.cacheDir, { recursive: true })\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'EEXIST') {\n throw error\n }\n }\n }\n\n private async ensureItemsDir(): Promise<void> {\n try {\n await fs.mkdir(join(this.cacheDir, 'items'), { recursive: true })\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'EEXIST') {\n throw error\n }\n }\n }\n\n private collectionsDir(): string {\n return join(this.cacheDir, 'collections')\n }\n\n /** Under `collections/`, so feed's own `{schema}-{format}.json` cleanup never matches it. */\n private collectionPath(schemaName: string, optionsKey: string): string {\n return join(this.collectionsDir(), `${sanitizeSeedUidForPath(schemaName)}.${optionsKey}.json`)\n }\n\n private itemPath(seedUid: string, optionsKey: string): string {\n const safe = sanitizeSeedUidForPath(seedUid)\n return join(this.cacheDir, 'items', `${safe}-${optionsKey}.json`)\n }\n\n async getCollection(\n schemaName: string,\n optionsKey: string,\n ): Promise<CachedCollectionData | null> {\n const path = this.collectionPath(schemaName, optionsKey)\n try {\n const data = await fs.readFile(path, 'utf-8')\n const cached: CachedCollectionData = JSON.parse(data)\n const now = Math.floor(Date.now() / 1000)\n if (now - cached.lastUpdated > this.config.ttl) {\n await fs.unlink(path).catch(() => {})\n return null\n }\n return cached\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') {\n return null\n }\n console.error(\n `Error reading query collection cache for ${schemaName}:`,\n error,\n )\n return null\n }\n }\n\n async setCollection(\n schemaName: string,\n optionsKey: string,\n data: CachedCollectionData,\n ): Promise<void> {\n try {\n await fs.mkdir(this.collectionsDir(), { recursive: true })\n await fs.writeFile(\n this.collectionPath(schemaName, optionsKey),\n JSON.stringify(data, null, 2),\n 'utf-8',\n )\n } catch (error) {\n console.error(\n `Error writing query collection cache for ${schemaName}:`,\n error,\n )\n }\n }\n\n async getItem(\n seedUid: string,\n optionsKey: string,\n ): Promise<CachedItemData | null> {\n try {\n const data = await fs.readFile(\n this.itemPath(seedUid, optionsKey),\n 'utf-8',\n )\n const cached: CachedItemData = JSON.parse(data)\n const now = Math.floor(Date.now() / 1000)\n if (now - cached.lastUpdated > this.config.ttl) {\n await this.clearItem(seedUid, optionsKey)\n return null\n }\n return cached\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') {\n return null\n }\n console.error(`Error reading query item cache for ${seedUid}:`, error)\n return null\n }\n }\n\n async setItem(data: CachedItemData): Promise<void> {\n try {\n await this.ensureItemsDir()\n await fs.writeFile(\n this.itemPath(data.record.seedUid, data.optionsKey),\n JSON.stringify(data, null, 2),\n 'utf-8',\n )\n } catch (error) {\n console.error(\n `Error writing query item cache for ${data.record.seedUid}:`,\n error,\n )\n }\n }\n\n async clearCollection(schemaName: string): Promise<void> {\n const prefix = `${sanitizeSeedUidForPath(schemaName)}.`\n try {\n const files = await fs.readdir(this.collectionsDir())\n for (const file of files) {\n if (file.startsWith(prefix) && file.endsWith('.json')) {\n await fs.unlink(join(this.collectionsDir(), file))\n }\n }\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {\n console.error(\n `Error clearing query collection cache for ${schemaName}:`,\n error,\n )\n }\n }\n }\n\n async clearItem(seedUid: string, optionsKey: string): Promise<void> {\n try {\n await fs.unlink(this.itemPath(seedUid, optionsKey))\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {\n console.error(\n `Error clearing query item cache for ${seedUid}:`,\n error,\n )\n }\n }\n }\n\n async clearAll(): Promise<void> {\n try {\n const files = await fs.readdir(this.cacheDir)\n for (const file of files) {\n if (file.endsWith('.json')) {\n await fs.unlink(join(this.cacheDir, file))\n }\n }\n for (const dir of [join(this.cacheDir, 'items'), this.collectionsDir()]) {\n try {\n const dirFiles = await fs.readdir(dir)\n for (const file of dirFiles) {\n if (file.endsWith('.json')) {\n await fs.unlink(join(dir, file))\n }\n }\n } catch {\n // dir may not exist\n }\n }\n } catch (error) {\n console.error('Error clearing all query caches:', error)\n }\n }\n}\n","import type { QueryArweavePlatformRegistrar } from '../bootstrap.js'\n\n/** Registers the Node Arweave client (and read gateway) when nothing else has. */\nexport const registerNodeArweave: QueryArweavePlatformRegistrar = async ({ arweaveDomain }) => {\n const { registerNodeArweavePlatform } = await import('@seedprotocol/arweave/node')\n registerNodeArweavePlatform({ arweaveDomain })\n}\n"],"mappings":";;;;AAYA,IAAaE,IAAb,MAAuB;CACrB;CACA;CAEA,YAAY,GAA0B;EAGpC,AAFA,KAAK,WAAWC,EAAO,UACvB,KAAK,SAASA,GACd,KAAK,eAAe,CAAC,CAAC,OAAO,MAAQ;GACnC,QAAQ,MAAM,2CAA2CC,CAAG;EAC9D,CAAC;CACH;CAEA,MAAc,iBAAgC;EAC5C,IAAI;GACF,MAAMJ,EAAG,MAAM,KAAK,UAAU,EAAE,WAAW,GAAK,CAAC;EACnD,SAASM,GAAO;GACd,IAAKA,EAAgC,SAAS,UAC5C,MAAMA;EAEV;CACF;CAEA,MAAc,iBAAgC;EAC5C,I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