porkbun-mcp-server 1.2.0 → 1.4.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/README.md +19 -25
- package/dist/client.d.ts +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +70 -45
- package/dist/client.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/tools/_shared.d.ts +3 -3
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/_shared.js +6 -8
- package/dist/tools/_shared.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,18 +27,25 @@ export PORKBUN_SECRET_API_KEY="sk1_..."
|
|
|
27
27
|
|
|
28
28
|
Get your API keys at [porkbun.com/account/api](https://porkbun.com/account/api).
|
|
29
29
|
|
|
30
|
-
### Multiple accounts
|
|
30
|
+
### Multiple accounts
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Create a JSON file listing your accounts and point `PORKBUN_ACCOUNTS_FILE` at it:
|
|
33
33
|
|
|
34
|
-
```
|
|
35
|
-
|
|
34
|
+
```json
|
|
35
|
+
// ~/.porkbun-accounts.json
|
|
36
|
+
[
|
|
36
37
|
{ "user": "default", "PORKBUN_API_KEY": "pk1_...", "PORKBUN_SECRET_API_KEY": "sk1_..." },
|
|
37
38
|
{ "user": "alice", "PORKBUN_API_KEY": "pk1_...", "PORKBUN_SECRET_API_KEY": "sk1_..." },
|
|
38
39
|
{ "user": "acme-corp", "PORKBUN_API_KEY": "pk1_...", "PORKBUN_SECRET_API_KEY": "sk1_..." }
|
|
39
|
-
]
|
|
40
|
+
]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
export PORKBUN_ACCOUNTS_FILE="$HOME/.porkbun-accounts.json"
|
|
40
45
|
```
|
|
41
46
|
|
|
47
|
+
The shorthand aliases `apiKey` and `secretApiKey` are also accepted inside the file.
|
|
48
|
+
|
|
42
49
|
Then pass `user` to any authenticated tool:
|
|
43
50
|
|
|
44
51
|
```jsonc
|
|
@@ -54,30 +61,14 @@ Then pass `user` to any authenticated tool:
|
|
|
54
61
|
|
|
55
62
|
Resolution rules:
|
|
56
63
|
|
|
57
|
-
- The default account (used when `user` is omitted)
|
|
58
|
-
- A `user` argument matches a
|
|
64
|
+
- The default account (used when `user` is omitted) is `PORKBUN_API_KEY` / `PORKBUN_SECRET_API_KEY`, or — if defined — the entry in `PORKBUN_ACCOUNTS_FILE` with `user: "default"`.
|
|
65
|
+
- A `user` argument matches a configured account by lowercased identifier.
|
|
59
66
|
- Use `porkbun_list_users` to discover which user identifiers are configured.
|
|
60
67
|
|
|
61
68
|
## Usage with Claude Desktop
|
|
62
69
|
|
|
63
70
|
Add to your Claude Desktop config (`claude_desktop_config.json`):
|
|
64
71
|
|
|
65
|
-
```json
|
|
66
|
-
{
|
|
67
|
-
"mcpServers": {
|
|
68
|
-
"porkbun": {
|
|
69
|
-
"command": "npx",
|
|
70
|
-
"args": ["-y", "porkbun-mcp-server"],
|
|
71
|
-
"env": {
|
|
72
|
-
"PORKBUN_ACCOUNTS": "[{\"user\":\"default\",\"PORKBUN_API_KEY\":\"pk1_...\",\"PORKBUN_SECRET_API_KEY\":\"sk1_...\"},{\"user\":\"alice\",\"PORKBUN_API_KEY\":\"pk1_...\",\"PORKBUN_SECRET_API_KEY\":\"sk1_...\"}]"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Or, for a single account, the simpler form:
|
|
80
|
-
|
|
81
72
|
```json
|
|
82
73
|
{
|
|
83
74
|
"mcpServers": {
|
|
@@ -86,13 +77,16 @@ Or, for a single account, the simpler form:
|
|
|
86
77
|
"args": ["-y", "porkbun-mcp-server"],
|
|
87
78
|
"env": {
|
|
88
79
|
"PORKBUN_API_KEY": "pk1_...",
|
|
89
|
-
"PORKBUN_SECRET_API_KEY": "sk1_..."
|
|
80
|
+
"PORKBUN_SECRET_API_KEY": "sk1_...",
|
|
81
|
+
"PORKBUN_ACCOUNTS_FILE": "/Users/you/.porkbun-accounts.json"
|
|
90
82
|
}
|
|
91
83
|
}
|
|
92
84
|
}
|
|
93
85
|
}
|
|
94
86
|
```
|
|
95
87
|
|
|
88
|
+
`PORKBUN_ACCOUNTS_FILE` is optional — leave it out for a single-account setup.
|
|
89
|
+
|
|
96
90
|
## Tools (33)
|
|
97
91
|
|
|
98
92
|
### Utility
|
|
@@ -144,7 +138,7 @@ Or, for a single account, the simpler form:
|
|
|
144
138
|
### Marketplace
|
|
145
139
|
- `porkbun_marketplace_list` — List marketplace domains
|
|
146
140
|
|
|
147
|
-
Every authenticated tool accepts an optional `user` parameter that selects which
|
|
141
|
+
Every authenticated tool accepts an optional `user` parameter that selects which account from `PORKBUN_ACCOUNTS_FILE` to use. Omit it to use the default account.
|
|
148
142
|
|
|
149
143
|
## Development
|
|
150
144
|
|
package/dist/client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Returns the list of configured user identifiers, lowercased.
|
|
3
3
|
*
|
|
4
4
|
* Includes "default" when default credentials are present, plus any users
|
|
5
|
-
* defined
|
|
5
|
+
* defined in the file referenced by `PORKBUN_ACCOUNTS_FILE`.
|
|
6
6
|
*/
|
|
7
7
|
export declare function listConfiguredUsers(): string[];
|
|
8
8
|
/** Test-only: clear the parsed-accounts cache. */
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAiIA;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C;AAED,kDAAkD;AAClD,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAED,wBAAsB,cAAc,CAAC,CAAC,EACpC,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,CAAC,CAAC,CAyBZ;AAED,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,CAAC,CAAC,CAkBZ"}
|
package/dist/client.js
CHANGED
|
@@ -4,62 +4,86 @@ exports.listConfiguredUsers = listConfiguredUsers;
|
|
|
4
4
|
exports._resetAccountsCache = _resetAccountsCache;
|
|
5
5
|
exports.porkbunRequest = porkbunRequest;
|
|
6
6
|
exports.porkbunRequestNoAuth = porkbunRequestNoAuth;
|
|
7
|
+
const node_fs_1 = require("node:fs");
|
|
7
8
|
const BASE_URL = "https://api.porkbun.com/api/json/v3";
|
|
8
9
|
let cachedAccounts = null;
|
|
9
|
-
let
|
|
10
|
+
let cachedSnapshot;
|
|
11
|
+
function envSnapshot() {
|
|
12
|
+
return [
|
|
13
|
+
`PORKBUN_API_KEY=${process.env.PORKBUN_API_KEY ?? ""}`,
|
|
14
|
+
`PORKBUN_SECRET_API_KEY=${process.env.PORKBUN_SECRET_API_KEY ?? ""}`,
|
|
15
|
+
`PORKBUN_ACCOUNTS_FILE=${process.env.PORKBUN_ACCOUNTS_FILE ?? ""}`,
|
|
16
|
+
].join("\n");
|
|
17
|
+
}
|
|
18
|
+
function parseAccountsJson(raw, source) {
|
|
19
|
+
let parsed;
|
|
20
|
+
try {
|
|
21
|
+
parsed = JSON.parse(raw);
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
throw new Error(`${source} is not valid JSON: ${err instanceof Error ? err.message : String(err)}`);
|
|
25
|
+
}
|
|
26
|
+
if (!Array.isArray(parsed)) {
|
|
27
|
+
throw new Error(`${source} must be a JSON array of account objects`);
|
|
28
|
+
}
|
|
29
|
+
const out = new Map();
|
|
30
|
+
for (const [i, entry] of parsed.entries()) {
|
|
31
|
+
if (!entry || typeof entry !== "object") {
|
|
32
|
+
throw new Error(`${source}[${i}] is not an object`);
|
|
33
|
+
}
|
|
34
|
+
const acc = entry;
|
|
35
|
+
const apiKey = acc.PORKBUN_API_KEY ?? acc.apiKey;
|
|
36
|
+
const secretApiKey = acc.PORKBUN_SECRET_API_KEY ?? acc.secretApiKey;
|
|
37
|
+
if (!apiKey || !secretApiKey) {
|
|
38
|
+
throw new Error(`${source}[${i}] is missing PORKBUN_API_KEY or PORKBUN_SECRET_API_KEY`);
|
|
39
|
+
}
|
|
40
|
+
const user = (acc.user ?? "default").trim().toLowerCase();
|
|
41
|
+
if (out.has(user)) {
|
|
42
|
+
throw new Error(`${source} contains duplicate user "${user}"`);
|
|
43
|
+
}
|
|
44
|
+
out.set(user, { user, apiKey, secretApiKey });
|
|
45
|
+
}
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
10
48
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
49
|
+
* Build the account map from supported configuration sources, merged in
|
|
50
|
+
* this order (later sources override earlier ones for the same user):
|
|
51
|
+
*
|
|
52
|
+
* 1. Top-level `PORKBUN_API_KEY` / `PORKBUN_SECRET_API_KEY` → "default" account
|
|
53
|
+
* 2. `PORKBUN_ACCOUNTS_FILE` — path to a JSON file containing
|
|
54
|
+
* `[{user, PORKBUN_API_KEY, PORKBUN_SECRET_API_KEY}, ...]`
|
|
55
|
+
*
|
|
56
|
+
* User identifiers are lowercased throughout.
|
|
16
57
|
*/
|
|
17
58
|
function parseAccounts() {
|
|
18
|
-
const
|
|
19
|
-
if (cachedAccounts &&
|
|
59
|
+
const snapshot = envSnapshot();
|
|
60
|
+
if (cachedAccounts && cachedSnapshot === snapshot)
|
|
20
61
|
return cachedAccounts;
|
|
21
62
|
const map = new Map();
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
try {
|
|
25
|
-
parsed = JSON.parse(raw);
|
|
26
|
-
}
|
|
27
|
-
catch (err) {
|
|
28
|
-
throw new Error(`PORKBUN_ACCOUNTS is not valid JSON: ${err instanceof Error ? err.message : String(err)}`);
|
|
29
|
-
}
|
|
30
|
-
if (!Array.isArray(parsed)) {
|
|
31
|
-
throw new Error("PORKBUN_ACCOUNTS must be a JSON array of account objects");
|
|
32
|
-
}
|
|
33
|
-
for (const [i, entry] of parsed.entries()) {
|
|
34
|
-
if (!entry || typeof entry !== "object") {
|
|
35
|
-
throw new Error(`PORKBUN_ACCOUNTS[${i}] is not an object`);
|
|
36
|
-
}
|
|
37
|
-
const acc = entry;
|
|
38
|
-
const apiKey = acc.PORKBUN_API_KEY ?? acc.apiKey;
|
|
39
|
-
const secretApiKey = acc.PORKBUN_SECRET_API_KEY ?? acc.secretApiKey;
|
|
40
|
-
if (!apiKey || !secretApiKey) {
|
|
41
|
-
throw new Error(`PORKBUN_ACCOUNTS[${i}] is missing PORKBUN_API_KEY or PORKBUN_SECRET_API_KEY`);
|
|
42
|
-
}
|
|
43
|
-
const user = (acc.user ?? "default").trim().toLowerCase();
|
|
44
|
-
if (map.has(user)) {
|
|
45
|
-
throw new Error(`PORKBUN_ACCOUNTS contains duplicate user "${user}"`);
|
|
46
|
-
}
|
|
47
|
-
map.set(user, { user, apiKey, secretApiKey });
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
// Top-level PORKBUN_API_KEY / PORKBUN_SECRET_API_KEY are the default if
|
|
51
|
-
// not already provided via PORKBUN_ACCOUNTS.
|
|
52
|
-
if (!map.has("default") &&
|
|
53
|
-
process.env.PORKBUN_API_KEY &&
|
|
54
|
-
process.env.PORKBUN_SECRET_API_KEY) {
|
|
63
|
+
// 1. Default account from top-level env vars
|
|
64
|
+
if (process.env.PORKBUN_API_KEY && process.env.PORKBUN_SECRET_API_KEY) {
|
|
55
65
|
map.set("default", {
|
|
56
66
|
user: "default",
|
|
57
67
|
apiKey: process.env.PORKBUN_API_KEY,
|
|
58
68
|
secretApiKey: process.env.PORKBUN_SECRET_API_KEY,
|
|
59
69
|
});
|
|
60
70
|
}
|
|
71
|
+
// 2. PORKBUN_ACCOUNTS_FILE — path to a JSON file containing the array
|
|
72
|
+
const filePath = process.env.PORKBUN_ACCOUNTS_FILE;
|
|
73
|
+
if (filePath && filePath.trim()) {
|
|
74
|
+
let raw;
|
|
75
|
+
try {
|
|
76
|
+
raw = (0, node_fs_1.readFileSync)(filePath.trim(), "utf8");
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
throw new Error(`PORKBUN_ACCOUNTS_FILE could not be read at "${filePath}": ${err instanceof Error ? err.message : String(err)}`);
|
|
80
|
+
}
|
|
81
|
+
for (const [user, acc] of parseAccountsJson(raw, "PORKBUN_ACCOUNTS_FILE")) {
|
|
82
|
+
map.set(user, acc);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
61
85
|
cachedAccounts = map;
|
|
62
|
-
|
|
86
|
+
cachedSnapshot = snapshot;
|
|
63
87
|
return map;
|
|
64
88
|
}
|
|
65
89
|
function resolveAccount(user) {
|
|
@@ -69,7 +93,8 @@ function resolveAccount(user) {
|
|
|
69
93
|
if (!acc) {
|
|
70
94
|
if (!user || key === "default") {
|
|
71
95
|
throw new Error("No default Porkbun credentials configured. Set PORKBUN_API_KEY and " +
|
|
72
|
-
"PORKBUN_SECRET_API_KEY
|
|
96
|
+
"PORKBUN_SECRET_API_KEY (or include a default entry in the file " +
|
|
97
|
+
"referenced by PORKBUN_ACCOUNTS_FILE).");
|
|
73
98
|
}
|
|
74
99
|
const known = [...accounts.keys()].join(", ") || "(none)";
|
|
75
100
|
throw new Error(`No Porkbun credentials configured for user "${user}". Configured users: ${known}`);
|
|
@@ -80,7 +105,7 @@ function resolveAccount(user) {
|
|
|
80
105
|
* Returns the list of configured user identifiers, lowercased.
|
|
81
106
|
*
|
|
82
107
|
* Includes "default" when default credentials are present, plus any users
|
|
83
|
-
* defined
|
|
108
|
+
* defined in the file referenced by `PORKBUN_ACCOUNTS_FILE`.
|
|
84
109
|
*/
|
|
85
110
|
function listConfiguredUsers() {
|
|
86
111
|
return [...parseAccounts().keys()];
|
|
@@ -88,7 +113,7 @@ function listConfiguredUsers() {
|
|
|
88
113
|
/** Test-only: clear the parsed-accounts cache. */
|
|
89
114
|
function _resetAccountsCache() {
|
|
90
115
|
cachedAccounts = null;
|
|
91
|
-
|
|
116
|
+
cachedSnapshot = undefined;
|
|
92
117
|
}
|
|
93
118
|
async function porkbunRequest(path, body, user) {
|
|
94
119
|
const account = resolveAccount(user);
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;AAuIA,kDAEC;AAGD,kDAGC;AAED,wCA6BC;AAED,oDAqBC;AArMD,qCAAuC;AAEvC,MAAM,QAAQ,GAAG,qCAAqC,CAAC;AAgBvD,IAAI,cAAc,GAAgC,IAAI,CAAC;AACvD,IAAI,cAAkC,CAAC;AAEvC,SAAS,WAAW;IAClB,OAAO;QACL,mBAAmB,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,EAAE;QACtD,0BAA0B,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,EAAE,EAAE;QACpE,yBAAyB,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,EAAE,EAAE;KACnE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,iBAAiB,CAAC,GAAW,EAAE,MAAc;IACpD,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,GAAG,M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MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,oBAAoB,IAAI,KAAK,GAAG,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,IAAS,CAAC;AACnB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const email_js_1 = require("./tools/email.js");
|
|
|
13
13
|
const marketplace_js_1 = require("./tools/marketplace.js");
|
|
14
14
|
const server = new mcp_js_1.McpServer({
|
|
15
15
|
name: "porkbun-mcp",
|
|
16
|
-
version: "1.
|
|
16
|
+
version: "1.4.0",
|
|
17
17
|
});
|
|
18
18
|
const allTools = [
|
|
19
19
|
...utility_js_1.utilityTools,
|
package/dist/tools/_shared.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/**
|
|
3
3
|
* Optional `user` field added to every authenticated tool. Selects which
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* or
|
|
4
|
+
* account from the file referenced by `PORKBUN_ACCOUNTS_FILE` to use. Omit
|
|
5
|
+
* to use the default account from `PORKBUN_API_KEY` / `PORKBUN_SECRET_API_KEY`
|
|
6
|
+
* (or a `user: "default"` entry in the accounts file).
|
|
7
7
|
*/
|
|
8
8
|
export declare const userField: z.ZodOptional<z.ZodString>;
|
|
9
9
|
//# sourceMappingURL=_shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,SAAS,4BAOnB,CAAC"}
|
package/dist/tools/_shared.js
CHANGED
|
@@ -4,16 +4,14 @@ exports.userField = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
/**
|
|
6
6
|
* Optional `user` field added to every authenticated tool. Selects which
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* or
|
|
7
|
+
* account from the file referenced by `PORKBUN_ACCOUNTS_FILE` to use. Omit
|
|
8
|
+
* to use the default account from `PORKBUN_API_KEY` / `PORKBUN_SECRET_API_KEY`
|
|
9
|
+
* (or a `user: "default"` entry in the accounts file).
|
|
10
10
|
*/
|
|
11
11
|
exports.userField = zod_1.z
|
|
12
12
|
.string()
|
|
13
13
|
.optional()
|
|
14
|
-
.describe("Optional user identifier to select which Porkbun account
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"PORKBUN_API_KEY / PORKBUN_SECRET_API_KEY, or PORKBUN_ACCOUNTS entry with " +
|
|
18
|
-
'user "default").');
|
|
14
|
+
.describe("Optional user identifier to select which Porkbun account to use from the " +
|
|
15
|
+
"file referenced by PORKBUN_ACCOUNTS_FILE. Matching is case-insensitive. " +
|
|
16
|
+
"Omit to use the default account (PORKBUN_API_KEY / PORKBUN_SECRET_API_KEY).");
|
|
19
17
|
//# sourceMappingURL=_shared.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB;;;;;GAKG;AACU,QAAA,SAAS,GAAG,OAAC;KACvB,MAAM,EAAE;KACR,QAAQ,EAAE;KACV,QAAQ,CACP,
|
|
1
|
+
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB;;;;;GAKG;AACU,QAAA,SAAS,GAAG,OAAC;KACvB,MAAM,EAAE;KACR,QAAQ,EAAE;KACV,QAAQ,CACP,2EAA2E;IACzE,0EAA0E;IAC1E,6EAA6E,CAChF,CAAC"}
|