create-assistant-ui 0.0.17 → 0.0.19
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/index.js +5 -30
- package/dist/index.js.map +1 -1
- package/package.json +5 -6
- package/src/index.ts +105 -0
- package/dist/index.mjs +0 -81
- package/dist/index.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,33 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
|
-
mod
|
|
24
|
-
));
|
|
25
|
-
|
|
26
|
-
// src/index.ts
|
|
27
|
-
var import_commander = require("commander");
|
|
28
|
-
var import_chalk = __toESM(require("chalk"));
|
|
29
|
-
var import_cross_spawn = require("cross-spawn");
|
|
30
|
-
var create = new import_commander.Command().name("create-assistant-ui").description("create a new assistant-ui project").argument("[project-directory]").usage(`${import_chalk.default.green("[project-directory]")} [options]`).option(
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import { spawn } from "cross-spawn";
|
|
5
|
+
const create = new Command().name("create-assistant-ui").description("create a new assistant-ui project").argument("[project-directory]").usage(`${chalk.green("[project-directory]")} [options]`).option(
|
|
31
6
|
"-t, --template <template>",
|
|
32
7
|
`
|
|
33
8
|
|
|
@@ -79,7 +54,7 @@ Available templates: ${Object.keys(templates).join(", ")}`
|
|
|
79
54
|
const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {
|
|
80
55
|
return !(arg === "-t" || arg === "--template" || arr[index - 1] === "-t" || arr[index - 1] === "--template");
|
|
81
56
|
});
|
|
82
|
-
const child =
|
|
57
|
+
const child = spawn(
|
|
83
58
|
"npx",
|
|
84
59
|
[`create-next-app@latest`, ...filteredArgs, "-e", templateUrl],
|
|
85
60
|
{
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { spawn } from \"cross-spawn\";\n\n// Create a standalone version of the create command instead of importing from CLI package\nconst create = new Command()\n .name(\"create-assistant-ui\")\n .description(\"create a new assistant-ui project\")\n .argument(\"[project-directory]\")\n .usage(`${chalk.green(\"[project-directory]\")} [options]`)\n .option(\n \"-t, --template <template>\",\n `\n\n The template to use for the project, e.g. default, langgraph\n`,\n )\n .option(\n \"--use-npm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using npm\n`,\n )\n .option(\n \"--use-pnpm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`,\n )\n .option(\n \"--use-yarn\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`,\n )\n .option(\n \"--use-bun\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Bun\n`,\n )\n .option(\n \"--skip-install\",\n `\n\n Explicitly tell the CLI to skip installing packages\n`,\n )\n .action((_, opts) => {\n const templates = {\n default: \"https://github.com/assistant-ui/assistant-ui-starter\",\n langgraph:\n \"https://github.com/assistant-ui/assistant-ui-starter-langgraph\",\n };\n\n const templateUrl =\n templates[(opts.template as keyof typeof templates) ?? \"default\"];\n if (!templateUrl) {\n console.error(\n `Unknown template: ${opts.template}\\nAvailable templates: ${Object.keys(templates).join(\", \")}`,\n );\n process.exit(1);\n }\n\n const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {\n return !(\n arg === \"-t\" ||\n arg === \"--template\" ||\n arr[index - 1] === \"-t\" ||\n arr[index - 1] === \"--template\"\n );\n });\n\n const child = spawn(\n \"npx\",\n [`create-next-app@latest`, ...filteredArgs, \"-e\", templateUrl],\n {\n stdio: \"inherit\",\n },\n );\n\n child.on(\"error\", (error) => {\n console.error(`Error: ${error.message}`);\n });\n\n child.on(\"close\", (code) => {\n if (code !== 0) {\n console.log(`create-next-app process exited with code ${code}`);\n }\n });\n });\n\nprocess.on(\"SIGINT\", () => process.exit(0));\nprocess.on(\"SIGTERM\", () => process.exit(0));\n\nfunction main() {\n create.parse();\n}\n\nmain();\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { spawn } from \"cross-spawn\";\n\n// Create a standalone version of the create command instead of importing from CLI package\nconst create = new Command()\n .name(\"create-assistant-ui\")\n .description(\"create a new assistant-ui project\")\n .argument(\"[project-directory]\")\n .usage(`${chalk.green(\"[project-directory]\")} [options]`)\n .option(\n \"-t, --template <template>\",\n `\n\n The template to use for the project, e.g. default, langgraph\n`,\n )\n .option(\n \"--use-npm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using npm\n`,\n )\n .option(\n \"--use-pnpm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`,\n )\n .option(\n \"--use-yarn\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`,\n )\n .option(\n \"--use-bun\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Bun\n`,\n )\n .option(\n \"--skip-install\",\n `\n\n Explicitly tell the CLI to skip installing packages\n`,\n )\n .action((_, opts) => {\n const templates = {\n default: \"https://github.com/assistant-ui/assistant-ui-starter\",\n langgraph:\n \"https://github.com/assistant-ui/assistant-ui-starter-langgraph\",\n };\n\n const templateUrl =\n templates[(opts.template as keyof typeof templates) ?? \"default\"];\n if (!templateUrl) {\n console.error(\n `Unknown template: ${opts.template}\\nAvailable templates: ${Object.keys(templates).join(\", \")}`,\n );\n process.exit(1);\n }\n\n const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {\n return !(\n arg === \"-t\" ||\n arg === \"--template\" ||\n arr[index - 1] === \"-t\" ||\n arr[index - 1] === \"--template\"\n );\n });\n\n const child = spawn(\n \"npx\",\n [`create-next-app@latest`, ...filteredArgs, \"-e\", templateUrl],\n {\n stdio: \"inherit\",\n },\n );\n\n child.on(\"error\", (error) => {\n console.error(`Error: ${error.message}`);\n });\n\n child.on(\"close\", (code) => {\n if (code !== 0) {\n console.log(`create-next-app process exited with code ${code}`);\n }\n });\n });\n\nprocess.on(\"SIGINT\", () => process.exit(0));\nprocess.on(\"SIGTERM\", () => process.exit(0));\n\nfunction main() {\n create.parse();\n}\n\nmain();\n"],"mappings":";AACA,SAAS,eAAe;AACxB,OAAO,WAAW;AAClB,SAAS,aAAa;AAGtB,MAAM,SAAS,IAAI,QAAQ,EACxB,KAAK,qBAAqB,EAC1B,YAAY,mCAAmC,EAC/C,SAAS,qBAAqB,EAC9B,MAAM,GAAG,MAAM,MAAM,qBAAqB,CAAC,YAAY,EACvD;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;A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/package.json
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-assistant-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"engines": {
|
|
6
|
-
"node": ">=20.0.0"
|
|
7
|
-
},
|
|
8
5
|
"dependencies": {
|
|
9
6
|
"chalk": "^5.4.1",
|
|
10
7
|
"commander": "^13.1.0",
|
|
@@ -13,6 +10,7 @@
|
|
|
13
10
|
"tsconfig-paths": "^4.2.0",
|
|
14
11
|
"zod": "^3.24.3"
|
|
15
12
|
},
|
|
13
|
+
"type": "module",
|
|
16
14
|
"devDependencies": {
|
|
17
15
|
"@types/cross-spawn": "^6.0.6",
|
|
18
16
|
"@types/node": "^22.14.1",
|
|
@@ -22,9 +20,10 @@
|
|
|
22
20
|
},
|
|
23
21
|
"files": [
|
|
24
22
|
"dist",
|
|
23
|
+
"src",
|
|
25
24
|
"README.md"
|
|
26
25
|
],
|
|
27
|
-
"bin": "./dist/index.
|
|
26
|
+
"bin": "./dist/index.js",
|
|
28
27
|
"publishConfig": {
|
|
29
28
|
"access": "public",
|
|
30
29
|
"provenance": true
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
"homepage": "https://www.assistant-ui.com/",
|
|
33
32
|
"repository": {
|
|
34
33
|
"type": "git",
|
|
35
|
-
"url": "
|
|
34
|
+
"url": "https://github.com/assistant-ui/assistant-ui/tree/main/packages/create-assistant-ui"
|
|
36
35
|
},
|
|
37
36
|
"bugs": {
|
|
38
37
|
"url": "https://github.com/assistant-ui/assistant-ui/issues"
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import { spawn } from "cross-spawn";
|
|
5
|
+
|
|
6
|
+
// Create a standalone version of the create command instead of importing from CLI package
|
|
7
|
+
const create = new Command()
|
|
8
|
+
.name("create-assistant-ui")
|
|
9
|
+
.description("create a new assistant-ui project")
|
|
10
|
+
.argument("[project-directory]")
|
|
11
|
+
.usage(`${chalk.green("[project-directory]")} [options]`)
|
|
12
|
+
.option(
|
|
13
|
+
"-t, --template <template>",
|
|
14
|
+
`
|
|
15
|
+
|
|
16
|
+
The template to use for the project, e.g. default, langgraph
|
|
17
|
+
`,
|
|
18
|
+
)
|
|
19
|
+
.option(
|
|
20
|
+
"--use-npm",
|
|
21
|
+
`
|
|
22
|
+
|
|
23
|
+
Explicitly tell the CLI to bootstrap the application using npm
|
|
24
|
+
`,
|
|
25
|
+
)
|
|
26
|
+
.option(
|
|
27
|
+
"--use-pnpm",
|
|
28
|
+
`
|
|
29
|
+
|
|
30
|
+
Explicitly tell the CLI to bootstrap the application using pnpm
|
|
31
|
+
`,
|
|
32
|
+
)
|
|
33
|
+
.option(
|
|
34
|
+
"--use-yarn",
|
|
35
|
+
`
|
|
36
|
+
|
|
37
|
+
Explicitly tell the CLI to bootstrap the application using Yarn
|
|
38
|
+
`,
|
|
39
|
+
)
|
|
40
|
+
.option(
|
|
41
|
+
"--use-bun",
|
|
42
|
+
`
|
|
43
|
+
|
|
44
|
+
Explicitly tell the CLI to bootstrap the application using Bun
|
|
45
|
+
`,
|
|
46
|
+
)
|
|
47
|
+
.option(
|
|
48
|
+
"--skip-install",
|
|
49
|
+
`
|
|
50
|
+
|
|
51
|
+
Explicitly tell the CLI to skip installing packages
|
|
52
|
+
`,
|
|
53
|
+
)
|
|
54
|
+
.action((_, opts) => {
|
|
55
|
+
const templates = {
|
|
56
|
+
default: "https://github.com/assistant-ui/assistant-ui-starter",
|
|
57
|
+
langgraph:
|
|
58
|
+
"https://github.com/assistant-ui/assistant-ui-starter-langgraph",
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const templateUrl =
|
|
62
|
+
templates[(opts.template as keyof typeof templates) ?? "default"];
|
|
63
|
+
if (!templateUrl) {
|
|
64
|
+
console.error(
|
|
65
|
+
`Unknown template: ${opts.template}\nAvailable templates: ${Object.keys(templates).join(", ")}`,
|
|
66
|
+
);
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {
|
|
71
|
+
return !(
|
|
72
|
+
arg === "-t" ||
|
|
73
|
+
arg === "--template" ||
|
|
74
|
+
arr[index - 1] === "-t" ||
|
|
75
|
+
arr[index - 1] === "--template"
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const child = spawn(
|
|
80
|
+
"npx",
|
|
81
|
+
[`create-next-app@latest`, ...filteredArgs, "-e", templateUrl],
|
|
82
|
+
{
|
|
83
|
+
stdio: "inherit",
|
|
84
|
+
},
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
child.on("error", (error) => {
|
|
88
|
+
console.error(`Error: ${error.message}`);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
child.on("close", (code) => {
|
|
92
|
+
if (code !== 0) {
|
|
93
|
+
console.log(`create-next-app process exited with code ${code}`);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
process.on("SIGINT", () => process.exit(0));
|
|
99
|
+
process.on("SIGTERM", () => process.exit(0));
|
|
100
|
+
|
|
101
|
+
function main() {
|
|
102
|
+
create.parse();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
main();
|
package/dist/index.mjs
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/index.ts
|
|
4
|
-
import { Command } from "commander";
|
|
5
|
-
import chalk from "chalk";
|
|
6
|
-
import { spawn } from "cross-spawn";
|
|
7
|
-
var create = new Command().name("create-assistant-ui").description("create a new assistant-ui project").argument("[project-directory]").usage(`${chalk.green("[project-directory]")} [options]`).option(
|
|
8
|
-
"-t, --template <template>",
|
|
9
|
-
`
|
|
10
|
-
|
|
11
|
-
The template to use for the project, e.g. default, langgraph
|
|
12
|
-
`
|
|
13
|
-
).option(
|
|
14
|
-
"--use-npm",
|
|
15
|
-
`
|
|
16
|
-
|
|
17
|
-
Explicitly tell the CLI to bootstrap the application using npm
|
|
18
|
-
`
|
|
19
|
-
).option(
|
|
20
|
-
"--use-pnpm",
|
|
21
|
-
`
|
|
22
|
-
|
|
23
|
-
Explicitly tell the CLI to bootstrap the application using pnpm
|
|
24
|
-
`
|
|
25
|
-
).option(
|
|
26
|
-
"--use-yarn",
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
Explicitly tell the CLI to bootstrap the application using Yarn
|
|
30
|
-
`
|
|
31
|
-
).option(
|
|
32
|
-
"--use-bun",
|
|
33
|
-
`
|
|
34
|
-
|
|
35
|
-
Explicitly tell the CLI to bootstrap the application using Bun
|
|
36
|
-
`
|
|
37
|
-
).option(
|
|
38
|
-
"--skip-install",
|
|
39
|
-
`
|
|
40
|
-
|
|
41
|
-
Explicitly tell the CLI to skip installing packages
|
|
42
|
-
`
|
|
43
|
-
).action((_, opts) => {
|
|
44
|
-
const templates = {
|
|
45
|
-
default: "https://github.com/assistant-ui/assistant-ui-starter",
|
|
46
|
-
langgraph: "https://github.com/assistant-ui/assistant-ui-starter-langgraph"
|
|
47
|
-
};
|
|
48
|
-
const templateUrl = templates[opts.template ?? "default"];
|
|
49
|
-
if (!templateUrl) {
|
|
50
|
-
console.error(
|
|
51
|
-
`Unknown template: ${opts.template}
|
|
52
|
-
Available templates: ${Object.keys(templates).join(", ")}`
|
|
53
|
-
);
|
|
54
|
-
process.exit(1);
|
|
55
|
-
}
|
|
56
|
-
const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {
|
|
57
|
-
return !(arg === "-t" || arg === "--template" || arr[index - 1] === "-t" || arr[index - 1] === "--template");
|
|
58
|
-
});
|
|
59
|
-
const child = spawn(
|
|
60
|
-
"npx",
|
|
61
|
-
[`create-next-app@latest`, ...filteredArgs, "-e", templateUrl],
|
|
62
|
-
{
|
|
63
|
-
stdio: "inherit"
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
child.on("error", (error) => {
|
|
67
|
-
console.error(`Error: ${error.message}`);
|
|
68
|
-
});
|
|
69
|
-
child.on("close", (code) => {
|
|
70
|
-
if (code !== 0) {
|
|
71
|
-
console.log(`create-next-app process exited with code ${code}`);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
process.on("SIGINT", () => process.exit(0));
|
|
76
|
-
process.on("SIGTERM", () => process.exit(0));
|
|
77
|
-
function main() {
|
|
78
|
-
create.parse();
|
|
79
|
-
}
|
|
80
|
-
main();
|
|
81
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { spawn } from \"cross-spawn\";\n\n// Create a standalone version of the create command instead of importing from CLI package\nconst create = new Command()\n .name(\"create-assistant-ui\")\n .description(\"create a new assistant-ui project\")\n .argument(\"[project-directory]\")\n .usage(`${chalk.green(\"[project-directory]\")} [options]`)\n .option(\n \"-t, --template <template>\",\n `\n\n The template to use for the project, e.g. default, langgraph\n`,\n )\n .option(\n \"--use-npm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using npm\n`,\n )\n .option(\n \"--use-pnpm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`,\n )\n .option(\n \"--use-yarn\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`,\n )\n .option(\n \"--use-bun\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Bun\n`,\n )\n .option(\n \"--skip-install\",\n `\n\n Explicitly tell the CLI to skip installing packages\n`,\n )\n .action((_, opts) => {\n const templates = {\n default: \"https://github.com/assistant-ui/assistant-ui-starter\",\n langgraph:\n \"https://github.com/assistant-ui/assistant-ui-starter-langgraph\",\n };\n\n const templateUrl =\n templates[(opts.template as keyof typeof templates) ?? \"default\"];\n if (!templateUrl) {\n console.error(\n `Unknown template: ${opts.template}\\nAvailable templates: ${Object.keys(templates).join(\", \")}`,\n );\n process.exit(1);\n }\n\n const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {\n return !(\n arg === \"-t\" ||\n arg === \"--template\" ||\n arr[index - 1] === \"-t\" ||\n arr[index - 1] === \"--template\"\n );\n });\n\n const child = spawn(\n \"npx\",\n [`create-next-app@latest`, ...filteredArgs, \"-e\", templateUrl],\n {\n stdio: \"inherit\",\n },\n );\n\n child.on(\"error\", (error) => {\n console.error(`Error: ${error.message}`);\n });\n\n child.on(\"close\", (code) => {\n if (code !== 0) {\n console.log(`create-next-app process exited with code ${code}`);\n }\n });\n });\n\nprocess.on(\"SIGINT\", () => process.exit(0));\nprocess.on(\"SIGTERM\", () => process.exit(0));\n\nfunction main() {\n create.parse();\n}\n\nmain();\n"],"mappings":";;;AACA,SAAS,eAAe;AACxB,OAAO,WAAW;AAClB,SAAS,aAAa;AAGtB,IAAM,SAAS,IAAI,QAAQ,EACxB,KAAK,qBAAqB,EAC1B,YAAY,mCAAmC,EAC/C,SAAS,qBAAqB,EAC9B,MAAM,GAAG,MAAM,MAAM,qBAAqB,CAAC,YAAY,EACvD;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC,OAAO,CAAC,GAAG,SAAS;AACnB,QAAM,YAAY;AAAA,IAChB,SAAS;AAAA,IACT,WACE;AAAA,EACJ;AAE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