meminsight-core-publish 1.0.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 (85) hide show
  1. package/dist/Index.d.ts +21 -0
  2. package/dist/Index.d.ts.map +1 -0
  3. package/dist/Index.js +65 -0
  4. package/dist/analyzer/AnalysisInfo.d.ts +112 -0
  5. package/dist/analyzer/AnalysisInfo.d.ts.map +1 -0
  6. package/dist/analyzer/AnalysisInfo.js +217 -0
  7. package/dist/analyzer/ArkAnalyzer.d.ts +30 -0
  8. package/dist/analyzer/ArkAnalyzer.d.ts.map +1 -0
  9. package/dist/analyzer/ArkAnalyzer.js +52 -0
  10. package/dist/analyzer/ArkCmpCfg.d.ts +15 -0
  11. package/dist/analyzer/ArkCmpCfg.d.ts.map +1 -0
  12. package/dist/analyzer/ArkCmpCfg.js +15 -0
  13. package/dist/analyzer/ArkCompareAnalyzer.d.ts +52 -0
  14. package/dist/analyzer/ArkCompareAnalyzer.d.ts.map +1 -0
  15. package/dist/analyzer/ArkCompareAnalyzer.js +144 -0
  16. package/dist/analyzer/ArkLeakAnalyzer.d.ts +14 -0
  17. package/dist/analyzer/ArkLeakAnalyzer.d.ts.map +1 -0
  18. package/dist/analyzer/ArkLeakAnalyzer.js +18 -0
  19. package/dist/analyzer/ArkSerializer.d.ts +18 -0
  20. package/dist/analyzer/ArkSerializer.d.ts.map +1 -0
  21. package/dist/analyzer/ArkSerializer.js +155 -0
  22. package/dist/analyzer/ArkStatAnalyzer.d.ts +56 -0
  23. package/dist/analyzer/ArkStatAnalyzer.d.ts.map +1 -0
  24. package/dist/analyzer/ArkStatAnalyzer.js +224 -0
  25. package/dist/analyzer/ArkStatCfg.d.ts +42 -0
  26. package/dist/analyzer/ArkStatCfg.d.ts.map +1 -0
  27. package/dist/analyzer/ArkStatCfg.js +42 -0
  28. package/dist/analyzer/ArkTracePath.d.ts +90 -0
  29. package/dist/analyzer/ArkTracePath.d.ts.map +1 -0
  30. package/dist/analyzer/ArkTracePath.js +245 -0
  31. package/dist/analyzer/ArkTracer.d.ts +17 -0
  32. package/dist/analyzer/ArkTracer.d.ts.map +1 -0
  33. package/dist/analyzer/ArkTracer.js +27 -0
  34. package/dist/analyzer/ArkXAnalyzer.d.ts +69 -0
  35. package/dist/analyzer/ArkXAnalyzer.d.ts.map +1 -0
  36. package/dist/analyzer/ArkXAnalyzer.js +616 -0
  37. package/dist/analyzer/IAnalyzer.d.ts +25 -0
  38. package/dist/analyzer/IAnalyzer.d.ts.map +1 -0
  39. package/dist/analyzer/IAnalyzer.js +2 -0
  40. package/dist/file/FileReader.d.ts +51 -0
  41. package/dist/file/FileReader.d.ts.map +1 -0
  42. package/dist/file/FileReader.js +110 -0
  43. package/dist/file/FileService.d.ts +23 -0
  44. package/dist/file/FileService.d.ts.map +1 -0
  45. package/dist/file/FileService.js +65 -0
  46. package/dist/file/FileWriter.d.ts +82 -0
  47. package/dist/file/FileWriter.d.ts.map +1 -0
  48. package/dist/file/FileWriter.js +160 -0
  49. package/dist/report/Reporter.d.ts +27 -0
  50. package/dist/report/Reporter.d.ts.map +1 -0
  51. package/dist/report/Reporter.js +61 -0
  52. package/dist/report/templates/template.d.ts +3 -0
  53. package/dist/report/templates/template.d.ts.map +1 -0
  54. package/dist/report/templates/template.js +106 -0
  55. package/dist/shell/DeviceShell.d.ts +96 -0
  56. package/dist/shell/DeviceShell.d.ts.map +1 -0
  57. package/dist/shell/DeviceShell.js +180 -0
  58. package/dist/shell/Shell.d.ts +52 -0
  59. package/dist/shell/Shell.d.ts.map +1 -0
  60. package/dist/shell/Shell.js +79 -0
  61. package/dist/types/Constants.d.ts +15 -0
  62. package/dist/types/Constants.d.ts.map +1 -0
  63. package/dist/types/Constants.js +18 -0
  64. package/dist/types/LeakTypes.d.ts +18 -0
  65. package/dist/types/LeakTypes.d.ts.map +1 -0
  66. package/dist/types/LeakTypes.js +2 -0
  67. package/dist/types/OhosTypes.d.ts +74 -0
  68. package/dist/types/OhosTypes.d.ts.map +1 -0
  69. package/dist/types/OhosTypes.js +83 -0
  70. package/dist/utils/Common.d.ts +14 -0
  71. package/dist/utils/Common.d.ts.map +1 -0
  72. package/dist/utils/Common.js +38 -0
  73. package/dist/utils/Finder.d.ts +163 -0
  74. package/dist/utils/Finder.d.ts.map +1 -0
  75. package/dist/utils/Finder.js +355 -0
  76. package/dist/utils/Loader.d.ts +30 -0
  77. package/dist/utils/Loader.d.ts.map +1 -0
  78. package/dist/utils/Loader.js +71 -0
  79. package/dist/utils/Log.d.ts +140 -0
  80. package/dist/utils/Log.d.ts.map +1 -0
  81. package/dist/utils/Log.js +177 -0
  82. package/dist/utils/Output.d.ts +126 -0
  83. package/dist/utils/Output.d.ts.map +1 -0
  84. package/dist/utils/Output.js +225 -0
  85. package/package.json +61 -0
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Loader = void 0;
13
+ const core_1 = require("@memlab/core");
14
+ const heap_analysis_1 = require("@memlab/heap-analysis");
15
+ const Log_1 = require("../utils/Log");
16
+ /**
17
+ * Loader
18
+ */
19
+ class Loader {
20
+ /**
21
+ * 加载HeapSnapshot文件
22
+ * @param file 文件路径
23
+ * @param log 是否打印日志
24
+ * @returns IHeapSnapshot 对象
25
+ */
26
+ static loadFromFile(file_1) {
27
+ return __awaiter(this, arguments, void 0, function* (file, log = false) {
28
+ if (log)
29
+ Log_1.Log.info(Loader.DOMAIN, Loader.TAG, `Loading heapsnapshot from file: ${file}`);
30
+ const snapshot = yield (0, heap_analysis_1.getFullHeapFromFile)(file);
31
+ if (log)
32
+ Log_1.Log.info(Loader.DOMAIN, Loader.TAG, `Loaded heapsnapshot from file: ${file}`);
33
+ return snapshot;
34
+ });
35
+ }
36
+ /**
37
+ * 加载HeapSnapshot文件
38
+ * @param file 文件路径
39
+ * @param options 可选参数选项
40
+ * @param log 是否打印日志
41
+ * @returns IHeapSnapshot 对象
42
+ */
43
+ static loadFromFileOption(file_1, options_1) {
44
+ return __awaiter(this, arguments, void 0, function* (file, options, log = false) {
45
+ if (log)
46
+ Log_1.Log.info(Loader.DOMAIN, Loader.TAG, `Loading heapsnapshot from file: ${file}`);
47
+ const snapshot = yield core_1.utils.getSnapshotFromFile(file, options);
48
+ if (log)
49
+ Log_1.Log.info(Loader.DOMAIN, Loader.TAG, `Loaded heapsnapshot from file: ${file}`);
50
+ return snapshot;
51
+ });
52
+ }
53
+ /**
54
+ * Heapsnapshot 多文件加载
55
+ * @param files 多文件路径集合
56
+ * @returns IHeapSnapshot 对象集合
57
+ */
58
+ static loadFromFiles(files) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const result = new Array();
61
+ files.forEach((file) => __awaiter(this, void 0, void 0, function* () {
62
+ const heap = yield (0, heap_analysis_1.getFullHeapFromFile)(file);
63
+ result.push(heap);
64
+ }));
65
+ return result;
66
+ });
67
+ }
68
+ }
69
+ exports.Loader = Loader;
70
+ Loader.DOMAIN = 'HeapSnapshot';
71
+ Loader.TAG = 'Loader';
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Logger interface
3
+ */
4
+ export interface ILogger {
5
+ /**
6
+ * print debug message
7
+ * @param domain log domain
8
+ * @param tag log tag
9
+ * @param message log message
10
+ */
11
+ debug(domain: string, tag: string, message: string): void;
12
+ /**
13
+ * print info message
14
+ * @param domain log domain
15
+ * @param tag log tag
16
+ * @param message log message
17
+ */
18
+ info(domain: string, tag: string, message: string): void;
19
+ /**
20
+ * print warn message
21
+ * @param domain log domain
22
+ * @param tag log tag
23
+ * @param message log message
24
+ */
25
+ warn(domain: string, tag: string, message: string): void;
26
+ /**
27
+ * print error message
28
+ * @param domain log domain
29
+ * @param tag log tag
30
+ * @param message log message
31
+ */
32
+ error(domain: string, tag: string, message: string): void;
33
+ /**
34
+ * print fatal message
35
+ * @param domain log domain
36
+ * @param tag log tag
37
+ * @param message log message
38
+ */
39
+ fatal(domain: string, tag: string, message: string): void;
40
+ }
41
+ /**
42
+ * Log Type
43
+ */
44
+ export declare enum LogType {
45
+ DEBUG = "DEBUG",
46
+ INFO = "INFO",
47
+ WARN = "WARN",
48
+ ERROR = "ERROR",
49
+ FATAL = "FATAL"
50
+ }
51
+ /**
52
+ * Loggable interface
53
+ */
54
+ export interface ILoggable {
55
+ /**
56
+ * Domain
57
+ */
58
+ DOMAIN: string;
59
+ /**
60
+ * Tag
61
+ */
62
+ TAG: string;
63
+ }
64
+ /**
65
+ * Log class
66
+ */
67
+ export declare class Log {
68
+ private static _logger;
69
+ /**
70
+ * set logger instance
71
+ * @param logger logger instance
72
+ */
73
+ static setLogger(logger: ILogger): void;
74
+ /**
75
+ * print debug message
76
+ * @param domain log domain
77
+ * @param tag log tag
78
+ * @param message log message
79
+ */
80
+ static debug(domain: string, tag: string, message: string): void;
81
+ /**
82
+ * print info message
83
+ * @param domain log domain
84
+ * @param tag log tag
85
+ * @param message log message
86
+ */
87
+ static info(domain: string, tag: string, message: string): void;
88
+ /**
89
+ * print warn message
90
+ * @param domain log domain
91
+ * @param tag log tag
92
+ * @param message log message
93
+ */
94
+ static warn(domain: string, tag: string, message: string): void;
95
+ /**
96
+ * print error message
97
+ * @param domain log domain
98
+ * @param tag log tag
99
+ * @param message log message
100
+ */
101
+ static error(domain: string, tag: string, message: string): void;
102
+ /**
103
+ * print fatal message
104
+ * @param domain log domain
105
+ * @param tag log tag
106
+ * @param message log message
107
+ */
108
+ static fatal(domain: string, tag: string, message: string): void;
109
+ /**
110
+ * print debug message
111
+ * @param instance loggable instance
112
+ * @param message log message
113
+ */
114
+ static debugX(instance: ILoggable, message: string): void;
115
+ /**
116
+ * print info message
117
+ * @param instance loggable instance
118
+ * @param message log message
119
+ */
120
+ static infoX(instance: ILoggable, message: string): void;
121
+ /**
122
+ * print warn message
123
+ * @param instance loggable instance
124
+ * @param message log message
125
+ */
126
+ static warnX(instance: ILoggable, message: string): void;
127
+ /**
128
+ * print error message
129
+ * @param instance loggable instance
130
+ * @param message log message
131
+ */
132
+ static errorX(instance: ILoggable, message: string): void;
133
+ /**
134
+ * print fatal message
135
+ * @param instance loggable instance
136
+ * @param message log message
137
+ */
138
+ static fatalX(instance: ILoggable, message: string): void;
139
+ }
140
+ //# sourceMappingURL=Log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Log.d.ts","sourceRoot":"","sources":["../../src/utils/Log.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB;;;;;OAKG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAI,IAAI,CAAC;IAE3D;;;;;OAKG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAI,IAAI,CAAC;IAE1D;;;;;OAKG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAI,IAAI,CAAC;IAE1D;;;;;OAKG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAI,IAAI,CAAC;IAE3D;;;;;OAKG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAI,IAAI,CAAC;CAC9D;AAED;;GAEG;AAC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,EAAE,MAAM;CAG5D"}
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Log = exports.LogType = void 0;
4
+ /**
5
+ * Log Type
6
+ */
7
+ var LogType;
8
+ (function (LogType) {
9
+ LogType["DEBUG"] = "DEBUG";
10
+ LogType["INFO"] = "INFO";
11
+ LogType["WARN"] = "WARN";
12
+ LogType["ERROR"] = "ERROR";
13
+ LogType["FATAL"] = "FATAL";
14
+ })(LogType || (exports.LogType = LogType = {}));
15
+ /**
16
+ * Logger class
17
+ */
18
+ class Logger {
19
+ constructor(enableTime = true) {
20
+ this._enableTime = enableTime;
21
+ }
22
+ /**
23
+ * print log
24
+ * @param logType log type
25
+ * @param domain domain
26
+ * @param tag tag
27
+ * @param message message
28
+ */
29
+ print(logType, domain, tag, message) {
30
+ const curTime = this._enableTime ? `${new Date().toISOString().replace('Z', '')}` : '*';
31
+ console.log(`${curTime} | [${logType}] | ${domain}-${tag}: ${message}`);
32
+ }
33
+ /**
34
+ * print debug message
35
+ * @param domain log domain
36
+ * @param tag log tag
37
+ * @param message log message
38
+ */
39
+ debug(domain, tag, message) {
40
+ this.print(LogType.DEBUG, domain, tag, message);
41
+ }
42
+ /**
43
+ * print info message
44
+ * @param domain log domain
45
+ * @param tag log tag
46
+ * @param message log message
47
+ */
48
+ info(domain, tag, message) {
49
+ this.print(LogType.INFO, domain, tag, message);
50
+ }
51
+ /**
52
+ * print warn message
53
+ * @param domain log domain
54
+ * @param tag log tag
55
+ * @param message log message
56
+ */
57
+ warn(domain, tag, message) {
58
+ this.print(LogType.WARN, domain, tag, message);
59
+ }
60
+ /**
61
+ * print error message
62
+ * @param domain log domain
63
+ * @param tag log tag
64
+ * @param message log message
65
+ */
66
+ error(domain, tag, message) {
67
+ this.print(LogType.ERROR, domain, tag, message);
68
+ }
69
+ /**
70
+ * print fatal message
71
+ * @param domain log domain
72
+ * @param tag log tag
73
+ * @param message log message
74
+ */
75
+ fatal(domain, tag, message) {
76
+ this.print(LogType.FATAL, domain, tag, message);
77
+ }
78
+ }
79
+ /**
80
+ * Log class
81
+ */
82
+ class Log {
83
+ /**
84
+ * set logger instance
85
+ * @param logger logger instance
86
+ */
87
+ static setLogger(logger) {
88
+ this._logger = logger;
89
+ }
90
+ /**
91
+ * print debug message
92
+ * @param domain log domain
93
+ * @param tag log tag
94
+ * @param message log message
95
+ */
96
+ static debug(domain, tag, message) {
97
+ this._logger.debug(domain, tag, message);
98
+ }
99
+ /**
100
+ * print info message
101
+ * @param domain log domain
102
+ * @param tag log tag
103
+ * @param message log message
104
+ */
105
+ static info(domain, tag, message) {
106
+ this._logger.info(domain, tag, message);
107
+ }
108
+ /**
109
+ * print warn message
110
+ * @param domain log domain
111
+ * @param tag log tag
112
+ * @param message log message
113
+ */
114
+ static warn(domain, tag, message) {
115
+ this._logger.warn(domain, tag, message);
116
+ }
117
+ /**
118
+ * print error message
119
+ * @param domain log domain
120
+ * @param tag log tag
121
+ * @param message log message
122
+ */
123
+ static error(domain, tag, message) {
124
+ this._logger.error(domain, tag, message);
125
+ }
126
+ /**
127
+ * print fatal message
128
+ * @param domain log domain
129
+ * @param tag log tag
130
+ * @param message log message
131
+ */
132
+ static fatal(domain, tag, message) {
133
+ this._logger.fatal(domain, tag, message);
134
+ }
135
+ /**
136
+ * print debug message
137
+ * @param instance loggable instance
138
+ * @param message log message
139
+ */
140
+ static debugX(instance, message) {
141
+ this._logger.debug(instance.DOMAIN, instance.TAG, message);
142
+ }
143
+ /**
144
+ * print info message
145
+ * @param instance loggable instance
146
+ * @param message log message
147
+ */
148
+ static infoX(instance, message) {
149
+ this._logger.info(instance.DOMAIN, instance.TAG, message);
150
+ }
151
+ /**
152
+ * print warn message
153
+ * @param instance loggable instance
154
+ * @param message log message
155
+ */
156
+ static warnX(instance, message) {
157
+ this._logger.warn(instance.DOMAIN, instance.TAG, message);
158
+ }
159
+ /**
160
+ * print error message
161
+ * @param instance loggable instance
162
+ * @param message log message
163
+ */
164
+ static errorX(instance, message) {
165
+ this._logger.error(instance.DOMAIN, instance.TAG, message);
166
+ }
167
+ /**
168
+ * print fatal message
169
+ * @param instance loggable instance
170
+ * @param message log message
171
+ */
172
+ static fatalX(instance, message) {
173
+ this._logger.fatal(instance.DOMAIN, instance.TAG, message);
174
+ }
175
+ }
176
+ exports.Log = Log;
177
+ Log._logger = new Logger(true);
@@ -0,0 +1,126 @@
1
+ import { ILoggable } from './Log';
2
+ /**
3
+ * output type
4
+ */
5
+ export declare enum OutputType {
6
+ CONSOLE = "console",
7
+ TEXT = "txt",
8
+ JSON = "json",
9
+ HTML = "html"
10
+ }
11
+ /**
12
+ * output config
13
+ */
14
+ export type OutputCfg = {
15
+ desc: any;
16
+ output: {
17
+ dir: string;
18
+ filename: string;
19
+ extension: string;
20
+ };
21
+ node?: {
22
+ enableId: boolean;
23
+ enableType: boolean;
24
+ enableName: boolean;
25
+ enableSelfSize: boolean;
26
+ enableRetainedSize: boolean;
27
+ };
28
+ };
29
+ /**
30
+ * output interface
31
+ */
32
+ export interface IOutput {
33
+ type: OutputType;
34
+ output(data: any, cfg: OutputCfg): void;
35
+ }
36
+ /**
37
+ * console data
38
+ */
39
+ export declare class ConsoleData {
40
+ table: boolean;
41
+ data: any;
42
+ constructor(table: boolean, data: any);
43
+ }
44
+ /**
45
+ * console table data
46
+ */
47
+ export declare class ConsoleTableData {
48
+ title: string[];
49
+ data: any[];
50
+ constructor(title: string[], data: any[]);
51
+ }
52
+ /**
53
+ * text data
54
+ */
55
+ export declare class TextData {
56
+ desc: any;
57
+ data: any;
58
+ constructor(desc: any, data: any);
59
+ }
60
+ /**
61
+ * json data
62
+ */
63
+ export declare class JsonData {
64
+ desc: any;
65
+ data: any;
66
+ constructor(desc: any, data: any);
67
+ }
68
+ /**
69
+ * html data
70
+ */
71
+ export declare class HtmlData {
72
+ desc: any;
73
+ data: any;
74
+ template: string;
75
+ delimiter: string;
76
+ constructor(desc: any, data: any, template?: string);
77
+ }
78
+ /**
79
+ * base output
80
+ */
81
+ declare abstract class BaseOutput implements IOutput, ILoggable {
82
+ readonly type: OutputType;
83
+ readonly DOMAIN: string;
84
+ readonly TAG: string;
85
+ constructor(type: OutputType);
86
+ output(data: any, cfg?: OutputCfg): void;
87
+ protected getFilePathByCfg(cfg?: OutputCfg): string;
88
+ }
89
+ /**
90
+ * console output
91
+ */
92
+ export declare class ConsoleOutput extends BaseOutput {
93
+ constructor();
94
+ output(data: any, cfg?: OutputCfg): void;
95
+ }
96
+ /**
97
+ * text output
98
+ */
99
+ export declare class TextOutput extends BaseOutput {
100
+ constructor();
101
+ output(data: any, cfg?: OutputCfg): void;
102
+ }
103
+ /**
104
+ * json output
105
+ */
106
+ export declare class JsonOutput extends BaseOutput {
107
+ constructor();
108
+ output(data: any, cfg?: OutputCfg): void;
109
+ }
110
+ /**
111
+ * html output
112
+ */
113
+ export declare class HtmlOutput extends BaseOutput {
114
+ constructor();
115
+ output(data: any, cfg?: OutputCfg): void;
116
+ }
117
+ /**
118
+ * output factory
119
+ */
120
+ export declare class OutputFactory {
121
+ private static _defaultOutput;
122
+ private static OUTPUT_MAP;
123
+ static getOutput(type: string): IOutput;
124
+ }
125
+ export {};
126
+ //# sourceMappingURL=Output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Output.d.ts","sourceRoot":"","sources":["../../src/utils/Output.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAO,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,oBAAY,UAAU;IAClB,OAAO,YAAY;IACnB,IAAI,QAAQ;IACZ,IAAI,SAAS;IACb,IAAI,SAAS;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACrB,CAAA;IACD,IAAI,CAAC,EAA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