@seedprotocol/query 0.7.8 → 0.7.9-next.1177.ga3e08ed

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 CHANGED
@@ -74,7 +74,9 @@ const { items: matches } = await queryBySchema('post', { uidPrefix: 'fd8c50ca',
74
74
  }
75
75
  ```
76
76
 
77
- Options on every API: `expandRelations` (default `true`), `hydrateStorage` (default `true`), `cache` (default: follow env; pass `false` to bypass), `source` (default `'remote'`).
77
+ Options on every API: `relations` (default `'expand'`), `hydrateStorage` (default `true`), `cache` (default: follow env; pass `false` to bypass), `source` (default `'remote'`).
78
+
79
+ `relations` sets how relation properties come back. `'expand'` resolves Html/File relations to Arweave URLs and nests other related seeds as objects. `'urls'` resolves Html/File relations to URLs and leaves the rest as seed UIDs. `'uids'` leaves every relation as a seed UID under its stored key (`author_id`, `author_ids`) and fetches no related seeds, so a listing makes three indexer requests (seeds, versions, properties) instead of up to seven; `hydrateStorage` still reads the requested seeds' own storage fields. `expandRelations` is deprecated: `true` is `'expand'`, `false` is `'urls'`, and `relations` wins when both are given.
78
80
 
79
81
  ## Many seeds (`getSeeds`)
80
82
 
@@ -172,7 +174,7 @@ Behavior:
172
174
 
173
175
  - **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).
174
176
  - **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.
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.
177
+ - **Item cache** — keyed by `seedUid` + options fingerprint (`relations` / `hydrateStorage` / `include` / changelog filters / `versionUid` / `asOf`). Default latest-only key remains `e1-h1`; `relations` maps to `e1` (`'expand'`), `e0` (`'urls'`) and `e2` (`'uids'`), so keys written with `expandRelations` still match. Filled by remote `getSeed` and `getSeeds` and write-through from collection/month queries; a `getSeed` or `getSeeds` hit is checked for changes first.
176
178
  - **ETags** — from content, so they change with any edit (not only a new `versionUid`).
177
179
  - **Arweave bodies** — cached in memory by transaction id (their content never changes), whether or not the query cache is enabled.
178
180
  - **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.
@@ -1,5 +1,5 @@
1
1
  import type { QueryDataSource } from './source/types.js';
2
- import type { AssembleOptions, AttestationLike, SeedRecord, VersionPin } from './types.js';
2
+ import { type AssembleOptions, type AttestationLike, type SeedRecord, type 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
@@ -35,7 +35,9 @@ prefetched?: {
35
35
  /**
36
36
  * Records for `seeds`, in order, which may be of different schemas, with each record's
37
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.
38
+ * related seeds and their versions, related properties, then storage bodies. With
39
+ * `relations: 'uids'` it stops after properties (storage bodies are still read): relation values
40
+ * stay seed UIDs and a record depends only on its seed and head version.
39
41
  */
40
42
  export declare function assembleSeedRecords(seeds: AttestationLike[], options: AssembleOptions | undefined, dataSource: QueryDataSource, request?: AssembleRequest): Promise<{
41
43
  records: SeedRecord[];
@@ -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,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,OAA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,EAAE,gBAAgB,CAAC,CAAA;CAAE,CAAC,CAKjF;AAED;;;;;;GAMG;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,CA6CjF;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"}
@@ -1,4 +1,4 @@
1
- import type { ChangelogInclude, GetSeedOptions, GetSeedResult, SeedRecord } from '../types.js';
1
+ import { type ChangelogInclude, type GetSeedOptions, type GetSeedResult, type RelationsMode, type SeedRecord } from '../types.js';
2
2
  import type { SeedDependencies } from '../assembleSeeds.js';
3
3
  /**
4
4
  * How a cached entry is kept current: changes (see QueryDataSource.listChangesSince) after
@@ -70,9 +70,11 @@ export type PersistentCache = {
70
70
  };
71
71
  /**
72
72
  * Build a stable key for assemble options that affect cached payloads.
73
- * Default latest-only (`include: 'data'`) keeps Phase 2 key `e1-h1`.
73
+ * Default latest-only (`include: 'data'`) keeps Phase 2 key `e1-h1`. Relations modes map to
74
+ * `e1` (expand), `e0` (urls) and `e2` (uids), so keys from `expandRelations` are unchanged.
74
75
  */
75
76
  export declare function buildAssembleOptionsKey(options?: {
77
+ relations?: RelationsMode;
76
78
  expandRelations?: boolean;
77
79
  hydrateStorage?: boolean;
78
80
  include?: ChangelogInclude;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cache/types.ts"],"names":[],"mappings":"AAAA,OAAO,K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AG,MAAM,CAmBT;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE9D"}
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { getSeed, getSeeds, normalizeUidPrefix, queryBySchema, queryBySchemaForM
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, GetSeedsOptions, VersionPin, ChangelogInclude, ChangelogOptions, ChangelogEntry, VersionChangelogEntry, PropertyChangelogEntry, QueryBySchemaOptions, QueryBySchemaResult, AttestationChange, AttestationLike, } from './types.js';
9
+ export type { SeedData, SeedRecord, AssembleOptions, RelationsMode, 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';
@@ -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,M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AA6B,EAAE,MAAM,mCAAmC,CAAA;AAEtF,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,uBAAuB,EACvB,2BAA2B,EAC3B,qBAAqB,EACrB,yBAAyB,EACzB,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-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 };
1
+ import { c as e, i as t, o as n, s as r, t as i } from "./types-BjCYpItx.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-C3XmoANA.js";
3
+ export { z as CacheManager, t 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, n as initializeQueryPlatform, y as isArweaveTransactionGatewayUrl, p as isFeedRichBodyStorageSchema, r 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, e as teardownQueryPlatform, a as tryCoerceJsonStringArray };
@@ -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-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);
1
+ import { a as e, c as t, i as n, o as ee, s as r, t as i } from "./types-BjCYpItx.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-C3XmoANA.js";
3
+ import { n as $, t as se } from "./registerNodeArweave-VGXwzQt4.js";
4
+ R((e) => new $(e)), e(se);
5
5
  //#endregion
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 };
6
+ export { z as CacheManager, n 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, ee as initializeQueryPlatform, y as isArweaveTransactionGatewayUrl, p as isFeedRichBodyStorageSchema, r 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, t as teardownQueryPlatform, a as tryCoerceJsonStringArray };
7
7
 
8
8
  //# sourceMappingURL=index.node.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.node.js","names":["configureQueryArweavePlatform","teardownQueryPlatform","DEFAULT_ARWEAVE_HOST","initializeQueryPlatform","isQueryPlatformInitialized","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,GACjE7D,EAA8B4D,EAAmB"}
package/dist/node.js CHANGED
@@ -1,8 +1,8 @@
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";
1
+ import { a as e, c as t, o as n, s as r } from "./types-BjCYpItx.js";
2
+ import { n as i, t as a } from "./registerNodeArweave-VGXwzQt4.js";
3
3
  //#region src/node/index.ts
4
- t(a);
4
+ e(a);
5
5
  //#endregion
6
- export { i as FileCache, e as initializeQueryPlatform, n as isQueryPlatformInitialized, r as teardownQueryPlatform };
6
+ export { i as FileCache, n as initializeQueryPlatform, r as isQueryPlatformInitialized, t as teardownQueryPlatform };
7
7
 
8
8
  //# sourceMappingURL=node.js.map
package/dist/node.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"node.js","names":["initializeQueryPlatform","configureQueryArweavePlatform","isQueryPlatformInitialized","teardownQueryPlatform","FileCache","registerNodeArweave"],"sources":["../src/node/index.ts"],"sourcesContent":["import { configureQueryArweavePlatform } from '../bootstrap.js'\nimport { registerNodeArweave } from './registerNodeArweave.js'\n\nconfigureQueryArweavePlatform(registerNodeArweave)\n\nexport { initializeQueryPlatform, teardownQueryPlatform, isQueryPlatformInitialized } from '../bootstrap.js'\nexport type { InitializeQueryPlatformOptions } from '../bootstrap.js'\nexport { FileCache } from '../cache/FileCache.js'\n"],"mappings":";;;AAGAC,EAA8BI,CAAmB"}
1
+ {"version":3,"file":"node.js","names":["configureQueryArweavePlatform","teardownQueryPlatform","initializeQueryPlatform","isQueryPlatformInitialized","FileCache","registerNodeArweave"],"sources":["../src/node/index.ts"],"sourcesContent":["import { configureQueryArweavePlatform } from '../bootstrap.js'\nimport { registerNodeArweave } from './registerNodeArweave.js'\n\nconfigureQueryArweavePlatform(registerNodeArweave)\n\nexport { initializeQueryPlatform, teardownQueryPlatform, isQueryPlatformInitialized } from '../bootstrap.js'\nexport type { InitializeQueryPlatformOptions } from '../bootstrap.js'\nexport { FileCache } from '../cache/FileCache.js'\n"],"mappings":";;;AAGAA,EAA8BK,CAAmB"}
@@ -1,4 +1,4 @@
1
- import { n as e } from "./types-BgGzWcrW.js";
1
+ import { n as e } from "./types-BjCYpItx.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-rFbHhv2d.js.map
103
+ //# sourceMappingURL=registerNodeArweave-VGXwzQt4.js.map
@@ -1 +1 @@
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,IAAI;GACF,MAAMN,EAAG,MAAMO,EAAK,KAAK,UAAU,OAAO,GAAG,EAAE,WAAW,GAAK,CAAC;EAClE,SAASD,GAAO;GACd,IAAKA,EAAgC,SAAS,UAC5C,MAAMA;EAEV;CACF;CAEA,iBAAiC;EAC/B,OAAOC,EAAK,KAAK,UAAU,aAAa;CAC1C;CAGA,eAAuB,GAAoB,GAA4B;EACrE,OAAOA,EAAK,KAAK,eAAe,GAAG,GAAGN,EAAuBO,CAAU,EAAE,GAAGC,EAAW,MAAM;CAC/F;CAEA,SAAiB,GAAiB,GAA4B;EAC5D,IAAMC,IAAOT,EAAuBU,CAAO;EAC3C,OAAOJ,EAAK,KAAK,UAAU,SAAS,GAAGG,EAAK,GAAGD,EAAW,MAAM;CAClE;CAEA,MAAM,cACJ,GACA,GACsC;EACtC,IAAMG,IAAO,KAAK,eAAeJ,GAAYC,CAAU;EACvD,IAAI;GACF,IAAMI,IAAO,MAAMb,EAAG,SAAS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,MAAM,OAAO;CACrD,EAA4B,EAAE,iBAAc,CAAC;AAC/C"}
1
+ {"version":3,"file":"registerNodeArweave-VGXwzQt4.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,IAAI;GACF,MAAMN,EAAG,MAAMO,EAAK,K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