@elaraai/e3-ui-components 1.0.83 → 1.0.85
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 +113 -6
- package/dist/components/DataTaskPreview.d.ts +35 -1
- package/dist/components/DataTaskPreview.d.ts.map +1 -1
- package/dist/components/DatasetPreview.d.ts +16 -0
- package/dist/components/DatasetPreview.d.ts.map +1 -1
- package/dist/components/InputPreview.d.ts +12 -0
- package/dist/components/InputPreview.d.ts.map +1 -1
- package/dist/components/PagedDatasetPreview.d.ts +15 -0
- package/dist/components/PagedDatasetPreview.d.ts.map +1 -1
- package/dist/components/TaskLogs.d.ts +19 -0
- package/dist/components/TaskLogs.d.ts.map +1 -1
- package/dist/components/TaskPreview.d.ts +24 -0
- package/dist/components/TaskPreview.d.ts.map +1 -1
- package/dist/components/UITaskPreview.d.ts +4 -1
- package/dist/components/UITaskPreview.d.ts.map +1 -1
- package/dist/components/VirtualizedLogViewer.d.ts +29 -1
- package/dist/components/VirtualizedLogViewer.d.ts.map +1 -1
- package/dist/components/controlled-search.d.ts +22 -0
- package/dist/components/controlled-search.d.ts.map +1 -0
- package/dist/components/preview-controls.d.ts +73 -0
- package/dist/components/preview-controls.d.ts.map +1 -0
- package/dist/diff/index.d.ts.map +1 -1
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/hooks/executions.d.ts +17 -0
- package/dist/hooks/executions.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useDatasetValue.d.ts +19 -1
- package/dist/hooks/useDatasetValue.d.ts.map +1 -1
- package/dist/hooks/useTaskLogsHook.d.ts +67 -3
- package/dist/hooks/useTaskLogsHook.d.ts.map +1 -1
- package/dist/in-memory-call-7_3frW52.js +615 -0
- package/dist/in-memory-call-7_3frW52.js.map +1 -0
- package/dist/in-memory-call-_r5DJotS.cjs +614 -0
- package/dist/in-memory-call-_r5DJotS.cjs.map +1 -0
- package/dist/index.cjs +25860 -5731
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28383 -8253
- package/dist/index.js.map +1 -1
- package/dist/platform/bind-runtime.d.ts +18 -3
- package/dist/platform/bind-runtime.d.ts.map +1 -1
- package/dist/platform/dataset-hooks.d.ts +15 -3
- package/dist/platform/dataset-hooks.d.ts.map +1 -1
- package/dist/platform/dataset-store.d.ts +35 -7
- package/dist/platform/dataset-store.d.ts.map +1 -1
- package/dist/platform/e3-config.d.ts +26 -2
- package/dist/platform/e3-config.d.ts.map +1 -1
- package/dist/platform/func-runtime.d.ts +11 -5
- package/dist/platform/func-runtime.d.ts.map +1 -1
- package/dist/platform/index.d.ts +2 -2
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/paged-runtime.d.ts +46 -9
- package/dist/platform/paged-runtime.d.ts.map +1 -1
- package/dist/platform/record-runtime.d.ts +45 -7
- package/dist/platform/record-runtime.d.ts.map +1 -1
- package/dist/platform/recovery.d.ts +44 -0
- package/dist/platform/recovery.d.ts.map +1 -0
- package/dist/platform/staged-store.d.ts +16 -0
- package/dist/platform/staged-store.d.ts.map +1 -1
- package/dist/platform/tracked-channel.d.ts +12 -0
- package/dist/platform/tracked-channel.d.ts.map +1 -1
- package/dist/query/about.d.ts +50 -0
- package/dist/query/about.d.ts.map +1 -0
- package/dist/query/autocomplete.d.ts +112 -0
- package/dist/query/autocomplete.d.ts.map +1 -0
- package/dist/query/builder.d.ts +29 -0
- package/dist/query/builder.d.ts.map +1 -0
- package/dist/query/calls.d.ts +46 -0
- package/dist/query/calls.d.ts.map +1 -0
- package/dist/query/datasets-tab.d.ts +52 -0
- package/dist/query/datasets-tab.d.ts.map +1 -0
- package/dist/query/downloads.d.ts +29 -0
- package/dist/query/downloads.d.ts.map +1 -0
- package/dist/query/drops.d.ts +28 -0
- package/dist/query/drops.d.ts.map +1 -0
- package/dist/query/foot.d.ts +22 -0
- package/dist/query/foot.d.ts.map +1 -0
- package/dist/query/hooks.d.ts +265 -0
- package/dist/query/hooks.d.ts.map +1 -0
- package/dist/query/in-memory-call.d.ts +150 -0
- package/dist/query/in-memory-call.d.ts.map +1 -0
- package/dist/query/jq-editor.d.ts +34 -0
- package/dist/query/jq-editor.d.ts.map +1 -0
- package/dist/query/library-tab.d.ts +33 -0
- package/dist/query/library-tab.d.ts.map +1 -0
- package/dist/query/library.d.ts +20 -0
- package/dist/query/library.d.ts.map +1 -0
- package/dist/query/model/cards.d.ts +179 -0
- package/dist/query/model/cards.d.ts.map +1 -0
- package/dist/query/model/index.d.ts +19 -0
- package/dist/query/model/index.d.ts.map +1 -0
- package/dist/query/model/messages.d.ts +1253 -0
- package/dist/query/model/messages.d.ts.map +1 -0
- package/dist/query/model/refs.d.ts +92 -0
- package/dist/query/model/refs.d.ts.map +1 -0
- package/dist/query/model/slots.d.ts +213 -0
- package/dist/query/model/slots.d.ts.map +1 -0
- package/dist/query/model/summaries.d.ts +104 -0
- package/dist/query/model/summaries.d.ts.map +1 -0
- package/dist/query/model/words.d.ts +331 -0
- package/dist/query/model/words.d.ts.map +1 -0
- package/dist/query/one-shot.d.ts +266 -0
- package/dist/query/one-shot.d.ts.map +1 -0
- package/dist/query/open-query.d.ts +214 -0
- package/dist/query/open-query.d.ts.map +1 -0
- package/dist/query/parts.d.ts +115 -0
- package/dist/query/parts.d.ts.map +1 -0
- package/dist/query/plan-popover.d.ts +22 -0
- package/dist/query/plan-popover.d.ts.map +1 -0
- package/dist/query/plan.d.ts +353 -0
- package/dist/query/plan.d.ts.map +1 -0
- package/dist/query/query-east.d.ts +21 -0
- package/dist/query/query-east.d.ts.map +1 -0
- package/dist/query/query-tab.d.ts +21 -0
- package/dist/query/query-tab.d.ts.map +1 -0
- package/dist/query/results-table.d.ts +153 -0
- package/dist/query/results-table.d.ts.map +1 -0
- package/dist/query/results.d.ts +137 -0
- package/dist/query/results.d.ts.map +1 -0
- package/dist/query/run.d.ts +199 -0
- package/dist/query/run.d.ts.map +1 -0
- package/dist/query/save-popover.d.ts +29 -0
- package/dist/query/save-popover.d.ts.map +1 -0
- package/dist/query/session.d.ts +409 -0
- package/dist/query/session.d.ts.map +1 -0
- package/dist/query/shape-line.d.ts +21 -0
- package/dist/query/shape-line.d.ts.map +1 -0
- package/dist/query/source.d.ts +21 -0
- package/dist/query/source.d.ts.map +1 -0
- package/dist/query/status-line.d.ts +48 -0
- package/dist/query/status-line.d.ts.map +1 -0
- package/dist/query/step-card.d.ts +30 -0
- package/dist/query/step-card.d.ts.map +1 -0
- package/dist/query/steps/check.d.ts +162 -0
- package/dist/query/steps/check.d.ts.map +1 -0
- package/dist/query/steps/count.d.ts +49 -0
- package/dist/query/steps/count.d.ts.map +1 -0
- package/dist/query/steps/edit.d.ts +108 -0
- package/dist/query/steps/edit.d.ts.map +1 -0
- package/dist/query/steps/fields.d.ts +101 -0
- package/dist/query/steps/fields.d.ts.map +1 -0
- package/dist/query/steps/index.d.ts +22 -0
- package/dist/query/steps/index.d.ts.map +1 -0
- package/dist/query/steps/jq.d.ts +188 -0
- package/dist/query/steps/jq.d.ts.map +1 -0
- package/dist/query/steps/parse.d.ts +38 -0
- package/dist/query/steps/parse.d.ts.map +1 -0
- package/dist/query/steps/print.d.ts +195 -0
- package/dist/query/steps/print.d.ts.map +1 -0
- package/dist/query/steps/shape.d.ts +90 -0
- package/dist/query/steps/shape.d.ts.map +1 -0
- package/dist/query/steps/values.d.ts +85 -0
- package/dist/query/steps/values.d.ts.map +1 -0
- package/dist/query/toolbar.d.ts +56 -0
- package/dist/query/toolbar.d.ts.map +1 -0
- package/dist/query/use-query-editor.d.ts +153 -0
- package/dist/query/use-query-editor.d.ts.map +1 -0
- package/dist/query/use-query-session.d.ts +55 -0
- package/dist/query/use-query-session.d.ts.map +1 -0
- package/dist/query/words.d.ts +60 -0
- package/dist/query/words.d.ts.map +1 -0
- package/dist/query.cjs +16 -0
- package/dist/query.cjs.map +1 -0
- package/dist/query.js +16 -0
- package/dist/query.js.map +1 -0
- package/dist/shared/name-popover.d.ts +38 -0
- package/dist/shared/name-popover.d.ts.map +1 -0
- package/dist/studio/builder.d.ts +20 -0
- package/dist/studio/builder.d.ts.map +1 -0
- package/dist/studio/inspector.d.ts +18 -0
- package/dist/studio/inspector.d.ts.map +1 -0
- package/dist/studio/library.d.ts +20 -0
- package/dist/studio/library.d.ts.map +1 -0
- package/dist/studio/messages.d.ts +318 -0
- package/dist/studio/messages.d.ts.map +1 -0
- package/dist/studio/open-page.d.ts +13 -0
- package/dist/studio/open-page.d.ts.map +1 -0
- package/dist/studio/page.d.ts +61 -0
- package/dist/studio/page.d.ts.map +1 -0
- package/dist/studio/palette.d.ts +41 -0
- package/dist/studio/palette.d.ts.map +1 -0
- package/dist/studio/publish.d.ts +21 -0
- package/dist/studio/publish.d.ts.map +1 -0
- package/dist/studio/save-template.d.ts +18 -0
- package/dist/studio/save-template.d.ts.map +1 -0
- package/dist/studio/studio-east.d.ts +45 -0
- package/dist/studio/studio-east.d.ts.map +1 -0
- package/package.json +19 -14
package/dist/hooks/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export * from './datasets.js';
|
|
|
10
10
|
export * from './tasks.js';
|
|
11
11
|
export * from './executions.js';
|
|
12
12
|
export { useDatasetStatus, type DatasetStatus, type UseDatasetStatusOptions } from './useDatasetStatus.js';
|
|
13
|
-
export { useDatasetValue, useDatasetDownload, type DatasetValueResult, type UseDatasetValueOptions } from './useDatasetValue.js';
|
|
13
|
+
export { useDatasetValue, useDatasetDownload, downloadDataset, type DatasetValueResult, type UseDatasetValueOptions } from './useDatasetValue.js';
|
|
14
14
|
export { useDatasetPage, type DatasetPageResult, type UseDatasetPageOptions, type DatasetPageWindow } from './useDatasetPage.js';
|
|
15
15
|
export { useTaskDetails, type UseTaskDetailsOptions } from './useTaskDetails.js';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,KAAK,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,KAAK,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,eAAe,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAClJ,OAAO,EAAE,cAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACjI,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -41,6 +41,24 @@ export interface DatasetValueResult {
|
|
|
41
41
|
* entry that holds another hash's value is never shown as this hash's.
|
|
42
42
|
*/
|
|
43
43
|
export declare function useDatasetValue(apiUrl: string, repo: string, workspace: string | null, datasetPath: string | null, options: UseDatasetValueOptions): UseQueryResult<DatasetValueResult | undefined, Error>;
|
|
44
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Downloads a dataset's value: its beast2 bytes, which the browser saves as
|
|
46
|
+
* `<path>.beast2`, the path's dots as underscores. What a preview's Download
|
|
47
|
+
* does, for a host that draws Download itself (#1120).
|
|
48
|
+
*
|
|
49
|
+
* @param apiUrl - The e3 API's base URL
|
|
50
|
+
* @param repo - The repository
|
|
51
|
+
* @param workspace - The workspace
|
|
52
|
+
* @param path - The dataset's dotted path, e.g. `"inputs.rows"`
|
|
53
|
+
* @param requestOptions - The token, and the fetch the request goes through
|
|
54
|
+
* @returns Once the browser has the file
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```tsx
|
|
58
|
+
* <Button onClick={() => downloadDataset(apiUrl, 'default', 'main', 'tasks.report.output')}>Download</Button>
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function downloadDataset(apiUrl: string, repo: string, workspace: string, path: string, requestOptions?: RequestOptions): Promise<void>;
|
|
62
|
+
/** Trigger a binary download of a dataset value: {@link downloadDataset}, once the workspace and path are known. */
|
|
45
63
|
export declare function useDatasetDownload(apiUrl: string, repo: string, workspace: string | null, datasetPath: string | null, requestOptions?: RequestOptions): () => Promise<void>;
|
|
46
64
|
//# sourceMappingURL=useDatasetValue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDatasetValue.d.ts","sourceRoot":"","sources":["../../src/hooks/useDatasetValue.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAA4B,KAAK,aAAa,EAAE,MA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
import { RequestOptions } from '@elaraai/e3-api-client';
|
|
3
|
-
|
|
2
|
+
import { LogOptions, RequestOptions, TaskLogChunk } from '@elaraai/e3-api-client';
|
|
3
|
+
/** How often a task's log is polled while it changes: every second. */
|
|
4
|
+
export declare const LOG_POLL_MS = 1000;
|
|
5
|
+
/** The longest a task's log waits between polls: 5 s, which it backs off to
|
|
6
|
+
* while nothing changes, and waits once its execution has ended and its log
|
|
7
|
+
* is read. */
|
|
8
|
+
export declare const LOG_POLL_BACKOFF_MS = 5000;
|
|
9
|
+
/**
|
|
10
|
+
* A task's log as far as it has been read: one execution's, from its first
|
|
11
|
+
* byte, at most 10 MB of it.
|
|
12
|
+
*/
|
|
13
|
+
export interface TaskLogRead {
|
|
14
|
+
/** The log's text, as far as it has been read */
|
|
15
|
+
data: string;
|
|
16
|
+
/** The inputs hash of the execution it is the log of */
|
|
17
|
+
inputsHash: string;
|
|
18
|
+
/** The id of the execution it is the log of */
|
|
19
|
+
executionId: string;
|
|
20
|
+
/** The byte the next read starts at */
|
|
21
|
+
offset: number;
|
|
22
|
+
/** The log's size when it was last read */
|
|
23
|
+
totalSize: number;
|
|
24
|
+
/** Whether the last read reached the log's end */
|
|
25
|
+
complete: boolean;
|
|
26
|
+
/** Whether the execution has ended: its log grows no more */
|
|
27
|
+
ended: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Reads a task's log on from where the last read stopped: only what is new,
|
|
31
|
+
* a 64 KB chunk at a time, up to 10 MB in all. Each poll's first read names no
|
|
32
|
+
* execution, so it finds the task's current one: when that is another
|
|
33
|
+
* execution than the one read so far, the log starts over from its first
|
|
34
|
+
* byte, every read after naming it. Past 10 MB, a poll reads no bytes, and
|
|
35
|
+
* only finds whether the execution has changed or ended.
|
|
36
|
+
*
|
|
37
|
+
* @param read - Reads a chunk of the task's log (the client's `taskLogs`,
|
|
38
|
+
* bound to the task)
|
|
39
|
+
* @param stream - The stream
|
|
40
|
+
* @param held - The log as far as the last poll read it; none for the first
|
|
41
|
+
* @returns The log as far as it is read now, and whether the poll found
|
|
42
|
+
* anything new: bytes, another execution, or the execution's end
|
|
43
|
+
*/
|
|
44
|
+
export declare function readTaskLogOn(read: (options: LogOptions) => Promise<TaskLogChunk>, stream: 'stdout' | 'stderr', held: TaskLogRead | undefined): Promise<{
|
|
45
|
+
log: TaskLogRead;
|
|
46
|
+
changed: boolean;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* How long a task's log waits before its next poll: a second after a poll
|
|
50
|
+
* that found something new, doubling toward {@link LOG_POLL_BACKOFF_MS} after
|
|
51
|
+
* each that found nothing, and the longest once the execution has ended and
|
|
52
|
+
* its log is read, when a poll only checks for a new execution.
|
|
53
|
+
*
|
|
54
|
+
* @param previous - How long the last poll waited
|
|
55
|
+
* @param log - The log as the poll left it
|
|
56
|
+
* @param changed - Whether the poll found anything new
|
|
57
|
+
* @returns How long the next waits, in milliseconds
|
|
58
|
+
*/
|
|
59
|
+
export declare function nextLogPollMs(previous: number, log: TaskLogRead, changed: boolean): number;
|
|
60
|
+
/** What the hook answers: the log's text as far as it is read. */
|
|
61
|
+
export interface TaskLogsData {
|
|
4
62
|
data: string;
|
|
5
63
|
offset: bigint;
|
|
6
64
|
size: bigint;
|
|
7
65
|
totalSize: bigint;
|
|
8
66
|
complete: boolean;
|
|
9
|
-
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Polls a task's log: only what is new each time, starting over when the
|
|
70
|
+
* task's current execution changes, and backing off while nothing does
|
|
71
|
+
* ({@link readTaskLogOn}, {@link nextLogPollMs}).
|
|
72
|
+
*/
|
|
73
|
+
export declare function useTaskLogs(apiUrl: string, repo: string, workspace: string | null, taskName: string | null, stream?: 'stdout' | 'stderr', requestOptions?: RequestOptions, queryOptions?: QueryOverrides): import('@tanstack/react-query').UseQueryResult<TaskLogsData, Error>;
|
|
10
74
|
//# sourceMappingURL=useTaskLogsHook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTaskLogsHook.d.ts","sourceRoot":"","sources":["../../src/hooks/useTaskLogsHook.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"useTaskLogsHook.d.ts","sourceRoot":"","sources":["../../src/hooks/useTaskLogsHook.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAMvF,uEAAuE;AACvE,eAAO,MAAM,WAAW,OAAO,CAAC;AAEhC;;eAEe;AACf,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,6DAA6D;IAC7D,KAAK,EAAE,OAAO,CAAC;CAClB;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CAC/B,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,EACpD,MAAM,EAAE,QAAQ,GAAG,QAAQ,EAC3B,IAAI,EAAE,WAAW,GAAG,SAAS,GAC9B,OAAO,CAAC;IAAE,GAAG,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CA+BjD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAA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