@opensumi/ide-connection 2.27.3-rc-1708399099.0 → 2.27.3-rc-1710489030.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 +1 -1
- package/lib/browser/ws-channel-handler.d.ts +1 -1
- package/lib/browser/ws-channel-handler.d.ts.map +1 -1
- package/lib/browser/ws-channel-handler.js +23 -33
- package/lib/browser/ws-channel-handler.js.map +1 -1
- package/lib/common/buffers/buffers.d.ts +1 -0
- package/lib/common/buffers/buffers.d.ts.map +1 -1
- package/lib/common/buffers/buffers.js +3 -3
- package/lib/common/buffers/buffers.js.map +1 -1
- package/lib/common/{utils.d.ts → capturer.d.ts} +1 -19
- package/lib/common/capturer.d.ts.map +1 -0
- package/lib/common/capturer.js +26 -0
- package/lib/common/capturer.js.map +1 -0
- package/lib/common/connection/drivers/frame-decoder.d.ts +40 -1
- package/lib/common/connection/drivers/frame-decoder.d.ts.map +1 -1
- package/lib/common/connection/drivers/frame-decoder.js +9 -10
- package/lib/common/connection/drivers/frame-decoder.js.map +1 -1
- package/lib/common/connection/drivers/index.d.ts +0 -1
- package/lib/common/connection/drivers/index.d.ts.map +1 -1
- package/lib/common/connection/drivers/index.js +0 -1
- package/lib/common/connection/drivers/index.js.map +1 -1
- package/lib/common/connection/drivers/message-port.d.ts.map +1 -1
- package/lib/common/connection/drivers/message-port.js +1 -4
- package/lib/common/connection/drivers/message-port.js.map +1 -1
- package/lib/common/connection/drivers/node-message-port.d.ts +1 -1
- package/lib/common/connection/drivers/node-message-port.d.ts.map +1 -1
- package/lib/common/connection/drivers/node-message-port.js.map +1 -1
- package/lib/common/connection/drivers/reconnecting-websocket.d.ts.map +1 -1
- package/lib/common/connection/drivers/reconnecting-websocket.js +1 -1
- package/lib/common/connection/drivers/reconnecting-websocket.js.map +1 -1
- package/lib/common/connection/drivers/socket.d.ts +3 -10
- package/lib/common/connection/drivers/socket.d.ts.map +1 -1
- package/lib/common/connection/drivers/socket.js +3 -36
- package/lib/common/connection/drivers/socket.js.map +1 -1
- package/lib/common/connection/drivers/stream.d.ts +17 -0
- package/lib/common/connection/drivers/stream.d.ts.map +1 -0
- package/lib/common/connection/drivers/stream.js +70 -0
- package/lib/common/connection/drivers/stream.js.map +1 -0
- package/lib/common/connection/drivers/ws-websocket.d.ts +1 -1
- package/lib/common/connection/drivers/ws-websocket.d.ts.map +1 -1
- package/lib/common/connection/drivers/ws-websocket.js.map +1 -1
- package/lib/common/fury-extends/any.d.ts +10 -7
- package/lib/common/fury-extends/any.d.ts.map +1 -1
- package/lib/common/fury-extends/any.js +126 -105
- package/lib/common/fury-extends/any.js.map +1 -1
- package/lib/common/fury-extends/one-of.d.ts +10 -5
- package/lib/common/fury-extends/one-of.d.ts.map +1 -1
- package/lib/common/fury-extends/one-of.js +65 -30
- package/lib/common/fury-extends/one-of.js.map +1 -1
- package/lib/common/fury-extends/shared.d.ts +2 -0
- package/lib/common/fury-extends/shared.d.ts.map +1 -1
- package/lib/common/fury-extends/shared.js.map +1 -1
- package/lib/common/index.d.ts +2 -2
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +2 -2
- package/lib/common/index.js.map +1 -1
- package/lib/common/message.d.ts +1 -1
- package/lib/common/message.d.ts.map +1 -1
- package/lib/common/rpc/connection.d.ts +31 -15
- package/lib/common/rpc/connection.d.ts.map +1 -1
- package/lib/common/rpc/connection.js +206 -138
- package/lib/common/rpc/connection.js.map +1 -1
- package/lib/common/rpc/index.d.ts +1 -1
- package/lib/common/rpc/index.d.ts.map +1 -1
- package/lib/common/rpc/index.js +1 -1
- package/lib/common/rpc/index.js.map +1 -1
- package/lib/common/rpc/message-io.d.ts +61 -0
- package/lib/common/rpc/message-io.d.ts.map +1 -0
- package/lib/common/rpc/message-io.js +159 -0
- package/lib/common/rpc/message-io.js.map +1 -0
- package/lib/common/rpc/multiplexer.d.ts +3 -0
- package/lib/common/rpc/multiplexer.d.ts.map +1 -1
- package/lib/common/rpc/multiplexer.js +3 -0
- package/lib/common/rpc/multiplexer.js.map +1 -1
- package/lib/common/rpc/types.d.ts +26 -5
- package/lib/common/rpc/types.d.ts.map +1 -1
- package/lib/common/rpc-service/center.d.ts +6 -3
- package/lib/common/rpc-service/center.d.ts.map +1 -1
- package/lib/common/rpc-service/center.js +39 -31
- package/lib/common/rpc-service/center.js.map +1 -1
- package/lib/common/rpc-service/proxy/base.d.ts +5 -3
- package/lib/common/rpc-service/proxy/base.d.ts.map +1 -1
- package/lib/common/rpc-service/proxy/base.js +56 -17
- package/lib/common/rpc-service/proxy/base.js.map +1 -1
- package/lib/common/rpc-service/proxy/index.d.ts +1 -3
- package/lib/common/rpc-service/proxy/index.d.ts.map +1 -1
- package/lib/common/rpc-service/proxy/index.js +1 -3
- package/lib/common/rpc-service/proxy/index.js.map +1 -1
- package/lib/common/rpc-service/proxy/{legacy.d.ts → json.d.ts} +5 -5
- package/lib/common/rpc-service/proxy/json.d.ts.map +1 -0
- package/lib/common/rpc-service/proxy/{legacy.js → json.js} +46 -56
- package/lib/common/rpc-service/proxy/json.js.map +1 -0
- package/lib/common/rpc-service/proxy/sumi.d.ts +1 -1
- package/lib/common/rpc-service/proxy/sumi.d.ts.map +1 -1
- package/lib/common/rpc-service/proxy/sumi.js +25 -37
- package/lib/common/rpc-service/proxy/sumi.js.map +1 -1
- package/lib/common/rpc-service/{proxy/registry.d.ts → registry.d.ts} +12 -1
- package/lib/common/rpc-service/registry.d.ts.map +1 -0
- package/lib/common/rpc-service/registry.js +99 -0
- package/lib/common/rpc-service/registry.js.map +1 -0
- package/lib/common/rpc-service/stub.js +4 -6
- package/lib/common/rpc-service/stub.js.map +1 -1
- package/lib/common/{ext-rpc-protocol.d.ts → rpcProtocol.d.ts} +2 -2
- package/lib/common/rpcProtocol.d.ts.map +1 -0
- package/lib/common/{ext-rpc-protocol.js → rpcProtocol.js} +5 -6
- package/lib/common/rpcProtocol.js.map +1 -0
- package/lib/common/server-handler.d.ts +35 -0
- package/lib/common/server-handler.d.ts.map +1 -0
- package/lib/common/server-handler.js +165 -0
- package/lib/common/server-handler.js.map +1 -0
- package/lib/common/types.d.ts +14 -0
- package/lib/common/types.d.ts.map +1 -1
- package/lib/common/ws-channel.d.ts +6 -10
- package/lib/common/ws-channel.d.ts.map +1 -1
- package/lib/common/ws-channel.js +16 -15
- package/lib/common/ws-channel.js.map +1 -1
- package/lib/electron/channel-handler.d.ts +14 -0
- package/lib/electron/channel-handler.d.ts.map +1 -0
- package/lib/electron/channel-handler.js +26 -0
- package/lib/electron/channel-handler.js.map +1 -0
- package/lib/electron/index.d.ts +2 -0
- package/lib/electron/index.d.ts.map +1 -0
- package/lib/electron/index.js +5 -0
- package/lib/electron/index.js.map +1 -0
- package/lib/node/common-channel-handler.d.ts +6 -25
- package/lib/node/common-channel-handler.d.ts.map +1 -1
- package/lib/node/common-channel-handler.js +9 -151
- package/lib/node/common-channel-handler.js.map +1 -1
- package/package.json +5 -5
- package/src/browser/ws-channel-handler.ts +26 -40
- package/src/common/buffers/buffers.ts +1 -1
- package/src/common/capturer.ts +36 -0
- package/src/common/connection/drivers/frame-decoder.ts +11 -11
- package/src/common/connection/drivers/index.ts +0 -1
- package/src/common/connection/drivers/message-port.ts +1 -4
- package/src/common/connection/drivers/node-message-port.ts +2 -2
- package/src/common/connection/drivers/reconnecting-websocket.ts +3 -2
- package/src/common/connection/drivers/socket.ts +4 -42
- package/src/common/connection/drivers/stream.ts +76 -0
- package/src/common/connection/drivers/ws-websocket.ts +2 -2
- package/src/common/fury-extends/any.ts +122 -102
- package/src/common/fury-extends/one-of.ts +79 -31
- package/src/common/fury-extends/shared.ts +3 -0
- package/src/common/index.ts +2 -2
- package/src/common/message.ts +1 -1
- package/src/common/rpc/connection.ts +228 -166
- package/src/common/rpc/index.ts +1 -1
- package/src/common/rpc/message-io.ts +223 -0
- package/src/common/rpc/multiplexer.ts +3 -0
- package/src/common/rpc/types.ts +30 -5
- package/src/common/rpc-service/center.ts +37 -31
- package/src/common/rpc-service/proxy/base.ts +59 -12
- package/src/common/rpc-service/proxy/index.ts +1 -3
- package/src/common/rpc-service/proxy/{legacy.ts → json.ts} +47 -57
- package/src/common/rpc-service/proxy/sumi.ts +23 -35
- package/src/common/rpc-service/registry.ts +125 -0
- package/src/common/rpc-service/stub.ts +6 -6
- package/src/common/{ext-rpc-protocol.ts → rpcProtocol.ts} +2 -2
- package/src/common/server-handler.ts +183 -0
- package/src/common/types.ts +13 -0
- package/src/common/ws-channel.ts +21 -23
- package/src/electron/channel-handler.ts +26 -0
- package/src/electron/index.ts +1 -0
- package/src/node/common-channel-handler.ts +10 -165
- package/lib/common/connection/drivers/utils.d.ts +0 -12
- package/lib/common/connection/drivers/utils.d.ts.map +0 -1
- package/lib/common/connection/drivers/utils.js +0 -49
- package/lib/common/connection/drivers/utils.js.map +0 -1
- package/lib/common/ext-rpc-protocol.d.ts.map +0 -1
- package/lib/common/ext-rpc-protocol.js.map +0 -1
- package/lib/common/rpc/packet.d.ts +0 -65
- package/lib/common/rpc/packet.d.ts.map +0 -1
- package/lib/common/rpc/packet.js +0 -82
- package/lib/common/rpc/packet.js.map +0 -1
- package/lib/common/rpc/protocol-repository.d.ts +0 -32
- package/lib/common/rpc/protocol-repository.d.ts.map +0 -1
- package/lib/common/rpc/protocol-repository.js +0 -118
- package/lib/common/rpc/protocol-repository.js.map +0 -1
- package/lib/common/rpc/utils.d.ts +0 -2
- package/lib/common/rpc/utils.d.ts.map +0 -1
- package/lib/common/rpc/utils.js +0 -10
- package/lib/common/rpc/utils.js.map +0 -1
- package/lib/common/rpc-service/proxy/invoker.d.ts +0 -14
- package/lib/common/rpc-service/proxy/invoker.d.ts.map +0 -1
- package/lib/common/rpc-service/proxy/invoker.js +0 -34
- package/lib/common/rpc-service/proxy/invoker.js.map +0 -1
- package/lib/common/rpc-service/proxy/legacy.d.ts.map +0 -1
- package/lib/common/rpc-service/proxy/legacy.js.map +0 -1
- package/lib/common/rpc-service/proxy/registry.d.ts.map +0 -1
- package/lib/common/rpc-service/proxy/registry.js +0 -46
- package/lib/common/rpc-service/proxy/registry.js.map +0 -1
- package/lib/common/utils.d.ts.map +0 -1
- package/lib/common/utils.js +0 -57
- package/lib/common/utils.js.map +0 -1
- package/src/common/connection/drivers/utils.ts +0 -52
- package/src/common/rpc/packet.ts +0 -104
- package/src/common/rpc/protocol-repository.ts +0 -180
- package/src/common/rpc/utils.ts +0 -5
- package/src/common/rpc-service/proxy/invoker.ts +0 -45
- package/src/common/rpc-service/proxy/registry.ts +0 -56
- package/src/common/utils.ts +0 -80
|
@@ -1,37 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NetSocketConnection = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
class NetSocketConnection extends base_1.BaseConnection {
|
|
4
|
+
const stream_1 = require("./stream");
|
|
5
|
+
class NetSocketConnection extends stream_1.StreamConnection {
|
|
7
6
|
constructor(socket) {
|
|
8
|
-
super();
|
|
7
|
+
super(socket, socket);
|
|
9
8
|
this.socket = socket;
|
|
10
|
-
this.decoder = new frame_decoder_1.LengthFieldBasedFrameDecoder();
|
|
11
|
-
this.socket.on('data', (chunk) => {
|
|
12
|
-
this.decoder.push(chunk);
|
|
13
|
-
});
|
|
14
|
-
this.socket.once('close', () => {
|
|
15
|
-
this.decoder.dispose();
|
|
16
|
-
});
|
|
17
9
|
}
|
|
18
10
|
isOpen() {
|
|
19
11
|
return this.socket.readyState === 'open';
|
|
20
12
|
}
|
|
21
|
-
send(data) {
|
|
22
|
-
this.socket.write((0, frame_decoder_1.prependLengthField)(data));
|
|
23
|
-
}
|
|
24
|
-
onMessage(cb) {
|
|
25
|
-
return this.decoder.onData(cb);
|
|
26
|
-
}
|
|
27
|
-
onceClose(cb) {
|
|
28
|
-
this.socket.once('close', cb);
|
|
29
|
-
return {
|
|
30
|
-
dispose: () => {
|
|
31
|
-
this.socket.off('close', cb);
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
13
|
onOpen(cb) {
|
|
36
14
|
this.socket.on('connect', cb);
|
|
37
15
|
return {
|
|
@@ -40,17 +18,6 @@ class NetSocketConnection extends base_1.BaseConnection {
|
|
|
40
18
|
},
|
|
41
19
|
};
|
|
42
20
|
}
|
|
43
|
-
onError(cb) {
|
|
44
|
-
this.socket.on('error', cb);
|
|
45
|
-
return {
|
|
46
|
-
dispose: () => {
|
|
47
|
-
this.socket.off('error', cb);
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
dispose() {
|
|
52
|
-
this.decoder.dispose();
|
|
53
|
-
}
|
|
54
21
|
destroy() {
|
|
55
22
|
this.socket.destroy();
|
|
56
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socket.js","sourceRoot":"","sources":["../../../../src/common/connection/drivers/socket.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"socket.js","sourceRoot":"","sources":["../../../../src/common/connection/drivers/socket.ts"],"names":[],"mappings":";;;AAEA,qCAA4C;AAI5C,MAAa,mBAAoB,SAAQ,yBAAgB;IACvD,YAAoB,MAAkB;QACpC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QADJ,WAAM,GAAN,MAAM,CAAY;IAEtC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,KAAK,MAAM,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,EAAc;QACnB,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAC9B,OAAO;YACL,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;YACjC,CAAC;SACF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;CACF;AArBD,kDAqBC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { IDisposable } from '@opensumi/ide-core-common';
|
|
3
|
+
import { BaseConnection } from './base';
|
|
4
|
+
import { LengthFieldBasedFrameDecoder } from './frame-decoder';
|
|
5
|
+
import type { Readable, Writable } from 'stream';
|
|
6
|
+
export declare class StreamConnection extends BaseConnection<Uint8Array> {
|
|
7
|
+
readable: Readable;
|
|
8
|
+
writable: Writable;
|
|
9
|
+
protected decoder: LengthFieldBasedFrameDecoder;
|
|
10
|
+
constructor(readable: Readable, writable: Writable);
|
|
11
|
+
send(data: Uint8Array): void;
|
|
12
|
+
onMessage(cb: (data: Uint8Array) => void): IDisposable;
|
|
13
|
+
onceClose(cb: (code?: number, reason?: string) => void): IDisposable;
|
|
14
|
+
onError(cb: (err: Error) => void): IDisposable;
|
|
15
|
+
dispose(): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../../src/common/connection/drivers/stream.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEjD,qBAAa,gBAAiB,SAAQ,cAAc,CAAC,UAAU,CAAC;IAG3C,QAAQ,EAAE,QAAQ;IAAS,QAAQ,EAAE,QAAQ;IAFhE,SAAS,CAAC,OAAO,+BAAsC;gBAEpC,QAAQ,EAAE,QAAQ,EAAS,QAAQ,EAAE,QAAQ;IAYhE,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAO5B,SAAS,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,WAAW;IAItD,SAAS,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,WAAW;IAyBpE,OAAO,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,GAAG,WAAW;IAc9C,OAAO,IAAI,IAAI;CAGhB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StreamConnection = void 0;
|
|
4
|
+
const base_1 = require("./base");
|
|
5
|
+
const frame_decoder_1 = require("./frame-decoder");
|
|
6
|
+
class StreamConnection extends base_1.BaseConnection {
|
|
7
|
+
constructor(readable, writable) {
|
|
8
|
+
super();
|
|
9
|
+
this.readable = readable;
|
|
10
|
+
this.writable = writable;
|
|
11
|
+
this.decoder = new frame_decoder_1.LengthFieldBasedFrameDecoder();
|
|
12
|
+
const decode = (chunk) => {
|
|
13
|
+
this.decoder.push(chunk);
|
|
14
|
+
};
|
|
15
|
+
this.readable.on('data', decode);
|
|
16
|
+
this.readable.once('close', () => {
|
|
17
|
+
this.decoder.dispose();
|
|
18
|
+
this.readable.off('data', decode);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
send(data) {
|
|
22
|
+
const result = frame_decoder_1.LengthFieldBasedFrameDecoder.construct(data);
|
|
23
|
+
this.writable.write(result, () => {
|
|
24
|
+
// TODO: logger error
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
onMessage(cb) {
|
|
28
|
+
return this.decoder.onData(cb);
|
|
29
|
+
}
|
|
30
|
+
onceClose(cb) {
|
|
31
|
+
const wrapper = (hadError) => {
|
|
32
|
+
const code = hadError ? 1 : 0;
|
|
33
|
+
const reason = hadError ? 'had error' : '';
|
|
34
|
+
cb(code, reason);
|
|
35
|
+
dispose();
|
|
36
|
+
};
|
|
37
|
+
const dispose = () => {
|
|
38
|
+
this.readable.off('close', wrapper);
|
|
39
|
+
if (this.writable !== this.readable) {
|
|
40
|
+
this.writable.off('close', wrapper);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
this.readable.once('close', wrapper);
|
|
44
|
+
if (this.writable !== this.readable) {
|
|
45
|
+
this.writable.once('close', wrapper);
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
dispose,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
onError(cb) {
|
|
52
|
+
this.readable.on('error', cb);
|
|
53
|
+
if (this.writable !== this.readable) {
|
|
54
|
+
this.writable.on('error', cb);
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
dispose: () => {
|
|
58
|
+
this.readable.off('error', cb);
|
|
59
|
+
if (this.writable !== this.readable) {
|
|
60
|
+
this.writable.off('error', cb);
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
dispose() {
|
|
66
|
+
this.decoder.dispose();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.StreamConnection = StreamConnection;
|
|
70
|
+
//# sourceMappingURL=stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../../src/common/connection/drivers/stream.ts"],"names":[],"mappings":";;;AAEA,iCAAwC;AACxC,mDAA+D;AAI/D,MAAa,gBAAiB,SAAQ,qBAA0B;IAG9D,YAAmB,QAAkB,EAAS,QAAkB;QAC9D,KAAK,EAAE,CAAC;QADS,aAAQ,GAAR,QAAQ,CAAU;QAAS,aAAQ,GAAR,QAAQ,CAAU;QAFtD,YAAO,GAAG,IAAI,4CAA4B,EAAE,CAAC;QAIrD,MAAM,MAAM,GAAG,CAAC,KAAiB,EAAE,EAAE;YACnC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3B,CAA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AI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACrC,IAAK,IAAI,CAAC,QAAgB,KAAM,IAAI,CAAC,QAAgB,EAAE;YACrD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;SACtC;QAED,OAAO;YACL,OAAO;SACR,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,EAAwB;QAC9B,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAC9B,IAAK,IAAI,CAAC,QAAgB,KAAM,IAAI,CAAC,QAAgB,EAAE;YACrD,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;SAC/B;QACD,OAAO;YACL,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBAC/B,IAAK,IAAI,CAAC,QAAgB,KAAM,IAAI,CAAC,QAAgB,EAAE;oBACrD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;iBAChC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;IACD,OAAO;QACL,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;CACF;AApED,4CAoEC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type WebSocket from 'ws';
|
|
2
1
|
import { IDisposable } from '@opensumi/ide-core-common';
|
|
3
2
|
import { BaseConnection } from './base';
|
|
3
|
+
import type WebSocket from 'ws';
|
|
4
4
|
export declare class WSWebSocketConnection extends BaseConnection<Uint8Array> {
|
|
5
5
|
socket: WebSocket;
|
|
6
6
|
constructor(socket: WebSocket);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-websocket.d.ts","sourceRoot":"","sources":["../../../../src/common/connection/drivers/ws-websocket.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ws-websocket.d.ts","sourceRoot":"","sources":["../../../../src/common/connection/drivers/ws-websocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,KAAK,SAAS,MAAM,IAAI,CAAC;AAEhC,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,UAAU,CAAC;IAChD,MAAM,EAAE,SAAS;gBAAjB,MAAM,EAAE,SAAS;IAGpC,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAI5B,SAAS,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,WAAW;IAQtD,SAAS,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,WAAW;IAStC,MAAM;IAIN,OAAO,IAAI,IAAI;CAGhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-websocket.js","sourceRoot":"","sources":["../../../../src/common/connection/drivers/ws-websocket.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ws-websocket.js","sourceRoot":"","sources":["../../../../src/common/connection/drivers/ws-websocket.ts"],"names":[],"mappings":";;;AAEA,iCAAwC;AAIxC,MAAa,qBAAsB,SAAQ,qBAA0B;IACnE,YAAmB,MAAiB;QAClC,KAAK,EAAE,CAAC;QADS,WAAM,GAAN,MAAM,CAAW;IAEpC,CAAC;IACD,IAAI,CAAC,IAAgB;QACnB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAED,SAAS,CAAC,EAA8B;QACtC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAC9B,OAAO;YACL,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;YACjC,CAAC;SACF,CAAC;IACJ,CAAC;IACD,SAAS,CAAC,EAAc;QACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAC9B,OAAO;YACL,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC/B,CAAC;SACF,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IACrD,CAAC;IAED,OAAO;QACL,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC;IACnC,CAAC;CACF;AAhCD,sDAgCC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from '@furyjs/fury/dist/lib/type';
|
|
1
2
|
export declare enum ProtocolType {
|
|
2
3
|
String = 0,
|
|
3
4
|
Buffer = 1,
|
|
@@ -9,14 +10,16 @@ export declare enum ProtocolType {
|
|
|
9
10
|
Union = 7,
|
|
10
11
|
Object = 8,
|
|
11
12
|
Undefined = 9,
|
|
12
|
-
|
|
13
|
+
Null = 10,
|
|
14
|
+
Boolean = 11
|
|
13
15
|
}
|
|
14
|
-
export declare
|
|
16
|
+
export declare class AnySerializer {
|
|
17
|
+
protected writer: BinaryWriter;
|
|
18
|
+
protected reader: BinaryReader;
|
|
19
|
+
constructor(writer: BinaryWriter, reader: BinaryReader);
|
|
20
|
+
write(data: any): void;
|
|
21
|
+
read(): any;
|
|
15
22
|
deserialize: (bytes: Uint8Array) => any;
|
|
16
23
|
serialize: (v: any) => import("@furyjs/fury/dist/lib/platformBuffer").PlatformBuffer;
|
|
17
|
-
|
|
18
|
-
get(): Uint8Array;
|
|
19
|
-
dispose(): void;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
24
|
+
}
|
|
22
25
|
//# sourceMappingURL=any.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"any.d.ts","sourceRoot":"","sources":["../../../src/common/fury-extends/any.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"any.d.ts","sourceRoot":"","sources":["../../../src/common/fury-extends/any.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAIxE,oBAAY,YAAY;IACtB,MAAM,IAAA;IACN,MAAM,IAAA;IACN,MAAM,IAAA;IACN,KAAK,IAAA;IACL,UAAU,IAAA;IACV,MAAM,IAAA;IACN,KAAK,IAAA;IACL,KAAK,IAAA;IACL,MAAM,IAAA;IACN,SAAS,IAAA;IACT,IAAI,KAAA;IACJ,OAAO,KAAA;CACR;AAED,qBAAa,aAAa;IACZ,SAAS,CAAC,MAAM,EAAE,YAAY;IAAE,SAAS,CAAC,MAAM,EAAE,YAAY;gBAApD,MAAM,EAAE,YAAY,EAAY,MAAM,EAAE,YAAY;IAE1E,KAAK,CAAC,IAAI,EAAE,GAAG;IA0Df,IAAI;IAwCJ,WAAW,UAAW,UAAU,SAG9B;IAEF,SAAS,MAAO,GAAG,mEAKjB;CACH"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AnySerializer = exports.ProtocolType = void 0;
|
|
4
4
|
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
5
|
-
const shared_1 = require("./shared");
|
|
6
|
-
const { reader, writer } = (0, shared_1.furyFactory)();
|
|
7
5
|
var ProtocolType;
|
|
8
6
|
(function (ProtocolType) {
|
|
9
7
|
ProtocolType[ProtocolType["String"] = 0] = "String";
|
|
@@ -16,125 +14,148 @@ var ProtocolType;
|
|
|
16
14
|
ProtocolType[ProtocolType["Union"] = 7] = "Union";
|
|
17
15
|
ProtocolType[ProtocolType["Object"] = 8] = "Object";
|
|
18
16
|
ProtocolType[ProtocolType["Undefined"] = 9] = "Undefined";
|
|
19
|
-
ProtocolType[ProtocolType["
|
|
17
|
+
ProtocolType[ProtocolType["Null"] = 10] = "Null";
|
|
18
|
+
ProtocolType[ProtocolType["Boolean"] = 11] = "Boolean";
|
|
20
19
|
})(ProtocolType = exports.ProtocolType || (exports.ProtocolType = {}));
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
writer
|
|
20
|
+
class AnySerializer {
|
|
21
|
+
constructor(writer, reader) {
|
|
22
|
+
this.writer = writer;
|
|
23
|
+
this.reader = reader;
|
|
24
|
+
this.deserialize = (bytes) => {
|
|
25
|
+
this.reader.reset(bytes);
|
|
26
|
+
return this.read();
|
|
27
|
+
};
|
|
28
|
+
this.serialize = (v) => {
|
|
29
|
+
this.writer.reset();
|
|
30
|
+
this.write(v);
|
|
31
|
+
return this.writer.dump();
|
|
32
|
+
};
|
|
24
33
|
}
|
|
25
|
-
|
|
26
|
-
writer
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
write(data) {
|
|
35
|
+
const { writer } = this;
|
|
36
|
+
const type = typeof data;
|
|
37
|
+
writer.reserve(1);
|
|
38
|
+
switch (type) {
|
|
39
|
+
case 'undefined':
|
|
40
|
+
writer.uint8(ProtocolType.Undefined);
|
|
41
|
+
break;
|
|
42
|
+
case 'string':
|
|
43
|
+
writer.uint8(ProtocolType.String);
|
|
44
|
+
writer.stringOfVarUInt32(data);
|
|
45
|
+
break;
|
|
46
|
+
case 'boolean':
|
|
47
|
+
writer.reserve(1);
|
|
48
|
+
writer.uint8(ProtocolType.Boolean);
|
|
49
|
+
writer.uint8(data ? 1 : 0);
|
|
50
|
+
break;
|
|
51
|
+
case 'number':
|
|
52
|
+
writer.reserve(8);
|
|
53
|
+
if ((data | 0) === data) {
|
|
54
|
+
writer.uint8(ProtocolType.Int32);
|
|
55
|
+
writer.int32(data);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
writer.uint8(ProtocolType.Number);
|
|
59
|
+
writer.double(data);
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
case 'bigint':
|
|
63
|
+
writer.reserve(8);
|
|
64
|
+
writer.uint8(ProtocolType.BigInt);
|
|
65
|
+
writer.int64(data);
|
|
66
|
+
break;
|
|
67
|
+
case 'object':
|
|
68
|
+
if (data === null) {
|
|
69
|
+
writer.uint8(ProtocolType.Null);
|
|
70
|
+
}
|
|
71
|
+
else if (Array.isArray(data)) {
|
|
72
|
+
writer.reserve(4);
|
|
73
|
+
writer.uint8(ProtocolType.Array);
|
|
74
|
+
writer.varUInt32(data.length);
|
|
75
|
+
for (const element of data) {
|
|
76
|
+
this.write(element);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
else if ((0, ide_core_common_1.isUint8Array)(data)) {
|
|
80
|
+
writer.reserve(4);
|
|
81
|
+
writer.uint8(ProtocolType.Buffer);
|
|
82
|
+
writer.varUInt32(data.byteLength);
|
|
83
|
+
writer.buffer(data);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
writer.uint8(ProtocolType.JSONObject);
|
|
87
|
+
writer.stringOfVarUInt32(JSON.stringify(data, ObjectTransfer.replacer));
|
|
88
|
+
}
|
|
89
|
+
break;
|
|
90
|
+
default:
|
|
91
|
+
throw new Error(`Unknown type ${type}`);
|
|
30
92
|
}
|
|
31
93
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
else {
|
|
64
|
-
throw new Error(`Unknown type ${typeof data}`);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
function deserializeWorker() {
|
|
68
|
-
const type = reader.uint8();
|
|
69
|
-
switch (type) {
|
|
70
|
-
case ProtocolType.Undefined:
|
|
71
|
-
return undefined;
|
|
72
|
-
case ProtocolType.String:
|
|
73
|
-
return reader.stringOfVarUInt32();
|
|
74
|
-
case ProtocolType.Buffer: {
|
|
75
|
-
const length = reader.varUInt32();
|
|
76
|
-
return reader.buffer(length);
|
|
77
|
-
}
|
|
78
|
-
case ProtocolType.Int32:
|
|
79
|
-
return reader.int32();
|
|
80
|
-
case ProtocolType.Number:
|
|
81
|
-
return reader.double();
|
|
82
|
-
case ProtocolType.JSONObject: {
|
|
83
|
-
const json = reader.stringOfVarUInt32();
|
|
84
|
-
return JSON.parse(json, ObjectTransfer.reviver);
|
|
85
|
-
}
|
|
86
|
-
case ProtocolType.BigInt:
|
|
87
|
-
return reader.int64();
|
|
88
|
-
case ProtocolType.Array: {
|
|
89
|
-
const length = reader.varUInt32();
|
|
90
|
-
const data = [];
|
|
91
|
-
for (let i = 0; i < length; i++) {
|
|
92
|
-
data.push(deserializeWorker());
|
|
94
|
+
read() {
|
|
95
|
+
const { reader } = this;
|
|
96
|
+
const type = reader.uint8();
|
|
97
|
+
switch (type) {
|
|
98
|
+
case ProtocolType.Undefined:
|
|
99
|
+
return undefined;
|
|
100
|
+
case ProtocolType.Null:
|
|
101
|
+
return null;
|
|
102
|
+
case ProtocolType.String:
|
|
103
|
+
return reader.stringOfVarUInt32();
|
|
104
|
+
case ProtocolType.Buffer: {
|
|
105
|
+
const length = reader.varUInt32();
|
|
106
|
+
return reader.buffer(length);
|
|
107
|
+
}
|
|
108
|
+
case ProtocolType.Int32:
|
|
109
|
+
return reader.int32();
|
|
110
|
+
case ProtocolType.Number:
|
|
111
|
+
return reader.double();
|
|
112
|
+
case ProtocolType.JSONObject: {
|
|
113
|
+
const json = reader.stringOfVarUInt32();
|
|
114
|
+
return JSON.parse(json, ObjectTransfer.reviver);
|
|
115
|
+
}
|
|
116
|
+
case ProtocolType.BigInt:
|
|
117
|
+
return reader.int64();
|
|
118
|
+
case ProtocolType.Array: {
|
|
119
|
+
const length = reader.varUInt32();
|
|
120
|
+
const data = [];
|
|
121
|
+
for (let i = 0; i < length; i++) {
|
|
122
|
+
data.push(this.read());
|
|
123
|
+
}
|
|
124
|
+
return data;
|
|
93
125
|
}
|
|
94
|
-
|
|
126
|
+
case ProtocolType.Boolean:
|
|
127
|
+
return reader.uint8() === 1;
|
|
128
|
+
default:
|
|
129
|
+
throw new Error(`Unknown type ${type}`);
|
|
95
130
|
}
|
|
96
|
-
case ProtocolType.Boolean:
|
|
97
|
-
return reader.uint8() === 1;
|
|
98
|
-
default:
|
|
99
|
-
throw new Error(`Unknown type ${type}`);
|
|
100
131
|
}
|
|
101
132
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
writer.reset();
|
|
108
|
-
serializeWorker(v);
|
|
109
|
-
return writer.dumpAndOwn();
|
|
110
|
-
};
|
|
111
|
-
const serialize = (v) => {
|
|
112
|
-
writer.reset();
|
|
113
|
-
serializeWorker(v);
|
|
114
|
-
return writer.dump();
|
|
115
|
-
};
|
|
116
|
-
exports.anySerializer = {
|
|
117
|
-
deserialize,
|
|
118
|
-
serialize,
|
|
119
|
-
serializeVolatile,
|
|
120
|
-
};
|
|
133
|
+
exports.AnySerializer = AnySerializer;
|
|
134
|
+
var EObjectTransferType;
|
|
135
|
+
(function (EObjectTransferType) {
|
|
136
|
+
EObjectTransferType["CODE_URI"] = "CODE_URI";
|
|
137
|
+
})(EObjectTransferType || (EObjectTransferType = {}));
|
|
121
138
|
class ObjectTransfer {
|
|
122
139
|
static replacer(key, value) {
|
|
123
140
|
if (value) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
141
|
+
switch (value.$mid) {
|
|
142
|
+
case 1: {
|
|
143
|
+
// `$mid === 1` is defined in `vscode-uri` package
|
|
144
|
+
const uri = ide_core_common_1.Uri.revive(value);
|
|
145
|
+
return {
|
|
146
|
+
$type: EObjectTransferType.CODE_URI,
|
|
147
|
+
data: uri.toString(),
|
|
148
|
+
};
|
|
149
|
+
}
|
|
130
150
|
}
|
|
131
151
|
}
|
|
132
152
|
return value;
|
|
133
153
|
}
|
|
134
154
|
static reviver(key, value) {
|
|
135
155
|
if (value && value.$type !== undefined && value.data !== undefined) {
|
|
136
|
-
|
|
137
|
-
|
|
156
|
+
switch (value.$type) {
|
|
157
|
+
case EObjectTransferType.CODE_URI:
|
|
158
|
+
return ide_core_common_1.Uri.parse(value.data);
|
|
138
159
|
}
|
|
139
160
|
}
|
|
140
161
|
return value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"any.js","sourceRoot":"","sources":["../../../src/common/fury-extends/any.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"any.js","sourceRoot":"","sources":["../../../src/common/fury-extends/any.ts"],"names":[],"mappings":";;;AAEA,+DAA8D;AAE9D,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB,mDAAM,CAAA;IACN,mDAAM,CAAA;IACN,mDAAM,CAAA;IACN,iDAAK,CAAA;IACL,2DAAU,CAAA;IACV,mDAAM,CAAA;IACN,iDAAK,CAAA;IACL,iDAAK,CAAA;IACL,mDAAM,CAAA;IACN,yDAAS,CAAA;IACT,gDAAI,CAAA;IACJ,sDAAO,CAAA;AACT,CAAC,EAbW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAavB;AAED,MAAa,aAAa;IACxB,YAAsB,MAAoB,EAAY,MAAoB;QAApD,WAAM,GAAN,MAAM,CAAc;QAAY,WAAM,GAAN,MAAM,CAAc;QAoG1E,gBAAW,GAAG,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Description } from '@furyjs/fury';
|
|
2
|
+
import { FuryFactoryReturn } from './shared';
|
|
2
3
|
type Writable = Record<string, any> & {
|
|
3
4
|
kind: string;
|
|
4
5
|
};
|
|
5
|
-
export declare const
|
|
6
|
+
export declare const oneOf7: (schemas: [
|
|
7
|
+
TypeDescription,
|
|
8
|
+
TypeDescription,
|
|
9
|
+
TypeDescription,
|
|
10
|
+
TypeDescription,
|
|
11
|
+
TypeDescription,
|
|
12
|
+
TypeDescription,
|
|
13
|
+
TypeDescription
|
|
14
|
+
], context?: FuryFactoryReturn) => {
|
|
6
15
|
deserialize: (bytes: Uint8Array) => any;
|
|
7
16
|
serialize: (v: Writable) => import("@furyjs/fury/dist/lib/platformBuffer").PlatformBuffer;
|
|
8
|
-
serializeVolatile: (v: Writable) => {
|
|
9
|
-
get(): Uint8Array;
|
|
10
|
-
dispose(): void;
|
|
11
|
-
};
|
|
12
17
|
};
|
|
13
18
|
export {};
|
|
14
19
|
//# sourceMappingURL=one-of.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"one-of.d.ts","sourceRoot":"","sources":["../../../src/common/fury-extends/one-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,eAAe,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"one-of.d.ts","sourceRoot":"","sources":["../../../src/common/fury-extends/one-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,eAAe,EAAE,MAAM,cAAc,CAAC;AAGlF,OAAO,EAAE,iBAAiB,EAAe,MAAM,UAAU,CAAC;AAE1D,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,eAAO,MAAM,MAAM,YACR;IACP,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;CAChB,YACS,iBAAiB;yBAoBC,UAAU;mBAiChB,QAAQ;CAsC/B,CAAC"}
|