@meowpanel/api 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +1 -1
  2. package/esm/mod.d.ts +3 -3
  3. package/esm/mod.d.ts.map +1 -1
  4. package/esm/mod.js +1 -1
  5. package/esm/src/client.d.ts +1 -1
  6. package/esm/src/client.js +1 -1
  7. package/esm/src/http.d.ts +11 -3
  8. package/esm/src/http.d.ts.map +1 -1
  9. package/esm/src/http.js +25 -15
  10. package/esm/src/resources/servers/activity.d.ts +16 -1
  11. package/esm/src/resources/servers/activity.d.ts.map +1 -1
  12. package/esm/src/resources/servers/activity.js +10 -1
  13. package/esm/src/resources/servers/connection.d.ts +80 -38
  14. package/esm/src/resources/servers/connection.d.ts.map +1 -1
  15. package/esm/src/resources/servers/connection.js +115 -74
  16. package/esm/src/resources/servers/node-client.d.ts +5 -4
  17. package/esm/src/resources/servers/node-client.d.ts.map +1 -1
  18. package/esm/src/resources/servers/node-client.js +6 -10
  19. package/esm/src/resources/servers/server.d.ts +1 -1
  20. package/esm/src/resources/servers/server.js +3 -3
  21. package/esm/src/resources/servers/types.d.ts +6 -1
  22. package/esm/src/resources/servers/types.d.ts.map +1 -1
  23. package/package.json +1 -1
  24. package/script/mod.d.ts +3 -3
  25. package/script/mod.d.ts.map +1 -1
  26. package/script/mod.js +1 -1
  27. package/script/src/client.d.ts +1 -1
  28. package/script/src/client.js +1 -1
  29. package/script/src/http.d.ts +11 -3
  30. package/script/src/http.d.ts.map +1 -1
  31. package/script/src/http.js +25 -15
  32. package/script/src/resources/servers/activity.d.ts +16 -1
  33. package/script/src/resources/servers/activity.d.ts.map +1 -1
  34. package/script/src/resources/servers/activity.js +9 -0
  35. package/script/src/resources/servers/connection.d.ts +80 -38
  36. package/script/src/resources/servers/connection.d.ts.map +1 -1
  37. package/script/src/resources/servers/connection.js +115 -74
  38. package/script/src/resources/servers/node-client.d.ts +5 -4
  39. package/script/src/resources/servers/node-client.d.ts.map +1 -1
  40. package/script/src/resources/servers/node-client.js +6 -10
  41. package/script/src/resources/servers/server.d.ts +1 -1
  42. package/script/src/resources/servers/server.js +3 -3
  43. package/script/src/resources/servers/types.d.ts +6 -1
  44. package/script/src/resources/servers/types.d.ts.map +1 -1
@@ -151,6 +151,18 @@ class HttpClient {
151
151
  headers: { ...this.defaultHeaders, ...init.headers },
152
152
  }, params);
153
153
  }
154
+ /**
155
+ * Send a request to a URL outside the API, such as a node daemon, through the configured
156
+ * `fetch` with the current bearer token. Non-2xx responses are returned, not thrown.
157
+ *
158
+ * @internal
159
+ */
160
+ fetchUrl(url, init = {}) {
161
+ const headers = new Headers(init.headers);
162
+ if (this.token)
163
+ headers.set('Authorization', `Bearer ${this.token}`);
164
+ return this.fetchImpl(url, { ...init, headers });
165
+ }
154
166
  /**
155
167
  * GET and deserialize a JSON response body.
156
168
  *
@@ -162,7 +174,8 @@ class HttpClient {
162
174
  return res.json();
163
175
  }
164
176
  /**
165
- * POST with an optional JSON body. Returns `undefined` for `204 No Content`.
177
+ * POST with an optional JSON body. Returns `undefined` for a response without a body, such as
178
+ * `204 No Content` or a bare `202 Accepted`.
166
179
  *
167
180
  * @param path Path relative to the API base URL.
168
181
  * @param body Request body, serialized as JSON.
@@ -170,12 +183,10 @@ class HttpClient {
170
183
  */
171
184
  async post(path, body, opts = {}) {
172
185
  const res = await this.fetch(path, { method: 'POST', body: body !== undefined ? JSON.stringify(body) : undefined, signal: opts.signal }, opts.params);
173
- if (res.status === 204)
174
- return undefined;
175
- return res.json();
186
+ return readBody(res);
176
187
  }
177
188
  /**
178
- * PATCH with an optional JSON body. Returns `undefined` for `204 No Content`.
189
+ * PATCH with an optional JSON body. Returns `undefined` for a response without a body.
179
190
  *
180
191
  * @param path Path relative to the API base URL.
181
192
  * @param body Partial update body, serialized as JSON.
@@ -183,21 +194,17 @@ class HttpClient {
183
194
  */
184
195
  async patch(path, body, opts = {}) {
185
196
  const res = await this.fetch(path, { method: 'PATCH', body: body !== undefined ? JSON.stringify(body) : undefined, signal: opts.signal }, opts.params);
186
- if (res.status === 204)
187
- return undefined;
188
- return res.json();
197
+ return readBody(res);
189
198
  }
190
199
  /**
191
- * DELETE a resource. Returns `undefined` for `204 No Content`, otherwise the parsed body.
200
+ * DELETE a resource. Returns `undefined` for a response without a body, otherwise the parsed body.
192
201
  *
193
202
  * @param path Path relative to the API base URL.
194
203
  * @param opts Additional request options.
195
204
  */
196
205
  async delete(path, opts = {}) {
197
206
  const res = await this.fetch(path, { method: 'DELETE', signal: opts.signal }, opts.params);
198
- if (res.status === 204)
199
- return undefined;
200
- return res.json();
207
+ return readBody(res);
201
208
  }
202
209
  /**
203
210
  * PUT raw body content (e.g. for binary or multipart uploads).
@@ -217,9 +224,7 @@ class HttpClient {
217
224
  headers,
218
225
  signal: opts.signal,
219
226
  }, opts.params);
220
- if (res.status === 204)
221
- return undefined;
222
- return res.json();
227
+ return readBody(res);
223
228
  }
224
229
  /**
225
230
  * GET a paginated list, parsing the `Content-Range` header for metadata when available.
@@ -255,3 +260,8 @@ class HttpClient {
255
260
  }
256
261
  }
257
262
  exports.HttpClient = HttpClient;
263
+ /** The JSON body of a response, or `undefined` when it has none. */
264
+ async function readBody(res) {
265
+ const text = await res.text();
266
+ return (text === '' ? undefined : JSON.parse(text));
267
+ }
@@ -34,7 +34,7 @@ export declare class ActivityJob extends ReactiveResource {
34
34
  /** The operation the job performs, e.g. `"server.install"`. */
35
35
  readonly kind: string;
36
36
  /** Current job status. */
37
- status: 'in_progress' | 'completed' | 'failed';
37
+ status: 'in_progress' | 'completed' | 'failed' | 'canceled';
38
38
  /** Completion percentage (0-100), or `null` if the job reports none. */
39
39
  progress: number | null;
40
40
  /** Latest status line, or `null` if the job reports none. */
@@ -67,6 +67,12 @@ export declare class ActivityJob extends ReactiveResource {
67
67
  export declare class ActivityLog extends ReactiveResource {
68
68
  /** The activity log entry's unique NanoID. */
69
69
  readonly id: NanoID;
70
+ /**
71
+ * The id the node daemon gave an entry it reported, which a console entry points at as its
72
+ * `activityId`. `null` for an entry the API recorded, and `undefined` unless the request asked
73
+ * for the `node_entry_id` include.
74
+ */
75
+ readonly nodeEntryId: string | null | undefined;
70
76
  /** The event type identifier, e.g. `"server.power.start"`. */
71
77
  event: string;
72
78
  /** NanoID of the server this activity is associated with, if any. */
@@ -124,7 +130,16 @@ export interface ActivityFeedOptions {
124
130
  nodeId?: NanoID;
125
131
  /** Filter by host. */
126
132
  hostId?: NanoID;
133
+ /** Only the entries the node daemon reported with these ids. */
134
+ nodeEntryIds?: readonly string[];
135
+ /** Related records to embed in each entry. */
136
+ include?: readonly ActivityInclude[];
127
137
  }
138
+ /**
139
+ * Extra data an activity entry can carry: `issuer` and `subject` fill those users, `job` the job,
140
+ * and `node_entry_id` the id the node daemon gave the entry.
141
+ */
142
+ export type ActivityInclude = 'issuer' | 'subject' | 'job' | 'node_entry_id';
128
143
  /** Query options for a single server's activity feed. */
129
144
  export interface ServerActivityFeedOptions extends ActivityFeedOptions {
130
145
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../../src/src/resources/servers/activity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEjH;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAE5D;;GAEG;AACH,qBAAa,cAAc;IAC1B,8DAA8D;IAC9D,SAAgB,KAAK,EAAE,MAAM,CAAC;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,MAAM,EACZ,IAAI,GAAE,mBAAwB,EAC9B,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAM,GAC5C,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAiBjC;AAED;;;;;;;;;;GAUG;AACH,qBAAa,qBAAqB;IAGhC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAHtB,gBAAgB;gBAEE,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,UAAU;IAGlC;;;;;OAKG;IACI,IAAI,CAAC,IAAI,GAAE,yBAA8B,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IASlF;;;;OAIG;IACU,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAK1D;;;;OAIG;IACU,QAAQ,CAAC,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAK9E;;;;OAIG;IACU,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAIxD"}
@@ -87,6 +87,12 @@ exports.ActivityJob = ActivityJob;
87
87
  class ActivityLog extends reactive_js_1.ReactiveResource {
88
88
  /** The activity log entry's unique NanoID. */
89
89
  id;
90
+ /**
91
+ * The id the node daemon gave an entry it reported, which a console entry points at as its
92
+ * `activityId`. `null` for an entry the API recorded, and `undefined` unless the request asked
93
+ * for the `node_entry_id` include.
94
+ */
95
+ nodeEntryId;
90
96
  /** The event type identifier, e.g. `"server.power.start"`. */
91
97
  event;
92
98
  /** NanoID of the server this activity is associated with, if any. */
@@ -123,6 +129,7 @@ class ActivityLog extends reactive_js_1.ReactiveResource {
123
129
  constructor(data) {
124
130
  super();
125
131
  this.id = (0, types_js_1.toNanoID)(data.id);
132
+ this.nodeEntryId = data.node_entry_id;
126
133
  this.event = data.event;
127
134
  this.serverId = data.server_id ? (0, types_js_1.toNanoID)(data.server_id) : null;
128
135
  this.nodeId = data.node_id ? (0, types_js_1.toNanoID)(data.node_id) : null;
@@ -161,6 +168,8 @@ async function listActivities(http, path, opts = {}, extra = {}) {
161
168
  group_id: opts.groupId,
162
169
  node_id: opts.nodeId,
163
170
  host_id: opts.hostId,
171
+ node_entry_id: opts.nodeEntryIds?.length ? opts.nodeEntryIds.join(',') : undefined,
172
+ include: (0, types_js_1.joinIncludes)(opts),
164
173
  ...extra,
165
174
  };
166
175
  const result = await http.list(path, { page: opts.page, perPage: opts.perPage }, params);
@@ -1,7 +1,47 @@
1
+ import type { HttpClient } from '../../http.js';
1
2
  import { ReactiveResource } from '../../reactive.js';
2
3
  import { type SseState } from '../../sse.js';
3
- import type { NanoID, PowerState } from '../../types.js';
4
+ import type { NanoID, PowerAction, PowerState } from '../../types.js';
4
5
  import type { JobStatus } from './jobs.js';
6
+ /** What a {@link ConsoleEntry} records. */
7
+ export type ConsoleEntryKind = 'output' | 'command' | 'power' | 'state' | 'daemon' | 'crash';
8
+ declare const transferStatuses: readonly ["pending", "processing", "canceling", "canceled", "failed", "completed"];
9
+ /** Where a server transfer stands. `canceled`, `failed` and `completed` are final. */
10
+ export type TransferStatus = (typeof transferStatuses)[number];
11
+ /**
12
+ * One entry of a server's console timeline: a line of output, a command someone sent, a power
13
+ * action, a state change, a message from the daemon, or a crash.
14
+ */
15
+ export interface ConsoleEntry {
16
+ /** Orders the server's entries. Each entry's is higher than the one before it. */
17
+ seq: number;
18
+ time: Date;
19
+ kind: ConsoleEntryKind;
20
+ /** The line of output, the command sent, or the daemon's message. */
21
+ text?: string;
22
+ /** The state a `state` entry moved to. */
23
+ state?: PowerState;
24
+ /**
25
+ * The action of a `power` entry. A power action is recorded twice: as it starts, with the
26
+ * `running` status, and as it ends.
27
+ */
28
+ action?: PowerAction;
29
+ status?: JobStatus;
30
+ /** Why a `failed` power action failed. */
31
+ error?: string;
32
+ /** The power action's job, on its `power` entries and on the `daemon` messages it printed. */
33
+ jobId?: string;
34
+ /**
35
+ * The auth issuer id of whoever sent a command or power action, as in {@link ServerConnection.viewerIssuerId}.
36
+ * Missing when the daemon acted on its own.
37
+ */
38
+ issuerId?: string;
39
+ /** The `nodeEntryId` of the activity entry a command or power action produced. */
40
+ activityId?: string;
41
+ /** How a crashed process ended. */
42
+ exitCode?: number;
43
+ outOfMemory?: boolean;
44
+ }
5
45
  /** Real-time resource utilization reported by the node. */
6
46
  export interface ServerUtilization {
7
47
  /** CPU usage as an absolute percentage (0–100+). */
@@ -47,8 +87,8 @@ export interface BackupCompletedEvent {
47
87
  }
48
88
  /** Typed events emitted by {@link ServerConnection}. */
49
89
  export interface ServerConnectionEvents {
50
- /** A line of console output from the server process. */
51
- console_output: string;
90
+ /** A new entry in the server's console timeline. */
91
+ console_entry: ConsoleEntry;
52
92
  /** The server's power state changed. */
53
93
  status: PowerState;
54
94
  /** New resource utilization stats are available. */
@@ -66,19 +106,14 @@ export interface ServerConnectionEvents {
66
106
  install_started: '';
67
107
  /** Installation finished. */
68
108
  install_completed: '';
69
- /**
70
- * A line of installation output.
71
- * Gated on `server.install.log`, so it never arrives for a viewer who lacks it.
72
- */
73
- install_output: string;
74
109
  /** An out-of-band status message from the daemon. */
75
110
  daemon_message: string;
76
111
  /** A backup finished; the payload's `id` identifies which one. */
77
112
  backup_completed: BackupCompletedEvent;
78
113
  /** A backup restore finished. */
79
114
  backup_restore_completed: '';
80
- /** The transfer status changed. A loose string: the daemon may emit values outside its own enum. */
81
- transfer_status: string;
115
+ /** The transfer status changed. */
116
+ transfer_status: TransferStatus;
82
117
  /**
83
118
  * A line of transfer output.
84
119
  * Gated on `server.transfer.log`, so it never arrives for a viewer who lacks it.
@@ -90,13 +125,14 @@ export interface ServerConnectionEvents {
90
125
  /**
91
126
  * A real-time SSE connection to a specific server on its Whisker node daemon.
92
127
  *
93
- * Emits typed events for console output, power state changes, and resource utilization.
94
- * Also maintains a rolling buffer of console output lines in {@link output}, pre-populated
95
- * with recent history fetched from the node on {@link open}.
128
+ * Emits typed events for the console timeline, power state changes, and resource utilization.
129
+ * Also keeps the console timeline in {@link entries}, starting with the history the node holds,
130
+ * fetched on {@link open}.
96
131
  *
97
132
  * The stream reconnects on its own after the daemon restarts or the network drops. Track it
98
- * through {@link state} or the `connection_state` event. After a reconnect, console lines the
99
- * daemon still holds from the gap are appended to {@link output} and emitted as `console_output`.
133
+ * through {@link state} or the `connection_state` event. After a reconnect, or when the daemon
134
+ * dropped entries for a viewer that fell behind, the missing entries are fetched and appended to
135
+ * {@link entries} in order, and emitted as `console_entry`.
100
136
  *
101
137
  * Obtain a connection via `Server.createConnection`.
102
138
  *
@@ -109,8 +145,8 @@ export interface ServerConnectionEvents {
109
145
  *
110
146
  * await conn.open();
111
147
  *
112
- * // Reactive: $conn.output is the full rolling buffer of console lines
113
- * // Live lines are appended automatically as they arrive over SSE
148
+ * // Reactive: $conn.entries is the console timeline
149
+ * // Live entries are appended automatically as they arrive over SSE
114
150
  *
115
151
  * // Later...
116
152
  * conn.close();
@@ -119,11 +155,9 @@ export interface ServerConnectionEvents {
119
155
  export declare class ServerConnection extends ReactiveResource {
120
156
  private readonly serverId;
121
157
  private readonly nodeUrl;
122
- private readonly getToken;
123
- /** Maximum number of console output lines retained in {@link ServerConnection.output}. */
124
- private static readonly maxOutputLines;
125
- /** Console history lines fetched from the node on open and after each reconnect. */
126
- private static readonly historyLines;
158
+ private readonly http;
159
+ /** How many entries {@link ServerConnection.entries} keeps, the size of the daemon's timeline. */
160
+ private static readonly maxEntries;
127
161
  /**
128
162
  * Whisker sends a keepalive every 20 seconds, so a stream silent for this long is dead even
129
163
  * if the socket never closed.
@@ -131,28 +165,32 @@ export declare class ServerConnection extends ReactiveResource {
131
165
  private static readonly idleTimeoutMs;
132
166
  private readonly listeners;
133
167
  private sse?;
134
- /** Live console lines held back while the post-reconnect history is merged in. */
135
- private pendingOutput?;
168
+ /** Live entries held back while the post-reconnect history is merged in. */
169
+ private pendingEntries?;
136
170
  /**
137
- * Rolling buffer of console output lines, capped at {@link ServerConnection.maxOutputLines}.
171
+ * The console timeline, oldest first, capped at the daemon's timeline size.
138
172
  *
139
- * Pre-populated with recent history from the node when {@link open} is called,
140
- * then appended to live as `console_output` SSE events arrive.
173
+ * Starts with the history the node holds when {@link open} is called, then grows as
174
+ * `console_entry` events arrive.
141
175
  *
142
- * Use as a reactive store: `$conn.output`.
176
+ * Use as a reactive store: `$conn.entries`.
143
177
  */
144
- output: string[];
178
+ entries: ConsoleEntry[];
145
179
  /** @internal */
146
- constructor(serverId: NanoID, nodeUrl: string, getToken: () => string);
180
+ constructor(serverId: NanoID, nodeUrl: string, http: HttpClient);
147
181
  /** State of the stream to the daemon. */
148
182
  get state(): SseState;
149
183
  /** `true` if the SSE connection is currently open. */
150
184
  get isConnected(): boolean;
151
185
  /**
152
- * Fetch console history and open the SSE stream.
186
+ * The auth issuer id the connection's token belongs to, which is how {@link ConsoleEntry.issuerId}
187
+ * names the viewer. `undefined` if the token does not say.
188
+ */
189
+ get viewerIssuerId(): string | undefined;
190
+ /**
191
+ * Fetch the console history and open the SSE stream.
153
192
  *
154
- * Populates {@link output} with recent history from the node, then begins streaming
155
- * live events.
193
+ * Fills {@link entries} with the history the node holds, then begins streaming live events.
156
194
  *
157
195
  * Only one stream is maintained at a time.
158
196
  *
@@ -179,15 +217,19 @@ export declare class ServerConnection extends ReactiveResource {
179
217
  removeAllListeners(): void;
180
218
  private fetchHistory;
181
219
  /**
182
- * Fill in the console lines printed while the stream was down.
220
+ * Fill in the entries missed while the stream was down, or that the daemon dropped, from the
221
+ * history. `first` is a live entry that came after the gap.
183
222
  *
184
- * Live lines are held back until the history arrives, because the history snapshot may
185
- * already contain them. Lines that fell out of the daemon's history window are lost.
223
+ * Live entries are held back until the history arrives, so the gap comes before them. A
224
+ * daemon whose newest entry is older than the last one seen has lost its timeline, and its
225
+ * history is taken as new.
186
226
  */
187
- private resyncOutput;
188
- private appendOutput;
227
+ private resyncEntries;
228
+ private get lastSeq();
229
+ private appendEntry;
189
230
  private emit;
190
231
  /** Parse and dispatch a raw SSE event to registered handlers. */
191
232
  private dispatch;
192
233
  }
234
+ export {};
193
235
  //# sourceMappingURL=connection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../../src/src/resources/servers/connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,2DAA2D;AAC3D,MAAM,WAAW,iBAAiB;IACjC,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sDAAsD;IACtD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,qCAAqC;IACrC,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,qFAAqF;AACrF,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,iDAAiD;AACjD,MAAM,WAAW,WAAW;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OA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