@abp/ng.schematics 9.2.0-rc.2 → 9.2.0-rc.3

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 (117) hide show
  1. package/commands/change-theme/index.d.ts +7 -3
  2. package/commands/change-theme/index.js +264 -70
  3. package/commands/change-theme/index.js.map +1 -1
  4. package/commands/change-theme/style-map.d.ts +1 -0
  5. package/commands/change-theme/style-map.js +90 -9
  6. package/commands/change-theme/style-map.js.map +1 -1
  7. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/.eslintrc.json.template +44 -0
  8. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/ng-package.json.template +7 -0
  9. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/src/enums/index.ts.template +1 -0
  10. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/src/enums/route-names.ts.template +3 -0
  11. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/src/providers/index.ts.template +1 -0
  12. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/src/providers/route.provider.ts.template +30 -0
  13. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/src/public-api.ts.template +2 -0
  14. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/karma.conf.js.template +44 -0
  15. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/ng-package.json.template +7 -0
  16. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/package.json.template +11 -0
  17. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/src/lib/__libraryName@kebab__.component.ts.template +11 -0
  18. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/src/lib/__libraryName@kebab__.routes.ts.template +9 -0
  19. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/src/lib/index.ts.template +1 -0
  20. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/src/public-api.ts.template +4 -0
  21. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/src/test.ts.template +26 -0
  22. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/tsconfig.lib.json.template +20 -0
  23. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/tsconfig.lib.prod.json.template +10 -0
  24. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/tsconfig.spec.json.template +17 -0
  25. package/commands/create-lib/files-secondary-entrypoint-standalone/__libraryName@kebab__/ng-package.json.template +6 -0
  26. package/commands/create-lib/files-secondary-entrypoint-standalone/__libraryName@kebab__/src/lib/__target@kebab__-__libraryName@kebab__.ts.template +7 -0
  27. package/commands/create-lib/files-secondary-entrypoint-standalone/__libraryName@kebab__/src/lib/index.ts.template +1 -0
  28. package/commands/create-lib/files-secondary-entrypoint-standalone/__libraryName@kebab__/src/public-api.ts.template +1 -0
  29. package/commands/create-lib/index.d.ts +7 -3
  30. package/commands/create-lib/index.js +161 -58
  31. package/commands/create-lib/index.js.map +1 -1
  32. package/commands/create-lib/models/generate-lib-schema.d.ts +8 -1
  33. package/commands/create-lib/models/generate-lib-schema.js +6 -0
  34. package/commands/create-lib/models/generate-lib-schema.js.map +1 -1
  35. package/commands/create-lib/schema.json +13 -9
  36. package/package.json +1 -1
  37. package/utils/angular/add-declaration-to-ng-module.d.ts +2 -1
  38. package/utils/angular/add-declaration-to-ng-module.js +4 -4
  39. package/utils/angular/add-declaration-to-ng-module.js.map +1 -1
  40. package/utils/angular/ast-utils.d.ts +18 -8
  41. package/utils/angular/ast-utils.js +70 -41
  42. package/utils/angular/ast-utils.js.map +1 -1
  43. package/utils/angular/change.d.ts +1 -1
  44. package/utils/angular/change.js +4 -4
  45. package/utils/angular/change.js.map +1 -1
  46. package/utils/angular/dependencies.d.ts +1 -1
  47. package/utils/angular/dependencies.js +1 -1
  48. package/utils/angular/dependency.d.ts +1 -1
  49. package/utils/angular/dependency.js +2 -2
  50. package/utils/angular/dependency.js.map +1 -1
  51. package/utils/angular/eol.d.ts +8 -0
  52. package/utils/angular/eol.js +24 -0
  53. package/utils/angular/eol.js.map +1 -0
  54. package/utils/angular/find-module.d.ts +1 -1
  55. package/utils/angular/find-module.js +5 -5
  56. package/utils/angular/find-module.js.map +1 -1
  57. package/utils/angular/generate-from-files.d.ts +3 -1
  58. package/utils/angular/generate-from-files.js +15 -2
  59. package/utils/angular/generate-from-files.js.map +1 -1
  60. package/utils/angular/index.d.ts +1 -0
  61. package/utils/angular/index.js +1 -0
  62. package/utils/angular/index.js.map +1 -1
  63. package/utils/angular/json-file.d.ts +3 -2
  64. package/utils/angular/json-file.js +6 -3
  65. package/utils/angular/json-file.js.map +1 -1
  66. package/utils/angular/ng-ast-utils.d.ts +2 -2
  67. package/utils/angular/ng-ast-utils.js +19 -7
  68. package/utils/angular/ng-ast-utils.js.map +1 -1
  69. package/utils/angular/parse-name.d.ts +1 -1
  70. package/utils/angular/parse-name.js +1 -1
  71. package/utils/angular/paths.d.ts +1 -1
  72. package/utils/angular/paths.js +4 -7
  73. package/utils/angular/paths.js.map +1 -1
  74. package/utils/angular/project-targets.d.ts +3 -1
  75. package/utils/angular/project-targets.js +9 -2
  76. package/utils/angular/project-targets.js.map +1 -1
  77. package/utils/angular/standalone/app_component.d.ts +29 -0
  78. package/utils/angular/standalone/app_component.js +108 -0
  79. package/utils/angular/standalone/app_component.js.map +1 -0
  80. package/utils/angular/standalone/app_config.d.ts +23 -0
  81. package/utils/angular/standalone/app_config.js +90 -0
  82. package/utils/angular/standalone/app_config.js.map +1 -0
  83. package/utils/angular/standalone/code_block.d.ts +53 -0
  84. package/utils/angular/standalone/code_block.js +80 -0
  85. package/utils/angular/standalone/code_block.js.map +1 -0
  86. package/utils/angular/standalone/index.d.ts +9 -0
  87. package/utils/angular/standalone/index.js +14 -0
  88. package/utils/angular/standalone/index.js.map +1 -0
  89. package/utils/angular/standalone/rules.d.ts +45 -0
  90. package/utils/angular/standalone/rules.js +189 -0
  91. package/utils/angular/standalone/rules.js.map +1 -0
  92. package/utils/angular/standalone/util.d.ts +35 -0
  93. package/utils/angular/standalone/util.js +136 -0
  94. package/utils/angular/standalone/util.js.map +1 -0
  95. package/utils/angular/validation.d.ts +1 -1
  96. package/utils/angular/validation.js +2 -2
  97. package/utils/angular/validation.js.map +1 -1
  98. package/utils/angular/workspace-models.d.ts +12 -6
  99. package/utils/angular/workspace-models.js +11 -3
  100. package/utils/angular/workspace-models.js.map +1 -1
  101. package/utils/angular/workspace.d.ts +12 -1
  102. package/utils/angular/workspace.js +6 -6
  103. package/utils/angular/workspace.js.map +1 -1
  104. package/utils/ast.d.ts +1 -0
  105. package/utils/ast.js +6 -1
  106. package/utils/ast.js.map +1 -1
  107. package/utils/index.d.ts +2 -0
  108. package/utils/index.js +2 -0
  109. package/utils/index.js.map +1 -1
  110. package/utils/ng-module.d.ts +46 -0
  111. package/utils/ng-module.js +126 -0
  112. package/utils/ng-module.js.map +1 -0
  113. package/utils/standalone.d.ts +59 -0
  114. package/utils/standalone.js +146 -0
  115. package/utils/standalone.js.map +1 -0
  116. package/utils/workspace.js +1 -1
  117. package/utils/workspace.js.map +1 -1
@@ -0,0 +1,59 @@
1
+ import { Tree, UpdateRecorder } from '@angular-devkit/schematics';
2
+ import * as ts from 'typescript';
3
+ import { Path } from '@angular-devkit/core';
4
+ /**
5
+ * Retrieves the file path of the application's configuration used in a standalone
6
+ * Angular application setup.
7
+ *
8
+ * This function locates the `bootstrapApplication` call in the main entry file and
9
+ * resolves the path to the configuration object passed to it (typically `appConfig`).
10
+ *
11
+ * @param host - The virtual file system tree used by Angular schematics.
12
+ * @param mainFilePath - The path to the main entry file of the Angular application (e.g., `main.ts`).
13
+ * @returns The resolved file path of the application's configuration, or an empty string if not found.
14
+ */
15
+ export declare const getAppConfigPath: (host: Tree, mainFilePath: string) => string;
16
+ /**
17
+ * Attempts to locate the file path of the `routes` array used in a standalone
18
+ * Angular application configuration.
19
+ *
20
+ * This function resolves the application's config file (typically where `routes` is defined or imported),
21
+ * parses the file, and inspects its import declarations to find the import associated with `routes`.
22
+ * It then resolves and normalizes the file path of the `routes` definition and returns it.
23
+ *
24
+ * @param tree - The virtual file system tree used by Angular schematics.
25
+ * @param mainFilePath - The path to the main entry file of the Angular application (e.g., `main.ts`).
26
+ * @returns The normalized workspace-relative path to the file where `routes` is defined, or `null` if not found.
27
+ * @throws If the `routes` import path is found but the file does not exist in the tree.
28
+ */
29
+ export declare function findAppRoutesPath(tree: Tree, mainFilePath: string): Path | null;
30
+ /**
31
+ * Checks whether a specific provider is registered in the `providers` array of the
32
+ * standalone application configuration (typically within `app.config.ts`) in an Angular project.
33
+ *
34
+ * This function reads and parses the application configuration file, looks for the
35
+ * `providers` property in the configuration object, and checks whether it includes
36
+ * the specified provider name.
37
+ *
38
+ * @param host - The virtual file system tree used by Angular schematics.
39
+ * @param projectName - The name of the Angular project.
40
+ * @param providerName - The name of the provider to search for (as a string match).
41
+ * @returns A promise that resolves to `true` if the provider is found, otherwise `false`.
42
+ * @throws SchematicsException if the app config file cannot be read.
43
+ */
44
+ export declare const hasProviderInStandaloneAppConfig: (host: Tree, projectName: string, providerName: string) => Promise<boolean>;
45
+ /**
46
+ * Cleans up empty or invalid expressions (e.g., extra or trailing commas) from the
47
+ * `providers` array within a standalone Angular application configuration object.
48
+ *
49
+ * This function parses the source file's AST to locate variable declarations that
50
+ * define an object literal. It then searches for a `providers` property and removes
51
+ * any empty elements from its array literal, replacing it with a cleaned version.
52
+ *
53
+ * Typically used in Angular schematics to ensure the `providers` array in `app.config.ts`
54
+ * is free of empty slots after modifications.
55
+ *
56
+ * @param source - The TypeScript source file containing the app configuration.
57
+ * @param recorder - The recorder used to apply changes to the source file.
58
+ */
59
+ export declare function cleanEmptyExprFromProviders(source: ts.SourceFile, recorder: UpdateRecorder): void;
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cleanEmptyExprFromProviders = exports.hasProviderInStandaloneAppConfig = exports.findAppRoutesPath = exports.getAppConfigPath = void 0;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const util_1 = require("./angular/standalone/util");
6
+ const app_config_1 = require("./angular/standalone/app_config");
7
+ const ts = require("typescript");
8
+ const core_1 = require("@angular-devkit/core");
9
+ const path = require("path");
10
+ const angular_1 = require("./angular");
11
+ const ast_1 = require("./ast");
12
+ /**
13
+ * Retrieves the file path of the application's configuration used in a standalone
14
+ * Angular application setup.
15
+ *
16
+ * This function locates the `bootstrapApplication` call in the main entry file and
17
+ * resolves the path to the configuration object passed to it (typically `appConfig`).
18
+ *
19
+ * @param host - The virtual file system tree used by Angular schematics.
20
+ * @param mainFilePath - The path to the main entry file of the Angular application (e.g., `main.ts`).
21
+ * @returns The resolved file path of the application's configuration, or an empty string if not found.
22
+ */
23
+ const getAppConfigPath = (host, mainFilePath) => {
24
+ const bootstrapCall = (0, util_1.findBootstrapApplicationCall)(host, mainFilePath);
25
+ const appConfig = (0, app_config_1.findAppConfig)(bootstrapCall, host, mainFilePath);
26
+ return appConfig?.filePath || '';
27
+ };
28
+ exports.getAppConfigPath = getAppConfigPath;
29
+ /**
30
+ * Attempts to locate the file path of the `routes` array used in a standalone
31
+ * Angular application configuration.
32
+ *
33
+ * This function resolves the application's config file (typically where `routes` is defined or imported),
34
+ * parses the file, and inspects its import declarations to find the import associated with `routes`.
35
+ * It then resolves and normalizes the file path of the `routes` definition and returns it.
36
+ *
37
+ * @param tree - The virtual file system tree used by Angular schematics.
38
+ * @param mainFilePath - The path to the main entry file of the Angular application (e.g., `main.ts`).
39
+ * @returns The normalized workspace-relative path to the file where `routes` is defined, or `null` if not found.
40
+ * @throws If the `routes` import path is found but the file does not exist in the tree.
41
+ */
42
+ function findAppRoutesPath(tree, mainFilePath) {
43
+ const appConfigPath = (0, exports.getAppConfigPath)(tree, mainFilePath);
44
+ if (!appConfigPath || !tree.exists(appConfigPath))
45
+ return null;
46
+ const buffer = tree.read(appConfigPath);
47
+ if (!buffer)
48
+ return null;
49
+ const source = ts.createSourceFile(appConfigPath, buffer.toString('utf-8'), ts.ScriptTarget.Latest, true);
50
+ for (const stmt of source.statements) {
51
+ if (!ts.isImportDeclaration(stmt))
52
+ continue;
53
+ const importClause = stmt.importClause;
54
+ if (!importClause?.namedBindings || !ts.isNamedImports(importClause.namedBindings))
55
+ continue;
56
+ const isRoutesImport = importClause.namedBindings.elements.some(el => el.name.getText() === 'routes');
57
+ if (!isRoutesImport || !ts.isStringLiteral(stmt.moduleSpecifier))
58
+ continue;
59
+ let importPath = stmt.moduleSpecifier.text;
60
+ if (!importPath.endsWith('.ts')) {
61
+ importPath += '.ts';
62
+ }
63
+ const configDir = path.dirname(appConfigPath);
64
+ const resolvedFsPath = path.resolve(configDir, importPath);
65
+ const workspaceRelativePath = path.relative(process.cwd(), resolvedFsPath).replace(/\\/g, '/');
66
+ const normalizedPath = (0, core_1.normalize)(workspaceRelativePath);
67
+ if (!tree.exists(normalizedPath)) {
68
+ throw new Error(`Cannot find routes file: ${normalizedPath}`);
69
+ }
70
+ return normalizedPath;
71
+ }
72
+ return null;
73
+ }
74
+ exports.findAppRoutesPath = findAppRoutesPath;
75
+ /**
76
+ * Checks whether a specific provider is registered in the `providers` array of the
77
+ * standalone application configuration (typically within `app.config.ts`) in an Angular project.
78
+ *
79
+ * This function reads and parses the application configuration file, looks for the
80
+ * `providers` property in the configuration object, and checks whether it includes
81
+ * the specified provider name.
82
+ *
83
+ * @param host - The virtual file system tree used by Angular schematics.
84
+ * @param projectName - The name of the Angular project.
85
+ * @param providerName - The name of the provider to search for (as a string match).
86
+ * @returns A promise that resolves to `true` if the provider is found, otherwise `false`.
87
+ * @throws SchematicsException if the app config file cannot be read.
88
+ */
89
+ const hasProviderInStandaloneAppConfig = async (host, projectName, providerName) => {
90
+ const mainFilePath = await (0, util_1.getMainFilePath)(host, projectName);
91
+ const appConfigPath = (0, exports.getAppConfigPath)(host, mainFilePath);
92
+ const buffer = host.read(appConfigPath);
93
+ if (!buffer) {
94
+ throw new schematics_1.SchematicsException(`Could not read file: ${appConfigPath}`);
95
+ }
96
+ const source = ts.createSourceFile(appConfigPath, buffer.toString('utf-8'), ts.ScriptTarget.Latest, true);
97
+ const callExpressions = source.statements
98
+ .flatMap(stmt => (ts.isVariableStatement(stmt) ? stmt.declarationList.declarations : []))
99
+ .flatMap(decl => decl.initializer && ts.isObjectLiteralExpression(decl.initializer)
100
+ ? decl.initializer.properties
101
+ : [])
102
+ .filter(ts.isPropertyAssignment)
103
+ .filter(prop => prop.name.getText() === 'providers');
104
+ if (callExpressions.length === 0)
105
+ return false;
106
+ const providersArray = callExpressions[0].initializer;
107
+ return providersArray.elements.some(el => el.getText().includes(providerName));
108
+ };
109
+ exports.hasProviderInStandaloneAppConfig = hasProviderInStandaloneAppConfig;
110
+ /**
111
+ * Cleans up empty or invalid expressions (e.g., extra or trailing commas) from the
112
+ * `providers` array within a standalone Angular application configuration object.
113
+ *
114
+ * This function parses the source file's AST to locate variable declarations that
115
+ * define an object literal. It then searches for a `providers` property and removes
116
+ * any empty elements from its array literal, replacing it with a cleaned version.
117
+ *
118
+ * Typically used in Angular schematics to ensure the `providers` array in `app.config.ts`
119
+ * is free of empty slots after modifications.
120
+ *
121
+ * @param source - The TypeScript source file containing the app configuration.
122
+ * @param recorder - The recorder used to apply changes to the source file.
123
+ */
124
+ function cleanEmptyExprFromProviders(source, recorder) {
125
+ const varStatements = (0, angular_1.findNodes)(source, ts.isVariableStatement);
126
+ const printer = ts.createPrinter();
127
+ for (const stmt of varStatements) {
128
+ const declList = stmt.declarationList;
129
+ for (const decl of declList.declarations) {
130
+ if (!decl.initializer || !ts.isObjectLiteralExpression(decl.initializer))
131
+ continue;
132
+ const obj = decl.initializer;
133
+ const providersProp = obj.properties.find(prop => ts.isPropertyAssignment(prop) &&
134
+ ts.isIdentifier(prop.name) &&
135
+ prop.name.text === 'providers');
136
+ if (!providersProp || !ts.isArrayLiteralExpression(providersProp.initializer))
137
+ continue;
138
+ const arrayLiteral = providersProp.initializer;
139
+ const cleanedArray = (0, ast_1.removeEmptyElementsFromArrayLiteral)(arrayLiteral);
140
+ recorder.remove(arrayLiteral.getStart(), arrayLiteral.getWidth());
141
+ recorder.insertLeft(arrayLiteral.getStart(), printer.printNode(ts.EmitHint.Expression, cleanedArray, source));
142
+ }
143
+ }
144
+ }
145
+ exports.cleanEmptyExprFromProviders = cleanEmptyExprFromProviders;
146
+ //# sourceMappingURL=standalone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standalone.js","sourceRoot":"","sources":["../../../../packages/schematics/src/utils/standalone.ts"],"names":[],"mappings":";;;AAAA,2DAAuF;AACvF,oDAA0F;AAC1F,gEAAgE;AAChE,iCAAiC;AACjC,+CAAuD;AACvD,6BAA6B;AAC7B,uCAAsC;AACtC,+BAA4D;AAE5D;;;;;;;;;;GAUG;AACI,MAAM,gBAAgB,GAAG,CAAC,IAAU,EAAE,YAAoB,EAAU,EAAE;IAC3E,MAAM,aAAa,GAAG,IAAA,mCAA4B,EAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACvE,MAAM,SAAS,GAAG,IAAA,0BAAa,EAAC,aAAa,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;IACnE,OAAO,SAAS,EAAE,QAAQ,IAAI,EAAE,CAAC;AACnC,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B;AAEF;;;;;;;;;;;;GAYG;AACH,SAAgB,iBAAiB,CAAC,IAAU,EAAE,YAAoB;IAChE,MAAM,aAAa,GAAG,IAAA,wBAAgB,EAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC3D,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;QAAE,OAAO,IAAI,CAAC;IAE/D,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACxC,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAChC,aAAa,EACb,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EACxB,EAA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,YAAY,GAAG,IAAA,yCAAmC,EAAC,YAAY,CAAC,CAAC;YAEvE,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;YAClE,QAAQ,CAAC,UAAU,CACjB,YAAY,CAAC,QAAQ,EAAE,EACvB,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,YAAY,EAAE,MAAM,CAAC,CAChE,CAAC;SACH;KACF;AACH,CAAC;AA9BD,kEA8BC"}
@@ -47,7 +47,7 @@ async function resolveProject(tree, name,
47
47
  // eslint-disable-next-line
48
48
  // @typescript-eslint/no-explicit-any
49
49
  notFoundValue = symbols_1.NOT_FOUND_VALUE) {
50
- name = name || readWorkspaceSchema(tree).defaultProject || getFirstApplication(tree).name;
50
+ name = name || getFirstApplication(tree).name;
51
51
  const workspace = await (0, angular_1.getWorkspace)(tree);
52
52
  let definition;
53
53
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../packages/schematics/src/utils/workspace.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,+CAA2D;AAC3D,2DAAuE;AAGvE,uCAAyF;AACzF,+BAAkD;AAClD,qCAA0C;AAC1C,kDAAuD;AACvD,oEAAiE;AAEjE,SAAgB,SAAS,CAAC,OAAqC;IAC7D,OAAO,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,qBAAW,CAAC,OAAO,CAAC;AACnE,CAAC;AAFD,8BAEC;AAED,SAAgB,eAAe,CAAC,IAAU,EAAE,OAAqC;IAC/E,IAAI,SAAS,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAC;IAEzC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,IAAI,GAAG,OAAO,CAAC,IAAI,MAAM,CAAC;IAC5D,MAAM,OAAO,GAAG,OAAO,GAAG,8BAA8B,CAAC;IACzD,MAAM,MAAM,GAA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