@webex/internal-plugin-voicea 3.11.0 → 3.12.0-llmrefactor.2
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 +13 -4
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/voicea-plugin.d.ts +23 -0
- package/dist/types/voicea.d.ts +74 -19
- package/dist/types/voicea.types.d.ts +1 -0
- package/dist/voicea-plugin.js +59 -0
- package/dist/voicea-plugin.js.map +1 -0
- package/dist/voicea.js +259 -133
- package/dist/voicea.js.map +1 -1
- package/dist/voicea.types.js.map +1 -1
- package/package.json +9 -9
- package/src/index.ts +5 -3
- package/src/voicea-plugin.ts +33 -0
- package/src/voicea.ts +241 -137
- package/src/voicea.types.ts +1 -0
- package/test/unit/spec/voicea-plugin.js +71 -0
- package/test/unit/spec/voicea.js +649 -842
package/dist/index.js
CHANGED
|
@@ -20,15 +20,24 @@ _Object$defineProperty(exports, "TURN_ON_CAPTION_STATUS", {
|
|
|
20
20
|
return _constants.TURN_ON_CAPTION_STATUS;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
_Object$defineProperty(exports, "
|
|
23
|
+
_Object$defineProperty(exports, "VoiceaChannel", {
|
|
24
24
|
enumerable: true,
|
|
25
25
|
get: function get() {
|
|
26
|
-
return _voicea.
|
|
26
|
+
return _voicea.VoiceaChannel;
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
+
_Object$defineProperty(exports, "VoiceaPlugin", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function get() {
|
|
32
|
+
return _voiceaPlugin.default;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
exports.default = void 0;
|
|
29
36
|
var WebexCore = _interopRequireWildcard(require("@webex/webex-core"));
|
|
30
|
-
var
|
|
37
|
+
var _voiceaPlugin = _interopRequireDefault(require("./voicea-plugin"));
|
|
38
|
+
var _voicea = require("./voicea");
|
|
31
39
|
var _constants = require("./constants");
|
|
32
40
|
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
33
|
-
WebexCore.registerInternalPlugin('voicea',
|
|
41
|
+
WebexCore.registerInternalPlugin('voicea', _voiceaPlugin.default, {});
|
|
42
|
+
var _default = exports.default = _voiceaPlugin.default;
|
|
34
43
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WebexCore","_interopRequireWildcard","require","
|
|
1
|
+
{"version":3,"names":["WebexCore","_interopRequireWildcard","require","_voiceaPlugin","_interopRequireDefault","_voicea","_constants","e","t","_WeakMap","r","n","__esModule","o","i","f","__proto__","default","_typeof","has","get","set","_t","hasOwnProperty","call","_Object$defineProperty","_Object$getOwnPropertyDescriptor","registerInternalPlugin","Voicea","_default","exports"],"sources":["index.ts"],"sourcesContent":["import * as WebexCore from '@webex/webex-core';\n\nimport Voicea from './voicea-plugin';\nimport {VoiceaChannel} from './voicea';\nimport type {MeetingTranscriptPayload} from './voicea.types';\n\nWebexCore.registerInternalPlugin('voicea', Voicea, {});\n\nexport {Voicea as VoiceaPlugin, VoiceaChannel};\nexport default Voicea;\nexport {type MeetingTranscriptPayload};\nexport {EVENT_TRIGGERS, TURN_ON_CAPTION_STATUS} from './constants';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,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dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import Voicea from './voicea-plugin';
|
|
2
|
+
import { VoiceaChannel } from './voicea';
|
|
1
3
|
import type { MeetingTranscriptPayload } from './voicea.types';
|
|
2
|
-
export {
|
|
4
|
+
export { Voicea as VoiceaPlugin, VoiceaChannel };
|
|
5
|
+
export default Voicea;
|
|
3
6
|
export { type MeetingTranscriptPayload };
|
|
4
7
|
export { EVENT_TRIGGERS, TURN_ON_CAPTION_STATUS } from './constants';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WebexPlugin } from '@webex/webex-core';
|
|
2
|
+
import type LLMChannel from '@webex/internal-plugin-llm';
|
|
3
|
+
import { VoiceaChannel } from './voicea';
|
|
4
|
+
/**
|
|
5
|
+
* VoiceaPlugin - factory for creating VoiceaChannel instances
|
|
6
|
+
* @export
|
|
7
|
+
* @class VoiceaPlugin
|
|
8
|
+
*/
|
|
9
|
+
export declare class VoiceaPlugin extends WebexPlugin {
|
|
10
|
+
namespace: string;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a VoiceaChannel bound to the given LLMChannel.
|
|
13
|
+
*
|
|
14
|
+
* Note: VoiceaChannel does not take ownership of the LLMChannel.
|
|
15
|
+
* The caller retains ownership and is responsible for the LLMChannel's
|
|
16
|
+
* lifecycle (connection, disconnection, cleanup).
|
|
17
|
+
*
|
|
18
|
+
* @param {LLMChannel} llmChannel - The LLM channel to use for voicea
|
|
19
|
+
* @returns {VoiceaChannel} a new VoiceaChannel instance
|
|
20
|
+
*/
|
|
21
|
+
createChannel(llmChannel: LLMChannel): VoiceaChannel;
|
|
22
|
+
}
|
|
23
|
+
export default VoiceaPlugin;
|
package/dist/types/voicea.d.ts
CHANGED
|
@@ -1,42 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import EventEmitter from 'events';
|
|
3
|
+
import type LLMChannel from '@webex/internal-plugin-llm';
|
|
2
4
|
import { IVoiceaChannel } from './voicea.types';
|
|
3
5
|
/**
|
|
4
|
-
* @description VoiceaChannel
|
|
6
|
+
* @description VoiceaChannel — handles voicea/transcription functionality for a single LLM connection.
|
|
7
|
+
* Created via `webex.internal.voicea.createChannel(llmChannel)`. The caller owns the
|
|
8
|
+
* channel and is responsible for its lifecycle.
|
|
5
9
|
* @export
|
|
6
10
|
* @class VoiceaChannel
|
|
7
11
|
*/
|
|
8
|
-
export declare class VoiceaChannel extends
|
|
9
|
-
|
|
12
|
+
export declare class VoiceaChannel extends EventEmitter implements IVoiceaChannel {
|
|
13
|
+
private request;
|
|
14
|
+
private llmChannel;
|
|
10
15
|
private seqNum;
|
|
11
16
|
private areCaptionsEnabled;
|
|
12
17
|
private hasSubscribedToEvents;
|
|
13
18
|
private captionServiceId?;
|
|
14
19
|
private announceStatus;
|
|
15
20
|
private captionStatus;
|
|
21
|
+
private keepTranscriptionSubscribed;
|
|
16
22
|
private toggleManualCaptionStatus;
|
|
17
23
|
private currentSpokenLanguage?;
|
|
18
24
|
private spokenLanguages;
|
|
19
25
|
private currentCaptionLanguage?;
|
|
20
26
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @
|
|
27
|
+
* Creates a VoiceaChannel bound to the given LLMChannel
|
|
28
|
+
* @param {LLMChannel} llmChannel - The LLM channel to use
|
|
29
|
+
* @param {Function} request - The request function for making API calls (typically webex.request bound to webex)
|
|
23
30
|
*/
|
|
24
|
-
|
|
31
|
+
constructor(llmChannel: LLMChannel, request: (options: {
|
|
32
|
+
method: string;
|
|
33
|
+
url: string;
|
|
34
|
+
body?: object;
|
|
35
|
+
}) => Promise<any>);
|
|
25
36
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @
|
|
37
|
+
* Process events from LLM channel
|
|
38
|
+
* @param {Object} e - Event data
|
|
39
|
+
* @returns {void}
|
|
28
40
|
*/
|
|
29
|
-
private
|
|
41
|
+
private eventProcessor;
|
|
30
42
|
/**
|
|
31
|
-
*
|
|
43
|
+
* Deregister events and clean up
|
|
32
44
|
* @returns {void}
|
|
33
45
|
*/
|
|
34
46
|
deregisterEvents(): void;
|
|
35
47
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
48
|
+
* Switch to a different LLM channel while preserving caption state.
|
|
49
|
+
* Used when transitioning between main meeting and practice session.
|
|
50
|
+
* - Preserves keepTranscriptionSubscribed and spokenLanguage state
|
|
51
|
+
* - Unsubscribes from old channel, subscribes to new channel
|
|
52
|
+
* - Re-announces and re-enables captions if they were on
|
|
53
|
+
* @param {LLMChannel} newLLMChannel - The new LLM channel to switch to
|
|
54
|
+
* @returns {Promise<void>}
|
|
38
55
|
*/
|
|
39
|
-
|
|
56
|
+
switchLLMChannel(newLLMChannel: LLMChannel): Promise<void>;
|
|
40
57
|
/**
|
|
41
58
|
* Process manual Transcript and send alert
|
|
42
59
|
* @param {TranscriptionResponse} transcriptPayload
|
|
@@ -61,11 +78,17 @@ export declare class VoiceaChannel extends WebexPlugin implements IVoiceaChannel
|
|
|
61
78
|
* @returns {void}
|
|
62
79
|
*/
|
|
63
80
|
private processAnnouncementMessage;
|
|
81
|
+
/**
|
|
82
|
+
* Indicates whether the LLM channel is connected.
|
|
83
|
+
* @returns {boolean}
|
|
84
|
+
*/
|
|
85
|
+
isLLMConnected: () => boolean;
|
|
86
|
+
getKeepTranscriptionSubscribed: () => boolean;
|
|
64
87
|
/**
|
|
65
88
|
* Sends Announcement to add voicea to the meeting
|
|
66
89
|
* @returns {void}
|
|
67
90
|
*/
|
|
68
|
-
|
|
91
|
+
sendAnnouncement: () => void;
|
|
69
92
|
/**
|
|
70
93
|
* Set Spoken Language for the meeting
|
|
71
94
|
* @param {string} languageCode
|
|
@@ -90,7 +113,7 @@ export declare class VoiceaChannel extends WebexPlugin implements IVoiceaChannel
|
|
|
90
113
|
sendManualClosedCaption: (text: string, timeStamp: number, csis: number[], isFinal: boolean) => void;
|
|
91
114
|
/**
|
|
92
115
|
* request turn on Captions
|
|
93
|
-
* @param {string} [languageCode] - Optional Parameter for spoken language code
|
|
116
|
+
* @param {string} [languageCode] - Optional Parameter for spoken language code
|
|
94
117
|
* @returns {Promise}
|
|
95
118
|
*/
|
|
96
119
|
private requestTurnOnCaptions;
|
|
@@ -100,7 +123,12 @@ export declare class VoiceaChannel extends WebexPlugin implements IVoiceaChannel
|
|
|
100
123
|
*/
|
|
101
124
|
private isAnnounceProcessing;
|
|
102
125
|
/**
|
|
103
|
-
* announce
|
|
126
|
+
* is announce processed
|
|
127
|
+
* @returns {boolean}
|
|
128
|
+
*/
|
|
129
|
+
private isAnnounceProcessed;
|
|
130
|
+
/**
|
|
131
|
+
* announce to voicea data channel
|
|
104
132
|
* @returns {void}
|
|
105
133
|
*/
|
|
106
134
|
announce: () => void;
|
|
@@ -114,7 +142,7 @@ export declare class VoiceaChannel extends WebexPlugin implements IVoiceaChannel
|
|
|
114
142
|
* @param {string} [spokenLanguage] - Optional Spoken language code
|
|
115
143
|
* @returns {Promise}
|
|
116
144
|
*/
|
|
117
|
-
turnOnCaptions: (spokenLanguage?:
|
|
145
|
+
turnOnCaptions: (spokenLanguage?: string) => Promise<void | undefined>;
|
|
118
146
|
/**
|
|
119
147
|
* Toggle transcribing for highlights
|
|
120
148
|
* @param {boolean} activate true means to turn on transcribing and false means to turn off
|
|
@@ -134,7 +162,7 @@ export declare class VoiceaChannel extends WebexPlugin implements IVoiceaChannel
|
|
|
134
162
|
* @param {string} meetingId
|
|
135
163
|
* @returns {void}
|
|
136
164
|
*/
|
|
137
|
-
onSpokenLanguageUpdate: (languageCode: string, meetingId:
|
|
165
|
+
onSpokenLanguageUpdate: (languageCode: string, meetingId: string) => void;
|
|
138
166
|
/**
|
|
139
167
|
* In meeting Spoken Language changed event
|
|
140
168
|
* @param {string} serviceId
|
|
@@ -151,5 +179,32 @@ export declare class VoiceaChannel extends WebexPlugin implements IVoiceaChannel
|
|
|
151
179
|
* @returns {string}
|
|
152
180
|
*/
|
|
153
181
|
getAnnounceStatus: () => string;
|
|
182
|
+
/**
|
|
183
|
+
* update LLM sub‑channel subscriptions.
|
|
184
|
+
*
|
|
185
|
+
* @param {string[]} options.subscribe Sub‑channels to subscribe to.
|
|
186
|
+
* @param {string[]} options.unsubscribe Sub‑channels to unsubscribe from.
|
|
187
|
+
* @returns {Promise}
|
|
188
|
+
*/
|
|
189
|
+
updateSubchannelSubscriptions: ({ subscribe, unsubscribe, }?: {
|
|
190
|
+
subscribe?: string[];
|
|
191
|
+
unsubscribe?: string[];
|
|
192
|
+
}) => Promise<void>;
|
|
193
|
+
/**
|
|
194
|
+
* Updates transcription subchannel subscriptions and records whether the
|
|
195
|
+
* transcription subscription should be kept (and restored on reconnect).
|
|
196
|
+
*
|
|
197
|
+
* @param {Object} [options] - Subscription options.
|
|
198
|
+
* @param {string[]} [options.subscribe] - Subchannels to subscribe to.
|
|
199
|
+
* @param {string[]} [options.unsubscribe] - Subchannels to unsubscribe from.
|
|
200
|
+
* @param {boolean} [keepSubscribed=false] - Whether the transcription
|
|
201
|
+
* subscription should be kept and restored on reconnect.
|
|
202
|
+
*
|
|
203
|
+
* @returns {Promise<void>}
|
|
204
|
+
*/
|
|
205
|
+
updateSubchannelSubscriptionsAndSyncCaptionState: (options?: {
|
|
206
|
+
subscribe?: string[];
|
|
207
|
+
unsubscribe?: string[];
|
|
208
|
+
}, keepSubscribed?: boolean) => Promise<void>;
|
|
154
209
|
}
|
|
155
210
|
export default VoiceaChannel;
|
|
@@ -76,6 +76,7 @@ interface IVoiceaChannel {
|
|
|
76
76
|
deregisterEvents: () => void;
|
|
77
77
|
toggleManualCaption: (enable: boolean) => undefined | Promise<void>;
|
|
78
78
|
sendManualClosedCaption: (text: string, timeStamp: number, csis: number[], isFinal: boolean) => void;
|
|
79
|
+
getKeepTranscriptionSubscribed: () => boolean;
|
|
79
80
|
}
|
|
80
81
|
type MeetingTranscripts = {
|
|
81
82
|
start_mills?: number;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
|
|
4
|
+
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.default = exports.VoiceaPlugin = void 0;
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
12
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
13
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
15
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
16
|
+
var _webexCore = require("@webex/webex-core");
|
|
17
|
+
var _voicea = require("./voicea");
|
|
18
|
+
var _constants = require("./constants");
|
|
19
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
20
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
|
+
/**
|
|
22
|
+
* VoiceaPlugin - factory for creating VoiceaChannel instances
|
|
23
|
+
* @export
|
|
24
|
+
* @class VoiceaPlugin
|
|
25
|
+
*/
|
|
26
|
+
var VoiceaPlugin = exports.VoiceaPlugin = /*#__PURE__*/function (_WebexPlugin) {
|
|
27
|
+
function VoiceaPlugin() {
|
|
28
|
+
var _this;
|
|
29
|
+
(0, _classCallCheck2.default)(this, VoiceaPlugin);
|
|
30
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
+
args[_key] = arguments[_key];
|
|
32
|
+
}
|
|
33
|
+
_this = _callSuper(this, VoiceaPlugin, [].concat(args));
|
|
34
|
+
(0, _defineProperty2.default)(_this, "namespace", _constants.VOICEA);
|
|
35
|
+
return _this;
|
|
36
|
+
}
|
|
37
|
+
(0, _inherits2.default)(VoiceaPlugin, _WebexPlugin);
|
|
38
|
+
return (0, _createClass2.default)(VoiceaPlugin, [{
|
|
39
|
+
key: "createChannel",
|
|
40
|
+
value:
|
|
41
|
+
/**
|
|
42
|
+
* Creates a VoiceaChannel bound to the given LLMChannel.
|
|
43
|
+
*
|
|
44
|
+
* Note: VoiceaChannel does not take ownership of the LLMChannel.
|
|
45
|
+
* The caller retains ownership and is responsible for the LLMChannel's
|
|
46
|
+
* lifecycle (connection, disconnection, cleanup).
|
|
47
|
+
*
|
|
48
|
+
* @param {LLMChannel} llmChannel - The LLM channel to use for voicea
|
|
49
|
+
* @returns {VoiceaChannel} a new VoiceaChannel instance
|
|
50
|
+
*/
|
|
51
|
+
function createChannel(llmChannel) {
|
|
52
|
+
// @ts-ignore - webex is available on WebexPlugin
|
|
53
|
+
var channel = new _voicea.VoiceaChannel(llmChannel, this.webex.request.bind(this.webex));
|
|
54
|
+
return channel;
|
|
55
|
+
}
|
|
56
|
+
}]);
|
|
57
|
+
}(_webexCore.WebexPlugin);
|
|
58
|
+
var _default = exports.default = VoiceaPlugin;
|
|
59
|
+
//# sourceMappingURL=voicea-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_voicea","_constants","_callSuper","t","o","e","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","apply","Boolean","prototype","valueOf","call","VoiceaPlugin","exports","_WebexPlugin","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","concat","_defineProperty2","VOICEA","_inherits2","_createClass2","key","value","createChannel","llmChannel","channel","VoiceaChannel","webex","request","bind","WebexPlugin","_default"],"sources":["voicea-plugin.ts"],"sourcesContent":["import {WebexPlugin} from '@webex/webex-core';\nimport type LLMChannel from '@webex/internal-plugin-llm';\n\nimport {VoiceaChannel} from './voicea';\nimport {VOICEA} from './constants';\n\n/**\n * VoiceaPlugin - factory for creating VoiceaChannel instances\n * @export\n * @class VoiceaPlugin\n */\nexport class VoiceaPlugin extends WebexPlugin {\n namespace = VOICEA;\n\n /**\n * Creates a VoiceaChannel bound to the given LLMChannel.\n *\n * Note: VoiceaChannel does not take ownership of the LLMChannel.\n * The caller retains ownership and is responsible for the LLMChannel's\n * lifecycle (connection, disconnection, cleanup).\n *\n * @param {LLMChannel} llmChannel - The LLM channel to use for voicea\n * @returns {VoiceaChannel} a new VoiceaChannel instance\n */\n public createChannel(llmChannel: LLMChannel): VoiceaChannel {\n // @ts-ignore - webex is available on WebexPlugin\n const channel = new VoiceaChannel(llmChannel, this.webex.request.bind(this.webex));\n\n return channel;\n }\n}\n\nexport default VoiceaPlugin;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAGA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAAmC,SAAAG,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,CAAAC,OAAA,EAAAH,CAAA,OAAAI,2BAAA,CAAAD,OAAA,EAAAJ,CAAA,EAAAM,yBAAA,KAAAC,kBAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,CAAAC,OAAA,EAAAJ,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EA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