Initial commit: notification-elements-demo app

Interactive Angular 19 demo for @sda/notification-elements-ui with
6 sections: Bell & Feed, Notification Center, Inbox, Comments &
Threads, Mention Input, and Full-Featured layout. Includes mock
data, dark mode toggle, and real-time event log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Giuliano Silvestro
2026-02-13 21:49:19 +10:00
commit 5d0c9ec7eb
36473 changed files with 3778146 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
import { Reader } from '@jsonjoy.com/buffers/lib/Reader';
import { RpcMessage } from './messages';
export declare class RpcMessageDecoder {
decodeMessage(reader: Reader): RpcMessage | undefined;
private readOpaqueAuth;
}

View File

@@ -0,0 +1,109 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RpcMessageDecoder = void 0;
const Reader_1 = require("@jsonjoy.com/buffers/lib/Reader");
const errors_1 = require("./errors");
const messages_1 = require("./messages");
const EMPTY_BUFFER = new Uint8Array(0);
const EMPTY_READER = new Reader_1.Reader(EMPTY_BUFFER);
class RpcMessageDecoder {
decodeMessage(reader) {
const startPos = reader.x;
try {
if (reader.size() < 8)
return undefined;
const xid = reader.u32();
const msgType = reader.u32();
if (msgType === 0) {
if (reader.size() < 20)
return (reader.x = startPos), undefined;
const rpcvers = reader.u32();
const prog = reader.u32();
const vers = reader.u32();
const proc = reader.u32();
const cred = this.readOpaqueAuth(reader);
if (!cred)
return (reader.x = startPos), undefined;
const verf = this.readOpaqueAuth(reader);
if (!verf)
return (reader.x = startPos), undefined;
const params = reader.size() > 0 ? reader.cut(reader.size()) : undefined;
return new messages_1.RpcCallMessage(xid, rpcvers, prog, vers, proc, cred, verf, params);
}
else if (msgType === 1) {
if (reader.size() < 4)
return (reader.x = startPos), undefined;
const replyStat = reader.u32();
if (replyStat === 0) {
const verf = this.readOpaqueAuth(reader);
if (!verf || reader.size() < 4)
return (reader.x = startPos), undefined;
const acceptStat = reader.u32();
let mismatchInfo;
if (acceptStat === 2) {
if (reader.size() < 8)
return (reader.x = startPos), undefined;
const low = reader.u32();
const high = reader.u32();
mismatchInfo = new messages_1.RpcMismatchInfo(low, high);
}
const results = reader.size() > 0 ? reader.cut(reader.size()) : undefined;
return new messages_1.RpcAcceptedReplyMessage(xid, verf, acceptStat, mismatchInfo, results);
}
else if (replyStat === 1) {
if (reader.size() < 4)
return (reader.x = startPos), undefined;
const rejectStat = reader.u32();
let mismatchInfo;
let authStat;
if (rejectStat === 0) {
if (reader.size() < 8)
return (reader.x = startPos), undefined;
const low = reader.u32();
const high = reader.u32();
mismatchInfo = new messages_1.RpcMismatchInfo(low, high);
if (!mismatchInfo)
return (reader.x = startPos), undefined;
}
else if (rejectStat === 1) {
if (reader.size() < 4)
return (reader.x = startPos), undefined;
authStat = reader.u32();
}
return new messages_1.RpcRejectedReplyMessage(xid, rejectStat, mismatchInfo, authStat);
}
else {
throw new errors_1.RpcDecodingError('Invalid reply_stat');
}
}
else {
throw new errors_1.RpcDecodingError('Invalid msg_type');
}
}
catch (err) {
if (err instanceof RangeError) {
reader.x = startPos;
return undefined;
}
throw err;
}
}
readOpaqueAuth(reader) {
if (reader.size() < 8)
return undefined;
const flavor = reader.u32();
const length = reader.u32();
if (length > 400)
throw new errors_1.RpcDecodingError('Auth body too large');
const paddedLength = (length + 3) & ~3;
if (reader.size() < paddedLength)
return undefined;
const body = length > 0 ? reader.cut(length) : EMPTY_READER;
const padding = paddedLength - length;
if (padding > 0)
reader.skip(padding);
return new messages_1.RpcOpaqueAuth(flavor, body);
}
}
exports.RpcMessageDecoder = RpcMessageDecoder;
//# sourceMappingURL=RpcMessageDecoder.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"RpcMessageDecoder.js","sourceRoot":"","sources":["../../src/rpc/RpcMessageDecoder.ts"],"names":[],"mappings":";;;AAAA,4DAAuD;AAEvD,qCAA0C;AAC1C,yCAOoB;AAEpB,MAAM,YAAY,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;AACvC,MAAM,YAAY,GAAG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;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,yBAAgB,CAAC,kBAAkB,CAAC,CAAC;YACjD,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,UAAU,EAAE,CAAC;gBAC9B,MAAM,CAAC,CAAC,GAAG,QAAQ,CAAC;gBACpB,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;IAEO,cAAc,CAAC,MAAc;QACnC,IAAI,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,SAAS,CAAC;QACxC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;QAC5B,IAAI,MAAM,GAAG,GAAG;YAAE,MAAM,IAAI,yBAAgB,CAAC,qBAAqB,CAAC,CAAC;QACpE,MAAM,YAAY,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACvC,IAAI,MAAM,CAAC,IAAI,EAAE,GAAG,YAAY;YAAE,OAAO,SAAS,CAAC;QACnD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;QAC5D,MAAM,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC;QACtC,IAAI,OAAO,GAAG,CAAC;YAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,IAAI,wBAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;CACF;AA/ED,8CA+EC"}

View File

@@ -0,0 +1,28 @@
import { Reader } from '@jsonjoy.com/buffers/lib/Reader';
import { RpcOpaqueAuth, RpcMessage } from './messages';
import type { IWriter, IWriterGrowable } from '@jsonjoy.com/util/lib/buffers';
export declare class RpcMessageEncoder<W extends IWriter & IWriterGrowable = IWriter & IWriterGrowable> {
readonly writer: W;
constructor(writer?: W);
encodeCall(xid: number, prog: number, vers: number, proc: number, cred: RpcOpaqueAuth, verf: RpcOpaqueAuth, params?: Reader | Uint8Array): Uint8Array;
encodeAcceptedReply(xid: number, verf: RpcOpaqueAuth, acceptStat: number, mismatchInfo?: {
low: number;
high: number;
}, results?: Reader | Uint8Array): Uint8Array;
encodeRejectedReply(xid: number, rejectStat: number, mismatchInfo?: {
low: number;
high: number;
}, authStat?: number): Uint8Array;
encodeMessage(msg: RpcMessage): Uint8Array;
writeMessage(msg: RpcMessage): void;
writeCall(xid: number, prog: number, vers: number, proc: number, cred: RpcOpaqueAuth, verf: RpcOpaqueAuth, params?: Reader | Uint8Array): void;
writeAcceptedReply(xid: number, verf: RpcOpaqueAuth, acceptStat: number, mismatchInfo?: {
low: number;
high: number;
}, results?: Reader | Uint8Array): void;
writeRejectedReply(xid: number, rejectStat: number, mismatchInfo?: {
low: number;
high: number;
}, authStat?: number): void;
private writeOpaqueAuth;
}

View File

@@ -0,0 +1,152 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RpcMessageEncoder = void 0;
const Writer_1 = require("@jsonjoy.com/util/lib/buffers/Writer");
const Reader_1 = require("@jsonjoy.com/buffers/lib/Reader");
const constants_1 = require("./constants");
const errors_1 = require("./errors");
const messages_1 = require("./messages");
class RpcMessageEncoder {
constructor(writer = new Writer_1.Writer()) {
this.writer = writer;
}
encodeCall(xid, prog, vers, proc, cred, verf, params) {
this.writeCall(xid, prog, vers, proc, cred, verf, params);
return this.writer.flush();
}
encodeAcceptedReply(xid, verf, acceptStat, mismatchInfo, results) {
this.writeAcceptedReply(xid, verf, acceptStat, mismatchInfo, results);
return this.writer.flush();
}
encodeRejectedReply(xid, rejectStat, mismatchInfo, authStat) {
this.writeRejectedReply(xid, rejectStat, mismatchInfo, authStat);
return this.writer.flush();
}
encodeMessage(msg) {
this.writeMessage(msg);
return this.writer.flush();
}
writeMessage(msg) {
if (msg instanceof messages_1.RpcCallMessage) {
this.writeCall(msg.xid, msg.prog, msg.vers, msg.proc, msg.cred, msg.verf, msg.params);
}
else if (msg instanceof messages_1.RpcAcceptedReplyMessage) {
this.writeAcceptedReply(msg.xid, msg.verf, msg.stat, msg.mismatchInfo, msg.results);
}
else if (msg instanceof messages_1.RpcRejectedReplyMessage) {
this.writeRejectedReply(msg.xid, msg.stat, msg.mismatchInfo, msg.authStat);
}
}
writeCall(xid, prog, vers, proc, cred, verf, params) {
const writer = this.writer;
writer.ensureCapacity(16 * 4);
const view = writer.view;
let x = writer.x;
view.setUint32(x, xid, false);
x += 4;
view.setUint32(x, 0, false);
x += 4;
view.setUint32(x, constants_1.RPC_VERSION, false);
x += 4;
view.setUint32(x, prog, false);
x += 4;
view.setUint32(x, vers, false);
x += 4;
view.setUint32(x, proc, false);
x += 4;
writer.x = x;
this.writeOpaqueAuth(cred);
this.writeOpaqueAuth(verf);
if (params instanceof Uint8Array) {
if (params.length > 0)
writer.buf(params, params.length);
}
else if (params instanceof Reader_1.Reader) {
const size = params.size();
if (size > 0)
writer.buf(params.subarray(0, size), size);
}
}
writeAcceptedReply(xid, verf, acceptStat, mismatchInfo, results) {
const writer = this.writer;
writer.ensureCapacity(16 * 4);
const view = writer.view;
let x = writer.x;
view.setUint32(x, xid, false);
x += 4;
view.setUint32(x, 1, false);
x += 4;
view.setUint32(x, 0, false);
x += 4;
writer.x = x;
this.writeOpaqueAuth(verf);
writer.u32(acceptStat);
if (mismatchInfo) {
writer.u32(mismatchInfo.low);
writer.u32(mismatchInfo.high);
}
if (results) {
if (results instanceof Uint8Array) {
if (results.length > 0)
writer.buf(results, results.length);
}
else {
const size = results.size();
if (size > 0)
writer.buf(results.uint8, size);
}
}
}
writeRejectedReply(xid, rejectStat, mismatchInfo, authStat) {
const writer = this.writer;
writer.ensureCapacity(7 * 4);
const view = writer.view;
let x = writer.x;
view.setUint32(x, xid, false);
x += 4;
view.setUint32(x, 1, false);
x += 4;
view.setUint32(x, 1, false);
x += 4;
view.setUint32(x, rejectStat, false);
x += 4;
if (mismatchInfo) {
view.setUint32(x, mismatchInfo.low, false);
x += 4;
view.setUint32(x, mismatchInfo.high, false);
x += 4;
}
if (authStat !== undefined) {
view.setUint32(x, authStat, false);
x += 4;
}
writer.x = x;
}
writeOpaqueAuth(auth) {
const writer = this.writer;
const body = auth.body;
const length = body.size();
if (length > 400)
throw new errors_1.RpcEncodingError('Auth body too large');
writer.ensureCapacity(2 * 4 + length + 3);
const view = writer.view;
let x = writer.x;
view.setUint32(x, auth.flavor, false);
x += 4;
view.setUint32(x, length, false);
x += 4;
if (length > 0) {
writer.x = x;
writer.buf(body.subarray(0, length), length);
x = writer.x;
const padding = (4 - (length % 4)) % 4;
for (let i = 0; i < padding; i++) {
view.setUint8(x, 0);
x += 1;
}
}
writer.x = x;
}
}
exports.RpcMessageEncoder = RpcMessageEncoder;
//# sourceMappingURL=RpcMessageEncoder.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,50 @@
export declare const enum RpcMsgType {
CALL = 0,
REPLY = 1
}
export declare const enum RpcReplyStat {
MSG_ACCEPTED = 0,
MSG_DENIED = 1
}
export declare const enum RpcAcceptStat {
SUCCESS = 0,
PROG_UNAVAIL = 1,
PROG_MISMATCH = 2,
PROC_UNAVAIL = 3,
GARBAGE_ARGS = 4,
SYSTEM_ERR = 5
}
export declare const enum RpcRejectStat {
RPC_MISMATCH = 0,
AUTH_ERROR = 1
}
export declare const enum RpcAuthStat {
AUTH_OK = 0,
AUTH_BADCRED = 1,
AUTH_REJECTEDCRED = 2,
AUTH_BADVERF = 3,
AUTH_REJECTEDVERF = 4,
AUTH_TOOWEAK = 5,
AUTH_INVALIDRESP = 6,
AUTH_FAILED = 7,
AUTH_KERB_GENERIC = 8,
AUTH_TIMEEXPIRE = 9,
AUTH_TKT_FILE = 10,
AUTH_DECODE = 11,
AUTH_NET_ADDR = 12,
RPCSEC_GSS_CREDPROBLEM = 13,
RPCSEC_GSS_CTXPROBLEM = 14
}
export declare const enum RpcAuthFlavor {
AUTH_NONE = 0,
AUTH_SYS = 1,
AUTH_SHORT = 2,
AUTH_DH = 3,
AUTH_KERB = 4,
AUTH_RSA = 5,
RPCSEC_GSS = 6,
AUTH_NULL = 0,
AUTH_UNIX = 1,
AUTH_DES = 3
}
export declare const RPC_VERSION = 2;

View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RPC_VERSION = void 0;
exports.RPC_VERSION = 2;
//# sourceMappingURL=constants.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/rpc/constants.ts"],"names":[],"mappings":";;;AAwGa,QAAA,WAAW,GAAG,CAAC,CAAC"}

View File

@@ -0,0 +1,6 @@
export declare class RpcDecodingError extends Error {
constructor(message?: string);
}
export declare class RpcEncodingError extends Error {
constructor(message?: string);
}

16
node_modules/@jsonjoy.com/json-pack/lib/rpc/errors.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RpcEncodingError = exports.RpcDecodingError = void 0;
class RpcDecodingError extends Error {
constructor(message) {
super(message ? 'RPC_DECODING: ' + message : 'RPC_DECODING');
}
}
exports.RpcDecodingError = RpcDecodingError;
class RpcEncodingError extends Error {
constructor(message) {
super(message ? 'RPC_ENCODING: ' + message : 'RPC_ENCODING');
}
}
exports.RpcEncodingError = RpcEncodingError;
//# sourceMappingURL=errors.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/rpc/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;IAC/D,CAAC;CACF;AAJD,4CAIC;AAED,MAAa,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;IAC/D,CAAC;CACF;AAJD,4CAIC"}

View File

@@ -0,0 +1,5 @@
export * from './constants';
export * from './errors';
export * from './messages';
export * from './RpcMessageDecoder';
export * from './RpcMessageEncoder';

9
node_modules/@jsonjoy.com/json-pack/lib/rpc/index.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./constants"), exports);
tslib_1.__exportStar(require("./errors"), exports);
tslib_1.__exportStar(require("./messages"), exports);
tslib_1.__exportStar(require("./RpcMessageDecoder"), exports);
tslib_1.__exportStar(require("./RpcMessageEncoder"), exports);
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rpc/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,mDAAyB;AACzB,qDAA2B;AAC3B,8DAAoC;AACpC,8DAAoC"}

View File

@@ -0,0 +1,40 @@
import type { Reader } from '@jsonjoy.com/buffers/lib/Reader';
import type { RpcAuthFlavor, RpcAcceptStat, RpcRejectStat, RpcAuthStat } from './constants';
export { RpcMsgType, RpcReplyStat, RpcAcceptStat, RpcRejectStat, RpcAuthStat, RpcAuthFlavor } from './constants';
export declare class RpcOpaqueAuth {
readonly flavor: RpcAuthFlavor;
readonly body: Reader;
constructor(flavor: RpcAuthFlavor, body: Reader);
}
export declare class RpcMismatchInfo {
readonly low: number;
readonly high: number;
constructor(low: number, high: number);
}
export declare class RpcCallMessage {
readonly xid: number;
readonly rpcvers: number;
readonly prog: number;
readonly vers: number;
readonly proc: number;
readonly cred: RpcOpaqueAuth;
readonly verf: RpcOpaqueAuth;
params: Reader | undefined;
constructor(xid: number, rpcvers: number, prog: number, vers: number, proc: number, cred: RpcOpaqueAuth, verf: RpcOpaqueAuth, params?: Reader | undefined);
}
export declare class RpcAcceptedReplyMessage {
readonly xid: number;
readonly verf: RpcOpaqueAuth;
readonly stat: RpcAcceptStat;
readonly mismatchInfo?: RpcMismatchInfo | undefined;
results: Reader | undefined;
constructor(xid: number, verf: RpcOpaqueAuth, stat: RpcAcceptStat, mismatchInfo?: RpcMismatchInfo | undefined, results?: Reader | undefined);
}
export declare class RpcRejectedReplyMessage {
readonly xid: number;
readonly stat: RpcRejectStat;
readonly mismatchInfo?: RpcMismatchInfo | undefined;
readonly authStat?: RpcAuthStat | undefined;
constructor(xid: number, stat: RpcRejectStat, mismatchInfo?: RpcMismatchInfo | undefined, authStat?: RpcAuthStat | undefined);
}
export type RpcMessage = RpcCallMessage | RpcAcceptedReplyMessage | RpcRejectedReplyMessage;

View File

@@ -0,0 +1,50 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RpcRejectedReplyMessage = exports.RpcAcceptedReplyMessage = exports.RpcCallMessage = exports.RpcMismatchInfo = exports.RpcOpaqueAuth = void 0;
class RpcOpaqueAuth {
constructor(flavor, body) {
this.flavor = flavor;
this.body = body;
}
}
exports.RpcOpaqueAuth = RpcOpaqueAuth;
class RpcMismatchInfo {
constructor(low, high) {
this.low = low;
this.high = high;
}
}
exports.RpcMismatchInfo = RpcMismatchInfo;
class RpcCallMessage {
constructor(xid, rpcvers, prog, vers, proc, cred, verf, params = undefined) {
this.xid = xid;
this.rpcvers = rpcvers;
this.prog = prog;
this.vers = vers;
this.proc = proc;
this.cred = cred;
this.verf = verf;
this.params = params;
}
}
exports.RpcCallMessage = RpcCallMessage;
class RpcAcceptedReplyMessage {
constructor(xid, verf, stat, mismatchInfo, results = undefined) {
this.xid = xid;
this.verf = verf;
this.stat = stat;
this.mismatchInfo = mismatchInfo;
this.results = results;
}
}
exports.RpcAcceptedReplyMessage = RpcAcceptedReplyMessage;
class RpcRejectedReplyMessage {
constructor(xid, stat, mismatchInfo, authStat) {
this.xid = xid;
this.stat = stat;
this.mismatchInfo = mismatchInfo;
this.authStat = authStat;
}
}
exports.RpcRejectedReplyMessage = RpcRejectedReplyMessage;
//# sourceMappingURL=messages.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/rpc/messages.ts"],"names":[],"mappings":";;;AAKA,MAAa,aAAa;IACxB,YACkB,MAAqB,EACrB,IAAY;QADZ,WAAM,GAAN,MAAM,CAAe;QACrB,SAAI,GAAJ,IAAI,CAAQ;IAC3B,CAAC;CACL;AALD,sCAKC;AAED,MAAa,eAAe;IAC1B,YACkB,GAAW,EACX,IAAY;QADZ,QAAG,GAAH,GAAG,CAAQ;QACX,SAAI,GAAJ,IAAI,CAAQ;IAC3B,CAAC;CACL;AALD,0CAKC;AAED,MAAa,cAAc;IACzB,YACkB,GAAW,EACX,OAAe,EACf,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,IAAmB,EACnB,IAAmB,EAC5B,SAA6B,SAAS;QAP7B,QAAG,GAAH,GAAG,CAAQ;QACX,YAAO,GAAP,OAAO,CAAQ;QACf,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAe;QACnB,SAAI,GAAJ,IAAI,CAAe;QAC5B,WAAM,GAAN,MAAM,CAAgC;IAC5C,CAAC;CACL;AAXD,wCAWC;AAED,MAAa,uBAAuB;IAClC,YACkB,GAAW,EACX,IAAmB,EACnB,IAAmB,EACnB,YAA8B,EACvC,UAA8B,SAAS;QAJ9B,QAAG,GAAH,GAAG,CAAQ;QACX,SAAI,GAAJ,IAAI,CAAe;QACnB,SAAI,GAAJ,IAAI,CAAe;QACnB,iBAAY,GAAZ,YAAY,CAAkB;QACvC,YAAO,GAAP,OAAO,CAAgC;IAC7C,CAAC;CACL;AARD,0DAQC;AAED,MAAa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