telegram-botbuilder 1.6.5 → 2.0.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/Changelog.md +81 -0
- package/MIGRATION.md +453 -0
- package/README.md +403 -0
- package/lib/actions/callback_action.d.ts +14 -0
- package/lib/actions/callback_action.d.ts.map +1 -0
- package/lib/actions/callback_action.js +25 -0
- package/lib/actions/callback_action.js.map +1 -0
- package/lib/actions/change_dialog.d.ts +10 -0
- package/lib/actions/change_dialog.d.ts.map +1 -0
- package/lib/actions/change_dialog.js +17 -0
- package/lib/actions/change_dialog.js.map +1 -0
- package/lib/actions/control_flow.d.ts +26 -0
- package/lib/actions/control_flow.d.ts.map +1 -0
- package/lib/actions/control_flow.js +61 -0
- package/lib/actions/control_flow.js.map +1 -0
- package/lib/actions/index.d.ts +6 -0
- package/lib/actions/index.d.ts.map +1 -0
- package/lib/actions/index.js +11 -0
- package/lib/actions/index.js.map +1 -0
- package/lib/actions/send_message.d.ts +16 -0
- package/lib/actions/send_message.d.ts.map +1 -0
- package/lib/actions/send_message.js +32 -0
- package/lib/actions/send_message.js.map +1 -0
- package/lib/actions/wait_for_input.d.ts +14 -0
- package/lib/actions/wait_for_input.d.ts.map +1 -0
- package/lib/actions/wait_for_input.js +54 -0
- package/lib/actions/wait_for_input.js.map +1 -0
- package/lib/core/bot_builder.d.ts +145 -0
- package/lib/core/bot_builder.d.ts.map +1 -0
- package/lib/core/bot_builder.js +678 -0
- package/lib/core/bot_builder.js.map +1 -0
- package/lib/core/button_registry.d.ts +39 -0
- package/lib/core/button_registry.d.ts.map +1 -0
- package/lib/core/button_registry.js +84 -0
- package/lib/core/button_registry.js.map +1 -0
- package/lib/core/dialog_manager.d.ts +71 -0
- package/lib/core/dialog_manager.d.ts.map +1 -0
- package/lib/core/dialog_manager.js +146 -0
- package/lib/core/dialog_manager.js.map +1 -0
- package/lib/core/index.d.ts +8 -0
- package/lib/core/index.d.ts.map +1 -0
- package/lib/core/index.js +8 -0
- package/lib/core/index.js.map +1 -0
- package/lib/core/input_manager.d.ts +49 -0
- package/lib/core/input_manager.d.ts.map +1 -0
- package/lib/core/input_manager.js +129 -0
- package/lib/core/input_manager.js.map +1 -0
- package/lib/core/keyboard_builder.d.ts +35 -0
- package/lib/core/keyboard_builder.d.ts.map +1 -0
- package/lib/core/keyboard_builder.js +87 -0
- package/lib/core/keyboard_builder.js.map +1 -0
- package/lib/core/middleware_chain.d.ts +25 -0
- package/lib/core/middleware_chain.d.ts.map +1 -0
- package/lib/core/middleware_chain.js +54 -0
- package/lib/core/middleware_chain.js.map +1 -0
- package/lib/core/schema_compiler.d.ts +25 -0
- package/lib/core/schema_compiler.d.ts.map +1 -0
- package/lib/core/schema_compiler.js +65 -0
- package/lib/core/schema_compiler.js.map +1 -0
- package/lib/errors/bot_error.d.ts +7 -0
- package/lib/errors/bot_error.d.ts.map +1 -0
- package/lib/errors/bot_error.js +17 -0
- package/lib/errors/bot_error.js.map +1 -0
- package/lib/errors/dialog_error.d.ts +12 -0
- package/lib/errors/dialog_error.d.ts.map +1 -0
- package/lib/errors/dialog_error.js +22 -0
- package/lib/errors/dialog_error.js.map +1 -0
- package/lib/errors/index.d.ts +5 -0
- package/lib/errors/index.d.ts.map +1 -0
- package/lib/errors/index.js +5 -0
- package/lib/errors/index.js.map +1 -0
- package/lib/errors/telegram_error.d.ts +12 -0
- package/lib/errors/telegram_error.d.ts.map +1 -0
- package/lib/errors/telegram_error.js +39 -0
- package/lib/errors/telegram_error.js.map +1 -0
- package/lib/errors/validation_error.d.ts +19 -0
- package/lib/errors/validation_error.d.ts.map +1 -0
- package/lib/errors/validation_error.js +35 -0
- package/lib/errors/validation_error.js.map +1 -0
- package/lib/index.d.ts +6 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -18
- package/lib/index.js.map +1 -1
- package/lib/types/action.d.ts +58 -0
- package/lib/types/action.d.ts.map +1 -0
- package/lib/types/action.js +2 -0
- package/lib/types/action.js.map +1 -0
- package/lib/types/config.d.ts +36 -0
- package/lib/types/config.d.ts.map +1 -0
- package/lib/types/config.js +12 -0
- package/lib/types/config.js.map +1 -0
- package/lib/types/dialog.d.ts +39 -0
- package/lib/types/dialog.d.ts.map +1 -0
- package/lib/types/dialog.js +2 -0
- package/lib/types/dialog.js.map +1 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +3 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/internal.d.ts +58 -0
- package/lib/types/internal.d.ts.map +1 -0
- package/lib/types/internal.js +11 -0
- package/lib/types/internal.js.map +1 -0
- package/lib/types/keyboard.d.ts +41 -0
- package/lib/types/keyboard.d.ts.map +1 -0
- package/lib/types/keyboard.js +2 -0
- package/lib/types/keyboard.js.map +1 -0
- package/lib/types/middleware.d.ts +24 -0
- package/lib/types/middleware.d.ts.map +1 -0
- package/lib/types/middleware.js +2 -0
- package/lib/types/middleware.js.map +1 -0
- package/lib/types/schema.d.ts +17 -0
- package/lib/types/schema.d.ts.map +1 -0
- package/lib/types/schema.js +2 -0
- package/lib/types/schema.js.map +1 -0
- package/lib/utils/constants.d.ts +33 -0
- package/lib/utils/constants.d.ts.map +1 -0
- package/lib/utils/constants.js +33 -0
- package/lib/utils/constants.js.map +1 -0
- package/lib/utils/deep_copy.d.ts +6 -0
- package/lib/utils/deep_copy.d.ts.map +1 -0
- package/lib/utils/deep_copy.js +45 -0
- package/lib/utils/deep_copy.js.map +1 -0
- package/lib/utils/hash.d.ts +17 -0
- package/lib/utils/hash.d.ts.map +1 -0
- package/lib/utils/hash.js +50 -0
- package/lib/utils/hash.js.map +1 -0
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +7 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/logger.d.ts +17 -0
- package/lib/utils/logger.d.ts.map +1 -0
- package/lib/utils/logger.js +91 -0
- package/lib/utils/logger.js.map +1 -0
- package/lib/utils/resolvers.d.ts +29 -0
- package/lib/utils/resolvers.d.ts.map +1 -0
- package/lib/utils/resolvers.js +60 -0
- package/lib/utils/resolvers.js.map +1 -0
- package/lib/utils/type_guards.d.ts +22 -0
- package/lib/utils/type_guards.d.ts.map +1 -0
- package/lib/utils/type_guards.js +38 -0
- package/lib/utils/type_guards.js.map +1 -0
- package/lib/validation/index.d.ts +2 -0
- package/lib/validation/index.d.ts.map +1 -0
- package/lib/validation/index.js +2 -0
- package/lib/validation/index.js.map +1 -0
- package/lib/validation/schema_validator.d.ts +11 -0
- package/lib/validation/schema_validator.d.ts.map +1 -0
- package/lib/validation/schema_validator.js +156 -0
- package/lib/validation/schema_validator.js.map +1 -0
- package/package.json +59 -15
- package/lib/bot-service.d.ts +0 -27
- package/lib/bot-service.d.ts.map +0 -1
- package/lib/bot-service.js +0 -326
- package/lib/bot-service.js.map +0 -1
- package/lib/bot-struct.d.ts +0 -58
- package/lib/bot-struct.d.ts.map +0 -1
- package/lib/bot-struct.js +0 -3
- package/lib/bot-struct.js.map +0 -1
- package/readme.md +0 -54
- package/src/bot-service.ts +0 -289
- package/src/bot-struct.ts +0 -59
- package/src/index.ts +0 -2
- package/tsconfig.json +0 -108
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Action, WaitForInputOptions, CallbackFunction } from "../types/action.js";
|
|
2
|
+
/**
|
|
3
|
+
* Create an action that waits for text input and calls handler with result
|
|
4
|
+
*/
|
|
5
|
+
export declare function wait_for_text(handler: CallbackFunction | string, options?: WaitForInputOptions): Action;
|
|
6
|
+
/**
|
|
7
|
+
* Create an action that waits for file upload and calls handler with result
|
|
8
|
+
*/
|
|
9
|
+
export declare function wait_for_file(handler: CallbackFunction | string, options?: WaitForInputOptions): Action;
|
|
10
|
+
/**
|
|
11
|
+
* Create an action that waits for photo upload
|
|
12
|
+
*/
|
|
13
|
+
export declare function wait_for_photo(handler: CallbackFunction | string, options?: WaitForInputOptions): Action;
|
|
14
|
+
//# sourceMappingURL=wait_for_input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait_for_input.d.ts","sourceRoot":"","sources":["../../src/actions/wait_for_input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAExF;;GAEG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,gBAAgB,GAAG,MAAM,EAClC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,MAAM,CAgBR;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,gBAAgB,GAAG,MAAM,EAClC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,MAAM,CAgBR;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,gBAAgB,GAAG,MAAM,EAClC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,MAAM,CAKR"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create an action that waits for text input and calls handler with result
|
|
3
|
+
*/
|
|
4
|
+
export function wait_for_text(handler, options) {
|
|
5
|
+
return async (context) => {
|
|
6
|
+
const result = await context.bot.wait_for_text(context.chat_id, options);
|
|
7
|
+
if (result.success && result.value !== undefined) {
|
|
8
|
+
if (typeof handler === "string") {
|
|
9
|
+
context.bot.events.emit(handler, context.chat_id, result.value);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
await handler(context.chat_id, result.value);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
else if (result.cancelled && typeof handler === "string") {
|
|
16
|
+
context.bot.events.emit(`${handler}_cancelled`, context.chat_id);
|
|
17
|
+
}
|
|
18
|
+
else if (result.timed_out && typeof handler === "string") {
|
|
19
|
+
context.bot.events.emit(`${handler}_timeout`, context.chat_id);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Create an action that waits for file upload and calls handler with result
|
|
25
|
+
*/
|
|
26
|
+
export function wait_for_file(handler, options) {
|
|
27
|
+
return async (context) => {
|
|
28
|
+
const result = await context.bot.wait_for_file(context.chat_id, options);
|
|
29
|
+
if (result.success) {
|
|
30
|
+
if (typeof handler === "string") {
|
|
31
|
+
context.bot.events.emit(handler, context.chat_id, result);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
await handler(context.chat_id, result);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else if (result.cancelled && typeof handler === "string") {
|
|
38
|
+
context.bot.events.emit(`${handler}_cancelled`, context.chat_id);
|
|
39
|
+
}
|
|
40
|
+
else if (result.timed_out && typeof handler === "string") {
|
|
41
|
+
context.bot.events.emit(`${handler}_timeout`, context.chat_id);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create an action that waits for photo upload
|
|
47
|
+
*/
|
|
48
|
+
export function wait_for_photo(handler, options) {
|
|
49
|
+
return wait_for_file(handler, {
|
|
50
|
+
...options,
|
|
51
|
+
input_types: ["photo"],
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=wait_for_input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait_for_input.js","sourceRoot":"","sources":["../../src/actions/wait_for_input.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,aAAa,CAC3B,OAAkC,EAClC,OAA6B;IAE7B,OAAO,KAAK,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAEzE,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YACjD,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;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AI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAC3D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,YAAY,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACnE,CAAC;aAAM,IAAI,MAAM,CAAC,SAAS,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAC3D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACjE,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAkC,EAClC,OAA6B;IAE7B,OAAO,aAAa,CAAC,OAAO,EAAE;QAC5B,GAAG,OAAO;QACV,WAAW,EAAE,CAAC,OAAO,CAAC;KACvB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import TelegramBot from "node-telegram-bot-api";
|
|
2
|
+
import { EventEmitter } from "node:events";
|
|
3
|
+
import type { Schema } from "../types/schema.js";
|
|
4
|
+
import type { BotConfig } from "../types/config.js";
|
|
5
|
+
import type { WaitForInputOptions, WaitResult, FileWaitResult } from "../types/action.js";
|
|
6
|
+
import type { Dialog } from "../types/dialog.js";
|
|
7
|
+
import type { Middleware } from "../types/middleware.js";
|
|
8
|
+
import type { UserState } from "../types/internal.js";
|
|
9
|
+
export declare class BotBuilder {
|
|
10
|
+
/** Raw telegram bot instance (for advanced usage) */
|
|
11
|
+
readonly telegram: TelegramBot;
|
|
12
|
+
/** Event emitter for custom events */
|
|
13
|
+
readonly events: EventEmitter;
|
|
14
|
+
private readonly config;
|
|
15
|
+
private readonly logger;
|
|
16
|
+
private readonly schema;
|
|
17
|
+
private readonly dialog_manager;
|
|
18
|
+
private readonly button_registry;
|
|
19
|
+
private readonly keyboard_builder;
|
|
20
|
+
private readonly middleware_chain;
|
|
21
|
+
private readonly input_manager;
|
|
22
|
+
constructor(schema: Schema, config: BotConfig);
|
|
23
|
+
/**
|
|
24
|
+
* Add middleware to the processing chain
|
|
25
|
+
*/
|
|
26
|
+
use(middleware: Middleware): this;
|
|
27
|
+
/**
|
|
28
|
+
* Navigate user to a specific dialog
|
|
29
|
+
*/
|
|
30
|
+
change_dialog(chat_id: number, dialog_id: string): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Send a standalone message (not part of dialog system)
|
|
33
|
+
*/
|
|
34
|
+
send_message(chat_id: number, text: string, options?: {
|
|
35
|
+
parse_mode?: "HTML" | "Markdown" | "MarkdownV2";
|
|
36
|
+
disable_web_page_preview?: boolean;
|
|
37
|
+
disable_notification?: boolean;
|
|
38
|
+
protect_content?: boolean;
|
|
39
|
+
}): Promise<TelegramBot.Message>;
|
|
40
|
+
/**
|
|
41
|
+
* Get current user state
|
|
42
|
+
*/
|
|
43
|
+
get_user_state(chat_id: number): UserState;
|
|
44
|
+
/**
|
|
45
|
+
* Set custom data in user state
|
|
46
|
+
*/
|
|
47
|
+
set_user_data(chat_id: number, key: string, value: unknown): void;
|
|
48
|
+
/**
|
|
49
|
+
* Get custom data from user state
|
|
50
|
+
*/
|
|
51
|
+
get_user_data<T>(chat_id: number, key: string): T | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Reset user state to start dialog
|
|
54
|
+
*/
|
|
55
|
+
reset_user(chat_id: number): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Delete a message
|
|
58
|
+
*/
|
|
59
|
+
delete_message(chat_id: number, message_id: number): Promise<boolean>;
|
|
60
|
+
/**
|
|
61
|
+
* Get a dialog by ID
|
|
62
|
+
*/
|
|
63
|
+
get_dialog(dialog_id: string): Dialog | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Wait for user text input
|
|
66
|
+
*/
|
|
67
|
+
wait_for_text(chat_id: number, options?: WaitForInputOptions): Promise<WaitResult<string>>;
|
|
68
|
+
/**
|
|
69
|
+
* Wait for user file upload
|
|
70
|
+
*/
|
|
71
|
+
wait_for_file(chat_id: number, options?: WaitForInputOptions): Promise<FileWaitResult>;
|
|
72
|
+
/**
|
|
73
|
+
* Graceful shutdown
|
|
74
|
+
*/
|
|
75
|
+
stop(): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Set up all message handlers
|
|
78
|
+
*/
|
|
79
|
+
private setup_handlers;
|
|
80
|
+
/**
|
|
81
|
+
* Handle /start command
|
|
82
|
+
*/
|
|
83
|
+
private handle_start;
|
|
84
|
+
/**
|
|
85
|
+
* Handle other commands
|
|
86
|
+
*/
|
|
87
|
+
private handle_command;
|
|
88
|
+
/**
|
|
89
|
+
* Handle callback queries (inline button clicks)
|
|
90
|
+
*/
|
|
91
|
+
private handle_callback;
|
|
92
|
+
/**
|
|
93
|
+
* Handle regular text messages
|
|
94
|
+
*/
|
|
95
|
+
private handle_message;
|
|
96
|
+
/**
|
|
97
|
+
* Handle text input when waiting
|
|
98
|
+
*/
|
|
99
|
+
private handle_text_input;
|
|
100
|
+
/**
|
|
101
|
+
* Handle reply keyboard button press
|
|
102
|
+
*/
|
|
103
|
+
private handle_reply_button;
|
|
104
|
+
/**
|
|
105
|
+
* Handle document upload
|
|
106
|
+
*/
|
|
107
|
+
private handle_document;
|
|
108
|
+
/**
|
|
109
|
+
* Handle photo upload
|
|
110
|
+
*/
|
|
111
|
+
private handle_photo;
|
|
112
|
+
/**
|
|
113
|
+
* Handle contact share
|
|
114
|
+
*/
|
|
115
|
+
private handle_contact;
|
|
116
|
+
/**
|
|
117
|
+
* Handle location share
|
|
118
|
+
*/
|
|
119
|
+
private handle_location;
|
|
120
|
+
/**
|
|
121
|
+
* Run middleware chain
|
|
122
|
+
*/
|
|
123
|
+
private run_middleware;
|
|
124
|
+
/**
|
|
125
|
+
* Execute an action or array of actions
|
|
126
|
+
*/
|
|
127
|
+
private execute_action;
|
|
128
|
+
/**
|
|
129
|
+
* Render a dialog to the user
|
|
130
|
+
*/
|
|
131
|
+
private render_dialog;
|
|
132
|
+
/**
|
|
133
|
+
* Render dialog with images
|
|
134
|
+
*/
|
|
135
|
+
private render_with_images;
|
|
136
|
+
/**
|
|
137
|
+
* Render text-only dialog
|
|
138
|
+
*/
|
|
139
|
+
private render_text_only;
|
|
140
|
+
/**
|
|
141
|
+
* Send a new message (used as fallback)
|
|
142
|
+
*/
|
|
143
|
+
private send_new_message;
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=bot_builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot_builder.d.ts","sourceRoot":"","sources":["../../src/core/bot_builder.ts"],"names":[],"mappings":"AAAA,OAAO,WAAqC,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,oBAAoB,CAAC;AAClE,OAAO,KAAK,EAAyB,mBAAmB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACjH,OAAO,KAAK,EAAE,MAAM,EAA6B,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAiC,MAAM,wBAAwB,CAAC;AACxF,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,sBAAsB,CAAC;AAkBtE,qBAAa,UAAU;IACrB,qDAAqD;IACrD,SAAgB,QAAQ,EAAE,WAAW,CAAC;IAEtC,sCAAsC;IACtC,SAAgB,MAAM,EAAE,YAAY,CAAC;IAErC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqF;IAC5G,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;IAC/C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAiB;IACjD,OAAO,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