@pellux/goodvibes-sdk 0.33.37 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client-auth/control-plane-auth-snapshot.d.ts +23 -0
- package/dist/client-auth/control-plane-auth-snapshot.d.ts.map +1 -1
- package/dist/client-auth/oauth-types.d.ts +18 -0
- package/dist/client-auth/oauth-types.d.ts.map +1 -1
- package/dist/client-auth/types.d.ts +26 -0
- package/dist/client-auth/types.d.ts.map +1 -1
- package/dist/client.d.ts +22 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/contracts/artifacts/operator-contract.json +1463 -10
- package/dist/events/knowledge.d.ts +31 -0
- package/dist/events/knowledge.d.ts.map +1 -1
- package/dist/events/tasks.d.ts +58 -0
- package/dist/events/tasks.d.ts.map +1 -1
- package/dist/events/transport.d.ts +60 -0
- package/dist/events/transport.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-config.d.ts +6 -0
- package/dist/platform/agents/wrfc-config.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-config.js +6 -0
- package/dist/platform/agents/wrfc-controller.d.ts +74 -0
- package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-controller.js +368 -9
- package/dist/platform/agents/wrfc-reporting.d.ts +60 -0
- package/dist/platform/agents/wrfc-reporting.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-reporting.js +131 -7
- package/dist/platform/agents/wrfc-types.d.ts +12 -0
- package/dist/platform/agents/wrfc-types.d.ts.map +1 -1
- package/dist/platform/config/manager.d.ts +11 -0
- package/dist/platform/config/manager.d.ts.map +1 -1
- package/dist/platform/config/manager.js +17 -1
- package/dist/platform/config/schema-domain-core.d.ts +2 -0
- package/dist/platform/config/schema-domain-core.d.ts.map +1 -1
- package/dist/platform/config/schema-domain-core.js +17 -0
- package/dist/platform/config/schema-shared.d.ts +6 -0
- package/dist/platform/config/schema-shared.d.ts.map +1 -1
- package/dist/platform/config/schema-types.d.ts +9 -2
- package/dist/platform/config/schema-types.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-calendar.d.ts +9 -0
- package/dist/platform/control-plane/method-catalog-calendar.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-calendar.js +117 -0
- package/dist/platform/control-plane/method-catalog-channels.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-channels.js +174 -0
- package/dist/platform/control-plane/method-catalog-control-automation.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control-automation.js +10 -4
- package/dist/platform/control-plane/method-catalog-email.d.ts +9 -0
- package/dist/platform/control-plane/method-catalog-email.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-email.js +101 -0
- package/dist/platform/control-plane/method-catalog-knowledge.js +4 -4
- package/dist/platform/control-plane/method-catalog-runtime.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-runtime.js +13 -0
- package/dist/platform/control-plane/method-catalog.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog.js +4 -0
- package/dist/platform/control-plane/routes/automation.js +2 -2
- package/dist/platform/control-plane/routes/operator.d.ts.map +1 -1
- package/dist/platform/control-plane/routes/operator.js +2 -0
- package/dist/platform/control-plane/routes/sessions.js +1 -1
- package/dist/platform/daemon/http/router.d.ts.map +1 -1
- package/dist/platform/daemon/http/router.js +12 -2
- package/dist/platform/daemon/http-listener.d.ts +17 -0
- package/dist/platform/daemon/http-listener.d.ts.map +1 -1
- package/dist/platform/daemon/http-listener.js +186 -7
- package/dist/platform/knowledge/knowledge-api.d.ts +1 -1
- package/dist/platform/knowledge/knowledge-api.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-api.js +1 -1
- package/dist/platform/runtime/store/helpers/reducers/lifecycle.d.ts.map +1 -1
- package/dist/platform/runtime/store/helpers/reducers/lifecycle.js +4 -0
- package/dist/platform/runtime/store/helpers/reducers/sync.d.ts.map +1 -1
- package/dist/platform/runtime/store/helpers/reducers/sync.js +4 -0
- package/dist/platform/security/http-auth.d.ts.map +1 -1
- package/dist/platform/security/http-auth.js +11 -4
- package/dist/platform/security/user-auth.d.ts +98 -2
- package/dist/platform/security/user-auth.d.ts.map +1 -1
- package/dist/platform/security/user-auth.js +195 -18
- package/dist/platform/sessions/manager.d.ts +19 -2
- package/dist/platform/sessions/manager.d.ts.map +1 -1
- package/dist/platform/sessions/manager.js +43 -6
- package/dist/platform/state/memory-registry.d.ts +1 -1
- package/dist/platform/state/memory-registry.d.ts.map +1 -1
- package/dist/platform/state/memory-registry.js +2 -2
- package/dist/platform/state/memory-store.d.ts +1 -1
- package/dist/platform/state/memory-store.d.ts.map +1 -1
- package/dist/platform/state/memory-store.js +2 -2
- package/dist/platform/version.js +1 -1
- package/package.json +9 -9
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */
|
|
2
|
+
/**
|
|
3
|
+
* Authentication mode reported by the daemon control plane.
|
|
4
|
+
*
|
|
5
|
+
* - `'anonymous'` — no credentials were supplied.
|
|
6
|
+
* - `'invalid'` — credentials were supplied but are not recognised.
|
|
7
|
+
* - `'session'` — authenticated via a session cookie.
|
|
8
|
+
* - `'shared-token'` — authenticated via a shared bearer token.
|
|
9
|
+
*/
|
|
2
10
|
export type ControlPlaneAuthMode = 'anonymous' | 'invalid' | 'session' | 'shared-token';
|
|
11
|
+
/**
|
|
12
|
+
* Point-in-time snapshot of the daemon control-plane auth state for the
|
|
13
|
+
* current request principal. Returned by `sdk.auth.current()` and used
|
|
14
|
+
* internally by `PermissionResolver`.
|
|
15
|
+
*/
|
|
3
16
|
export interface ControlPlaneAuthSnapshot {
|
|
17
|
+
/** `true` when the principal is authenticated (mode is `'session'` or `'shared-token'`). */
|
|
4
18
|
readonly authenticated: boolean;
|
|
19
|
+
/** The authentication mode active for this request. */
|
|
5
20
|
readonly authMode: ControlPlaneAuthMode;
|
|
21
|
+
/** `true` when any token value was present on the request (regardless of validity). */
|
|
6
22
|
readonly tokenPresent: boolean;
|
|
23
|
+
/** `true` when an `Authorization` header was present on the request. */
|
|
7
24
|
readonly authorizationHeaderPresent: boolean;
|
|
25
|
+
/** `true` when the session cookie was present on the request. */
|
|
8
26
|
readonly sessionCookiePresent: boolean;
|
|
27
|
+
/** The principal identifier (user id, bot id, etc.), or `null` for anonymous/invalid. */
|
|
9
28
|
readonly principalId: string | null;
|
|
29
|
+
/** The category of the authenticated principal, or `null` when not authenticated. */
|
|
10
30
|
readonly principalKind: 'user' | 'bot' | 'service' | 'token' | null;
|
|
31
|
+
/** `true` when the principal holds daemon admin privileges. */
|
|
11
32
|
readonly admin: boolean;
|
|
33
|
+
/** OAuth / permission scopes granted to the principal. */
|
|
12
34
|
readonly scopes: readonly string[];
|
|
35
|
+
/** Role identifiers assigned to the principal. */
|
|
13
36
|
readonly roles: readonly string[];
|
|
14
37
|
}
|
|
15
38
|
//# sourceMappingURL=control-plane-auth-snapshot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-plane-auth-snapshot.d.ts","sourceRoot":"","sources":["../../src/client-auth/control-plane-auth-snapshot.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;AAExF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;IAC7C,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;IACpE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC"}
|
|
1
|
+
{"version":3,"file":"control-plane-auth-snapshot.d.ts","sourceRoot":"","sources":["../../src/client-auth/control-plane-auth-snapshot.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;AAExF;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,4FAA4F;IAC5F,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC;IACxC,uFAAuF;IACvF,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,wEAAwE;IACxE,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;IAC7C,iEAAiE;IACjE,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,yFAAyF;IACzF,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,qFAAqF;IACrF,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;IACpE,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,kDAAkD;IAClD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC"}
|
|
@@ -5,17 +5,35 @@
|
|
|
5
5
|
* runtime-neutral entry points (auth.ts, react-native.ts, browser.ts, etc.)
|
|
6
6
|
* without pulling in node:crypto.
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* Ephemeral state produced at the start of an OAuth PKCE flow.
|
|
10
|
+
* Pass this object to `completeOAuthFlow()` once the authorisation server
|
|
11
|
+
* redirects back to `redirectUri` with a `code` parameter.
|
|
12
|
+
*/
|
|
8
13
|
export interface OAuthStartState {
|
|
14
|
+
/** The authorisation server URL to redirect the user to. */
|
|
9
15
|
readonly authorizationUrl: string;
|
|
16
|
+
/** The `state` nonce sent to the authorisation server; verify it matches on callback. */
|
|
10
17
|
readonly state: string;
|
|
18
|
+
/** The PKCE code verifier; kept secret until the token exchange step. */
|
|
11
19
|
readonly verifier: string;
|
|
20
|
+
/** The redirect URI registered with the authorisation server. */
|
|
12
21
|
readonly redirectUri: string;
|
|
13
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Normalised token payload returned after a successful OAuth token exchange.
|
|
25
|
+
* Stored in the configured `GoodVibesTokenStore` and used by `AutoRefreshCoordinator`.
|
|
26
|
+
*/
|
|
14
27
|
export interface OAuthTokenPayload {
|
|
28
|
+
/** The bearer access token. */
|
|
15
29
|
readonly accessToken: string;
|
|
30
|
+
/** The refresh token, if issued by the provider. */
|
|
16
31
|
readonly refreshToken?: string | undefined;
|
|
32
|
+
/** The token type (typically `'Bearer'`). */
|
|
17
33
|
readonly tokenType: string;
|
|
34
|
+
/** Unix-epoch millisecond timestamp when `accessToken` expires, if known. */
|
|
18
35
|
readonly expiresAt?: number | undefined;
|
|
36
|
+
/** Scopes granted by the token, if returned by the provider. */
|
|
19
37
|
readonly scopes?: readonly string[] | undefined;
|
|
20
38
|
}
|
|
21
39
|
//# sourceMappingURL=oauth-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-types.d.ts","sourceRoot":"","sources":["../../src/client-auth/oauth-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,KAAK,EAA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
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import type { OperatorMethodInput, OperatorMethodOutput } from '@pellux/goodvibes-contracts';
|
|
2
|
+
/** Response shape returned by `sdk.auth.current()` — the daemon's view of the current principal. */
|
|
2
3
|
export type GoodVibesCurrentAuth = OperatorMethodOutput<'control.auth.current'>;
|
|
4
|
+
/** Input payload for `sdk.auth.login()` — typically `{ username, password }`. */
|
|
3
5
|
export type GoodVibesLoginInput = OperatorMethodInput<'control.auth.login'>;
|
|
6
|
+
/** Successful login response, including the issued token and optional `expiresAt` (Unix ms). */
|
|
4
7
|
export type GoodVibesLoginOutput = OperatorMethodOutput<'control.auth.login'>;
|
|
8
|
+
/**
|
|
9
|
+
* Minimal token storage contract used by the GoodVibes SDK.
|
|
10
|
+
*
|
|
11
|
+
* Implement this interface when you need custom token persistence (e.g.
|
|
12
|
+
* encrypted storage, platform keychains, or external secret stores).
|
|
13
|
+
* For common use cases, use the built-in factories:
|
|
14
|
+
* - `createMemoryTokenStore` — in-memory (default when `authToken` is provided)
|
|
15
|
+
* - `createBrowserTokenStore` — `localStorage`-backed (browser)
|
|
16
|
+
* - `createExpoSecureTokenStore` — Expo secure store (React Native Expo)
|
|
17
|
+
* - `createIOSKeychainTokenStore` — iOS Keychain (bare React Native)
|
|
18
|
+
* - `createAndroidKeystoreTokenStore` — Android Keystore (bare React Native)
|
|
19
|
+
*/
|
|
5
20
|
export interface GoodVibesTokenStore {
|
|
21
|
+
/** Return the stored auth token, or `null` if none is present. */
|
|
6
22
|
getToken(): Promise<string | null>;
|
|
23
|
+
/** Persist a new token, or clear storage when `null` is passed. */
|
|
7
24
|
setToken(token: string | null): Promise<void>;
|
|
25
|
+
/** Equivalent to `setToken(null)` — removes the stored token. */
|
|
8
26
|
clearToken(): Promise<void>;
|
|
9
27
|
}
|
|
10
28
|
/**
|
|
@@ -22,7 +40,15 @@ export interface GoodVibesExpiringTokenStore extends GoodVibesTokenStore {
|
|
|
22
40
|
}>;
|
|
23
41
|
setTokenEntry(token: string | null, expiresAt?: number): Promise<void>;
|
|
24
42
|
}
|
|
43
|
+
/** Options for `sdk.auth.login()`. */
|
|
25
44
|
export interface GoodVibesAuthLoginOptions {
|
|
45
|
+
/**
|
|
46
|
+
* When `true` (default), automatically persist the token returned by the
|
|
47
|
+
* login response into the configured token store. Set to `false` to handle
|
|
48
|
+
* persistence manually.
|
|
49
|
+
*
|
|
50
|
+
* @defaultValue true
|
|
51
|
+
*/
|
|
26
52
|
readonly persistToken?: boolean | undefined;
|
|
27
53
|
}
|
|
28
54
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client-auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;AAE9E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,aAAa,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvE,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE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C,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7C"}
|
package/dist/client.d.ts
CHANGED
|
@@ -164,8 +164,11 @@ export interface GoodVibesSdkOptions {
|
|
|
164
164
|
* Options controlling realtime transport behaviour.
|
|
165
165
|
*/
|
|
166
166
|
export interface GoodVibesRealtimeOptions {
|
|
167
|
+
/** Reconnect policy for the SSE event-source connection. */
|
|
167
168
|
readonly sseReconnect?: StreamReconnectPolicy | undefined;
|
|
169
|
+
/** Reconnect policy for the WebSocket connection. */
|
|
168
170
|
readonly webSocketReconnect?: StreamReconnectPolicy | undefined;
|
|
171
|
+
/** Called when the realtime transport encounters an unrecoverable error. */
|
|
169
172
|
readonly onError?: ((error: unknown) => void) | undefined;
|
|
170
173
|
}
|
|
171
174
|
/**
|
|
@@ -193,7 +196,26 @@ export interface GoodVibesRealtimeOptions {
|
|
|
193
196
|
* });
|
|
194
197
|
*/
|
|
195
198
|
export interface GoodVibesRealtime {
|
|
199
|
+
/**
|
|
200
|
+
* Open a Server-Sent Events stream and return a typed event bus.
|
|
201
|
+
*
|
|
202
|
+
* The connection is established lazily on the first `.on()` subscription.
|
|
203
|
+
* Each call to `viaSse()` returns a fresh, independent event bus.
|
|
204
|
+
*
|
|
205
|
+
* @returns A `RemoteRuntimeEvents` instance subscribed to all runtime event domains.
|
|
206
|
+
*/
|
|
196
207
|
viaSse(): RemoteRuntimeEvents<AnyRuntimeEvent>;
|
|
208
|
+
/**
|
|
209
|
+
* Open a WebSocket connection and return a typed event bus.
|
|
210
|
+
*
|
|
211
|
+
* Optionally pass a custom `WebSocket` constructor (required in Node.js < 21
|
|
212
|
+
* or when using a polyfill). Falls back to `options.WebSocketImpl` supplied
|
|
213
|
+
* at SDK construction time, then `globalThis.WebSocket`.
|
|
214
|
+
*
|
|
215
|
+
* @param webSocketImpl - Optional WebSocket constructor override.
|
|
216
|
+
* @returns A `RemoteRuntimeEvents` instance subscribed to all runtime event domains.
|
|
217
|
+
* @throws `ConfigurationError` when no WebSocket implementation is available.
|
|
218
|
+
*/
|
|
197
219
|
viaWebSocket(webSocketImpl?: typeof WebSocket): RemoteRuntimeEvents<AnyRuntimeEvent>;
|
|
198
220
|
}
|
|
199
221
|
/**
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,WAAW,EAEjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,KAAK,OAAO,EAEb,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,WAAW,CAAC;AAKnB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;;;;;;;;;;GAiBG;AACH,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;;;;OAQG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAE/C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAEtD;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAEtD;;;OAGG;IACH,QAAQ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