@teambit/clear-cache 0.0.360 → 0.0.362
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/clear-cache-cmd.js +17 -4
- package/dist/clear-cache-cmd.js.map +1 -1
- package/dist/clear-cache.main.runtime.d.ts +8 -6
- package/dist/clear-cache.main.runtime.js +28 -42
- package/dist/clear-cache.main.runtime.js.map +1 -1
- package/dist/{preview-1698204020177.js → preview-1698895126768.js} +2 -2
- package/package.json +3 -3
- package/dist/clear-cache-action.d.ts +0 -7
- package/dist/clear-cache-action.js +0 -23
- package/dist/clear-cache-action.js.map +0 -1
package/dist/clear-cache-cmd.js
CHANGED
|
@@ -42,10 +42,23 @@ class ClearCacheCmd {
|
|
|
42
42
|
}
|
|
43
43
|
return _chalk().default.red(`failed cleaning the cache of "${remote}"`);
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
const {
|
|
46
|
+
succeed,
|
|
47
|
+
failed
|
|
48
|
+
} = await this.clearCache.clearCache();
|
|
49
|
+
const getSuccessOutput = () => {
|
|
50
|
+
if (!succeed.length) return '';
|
|
51
|
+
const title = 'the following cache(s) have been cleared:';
|
|
52
|
+
const output = succeed.map(str => ` ✔ ${str}`).join('\n');
|
|
53
|
+
return _chalk().default.green(`${_chalk().default.bold(title)}\n${output}`);
|
|
54
|
+
};
|
|
55
|
+
const getFailedOutput = () => {
|
|
56
|
+
if (!failed.length) return '';
|
|
57
|
+
const title = 'the following cache(s) failed to clear:';
|
|
58
|
+
const output = failed.map(str => ` X ${str}`).join('\n');
|
|
59
|
+
return _chalk().default.red(`${_chalk().default.bold(title)}\n${output}`);
|
|
60
|
+
};
|
|
61
|
+
return `${getSuccessOutput()}\n${getFailedOutput()}`;
|
|
49
62
|
}
|
|
50
63
|
}
|
|
51
64
|
exports.default = ClearCacheCmd;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","ClearCacheCmd","constructor","clearCache","extendedDescription","report","remote","success","clearRemoteCache","chalk","green","red","
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","ClearCacheCmd","constructor","clearCache","extendedDescription","report","remote","success","clearRemoteCache","chalk","green","red","succeed","failed","getSuccessOutput","length","title","output","map","str","join","bold","getFailedOutput","exports"],"sources":["clear-cache-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { ClearCacheMain } from './clear-cache.main.runtime';\n\nexport default class ClearCacheCmd implements Command {\n name = 'clear-cache';\n description = \"clears Bit's cache from current working machine\";\n group = 'general';\n extendedDescription: string;\n alias = 'cc';\n options = [['r', 'remote <remote-name>', 'clear memory cache from a remote scope']] as CommandOptions;\n loader = false;\n skipWorkspace = true;\n helpUrl = 'reference/workspace/clearing-cache';\n\n constructor(private clearCache: ClearCacheMain) {\n this.extendedDescription = `The following gets removed by this command:\n1) V8 compiled code (generated the first time Bit is loaded by v8-compile-cache package)\n2) components cache on the filesystem (mainly the dependencies graph and docs)\n3) scope's index file, which maps the component-id:object-hash`;\n }\n\n async report(arg, { remote }: { remote?: string }): Promise<string> {\n if (remote) {\n const success = await this.clearCache.clearRemoteCache(remote);\n if (success) {\n return chalk.green(`successfully cleaned the cache of \"${remote}\"`);\n }\n return chalk.red(`failed cleaning the cache of \"${remote}\"`);\n }\n const { succeed, failed } = await this.clearCache.clearCache();\n const getSuccessOutput = () => {\n if (!succeed.length) return '';\n const title = 'the following cache(s) have been cleared:';\n const output = succeed.map((str) => ` ✔ ${str}`).join('\\n');\n return chalk.green(`${chalk.bold(title)}\\n${output}`);\n };\n const getFailedOutput = () => {\n if (!failed.length) return '';\n const title = 'the following cache(s) failed to clear:';\n const output = failed.map((str) => ` X ${str}`).join('\\n');\n return chalk.red(`${chalk.bold(title)}\\n${output}`);\n };\n return `${getSuccessOutput()}\\n${getFailedOutput()}`;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,M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K,CAAE,KAAIC,MAAO,EAAC,CAAC;IACvD,CAAC;IACD,MAAMK,eAAe,GAAGA,CAAA,KAAM;MAC5B,IAAI,CAACT,MAAM,CAACE,MAAM,EAAE,OAAO,EAAE;MAC7B,MAAMC,KAAK,GAAG,yCAAyC;MACvD,MAAMC,MAAM,GAAGJ,MAAM,CAACK,GAAG,CAAEC,GAAG,IAAM,OAAMA,GAAI,EAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;MAC3D,OAAOX,gBAAK,CAACE,GAAG,CAAE,GAAEF,gBAAK,CAACY,IAAI,CAACL,KAAK,CAAE,KAAIC,MAAO,EAAC,CAAC;IACrD,CAAC;IACD,OAAQ,GAAEH,gBAAgB,CAAC,CAAE,KAAIQ,eAAe,CAAC,CAAE,EAAC;EACtD;AACF;AAACC,OAAA,CAAA7C,OAAA,GAAAuB,aAAA"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { CLIMain } from '@teambit/cli';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { CacheClearResult } from '@teambit/legacy/dist/api/consumer/lib/clear-cache';
|
|
3
|
+
/**
|
|
4
|
+
* avoid adding `workspace` / `scope` aspects as dependencies to this aspect.
|
|
5
|
+
* the clear-cache command is often being used when the workspace/scope is not working properly.
|
|
6
|
+
*/
|
|
4
7
|
export declare class ClearCacheMain {
|
|
5
|
-
|
|
6
|
-
constructor(workspace?: Workspace | undefined);
|
|
7
|
-
clearCache(): Promise<string[]>;
|
|
8
|
+
clearCache(): Promise<CacheClearResult>;
|
|
8
9
|
clearRemoteCache(remote: string): Promise<unknown>;
|
|
10
|
+
private getConsumerGracefully;
|
|
9
11
|
static slots: never[];
|
|
10
12
|
static dependencies: import("@teambit/harmony").Aspect[];
|
|
11
13
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
12
|
-
static provider([
|
|
14
|
+
static provider([cli]: [CLIMain]): Promise<ClearCacheMain>;
|
|
13
15
|
}
|
|
@@ -11,41 +11,27 @@ function _cli() {
|
|
|
11
11
|
};
|
|
12
12
|
return data;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const data =
|
|
16
|
-
|
|
14
|
+
function _clearCache() {
|
|
15
|
+
const data = require("@teambit/legacy/dist/api/consumer/lib/clear-cache");
|
|
16
|
+
_clearCache = function () {
|
|
17
17
|
return data;
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const data = _interopRequireDefault(require("@teambit/
|
|
23
|
-
|
|
21
|
+
function _getRemoteByName() {
|
|
22
|
+
const data = _interopRequireDefault(require("@teambit/legacy/dist/remotes/get-remote-by-name"));
|
|
23
|
+
_getRemoteByName = function () {
|
|
24
24
|
return data;
|
|
25
25
|
};
|
|
26
26
|
return data;
|
|
27
27
|
}
|
|
28
28
|
function _consumer() {
|
|
29
|
-
const data = require("@teambit/legacy/dist/
|
|
29
|
+
const data = require("@teambit/legacy/dist/consumer");
|
|
30
30
|
_consumer = function () {
|
|
31
31
|
return data;
|
|
32
32
|
};
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
|
-
function _action() {
|
|
36
|
-
const data = require("@teambit/legacy/dist/api/scope/lib/action");
|
|
37
|
-
_action = function () {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
42
|
-
function _getRemoteByName() {
|
|
43
|
-
const data = _interopRequireDefault(require("@teambit/legacy/dist/remotes/get-remote-by-name"));
|
|
44
|
-
_getRemoteByName = function () {
|
|
45
|
-
return data;
|
|
46
|
-
};
|
|
47
|
-
return data;
|
|
48
|
-
}
|
|
49
35
|
function _clearCacheCmd() {
|
|
50
36
|
const data = _interopRequireDefault(require("./clear-cache-cmd"));
|
|
51
37
|
_clearCacheCmd = function () {
|
|
@@ -53,16 +39,9 @@ function _clearCacheCmd() {
|
|
|
53
39
|
};
|
|
54
40
|
return data;
|
|
55
41
|
}
|
|
56
|
-
function
|
|
42
|
+
function _clearCache2() {
|
|
57
43
|
const data = require("./clear-cache.aspect");
|
|
58
|
-
|
|
59
|
-
return data;
|
|
60
|
-
};
|
|
61
|
-
return data;
|
|
62
|
-
}
|
|
63
|
-
function _clearCacheAction() {
|
|
64
|
-
const data = require("./clear-cache-action");
|
|
65
|
-
_clearCacheAction = function () {
|
|
44
|
+
_clearCache2 = function () {
|
|
66
45
|
return data;
|
|
67
46
|
};
|
|
68
47
|
return data;
|
|
@@ -71,30 +50,37 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
71
50
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
72
51
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
73
52
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
53
|
+
/**
|
|
54
|
+
* avoid adding `workspace` / `scope` aspects as dependencies to this aspect.
|
|
55
|
+
* the clear-cache command is often being used when the workspace/scope is not working properly.
|
|
56
|
+
*/
|
|
74
57
|
class ClearCacheMain {
|
|
75
|
-
constructor(workspace) {
|
|
76
|
-
this.workspace = workspace;
|
|
77
|
-
}
|
|
78
58
|
async clearCache() {
|
|
79
|
-
return (0,
|
|
59
|
+
return (0, _clearCache().clearCache)();
|
|
80
60
|
}
|
|
81
61
|
async clearRemoteCache(remote) {
|
|
82
|
-
|
|
83
|
-
const remoteObj = await (0, _getRemoteByName().default)(remote,
|
|
84
|
-
const result = await remoteObj.action(
|
|
62
|
+
const maybeConsumer = await this.getConsumerGracefully();
|
|
63
|
+
const remoteObj = await (0, _getRemoteByName().default)(remote, maybeConsumer);
|
|
64
|
+
const result = await remoteObj.action('ClearCacheAction', {});
|
|
85
65
|
return result;
|
|
86
66
|
}
|
|
87
|
-
|
|
88
|
-
|
|
67
|
+
async getConsumerGracefully() {
|
|
68
|
+
try {
|
|
69
|
+
return await (0, _consumer().loadConsumerIfExist)();
|
|
70
|
+
} catch (err) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
static async provider([cli]) {
|
|
75
|
+
const clearCacheMain = new ClearCacheMain();
|
|
89
76
|
cli.register(new (_clearCacheCmd().default)(clearCacheMain));
|
|
90
|
-
_action().ExternalActions.externalActions.push(new (_clearCacheAction().ClearCacheAction)(scope));
|
|
91
77
|
return clearCacheMain;
|
|
92
78
|
}
|
|
93
79
|
}
|
|
94
80
|
exports.ClearCacheMain = ClearCacheMain;
|
|
95
81
|
_defineProperty(ClearCacheMain, "slots", []);
|
|
96
|
-
_defineProperty(ClearCacheMain, "dependencies", [
|
|
82
|
+
_defineProperty(ClearCacheMain, "dependencies", [_cli().CLIAspect]);
|
|
97
83
|
_defineProperty(ClearCacheMain, "runtime", _cli().MainRuntime);
|
|
98
|
-
|
|
84
|
+
_clearCache2().ClearCacheAspect.addRuntime(ClearCacheMain);
|
|
99
85
|
|
|
100
86
|
//# sourceMappingURL=clear-cache.main.runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_clearCache","_getRemoteByName","_interopRequireDefault","_consumer","_clearCacheCmd","_clearCache2","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","ClearCacheMain","clearCache","clearRemoteCache","remote","maybeConsumer","getConsumerGracefully","remoteObj","getRemoteByName","result","action","loadConsumerIfExist","err","provider","cli","clearCacheMain","register","ClearCacheCmd","exports","CLIAspect","MainRuntime","ClearCacheAspect","addRuntime"],"sources":["clear-cache.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { clearCache, CacheClearResult } from '@teambit/legacy/dist/api/consumer/lib/clear-cache';\nimport getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';\nimport { loadConsumerIfExist, Consumer } from '@teambit/legacy/dist/consumer';\nimport ClearCacheCmd from './clear-cache-cmd';\nimport { ClearCacheAspect } from './clear-cache.aspect';\n\n/**\n * avoid adding `workspace` / `scope` aspects as dependencies to this aspect.\n * the clear-cache command is often being used when the workspace/scope is not working properly.\n */\nexport class ClearCacheMain {\n async clearCache(): Promise<CacheClearResult> {\n return clearCache();\n }\n\n async clearRemoteCache(remote: string) {\n const maybeConsumer = await this.getConsumerGracefully();\n const remoteObj = await getRemoteByName(remote, maybeConsumer);\n const result = await remoteObj.action('ClearCacheAction', {});\n return result;\n }\n\n private async getConsumerGracefully(): Promise<Consumer | undefined> {\n try {\n return await loadConsumerIfExist();\n } catch (err: any) {\n return undefined;\n }\n }\n\n static slots = [];\n static dependencies = [CLIAspect];\n static runtime = MainRuntime;\n static async provider([cli]: [CLIMain]) {\n const clearCacheMain = new ClearCacheMain();\n cli.register(new ClearCacheCmd(clearCacheMain));\n return clearCacheMain;\n }\n}\n\nClearCacheAspect.addRuntime(ClearCacheMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,iBAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,gBAAA,YAAAA,CAAA;IAAA,OAAAH,IA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* as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_clear-cache@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_clear-cache@0.0.362/dist/clear-cache.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_clear-cache@0.0.362/dist/clear-cache.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/clear-cache",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.362",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/workspace/clear-cache",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.workspace",
|
|
8
8
|
"name": "clear-cache",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.362"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@types/testing-library__jest-dom": "5.9.5"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@teambit/legacy": "1.0.
|
|
26
|
+
"@teambit/legacy": "1.0.587",
|
|
27
27
|
"react": "^16.8.0 || ^17.0.0",
|
|
28
28
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
29
29
|
},
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ClearCacheAction = void 0;
|
|
7
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
9
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
-
class ClearCacheAction {
|
|
11
|
-
constructor(scope) {
|
|
12
|
-
this.scope = scope;
|
|
13
|
-
_defineProperty(this, "name", ClearCacheAction.name);
|
|
14
|
-
}
|
|
15
|
-
async execute() {
|
|
16
|
-
if (!this.scope) return false;
|
|
17
|
-
await this.scope.clearCache();
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.ClearCacheAction = ClearCacheAction;
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=clear-cache-action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ClearCacheAction","constructor","scope","_defineProperty","name","execute","clearCache","exports"],"sources":["clear-cache-action.ts"],"sourcesContent":["import { ScopeMain } from '@teambit/scope';\n\nexport class ClearCacheAction {\n name = ClearCacheAction.name;\n constructor(private scope: ScopeMain) {}\n async execute() {\n if (!this.scope) return false;\n await this.scope.clearCache();\n return true;\n }\n}\n"],"mappings":";;;;;;;;;AAEO,MAAMA,gBAAgB,CAAC;EAE5BC,WAAWA,CAASC,KAAgB,EAAE;IAAA,KAAlBA,KAAgB,GAAhBA,KAAgB;IAAAC,eAAA,eAD7BH,gBAAgB,CAACI,IAAI;EACW;EACvC,MAAMC,OAAOA,CAAA,EAAG;IACd,IAAI,CAAC,IAAI,CAACH,KAAK,EAAE,OAAO,KAAK;IAC7B,MAAM,IAAI,CAACA,KAAK,CAACI,UAAU,CAAC,CAAC;IAC7B,OAAO,IAAI;EACb;AACF;AAACC,OAAA,CAAAP,gBAAA,GAAAA,gBAAA"}
|