@nuvin/agent-core 0.1.0-rc.8 → 0.1.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/dist/VERSION +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/chunk-BLGBVFVX.js +1 -0
- package/dist/chunk-D5IVWJHX.js +1 -0
- package/dist/chunk-FFIZ6TKW.js +1 -1
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-UIXQPCSN.js +1 -0
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/chunk-YWQXXHHU.js +1 -0
- package/dist/formats/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/models/chat-model.d.ts +4 -2
- package/dist/models/index.js +1 -1
- package/dist/models/mock-model.d.ts +3 -1
- package/dist/models/model-registry.d.ts +0 -1
- package/dist/models/openai-model.d.ts +4 -0
- package/dist/models/openai-surfaces.d.ts +3 -0
- package/dist/models/routed-model.d.ts +3 -1
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +1 -1
- package/dist/shared/model-identity.d.ts +2 -0
- package/dist/shared/types.d.ts +10 -2
- package/dist/tools/index.js +1 -1
- package/dist/tools/mcp-server-manager.d.ts +6 -6
- package/package.json +2 -2
- package/dist/chunk-FKZ3QQWZ.js +0 -1
- package/dist/chunk-NHBKADBW.js +0 -1
- package/dist/chunk-QDOE7NWO.js +0 -1
|
@@ -20,9 +20,9 @@ export type McpServerConnectionStatus = {
|
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* One MCP tool's user-facing descriptor, grouped per server. Populated only for
|
|
23
|
-
* connected
|
|
24
|
-
*
|
|
25
|
-
* carries no per-server bucketing).
|
|
23
|
+
* connected tools so the Ctrl+P MCP tab can render enabled and disabled tools
|
|
24
|
+
* without a second round-trip (the flat {@link McpToolBundle.tools} array
|
|
25
|
+
* contains only callable tools and carries no per-server bucketing).
|
|
26
26
|
*/
|
|
27
27
|
export type McpServerToolInfo = {
|
|
28
28
|
name: string;
|
|
@@ -33,9 +33,9 @@ export interface McpToolBundle {
|
|
|
33
33
|
tools: AnyToolDefinition[];
|
|
34
34
|
servers: Record<string, McpServerConnectionStatus>;
|
|
35
35
|
/**
|
|
36
|
-
* Per-server
|
|
37
|
-
* descriptors)
|
|
38
|
-
* default to `{}`.
|
|
36
|
+
* Per-server descriptors for every discovered tool (server name →
|
|
37
|
+
* descriptors), including tools filtered from the callable array. Optional so
|
|
38
|
+
* existing bundle literals stay valid; consumers default to `{}`.
|
|
39
39
|
*/
|
|
40
40
|
serverTools?: Record<string, McpServerToolInfo[]>;
|
|
41
41
|
close(): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuvin/agent-core",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Core agent, model, format, and tool primitives for Nuvin",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"tsup": "^8.5.1",
|
|
53
53
|
"typescript": "^6.0.2",
|
|
54
54
|
"vitest": "^4.1.2",
|
|
55
|
-
"@nuvin/config": "0.2.0
|
|
55
|
+
"@nuvin/config": "0.2.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@anthropic-ai/sdk": "^0.82.0",
|
package/dist/chunk-FKZ3QQWZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x4f7377,_0x3462fd){const _0x43c662={_0x5c944b:0x50b,_0x36ea43:0x562,_0x228975:0xb0,_0x5c6655:0x4e2,_0x5a78f8:0x42e,_0x2196db:0x468,_0x40b25b:0x464,_0x5b4656:0x421,_0x408ade:0x47a,_0x3fc9aa:0x498,_0x14a8bb:0x4e4,_0xf3193c:0x447,_0x1cdddb:0x45a,_0x2679b5:0xd5,_0x2dd6c5:0x56,_0x5e5fd2:0x20,_0x29feae:0x54};function _0x438fdc(_0x19a465,_0x45d4b6,_0x23ad9a,_0x20d470){return _0x29f5(_0x20d470-0x3ae,_0x45d4b6);}function _0x557fbc(_0x30f061,_0x1d1ce7,_0xdcd9f3,_0x2cf4b2){return _0x29f5(_0x2cf4b2- -0x19d,_0x1d1ce7);}const _0x345968=_0x4f7377();while(!![]){try{const _0x30d439=-parseInt(_0x438fdc(_0x43c662._0x5c944b,0x501,_0x43c662._0x36ea43,0x504))/0x1*(parseInt(_0x557fbc(-0xae,-0x90,-0xe7,-_0x43c662._0x228975))/0x2)+parseInt(_0x438fdc(0x479,_0x43c662._0x5c6655,0x4d4,0x49c))/0x3*(parseInt(_0x438fdc(_0x43c662._0x5a78f8,_0x43c662._0x2196db,0x436,_0x43c662._0x40b25b))/0x4)+-parseInt(_0x438fdc(_0x43c662._0x5b4656,0x415,_0x43c662._0x408ade,0x458))/0x5+parseInt(_0x438fdc(_0x43c662._0x3fc9aa,_0x43c662._0x14a8bb,_0x43c662._0xf3193c,0x4a2))/0x6+parseInt(_0x438fdc(0x467,0x492,0x4ac,_0x43c662._0x1cdddb))/0x7*(-parseInt(_0x557fbc(-_0x43c662._0x2679b5,-0x12e,-0xc5,-0xed))/0x8)+parseInt(_0x557fbc(-_0x43c662._0x2dd6c5,-0x95,-0xa2,-0x81))/0x9+parseInt(_0x557fbc(-_0x43c662._0x5e5fd2,-0x34,-_0x43c662._0x29feae,-0x43))/0xa;if(_0x30d439===_0x3462fd)break;else _0x345968['push'](_0x345968['shift']());}catch(_0x56743a){_0x345968['push'](_0x345968['shift']());}}}(_0x5b65,0x9fe38));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-QDOE7NWO.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x51e12c){const _0x20a779={_0x534638:0x7f,_0x1a8280:0xa4,_0x4e4ff4:0x35,_0x2431ba:0x88,_0x10091e:0xa},_0x53be30={_0x3cb7a0:0x149};function _0xcd0734(_0x21e61a,_0x56787e,_0x37f181,_0x54b4df){return _0x29f5(_0x21e61a- -_0x53be30._0x3cb7a0,_0x56787e);}function _0x38d111(_0x2f994b,_0x4a7891,_0x376f1b,_0x59ff71){return _0x29f5(_0x2f994b-0x20f,_0x59ff71);}return typeof _0x51e12c===_0xcd0734(-_0x20a779._0x534638,-_0x20a779._0x1a8280,-_0x20a779._0x4e4ff4,-_0x20a779._0x2431ba)&&_0x51e12c!==null&&!Array[_0xcd0734(-_0x20a779._0x10091e,0x4,_0x20a779._0x10091e,-0x35)](_0x51e12c);}function isToolOutputEnvelope(_0x436972){const _0x4f3c4d={_0x12a158:0x199,_0xbd7a8b:0x146,_0x5ff231:0x189,_0x4a068a:0x16e,_0x3e7106:0x125,_0x2bcddf:0x19e},_0x5b64b2={_0x2b8bb4:0x87};function _0x995ae6(_0x140f1f,_0x10a0af,_0x506801,_0x79d770){return _0x29f5(_0x79d770-_0x5b64b2._0x2b8bb4,_0x10a0af);}function _0x30655d(_0x270383,_0x25366e,_0x71e7a0,_0x16fde3){return _0x29f5(_0x71e7a0- -0x27e,_0x16fde3);}if(typeof _0x436972!=='object'||_0x436972===null||Array[_0x995ae6(_0x4f3c4d._0x12a158,0x204,0x1a6,0x1c6)](_0x436972))return![];if(typeof _0x436972[_0x30655d(-0x129,-0x10b,-_0x4f3c4d._0xbd7a8b,-_0x4f3c4d._0x5ff231)]!==_0x30655d(-_0x4f3c4d._0x4a068a,-0x10c,-_0x4f3c4d._0x3e7106,-0x173))return![];const _0x5adce5=_0x436972[_0x995ae6(0x185,0x19d,0x140,_0x4f3c4d._0x2bcddf)];return _0x5adce5===void 0x0||isJsonObject(_0x5adce5);}function validateAgainstSchema(_0x5a6b6d,_0x146690,_0x24d354){const _0x14da00={_0x894550:0x336,_0x5b8a44:0x2d9,_0x2edb46:0x322,_0x572738:0x91,_0x1db315:0xee,_0x225b46:0x4f,_0x3ecdbd:0x19,_0x24e05d:0x1,_0x3f1bc7:0x26,_0x2ad6a4:0x3a1,_0x26ee7a:0x3e4,_0x516ad8:0x391,_0x17b58b:0x48,_0x38853b:0x4e,_0xcde353:0x9f,_0x27fecd:0x386,_0x7d602f:0x383,_0x411c4d:0x2d3,_0x54bd9e:0x32d,_0x4d6c27:0x2e2,_0x3bbf80:0x2f2,_0x1f7ce0:0x8c,_0x12ec3d:0x86,_0x2e12f5:0x77,_0x5171a0:0x67,_0x4dcb29:0x37e,_0xaf620c:0x381,_0x7d9fc2:0x6b,_0x52d553:0x58,_0x1fa68c:0x55,_0x2d0992:0x9,_0x3e301b:0x8b,_0x49ec10:0x2,_0x47c2f1:0x382,_0x21f889:0x38d,_0x3b9bf3:0x6b,_0x168524:0x3e,_0x49ff6e:0x1a},_0x2f1d18={_0x5ca0d2:0xc8},_0x4e32ab={_0x2b4a5f:0x27f};function _0x2024db(_0x5048ba,_0x4f72e2,_0x2a828f,_0x1b191b){return _0x29f5(_0x5048ba-_0x4e32ab._0x2b4a5f,_0x4f72e2);}function _0xf4944d(_0x5f1f8d,_0x8023d7,_0x3257f0,_0x55024c){return _0x29f5(_0x8023d7- -_0x2f1d18._0x5ca0d2,_0x5f1f8d);}switch(_0x24d354[_0x2024db(_0x14da00._0x894550,_0x14da00._0x5b8a44,0x2f1,_0x14da00._0x2edb46)]){case _0x2024db(0x3d8,0x3e7,0x3d3,0x3e7):if(typeof _0x146690!==_0xf4944d(0xed,_0x14da00._0x572738,_0x14da00._0x1db315,_0x14da00._0x225b46))throw new Error(_0xf4944d(-_0x14da00._0x3ecdbd,0x37,-_0x14da00._0x24e05d,0x29)+_0x5a6b6d+_0xf4944d(-0x2b,-0x14,-0x56,_0x14da00._0x3f1bc7));return;case _0x2024db(_0x14da00._0x2ad6a4,0x3a5,_0x14da00._0x26ee7a,_0x14da00._0x516ad8):if(typeof _0x146690!=='number')throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x5a6b6d+_0xf4944d(_0x14da00._0x17b58b,_0x14da00._0x38853b,0x70,_0x14da00._0xcde353));return;case _0x2024db(0x32d,_0x14da00._0x27fecd,_0x14da00._0x7d602f,_0x14da00._0x411c4d):if(typeof _0x146690!==_0x2024db(_0x14da00._0x54bd9e,_0x14da00._0x4d6c27,_0x14da00._0x3bbf80,0x378))throw new Error(_0xf4944d(0x12,0x37,_0x14da00._0x1f7ce0,_0x14da00._0x12ec3d)+_0x5a6b6d+':\x20expected\x20boolean');return;case'array':if(!Array[_0xf4944d(0x6a,_0x14da00._0x2e12f5,_0x14da00._0x5171a0,_0x14da00._0xcde353)](_0x146690))throw new Error(_0x2024db(_0x14da00._0x4dcb29,_0x14da00._0xaf620c,0x3c8,_0x14da00._0x2edb46)+_0x5a6b6d+_0xf4944d(_0x14da00._0x7d9fc2,0x57,_0x14da00._0x52d553,0x8d));_0x146690[_0xf4944d(0x3,_0x14da00._0x1fa68c,0x3f,0x50)]((_0x19d5b0,_0x5a51b7)=>{validateAgainstSchema(_0x5a6b6d+'['+_0x5a51b7+']',_0x19d5b0,_0x24d354['items']);});return;case'object':if(!isJsonObject(_0x146690))throw new Error(_0xf4944d(_0x14da00._0x2d0992,0x37,_0x14da00._0x3e301b,_0x14da00._0x49ec10)+_0x5a6b6d+':\x20expected\x20object');for(const _0x372e4e of _0x24d354[_0x2024db(0x3ce,_0x14da00._0x47c2f1,_0x14da00._0x21f889,0x3f7)]??[]){if(!(_0x372e4e in _0x146690))throw new Error(_0xf4944d(0x3d,0x37,_0x14da00._0x3b9bf3,0x6b)+_0x5a6b6d+':\x20missing\x20required\x20field\x20\x22'+_0x372e4e+'\x22');}for(const [_0x31815b,_0x29cc86]of Object[_0xf4944d(_0x14da00._0x168524,0x4a,0x64,0x7d)](_0x24d354[_0xf4944d(0x0,-0x3,0x14,_0x14da00._0x49ff6e)])){_0x31815b in _0x146690&&validateAgainstSchema(_0x5a6b6d+'.'+_0x31815b,_0x146690[_0x31815b],_0x29cc86);}}}function normalizeToolOutputValue(_0x1e93d8){const _0x348572={_0x48399f:0x225,_0x3b8798:0x240,_0x9905e4:0x30,_0x2aff90:0x36,_0x276520:0x46,_0x5da6c1:0x39,_0xf2e299:0x3,_0x1f67ac:0x282,_0x36c013:0x24a,_0x35ad09:0x268,_0x526f64:0x270,_0x4239f6:0x212},_0x2ba5a5={_0x432169:0x129};if(isToolOutputEnvelope(_0x1e93d8))return{'output':_0x1e93d8['output'],'structured':_0x1e93d8[_0x12086f(_0x348572._0x48399f,0x225,_0x348572._0x3b8798,0x1f8)]??{'value':_0x1e93d8[_0x44f483(_0x348572._0x9905e4,_0x348572._0x2aff90,-0x14,0x38)]},..._0x1e93d8[_0x44f483(_0x348572._0x276520,_0x348572._0x5da6c1,_0x348572._0xf2e299,-0x13)]!==void 0x0?{'content':_0x1e93d8['content']}:{}};function _0x12086f(_0x34af8a,_0x10b2cd,_0xa532e9,_0x4d3011){return _0x29f5(_0xa532e9-_0x2ba5a5._0x432169,_0x10b2cd);}function _0x44f483(_0x2e6fcb,_0xbf6fe8,_0x44d7b5,_0x27ec88){return _0x29f5(_0x2e6fcb- -0x108,_0xbf6fe8);}if(typeof _0x1e93d8===_0x12086f(0x2a3,0x25f,_0x348572._0x1f67ac,0x291))return{'output':_0x1e93d8,'structured':{'value':_0x1e93d8}};if(typeof _0x1e93d8==='object'&&_0x1e93d8!==null&&!Array[_0x12086f(0x27e,_0x348572._0x36c013,_0x348572._0x35ad09,_0x348572._0x526f64)](_0x1e93d8))return{'output':JSON[_0x12086f(_0x348572._0x4239f6,0x1da,0x20d,0x1c6)](_0x1e93d8,null,0x2),'structured':_0x1e93d8};return{'output':JSON['stringify'](_0x1e93d8,null,0x2),'structured':{'value':_0x1e93d8}};}function createToolOutput(_0x52a9c2,_0x4c5924={'value':_0x52a9c2},_0x599228){return{'output':_0x52a9c2,'structured':_0x4c5924,..._0x599228!==void 0x0?{'content':_0x599228}:{}};}var ToolExecutionError=class extends Error{[_0x4904cb(0xe0,0xc0,0xda,0xcd)];constructor(_0x13d3bd,_0x15da4e={}){const _0x5001f4={_0x19a168:0x348,_0xd02942:0x399,_0x1defb7:0x359},_0x45fda0={_0x636afb:0x2c9,_0x35f610:0xee};super(_0x13d3bd);function _0x52d367(_0x3a3c63,_0x2fc8bf,_0x1b977e,_0x309aa1){return _0x4904cb(_0x2fc8bf,_0x2fc8bf-0x12f,_0x3a3c63-_0x45fda0._0x636afb,_0x309aa1-_0x45fda0._0x35f610);}this['name']=_0x52d367(0x345,_0x5001f4._0x19a168,_0x5001f4._0xd02942,_0x5001f4._0x1defb7),this['structured']=_0x15da4e;}};function defineTool(_0x3aced7){return _0x3aced7;}var ToolRegistry=class{[_0x4904cb(0x6d,0x3c,0x85,0x8f)]=new Map();constructor(_0x1c0bfb=[]){const _0x8d87e5={_0x4df338:0x52};function _0x317dbc(_0x593508,_0x408ddb,_0x1fc2c3,_0x305ae7){return _0x4904cb(_0x408ddb,_0x408ddb-_0x8d87e5._0x4df338,_0x593508- -0x75,_0x305ae7-0x2a);}for(const _0x1f7c19 of _0x1c0bfb){this[_0x317dbc(0x4a,0x18,0xa7,0x52)](_0x1f7c19);}}[_0x1666c8(-0x2c0,-0x28f,-0x314,-0x2dc)](_0x4f4821){const _0x376a99={_0x10047b:0x484,_0x49b404:0x4aa},_0x27920d={_0x522e15:0x31,_0x272c3a:0x128,_0x492b58:0x790},_0x363f74={_0x3fc5b9:0x146};function _0x1b13e7(_0x551b30,_0x417e86,_0x1060e4,_0x149dfd){return _0x4904cb(_0x1060e4,_0x417e86-0x39,_0x149dfd- -_0x363f74._0x3fc5b9,_0x149dfd-0x127);}function _0x1ad251(_0x5a3ac9,_0x4f20a9,_0x34e8ba,_0x45617e){return _0x1666c8(_0x5a3ac9-_0x27920d._0x522e15,_0x4f20a9-_0x27920d._0x272c3a,_0x5a3ac9,_0x45617e-_0x27920d._0x492b58);}this[_0x1ad251(_0x376a99._0x10047b,0x476,_0x376a99._0x49b404,0x47a)][_0x1ad251(0x441,0x4c1,0x4bb,0x483)](_0x4f4821['name'],_0x4f4821);}[_0x1666c8(-0x328,-0x2b6,-0x2bc,-0x303)](_0x58aa23){const _0x5d5267={_0x28d6cc:0x331,_0x881420:0xe6,_0x19dea9:0x12c},_0x1effc6={_0x4619fb:0xca,_0x1cd32b:0x60a},_0x5de4c2={_0x39eb14:0x3dd};function _0x1e9c84(_0x125dfe,_0x38e87b,_0x2e0ab4,_0x41a3f9){return _0x1666c8(_0x125dfe-0x6f,_0x38e87b-0x9e,_0x38e87b,_0x2e0ab4-_0x5de4c2._0x39eb14);}function _0x3d5414(_0x4fa333,_0x5bd820,_0x353ecd,_0x1fdfb0){return _0x1666c8(_0x4fa333-0x122,_0x5bd820-_0x1effc6._0x4619fb,_0x4fa333,_0x1fdfb0-_0x1effc6._0x1cd32b);}return this[_0x3d5414(0x2a0,0x334,_0x5d5267._0x28d6cc,0x2f4)][_0x1e9c84(_0x5d5267._0x881420,_0x5d5267._0x19dea9,0xda,0xf7)](_0x58aa23);}['list'](){return[...this['toolsByName']['values']()];}[_0x4904cb(0x14d,0x153,0x11f,0x117)](){const _0x386517={_0x511a95:0x2ea,_0x127a1c:0x37b,_0x488f6a:0x2fe},_0x101cce={_0x5e6475:0x206,_0x436733:0x270,_0x38714a:0x1ff,_0x29a9a0:0x1e7,_0x554985:0x248,_0x309f58:0x1fa,_0x102497:0x23a},_0x530718={_0x1b91aa:0x17f,_0x54fdb5:0x117,_0x4127a3:0x3d},_0xe970f1={_0x127000:0x66,_0x39784d:0x38b},_0x5e20e5={_0x2a132a:0x1f,_0x3ffa1b:0x234};function _0xd32673(_0x10422a,_0x18c94f,_0x4eb23a,_0x557d54){return _0x4904cb(_0x4eb23a,_0x18c94f-_0x5e20e5._0x2a132a,_0x18c94f-_0x5e20e5._0x3ffa1b,_0x557d54-0x2d);}function _0x395f7b(_0x50bbb4,_0xe6c1d1,_0xd0a89a,_0x461974){return _0x1666c8(_0x50bbb4-0xac,_0xe6c1d1-_0xe970f1._0x127000,_0xd0a89a,_0x50bbb4-_0xe970f1._0x39784d);}return this[_0xd32673(_0x386517._0x511a95,0x33b,_0x386517._0x127a1c,0x316)]()[_0xd32673(0x2e0,0x302,_0x386517._0x488f6a,0x2b9)](_0x3d7fdb=>{const _0x49b477={_0x2dd8d7:0x15a};function _0x39a7db(_0x3586c8,_0x174237,_0x150a25,_0x55ae8a){return _0x395f7b(_0x174237-_0x49b477._0x2dd8d7,_0x174237-0x1dc,_0x3586c8,_0x55ae8a-0x102);}function _0x581913(_0x50763d,_0x149d63,_0x4f9e82,_0x49baa9){return _0x395f7b(_0x149d63- -_0x530718._0x1b91aa,_0x149d63-_0x530718._0x54fdb5,_0x49baa9,_0x49baa9-_0x530718._0x4127a3);}return{'name':_0x3d7fdb[_0x39a7db(0x227,0x244,_0x101cce._0x5e6475,_0x101cce._0x436733)],'description':_0x3d7fdb[_0x39a7db(_0x101cce._0x38714a,0x1e7,0x1c8,_0x101cce._0x29a9a0)],'input_schema':_0x3d7fdb[_0x39a7db(_0x101cce._0x554985,0x24a,_0x101cce._0x309f58,_0x101cce._0x102497)]};});}};function validateToolInput(_0x2eb01f,_0x3cafb6){const _0x4d221d={_0x49877a:0x8b,_0x27787e:0xb6},_0x5514e9={_0x57555a:0xfc,_0xc4c948:0x3c1};validateAgainstSchema(_0x13e378(_0x4d221d._0x49877a,0x9f,0x110,_0x4d221d._0x27787e),_0x2eb01f,_0x3cafb6);function _0x13e378(_0x3ad6e0,_0x52e32d,_0x1b7409,_0x58cc46){return _0x1666c8(_0x3ad6e0-0x19e,_0x52e32d-_0x5514e9._0x57555a,_0x52e32d,_0x58cc46-_0x5514e9._0xc4c948);}return _0x2eb01f;}function deriveFinalToolOutput(_0xdc9845){const _0x5e03a8={_0x239d96:0x248,_0xcd1714:0x285,_0x1eafcc:0x26c,_0x9063db:0x1fa,_0x26dcb7:0x17d,_0x53ce9c:0x146,_0x496e20:0x25b,_0x2b9642:0x289,_0x1f32e0:0x203,_0x57c24a:0x1c3,_0xe841c:0x10e,_0x1fd48a:0x12f,_0x227b71:0x172,_0x4ddbb5:0x219,_0x43bd7d:0x230,_0x26606f:0x266,_0x42fcad:0x27a,_0x26912f:0x118},_0x17b4e3={_0x3b7ba0:0x0,_0x426e69:0x314};if(_0xdc9845[_0x57a43a(-_0x5e03a8._0x239d96,-_0x5e03a8._0xcd1714,-_0x5e03a8._0x1eafcc,-0x213)]===0x0)return{'output':'','structured':{}};function _0x26185a(_0x26cddf,_0x50ba7e,_0x2e2292,_0x18bb90){return _0x4904cb(_0x26cddf,_0x50ba7e-0x52,_0x2e2292- -0x240,_0x18bb90-0x145);}function _0x57a43a(_0x583e82,_0x102f04,_0x46b6de,_0x531caf){return _0x4904cb(_0x46b6de,_0x102f04-_0x17b4e3._0x3b7ba0,_0x583e82- -_0x17b4e3._0x426e69,_0x531caf-0x1a4);}if(_0xdc9845[_0x57a43a(-0x248,-0x239,-0x206,-_0x5e03a8._0x9063db)]===0x1)return{'output':_0xdc9845[0x0][_0x26185a(-0x187,-_0x5e03a8._0x26dcb7,-0x145,-_0x5e03a8._0x53ce9c)],'structured':_0xdc9845[0x0][_0x57a43a(-0x23a,-0x28a,-_0x5e03a8._0x496e20,-_0x5e03a8._0x2b9642)],..._0xdc9845[0x0][_0x57a43a(-_0x5e03a8._0x1f32e0,-0x201,-_0x5e03a8._0x57c24a,-0x1ec)]!==void 0x0?{'content':_0xdc9845[0x0][_0x26185a(-_0x5e03a8._0xe841c,-0xfd,-_0x5e03a8._0x1fd48a,-0xe9)]}:{}};const _0xfa2cf2=_0xdc9845['filter'](_0x4d7acb=>_0x4d7acb['content']!==void 0x0);return{'output':_0xdc9845[_0x26185a(-0x13d,-0x15b,-_0x5e03a8._0x227b71,-0x1ca)](_0x379112=>_0x379112[_0x57a43a(-0x219,-0x25f,-0x25d,-0x1f9)])[_0x57a43a(-0x25b,-_0x5e03a8._0x4ddbb5,-_0x5e03a8._0x43bd7d,-0x20e)](''),'structured':{'chunks':_0xdc9845['map'](_0x594d0d=>_0x594d0d[_0x26185a(-0x145,-0x14c,-0x166,-0x12a)])},..._0xfa2cf2[_0x57a43a(-0x248,-0x225,-_0x5e03a8._0x26606f,-_0x5e03a8._0x42fcad)]===0x1?{'content':_0xfa2cf2[0x0][_0x26185a(-_0x5e03a8._0x26912f,-0x13e,-0x12f,-0x17d)]}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x7152af,_0x24646e,_0x22b90f,_0x35b428=[]){const _0x13e707={_0xad6d5b:0x25a,_0x21d86e:0x284,_0x52d523:0x2a9,_0x14d453:0x273,_0x45df6f:0x2ae,_0x1d9335:0x29b},_0x509065={_0x438d2b:0x143,_0xc5a888:0xd9},_0x3ccdaf={_0x253079:0x41e,_0xf10c6e:0x100};function _0x209ed8(_0x384ce1,_0x246116,_0x1f834b,_0x483a15){return _0x4904cb(_0x1f834b,_0x246116-0x133,_0x384ce1-_0x3ccdaf._0x253079,_0x483a15-_0x3ccdaf._0xf10c6e);}function _0x5263b4(_0x52f488,_0x514fb7,_0x1e37c8,_0x423c01){return _0x4904cb(_0x52f488,_0x514fb7-_0x509065._0x438d2b,_0x423c01- -0x3a3,_0x423c01-_0x509065._0xc5a888);}return{'callId':_0x7152af['id'],'toolName':_0x7152af[_0x5263b4(-_0x13e707._0xad6d5b,-0x28b,-_0x13e707._0x21d86e,-_0x13e707._0x52d523)],'status':_0x5263b4(-_0x13e707._0x14d453,-_0x13e707._0x45df6f,-0x270,-_0x13e707._0x1d9335),'output':_0x24646e,'structured':_0x22b90f,'chunks':_0x35b428,'meta':createToolMeta()};}function createRejectedToolResult(_0x4fca04,_0x18d83e){const _0x83b22b={_0x2c070e:0x160,_0x2d013f:0x15a,_0x5edfe1:0x434,_0x554a17:0x180,_0x2b6983:0x493,_0x292716:0x186,_0x10f8fe:0x17d},_0x51dc10={_0x54d02d:0x34,_0x3853d1:0x1aa,_0x56a15a:0x42b},_0x486270={_0x59d021:0xcd,_0x258249:0x357};function _0xc5a58c(_0x189fc5,_0x35f745,_0x4a6872,_0x3cb9c6){return _0x4904cb(_0x3cb9c6,_0x35f745-_0x486270._0x59d021,_0x4a6872-_0x486270._0x258249,_0x3cb9c6-0x95);}function _0x144abd(_0x2a0dc8,_0x310a96,_0x5aa382,_0x121a2d){return _0x1666c8(_0x2a0dc8-_0x51dc10._0x54d02d,_0x310a96-_0x51dc10._0x3853d1,_0x5aa382,_0x121a2d-_0x51dc10._0x56a15a);}const _0x4fe4a3=_0x18d83e?.[_0x144abd(0x14d,_0x83b22b._0x2c070e,0x151,_0x83b22b._0x2d013f)]()[_0xc5a58c(_0x83b22b._0x5edfe1,0x403,0x423,0x3db)]?_0x18d83e:_0x144abd(_0x83b22b._0x554a17,0xf8,0x161,0x13f)+_0x4fca04[_0xc5a58c(_0x83b22b._0x2b6983,0x4a0,0x451,0x400)];return createErrorToolResult(_0x4fca04,_0x4fe4a3,{'error':_0x144abd(0x18b,_0x83b22b._0x292716,0x15a,_0x83b22b._0x10f8fe),..._0x18d83e?.['trim']()['length']?{'reason':_0x18d83e}:{}});}function createAbortedToolResult(_0x1da7e1,_0x51e978,_0x40cefd=[]){const _0x272468={_0x1ff3b3:0x2ca};function _0x53ad6d(_0x492c76,_0x284ae8,_0x5530ec,_0xd32603){return _0x4904cb(_0x492c76,_0x284ae8-0x17,_0x284ae8- -_0x272468._0x1ff3b3,_0xd32603-0x15);}const _0x45313e=toAbortError(_0x51e978);return createErrorToolResult(_0x1da7e1,_0x45313e[_0x53ad6d(-0x17b,-0x1bc,-0x1d5,-0x1ff)],{'error':_0x45313e['message'],'aborted':!![]},_0x40cefd);}function _0x1666c8(_0x2f148f,_0x15b63a,_0x337c41,_0x3457ea){const _0x290d32={_0x3554ac:0x3d8};return _0x29f5(_0x3457ea- -_0x290d32._0x3554ac,_0x337c41);}function createSuccessToolResult(_0x56d7fb,_0x5aa08a,_0x32ec17){const _0x30b06c={_0x19f8e5:0x38,_0x41f6c0:0x7e,_0x4f55a0:0x81},_0xe7951f={_0x3049dd:0x1d9,_0x2e1cb2:0x16e,_0x56a815:0x113},_0x2bf027={_0x4f37ab:0x1d5,_0x5dd7f0:0x15f,_0x208423:0x30b};function _0x3f81e0(_0x1d1a4d,_0x12b80e,_0x181ac8,_0xb3f3ad){return _0x1666c8(_0x1d1a4d-_0x2bf027._0x4f37ab,_0x12b80e-_0x2bf027._0x5dd7f0,_0x1d1a4d,_0xb3f3ad-_0x2bf027._0x208423);}function _0x13e76c(_0x1a4b4b,_0x186290,_0x352bb0,_0x277f48){return _0x4904cb(_0x186290,_0x186290-_0xe7951f._0x3049dd,_0x352bb0- -_0xe7951f._0x2e1cb2,_0x277f48-_0xe7951f._0x56a815);}return{'callId':_0x56d7fb['id'],'toolName':_0x56d7fb['name'],'status':'ok','output':_0x5aa08a['output'],'structured':_0x5aa08a[_0x13e76c(-_0x30b06c._0x19f8e5,-0xaa,-0x94,-0xc5)],..._0x5aa08a[_0x3f81e0(0xd4,_0x30b06c._0x41f6c0,0x3e,0x81)]!==void 0x0?{'content':_0x5aa08a[_0x3f81e0(0x31,0x6f,0x2c,_0x30b06c._0x4f55a0)]}:{},'chunks':_0x32ec17,'meta':createToolMeta()};}function _0x5b65(){const _0xc7a3bf=['ChjVDMLKzxjFCMv0CNK','BMfTzq','B3v0Chv0','ywz0zxjnzxnZywDLqxbWzw5K','ChvZAa','C3rHz2u','C2LNBMfS','Aw5WDxrty2HLBwe','CMvZB2X2zq','AxnbCNjHEq','z2v0vg9VBhm','zMLUywXnzxnZywDL','CMvHC29UAw5Nu3rHCNrLzef0','y29TCgXLDgu','BgLZDa','zxjYB3i','CMvHC29UAw5Nx21LC3nHz2u','Bwv0CMLJCW','CMvZzxrnzxnZywDLCW','yMvMB3jLqxnZAxn0yw50qxbWzw5K','zxHLy3v0zq','BwvZC2fNzq','C2vZC2LVBKLK','CMvNAxn0CNK','y29UDgvUDa','CMvXDwLYzwq','y2HHDe1VzgvS','C2v0vg9WAwm','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','BM93','Dg9VBf9VDxrWDxrFy2H1BMS','Dg9VBf91C2vFzgvSDge','mtCYnfr1vwHdAW','CNvU','B3jKzxi','C3rYAw5N','mtiWmZGZnJbVwgPkEwW','oNjLyxnVBMLUzW','BgLZDfrVB2Xty2HLBwfZ','CMv0DxjU','y29UDgvUDeLUzgv4','AxrLBuLK','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','C2v0q2HHDe1VzgvS','zgvWCW','CMvQzwn0','mZK4oduYmgncDwLXsq','zw5HyMXLza','mtrzq09nuNi','y2f0y2G','yM9VBgvHBG','C2v0u3LZDgvTuhjVBxb0','mJC2mJq1nNLnwMP1Ba','DMfSDwu','DxnHz2u','z2v0q29UDgv4DfDPBMrVD0XPBwL0','oIbLEhbLy3rLzcbZDhjPBMC','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','ndCYmJH5q05eCeC','DhLWzq','DgHPBMTPBMC','vg9VBev4zwn1DgLVBKvYCM9Y','CMvZCg9UC2u','CMfJzq','C3rHDgu','BMv4Da','zxHLy3v0zunHBgXZ','C29YDa','yxnZAxn0yw50twvZC2fNzuLK','Dg9VBf9Yzxn1Bhq','Dg9VBhncEu5HBwu','Bw9KzwXdywXSq291BNq','ywrK','ChjVCgvYDgLLCW','CMvXDwvZDenVDw50','B3v0Chv0rM9YBwf0','Dg90ywXpDxrWDxruB2TLBNm','CMvHC29UAw5Nq29TCgXLDgvKqxq','B2jQzwn0','C2v0','DgHLBG','Aw5WDxq','CNvUvhjHBNnMB3jTzxjZ','Dg9VBf9JywXS','B25vC2vYtwvZC2fNzq','ywz0zxjuDxjUq29TCgXLDgu','zgvSDge','B25fDMvUDa','C29Tzq','z2v0','C3rYzwfT','yxnRvxnLCG','DhvYBKnVBxbSzxrLzef0','yMvMB3jLtw9KzwXszxf1zxn0','zgvZy3jPChrPB24','C3LZDgvTuhjVBxb0','C2vUza','y29UDgv4DfDPBMrVD0XPBwL0','Dg90ywXjBNb1DfrVA2vUCW','CMvHC29UAw5NtwvZC2fNzuLK','Bw9KzwW','Dg9VBf9JB21WBgv0zwq','C3LZDgvT','DhjHBNnMB3jTzxi','C3rYAw5NAwz5','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','x3n5C3rLBvbYB21WDa','DhvYBKLUzgv4','Dg9tDhjPBMC','CMvHC29UAw5Nx2nODw5R','Dg9VBenHBgXdB3vUDa','zMLUywXFBwvZC2fNzq','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','mtm5neXQshrRsq','mJe5BLLOA0XL','CMvJB3jKrxzLBNq','zMLSDgvY','ywXS','Bwv0yq','C2v0u2vZC2LVBKLK','ntq1mZuWofnRywDmvW','C3rYzwfTAw5N','AM9PBG','vw5RBM93BIb0B29SoIa','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','BwvZC2fNzxm','Dg90ywXuB2TLBNm','B2jZzxj2zxi','CMvNAxn0zxi','zg9Uzq','Dw5RBM93BL90B29S','sw52ywXPzcb0B29SigLUChv0igf0ia','C3vTBwfYEuLUzgv4','C2XPy2u','Aw5KzxG','DhvYBI0','Dg9VBfjLC3vSDhm','ywrKrxzLBNrmAxn0zw5LCG','Dg90ywXnB2rLBfrPBwvnCW','DhjPBq','zxH0zw5ZAw9UCW','BgvUz3rO','ywjVCNq','BwfW','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','Bw9KzwXFCMvXDwvZDa','C2vZC2LVBKrPCG','C3rHDhvZ','Dg9VBfj1BNrPBwu','B3v0Chv0vg9Rzw5Z','zw50CMLLCW','DxnLCL9TzxnZywDL','CMfUzg9T','Dg9VBf91C2vFBwvZC2fNzq','oIbLEhbLy3rLzcbUDw1Izxi','C3rYDwn0DxjLza','Dg9VBf9ZDgfYDgvK','zNvUy3rPB24','ChjVDMLKzxi','DhvYBLn0yxj0zwrbDa','mZmZmty2nuT0sgHzBW','zM9YrwfJAa','Dg9VBf91C2vFy2H1BMS','oIbLEhbLy3rLzcbHCNjHEq','y29UDgvUDf9KzwX0yq','C2vZC2LVBI0','BNvTyMvY','ywjVCNrLza','oMfZC2LZDgfUDdO','A2LUza','yMvMB3jLvg9VBev4zwn1DgLVBG','B3v0Chv0sw5KzxG','CMvTB3zLrxzLBNrmAxn0zw5LCG','DhvYBKLK','Dg9VBf9YzwPLy3rLza','CNvUt2jZzxj2zxjZ','ywn0Aw9U','CMvHC29U','Aw5WDxrezwX0yq','C2v0vg9VBhm','Dgv4Da','DhvYBL9JB21WBgv0zq','Bw9KzwXFCMvZCg9UC2u','DxnLCG','CMvXDwvZDa','zgvMyxvSDe1LC3nHz2u'];_0x5b65=function(){return _0xc7a3bf;};return _0x5b65();}function createUnknownToolResult(_0xf9f16c){const _0x44a090={_0x4112b6:0x2f3,_0x4451c0:0x336,_0x3b55d5:0x373,_0x3e1fd7:0x370},_0x476222={_0x699221:0x2d,_0x184f01:0x64d},_0x761cac={_0x338a1d:0x5a,_0x5b833a:0xdf};function _0x2857b8(_0x19def5,_0x1c9627,_0x524e00,_0x277132){return _0x1666c8(_0x19def5-_0x761cac._0x338a1d,_0x1c9627-_0x761cac._0x5b833a,_0x277132,_0x1c9627-0x617);}function _0x37ed9e(_0x58779e,_0x159796,_0x44ac6f,_0x2bebe9){return _0x1666c8(_0x58779e-0x63,_0x159796-_0x476222._0x699221,_0x44ac6f,_0x159796-_0x476222._0x184f01);}return createErrorToolResult(_0xf9f16c,_0x2857b8(_0x44a090._0x4112b6,_0x44a090._0x4451c0,_0x44a090._0x3b55d5,0x30f)+_0xf9f16c['name'],{'error':_0x37ed9e(0x362,0x373,0x35c,_0x44a090._0x3e1fd7)});}function isDispatchDecision(_0x437302){const _0x19e58a={_0x232bfa:0x193,_0x3fd770:0x16c,_0x49887e:0x11a,_0x5dafc8:0x1c0,_0x477204:0x1ce,_0x1d135c:0x1f4},_0x4ba059={_0x25c659:0x3ee,_0x32d58c:0x1cd},_0x3581cc={_0x26612d:0x162,_0x5448dd:0xdf};function _0x44ffb2(_0x3cd39c,_0x3df4fe,_0x1243c2,_0x756d85){return _0x4904cb(_0x1243c2,_0x3df4fe-_0x3581cc._0x26612d,_0x3df4fe-_0x3581cc._0x5448dd,_0x756d85-0xc9);}if(typeof _0x437302!==_0x44ffb2(_0x19e58a._0x232bfa,_0x19e58a._0x3fd770,0x12f,_0x19e58a._0x49887e)||_0x437302===null)return![];function _0x23426b(_0x2791db,_0x355cf8,_0x12d141,_0x2c5200){return _0x4904cb(_0x2c5200,_0x355cf8-0xa8,_0x2791db-_0x4ba059._0x25c659,_0x2c5200-_0x4ba059._0x32d58c);}return _0x437302[_0x44ffb2(0x1d9,0x1ce,0x1f6,0x194)]===_0x44ffb2(0x18f,0x14b,0x19e,0x138)||_0x437302[_0x44ffb2(_0x19e58a._0x5dafc8,_0x19e58a._0x477204,0x21b,_0x19e58a._0x1d135c)]==='run';}function normalizeExecutionError(_0x3c74b6){const _0x34409e={_0x390996:0xf5,_0x33f2e0:0x112,_0x18680a:0x12b,_0x47c7d8:0x14f,_0x231116:0x146,_0x53f95e:0x10f},_0x483482={_0x4bb9c9:0xdd,_0x4d97f7:0x163},_0x3fc378={_0x13e410:0xe9,_0x5a8c0c:0x111,_0x3ea626:0x198};if(_0x3c74b6 instanceof ToolExecutionError)return{'errorMessage':_0x3c74b6[_0x15ae55(-_0x34409e._0x390996,-_0x34409e._0x33f2e0,-_0x34409e._0x18680a,-_0x34409e._0x47c7d8)],'structured':{'error':_0x3c74b6[_0x15ae55(-0xf5,-_0x34409e._0x231116,-_0x34409e._0x53f95e,-0x108)],..._0x3c74b6['structured']}};function _0x15ae55(_0x2a1341,_0x3acf7e,_0x5c286b,_0x720743){return _0x1666c8(_0x2a1341-_0x3fc378._0x13e410,_0x3acf7e-_0x3fc378._0x5a8c0c,_0x3acf7e,_0x2a1341-_0x3fc378._0x3ea626);}function _0x7ba157(_0x786390,_0xf6717a,_0x5f8ef,_0x4b4012){return _0x4904cb(_0x786390,_0xf6717a-0x3b,_0xf6717a- -_0x483482._0x4bb9c9,_0x4b4012-_0x483482._0x4d97f7);}if(_0x3c74b6 instanceof Error)return{'errorMessage':_0x3c74b6['message'],'structured':{'error':_0x3c74b6['message']}};const _0x158e43=String(_0x3c74b6);return{'errorMessage':_0x158e43,'structured':{'error':_0x158e43}};}async function emitEvent(_0x2685fa,_0x3d0c20,_0x13a921){await _0x2685fa?.(_0x3d0c20,_0x13a921);}async function resolveDispatchDecision(_0x2df4be,_0x522bc4,_0x1f2f28){const _0x401d74={_0x284a24:0x32a,_0x2437a0:0x2fa,_0x16c897:0x94,_0x3d4e2d:0xc2,_0x5ee928:0xc6,_0x205634:0xb2,_0x44dc1c:0x2f8,_0x4cb68a:0x30b,_0x21ca9d:0x34b,_0x6077b4:0x26e,_0x14cf9a:0x277,_0x39c1ac:0x12e,_0x5669b0:0xf7,_0x109281:0x13d},_0x349743={_0x429ed5:0x9a,_0x15477f:0x594},_0x14ae16={_0x4e76ca:0x34b,_0x4a3b9d:0x370,_0x54fd9e:0x23,_0x5b873f:0x4d,_0x19bb52:0x92,_0x52bf64:0x314,_0x5a5784:0x344,_0x287da2:0x3,_0x296c44:0x62,_0xd5a6a:0x3},_0x425612={_0x1ec1f3:0x190,_0x5ef1e5:0x1cc,_0x538405:0x244,_0x26e728:0x189,_0x3944f1:0x16a,_0x259202:0x1b2,_0x353737:0x249},_0x538174={_0x46356e:0x17f},_0x3e03a6={_0x1ecf3e:0xa2,_0x85179b:0xd5},_0x375cf9={_0x581512:0x1d9};function _0x2e15de(_0x29a88d,_0x418d5b,_0x4d0f26,_0x586fbd){return _0x1666c8(_0x29a88d-_0x375cf9._0x581512,_0x418d5b-0x1dc,_0x4d0f26,_0x586fbd-0x3be);}if(!_0x2df4be)return{'action':'run'};const _0x4ecd4c=Promise[_0x412098(_0x401d74._0x284a24,0x2c8,_0x401d74._0x2437a0,0x2fc)]()[_0x2e15de(_0x401d74._0x16c897,_0x401d74._0x3d4e2d,_0x401d74._0x5ee928,_0x401d74._0x205634)](()=>_0x2df4be(_0x522bc4,_0x1f2f28));if(!_0x1f2f28[_0x412098(0x31c,0x2eb,_0x401d74._0x44dc1c,_0x401d74._0x4cb68a)]){const _0x56d3ee=await _0x4ecd4c;return isDispatchDecision(_0x56d3ee)?_0x56d3ee:{'action':_0x412098(0x2b9,_0x401d74._0x21ca9d,0x313,0x32f)};}const _0x29be11=new Promise((_0x13888f,_0x463cee)=>{function _0x4a0706(_0x3a9b7c,_0x36d186,_0x2b04b2,_0x976cf5){return _0x2e15de(_0x3a9b7c-_0x3e03a6._0x1ecf3e,_0x36d186-0x173,_0x36d186,_0x2b04b2- -_0x3e03a6._0x85179b);}function _0x253994(_0x359ebc,_0x74a10d,_0xdaf19,_0x14a296){return _0x2e15de(_0x359ebc-0x1d8,_0x74a10d-_0x538174._0x46356e,_0x359ebc,_0xdaf19-0x229);}const _0x4b552e=()=>{_0x1f2f28['signal']?.[_0x5f06f6(-_0x425612._0x1ec1f3,-_0x425612._0x5ef1e5,-0x1fe,-0x1a5)](_0x460171(0x256,_0x425612._0x538405,0x232,0x259),_0x4b552e);function _0x5f06f6(_0x1b83de,_0x2cbcf6,_0x19fc05,_0x340547){return _0x29f5(_0x2cbcf6- -0x2f4,_0x19fc05);}function _0x460171(_0x3584a7,_0x2767cd,_0x241d30,_0x44815d){return _0x29f5(_0x3584a7-0x14c,_0x44815d);}_0x463cee(toAbortError(_0x1f2f28[_0x5f06f6(-_0x425612._0x26e728,-0x1b8,-_0x425612._0x3944f1,-_0x425612._0x259202)]?.[_0x460171(0x279,_0x425612._0x353737,0x2b5,0x289)]));};if(_0x1f2f28[_0x253994(0x34b,0x34a,_0x14ae16._0x4e76ca,0x392)]?.['aborted']){_0x463cee(toAbortError(_0x1f2f28[_0x253994(_0x14ae16._0x4a3b9d,0x323,0x34b,0x319)]['reason']));return;}_0x1f2f28[_0x4a0706(-0x6,_0x14ae16._0x54fd9e,_0x14ae16._0x5b873f,_0x14ae16._0x19bb52)]?.[_0x253994(0x303,0x2c6,_0x14ae16._0x52bf64,_0x14ae16._0x5a5784)](_0x4a0706(-_0x14ae16._0x287da2,_0x14ae16._0x296c44,0x1b,-_0x14ae16._0xd5a6a),_0x4b552e,{'once':!![]});}),_0x1a973c=await Promise[_0x412098(0x26d,_0x401d74._0x6077b4,_0x401d74._0x14cf9a,0x268)]([_0x4ecd4c,_0x29be11]);function _0x412098(_0x19bd6e,_0x433d4c,_0x5e6e24,_0x3f1a3d){return _0x1666c8(_0x19bd6e-0x1ea,_0x433d4c-_0x349743._0x429ed5,_0x3f1a3d,_0x5e6e24-_0x349743._0x15477f);}return isDispatchDecision(_0x1a973c)?_0x1a973c:{'action':_0x2e15de(_0x401d74._0x39c1ac,_0x401d74._0x5669b0,0x153,_0x401d74._0x109281)};}async function executeToolCall(_0x2ba1f2,_0xcca2fa,_0x15db48,_0x1bc9fd,_0x7c7e98){const _0x519a19={_0x59a888:0x2b5,_0x32b5a0:0x2aa,_0x4b80d4:0x24c,_0x5de377:0x25c,_0xe27e47:0x1bc,_0x2977f7:0x1de,_0x59b66c:0x204,_0x273eb3:0x1e2,_0x16dd90:0x229,_0x2c86f6:0x226,_0x5ee2e6:0x280,_0x5ed5b5:0x2a8,_0x5a925b:0x298,_0x4f025c:0x309,_0x18c502:0x33c,_0x5e6c77:0x2a5,_0x19f1ba:0x29a,_0x41dde0:0x253,_0x167bc9:0x238,_0x210b3a:0x2df,_0x5d7c50:0x2e1,_0x52965a:0x303,_0x4c5dfc:0x1dc,_0x509eae:0x311,_0xd3d0be:0x2ba,_0x102880:0x303,_0x38c982:0x30c,_0x199bfa:0x284,_0x1433a5:0x28d,_0xaba298:0x2ed,_0x58939d:0x2c1,_0x17a3b2:0x166,_0x594677:0x301,_0x6eaafa:0x246,_0x5214c9:0x250,_0x1708b1:0x279,_0x5a2d55:0x270,_0x4aad40:0x29c,_0x337be9:0x284,_0x9ad9e:0x269,_0x39b32d:0x2cd,_0x5010ba:0x346,_0x470b81:0x287,_0x4b44cf:0x2a6,_0x1e62ae:0x278,_0x2b8ff1:0x28e,_0x6df945:0x248,_0x5b12c6:0x1d3,_0x3c2f7c:0x1dd,_0xcb190f:0x234,_0x20ca82:0x2f4,_0x4ba886:0x28d,_0x262f97:0x1e8,_0x3ed718:0x1e0},_0x1ac61d={_0x1f5d3c:0xed,_0x59d6a7:0x9d,_0xa7d7c8:0x20a,_0x4f9cb4:0x1fc},_0x401652={_0x297339:0x5d,_0x137c50:0x79,_0x1a4a77:0x113},_0x4fe2d9={_0x5b8b27:0xd4,_0x32ec6f:0x59f},_0xcca64b={_0x5f235a:0x1f2},_0xae2b2a={..._0x15db48,'toolCallId':_0xcca2fa['id']};throwIfAborted(_0xae2b2a[_0x40affd(0x322,_0x519a19._0x59a888,0x303,_0x519a19._0x32b5a0)]);let _0x20d58c;try{_0x20d58c=await resolveDispatchDecision(_0x1bc9fd,_0xcca2fa,_0xae2b2a);}catch(_0x42228c){if(isAbortError(_0x42228c)){const _0x17f5e9=createAbortedToolResult(_0xcca2fa,_0x42228c);return await emitEvent(_0x7c7e98,{'type':_0x40affd(0x2aa,_0x519a19._0x4b80d4,0x2a8,_0x519a19._0x5de377),'toolCall':_0xcca2fa,'result':_0x17f5e9},_0xae2b2a),_0x17f5e9;}const {errorMessage:_0x16af0c,structured:_0x2a4122}=normalizeExecutionError(_0x42228c),_0x40c4e5=createErrorToolResult(_0xcca2fa,_0x16af0c,_0x2a4122);return await emitEvent(_0x7c7e98,{'type':_0x1efe29(0x1d2,0x1dd,0x209,_0x519a19._0xe27e47),'toolCall':_0xcca2fa,'result':_0x40c4e5},_0xae2b2a),_0x40c4e5;}throwIfAborted(_0xae2b2a[_0x1efe29(0x22c,0x238,_0x519a19._0x2977f7,_0x519a19._0x59b66c)]);function _0x1efe29(_0x1aec12,_0x3c2587,_0x198836,_0xbe3257){return _0x1666c8(_0x1aec12-_0xcca64b._0x5f235a,_0x3c2587-0x118,_0xbe3257,_0x3c2587-0x4d4);}function _0x40affd(_0x47d095,_0x361a12,_0x22dae3,_0xe04fc6){return _0x1666c8(_0x47d095-_0x4fe2d9._0x5b8b27,_0x361a12-0x139,_0x47d095,_0x22dae3-_0x4fe2d9._0x32ec6f);}if(_0x20d58c[_0x1efe29(0x240,0x228,_0x519a19._0x273eb3,0x1dd)]==='reject'){const _0x6dd143=createRejectedToolResult(_0xcca2fa,_0x20d58c[_0x1efe29(0x1e1,_0x519a19._0x16dd90,0x205,0x1fc)]);return await emitEvent(_0x7c7e98,{'type':_0x1efe29(0x225,_0x519a19._0x2c86f6,_0x519a19._0x5ee2e6,0x205),'toolCall':_0xcca2fa,'result':_0x6dd143},_0xae2b2a),_0x6dd143;}const _0x3031af=_0x2ba1f2[_0x40affd(_0x519a19._0x5ed5b5,0x26b,0x29c,_0x519a19._0x5a925b)](_0xcca2fa[_0x40affd(_0x519a19._0x4f025c,0x33a,0x2fe,_0x519a19._0x18c502)]);if(!_0x3031af){const _0x26599b=createUnknownToolResult(_0xcca2fa);return await emitEvent(_0x7c7e98,{'type':_0x40affd(_0x519a19._0x5e6c77,_0x519a19._0x19f1ba,0x2a8,_0x519a19._0x41dde0),'toolCall':_0xcca2fa,'result':_0x26599b},_0xae2b2a),_0x26599b;}throwIfAborted(_0xae2b2a[_0x1efe29(0x266,_0x519a19._0x167bc9,0x208,0x22d)]),await emitEvent(_0x7c7e98,{'type':_0x40affd(0x293,0x2ab,_0x519a19._0x210b3a,0x308),'toolCall':_0xcca2fa},_0xae2b2a);try{throwIfAborted(_0xae2b2a[_0x40affd(0x336,_0x519a19._0x5d7c50,_0x519a19._0x52965a,0x2ba)]);const _0x51c511=validateToolInput(_0xcca2fa[_0x1efe29(0x173,0x1c9,_0x519a19._0x4c5dfc,0x222)],_0x3031af['inputSchema']),_0x56efa4=await _0x3031af[_0x40affd(0x307,0x2e3,_0x519a19._0x509eae,0x2e0)](_0x51c511,_0xae2b2a),_0x219e3a=[],_0x42410a=addAbortListener(_0xae2b2a[_0x40affd(0x2f8,_0x519a19._0xd3d0be,_0x519a19._0x102880,_0x519a19._0x38c982)],()=>{const _0x8b4c89={_0x358194:0x19e,_0x4cfcf0:0x23c,_0x399d95:0x12c};function _0x465338(_0x47b3a8,_0x320432,_0x5788da,_0x1e54be){return _0x40affd(_0x5788da,_0x320432-_0x8b4c89._0x358194,_0x1e54be- -_0x8b4c89._0x4cfcf0,_0x1e54be-_0x8b4c89._0x399d95);}function _0x30b764(_0xcc502,_0x34e664,_0xcc7dd7,_0xcb446e){return _0x40affd(_0xcc7dd7,_0x34e664-_0x401652._0x297339,_0x34e664- -_0x401652._0x137c50,_0xcb446e-_0x401652._0x1a4a77);}void _0x56efa4[_0x465338(_0x1ac61d._0x1f5d3c,_0x1ac61d._0x59d6a7,0xf4,0xe8)](void 0x0)[_0x30b764(_0x1ac61d._0xa7d7c8,0x1fb,_0x1ac61d._0x4f9cb4,0x1cb)](()=>{});});try{throwIfAborted(_0xae2b2a[_0x40affd(0x35e,0x31d,_0x519a19._0x52965a,0x309)]);let _0x5ccf93=await _0x56efa4[_0x40affd(0x282,0x24a,_0x519a19._0x199bfa,_0x519a19._0x1433a5)]();while(!_0x5ccf93['done']){throwIfAborted(_0xae2b2a[_0x40affd(_0x519a19._0xaba298,0x2df,_0x519a19._0x102880,_0x519a19._0x58939d)]);const _0x8d3b3d=normalizeToolOutputValue(_0x5ccf93[_0x1efe29(0x16a,0x1ad,0x1a8,_0x519a19._0x17a3b2)]);_0x219e3a[_0x40affd(0x33b,0x2fe,_0x519a19._0x594677,0x313)](_0x8d3b3d),await emitEvent(_0x7c7e98,{'type':_0x1efe29(_0x519a19._0x6eaafa,_0x519a19._0x5214c9,0x292,0x234),'toolCall':_0xcca2fa,'chunk':_0x8d3b3d},_0xae2b2a),throwIfAborted(_0xae2b2a[_0x1efe29(0x209,_0x519a19._0x167bc9,_0x519a19._0x1708b1,_0x519a19._0x5a2d55)]),_0x5ccf93=await _0x56efa4[_0x40affd(0x2cc,_0x519a19._0x4aad40,_0x519a19._0x337be9,_0x519a19._0x9ad9e)]();}throwIfAborted(_0xae2b2a[_0x40affd(_0x519a19._0x39b32d,_0x519a19._0x5010ba,0x303,0x342)]);const _0x2e1e2d=_0x5ccf93[_0x40affd(_0x519a19._0x470b81,_0x519a19._0x4b44cf,_0x519a19._0x1e62ae,_0x519a19._0x2b8ff1)]===void 0x0?deriveFinalToolOutput(_0x219e3a):normalizeToolOutputValue(_0x5ccf93[_0x40affd(0x29b,_0x519a19._0x6df945,0x278,0x26e)]),_0x314b49=createSuccessToolResult(_0xcca2fa,_0x2e1e2d,_0x219e3a);return await emitEvent(_0x7c7e98,{'type':_0x1efe29(_0x519a19._0x5b12c6,_0x519a19._0x3c2f7c,0x219,_0x519a19._0xcb190f),'toolCall':_0xcca2fa,'result':_0x314b49},_0xae2b2a),_0x314b49;}catch(_0x3bf133){if(isAbortError(_0x3bf133)){const _0x30aace=createAbortedToolResult(_0xcca2fa,_0x3bf133,_0x219e3a);return await emitEvent(_0x7c7e98,{'type':'tool_completed','toolCall':_0xcca2fa,'result':_0x30aace},_0xae2b2a),_0x30aace;}const {errorMessage:_0x4132df,structured:_0x512446}=normalizeExecutionError(_0x3bf133),_0x1f77cc=createErrorToolResult(_0xcca2fa,_0x4132df,_0x512446,_0x219e3a);return await emitEvent(_0x7c7e98,{'type':_0x40affd(_0x519a19._0x20ca82,0x2fc,0x2a8,_0x519a19._0x4ba886),'toolCall':_0xcca2fa,'result':_0x1f77cc},_0xae2b2a),_0x1f77cc;}finally{_0x42410a();}}catch(_0x4c58fb){if(isAbortError(_0x4c58fb)){const _0x396ade=createAbortedToolResult(_0xcca2fa,_0x4c58fb);return await emitEvent(_0x7c7e98,{'type':_0x40affd(0x2bc,0x2d7,_0x519a19._0x5ed5b5,_0x519a19._0x5e6c77),'toolCall':_0xcca2fa,'result':_0x396ade},_0xae2b2a),_0x396ade;}const {errorMessage:_0x29f9f1,structured:_0x449f59}=normalizeExecutionError(_0x4c58fb),_0x531af3=createErrorToolResult(_0xcca2fa,_0x29f9f1,_0x449f59);return await emitEvent(_0x7c7e98,{'type':_0x1efe29(_0x519a19._0x262f97,0x1dd,0x1fe,_0x519a19._0x3ed718),'toolCall':_0xcca2fa,'result':_0x531af3},_0xae2b2a),_0x531af3;}}function createInternalToolRuntime(_0x5c2faa=[],_0x1eb920={}){const _0x2beeaf={_0x2ec208:0x1b3,_0x303db2:0x1ba,_0xe41e77:0x1cc},_0xb4c8ec={_0x5ca697:0x271,_0x421ac2:0x24d,_0x65bd59:0x235},_0x160eed={_0x3ce2ca:0x22d,_0x3ec928:0x1e9},_0x1705cd={_0x4a518c:0xe4,_0x1e75ea:0x165},_0x2457a5={_0x208fe7:0x27a};let _0x9b0e35=new ToolRegistry(_0x5c2faa);return{'listToolSchemas'(){function _0x5dcebc(_0x2e5ea2,_0x1fecbb,_0x22889e,_0x40c3b0){return _0x29f5(_0x2e5ea2- -_0x2457a5._0x208fe7,_0x22889e);}return _0x9b0e35[_0x5dcebc(-0x11e,-_0x1705cd._0x4a518c,-_0x1705cd._0x1e75ea,-0x134)]();},'setTools'(_0x36b115){_0x9b0e35=new ToolRegistry(_0x36b115);},async 'executeCalls'(_0x5808b3,_0x565e9c){const _0x288ce3={_0x1c5ed1:0x8f};function _0x2146b6(_0x5c9c44,_0x23e48d,_0x5038c3,_0x5a7cfc){return _0x29f5(_0x5038c3- -0x2de,_0x23e48d);}function _0xf3ea60(_0x55cdfa,_0x214337,_0x176042,_0x5bed80){return _0x29f5(_0x55cdfa-0x142,_0x176042);}return await Promise[_0xf3ea60(0x233,_0xb4c8ec._0x5ca697,0x21a,0x290)](_0x5808b3[_0xf3ea60(_0xb4c8ec._0x421ac2,0x226,_0xb4c8ec._0x65bd59,0x25f)](async _0x48af67=>{function _0x477d1c(_0x31be84,_0x2dd91d,_0x1ee1d9,_0x3dbc07){return _0x2146b6(_0x31be84-_0x288ce3._0x1c5ed1,_0x31be84,_0x3dbc07-0x3f9,_0x3dbc07-0x1e3);}return await executeToolCall(_0x9b0e35,_0x48af67,_0x565e9c,_0x1eb920['onToolCall'],_0x1eb920[_0x477d1c(_0x160eed._0x3ce2ca,_0x160eed._0x3ec928,0x243,0x1ee)]);}));},async 'execute'(_0x410ab6,_0x17fe73){function _0x5e45cc(_0xbe609,_0x5e1d7a,_0x1e8f72,_0x2cd267){return _0x29f5(_0x2cd267-0xf5,_0xbe609);}const [_0xfc7cef]=await this[_0x5e45cc(_0x2beeaf._0x2ec208,_0x2beeaf._0x303db2,_0x2beeaf._0xe41e77,_0x2beeaf._0x2ec208)]([_0x410ab6],_0x17fe73);return _0xfc7cef;}};}function getOrderedObserverExtensions(_0x3ddd58,_0x24c7a6){const _0x490cc8={_0x20dce7:0x7f,_0x5a01d1:0x9b,_0x36d106:0x2dc},_0x2e6234={_0x5b4699:0x102,_0x5c1711:0x136,_0xad7fe9:0x106,_0x4adf1e:0x172,_0x2c4229:0x160,_0x377478:0x13d,_0x49b929:0x156},_0x378ae6={_0x51e936:0x346},_0xa5424d={_0x20625e:0xb3};function _0x6635df(_0x4b07d2,_0xf1d659,_0x46d0f2,_0x17d858){return _0x4904cb(_0xf1d659,_0xf1d659-_0xa5424d._0x20625e,_0x46d0f2-0x25a,_0x17d858-0xcc);}function _0x58ff72(_0x4207a0,_0x55d077,_0x19c3ac,_0x15881a){return _0x1666c8(_0x4207a0-0x175,_0x55d077-0x15f,_0x4207a0,_0x15881a-_0x378ae6._0x51e936);}return _0x3ddd58[_0x58ff72(_0x490cc8._0x20dce7,_0x490cc8._0x5a01d1,0x35,0x5e)](_0x1675cb=>{const _0x1b253b={_0xcf086a:0x115,_0x2e14a6:0x60,_0x36b554:0x21b};function _0x32d1e8(_0x32ae83,_0x18e18d,_0x5b6612,_0xe6a299){return _0x58ff72(_0xe6a299,_0x18e18d-_0x1b253b._0xcf086a,_0x5b6612-_0x1b253b._0x2e14a6,_0x32ae83- -_0x1b253b._0x36b554);}function _0x47b799(_0x42c563,_0x3dfe17,_0x12ac0e,_0x1c9276){return _0x58ff72(_0x42c563,_0x3dfe17-0x1df,_0x12ac0e-0x86,_0x1c9276-0xed);}return _0x1675cb[_0x47b799(_0x2e6234._0x5b4699,_0x2e6234._0x5c1711,0x11b,_0x2e6234._0xad7fe9)]!==![]&&_0x1675cb[_0x32d1e8(-_0x2e6234._0x4adf1e,-0x1a4,-0x1c9,-_0x2e6234._0x2c4229)]===_0x24c7a6&&_0x1675cb['kind']===_0x47b799(0x174,0x18c,_0x2e6234._0x377478,_0x2e6234._0x49b929);})[_0x6635df(0x2b4,0x2e6,_0x490cc8._0x36d106,0x30d)]((_0x28a496,_0x4dcdc3)=>_0x28a496[_0x6635df(0x349,0x33c,0x375,0x340)]-_0x4dcdc3[_0x6635df(0x361,0x326,0x375,0x357)]);}function getOrderedTransformerExtensions(_0x5a5b95,_0x5b27f3){const _0x20508f={_0x16434e:0xeb,_0xfb8548:0x106,_0x211f17:0xb0,_0x2f4af2:0x1c7,_0x20e119:0x173},_0x5b5507={_0x168ddb:0x381,_0x550b62:0x350,_0x3ac10c:0x458,_0x44d75c:0x407,_0x5e208f:0x1c1,_0x3bc3b0:0x1d0,_0x2d062a:0x1ba},_0x2c15c3={_0x3fa183:0x4ca};function _0x199b29(_0x31d969,_0x4d7c30,_0x1a4cb3,_0x1674b9){return _0x4904cb(_0x4d7c30,_0x4d7c30-0x1de,_0x31d969- -0x249,_0x1674b9-0x9f);}function _0x3d77f3(_0x110fe5,_0x394b2a,_0x1654fa,_0x376481){return _0x1666c8(_0x110fe5-0x27,_0x394b2a-0x60,_0x1654fa,_0x394b2a-0x1e2);}return _0x5a5b95[_0x3d77f3(-_0x20508f._0x16434e,-_0x20508f._0xfb8548,-_0x20508f._0x211f17,-0x10e)](_0x4db018=>{const _0x1a9de0={_0x49ef42:0x6c,_0x3de444:0x1bd};function _0x5b1ce7(_0x503098,_0x114c96,_0x339623,_0x274b26){return _0x3d77f3(_0x503098-0x4a,_0x274b26-_0x2c15c3._0x3fa183,_0x114c96,_0x274b26-0x11f);}function _0x3e734c(_0x3866a4,_0x20e4f0,_0x27f313,_0x6f06e5){return _0x3d77f3(_0x3866a4-_0x1a9de0._0x49ef42,_0x3866a4-0x2cd,_0x6f06e5,_0x6f06e5-_0x1a9de0._0x3de444);}return _0x4db018[_0x5b1ce7(_0x5b5507._0x168ddb,0x37f,_0x5b5507._0x550b62,0x37f)]!==![]&&_0x4db018[_0x5b1ce7(_0x5b5507._0x3ac10c,0x436,_0x5b5507._0x44d75c,0x40f)]===_0x5b27f3&&_0x4db018[_0x3e734c(0x1fc,_0x5b5507._0x5e208f,0x23f,_0x5b5507._0x3bc3b0)]===_0x3e734c(_0x5b5507._0x2d062a,0x1b5,0x1e8,0x1fe);})[_0x199b29(-_0x20508f._0x2f4af2,-_0x20508f._0x20e119,-0x1d9,-0x1b7)]((_0x8dd9f3,_0x172b78)=>_0x8dd9f3[_0x199b29(-0x12e,-0x10d,-0xec,-0xd5)]-_0x172b78[_0x3d77f3(-0x73,-0x9e,-0x6d,-0xa5)]);}function createExtensionRegistry(){const _0x2e7e68={_0x3e482e:0x44d,_0x40488a:0x4aa,_0x2e21e3:0x4a8},_0x55200b={_0x545678:0x2f6},_0xf54ca1={_0x56a830:0x492},_0x1beaa6={_0x83f27:0x31d},_0x4f707c={_0x174ede:0x4df,_0x4de51e:0x4c8},_0x4f666=[];return{'register'(_0x3555aa){const _0x29825a={_0x29b602:0x3d6};function _0x17eb51(_0x5da1cb,_0x48ee1a,_0xc75903,_0xf0fda3){return _0x29f5(_0xc75903-_0x29825a._0x29b602,_0x5da1cb);}_0x4f666[_0x17eb51(0x4fc,_0x4f707c._0x174ede,0x510,_0x4f707c._0x4de51e)](_0x3555aa);},async 'runTransformers'(_0x21b570,_0x579443,_0x37163e){function _0x10f415(_0x305bb6,_0x40dc3b,_0x551286,_0x4bc1ea){return _0x29f5(_0x40dc3b-_0x1beaa6._0x83f27,_0x4bc1ea);}let _0x163ee2=_0x579443;for(const _0x42de5e of getOrderedTransformerExtensions(_0x4f666,_0x21b570)){_0x163ee2=await _0x42de5e[_0x10f415(_0xf54ca1._0x56a830,0x474,0x4cf,0x45c)](_0x163ee2,_0x37163e);}return _0x163ee2;},async 'runObservers'(_0x1f89ae,_0x1b1ab3,_0x49f86d){function _0x3e1244(_0x1607ac,_0x9ed534,_0x2b29ff,_0x39d100){return _0x29f5(_0x1607ac-_0x55200b._0x545678,_0x2b29ff);}for(const _0x40a8d3 of getOrderedObserverExtensions(_0x4f666,_0x1f89ae)){await _0x40a8d3[_0x3e1244(_0x2e7e68._0x3e482e,_0x2e7e68._0x40488a,0x486,_0x2e7e68._0x2e21e3)](_0x1b1ab3,_0x49f86d);}}};}function createEmptySnapshot(){return{'totalTokens':0x0,'totalInputTokens':0x0,'totalOutputTokens':0x0,'totalReasoningTokens':0x0,'requestCount':0x0,'modelCallCount':0x0,'toolCallCount':0x0,'totalModelTimeMs':0x0,'currentTokens':0x0,'currentInputTokens':0x0,'currentOutputTokens':0x0,'currentReasoningTokens':0x0,'currentModelTimeMs':0x0};}function createAgentMetrics(_0x12eac0={}){const _0x171521={_0x1bc712:0x4ad,_0x39c33a:0x48a},_0x54df9f={_0x4a7e00:0x394},_0x5a5afc={_0x48ebac:0x345,_0x40eaeb:0xf7,_0x2c37d0:0x106,_0xa9b53f:0x366,_0x41d8e7:0x11,_0x264d0a:0x6a,_0x1dd9a8:0x7f,_0xae36eb:0x9e,_0x5ad7d0:0x11a,_0x14d02d:0x31a,_0x4be89f:0x309,_0x15b9f7:0x2e6,_0x54ca7f:0x9a,_0x50d014:0x65,_0x568deb:0x31a,_0x5bca70:0x375,_0x5c3ac5:0xa7,_0x78bb14:0x1b,_0x37d390:0x34,_0x5d5849:0x39d,_0x5d0fe7:0x365,_0x164697:0x124,_0x385ac2:0xbf,_0x246125:0x154,_0x2671b1:0x3a7,_0x161525:0x33c,_0xd5787a:0x33e,_0x5665c3:0xa2,_0x4f4756:0x381,_0x539d6a:0x342,_0x3e9f03:0xeb,_0x533815:0xa3,_0x872fce:0x90,_0x31f9d1:0x8a,_0x19da2d:0x380,_0x392e63:0x33d,_0x1c1268:0x327,_0x20dc8b:0xbd,_0x383e80:0x8b,_0x34ca0d:0xc3,_0x1a5fcd:0x342,_0x36344e:0x32f,_0x37cde1:0x354,_0x578e7f:0x2ea,_0x504508:0x30e,_0x3fc094:0x311,_0x135cba:0x391,_0x3236f7:0x359};let _0x328fb6=createEmptySnapshot();const _0x23389c=new Set();let _0x56a01d;const _0x1e7cef=()=>{const _0x24c32f={..._0x328fb6};for(const _0x4dd4e3 of _0x23389c)_0x4dd4e3(_0x24c32f);};return{'getSnapshot'(){return{..._0x328fb6};},'recordEvent'(_0x5995e5){function _0x1b848e(_0x49d0b7,_0x4f4d09,_0x4d7b59,_0x5be434){return _0x29f5(_0x4d7b59- -0x4d,_0x5be434);}if(_0x5995e5['type']===_0x50b0f4(0x313,0x36d,_0x5a5afc._0x48ebac,0x3a8)){_0x56a01d=Date[_0x1b848e(_0x5a5afc._0x40eaeb,0x15f,_0x5a5afc._0x2c37d0,0x150)]();const _0x3db382=_0x12eac0[_0x50b0f4(0x316,0x313,_0x5a5afc._0xa9b53f,0x2e1)]?.(_0x5995e5[_0x1b848e(0x10e,0xfb,0xe7,0x12e)]);_0x3db382!==void 0x0&&(_0x328fb6={..._0x328fb6,'contextWindowLimit':_0x3db382},_0x1e7cef());return;}function _0x50b0f4(_0x4e0efa,_0x5b8447,_0xe2c925,_0x248596){return _0x29f5(_0x5b8447-0x260,_0x4e0efa);}if(_0x5995e5[_0x1b848e(0x42,_0x5a5afc._0x41d8e7,_0x5a5afc._0x264d0a,_0x5a5afc._0x1dd9a8)]===_0x1b848e(_0x5a5afc._0xae36eb,0x13f,0xe5,_0x5a5afc._0x5ad7d0)){const _0x1063ad=_0x5995e5[_0x50b0f4(0x30e,_0x5a5afc._0x14d02d,_0x5a5afc._0x4be89f,_0x5a5afc._0x15b9f7)][_0x1b848e(_0x5a5afc._0x54ca7f,0x47,_0x5a5afc._0x50d014,0x96)]['inputTokens'],_0x21ed63=_0x5995e5[_0x50b0f4(0x33d,_0x5a5afc._0x568deb,0x369,_0x5a5afc._0x5bca70)][_0x1b848e(_0x5a5afc._0x5c3ac5,_0x5a5afc._0x78bb14,0x65,_0x5a5afc._0x37d390)][_0x50b0f4(_0x5a5afc._0x5d5849,0x371,0x362,0x3b1)],_0x382c57=_0x5995e5[_0x50b0f4(0x35e,0x31a,0x34e,0x33c)][_0x50b0f4(_0x5a5afc._0x5d0fe7,0x312,0x33c,0x2e1)]['reasoningTokens']??0x0,_0x1a8395=_0x1063ad+_0x21ed63,_0x3631c5=_0x56a01d===void 0x0?0x0:Date[_0x1b848e(_0x5a5afc._0x164697,_0x5a5afc._0x385ac2,0x106,_0x5a5afc._0x246125)]()-_0x56a01d;_0x56a01d=void 0x0,_0x328fb6={..._0x328fb6,'totalTokens':_0x328fb6[_0x50b0f4(0x30d,0x35a,_0x5a5afc._0x2671b1,0x35e)]+_0x1a8395,'totalInputTokens':_0x328fb6[_0x50b0f4(_0x5a5afc._0x161525,_0x5a5afc._0xd5787a,0x324,0x346)]+_0x1063ad,'totalOutputTokens':_0x328fb6[_0x1b848e(0xab,0xd7,0x7b,_0x5a5afc._0x5665c3)]+_0x21ed63,'totalReasoningTokens':_0x328fb6['totalReasoningTokens']+_0x382c57,'modelCallCount':_0x328fb6[_0x50b0f4(_0x5a5afc._0x4f4756,0x323,_0x5a5afc._0x539d6a,0x349)]+0x1,'totalModelTimeMs':_0x328fb6[_0x1b848e(0x99,0xc1,0xb9,_0x5a5afc._0x3e9f03)]+_0x3631c5,'currentTokens':_0x1a8395,'currentInputTokens':_0x1063ad,'currentOutputTokens':_0x21ed63,'currentReasoningTokens':_0x382c57,'currentModelTimeMs':_0x3631c5,..._0x328fb6[_0x1b848e(_0x5a5afc._0x533815,0x79,_0x5a5afc._0x872fce,_0x5a5afc._0x31f9d1)]&&_0x1a8395>0x0?{'contextWindowUsage':_0x1a8395/_0x328fb6[_0x50b0f4(_0x5a5afc._0x19da2d,_0x5a5afc._0x392e63,_0x5a5afc._0x1c1268,0x335)]}:{}},_0x1e7cef();return;}if(_0x5995e5[_0x1b848e(_0x5a5afc._0x20dc8b,_0x5a5afc._0x383e80,_0x5a5afc._0x264d0a,_0x5a5afc._0x34ca0d)]===_0x50b0f4(_0x5a5afc._0x1a5fcd,_0x5a5afc._0x36344e,_0x5a5afc._0x37cde1,_0x5a5afc._0x578e7f)){_0x328fb6={..._0x328fb6,'toolCallCount':_0x328fb6[_0x50b0f4(0x333,0x34a,_0x5a5afc._0x504508,_0x5a5afc._0x3fc094)]+0x1},_0x1e7cef();return;}_0x5995e5['type']===_0x50b0f4(0x36e,_0x5a5afc._0x135cba,0x385,0x374)&&(_0x328fb6={..._0x328fb6,'requestCount':_0x328fb6[_0x50b0f4(0x35e,0x326,0x367,_0x5a5afc._0x3236f7)]+0x1},_0x1e7cef());},'reset'(){_0x328fb6=createEmptySnapshot(),_0x56a01d=void 0x0,_0x1e7cef();},'subscribe'(_0x53578f){_0x23389c[_0x419026(_0x171521._0x1bc712,0x409,_0x171521._0x39c33a,0x458)](_0x53578f);function _0x419026(_0x305643,_0x4497d6,_0x5977c7,_0x5f01d8){return _0x29f5(_0x5f01d8-_0x54df9f._0x4a7e00,_0x305643);}return()=>{_0x23389c['delete'](_0x53578f);};}};}function makeExtensionContext(_0x392d3c){return{'state':_0x392d3c};}async function runStage(_0x18e3f0,_0x4bac88,_0x4f5e28,_0x4da02b){const _0x7d1b8a={_0x280fe9:0x154},_0x2277fe={_0x4777bf:0x69};function _0x53b2dd(_0x6541a2,_0xcc8744,_0xe3cda6,_0x3f4ec0){return _0x1666c8(_0x6541a2-0x1ee,_0xcc8744-_0x2277fe._0x4777bf,_0x3f4ec0,_0x6541a2-0x457);}const _0x4fa54a=await _0x18e3f0[_0x53b2dd(0x14d,_0x7d1b8a._0x280fe9,0xf4,0x115)](_0x4bac88,_0x4f5e28,_0x4da02b);return await _0x18e3f0['runObservers'](_0x4bac88,_0x4fa54a,_0x4da02b),_0x4fa54a;}async function emitEvent2(_0x434245,_0x40cbc1,_0x140669){await _0x434245?.(_0x40cbc1,_0x140669);}function replaceToolUseBlocks(_0x52e343,_0x13e4fd){const _0x15059b={_0x18af0f:0x23f,_0x71355f:0x235,_0x4bf316:0x295,_0x40b56a:0x28d},_0x3f2070={_0x1c4db9:0x5f,_0x42dfd4:0x26,_0x40dd5b:0x9},_0x40efc6={_0x523571:0x7a,_0x330836:0x1ed,_0x4b5c30:0x180},_0x40825d={_0x385d35:0xeb,_0x313a95:0x135},_0x5dcd78={_0xf6ea5:0xe3,_0x196ce9:0xde,_0x4b486d:0x38};function _0x2cae50(_0x2c673c,_0x423fd0,_0xee881,_0x40ac97){return _0x1666c8(_0x2c673c-_0x5dcd78._0xf6ea5,_0x423fd0-_0x5dcd78._0x196ce9,_0x2c673c,_0xee881-_0x5dcd78._0x4b486d);}let _0x2b4ce0=0x0;function _0x47f26c(_0x52a7be,_0xe28300,_0x2b8839,_0x2cad03){return _0x4904cb(_0x2b8839,_0xe28300-_0x40825d._0x385d35,_0xe28300-0x199,_0x2cad03-_0x40825d._0x313a95);}return{..._0x52e343,'content':_0x52e343[_0x2cae50(-_0x15059b._0x18af0f,-0x272,-0x252,-_0x15059b._0x71355f)][_0x2cae50(-0x2a2,-0x2c9,-_0x15059b._0x4bf316,-_0x15059b._0x40b56a)](_0x5631a5=>{if(_0x5631a5[_0x1557ec(_0x3f2070._0x1c4db9,0x80,_0x3f2070._0x42dfd4,-_0x3f2070._0x40dd5b)]!=='tool_use')return _0x5631a5;const _0xe1ef53=_0x13e4fd[_0x2b4ce0];_0x2b4ce0+=0x1;function _0x1557ec(_0x2acd34,_0x458482,_0x35a9b4,_0x2b67fc){return _0x47f26c(_0x2acd34-_0x40efc6._0x523571,_0x35a9b4- -_0x40efc6._0x330836,_0x2b67fc,_0x2b67fc-_0x40efc6._0x4b5c30);}return structuredClone(_0xe1ef53);})};}function createAssistantMessageId(_0x3df38a,_0xfa443d){const _0x57c126={_0x4f85a5:0x1cb,_0x463c23:0x18b},_0x3928cc={_0x24c97f:0x129};function _0x2e4765(_0x2d33e0,_0x727b5a,_0x36a60c,_0x3adc67){return _0x1666c8(_0x2d33e0-0x28,_0x727b5a-0x32,_0x727b5a,_0x36a60c-_0x3928cc._0x24c97f);}return _0x3df38a+_0x2e4765(-0x1c3,-_0x57c126._0x4f85a5,-_0x57c126._0x463c23,-0x167)+_0xfa443d;}function createReasoningMessageId(_0x3ace82){const _0x15c54d={_0x5a4f27:0x433,_0x10d831:0x431},_0x4e2057={_0xe3c069:0x13c,_0x2d4efd:0x1e0};function _0x16d1a9(_0x35c8bd,_0x58e240,_0x9ebe5b,_0x34e7b3){return _0x1666c8(_0x35c8bd-_0x4e2057._0xe3c069,_0x58e240-_0x4e2057._0x2d4efd,_0x58e240,_0x9ebe5b-0x6fa);}return _0x3ace82+_0x16d1a9(_0x15c54d._0x5a4f27,0x42f,0x47d,_0x15c54d._0x10d831);}function withMessageId(_0x226d07,_0x48ca14){if(_0x226d07['id']===_0x48ca14)return _0x226d07;return{..._0x226d07,'id':_0x48ca14};}function createAssistantChunkEvent(_0x5bdec6,_0x4cb39a){const _0x280ba0={_0x2683cb:0x1a0,_0x225a2f:0x198,_0x1176de:0x1ea,_0xe76cff:0x49d,_0xcdc19b:0x4ab,_0x439446:0x4da,_0x7243ec:0x49a,_0x470247:0x193,_0x56ea93:0x169,_0x387650:0x18b,_0x353b6b:0x12f,_0x4e79c4:0x18f,_0x25c326:0x151,_0x3499aa:0x172,_0x6bf841:0x166},_0x5b247c={_0x11e897:0x16},_0x1682df={_0x3298e2:0x177,_0x1759d6:0x250};if(_0x5bdec6[_0x533c26(-_0x280ba0._0x2683cb,-_0x280ba0._0x225a2f,-_0x280ba0._0x1176de,-0x1d6)]!==_0x1c2dc9(_0x280ba0._0xe76cff,0x499,_0x280ba0._0xcdc19b,0x483))return void 0x0;if(_0x5bdec6[_0x1c2dc9(_0x280ba0._0x439446,_0x280ba0._0x7243ec,0x4bb,0x46d)]===void 0x0)return void 0x0;function _0x533c26(_0x220113,_0x1ef0a6,_0xf5b852,_0x183df2){return _0x4904cb(_0x220113,_0x1ef0a6-_0x1682df._0x3298e2,_0x183df2- -_0x1682df._0x1759d6,_0x183df2-0x89);}function _0x1c2dc9(_0x47896a,_0x70419d,_0x30cd14,_0x56a521){return _0x4904cb(_0x47896a,_0x70419d-0xa5,_0x30cd14-0x3c8,_0x56a521-_0x5b247c._0x11e897);}return{'type':'assistant_chunk','index':_0x5bdec6[_0x533c26(-0x1c9,-_0x280ba0._0x470247,-_0x280ba0._0x56ea93,-_0x280ba0._0x387650)]??0x0,'messageId':_0x4cb39a,'chunk':{'type':_0x533c26(-_0x280ba0._0x353b6b,-_0x280ba0._0x4e79c4,-0x199,-0x16d),'index':_0x5bdec6[_0x533c26(-0x196,-_0x280ba0._0x25c326,-0x19d,-0x18b)]??0x0,'text':_0x5bdec6[_0x533c26(-_0x280ba0._0x3499aa,-_0x280ba0._0x6bf841,-0x14e,-0x15d)]}};}function _0x4904cb(_0x3a7e04,_0x282d4a,_0x5a375c,_0x5a81d8){return _0x29f5(_0x5a375c- -0x3d,_0x3a7e04);}function createToolUseChunkEvent(_0x22eadf,_0xa17b8f){const _0x525b74={_0x48cd98:0x159,_0x48a14f:0x15e,_0x480c51:0x2f,_0x2b830e:0xd,_0x27b9e3:0x49,_0x94472d:0x54,_0x413b1e:0x43,_0x370ea9:0x11,_0x2e7454:0x17,_0x443a35:0xd2,_0x12bb43:0xb6,_0x216b5c:0xf3,_0x251392:0x115,_0x43d9b4:0xe7,_0xc85078:0x8,_0x51b852:0x20},_0x3de7dc={_0x443d88:0x1b2,_0x15b482:0x14d,_0x5e5e94:0x2c5},_0x516e6e={_0x1f0b90:0x12e,_0x34354e:0x1c3};if(_0x22eadf[_0x1365f1(-0x188,-_0x525b74._0x48cd98,-0x1a4,-_0x525b74._0x48a14f)]!==_0x422d9c(_0x525b74._0x480c51,0x42,_0x525b74._0x2b830e,0x84))return void 0x0;function _0x1365f1(_0x21c804,_0xe7cca7,_0x57f527,_0x4d9f5b){return _0x1666c8(_0x21c804-_0x516e6e._0x1f0b90,_0xe7cca7-0x185,_0x21c804,_0x4d9f5b-_0x516e6e._0x34354e);}function _0x422d9c(_0x2eee30,_0x206f04,_0xadfed1,_0x3f397f){return _0x1666c8(_0x2eee30-_0x3de7dc._0x443d88,_0x206f04-_0x3de7dc._0x15b482,_0x3f397f,_0x206f04-_0x3de7dc._0x5e5e94);}return{'type':_0x422d9c(0x26,0xb,-_0x525b74._0x27b9e3,_0x525b74._0x94472d),'index':_0x22eadf[_0x422d9c(-_0x525b74._0x413b1e,-_0x525b74._0x370ea9,-0x41,_0x525b74._0x2e7454)]??0x0,'messageId':_0xa17b8f,'chunk':{'type':_0x1365f1(-_0x525b74._0x443a35,-0x76,-_0x525b74._0x12bb43,-0xc0),'id':_0x22eadf['id']??'','index':_0x22eadf[_0x1365f1(-_0x525b74._0x216b5c,-_0x525b74._0x251392,-0x155,-0x113)]??0x0,..._0x22eadf['name']!==void 0x0?{'name':_0x22eadf['name']}:{},..._0x22eadf[_0x1365f1(-0x94,-0xb6,-0x110,-_0x525b74._0x43d9b4)]!==void 0x0?{'inputDelta':_0x22eadf[_0x422d9c(-_0x525b74._0xc85078,0x1b,-_0x525b74._0x51b852,0xd)]}:{}}};}function createReasoningChunkEvent(_0x3c9fbd,_0x574cad){const _0x3fde4b={_0x213149:0x2ce,_0x4eb531:0x2bf,_0x5d3c8f:0x2b0,_0x3814b5:0x227,_0x54319a:0x28b,_0x3c2044:0x274,_0x528c7e:0x2be,_0x435e8e:0x2a3,_0x901421:0x1ef,_0x410866:0x24b,_0x38f926:0x265,_0x54261d:0x28d,_0x1b08bb:0x23d,_0x53bb9e:0x215,_0x1203b4:0x2cd,_0x19c2db:0x2cd,_0x252415:0x2a4,_0x34bbeb:0x2af,_0xd00fdf:0x24f,_0x4db794:0x2d2,_0x21cce9:0x2ef,_0x231034:0x236,_0x471465:0x24f,_0x14e851:0x2ad,_0x43d56a:0x241,_0x12c391:0x282,_0x32a90e:0x287,_0x2e43ef:0x267,_0x5f0782:0x220,_0x10b017:0x290,_0x4ce337:0x269,_0x4a8f57:0x26f,_0x40cdc0:0x290,_0x4464fc:0x287,_0x2a890b:0x20a,_0x4bfba9:0x2a4,_0x3539da:0x213,_0xad9ecd:0x241,_0x35c952:0x25f},_0x4effd9={_0x314b6e:0xee},_0xebc2a5={_0x396d59:0x72};function _0x198f0d(_0x39d804,_0x3c2e57,_0x5b6bc5,_0x29c4c3){return _0x1666c8(_0x39d804-0x11b,_0x3c2e57-_0xebc2a5._0x396d59,_0x39d804,_0x3c2e57-0x62);}function _0x2de568(_0x37f852,_0x4429cb,_0x3d2227,_0x5c1490){return _0x1666c8(_0x37f852-_0x4effd9._0x314b6e,_0x4429cb-0x158,_0x5c1490,_0x4429cb-0x547);}switch(_0x3c9fbd[_0x198f0d(-_0x3fde4b._0x213149,-_0x3fde4b._0x4eb531,-_0x3fde4b._0x5d3c8f,-0x317)]){case'anthropic_thinking_delta':return{'type':_0x2de568(0x288,0x258,0x268,0x23f),'index':_0x3c9fbd['index'],'messageId':_0x574cad,'chunk':{'type':_0x198f0d(-_0x3fde4b._0x3814b5,-0x26a,-0x283,-_0x3fde4b._0x54319a),'index':_0x3c9fbd[_0x198f0d(-_0x3fde4b._0x54319a,-_0x3fde4b._0x3c2044,-0x218,-0x21e)]??0x0,'thinking':_0x3c9fbd[_0x198f0d(-0x2d0,-_0x3fde4b._0x528c7e,-_0x3fde4b._0x435e8e,-0x27c)]??''},'text':_0x3c9fbd[_0x2de568(0x1df,_0x3fde4b._0x3814b5,_0x3fde4b._0x901421,_0x3fde4b._0x410866)]??''};case'openai_reasoning_delta':return{'type':_0x198f0d(-_0x3fde4b._0x38f926,-_0x3fde4b._0x54261d,-0x2e2,-_0x3fde4b._0x1b08bb),'index':_0x3c9fbd['contentIndex'],'messageId':_0x574cad,'chunk':{'type':_0x2de568(0x1d1,_0x3fde4b._0x53bb9e,0x216,0x1d6),'contentIndex':_0x3c9fbd[_0x2de568(0x314,_0x3fde4b._0x1203b4,0x329,_0x3fde4b._0x19c2db)]??0x0,'delta':_0x3c9fbd[_0x198f0d(-0x2eb,-_0x3fde4b._0x252415,-_0x3fde4b._0x34bbeb,-_0x3fde4b._0xd00fdf)]??'','itemId':_0x3c9fbd[_0x198f0d(-0x2f0,-_0x3fde4b._0x4db794,-0x324,-_0x3fde4b._0x21cce9)]??'','outputIndex':_0x3c9fbd[_0x198f0d(-_0x3fde4b._0x231034,-_0x3fde4b._0x471465,-0x299,-_0x3fde4b._0x14e851)]??0x0},'text':_0x3c9fbd[_0x2de568(0x1e7,_0x3fde4b._0x43d56a,_0x3fde4b._0x12c391,_0x3fde4b._0x32a90e)]??''};case _0x2de568(0x2a3,_0x3fde4b._0x2e43ef,_0x3fde4b._0x5f0782,0x2a6):return{'type':_0x198f0d(-0x266,-_0x3fde4b._0x54261d,-_0x3fde4b._0x10b017,-0x233),'index':_0x3c9fbd[_0x2de568(_0x3fde4b._0x4ce337,_0x3fde4b._0x4a8f57,0x251,0x271)],'messageId':_0x574cad,'chunk':{'type':_0x2de568(_0x3fde4b._0x40cdc0,_0x3fde4b._0x2e43ef,_0x3fde4b._0x4464fc,_0x3fde4b._0x2a890b),'delta':_0x3c9fbd[_0x198f0d(-0x29b,-_0x3fde4b._0x4bfba9,-0x27b,-0x2cd)]??'','itemId':_0x3c9fbd[_0x2de568(0x269,_0x3fde4b._0x3539da,0x228,_0x3fde4b._0xad9ecd)]??'','outputIndex':_0x3c9fbd[_0x2de568(_0x3fde4b._0x35c952,0x296,0x2f2,0x2ad)]??0x0,'summaryIndex':_0x3c9fbd['summaryIndex']??0x0},'text':_0x3c9fbd['delta']??''};default:return void 0x0;}}function isAbortedToolResult(_0x32fbfb){const _0xae6f9c={_0x29e99f:0x280,_0x5de6aa:0x1a6,_0x24e00d:0x1db,_0x41a593:0x458,_0x33487a:0x464,_0x47437e:0x484,_0x521107:0x474},_0x518ebf={_0x1d6cd7:0xf},_0x56cbc9={_0x12a1da:0x171,_0x5eceef:0x1a};function _0x15d65c(_0x1d5e75,_0x25a194,_0x36c039,_0x3bbcb5){return _0x4904cb(_0x3bbcb5,_0x25a194-_0x56cbc9._0x12a1da,_0x25a194- -0x2f5,_0x3bbcb5-_0x56cbc9._0x5eceef);}function _0x444067(_0x5bf68e,_0x104288,_0x45e1da,_0x4f9784){return _0x4904cb(_0x4f9784,_0x104288-_0x518ebf._0x1d6cd7,_0x5bf68e-0x37e,_0x4f9784-0x91);}return _0x32fbfb[_0x15d65c(-_0xae6f9c._0x29e99f,-0x223,-0x255,-0x22f)]===_0x15d65c(-_0xae6f9c._0x5de6aa,-0x1ed,-0x1c8,-_0xae6f9c._0x24e00d)&&_0x32fbfb[_0x444067(_0xae6f9c._0x41a593,0x451,0x47e,0x41a)][_0x444067(_0xae6f9c._0x33487a,0x4b4,_0xae6f9c._0x47437e,_0xae6f9c._0x521107)]===!![];}async function executeModelRequest(_0xe41452,_0x2ba96b,_0x31c53c,_0x497341,_0x8950ba){const _0x15f3cb={_0x7866b7:0x262,_0x4d49d2:0x289,_0x777fbb:0x250,_0x5110ab:0x22e,_0x11a2e6:0x26e,_0x20291d:0x1fb,_0x5a258f:0x23b,_0x4b169b:0x205,_0x934af8:0x1b9,_0xcbe19e:0x19b,_0x1f4590:0x18e,_0x1f3730:0x1af,_0xff0fa4:0x164,_0x5e7590:0xd8,_0x48ff6a:0x135,_0x2bb0c3:0x2c5,_0x1eb3f9:0x2b6,_0x30884e:0x2aa,_0x3232e7:0x17f,_0x30bebc:0x10a,_0x7e97ec:0x15c,_0x124c39:0x14f,_0x933dce:0x23c,_0x2786cd:0x252,_0x44b098:0x14e,_0x46e242:0x180,_0x43f2af:0x128,_0x46fe4b:0x2cc,_0xe04d11:0x273,_0x12f93d:0x22b,_0x5af0dd:0x182,_0x1e2ab2:0x1ea,_0x28a427:0x190,_0x39780c:0x147,_0x22c4f0:0x144,_0x272ac8:0x29f,_0x4c2959:0x2c8,_0x37f78c:0x2d9,_0x13b39f:0x2ba,_0x19428d:0xe3,_0x19db3e:0x13d,_0x547e82:0x162,_0x355784:0x141,_0x3b287:0x1b4,_0x2ae8d0:0x142,_0x1eac14:0x275,_0x2c8701:0x278,_0x32eaff:0x25b,_0x930c2d:0x272,_0x1745b1:0x2ab,_0x2fc47:0x2dc,_0x334541:0x299,_0x472cb7:0x11b,_0x22ba06:0xcc,_0x2de818:0x11f,_0x56a292:0x1a1,_0xdfc94c:0x1d5,_0x1ad9c5:0x2de,_0x481dfb:0x271,_0x40f24c:0x25e,_0x3314f5:0x272,_0x1db784:0x2cc,_0x22251b:0x16f,_0x551778:0x115,_0x56b6ac:0x22c,_0x1a635d:0x257,_0x54c9fe:0x236},_0xf51f55={_0x242787:0x1a6};throwIfAborted(_0x2ba96b[_0x325e9a(-0x242,-0x233,-_0x15f3cb._0x7866b7,-0x28b)]);function _0x325e9a(_0x101336,_0x172f75,_0xdc85ff,_0x39d676){return _0x1666c8(_0x101336-0x57,_0x172f75-_0xf51f55._0x242787,_0xdc85ff,_0x101336-0x5a);}if(!_0x2ba96b[_0x325e9a(-_0x15f3cb._0x4d49d2,-_0x15f3cb._0x777fbb,-0x2bf,-0x24b)]||!_0x31c53c['chatModel'][_0x463fb7(0x134,0x142,0x135,0x164)])return await _0x31c53c[_0x325e9a(-_0x15f3cb._0x5110ab,-_0x15f3cb._0x11a2e6,-_0x15f3cb._0x20291d,-0x1dc)][_0x325e9a(-_0x15f3cb._0x5a258f,-_0x15f3cb._0x4b169b,-_0x15f3cb._0x20291d,-0x22f)](_0xe41452,{'signal':_0x2ba96b[_0x463fb7(0x1a4,_0x15f3cb._0x934af8,_0x15f3cb._0xcbe19e,0x15f)]});let _0x1190a1;function _0x463fb7(_0x27e48b,_0x1063ba,_0x1a40bb,_0x3edb3f){return _0x4904cb(_0x1063ba,_0x1063ba-0xb6,_0x1a40bb-0x9c,_0x3edb3f-0x188);}for await(const _0x1d0691 of _0x31c53c[_0x463fb7(0x197,_0x15f3cb._0x1f4590,_0x15f3cb._0x1f3730,_0x15f3cb._0xff0fa4)][_0x463fb7(_0x15f3cb._0x5e7590,0xda,_0x15f3cb._0x48ff6a,0x141)](_0xe41452,{'signal':_0x2ba96b['signal']})){throwIfAborted(_0x2ba96b['signal']);if(_0x1d0691[_0x325e9a(-0x2c7,-_0x15f3cb._0x2bb0c3,-_0x15f3cb._0x1eb3f9,-_0x15f3cb._0x30884e)]===_0x463fb7(_0x15f3cb._0x3232e7,_0x15f3cb._0x30bebc,_0x15f3cb._0x7e97ec,_0x15f3cb._0x124c39)){_0x8950ba['meta'][_0x325e9a(-_0x15f3cb._0x933dce,-0x22c,-0x233,-0x1e7)]!==void 0x0&&_0x8950ba[_0x325e9a(-0x28c,-_0x15f3cb._0x2786cd,-0x2e8,-0x2bc)][_0x463fb7(_0x15f3cb._0x44b098,_0x15f3cb._0x46e242,_0x15f3cb._0x43f2af,0x161)]===void 0x0&&(_0x8950ba[_0x325e9a(-0x28c,-0x234,-_0x15f3cb._0x46fe4b,-_0x15f3cb._0xe04d11)][_0x463fb7(_0x15f3cb._0x7e97ec,0xef,0x128,0x160)]=Date[_0x325e9a(-_0x15f3cb._0x12f93d,-_0x15f3cb._0x11a2e6,-0x224,-0x1d9)]());_0x1190a1=_0x1d0691['response'];continue;}if(_0x1d0691['type']===_0x463fb7(_0x15f3cb._0x5af0dd,_0x15f3cb._0x1e2ab2,0x195,_0x15f3cb._0x28a427)){await emitEvent2(_0x31c53c[_0x463fb7(0xf8,_0x15f3cb._0x39780c,0x132,_0x15f3cb._0x22c4f0)],_0x1d0691,_0x497341);continue;}const _0x1a6d60=createReasoningChunkEvent(_0x1d0691,_0x8950ba[_0x325e9a(-_0x15f3cb._0x272ac8,-_0x15f3cb._0x4c2959,-_0x15f3cb._0x37f78c,-_0x15f3cb._0x13b39f)]);if(_0x1a6d60&&_0x1a6d60[_0x463fb7(0xe6,_0x15f3cb._0x19428d,0x116,0x158)]===_0x463fb7(_0x15f3cb._0x19db3e,_0x15f3cb._0x1f4590,0x148,_0x15f3cb._0x547e82)&&_0x1a6d60[_0x463fb7(_0x15f3cb._0x355784,_0x15f3cb._0x3b287,0x18f,_0x15f3cb._0x2ae8d0)][_0x325e9a(-_0x15f3cb._0x1eac14,-_0x15f3cb._0x2c8701,-_0x15f3cb._0x32eaff,-0x2c4)]>0x0){_0x8950ba[_0x325e9a(-0x28c,-0x2e5,-0x281,-0x238)][_0x325e9a(-0x23c,-0x279,-0x24b,-0x23b)]===void 0x0&&(_0x8950ba[_0x325e9a(-0x28c,-0x272,-_0x15f3cb._0x930c2d,-0x26e)][_0x325e9a(-0x23c,-0x233,-0x277,-0x26c)]=Date[_0x463fb7(_0x15f3cb._0x46e242,0x18b,0x1b2,0x1ea)]());await emitEvent2(_0x31c53c[_0x325e9a(-_0x15f3cb._0x1745b1,-0x2ca,-_0x15f3cb._0x2fc47,-_0x15f3cb._0x334541)],_0x1a6d60,_0x497341);continue;}const _0x3015bb=createAssistantChunkEvent(_0x1d0691,_0x8950ba[_0x463fb7(_0x15f3cb._0x472cb7,_0x15f3cb._0x22ba06,_0x15f3cb._0x2de818,0x171)]);if(_0x3015bb){_0x8950ba['meta'][_0x463fb7(0x1d9,0x1a7,_0x15f3cb._0x56a292,_0x15f3cb._0xdfc94c)]!==void 0x0&&_0x8950ba['meta'][_0x325e9a(-0x2b5,-_0x15f3cb._0x1ad9c5,-0x2f7,-0x2c7)]===void 0x0&&(_0x8950ba['meta']['reasoningCompletedAt']=Date[_0x325e9a(-_0x15f3cb._0x12f93d,-0x214,-_0x15f3cb._0x481dfb,-_0x15f3cb._0x40f24c)]());await emitEvent2(_0x31c53c[_0x325e9a(-0x2ab,-0x25e,-_0x15f3cb._0x3314f5,-_0x15f3cb._0x1db784)],_0x3015bb,_0x497341);continue;}const _0x36d3b9=createToolUseChunkEvent(_0x1d0691,_0x8950ba[_0x463fb7(0xf0,_0x15f3cb._0x22251b,0x11f,_0x15f3cb._0x551778)]);_0x36d3b9&&await emitEvent2(_0x31c53c[_0x325e9a(-_0x15f3cb._0x1745b1,-_0x15f3cb._0x30884e,-0x2df,-0x258)],_0x36d3b9,_0x497341);}if(!_0x1190a1)throw new Error(_0x325e9a(-_0x15f3cb._0x56b6ac,-0x26a,-_0x15f3cb._0x1a635d,-_0x15f3cb._0x54c9fe));return _0x1190a1;}function makeTurnGuards(_0x56f281,_0x5154f5,_0x19abe7,_0x5eda27,_0xe80d45){return{async 'stage'(_0x2f66b8,_0x387bb6){return throwIfAborted(_0x56f281),await runStage(_0x5154f5,_0x2f66b8,_0x387bb6,_0x5eda27);},async 'emit'(_0x1c3bbc){throwIfAborted(_0x56f281),await emitEvent2(_0x19abe7,_0x1c3bbc,_0xe80d45);},async 'stageUnchecked'(_0x186580,_0x3499ad){return await runStage(_0x5154f5,_0x186580,_0x3499ad,_0x5eda27);},async 'emitUnchecked'(_0x42b6b0){await emitEvent2(_0x19abe7,_0x42b6b0,_0xe80d45);}};}async function runTurn(_0x1f8d45,_0x496794){const _0x5e908b={_0xd8564e:0x494,_0x5e990b:0x495,_0x540217:0x297,_0x518f21:0x2d6,_0x8de1c1:0x4a7,_0xbd5f6b:0x483,_0x104a00:0x4c3,_0x597aa2:0x4b8,_0x5c6a48:0x49c,_0x2e0e6f:0x23d,_0x1b6bde:0x23f,_0x209480:0x254,_0x4ca6a5:0x21e,_0x5c91cc:0x20d,_0x2c1e0b:0x29f,_0x400f80:0x222,_0x164094:0x283,_0x32526a:0x4c0,_0x12df7a:0x4b0,_0x957c6d:0x4c4,_0x517c74:0x485,_0x2aa987:0x437,_0x469a2d:0x472,_0x17a527:0x232,_0x4864be:0x1e5,_0x369142:0x1e8,_0x2a0a09:0x1dd,_0x246178:0x22e,_0x5e4a4e:0x508,_0xea9898:0x2f8,_0x1acbb5:0x29a,_0x2d5df6:0x48b,_0x4814d6:0x455,_0x2604d4:0x44a,_0xc7c1a7:0x479,_0x5148ba:0x403,_0x562393:0x447,_0x655b9b:0x43b,_0x1edf32:0x470,_0x4c0c95:0x4b8,_0x1d97c6:0x4a2,_0x184387:0x4b1,_0x2791d4:0x24e,_0x18127e:0x23b,_0x3062fb:0x204,_0x3654f7:0x22f,_0x73425:0x204,_0x3b2956:0x4df,_0x147ef7:0x500,_0x3ee832:0x230,_0x2e9cbf:0x23d,_0x52e414:0x2ec,_0xec233b:0x2cf,_0x1aebc6:0x2b7,_0x302e13:0x23b,_0x22ec3f:0x24c,_0x128536:0x221,_0x506a71:0x254,_0x48aacc:0x2bb,_0x312558:0x28c,_0x323c89:0x28a,_0x318fd6:0x1fc,_0x4c808b:0x482,_0x1c9fa0:0x448,_0x48f9e5:0x26b,_0x448628:0x235,_0x4dc298:0x2aa,_0x54ea5d:0x52e,_0x3c5add:0x478,_0x2026ff:0x4a0,_0x54231c:0x21c,_0x35a218:0x244,_0x232150:0x238,_0xd39440:0x1e1,_0x30a9f0:0x234,_0x4b8ab1:0x47f,_0xadf6a5:0x28d,_0x33a64e:0x26a,_0x2245df:0x2c5,_0x26a92c:0x46c,_0x9498b7:0x482,_0x5830d:0x4d7,_0x291ddc:0x433,_0x5d3573:0x480,_0x1c911a:0x453,_0x36220c:0x4d2,_0x1c9e80:0x513,_0x3c43bb:0x4bd,_0x28a624:0x4e9,_0x313a63:0x254,_0x11fe9a:0x248,_0x17bb83:0x295,_0x5bc8f8:0x2b9,_0x309fa9:0x2be,_0x7218a4:0x4b1,_0x42d28d:0x203,_0x4990d4:0x480,_0x5d3ea3:0x4b2,_0x5da8a1:0x29c,_0xc3fc04:0x2f1,_0xed6873:0x4c1,_0x55ef2d:0x264,_0x330b52:0x27b,_0x3bcfbe:0x22c,_0x3ccd25:0x288,_0x12209b:0x485,_0x2a4cf5:0x4c4,_0x54064c:0x51c,_0x42c11d:0x286,_0x3d82f0:0x2ba,_0x3cf028:0x2e3,_0x5e3f7a:0x22c,_0x4cd9c9:0x1d8,_0x6db752:0x46b,_0x239144:0x4a8,_0x3032a4:0x43d,_0x1ddeef:0x448,_0x46d329:0x219,_0x1bcd44:0x241,_0x3d9bc6:0x1f7,_0x43012f:0x214,_0x29c567:0x4a3,_0x2e9298:0x46d,_0x128104:0x496,_0x3ee07d:0x461,_0x15079c:0x4c1,_0x1e1fe5:0x24c,_0x42345b:0x21c,_0x3ca540:0x253,_0x21476e:0x1e4,_0xda5023:0x41c,_0x586e96:0x3ff,_0x4ec004:0x44f,_0x4a62d7:0x25c,_0x830eef:0x2c6},_0x2dc478={_0x1af53b:0x16f,_0x35917f:0x3a},_0x1bd29e={_0x43761e:0xd2,_0x23b3cc:0x119,_0x5bc282:0x127,_0x2275c7:0x126,_0x30b28a:0x5,_0x356b13:0x47},_0x3224d2={_0x4c9cd6:0x27},_0x341ca3=_0x1f8d45[_0x3c35d2(_0x5e908b._0xd8564e,0x4fb,0x4b3,_0x5e908b._0x5e990b)]??new AbortController()[_0x260457(_0x5e908b._0x540217,0x23e,0x24c,_0x5e908b._0x518f21)],_0x3dfa9c={'sessionId':_0x1f8d45[_0x3c35d2(_0x5e908b._0x8de1c1,_0x5e908b._0xbd5f6b,_0x5e908b._0x104a00,0x4e9)],'turnId':_0x1f8d45[_0x3c35d2(0x49e,_0x5e908b._0x597aa2,0x4a0,_0x5e908b._0x5c6a48)],'system':normalizeSystem(_0x1f8d45[_0x260457(_0x5e908b._0x2e0e6f,0x238,_0x5e908b._0x1b6bde,0x28f)]),'messages':(_0x1f8d45[_0x260457(_0x5e908b._0x209480,_0x5e908b._0x4ca6a5,0x281,_0x5e908b._0x5c91cc)]??[])[_0x260457(0x266,_0x5e908b._0x2c1e0b,_0x5e908b._0x400f80,_0x5e908b._0x164094)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x496794[_0x3c35d2(0x4cd,0x4b8,0x485,_0x5e908b._0x32526a)]===_0x3c35d2(_0x5e908b._0x12df7a,0x4b6,0x490,0x43d)?_0x496794[_0x3c35d2(_0x5e908b._0x5c6a48,_0x5e908b._0x957c6d,_0x5e908b._0x517c74,_0x5e908b._0x2aa987)]():_0x496794['sessionDir']},_0x27e23d=makeExtensionContext(_0x3dfa9c);function _0x260457(_0x1658a1,_0x51daa3,_0x344c4b,_0x62c199){return _0x4904cb(_0x344c4b,_0x51daa3-_0x3224d2._0x4c9cd6,_0x1658a1-0x198,_0x62c199-0x1e2);}const _0xe63d30={'sessionId':_0x3dfa9c['sessionId'],'turnId':_0x3dfa9c[_0x3c35d2(0x4e5,_0x5e908b._0x469a2d,0x4a0,_0x5e908b._0x597aa2)],'state':_0x3dfa9c,'signal':_0x341ca3,..._0x496794[_0x260457(_0x5e908b._0x17a527,0x1da,0x281,_0x5e908b._0x4864be)]?{'askUser':_0x496794[_0x260457(0x232,_0x5e908b._0x369142,_0x5e908b._0x2a0a09,_0x5e908b._0x246178)]}:{},..._0x496794['setTopic']?{'setTopic':_0x496794[_0x3c35d2(0x50e,_0x5e908b._0x5e4a4e,0x4c8,0x518)]}:{}},{stage:_0x4d0f95,emit:_0x4dbba1,stageUnchecked:_0x5c04b6,emitUnchecked:_0x2fa241}=makeTurnGuards(_0x341ca3,_0x496794[_0x260457(0x2a8,0x304,_0x5e908b._0xea9898,_0x5e908b._0x1acbb5)],_0x496794[_0x3c35d2(_0x5e908b._0x2d5df6,_0x5e908b._0x4814d6,_0x5e908b._0x2604d4,_0x5e908b._0xc7c1a7)],_0x27e23d,_0xe63d30),_0x2263d2=async(_0x305722,_0x3b3be0)=>{const _0x4213a9={_0x438161:0x287,_0x2f7efb:0x102},_0x541c20={_0x27076a:0x8f};function _0x156871(_0x293a33,_0x3536f9,_0xc5199,_0x3d5984){return _0x3c35d2(_0x293a33-0x168,_0x3536f9,_0x293a33- -0x574,_0x3d5984-_0x541c20._0x27076a);}const _0x72ef73=_0x3b3be0?{..._0x27e23d,'turnMeta':_0x3b3be0}:_0x27e23d;function _0x38155b(_0x2ed762,_0x720a5d,_0x2c1bfc,_0x2600c5){return _0x260457(_0x720a5d- -_0x4213a9._0x438161,_0x720a5d-0x16a,_0x2c1bfc,_0x2600c5-_0x4213a9._0x2f7efb);}await _0x496794['registry'][_0x156871(-_0x1bd29e._0x43761e,-_0x1bd29e._0x23b3cc,-_0x1bd29e._0x5bc282,-_0x1bd29e._0x2275c7)](_0x38155b(-_0x1bd29e._0x30b28a,0xd,_0x1bd29e._0x356b13,-0x15),structuredClone(_0x305722),_0x72ef73);};function _0x3c35d2(_0xb43a17,_0x1c54d8,_0xa3d8b5,_0x26e84b){return _0x4904cb(_0x1c54d8,_0x1c54d8-_0x2dc478._0x1af53b,_0xa3d8b5-0x3b4,_0x26e84b-_0x2dc478._0x35917f);}let _0x324215=0x0;try{const _0x4bdf23=await _0x4d0f95(_0x3c35d2(0x40b,_0x5e908b._0x5148ba,_0x5e908b._0x562393,0x47c),normalizeMessage(_0x1f8d45['message']));_0x3dfa9c[_0x3c35d2(_0x5e908b._0x655b9b,0x41a,_0x5e908b._0x1edf32,0x437)][_0x3c35d2(_0x5e908b._0x4c0c95,_0x5e908b._0x1d97c6,_0x5e908b._0x184387,0x45f)](_0x4bdf23),await _0x2263d2(_0x4bdf23),await _0x4dbba1({'type':_0x260457(0x26e,0x28b,0x28f,0x251),'message':_0x4bdf23});while(!![]){throwIfAborted(_0x341ca3),_0x324215+=0x1;const _0x3f6e0a=createAssistantMessageId(_0x3dfa9c['turnId'],_0x324215),_0x475e91=createReasoningMessageId(_0x3f6e0a),_0x1d60a0={'model':_0x496794[_0x260457(0x2ab,0x2bc,0x2c8,_0x5e908b._0x2791d4)][_0x260457(_0x5e908b._0x18127e,_0x5e908b._0x3062fb,_0x5e908b._0x3654f7,_0x5e908b._0x73425)],..._0x496794[_0x3c35d2(0x525,_0x5e908b._0x3b2956,0x4c7,_0x5e908b._0x147ef7)][_0x260457(0x275,_0x5e908b._0x3ee832,0x2b4,_0x5e908b._0x2e9cbf)]?{'provider':_0x496794['chatModel']['provider']}:{}};let _0x2f73d3={'model':_0x496794[_0x260457(0x2ab,_0x5e908b._0x52e414,_0x5e908b._0xec233b,_0x5e908b._0x1aebc6)][_0x260457(_0x5e908b._0x302e13,_0x5e908b._0x22ec3f,_0x5e908b._0x128536,_0x5e908b._0x506a71)],'maxTokens':_0x496794[_0x260457(0x2ab,_0x5e908b._0x48aacc,_0x5e908b._0x312558,0x2e6)]['maxTokens']??0x4000,'system':structuredClone(_0x3dfa9c[_0x260457(0x23d,0x25d,_0x5e908b._0x323c89,_0x5e908b._0x318fd6)]),'messages':structuredClone(_0x3dfa9c[_0x3c35d2(_0x5e908b._0x4c808b,0x41d,0x470,_0x5e908b._0x1c9fa0)]),'tools':_0x496794[_0x260457(_0x5e908b._0x48f9e5,_0x5e908b._0x448628,_0x5e908b._0x4dc298,0x29f)][_0x3c35d2(0x4a6,_0x5e908b._0x54ea5d,0x4d3,0x4ea)](),'metadata':{'sessionId':_0x3dfa9c['sessionId'],'turnId':_0x3dfa9c[_0x3c35d2(0x4dd,_0x5e908b._0x3c5add,_0x5e908b._0x2026ff,0x464)]},..._0x496794['outputFormat']?{'outputFormat':_0x496794['outputFormat']}:{}};_0x2f73d3=await _0x4d0f95(_0x260457(0x234,_0x5e908b._0x54231c,_0x5e908b._0x35a218,0x27c),_0x2f73d3),await _0x4dbba1({'type':'model_request','request':_0x2f73d3}),_0x1d60a0[_0x3c35d2(0x4e9,0x45b,0x492,0x476)]=Date[_0x3c35d2(0x511,0x491,0x4ca,0x516)]();let _0x12aed7=await executeModelRequest(_0x2f73d3,_0x1f8d45,_0x496794,_0xe63d30,{'assistantMessageId':_0x3f6e0a,'reasoningMessageId':_0x475e91,'meta':_0x1d60a0});_0x1d60a0[_0x260457(0x233,_0x5e908b._0x232150,_0x5e908b._0xd39440,_0x5e908b._0x30a9f0)]=Date[_0x3c35d2(_0x5e908b._0x4b8ab1,0x4ea,0x4ca,0x4a9)](),_0x12aed7=await _0x4d0f95('afterModelResponse',_0x12aed7),await _0x4dbba1({'type':_0x260457(_0x5e908b._0xadf6a5,0x248,_0x5e908b._0x33a64e,0x2d6),'response':_0x12aed7}),_0x3dfa9c['lastResponse']=_0x12aed7;let _0x57d481=await _0x4d0f95(_0x260457(0x2a4,0x2bf,0x2eb,_0x5e908b._0x2245df),withMessageId(responseToAssistantMessage(_0x12aed7),_0x3f6e0a));_0x57d481=withMessageId(_0x57d481,_0x3f6e0a);const _0x474c91=getToolUseBlocks(_0x57d481),_0x21ece3=await Promise[_0x3c35d2(0x477,0x440,0x468,0x425)](_0x474c91[_0x3c35d2(0x42b,_0x5e908b._0x26a92c,_0x5e908b._0x9498b7,_0x5e908b._0x5830d)](_0x5eda7b=>_0x4d0f95(_0x3c35d2(0x449,0x491,0x49d,0x4d0),_0x5eda7b)));_0x21ece3[_0x3c35d2(_0x5e908b._0x291ddc,0x4cb,_0x5e908b._0x5d3573,_0x5e908b._0x1c911a)]>0x0&&(_0x57d481=replaceToolUseBlocks(_0x57d481,_0x21ece3));const _0x19e2c8=withMessageId(_0x57d481,_0x3f6e0a);_0x57d481=_0x19e2c8;const _0x211888=createReasoningMessage(_0x57d481),_0x773935=createAssistantTextMessage(_0x57d481),_0x751298=createToolUseMessage(_0x57d481);_0x211888&&await _0x4dbba1({'type':_0x3c35d2(_0x5e908b._0x36220c,_0x5e908b._0x1c9e80,_0x5e908b._0x3c43bb,_0x5e908b._0x28a624),'message':withMessageId(_0x211888,_0x475e91)});_0x773935&&await _0x4dbba1({'type':'assistant_message','message':withMessageId(_0x773935,_0x3f6e0a)});_0x751298&&await _0x4dbba1({'type':_0x260457(0x270,0x220,0x255,0x23f),'message':withMessageId(_0x751298,_0x3f6e0a)});_0x3dfa9c[_0x260457(_0x5e908b._0x313a63,_0x5e908b._0x312558,_0x5e908b._0x11fe9a,0x25e)][_0x260457(_0x5e908b._0x17bb83,0x2a7,_0x5e908b._0x5bc8f8,_0x5e908b._0x309fa9)](_0x19e2c8);_0x21ece3[_0x3c35d2(_0x5e908b._0x7218a4,0x486,0x480,0x4db)]>0x0&&await _0x2263d2(_0x19e2c8,_0x1d60a0);for(const _0x1d0845 of _0x21ece3){await _0x4dbba1({'type':_0x260457(0x22a,_0x5e908b._0x42d28d,0x257,0x24a),'toolCall':_0x1d0845});}if(_0x21ece3[_0x3c35d2(0x471,0x4c5,_0x5e908b._0x4990d4,_0x5e908b._0x5d3ea3)]===0x0){const _0x24b094=await _0x4d0f95('beforeFinalOutput',_0x57d481),_0x406b87=withMessageId(_0x24b094,_0x3f6e0a);return _0x3dfa9c[_0x260457(_0x5e908b._0x5da8a1,_0x5e908b._0xc3fc04,_0x5e908b._0x309fa9,0x2a3)]=_0x406b87,_0x3dfa9c[_0x3c35d2(_0x5e908b._0xed6873,0x487,0x470,0x484)][_0x3dfa9c['messages'][_0x260457(_0x5e908b._0x55ef2d,0x259,_0x5e908b._0x312558,0x27d)]-0x1]=_0x406b87,await _0x2263d2(_0x406b87,_0x1d60a0),await _0x4dbba1({'type':_0x260457(0x246,_0x5e908b._0x330b52,_0x5e908b._0x3bcfbe,_0x5e908b._0x3ccd25),'message':_0x406b87}),throwIfAborted(_0x341ca3),await _0x496794[_0x3c35d2(_0x5e908b._0x12209b,0x4bf,_0x5e908b._0x2a4cf5,_0x5e908b._0x54064c)][_0x260457(_0x5e908b._0x42c11d,_0x5e908b._0x3d82f0,_0x5e908b._0x3cf028,0x2da)](_0x260457(_0x5e908b._0x5e3f7a,_0x5e908b._0x4cd9c9,0x277,0x25c),_0x3dfa9c,_0x27e23d),await _0x4dbba1({'type':_0x3c35d2(0x46b,_0x5e908b._0x6db752,_0x5e908b._0x239144,0x4c9),'state':_0x3dfa9c}),{'status':'completed','finalMessage':_0x406b87,'state':_0x3dfa9c};}let _0x18c81a=await _0x496794[_0x3c35d2(0x42e,_0x5e908b._0x3032a4,0x487,_0x5e908b._0x1ddeef)][_0x260457(_0x5e908b._0x46d329,0x1cb,_0x5e908b._0x1bcd44,0x1f1)](_0x21ece3,_0xe63d30);const _0x1119ce=_0x18c81a[_0x260457(0x22f,_0x5e908b._0x3d9bc6,0x205,_0x5e908b._0x43012f)](isAbortedToolResult),_0x54912d=_0x1119ce?_0x5c04b6:_0x4d0f95,_0x132550=_0x1119ce?_0x2fa241:_0x4dbba1;_0x18c81a=await Promise[_0x3c35d2(_0x5e908b._0x29c567,_0x5e908b._0x2e9298,0x468,_0x5e908b._0x128104)](_0x18c81a['map'](_0x494825=>_0x54912d('afterToolResult',_0x494825))),_0x3dfa9c[_0x3c35d2(_0x5e908b._0x3ee07d,_0x5e908b._0x15079c,0x47b,0x4c2)][_0x260457(0x295,0x246,_0x5e908b._0x1e1fe5,0x280)](..._0x18c81a);for(const _0x58b8b8 of _0x18c81a){await _0x132550({'type':_0x260457(_0x5e908b._0x42345b,0x244,0x258,_0x5e908b._0x3ca540),'result':_0x58b8b8});}const _0x26321b=await _0x54912d(_0x260457(0x200,0x1e1,0x209,_0x5e908b._0x21476e),createToolResultUserMessage(_0x18c81a));await _0x132550({'type':_0x3c35d2(_0x5e908b._0xda5023,_0x5e908b._0x586e96,0x45c,_0x5e908b._0x4ec004),'message':_0x26321b}),_0x3dfa9c['messages']['push'](_0x26321b),await _0x2263d2(_0x26321b);if(_0x1119ce)return{'status':_0x260457(0x27e,0x256,0x263,0x281),'state':_0x3dfa9c};}}catch(_0x367613){if(!_0x341ca3[_0x260457(0x27e,0x2bb,_0x5e908b._0x4a62d7,_0x5e908b._0x830eef)])throw new TurnFailedError(_0x367613,_0x3dfa9c);return{'status':'aborted','state':_0x3dfa9c};}}function createSessionId(){const _0x3c6aeb={_0x10adca:0x2e7,_0x2b2dbd:0x2c6,_0x5b1ac0:0x2bb,_0xbe4717:0x294,_0x53e709:0x24e,_0x4e74e2:0x2b0,_0x26e56d:0x2e0,_0x4ae5a5:0x2d3,_0xccb212:0x300,_0x2b49d5:0x335},_0x2b0a04={_0x34e953:0x94,_0x458215:0x1f2};function _0x37069e(_0x564ac1,_0x4403ed,_0x16be44,_0x286675){return _0x4904cb(_0x564ac1,_0x4403ed-_0x2b0a04._0x34e953,_0x16be44-_0x2b0a04._0x458215,_0x286675-0x1b6);}function _0x29cbbb(_0x23ccd3,_0x2caf5c,_0x11776d,_0x3e070f){return _0x4904cb(_0x11776d,_0x2caf5c-0x106,_0x2caf5c- -0x3aa,_0x3e070f-0x2);}return _0x29cbbb(-_0x3c6aeb._0x10adca,-_0x3c6aeb._0x2b2dbd,-0x278,-0x27d)+Date[_0x29cbbb(-_0x3c6aeb._0x5b1ac0,-_0x3c6aeb._0xbe4717,-_0x3c6aeb._0x53e709,-_0x3c6aeb._0x4e74e2)]()+'-'+Math[_0x29cbbb(-_0x3c6aeb._0x26e56d,-_0x3c6aeb._0x4ae5a5,-0x30a,-0x27d)]()[_0x37069e(0x2aa,0x25c,0x29d,0x2eb)](0x10)[_0x29cbbb(-_0x3c6aeb._0xccb212,-0x2e6,-_0x3c6aeb._0x2b49d5,-0x317)](0x2,0xa);}function createTurnId(_0x228dd7){const _0x1be3b7={_0x4645ac:0x17e},_0x4f08c8={_0x2fb17c:0x115,_0x4426f0:0xd9};function _0x6ec01(_0x440e79,_0x5875bb,_0xbfad8b,_0xc655e1){return _0x4904cb(_0x440e79,_0x5875bb-_0x4f08c8._0x2fb17c,_0xc655e1-0xfd,_0xc655e1-_0x4f08c8._0x4426f0);}return _0x6ec01(_0x1be3b7._0x4645ac,0x1b3,0x1ca,0x1c3)+_0x228dd7;}function createDefaultMessage(_0x41c705){if(_0x41c705===void 0x0)return void 0x0;return normalizeUserInput(_0x41c705);}function _0x29f5(_0x16a81a,_0x4c6e12){_0x16a81a=_0x16a81a-0xa4;const _0x5b65d5=_0x5b65();let _0x29f5c7=_0x5b65d5[_0x16a81a];if(_0x29f5['hHxDrr']===undefined){var _0xcad7c0=function(_0x2bbd89){const _0x49abdd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x51e12c='',_0x436972='';for(let _0x5adce5=0x0,_0x5a6b6d,_0x146690,_0x24d354=0x0;_0x146690=_0x2bbd89['charAt'](_0x24d354++);~_0x146690&&(_0x5a6b6d=_0x5adce5%0x4?_0x5a6b6d*0x40+_0x146690:_0x146690,_0x5adce5++%0x4)?_0x51e12c+=String['fromCharCode'](0xff&_0x5a6b6d>>(-0x2*_0x5adce5&0x6)):0x0){_0x146690=_0x49abdd['indexOf'](_0x146690);}for(let _0x19d5b0=0x0,_0x5a51b7=_0x51e12c['length'];_0x19d5b0<_0x5a51b7;_0x19d5b0++){_0x436972+='%'+('00'+_0x51e12c['charCodeAt'](_0x19d5b0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x436972);};_0x29f5['MbFQQZ']=_0xcad7c0,_0x29f5['zdfzZl']={},_0x29f5['hHxDrr']=!![];}const _0x23a6d4=_0x5b65d5[0x0],_0xbdf521=_0x16a81a+_0x23a6d4,_0x53aefe=_0x29f5['zdfzZl'][_0xbdf521];return!_0x53aefe?(_0x29f5c7=_0x29f5['MbFQQZ'](_0x29f5c7),_0x29f5['zdfzZl'][_0xbdf521]=_0x29f5c7):_0x29f5c7=_0x53aefe,_0x29f5c7;}function normalizeUserInput(_0x6ecfbd){const _0x432e9f={_0x418919:0xf6,_0x4ba8d5:0xe9,_0x3c938a:0x170,_0x36fed5:0x186,_0x3e66b4:0x17e},_0x4cab95={_0x1ac424:0x1b7},_0x2ded89={_0x51429f:0xe7,_0x537cc1:0x188};if(typeof _0x6ecfbd===_0x2f3d42(-0xd6,-_0x432e9f._0x418919,-0x11e,-0xfd))return{'role':_0x2f3d42(-_0x432e9f._0x4ba8d5,-0x11c,-_0x432e9f._0x3c938a,-0x174),'content':[{'type':_0x56a32e(_0x432e9f._0x36fed5,0x193,_0x432e9f._0x3e66b4,0x13f),'text':_0x6ecfbd}]};function _0x2f3d42(_0x4d4d02,_0x364b71,_0x322edd,_0x4227aa){return _0x4904cb(_0x322edd,_0x364b71-_0x2ded89._0x51429f,_0x364b71- -0x212,_0x4227aa-_0x2ded89._0x537cc1);}function _0x56a32e(_0x2549f2,_0x4a5ac0,_0x18831b,_0x5f1173){return _0x4904cb(_0x2549f2,_0x4a5ac0-_0x4cab95._0x1ac424,_0x5f1173-0x4c,_0x5f1173-0x17f);}return normalizeMessage(_0x6ecfbd);}function resolveChatModel(_0x22e9bb){const _0x2392eb={_0x48fa4e:0x20f,_0x5b48de:0x27c},_0x6edc60={_0x138e0f:0x9f,_0x2464fe:0x169},_0x2f1f26={_0x1a549b:0x1dd,_0x58ef32:0x175};if(!_0x22e9bb[_0x9b4278(0x27c,0x226,0x231,0x2a1)])throw new Error(_0x9b4278(0x1e1,0x1b8,0x1ff,_0x2392eb._0x48fa4e));function _0x1f7ae6(_0x355d3b,_0x1ca0a9,_0x2b527e,_0x140526){return _0x4904cb(_0x355d3b,_0x1ca0a9-_0x2f1f26._0x1a549b,_0x2b527e- -0x268,_0x140526-_0x2f1f26._0x58ef32);}function _0x9b4278(_0x1d9072,_0x3398f2,_0x3cabea,_0x103386){return _0x4904cb(_0x3398f2,_0x3398f2-_0x6edc60._0x138e0f,_0x1d9072-_0x6edc60._0x2464fe,_0x103386-0x124);}return _0x22e9bb[_0x9b4278(_0x2392eb._0x5b48de,0x279,0x239,0x2c1)];}function createRegistry(_0x44ca77){const _0xdd87ec={_0x47a1d7:0x19a,_0x1582b8:0x1f7,_0x1446e9:0x400,_0x1060c7:0x455,_0x4058fb:0x3c4},_0x3c39d3={_0xf1f682:0x19},_0x3212a0={_0x376c45:0x1e4,_0x2545ed:0x68b};function _0x40650b(_0x2d560c,_0x296003,_0x2e04aa,_0xb2a059){return _0x1666c8(_0x2d560c-_0x3212a0._0x376c45,_0x296003-0x124,_0xb2a059,_0x2e04aa-_0x3212a0._0x2545ed);}if(_0x44ca77[_0x2b08b7(-0x163,-0x1d5,-_0xdd87ec._0x47a1d7,-_0xdd87ec._0x1582b8)])return _0x44ca77[_0x40650b(0x44f,0x447,_0xdd87ec._0x1446e9,_0xdd87ec._0x1060c7)];const _0x1f6313=createExtensionRegistry(),_0x3b6de1=_0x44ca77[_0x40650b(_0xdd87ec._0x4058fb,0x397,0x3bb,0x3e0)]??[];function _0x2b08b7(_0x39e45d,_0x578bd3,_0x4eccea,_0x2f44b0){return _0x4904cb(_0x39e45d,_0x578bd3-0x142,_0x4eccea- -0x2aa,_0x2f44b0-_0x3c39d3._0xf1f682);}for(const _0x143062 of _0x3b6de1){_0x1f6313['register'](_0x143062);}return _0x1f6313;}var Agent=class{[_0x4904cb(0x5d,0xf3,0xa9,0xae)];[_0x1666c8(-0x315,-0x349,-0x341,-0x330)];[_0x1666c8(-0x2d8,-0x298,-0x28e,-0x291)];[_0x4904cb(0xb2,0x130,0x10f,0x154)];['messages'];[_0x4904cb(0x13c,0xe8,0xf8,0x131)];[_0x1666c8(-0x294,-0x314,-0x2bb,-0x2f1)];constructor(_0x11a55f={}){const _0x3d76b8={_0xfc9bc4:0x3f9,_0x1510d7:0x94,_0x54efcb:0xcb,_0x53e98f:0x70,_0xac3f6c:0xec,_0x469b1d:0x48,_0x1eef15:0xc7,_0x50d8ca:0xa6,_0x25251a:0x80,_0x424b79:0x3d6,_0x16d4c3:0x118,_0x2abecb:0x3d7,_0x325103:0xf4,_0x1c934c:0x14a,_0x854857:0x60,_0x3cfd38:0x85,_0x24a2de:0x35e,_0x1c742a:0x369,_0x50ddaa:0x388,_0xb2d9c9:0x33f,_0x3f1670:0x384,_0x1e4bb1:0x3fe,_0x5368fa:0x403,_0x5560f4:0x3c2,_0x2d6bea:0x40a,_0x1d33df:0x3bb,_0x382d17:0x3a5,_0x2e150e:0x3c4,_0x24ea90:0x74},_0x14107e={_0x4832af:0xcc,_0x376058:0x2ea},_0x5b39ba={_0x150d9b:0xf7,_0x411598:0x124,_0x4eef6c:0xea,_0x5eeffb:0x13c},_0x5c59c1={_0x2c4b9b:0x18e,_0x311a39:0x130},_0x4f2aea={_0x250f84:0xc8};this[_0x48ea4b(_0x3d76b8._0xfc9bc4,0x3be,0x41d,0x43b)]=_0x11a55f['sessionId']??createSessionId(),this[_0x36724f(_0x3d76b8._0x1510d7,_0x3d76b8._0x54efcb,_0x3d76b8._0x53e98f,_0x3d76b8._0xac3f6c)]=0x0,this['_systemPrompt']=_0x11a55f[_0x36724f(0x88,_0x3d76b8._0x469b1d,_0x3d76b8._0x1eef15,0x46)]??'',this[_0x36724f(_0x3d76b8._0x50d8ca,_0x3d76b8._0x25251a,0xa8,0x5c)]=(_0x11a55f[_0x48ea4b(0x3a6,0x3e4,0x387,_0x3d76b8._0x424b79)]??[])['map'](normalizeMessage),this[_0x36724f(0xe2,0x97,_0x3d76b8._0x16d4c3,0xaa)]=createDefaultMessage(_0x11a55f[_0x48ea4b(0x3f8,0x409,0x404,_0x3d76b8._0x2abecb)]),this[_0x36724f(_0x3d76b8._0x325103,_0x3d76b8._0x1c934c,0x9f,0x115)]=createAgentMetrics({'getContextWindowLimit':_0x11a55f[_0x36724f(_0x3d76b8._0x854857,_0x3d76b8._0x3cfd38,0xb5,0x37)]});const _0x1dea8e=_0x11a55f[_0x48ea4b(0x380,_0x3d76b8._0x24a2de,0x359,_0x3d76b8._0x1c742a)],_0x4ffd36=async(_0xca83cf,_0x41efb9)=>{function _0x371786(_0x1b2b83,_0x10dae3,_0x3fd826,_0x2fb630){return _0x48ea4b(_0x2fb630- -0x437,_0x10dae3,_0x3fd826-_0x4f2aea._0x250f84,_0x2fb630-0x153);}function _0x48168d(_0x11f28b,_0x455af6,_0x5d1e50,_0x2c1dab){return _0x36724f(_0x455af6- -_0x5c59c1._0x2c4b9b,_0x11f28b,_0x5d1e50-_0x5c59c1._0x311a39,_0x2c1dab-0x12f);}this[_0x48168d(-0x4d,-0x9a,-0x98,-_0x5b39ba._0x150d9b)][_0x48168d(-_0x5b39ba._0x411598,-0xf2,-_0x5b39ba._0x4eef6c,-_0x5b39ba._0x5eeffb)](_0xca83cf),await _0x1dea8e?.(_0xca83cf,_0x41efb9);};function _0x48ea4b(_0x3fe117,_0x1b4043,_0x3438a0,_0xe078a0){return _0x4904cb(_0x1b4043,_0x1b4043-_0x14107e._0x4832af,_0x3fe117-_0x14107e._0x376058,_0xe078a0-0x1c);}const _0x4b6f9e=createInternalToolRuntime(_0x11a55f['tools']??[],{'onEvent':_0x4ffd36,'onToolCall':_0x11a55f['onToolCall']});function _0x36724f(_0x1e9480,_0x24f481,_0x3d5f33,_0x503025){return _0x1666c8(_0x1e9480-0xdd,_0x24f481-0x125,_0x24f481,_0x1e9480-0x385);}this[_0x48ea4b(0x355,0x365,_0x3d76b8._0x50ddaa,_0x3d76b8._0xb2d9c9)]={'registry':createRegistry(_0x11a55f),'chatModel':resolveChatModel(_0x11a55f),'toolRuntime':_0x4b6f9e,'askUser':_0x11a55f[_0x48ea4b(_0x3d76b8._0x3f1670,0x36d,0x385,0x36e)],'setTopic':_0x11a55f[_0x48ea4b(_0x3d76b8._0x1e4bb1,_0x3d76b8._0x5368fa,_0x3d76b8._0x5560f4,_0x3d76b8._0x2d6bea)],'onEvent':_0x4ffd36,'sessionDir':_0x11a55f[_0x48ea4b(_0x3d76b8._0x1d33df,_0x3d76b8._0x382d17,_0x3d76b8._0x2e150e,0x399)],'outputFormat':_0x11a55f[_0x36724f(_0x3d76b8._0x24ea90,0x9c,0x1a,0x2f)]};}get[_0x1666c8(-0x2c4,-0x33f,-0x2b6,-0x2fd)](){const _0x1a57f1={_0x3647a3:0xe2,_0x2fe757:0x136},_0x3592d2={_0x4a4712:0x172,_0x2486bc:0x4f};function _0x40acdc(_0x1ec3d9,_0x864191,_0x730498,_0x3f40a6){return _0x1666c8(_0x1ec3d9-_0x3592d2._0x4a4712,_0x864191-_0x3592d2._0x2486bc,_0x730498,_0x1ec3d9-0x3d4);}return this[_0x40acdc(_0x1a57f1._0x3647a3,0x12e,_0x1a57f1._0x2fe757,0x13c)];}[_0x4904cb(0x11c,0xb8,0xf2,0x142)](_0x16c479=[]){const _0x2999f5={_0x1b4e9a:0x17,_0x448d52:0x89,_0x48388a:0x7,_0xc67871:0x5e,_0x67901f:0x6a,_0x19b745:0x78,_0x22e6f3:0x4},_0x45eb09={_0x360efc:0x1b,_0x327771:0x17},_0x189184={_0x139dea:0x1b0,_0x5c9d25:0x307};function _0x39a0fe(_0x37697e,_0xd96ba5,_0xf347d5,_0x198b6b){return _0x1666c8(_0x37697e-_0x189184._0x139dea,_0xd96ba5-0x19d,_0xd96ba5,_0x37697e-_0x189184._0x5c9d25);}function _0x269eaa(_0x29e230,_0x2eeb21,_0x50f97b,_0x48fda5){return _0x1666c8(_0x29e230-0xc9,_0x2eeb21-_0x45eb09._0x360efc,_0x2eeb21,_0x50f97b-_0x45eb09._0x327771);}this[_0x39a0fe(-0x29,_0x2999f5._0x1b4e9a,-0x57,-0x50)][_0x39a0fe(0x3f,_0x2999f5._0x448d52,-0x1a,_0x2999f5._0x48388a)][_0x39a0fe(_0x2999f5._0xc67871,_0x2999f5._0x67901f,_0x2999f5._0x19b745,_0x2999f5._0x22e6f3)](_0x16c479);}[_0x4904cb(0xa8,0xb5,0x103,0xcd)](){const _0x337609={_0x533c80:0x10a,_0x16eb21:0x139,_0x2c4df3:0x26c},_0x424c09={_0x41a82e:0x1df,_0x42116a:0x43a},_0x36518b={_0x1c8acb:0x525};function _0x2aaddd(_0x1505dc,_0x4aea9b,_0x4e340a,_0x188b6c){return _0x1666c8(_0x1505dc-0x1ec,_0x4aea9b-0x19e,_0x4e340a,_0x1505dc-_0x36518b._0x1c8acb);}function _0x288fdb(_0x21fd37,_0x3672ef,_0x52567d,_0x474434){return _0x1666c8(_0x21fd37-0x131,_0x3672ef-_0x424c09._0x41a82e,_0x21fd37,_0x52567d-_0x424c09._0x42116a);}return this[_0x288fdb(0x12f,0x101,_0x337609._0x533c80,_0x337609._0x16eb21)][_0x2aaddd(0x25d,0x262,0x219,_0x337609._0x2c4df3)]['listToolSchemas']();}[_0x1666c8(-0x360,-0x2cd,-0x357,-0x329)](_0x4c55b7,_0x24442c={}){const _0x4c816c={_0x104ca7:0x14a,_0x294d0c:0x1c1,_0x53fd52:0x19d,_0x3d7d26:0x95,_0x4e0db7:0x4f,_0x1ca1da:0x32,_0x37ba40:0x1bb,_0x35dac5:0x1e1,_0x369e6a:0x19c},_0x242627={_0x2d4271:0x305},_0x2cca55={_0x31fa40:0x14c};function _0x5d9c2f(_0x3ed710,_0x54f072,_0x55d7b6,_0x184c0c){return _0x1666c8(_0x3ed710-0x1bf,_0x54f072-_0x2cca55._0x31fa40,_0x3ed710,_0x184c0c-0x155);}this[_0x5d9c2f(-0x1ca,-_0x4c816c._0x104ca7,-_0x4c816c._0x294d0c,-_0x4c816c._0x53fd52)]=_0x4c55b7;function _0x4fd50e(_0x4f71df,_0xbd62e8,_0x5ab083,_0x395c14){return _0x1666c8(_0x4f71df-0x35,_0xbd62e8-0xae,_0x5ab083,_0xbd62e8-_0x242627._0x2d4271);}_0x24442c[_0x4fd50e(_0x4c816c._0x3d7d26,0x75,_0x4c816c._0x4e0db7,_0x4c816c._0x1ca1da)]===!![]&&(this[_0x5d9c2f(-0x1e3,-0x1e5,-0x145,-0x18a)]=[],this[_0x5d9c2f(-_0x4c816c._0x37ba40,-0x1c5,-_0x4c816c._0x35dac5,-_0x4c816c._0x369e6a)]=0x0);}[_0x4904cb(0x102,0x66,0xb6,0x76)](_0x186f31){const _0x126745={_0xadc445:0x1b1,_0x26505b:0x10c};function _0x19e35c(_0x374aab,_0x144a27,_0x34156e,_0x128318){return _0x1666c8(_0x374aab-0xfc,_0x144a27-0x1ce,_0x374aab,_0x34156e-0x12c);}this[_0x19e35c(-_0x126745._0xadc445,-0x115,-0x160,-_0x126745._0x26505b)]=_0x186f31;}[_0x1666c8(-0x371,-0x2ee,-0x2e9,-0x331)](_0x3c095d){const _0x457a7c={_0x4c1c00:0x1c5,_0x2267fa:0x17a},_0x344fff={_0x4188ba:0x199,_0x5bece6:0x87,_0x28e943:0x400};function _0x1d5682(_0xf5a173,_0x4cd398,_0x1f81b2,_0x4efaba){return _0x1666c8(_0xf5a173-_0x344fff._0x4188ba,_0x4cd398-_0x344fff._0x5bece6,_0x4cd398,_0xf5a173-_0x344fff._0x28e943);}this['deps'][_0x1d5682(0x178,_0x457a7c._0x4c1c00,_0x457a7c._0x2267fa,0x157)]=_0x3c095d;}async[_0x1666c8(-0x34b,-0x303,-0x2ca,-0x2fc)](_0x1f6d1a=this[_0x4904cb(0x137,0xde,0xf8,0x105)],_0x1bac37={}){const _0x31bd9e={_0x583b0f:0x356,_0xe05fc9:0x2ad,_0x4bc570:0x2f8,_0x2d5c97:0xfa,_0x520e4a:0x2a1,_0x50bc53:0x2c9,_0x18464c:0x346,_0xf83afa:0x282,_0x39c34c:0x287,_0x2db580:0x275,_0x241965:0x258,_0x117ab2:0x29b,_0xc057ea:0x268,_0x2edf61:0x2c3,_0x15fcf5:0x248,_0x4fc21c:0xda,_0x1746e4:0x4d,_0x14a413:0x243,_0x19c919:0x268,_0x444a19:0x2c9,_0x137d90:0x314},_0x5227f9={_0x3b621b:0x59},_0x566351={_0x5c5514:0x47};if(!_0x1f6d1a)throw new Error('Agent.send\x20requires\x20a\x20message\x20when\x20no\x20default\x20message\x20is\x20configured');function _0x5544d0(_0x2cd3b7,_0x116f80,_0x136139,_0x4ea17b){return _0x1666c8(_0x2cd3b7-0x1d8,_0x116f80-_0x566351._0x5c5514,_0x116f80,_0x4ea17b-0x584);}function _0x35f290(_0x3f8f0c,_0x4ccbe4,_0x5ec6ee,_0x4b6d89){return _0x4904cb(_0x5ec6ee,_0x4ccbe4-0x1c1,_0x3f8f0c- -0x15c,_0x4b6d89-_0x5227f9._0x3b621b);}this['turnIndex']+=0x1;try{const _0x3aff2d=await runTurn({'sessionId':this[_0x5544d0(0x2f2,_0x31bd9e._0x583b0f,_0x31bd9e._0xe05fc9,_0x31bd9e._0x4bc570)],'turnId':createTurnId(this[_0x35f290(-0xb2,-_0x31bd9e._0x2d5c97,-0x9b,-0xe1)]),'streaming':_0x1bac37[_0x5544d0(0x259,0x2eb,0x2f8,_0x31bd9e._0x520e4a)],'signal':_0x1bac37[_0x5544d0(0x310,_0x31bd9e._0x50bc53,_0x31bd9e._0x18464c,0x2e8)],'system':this[_0x5544d0(0x297,_0x31bd9e._0xf83afa,0x2a6,_0x31bd9e._0x39c34c)],'messages':this[_0x5544d0(_0x31bd9e._0x2db580,_0x31bd9e._0x241965,0x2c8,0x2a5)],'message':normalizeUserInput(_0x1f6d1a)},this[_0x35f290(-0xf1,-0x118,-0x14c,-0xc4)]);return this[_0x5544d0(_0x31bd9e._0x117ab2,0x295,0x2d2,0x2a5)]=_0x3aff2d[_0x5544d0(0x26e,0x29d,0x2ab,_0x31bd9e._0xc057ea)][_0x5544d0(0x2d3,_0x31bd9e._0x2edf61,_0x31bd9e._0x15fcf5,0x2a5)][_0x35f290(-0x8e,-_0x31bd9e._0x4fc21c,-0x4b,-_0x31bd9e._0x1746e4)](normalizeMessage),_0x3aff2d;}catch(_0x2b3246){if(_0x2b3246 instanceof TurnFailedError){this[_0x5544d0(0x297,0x28c,0x2e4,0x2a5)]=synthesizeMissingToolResults(_0x2b3246[_0x5544d0(0x276,0x215,_0x31bd9e._0x14a413,_0x31bd9e._0x19c919)][_0x5544d0(0x26b,0x2d6,_0x31bd9e._0x444a19,0x2a5)][_0x5544d0(0x304,0x25a,_0x31bd9e._0x137d90,0x2b7)](normalizeMessage));throw _0x2b3246['cause'];}throw _0x2b3246;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
|
package/dist/chunk-NHBKADBW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x49163e,_0x31fe69){const _0x3004f2={_0x3eb3b2:0x181,_0x1dddf9:0x19b,_0x34e2df:0x2a4,_0x5ae816:0x2c0,_0x189b8e:0x1ab,_0x4127ce:0x1b0,_0x4f4cca:0x1b6,_0x351b19:0x199,_0x299133:0x1c3,_0x43e189:0x1c2,_0x555535:0x1b5,_0x32f33a:0x2bc,_0x28caac:0x2d6,_0x476b96:0x2da,_0x2e87ab:0x29e,_0x91b9ff:0x299,_0x22f5d3:0x2ba,_0x3604b7:0x19e,_0x37892f:0x19d,_0x47aae9:0x1b4,_0x28943c:0x1b1},_0x4b06c1={_0xabf1df:0x3d9};function _0x10bf01(_0x42cf1e,_0x53f661,_0x11baa7,_0x331a33){return _0x2374(_0x42cf1e- -_0x4b06c1._0xabf1df,_0x331a33);}function _0x49955e(_0x3e7c96,_0x48ae29,_0x1e7eb4,_0x1dd087){return _0x2374(_0x1dd087-0xab,_0x48ae29);}const _0x5c9800=_0x49163e();while(!![]){try{const _0x18775f=-parseInt(_0x49955e(0x182,0x190,_0x3004f2._0x3eb3b2,_0x3004f2._0x1dddf9))/0x1+parseInt(_0x10bf01(-0x2ba,-_0x3004f2._0x34e2df,-_0x3004f2._0x5ae816,-0x2a7))/0x2+parseInt(_0x49955e(_0x3004f2._0x189b8e,_0x3004f2._0x4127ce,_0x3004f2._0x4f4cca,_0x3004f2._0x351b19))/0x3*(-parseInt(_0x49955e(0x1c7,0x1af,0x1be,_0x3004f2._0x299133))/0x4)+parseInt(_0x49955e(0x1b9,0x1c4,_0x3004f2._0x43e189,_0x3004f2._0x555535))/0x5*(-parseInt(_0x10bf01(-_0x3004f2._0x32f33a,-0x2b9,-_0x3004f2._0x28caac,-_0x3004f2._0x476b96))/0x6)+-parseInt(_0x10bf01(-0x2b5,-_0x3004f2._0x2e87ab,-_0x3004f2._0x91b9ff,-0x2bd))/0x7+-parseInt(_0x10bf01(-0x2c0,-_0x3004f2._0x22f5d3,-0x2c9,-0x2cd))/0x8*(parseInt(_0x49955e(_0x3004f2._0x189b8e,0x1b4,_0x3004f2._0x3604b7,_0x3004f2._0x37892f))/0x9)+parseInt(_0x49955e(_0x3004f2._0x47aae9,0x1a7,_0x3004f2._0x28943c,0x1b3))/0xa;if(_0x18775f===_0x31fe69)break;else _0x5c9800['push'](_0x5c9800['shift']());}catch(_0x57a216){_0x5c9800['push'](_0x5c9800['shift']());}}}(_0x37d3,0xc9c22));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';function _0x2374(_0x2bca77,_0x20d601){_0x2bca77=_0x2bca77-0xed;const _0x37d352=_0x37d3();let _0x237424=_0x37d352[_0x2bca77];if(_0x2374['OOLrul']===undefined){var _0x14cd62=function(_0x50acfa){const _0x36f2c4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2b4c93='',_0x26b961='';for(let _0x572e63=0x0,_0x52d55f,_0x1c91d5,_0x199ad2=0x0;_0x1c91d5=_0x50acfa['charAt'](_0x199ad2++);~_0x1c91d5&&(_0x52d55f=_0x572e63%0x4?_0x52d55f*0x40+_0x1c91d5:_0x1c91d5,_0x572e63++%0x4)?_0x2b4c93+=String['fromCharCode'](0xff&_0x52d55f>>(-0x2*_0x572e63&0x6)):0x0){_0x1c91d5=_0x36f2c4['indexOf'](_0x1c91d5);}for(let _0x5898a9=0x0,_0x169f81=_0x2b4c93['length'];_0x5898a9<_0x169f81;_0x5898a9++){_0x26b961+='%'+('00'+_0x2b4c93['charCodeAt'](_0x5898a9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x26b961);};_0x2374['zNcSXu']=_0x14cd62,_0x2374['aeyEqY']={},_0x2374['OOLrul']=!![];}const _0x73f6a1=_0x37d352[0x0],_0x4d6d3d=_0x2bca77+_0x73f6a1,_0x5a2618=_0x2374['aeyEqY'][_0x4d6d3d];return!_0x5a2618?(_0x237424=_0x2374['zNcSXu'](_0x237424),_0x2374['aeyEqY'][_0x4d6d3d]=_0x237424):_0x237424=_0x5a2618,_0x237424;}import{normalizeContent}from'./chunk-QDOE7NWO.js';function systemToInstructions(_0x2b4c93){const _0x175e38={_0x4f7ffc:0x1ae,_0x14965f:0x1f4},_0x5183a3={_0x345bf2:0xf6},_0x79647b={_0x154ec5:0xa1};function _0x1070d3(_0x27b3eb,_0x290e35,_0x3ef26f,_0x22135b){return _0x2374(_0x290e35-_0x79647b._0x154ec5,_0x3ef26f);}function _0x24cecf(_0x33a84c,_0x56f04c,_0x56458f,_0x4cc956){return _0x2374(_0x56458f-_0x5183a3._0x345bf2,_0x56f04c);}return normalizeContent(_0x2b4c93)[_0x1070d3(0x1bd,0x1a8,0x197,_0x175e38._0x4f7ffc)](_0x26b961=>_0x26b961[_0x24cecf(0x207,0x21f,0x20b,0x1fd)]==='text')['map'](_0x572e63=>_0x572e63[_0x1070d3(0x1b8,0x1c1,0x1a8,0x1bf)])[_0x24cecf(_0x175e38._0x14965f,0x215,0x204,0x213)]('\x0a\x0a');}function pushUserContentMessage(_0x52d55f,_0x1c91d5,_0x199ad2){const _0x1563c3={_0x710beb:0x419,_0x5e1b22:0x411,_0x291b25:0x3fe,_0x120db2:0x410},_0x711572={_0xa492c0:0x318};if(_0x199ad2['length']===0x0)return;function _0x3134e4(_0x2883dc,_0x343a13,_0x8d1cd1,_0x36c0de){return _0x2374(_0x8d1cd1- -0x8,_0x2883dc);}function _0x1647e1(_0xc6d37a,_0x4226b2,_0x508244,_0x41184c){return _0x2374(_0x508244-_0x711572._0xa492c0,_0x4226b2);}_0x52d55f[_0x1647e1(0x419,0x40c,_0x1563c3._0x710beb,_0x1563c3._0x5e1b22)]({'type':_0x1647e1(0x40b,_0x1563c3._0x291b25,_0x1563c3._0x120db2,0x3f3),'role':_0x1c91d5,'content':_0x199ad2});}function hasSerializableToolUse(_0x5898a9){const _0x231813={_0x122e15:0x15d,_0x2db37a:0x137,_0x467c90:0x145,_0x1c5e4f:0x127,_0xba75f2:0x157,_0x1e4030:0x189,_0x171eeb:0x11f},_0x13f276={_0x3f576a:0x48},_0xd70e7c={_0xdbf370:0x115};function _0x17d4b2(_0x394708,_0x24619d,_0x479f1b,_0x247ae9){return _0x2374(_0x394708-_0xd70e7c._0xdbf370,_0x24619d);}function _0x59a695(_0x50847f,_0x4668b9,_0x296d8a,_0x30dacd){return _0x2374(_0x50847f-_0x13f276._0x3f576a,_0x30dacd);}return _0x5898a9['id'][_0x59a695(0x16d,0x182,_0x231813._0x122e15,0x174)]()[_0x59a695(_0x231813._0x2db37a,_0x231813._0x467c90,0x135,_0x231813._0x1c5e4f)]>0x0&&_0x5898a9['name'][_0x59a695(0x16d,_0x231813._0xba75f2,_0x231813._0x1e4030,0x179)]()[_0x59a695(_0x231813._0x2db37a,0x11f,0x142,_0x231813._0x171eeb)]>0x0;}function hasSerializableToolResult(_0x169f81){const _0x5ef2ef={_0x3ebb94:0xff,_0x166c29:0x166},_0x49c09f={_0x525de1:0x207};function _0x1e2a86(_0x158eff,_0x56615a,_0xe88cd4,_0x23181a){return _0x2374(_0xe88cd4- -0x24c,_0x158eff);}function _0x1eab6a(_0x45cd73,_0x45f493,_0x56d419,_0x2b9e4c){return _0x2374(_0x2b9e4c- -_0x49c09f._0x525de1,_0x45cd73);}return _0x169f81[_0x1e2a86(-0x131,-0x147,-0x13c,-0x156)][_0x1eab6a(-_0x5ef2ef._0x3ebb94,-0xd3,-0xdc,-0xe2)]()[_0x1e2a86(-_0x5ef2ef._0x166c29,-0x169,-0x15d,-0x161)]>0x0;}function isResponseInputObject(_0x9caed8){const _0x12f144={_0x21bcea:0x35a,_0x14e223:0x365,_0x4a3700:0x345,_0x33cb17:0x361,_0x46ef63:0x326},_0x58d946={_0x429eb9:0x24c};function _0x2df872(_0x42a07c,_0x56a8a5,_0x1f1170,_0x3730e1){return _0x2374(_0x3730e1-_0x58d946._0x429eb9,_0x42a07c);}if(typeof _0x9caed8!=='object'||_0x9caed8===null||Array['isArray'](_0x9caed8))return![];const _0x6f969b=_0x9caed8;function _0x3ef423(_0x54035b,_0x2ee277,_0x3ca892,_0x1ab425){return _0x2374(_0x3ca892-0x22c,_0x1ab425);}return typeof _0x6f969b[_0x2df872(_0x12f144._0x21bcea,_0x12f144._0x14e223,_0x12f144._0x4a3700,_0x12f144._0x33cb17)]===_0x3ef423(_0x12f144._0x46ef63,0x324,0x32b,0x31a);}function isImageToolResultBlock(_0x14d544){const _0x320e87={_0x165a78:0x23,_0xe6cbb4:0x22,_0x34adb9:0x1,_0x371009:0x74,_0x34dc71:0x5a,_0x3dcc40:0x0,_0x3707d7:0x11,_0x46ce24:0xd,_0x41a703:0x62,_0x5799e0:0x86,_0x352d54:0x72,_0x33166c:0x3,_0x321362:0x7,_0xab20f3:0x14,_0x1876c1:0x4,_0x160835:0x2b,_0x432c4b:0x72,_0x443121:0x68,_0x3bc979:0x17,_0x37db19:0x19},_0xf85e1={_0x3ebc04:0x9b};if(typeof _0x14d544!==_0x45f8b2(-_0x320e87._0x165a78,-0x20,-_0x320e87._0xe6cbb4,-_0x320e87._0x34adb9)||_0x14d544===null||Array[_0x109670(_0x320e87._0x371009,0x4f,0x43,_0x320e87._0x34dc71)](_0x14d544))return![];const _0x5843e2=_0x14d544;function _0x109670(_0x3f8674,_0x48617b,_0x3ed8c8,_0x17d382){return _0x2374(_0x17d382- -_0xf85e1._0x3ebc04,_0x3f8674);}function _0x45f8b2(_0x49139c,_0x44e00f,_0x582f01,_0x170de7){return _0x2374(_0x44e00f- -0x116,_0x49139c);}return _0x5843e2[_0x45f8b2(_0x320e87._0x3dcc40,-0x1,_0x320e87._0x3707d7,_0x320e87._0x46ce24)]===_0x109670(_0x320e87._0x41a703,_0x320e87._0x5799e0,0x6b,_0x320e87._0x352d54)&&_0x5843e2['source']?.['type']===_0x45f8b2(-_0x320e87._0x33166c,-_0x320e87._0x321362,-_0x320e87._0xab20f3,-_0x320e87._0x1876c1)&&typeof _0x5843e2['source'][_0x45f8b2(0x14,_0x320e87._0x46ce24,_0x320e87._0x160835,0x28)]===_0x109670(0x80,_0x320e87._0x432c4b,0x66,0x64)&&typeof _0x5843e2['source'][_0x109670(0x63,0x61,0x7d,_0x320e87._0x443121)]===_0x45f8b2(-0x15,-_0x320e87._0x3bc979,-0x28,-_0x320e87._0x37db19);}function getToolResultText(_0x407177){const _0x3305b2={_0xf5c0a:0x1b,_0x2c3c4d:0x2d,_0x5d560e:0x1d4,_0x11573f:0x1dd,_0x2fb173:0x1e4,_0x3aa57a:0x1c6,_0x301fe5:0x1de,_0x1379cb:0x1db,_0x17554f:0x8,_0x49a66d:0x6},_0x3bcccf={_0x145f3e:0x1b7,_0x2d47a3:0x1a2,_0x1e2c2d:0x198,_0x5206ef:0x1d7},_0x2e3940={_0xbb48f5:0xec},_0x28bdf0={_0x4fde6b:0x35,_0x46c0ff:0x150};if(typeof _0x407177===_0x1265b9(-_0x3305b2._0xf5c0a,-0xc,-0x19,-_0x3305b2._0x2c3c4d))return _0x407177;const _0x310b16=_0x407177[_0x20d5ab(0x1ca,_0x3305b2._0x5d560e,_0x3305b2._0x11573f,_0x3305b2._0x2fb173)](_0x44ff78=>{function _0x205596(_0x36fa58,_0xf9f56d,_0x5538e1,_0x4418a9){return _0x1265b9(_0xf9f56d-0x1b2,_0xf9f56d-_0x28bdf0._0x4fde6b,_0x5538e1-_0x28bdf0._0x46c0ff,_0x36fa58);}function _0x3f779f(_0x482b32,_0x37e962,_0x3f276c,_0x2960ca){return _0x20d5ab(_0x482b32-0x170,_0x37e962- -0x49e,_0x3f276c-_0x2e3940._0xbb48f5,_0x2960ca);}return typeof _0x44ff78==='object'&&_0x44ff78!==null&&_0x44ff78[_0x205596(_0x3bcccf._0x145f3e,0x1ad,_0x3bcccf._0x2d47a3,_0x3bcccf._0x1e2c2d)]===_0x205596(0x1bd,0x1b8,_0x3bcccf._0x5206ef,0x1c7);})[_0x20d5ab(_0x3305b2._0x3aa57a,0x1d8,_0x3305b2._0x301fe5,0x1f0)](_0x242a15=>_0x242a15['text'])[_0x20d5ab(0x1d5,_0x3305b2._0x1379cb,0x1e0,0x1cd)]('\x0a\x0a')[_0x1265b9(0xb,_0x3305b2._0x17554f,-_0x3305b2._0x49a66d,0x11)]();function _0x20d5ab(_0x4d93e8,_0xa5b8c0,_0x66ab6c,_0x11d421){return _0x2374(_0xa5b8c0-0xcd,_0x11d421);}function _0x1265b9(_0x46b59c,_0x19d6f6,_0x3aee29,_0x3f25dd){return _0x2374(_0x46b59c- -0x11a,_0x3f25dd);}return _0x310b16['length']>0x0?_0x310b16:'Tool\x20returned\x20image\x20content.';}function getToolResultImages(_0x2ad1ce){const _0x10a3c0={_0x5a3a8d:0x2e8,_0x414286:0x2d5,_0x3ac873:0x2f5};function _0x51cca5(_0x806f2b,_0x2025ca,_0x2168df,_0x3a3dc7){return _0x2374(_0x806f2b-0x1f3,_0x2025ca);}function _0x55c9d5(_0x576df6,_0x3fa9cc,_0x1a0a7f,_0x336df2){return _0x2374(_0x1a0a7f- -0x32c,_0x3fa9cc);}return Array[_0x51cca5(_0x10a3c0._0x5a3a8d,0x2cc,_0x10a3c0._0x414286,0x2da)](_0x2ad1ce)?_0x2ad1ce[_0x51cca5(0x2fa,0x30b,_0x10a3c0._0x3ac873,0x2f9)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x574f31){const _0x2d851c={_0x4ff78c:0x48a,_0x2432a8:0x49c,_0x2dd482:0x4b3},_0x49771b={_0x494d0e:0x385};function _0x12cf43(_0x1dbe81,_0x449c5c,_0x5736df,_0x2eaa76){return _0x2374(_0x2eaa76- -0x4f,_0x449c5c);}function _0x27a9fd(_0x1357b6,_0x118c38,_0x2e978f,_0x23becf){return _0x2374(_0x1357b6-_0x49771b._0x494d0e,_0x118c38);}return _0x574f31[_0x27a9fd(_0x2d851c._0x4ff78c,_0x2d851c._0x2432a8,0x490,0x47a)]?.[_0x27a9fd(0x4ae,0x4c4,0x4aa,_0x2d851c._0x2dd482)]??'user-visible';}function createOpenAiResponsesReasoning(_0x1cdbb4){const _0x244509={_0x488af0:0x27e,_0x42d449:0x28a,_0x26be07:0xf7,_0x534933:0x111,_0x4fd328:0x107,_0x203332:0x271,_0x385df0:0x26b,_0x58fcc3:0x278,_0x47c68e:0x28a,_0x4977a3:0x11f,_0x42e9bd:0x285,_0x3dfa47:0x272,_0x330bf1:0xf9},_0x4b2a57=resolveOpenAiReasoningConfig(_0x1cdbb4[_0x37990c(-_0x244509._0x488af0,-_0x244509._0x42d449,-0x266,-0x290)]);if(!_0x4b2a57)return{};const _0x1c6127={};function _0x554b8b(_0x377875,_0x2e6abf,_0x559142,_0x52c0ef){return _0x2374(_0x559142- -0x204,_0x2e6abf);}const _0x18b6ea=_0x4b2a57[_0x554b8b(-_0x244509._0x26be07,-0x123,-_0x244509._0x534933,-_0x244509._0x4fd328)]??(resolveReasoningVisibility(_0x1cdbb4)===_0x554b8b(-0x117,-0xec,-0x104,-0xf2)?_0x37990c(-_0x244509._0x203332,-_0x244509._0x385df0,-_0x244509._0x58fcc3,-0x280):void 0x0);_0x4b2a57['effort']&&(_0x1c6127['effort']=_0x4b2a57[_0x37990c(-_0x244509._0x47c68e,-0x29e,-0x283,-0x288)]);function _0x37990c(_0x37d6f9,_0x3c3b41,_0x79f829,_0x5df19c){return _0x2374(_0x37d6f9- -0x383,_0x79f829);}return _0x18b6ea&&(_0x1c6127[_0x554b8b(-0x126,-_0x244509._0x4977a3,-0x111,-0x104)]=_0x18b6ea),{..._0x4b2a57['includeEncryptedContent']===![]?{}:{'include':[_0x37990c(-0x26d,-_0x244509._0x42e9bd,-_0x244509._0x3dfa47,-0x26b)]},...Object['keys'](_0x1c6127)[_0x554b8b(-0xfb,-_0x244509._0x330bf1,-0x115,-_0x244509._0x4977a3)]>0x0?{'reasoning':_0x1c6127}:{}};}function pushAssistantProviderState(_0x341336,_0x71e837){const _0xd5e05f={_0x546ace:0x324,_0x4f177e:0x348,_0x4139b9:0x33b,_0x38de9d:0x6d,_0x100e43:0x4f,_0x2829bc:0x7c,_0x4d76cd:0x313,_0x4909b5:0x308,_0x3475f8:0x3e},_0x558644={_0x21e5b8:0x15a};if(_0x71e837['role']!==_0x4a5974(_0xd5e05f._0x546ace,0x342,0x332,0x34d))return![];function _0x4a5974(_0x2e9cfc,_0x5ba22a,_0x3d7290,_0x59b05d){return _0x2374(_0x5ba22a-0x22e,_0x59b05d);}const _0xb58ba5=_0x71e837[_0x4a5974(0x361,_0xd5e05f._0x4f177e,0x354,_0xd5e05f._0x4139b9)]?.[_0x2b4fed(-_0xd5e05f._0x38de9d,-_0xd5e05f._0x100e43,-0x5c,-_0xd5e05f._0x2829bc)]??[];if(_0xb58ba5[_0x4a5974(_0xd5e05f._0x4d76cd,0x31d,_0xd5e05f._0x4909b5,0x337)]===0x0)return![];function _0x2b4fed(_0x42b8b6,_0xd246e5,_0x3e25d1,_0x3b17a2){return _0x2374(_0x42b8b6- -_0x558644._0x21e5b8,_0x3b17a2);}for(const _0x4d7f7d of _0xb58ba5){isResponseInputObject(_0x4d7f7d)&&_0x341336[_0x2b4fed(-0x59,-_0xd5e05f._0x3475f8,-0x5e,-0x71)](structuredClone(_0x4d7f7d));}return!![];}function toOpenAiResponsesRequest(_0x159ae2){const _0x41632b={_0x19f08c:0x3,_0x3d875d:0x6,_0x374955:0x27a,_0xc51e3d:0x26c,_0xa92a15:0x261,_0x4f9f6d:0x255,_0x4e0cdb:0x23d,_0x22605c:0x24e,_0x25d4dd:0x24a,_0x3afae1:0x264,_0x57a70d:0x268,_0xf1ff1a:0x269,_0x1e7279:0x238,_0x242ac0:0x246,_0x23fff3:0x241,_0x29f9d:0x244,_0x42c50b:0x26c,_0x1798ff:0x25,_0x31eaf1:0x260,_0x36f208:0x27c,_0xe8ba2e:0x24f,_0x30bb0c:0x25b,_0x2ba4cb:0x25a,_0x48c6ed:0x275,_0x1045f9:0x286,_0x548939:0x269,_0x5a620a:0x39,_0x3ee0b4:0x38,_0x578a54:0x23e,_0x16bc9e:0x250,_0x4258dd:0x247,_0x4e921e:0x24e,_0x861f86:0x253,_0x48ea31:0x265,_0x3c2678:0x274,_0x5dee07:0x257,_0x37bffe:0x267,_0x4d07e4:0x24c,_0x1ffa1b:0x276,_0x4ef844:0x273,_0x1d155e:0x26d,_0x51b6d2:0x25c,_0x1b2c5f:0x231,_0x4d62a7:0x244,_0x4095e4:0x24f,_0x49e697:0x275,_0x335d5d:0x7,_0x331eb7:0x1,_0x2e8c42:0x6,_0x1a1d8b:0xb,_0x5dacbb:0x14,_0x1e57b2:0x13,_0x4c8f2b:0x5,_0x210fd6:0x8,_0x5683b1:0xd,_0x56babd:0x32,_0x501553:0x25d,_0x5080b2:0x26c,_0x21db46:0x26b,_0x468038:0x27e,_0x3ff26a:0x1b,_0x35f910:0xe,_0x362892:0x6,_0xa7cef2:0x26a,_0x1c54a5:0x26f,_0x2d90f8:0x270,_0x439923:0x24a,_0x1fdcc0:0x251,_0xd66c72:0x277,_0x1d67ae:0xf,_0x431d45:0x23,_0x1fc3de:0x17,_0x5089b1:0x21,_0x85d9ed:0x259,_0x3d1742:0x25f,_0x36e97e:0x4d,_0x36594d:0x35,_0x4c5b72:0x1a,_0x24b26b:0x11,_0x237cee:0x1d,_0x47e15f:0x45,_0x493404:0x36},_0x4e5ea8={_0x2612a0:0x7c,_0x571043:0x87,_0x278a1d:0x8f,_0x2e21b4:0x89,_0x88b27b:0x82,_0x3eefc8:0x75,_0x20786d:0x2bc,_0x4cf923:0x2a8,_0x46c3f6:0x2be,_0x1a3499:0x6b,_0x124650:0x79,_0x3f3c94:0x7a},_0x24579a={_0x29b54c:0x1ed,_0x42ac81:0x1e9},_0x28b5e4={_0x2d4aa0:0xc,_0x1571d6:0x51},_0x20b4c3={_0x1e5166:0xf3},_0x11c100=[];function _0x283162(_0x348087,_0x2863bb,_0xbc3f2a,_0x59f7a8){return _0x2374(_0x59f7a8- -0x36a,_0x2863bb);}for(const _0x4824f3 of _0x159ae2[_0x59a008(0x1b,_0x41632b._0x19f08c,0x19,_0x41632b._0x3d875d)]){if(pushAssistantProviderState(_0x11c100,_0x4824f3))continue;const _0x391680=[];for(const _0x3c9e0a of normalizeContent(_0x4824f3[_0x283162(-0x25a,-0x266,-_0x41632b._0x374955,-_0x41632b._0xc51e3d)])){if(_0x3c9e0a[_0x283162(-0x267,-_0x41632b._0xa92a15,-0x260,-_0x41632b._0x4f9f6d)]===_0x283162(-0x25a,-_0x41632b._0x4e0cdb,-_0x41632b._0x22605c,-_0x41632b._0x25d4dd)){_0x391680[_0x283162(-_0x41632b._0x3afae1,-0x284,-_0x41632b._0x57a70d,-_0x41632b._0xf1ff1a)](_0x4824f3[_0x283162(-_0x41632b._0x1e7279,-_0x41632b._0x242ac0,-_0x41632b._0x23fff3,-0x24c)]===_0x283162(-_0x41632b._0x29f9d,-_0x41632b._0x42c50b,-0x259,-0x256)?{'type':'output_text','text':_0x3c9e0a[_0x59a008(_0x41632b._0x1798ff,0x20,0x2d,0x22)]}:{'type':_0x283162(-_0x41632b._0x31eaf1,-0x280,-_0x41632b._0x36f208,-0x266),'text':_0x3c9e0a[_0x283162(-_0x41632b._0x57a70d,-0x231,-0x269,-_0x41632b._0x25d4dd)]});continue;}if(_0x3c9e0a[_0x283162(-_0x41632b._0xe8ba2e,-_0x41632b._0x30bb0c,-0x272,-_0x41632b._0x4f9f6d)]===_0x283162(-0x268,-_0x41632b._0x2ba4cb,-_0x41632b._0x48c6ed,-0x25d)){_0x391680[_0x283162(-0x27f,-0x25b,-_0x41632b._0x1045f9,-_0x41632b._0x548939)]({'type':'input_image','image_url':_0x59a008(0x3b,_0x41632b._0x5a620a,0x2f,_0x41632b._0x3ee0b4)+_0x3c9e0a['source'][_0x283162(-_0x41632b._0x578a54,-_0x41632b._0x16bc9e,-0x231,-_0x41632b._0x4258dd)]+_0x283162(-_0x41632b._0x4e921e,-0x23a,-0x259,-_0x41632b._0x861f86)+_0x3c9e0a[_0x283162(-_0x41632b._0x48ea31,-0x25d,-0x268,-0x24e)][_0x283162(-_0x41632b._0x3c2678,-0x24c,-_0x41632b._0x5dee07,-_0x41632b._0x37bffe)]});continue;}pushUserContentMessage(_0x11c100,_0x4824f3[_0x283162(-0x24a,-0x231,-0x22f,-_0x41632b._0x4d07e4)],_0x391680[_0x283162(-0x280,-_0x41632b._0x1ffa1b,-_0x41632b._0x4ef844,-_0x41632b._0x1d155e)](0x0));if(_0x3c9e0a[_0x283162(-_0x41632b._0x3afae1,-_0x41632b._0x51b6d2,-0x255,-_0x41632b._0x4f9f6d)]===_0x283162(-0x248,-_0x41632b._0x1b2c5f,-_0x41632b._0x4d62a7,-_0x41632b._0x4095e4)){if(!hasSerializableToolUse(_0x3c9e0a))continue;_0x11c100[_0x283162(-_0x41632b._0x49e697,-0x270,-0x285,-_0x41632b._0xf1ff1a)]({'type':_0x59a008(0x25,0x50,0x33,0x2f),'call_id':_0x3c9e0a['id'],'name':_0x3c9e0a[_0x59a008(-_0x41632b._0x335d5d,0x7,0x4,_0x41632b._0x331eb7)],'arguments':JSON['stringify'](_0x3c9e0a['input']??{})});continue;}if(_0x3c9e0a['type']===_0x283162(-0x25a,-0x27d,-0x297,-0x279)){if(!hasSerializableToolResult(_0x3c9e0a))continue;const _0x29c477=getToolResultText(_0x3c9e0a[_0x59a008(-_0x41632b._0x2e8c42,0x1f,_0x41632b._0x1a1d8b,_0x41632b._0x5dacbb)]);_0x11c100['push']({'type':_0x59a008(_0x41632b._0x1e57b2,_0x41632b._0x4c8f2b,_0x41632b._0x210fd6,-_0x41632b._0x5683b1),'call_id':_0x3c9e0a[_0x59a008(0x8,_0x41632b._0x1798ff,0x1d,_0x41632b._0x56babd)],'output':_0x29c477});const _0x4346ca=getToolResultImages(_0x3c9e0a[_0x283162(-0x259,-0x24f,-_0x41632b._0x501553,-_0x41632b._0x5080b2)]);_0x4346ca[_0x283162(-_0x41632b._0x21db46,-0x27d,-_0x41632b._0x468038,-0x27b)]>0x0&&_0x11c100[_0x59a008(_0x41632b._0x3ff26a,-_0x41632b._0x4c8f2b,_0x41632b._0x35f910,-0x7)]({'type':_0x59a008(-0x11,-0x10,0x5,_0x41632b._0x362892),'role':_0x283162(-0x264,-_0x41632b._0xf1ff1a,-_0x41632b._0xa7cef2,-0x276),'content':[{'type':'input_text','text':_0x283162(-0x26d,-0x278,-_0x41632b._0x1c54a5,-_0x41632b._0x2d90f8)+_0x3c9e0a[_0x283162(-_0x41632b._0x439923,-0x26b,-_0x41632b._0x4d62a7,-_0x41632b._0x2ba4cb)]+'.'},..._0x4346ca[_0x283162(-_0x41632b._0x1fdcc0,-0x277,-_0x41632b._0xd66c72,-0x25f)](_0x2110ff=>({'type':_0x283162(-0x274,-0x26a,-0x27e,-0x264),'image_url':_0x283162(-0x22d,-0x259,-0x253,-0x248)+_0x2110ff['source'][_0x59a008(0x46,0x17,0x30,0x3f)]+';base64,'+_0x2110ff[_0x59a008(0x2e,0xc,0x29,0x47)]['data']}))]});}}pushUserContentMessage(_0x11c100,_0x4824f3['role'],_0x391680);}function _0x59a008(_0x3afbf2,_0x4c2069,_0x352369,_0x90bb9b){return _0x2374(_0x352369- -_0x20b4c3._0x1e5166,_0x90bb9b);}return{...createOpenAiResponsesReasoning(_0x159ae2),'model':_0x159ae2[_0x59a008(0x1a,0x29,_0x41632b._0x1d67ae,_0x41632b._0x431d45)],'instructions':systemToInstructions(_0x159ae2[_0x59a008(_0x41632b._0x3ff26a,_0x41632b._0x1fc3de,0x34,_0x41632b._0x5089b1)]),'input':_0x11c100,'max_output_tokens':_0x159ae2[_0x283162(-0x26f,-0x264,-0x28c,-0x26e)],'tools':_0x159ae2['tools'][_0x283162(-_0x41632b._0x85d9ed,-0x249,-_0x41632b._0x5dee07,-_0x41632b._0x3d1742)](_0x25f284=>{function _0x105595(_0x57512b,_0x58aeb7,_0xecec3e,_0x2c2b9c){return _0x283162(_0x57512b-_0x28b5e4._0x2d4aa0,_0x58aeb7,_0xecec3e-0x6f,_0xecec3e- -_0x28b5e4._0x1571d6);}function _0x5e0dbf(_0x24d94c,_0x26f17f,_0x269536,_0x5ec198){return _0x283162(_0x24d94c-_0x24579a._0x29b54c,_0x26f17f,_0x269536-_0x24579a._0x42ac81,_0x5ec198-0x2e8);}return{'type':_0x5e0dbf(0x98,_0x4e5ea8._0x2612a0,_0x4e5ea8._0x571043,_0x4e5ea8._0x278a1d),'name':_0x25f284[_0x5e0dbf(_0x4e5ea8._0x2e21b4,0x90,_0x4e5ea8._0x88b27b,_0x4e5ea8._0x3eefc8)],'description':_0x25f284[_0x105595(-_0x4e5ea8._0x20786d,-0x2a0,-_0x4e5ea8._0x4cf923,-_0x4e5ea8._0x46c3f6)],'parameters':_0x25f284[_0x5e0dbf(_0x4e5ea8._0x1a3499,_0x4e5ea8._0x124650,_0x4e5ea8._0x3f3c94,0x87)]};}),..._0x159ae2['outputFormat']?{'text':{'format':{'type':'json_schema','name':_0x159ae2[_0x59a008(0x26,_0x41632b._0x36e97e,_0x41632b._0x36594d,0x27)][_0x59a008(-0x17,-_0x41632b._0x4c5b72,0x4,-_0x41632b._0x24b26b)]??'structured_output','schema':_0x159ae2[_0x59a008(_0x41632b._0x237cee,0x2e,0x35,0x2b)][_0x59a008(0x36,_0x41632b._0x47e15f,0x2e,_0x41632b._0x493404)],'strict':_0x159ae2[_0x59a008(_0x41632b._0x5089b1,0x23,0x35,0x1d)]['strict']??!![]}}}:{}};}export{toOpenAiResponsesRequest};function _0x37d3(){const _0x22c5fb=['Dg9VBf91C2u','C291CMnL','mJuYr01VDuTg','CM9Szq','ntKYody0rgvSzuLS','Dgv4Da','C2nOzw1H','zgf0ytO','BwvKAwfFDhLWzq','mta0nZCWndDwv2TxswK','DhjPBq','zNvUy3rPB25Fy2fSBa','C3LZDgvT','B3v0Chv0rM9YBwf0','DMLZAwjPBgL0Eq','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','mtq0mhHZzgf5rG','BgvUz3rO','nteXodu3Ee5YCvHh','Dg9VBf9Yzxn1Bhq','mtq2nZu0ovHqDvvYua','C3vTBwfYEq','DxnLCG','AxnbCNjHEq','B2jQzwn0','BMfTzq','BwvZC2fNzq','zwzMB3j0','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','zNvUy3rPB25Fy2fSBf9VDxrWDxq','Bwf4vg9Rzw5Z','C3bSAwnL','y29UDgvUDa','C3rYAw5N','DxnLCI12AxnPyMXL','ChvZAa','Bw9KzwW','zgf0yq','Aw5WDxrFDgv4Da','CMvHC29UAw5N','Aw5WDxrFAw1Hz2u','zMLSDgvY','mZi3nJK2nJbUCNbIrgO','Aw5WDxrFC2nOzw1H','mtiZndbxqu1LB2S','BwfW','BwvZC2fNzxm','Aw1Hz2u','AM9PBG','yMfZzty0','Dg9VBf91C2vFAwq','zNvUy3rPB24','yxv0BW','zgvZy3jPChrPB24','yxnZAxn0yw50','DhLWzq','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','o2jHC2u2ncW','mJu3mMfusNrSAW','mtzMDxz1swq','ChjVDMLKzxjtDgf0zq'];_0x37d3=function(){return _0x22c5fb;};return _0x37d3();}
|
package/dist/chunk-QDOE7NWO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x302605,_0x239238){const _0x3c011d={_0x56f365:0x3ee,_0x43ec3c:0x412,_0x2d35a3:0x3e3,_0x422fd1:0x40a,_0x4942dd:0x40d,_0x1673bd:0x3c3,_0x749378:0x3dc,_0x454406:0x279,_0x502a7e:0x27a,_0x244f10:0x287,_0x187ae3:0x285,_0x16d7f2:0x29d,_0x2d3e69:0x3d9,_0x1c2d43:0x292,_0x5cdb8a:0x27b,_0x4470b4:0x3e7,_0x17c2ba:0x3f3},_0x5dc895=_0x302605();function _0x210828(_0x5e6e3f,_0x2bfab1,_0x206340,_0x500831){return _0x3c93(_0x500831-0x312,_0x206340);}function _0x30364e(_0x5c587,_0x194b15,_0x5e9383,_0x494999){return _0x3c93(_0x194b15-0x198,_0x5e9383);}while(!![]){try{const _0x243c4d=parseInt(_0x210828(_0x3c011d._0x56f365,_0x3c011d._0x43ec3c,_0x3c011d._0x2d35a3,0x3f8))/0x1+-parseInt(_0x210828(_0x3c011d._0x422fd1,0x416,0x428,_0x3c011d._0x4942dd))/0x2+-parseInt(_0x210828(_0x3c011d._0x1673bd,0x3e5,0x3ed,_0x3c011d._0x749378))/0x3*(parseInt(_0x30364e(0x27e,_0x3c011d._0x454406,_0x3c011d._0x502a7e,0x261))/0x4)+parseInt(_0x30364e(0x26f,0x276,0x28c,0x28c))/0x5+parseInt(_0x30364e(0x275,_0x3c011d._0x244f10,_0x3c011d._0x187ae3,_0x3c011d._0x16d7f2))/0x6+-parseInt(_0x210828(0x3d5,0x3ea,0x3f3,_0x3c011d._0x2d3e69))/0x7*(parseInt(_0x30364e(0x27c,_0x3c011d._0x1c2d43,_0x3c011d._0x5cdb8a,0x297))/0x8)+parseInt(_0x210828(_0x3c011d._0x4470b4,_0x3c011d._0x17c2ba,_0x3c011d._0x56f365,0x3ff))/0x9;if(_0x243c4d===_0x239238)break;else _0x5dc895['push'](_0x5dc895['shift']());}catch(_0x1460c6){_0x5dc895['push'](_0x5dc895['shift']());}}}(_0x2ac7,0xe7d2e));function createTextBlock(_0x1ce8ac){return{'type':'text','text':_0x1ce8ac};}function normalizeTextBlock(_0x31ea4c){const _0x25cbd6={_0x1c190b:0x33b,_0x14edb6:0x354,_0x1a5e78:0x33a},_0x40b184={_0xaaa970:0x26d};function _0x5342a0(_0x1151a3,_0x58d198,_0x1b4fbe,_0x29743e){return _0x3c93(_0x1b4fbe-_0x40b184._0xaaa970,_0x29743e);}return createTextBlock(_0x31ea4c[_0x5342a0(_0x25cbd6._0x1c190b,0x361,_0x25cbd6._0x14edb6,_0x25cbd6._0x1a5e78)]??'');}function normalizeContent(_0x2dd64a){const _0x5ced0d={_0x4a8c1f:0x128,_0x36918e:0x112,_0x30c316:0x215,_0x241aa5:0x1fd,_0x56562d:0x219,_0x4c6e3f:0x22c,_0xb29fc6:0x213},_0xfc5931={_0xa1e636:0x3ef,_0x49344b:0x3dc},_0x2204bf={_0x2beea5:0x200};function _0x20a074(_0x55b482,_0x174066,_0x480688,_0x3183c7){return _0x3c93(_0x480688- -0x2e9,_0x3183c7);}function _0x5331a2(_0x54d9e1,_0x42f0c,_0x1a46bb,_0x32c80a){return _0x3c93(_0x42f0c- -_0x2204bf._0x2beea5,_0x32c80a);}if(typeof _0x2dd64a===_0x5331a2(-0x112,-_0x5ced0d._0x4a8c1f,-0x13d,-_0x5ced0d._0x36918e))return[createTextBlock(_0x2dd64a)];if(!Array[_0x20a074(-_0x5ced0d._0x30c316,-_0x5ced0d._0x241aa5,-0x201,-_0x5ced0d._0x56562d)](_0x2dd64a))return[];return _0x2dd64a[_0x20a074(-_0x5ced0d._0x56562d,-_0x5ced0d._0x4c6e3f,-_0x5ced0d._0xb29fc6,-0x205)](_0x41690c=>{const _0x13bde2={_0x2cd007:0x1a6,_0x49c3aa:0x86};function _0x212529(_0x2e11fe,_0xd51376,_0x1d1e55,_0x2b491c){return _0x20a074(_0x2e11fe-_0x13bde2._0x2cd007,_0xd51376-_0x13bde2._0x49c3aa,_0xd51376-0x5de,_0x2e11fe);}if(_0x41690c['type']===_0x212529(_0xfc5931._0xa1e636,_0xfc5931._0x49344b,0x3e5,0x3e0))return normalizeTextBlock(_0x41690c);return structuredClone(_0x41690c);});}function normalizeSystem(_0x297b35=[]){const _0x4497d0={_0x6577e1:0x26a,_0xea97c7:0x26c,_0x488903:0x250},_0x2b062b={_0x39a779:0x385};function _0x55e86f(_0x4915c2,_0x4efa91,_0x40ed7b,_0x2dc911){return _0x3c93(_0x40ed7b-_0x2b062b._0x39a779,_0x4efa91);}function _0x5ba49b(_0x4aebc4,_0x5052ba,_0x3de242,_0x423cd3){return _0x3c93(_0x5052ba- -0x32e,_0x4aebc4);}return normalizeContent(_0x297b35)[_0x5ba49b(-_0x4497d0._0x6577e1,-0x262,-_0x4497d0._0xea97c7,-_0x4497d0._0x488903)](_0x3d479c=>_0x3d479c[_0x55e86f(0x455,0x48a,0x46e,0x469)]===_0x55e86f(0x464,0x475,0x46c,0x46b));}function _0x3c93(_0x385ac7,_0x5b115d){_0x385ac7=_0x385ac7-0xc5;const _0x2ac7d6=_0x2ac7();let _0x3c93e5=_0x2ac7d6[_0x385ac7];if(_0x3c93['EkLKFJ']===undefined){var _0x366fa6=function(_0x113b2d){const _0xe43ce2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1ce8ac='',_0x31ea4c='';for(let _0x2dd64a=0x0,_0x41690c,_0x297b35,_0x3d479c=0x0;_0x297b35=_0x113b2d['charAt'](_0x3d479c++);~_0x297b35&&(_0x41690c=_0x2dd64a%0x4?_0x41690c*0x40+_0x297b35:_0x297b35,_0x2dd64a++%0x4)?_0x1ce8ac+=String['fromCharCode'](0xff&_0x41690c>>(-0x2*_0x2dd64a&0x6)):0x0){_0x297b35=_0xe43ce2['indexOf'](_0x297b35);}for(let _0xd44edd=0x0,_0x58e301=_0x1ce8ac['length'];_0xd44edd<_0x58e301;_0xd44edd++){_0x31ea4c+='%'+('00'+_0x1ce8ac['charCodeAt'](_0xd44edd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x31ea4c);};_0x3c93['Bffygn']=_0x366fa6,_0x3c93['iGhUxz']={},_0x3c93['EkLKFJ']=!![];}const _0x2d8cc5=_0x2ac7d6[0x0],_0x419dd6=_0x385ac7+_0x2d8cc5,_0x43ff22=_0x3c93['iGhUxz'][_0x419dd6];return!_0x43ff22?(_0x3c93e5=_0x3c93['Bffygn'](_0x3c93e5),_0x3c93['iGhUxz'][_0x419dd6]=_0x3c93e5):_0x3c93e5=_0x43ff22,_0x3c93e5;}function normalizeMessage(_0xd44edd){const _0x46038b={_0x4b72f0:0xbd,_0x52c3b7:0xcd,_0x526bb7:0x195,_0x4ce73f:0x1b1,_0x16b5a5:0x1c7,_0x5ac3a6:0x199,_0x42f9e1:0x1b7,_0x1a4ef5:0xa4,_0x708fc8:0xcb},_0x4f6ef3={_0x2c4cee:0xd2},_0x180421={_0x38f82a:0x1b};function _0x4bd9a6(_0x58a6fa,_0x4343cc,_0x219ede,_0x4cb10e){return _0x3c93(_0x4343cc- -_0x180421._0x38f82a,_0x4cb10e);}function _0x4a08b7(_0x55674a,_0x46392c,_0x127e8b,_0x3eaff7){return _0x3c93(_0x46392c-_0x4f6ef3._0x2c4cee,_0x127e8b);}return{...typeof _0xd44edd['id']===_0x4bd9a6(0xce,_0x46038b._0x4b72f0,_0x46038b._0x52c3b7,0xd7)?{'id':_0xd44edd['id']}:{},'role':_0xd44edd['role'],'content':normalizeContent(_0xd44edd[_0x4a08b7(_0x46038b._0x526bb7,_0x46038b._0x4ce73f,_0x46038b._0x16b5a5,_0x46038b._0x5ac3a6)]),..._0xd44edd[_0x4a08b7(_0x46038b._0x42f9e1,0x1a9,0x1bc,0x1b1)]?{'providerState':structuredClone(_0xd44edd[_0x4bd9a6(_0x46038b._0x1a4ef5,0xbc,_0x46038b._0x708fc8,0xbb)])}:{}};}function _0x384cf3(_0x3b5add,_0x5c77c8,_0x5c4e47,_0x546e64){return _0x3c93(_0x5c77c8- -0x73,_0x546e64);}function compileRequest(_0x58e301){const _0x3549a7={_0x4270bb:0x3f4,_0x2256a0:0x3f2,_0x163eda:0x3e6,_0x4003bc:0x27d,_0x385304:0x26c,_0x3f4689:0x293,_0x520c40:0x282,_0x3b0981:0x3cc,_0x5c3b12:0x3cf,_0x58bc49:0x3b7,_0x3a3b0c:0x3b6,_0x309591:0x3c4,_0x4456f2:0x3cb,_0x54345b:0x3ca,_0x19282e:0x3ba,_0x5ae9d5:0x3b1,_0x4521d5:0x3c4,_0x45efe5:0x3a2,_0x3c170d:0x3b9,_0x2ac745:0x39d},_0x1a4661={_0x25e504:0x2f1};function _0x5230a1(_0x27afd4,_0x54c309,_0x4c0d46,_0x46cb94){return _0x3c93(_0x4c0d46-_0x1a4661._0x25e504,_0x46cb94);}function _0x368541(_0x4b51f6,_0x4c2188,_0x50bd16,_0x488eca){return _0x3c93(_0x488eca- -0x35d,_0x4c2188);}return{'model':_0x58e301[_0x5230a1(_0x3549a7._0x4270bb,_0x3549a7._0x2256a0,_0x3549a7._0x163eda,0x3d5)]??'claude-sonnet-4-20250514','max_tokens':_0x58e301[_0x368541(-_0x3549a7._0x4003bc,-0x2ab,-0x276,-0x28f)]??0x400,..._0x58e301[_0x368541(-_0x3549a7._0x385304,-_0x3549a7._0x3f4689,-0x279,-_0x3549a7._0x520c40)]?{'reasoning':structuredClone(_0x58e301[_0x5230a1(0x3be,0x3e3,_0x3549a7._0x3b0981,_0x3549a7._0x5c3b12)])}:{},'system':normalizeSystem(_0x58e301[_0x5230a1(_0x3549a7._0x58bc49,_0x3549a7._0x3a3b0c,0x3ba,0x39f)]),'messages':_0x58e301[_0x5230a1(_0x3549a7._0x309591,_0x3549a7._0x4456f2,_0x3549a7._0x309591,_0x3549a7._0x54345b)][_0x5230a1(_0x3549a7._0x19282e,_0x3549a7._0x5ae9d5,0x3c7,0x3d1)](normalizeMessage),'tools':structuredClone(_0x58e301[_0x5230a1(_0x3549a7._0x4521d5,0x3d8,0x3c0,0x3cf)]??[]),'metadata':{'session_id':_0x58e301[_0x5230a1(_0x3549a7._0x45efe5,0x3ae,_0x3549a7._0x3c170d,_0x3549a7._0x2ac745)],'turn_id':_0x58e301[_0x5230a1(0x3ae,0x3c1,0x3ca,0x3b8)]}};}function toChatRequest(_0x178538){const _0x118f95={_0xe826c0:0x89,_0x12614d:0xaa,_0x1a1ef0:0xc0,_0x136493:0xb9,_0x9b5e8f:0xa0,_0x5c8f0d:0x9b,_0x225bf7:0x1ee,_0x1b8e78:0x1c8,_0x11688e:0x1de,_0x348d52:0x1dc,_0x4ef652:0x1f2,_0x5e7ee1:0x1ec,_0x3df73c:0x1f7,_0x3eb798:0x93,_0x1a087c:0x92,_0x352cbe:0x80,_0x21828d:0x86,_0x15705d:0x7e,_0x34c7d4:0x8d},_0x2b1c0a={_0x23fabc:0x17e};function _0x54337c(_0x1b2940,_0x355321,_0xa113d5,_0x5056e4){return _0x3c93(_0x5056e4-0x10c,_0x1b2940);}function _0x562b26(_0x4033e7,_0x35f2c6,_0x34d75c,_0x2d6a15){return _0x3c93(_0x35f2c6- -_0x2b1c0a._0x23fabc,_0x34d75c);}return{'model':_0x178538[_0x562b26(-0xa2,-_0x118f95._0xe826c0,-0x93,-0x7d)],'maxTokens':_0x178538[_0x562b26(-_0x118f95._0x12614d,-0xb0,-0x98,-_0x118f95._0x1a1ef0)],..._0x178538[_0x562b26(-_0x118f95._0x136493,-0xa3,-0x93,-0xa6)]?{'reasoning':structuredClone(_0x178538[_0x562b26(-0xa6,-0xa3,-_0x118f95._0x9b5e8f,-_0x118f95._0x5c8f0d)])}:{},'system':structuredClone(_0x178538[_0x54337c(_0x118f95._0x225bf7,_0x118f95._0x1b8e78,0x1d8,0x1d5)]),'messages':structuredClone(_0x178538['messages']),'tools':structuredClone(_0x178538[_0x54337c(_0x118f95._0x11688e,0x1c0,_0x118f95._0x348d52,0x1db)]),'metadata':{'sessionId':_0x178538[_0x54337c(0x1fc,_0x118f95._0x4ef652,_0x118f95._0x5e7ee1,_0x118f95._0x3df73c)]['session_id'],'turnId':_0x178538['metadata'][_0x562b26(-_0x118f95._0x3eb798,-_0x118f95._0x1a087c,-_0x118f95._0x352cbe,-0x97)]},..._0x178538[_0x562b26(-0x94,-_0x118f95._0x21828d,-_0x118f95._0x15705d,-_0x118f95._0x34c7d4)]?{'outputFormat':structuredClone(_0x178538['outputFormat'])}:{}};}function toModelRequest(_0x7400db){const _0x4c4c5f={_0x7e7700:0x297,_0x2604d1:0x38c,_0x399d3b:0x37b,_0x538848:0x2b9,_0x209431:0x2b9,_0x545365:0x2b4,_0xcd3726:0x2c2,_0x27d2c2:0x2b6,_0x496604:0x2bb,_0x5c6465:0x2b8,_0x5daff0:0x2a1,_0x4941a1:0x2a8,_0x23be2a:0x378,_0x2f765a:0x34c,_0x4c820c:0x349,_0x21fb56:0x363,_0x34214f:0x382,_0x3a007c:0x37d},_0x53f8f4={_0x5a5d88:0x28a};function _0x17320a(_0x7c46b1,_0x2a8184,_0x2e245b,_0x575bb8){return _0x3c93(_0x575bb8-_0x53f8f4._0x5a5d88,_0x7c46b1);}function _0x5a4718(_0x534ec1,_0x20bcd3,_0x26956b,_0x2cc6a1){return _0x3c93(_0x26956b- -0x38c,_0x20bcd3);}return{'model':_0x7400db[_0x5a4718(-0x2a3,-0x2a2,-_0x4c4c5f._0x7e7700,-0x28e)],'max_tokens':_0x7400db[_0x17320a(_0x4c4c5f._0x2604d1,0x361,0x372,_0x4c4c5f._0x399d3b)],..._0x7400db['reasoning']?{'reasoning':structuredClone(_0x7400db[_0x5a4718(-_0x4c4c5f._0x538848,-0x29c,-0x2b1,-0x2b7)])}:{},'system':structuredClone(_0x7400db['system']),'messages':structuredClone(_0x7400db[_0x5a4718(-0x2c6,-0x2ae,-_0x4c4c5f._0x209431,-0x2b8)]),'tools':structuredClone(_0x7400db[_0x5a4718(-_0x4c4c5f._0x545365,-_0x4c4c5f._0xcd3726,-0x2bd,-_0x4c4c5f._0x27d2c2)]),'metadata':{'session_id':_0x7400db['metadata'][_0x17320a(0x33c,0x33a,0x36c,0x352)],'turn_id':_0x7400db[_0x5a4718(-_0x4c4c5f._0x496604,-_0x4c4c5f._0x5c6465,-_0x4c4c5f._0x5daff0,-_0x4c4c5f._0x4941a1)][_0x17320a(_0x4c4c5f._0x23be2a,_0x4c4c5f._0x2f765a,_0x4c4c5f._0x4c820c,_0x4c4c5f._0x21fb56)]},..._0x7400db[_0x17320a(0x376,0x374,0x389,_0x4c4c5f._0x34214f)]?{'outputFormat':structuredClone(_0x7400db[_0x17320a(0x390,0x36a,_0x4c4c5f._0x3a007c,0x382)])}:{}};}function toProviderModelRequest(_0x57226d){const _0x227daa={_0x4d589b:0x2e6,_0xd71815:0x2ed,_0x5bed60:0x343,_0x142bcd:0x335,_0x34ed56:0x2aa,_0xf0fb5a:0x2cc,_0x209380:0x2c4,_0x189c38:0x29a,_0x4ab656:0x2bc,_0x54661a:0x2ab},_0x5b84bc={_0x597dd4:0x1e2};function _0x2e2730(_0x5e3580,_0xeb8bc6,_0x189c31,_0x135070){return _0x3c93(_0x189c31-_0x5b84bc._0x597dd4,_0xeb8bc6);}function _0x36fb43(_0x130d37,_0x342ff5,_0xdccd16,_0x3a0691){return _0x3c93(_0x342ff5-0x283,_0x130d37);}return{'model':_0x57226d[_0x2e2730(_0x227daa._0x4d589b,_0x227daa._0xd71815,0x2d7,0x2ce)],'max_tokens':_0x57226d['maxTokens'],'system':structuredClone(_0x57226d[_0x36fb43(0x341,0x34c,_0x227daa._0x5bed60,_0x227daa._0x142bcd)]),'messages':structuredClone(_0x57226d[_0x2e2730(_0x227daa._0x34ed56,_0x227daa._0xf0fb5a,0x2b5,_0x227daa._0x209380)]),'tools':structuredClone(_0x57226d[_0x2e2730(_0x227daa._0x189c38,_0x227daa._0x4ab656,0x2b1,_0x227daa._0x54661a)])};}function toChatResponse(_0x37bf5e){const _0x413d84={_0x2bd27b:0x3a,_0x159d06:0x13,_0x248a13:0x263,_0x795f6:0x27b,_0x278641:0x27f,_0x44faae:0x264,_0x28db3b:0x3b,_0x311482:0x264,_0x531d33:0x295,_0x93a62d:0x28d,_0xffea8d:0x23,_0x5a29b6:0x16,_0x3881f8:0x2d,_0x14adfa:0x291,_0x376d04:0x277,_0x1aaa7a:0x26d,_0x1d2c6e:0x30,_0x55be9b:0xf,_0x2b8f1d:0x27c,_0x4067b2:0x28f,_0x37ca22:0x28c,_0xb1dedc:0x284,_0x4e7b39:0x27f},_0x261dbb={_0x157ac9:0xf8};function _0x349cb2(_0x3af942,_0x281cbc,_0x47645b,_0x53dde0){return _0x3c93(_0x47645b- -_0x261dbb._0x157ac9,_0x281cbc);}function _0x2d4935(_0x46e1eb,_0x17c1fc,_0x20c268,_0x503359){return _0x3c93(_0x20c268- -0x361,_0x46e1eb);}return{'id':_0x37bf5e['id'],'content':structuredClone(_0x37bf5e['content']),'stopReason':_0x37bf5e[_0x349cb2(-_0x413d84._0x2bd27b,-_0x413d84._0x159d06,-0x26,-0x2e)],'usage':{'inputTokens':_0x37bf5e[_0x2d4935(-_0x413d84._0x248a13,-_0x413d84._0x795f6,-_0x413d84._0x278641,-_0x413d84._0x44faae)][_0x349cb2(-0x14,-_0x413d84._0x28db3b,-0x28,-0x15)],'outputTokens':_0x37bf5e[_0x2d4935(-_0x413d84._0x311482,-_0x413d84._0x531d33,-0x27f,-_0x413d84._0x93a62d)]['output_tokens'],..._0x37bf5e[_0x349cb2(-0x10,-_0x413d84._0xffea8d,-_0x413d84._0x5a29b6,-_0x413d84._0x3881f8)][_0x2d4935(-0x25d,-_0x413d84._0x14adfa,-_0x413d84._0x376d04,-_0x413d84._0x1aaa7a)]!==void 0x0?{'reasoningTokens':_0x37bf5e[_0x349cb2(-0x10,-_0x413d84._0x1d2c6e,-0x16,-_0x413d84._0x55be9b)][_0x2d4935(-_0x413d84._0x2b8f1d,-_0x413d84._0x4067b2,-0x277,-0x282)]}:{}},..._0x37bf5e['providerState']?{'providerState':structuredClone(_0x37bf5e[_0x2d4935(-_0x413d84._0x37ca22,-_0x413d84._0xb1dedc,-0x28a,-_0x413d84._0x4e7b39)])}:{}};}function toModelResponse(_0x22170d){const _0x32564c={_0x55f58a:0x80,_0x47a584:0x7b,_0x3f427a:0x74,_0x256ac7:0xc9,_0x1a9316:0xce,_0x5b6151:0x75,_0x412ca4:0xe4,_0x35517d:0xc7,_0x48e0a5:0xe2,_0x96009b:0xdc,_0x5bb23b:0x58,_0x40756a:0x5a,_0x2e4286:0x7d,_0x331363:0x4e,_0x57eb61:0x7a,_0xddb5e3:0x4f,_0x4228f8:0x59,_0x3d89dc:0x44,_0x253025:0x57},_0x424c22={_0x38a5fc:0x1ad};function _0x22c347(_0x44c104,_0x1fe508,_0x8161f7,_0x28596c){return _0x3c93(_0x28596c- -_0x424c22._0x38a5fc,_0x8161f7);}function _0x5e56ad(_0x113e4d,_0x3b9869,_0x24a0a5,_0x2c7679){return _0x3c93(_0x24a0a5- -0x80,_0x2c7679);}return{'id':_0x22170d['id'],'type':_0x5e56ad(0x8b,0x81,0x73,_0x32564c._0x55f58a),'role':_0x5e56ad(_0x32564c._0x47a584,_0x32564c._0x3f427a,0x77,0x7c),'content':structuredClone(_0x22170d[_0x22c347(-0xd7,-_0x32564c._0x256ac7,-0xc6,-_0x32564c._0x1a9316)]),'stop_reason':_0x22170d['stopReason'],'stop_sequence':null,'usage':{'input_tokens':_0x22170d[_0x5e56ad(_0x32564c._0x5b6151,0x77,0x62,0x78)]['inputTokens'],'output_tokens':_0x22170d[_0x5e56ad(0x75,0x68,0x62,0x78)][_0x22c347(-_0x32564c._0x412ca4,-_0x32564c._0x35517d,-_0x32564c._0x48e0a5,-_0x32564c._0x96009b)],..._0x22170d['usage'][_0x5e56ad(0x60,_0x32564c._0x5bb23b,0x4d,_0x32564c._0x40756a)]!==void 0x0?{'reasoning_tokens':_0x22170d[_0x5e56ad(_0x32564c._0x2e4286,_0x32564c._0x331363,0x62,_0x32564c._0x57eb61)][_0x5e56ad(_0x32564c._0xddb5e3,0x34,0x4d,0x36)]}:{}},..._0x22170d[_0x5e56ad(0x4b,_0x32564c._0x4228f8,0x57,0x6d)]?{'providerState':structuredClone(_0x22170d[_0x5e56ad(_0x32564c._0x3d89dc,0x5d,_0x32564c._0x253025,0x6d)])}:{}};}function responseToAssistantMessage(_0x1f801e){const _0x1f3a7c={_0xaeb548:0x1f,_0x232278:0x40,_0x24e774:0x22,_0x4ff279:0x5a,_0x2b2c0a:0x58,_0x1f5b94:0x3d,_0x1b922f:0x186};function _0x5f5389(_0x4e90f6,_0x2f0566,_0x46acd8,_0x1bda23){return _0x3c93(_0x46acd8- -0x11e,_0x4e90f6);}function _0x1978b8(_0x135c04,_0x490727,_0x408179,_0x58c7bb){return _0x3c93(_0x58c7bb- -0x263,_0x135c04);}return{'role':_0x5f5389(-_0x1f3a7c._0xaeb548,-_0x1f3a7c._0x232278,-0x27,-_0x1f3a7c._0x24e774),'content':normalizeContent(_0x1f801e['content']),..._0x1f801e[_0x5f5389(-_0x1f3a7c._0x4ff279,-_0x1f3a7c._0x2b2c0a,-0x47,-_0x1f3a7c._0x1f5b94)]?{'providerState':structuredClone(_0x1f801e[_0x1978b8(-_0x1f3a7c._0x1b922f,-0x19a,-0x17c,-0x18c)])}:{}};}function createReasoningMessage(_0x3af4a5){const _0xf9f0a6={_0x17dc07:0x10d,_0x5a796c:0x11f,_0x3f34fe:0xfa},_0x2b1419={_0x5f20be:0x1f1},_0x4ce076={_0x1b97e7:0x1d4},_0x1e449a={_0x47d602:0x35,_0x4d7afa:0x45,_0x185797:0x49,_0x42eb5f:0x88,_0x16420f:0x86,_0x19c51b:0x7b},_0x30258b=normalizeContent(_0x3af4a5?.['content'])['filter'](_0xb8a5cb=>{function _0x3aa488(_0x7592c5,_0x29966f,_0x574409,_0x47f6f2){return _0x3c93(_0x47f6f2- -0x12e,_0x574409);}function _0x3d2277(_0x59cfca,_0x27eea8,_0x3f712b,_0x3347ba){return _0x3c93(_0x3f712b- -0x16f,_0x27eea8);}return _0xb8a5cb['type']===_0x3aa488(-0x45,-0x3b,-0x46,-0x51)||_0xb8a5cb['type']===_0x3aa488(-0x5b,-_0x1e449a._0x47d602,-_0x1e449a._0x4d7afa,-_0x1e449a._0x185797)||_0xb8a5cb[_0x3d2277(-_0x1e449a._0x42eb5f,-0x85,-_0x1e449a._0x16420f,-_0x1e449a._0x19c51b)]==='openai_reasoning';});if(_0x30258b[_0x18f604(-_0xf9f0a6._0x17dc07,-_0xf9f0a6._0x5a796c,-0x11a,-0x11c)]===0x0)return void 0x0;function _0x5cbce1(_0x11256d,_0x66a5ac,_0x112782,_0x4f2964){return _0x3c93(_0x11256d-_0x4ce076._0x1b97e7,_0x112782);}function _0x18f604(_0x2bfd31,_0x220253,_0x11c857,_0x4aee8c){return _0x3c93(_0x4aee8c- -_0x2b1419._0x5f20be,_0x220253);}return{'role':_0x18f604(-0x113,-0xf9,-0x104,-_0xf9f0a6._0x3f34fe),'content':_0x30258b};}function _0x2ac7(){const _0x16470b=['B3v0Chv0rM9YBwf0','zMXHDe1HCa','nte0nJe2vfrnCwLU','mty4mJC1mezOshHKAW','Dg9VBf9Yzxn1Bhq','zxjYB3i','mtyXu3HiDuPz','C2vZC2LVBKLK','C3LZDgvT','mJmWmtG3CuHIt3jP','khjLzgfJDgvKihjLyxnVBMLUzYK','zMLSDgvY','CMvHC29UAw5Nvg9Rzw5Z','Bwf4x3rVA2vUCW','Dg9VBhm','Aw5WDxrFDg9Rzw5Z','B3v0Chv0vg9Rzw5Z','C3rVCf9YzwfZB24','BwvZC2fNzxm','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','BgvUz3rO','BwfW','ChjVDMLKzxjtDgf0zq','C3rYAw5N','DhvYBKLK','Dg9VBf91C2u','CMvHC29UAw5N','Dg9VBf91C2vFAwq','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','mZC5mZq1meT1r1fKua','y29UDgvUDa','zw5JCNLWDgvKq29UDgvUDa','odHhDg1eu0q','DxnHz2u','kgvUy3j5ChrLzcbYzwfZB25PBMCP','AM9PBG','yw50AhjVCgLJx3rOAw5RAw5N','mtaWndGYnhbfDKv1yq','Dgv4Da','AxnbCNjHEq','DhLWzq','CMvHC29UAw5Nx3rVA2vUCW','Bwv0ywrHDge','DhvYBL9Pza','mtyYmde3mtL3y1rKzha','DxnLCG','odm2ody3neLJrw5fzq','B3bLBMfPx3jLyxnVBMLUzW','Bwf4vg9Rzw5Z','ChvZAa','BwvZC2fNzq','DhjPBq','Bw9KzwW','DgHPBMTPBMC','yxnZAxn0yw50'];_0x2ac7=function(){return _0x16470b;};return _0x2ac7();}function createAssistantTextMessage(_0x2c4d51){const _0x25b65a={_0x5f1358:0x257,_0x387e3f:0x260,_0x239a51:0x3dd,_0x4d4cbe:0x3ec,_0x2b1dfd:0x3e4,_0x23c835:0x25a,_0x5ae651:0x252,_0x520b27:0x42d,_0x4a9ca2:0x415},_0x40abc2={_0xdc735b:0x32f},_0x331f4c={_0x261409:0x1b4,_0x19aac5:0x1d6,_0x3ab800:0x1c8},_0xc3f599={_0x77b27b:0xb,_0x2e642f:0xcc,_0xd0e2cb:0x238},_0x52326d={_0x3ad592:0x20a};function _0x451ce7(_0x436566,_0x3e9b90,_0x1a10ce,_0x4fef4b){return _0x3c93(_0x4fef4b-0x31e,_0x3e9b90);}const _0x575f00=normalizeContent(_0x2c4d51?.[_0x2f3260(-_0x25b65a._0x5f1358,-0x250,-0x241,-_0x25b65a._0x387e3f)])[_0x451ce7(_0x25b65a._0x239a51,_0x25b65a._0x4d4cbe,_0x25b65a._0x2b1dfd,0x3ea)](_0x43360d=>{function _0x59651c(_0x1d3a19,_0x24ba80,_0x46ec46,_0x36f836){return _0x2f3260(_0x1d3a19,_0x36f836-_0x52326d._0x3ad592,_0x46ec46-0x25,_0x36f836-0x150);}function _0x15586c(_0x2b7222,_0x7df2f,_0x5f40b0,_0x25e2a2){return _0x451ce7(_0x2b7222-_0xc3f599._0x77b27b,_0x7df2f,_0x5f40b0-_0xc3f599._0x2e642f,_0x5f40b0- -_0xc3f599._0xd0e2cb);}return _0x43360d[_0x15586c(0x1b5,_0x331f4c._0x261409,0x1cf,_0x331f4c._0x19aac5)]===_0x15586c(0x1d4,0x1b4,0x1cd,_0x331f4c._0x3ab800);});if(_0x575f00[_0x2f3260(-0x24c,-_0x25b65a._0x23c835,-0x253,-_0x25b65a._0x5ae651)]===0x0)return void 0x0;function _0x2f3260(_0x20e019,_0x4584ea,_0x5d2aad,_0x23065b){return _0x3c93(_0x4584ea- -_0x40abc2._0xdc735b,_0x20e019);}return{'role':_0x451ce7(_0x25b65a._0x520b27,0x400,0x404,_0x25b65a._0x4a9ca2),'content':_0x575f00};}function createToolUseMessage(_0x5e07ed){const _0x4a25c6={_0x2c7e28:0x47,_0x32815e:0x27,_0xc23995:0x14},_0x3dca45={_0x277471:0x11e},_0x1aab79={_0x56d74b:0x84,_0x4d714e:0xa6,_0x2dfada:0xa5,_0x39f4b8:0x9a,_0x4813ed:0x8d,_0x26e9d2:0x96},_0xd02fc3={_0x2d0c63:0x10,_0x4efc1d:0x56,_0x25b21a:0xfa},_0x44d054={_0x294f93:0x133};function _0x5965cb(_0x5b6aea,_0x385742,_0x19cda4,_0x2c6c08){return _0x3c93(_0x2c6c08- -_0x44d054._0x294f93,_0x385742);}const _0x51c03d=normalizeContent(_0x5e07ed?.['content'])[_0x28645a(-0x42,-0x52,-_0x4a25c6._0x2c7e28,-0x55)](_0x2f95d9=>{function _0x20b661(_0x1b04c7,_0x2d8111,_0x2e2f00,_0x364a47){return _0x28645a(_0x1b04c7-0xe,_0x2e2f00-0x20e,_0x1b04c7,_0x364a47-0x19);}function _0xbaef68(_0x587620,_0x448d2a,_0x1cd0c5,_0x4c638c){return _0x28645a(_0x587620-_0xd02fc3._0x2d0c63,_0x448d2a- -_0xd02fc3._0x4efc1d,_0x587620,_0x4c638c-_0xd02fc3._0x25b21a);}return _0x2f95d9[_0xbaef68(-0x71,-0x8b,-_0x1aab79._0x56d74b,-_0x1aab79._0x4d714e)]===_0xbaef68(-_0x1aab79._0x2dfada,-_0x1aab79._0x39f4b8,-_0x1aab79._0x4813ed,-_0x1aab79._0x26e9d2);});function _0x28645a(_0x5cf05f,_0x26ac62,_0x463a31,_0x524a43){return _0x3c93(_0x26ac62- -_0x3dca45._0x277471,_0x463a31);}if(_0x51c03d[_0x5965cb(-0x59,-0x78,-0x54,-0x5e)]===0x0)return void 0x0;return{'role':_0x28645a(-0x13,-_0x4a25c6._0x32815e,-_0x4a25c6._0xc23995,-0x37),'content':_0x51c03d};}function getTextFromMessage(_0x69d17d){const _0x394c6f={_0x355fd4:0x1e3,_0x14d09b:0x1c0,_0x41c486:0x1d3,_0x1c8902:0x8c,_0x5f2a39:0x9e,_0x57493f:0xa5,_0x3adfa4:0xb9,_0x2c7c6f:0x1c6,_0x512786:0x1b4,_0xa745e0:0x1ca,_0x5612f5:0xb6,_0x294170:0x9c,_0x543c80:0xa5},_0x54e099={_0x23f1aa:0xf4},_0x544d62={_0x1e67da:0x2e};function _0x3eaca8(_0x31a190,_0x86e43a,_0x39ffdc,_0x12ece7){return _0x3c93(_0x86e43a- -_0x544d62._0x1e67da,_0x31a190);}function _0x57aa27(_0x5786e7,_0x2acb2e,_0x5ee01f,_0x442306){return _0x3c93(_0x5ee01f-_0x54e099._0x23f1aa,_0x5786e7);}return normalizeContent(_0x69d17d?.[_0x57aa27(_0x394c6f._0x355fd4,_0x394c6f._0x14d09b,_0x394c6f._0x41c486,0x1d3)])[_0x3eaca8(_0x394c6f._0x1c8902,_0x394c6f._0x5f2a39,_0x394c6f._0x57493f,_0x394c6f._0x3adfa4)](_0x4cf964=>_0x4cf964[_0x3eaca8(0xc1,0xbb,0xaa,0xcd)]===_0x3eaca8(0xb9,0xb9,0xd2,0xca))[_0x57aa27(_0x394c6f._0x2c7c6f,_0x394c6f._0x512786,_0x394c6f._0xa745e0,0x1c7)](_0x30f7c1=>_0x30f7c1[_0x57aa27(0x1f2,0x1c7,0x1db,0x1c3)])[_0x3eaca8(_0x394c6f._0x5612f5,0xb6,_0x394c6f._0x294170,_0x394c6f._0x543c80)]('\x0a');}function getReasoningTextFromMessage(_0x3e28e3){const _0x4247ee={_0x58e065:0x23a,_0x15c827:0x240,_0x5da84d:0x226,_0x5321be:0x216,_0x18be1d:0x20f,_0x213ef4:0x24c},_0x4d0495={_0x1b31dc:0x414,_0x37fcab:0x3fd,_0x549db2:0x3f1,_0x42fb96:0x3f8,_0x3a3b44:0x403,_0x1fe68f:0x386,_0x14d98f:0x39d,_0x1cfb7e:0x3a1,_0x27861e:0x3d9,_0xf41656:0x3cb,_0x31bdf9:0x3db,_0x58b4f7:0x3d3,_0x4b0672:0x3d8,_0x5c5b9c:0x3ee,_0x668e2f:0x3da,_0x342d28:0x3e3,_0x1d86ef:0x3f6,_0x21b800:0x3e4,_0xbff6fb:0x3f6,_0x2f154e:0x3a7,_0x4cd3f9:0x3b2,_0x57633b:0x3b0,_0x52b16e:0x3cf,_0x3d239d:0x3e4,_0x9269d3:0x3fb,_0x4d21b8:0x39d,_0x3c48d0:0x3bf,_0x2ef8dd:0x3b1,_0x2d7af6:0x3ae,_0xcff2d4:0x3b3,_0x4744ad:0x3af},_0x570d3c={_0x415cf6:0x7f},_0x13f2b9={_0x1cec6f:0x31f};function _0x177d49(_0x484834,_0x2651db,_0xb51073,_0x6d7aca){return _0x3c93(_0xb51073- -_0x13f2b9._0x1cec6f,_0x484834);}function _0x5104d0(_0x16c4e2,_0x218948,_0x23f28d,_0x1704e2){return _0x3c93(_0x218948- -0x313,_0x16c4e2);}return normalizeContent(_0x3e28e3?.[_0x177d49(-_0x4247ee._0x58e065,-0x248,-_0x4247ee._0x15c827,-_0x4247ee._0x5da84d)])[_0x177d49(-_0x4247ee._0x5321be,-_0x4247ee._0x18be1d,-_0x4247ee._0x5da84d,-0x211)](_0x5a06f6=>{const _0x312a71={_0x27a7c8:0x5eb,_0x5394b8:0x1bc};if(_0x5a06f6[_0x421fca(0x3fd,0x3f8,_0x4d0495._0x1b31dc,_0x4d0495._0x37fcab)]==='anthropic_thinking')return _0x5a06f6[_0x421fca(0x41a,0x405,_0x4d0495._0x549db2,0x40b)][_0x421fca(_0x4d0495._0x42fb96,_0x4d0495._0x3a3b44,_0x4d0495._0x1b31dc,0x41d)]()[_0x2c1dcf(0x392,_0x4d0495._0x1fe68f,_0x4d0495._0x14d98f,_0x4d0495._0x1cfb7e)]>0x0?[_0x5a06f6[_0x2c1dcf(_0x4d0495._0x27861e,_0x4d0495._0xf41656,_0x4d0495._0x31bdf9,0x3c2)]]:[];if(_0x5a06f6['type']===_0x421fca(0x406,0x3ec,_0x4d0495._0x58b4f7,_0x4d0495._0x4b0672))return[_0x421fca(_0x4d0495._0x5c5b9c,_0x4d0495._0x668e2f,0x3d3,_0x4d0495._0x342d28)];function _0x421fca(_0x5b1681,_0x163816,_0x271926,_0x35bcd8){return _0x177d49(_0x5b1681,_0x163816-_0x570d3c._0x415cf6,_0x163816-0x62e,_0x35bcd8-0xd5);}if(_0x5a06f6['type']!==_0x421fca(0x3f3,0x3ff,0x3ef,0x40f))return[];const _0x5620b0=_0x5a06f6['summary'][_0x421fca(_0x4d0495._0x549db2,0x3e5,_0x4d0495._0x1d86ef,0x3d9)](_0x14d4fe=>_0x14d4fe[_0x2c1dcf(0x3ae,0x3b6,0x3b3,0x3b3)])[_0x421fca(0x3f4,0x3db,_0x4d0495._0x21b800,_0x4d0495._0xbff6fb)](_0x572d55=>_0x572d55['trim']()[_0x2c1dcf(0x394,0x39d,0x3ae,0x3a1)]>0x0)[_0x2c1dcf(_0x4d0495._0x2f154e,_0x4d0495._0x4cd3f9,_0x4d0495._0x4cd3f9,_0x4d0495._0x57633b)]('\x0a\x0a');function _0x2c1dcf(_0x47659c,_0x818f0a,_0x2e352d,_0x1df726){return _0x177d49(_0x2e352d,_0x818f0a-0x1b3,_0x1df726-_0x312a71._0x27a7c8,_0x1df726-_0x312a71._0x5394b8);}if(_0x5620b0[_0x421fca(_0x4d0495._0x52b16e,_0x4d0495._0x3d239d,0x3d9,0x3fa)]>0x0)return[_0x5620b0];if(_0x5a06f6[_0x421fca(_0x4d0495._0x9269d3,_0x4d0495._0xbff6fb,0x40d,_0x4d0495._0x37fcab)]&&_0x5a06f6[_0x2c1dcf(0x399,0x3c9,0x3b1,0x3b3)][_0x421fca(0x40d,_0x4d0495._0x3a3b44,0x410,0x3f4)]()['length']>0x0)return[_0x5a06f6[_0x2c1dcf(_0x4d0495._0x4d21b8,_0x4d0495._0x57633b,_0x4d0495._0x3c48d0,0x3b3)]];return _0x5a06f6[_0x2c1dcf(0x399,0x3c0,_0x4d0495._0x2ef8dd,0x3ac)]?[_0x2c1dcf(_0x4d0495._0x2d7af6,_0x4d0495._0xcff2d4,0x3c9,_0x4d0495._0x4744ad)]:[];})[_0x177d49(-0x247,-_0x4247ee._0x213ef4,-0x23b,-0x233)]('\x0a\x0a');}function getToolUseBlocks(_0x51302e){const _0x4b7fb6={_0x35dbae:0x1e0,_0xd55573:0x1d9,_0x5238e4:0x170},_0x5ae7f9={_0x16ba8b:0x101},_0x5475ad={_0x271870:0x24b};function _0x2a2ca5(_0x5f5cdd,_0x3edc9b,_0x1bfbb8,_0x2df7f9){return _0x3c93(_0x2df7f9- -_0x5475ad._0x271870,_0x3edc9b);}function _0x191958(_0x1829ae,_0x321750,_0x3c6cbf,_0x457004){return _0x3c93(_0x3c6cbf-_0x5ae7f9._0x16ba8b,_0x321750);}return normalizeContent(_0x51302e?.[_0x191958(0x1f1,0x1ed,_0x4b7fb6._0x35dbae,_0x4b7fb6._0xd55573)])[_0x2a2ca5(-_0x4b7fb6._0x5238e4,-0x171,-0x18e,-0x17f)](_0x52eab2=>_0x52eab2[_0x2a2ca5(-0x17d,-0x156,-0x14a,-0x162)]==='tool_use');}function getToolResultBlocks(_0x312c4d){const _0x201b97={_0x1f975c:0x272};function _0x2adbc0(_0x4c5fa3,_0x1c16aa,_0x1a3a0b,_0x4f60e0){return _0x3c93(_0x1a3a0b- -_0x201b97._0x1f975c,_0x4f60e0);}function _0x4dae23(_0x39c269,_0x5dfdc5,_0x4d495c,_0x278819){return _0x3c93(_0x278819-0x160,_0x39c269);}return normalizeContent(_0x312c4d?.['content'])['filter'](_0x11f95b=>_0x11f95b[_0x4dae23(0x24a,0x22e,0x261,0x249)]===_0x4dae23(0x216,0x217,0x218,0x225));}function createToolResultUserMessage(_0x574af6){const _0x1d5114={_0x294a2e:0x1cc,_0x4a528d:0x1b4},_0x3b4f16={_0x5430d5:0x151,_0x2dd529:0x142,_0x270ac7:0x134,_0x4ab89a:0xa2,_0x5c09bd:0x99,_0x3ee488:0x80,_0x2b60ab:0x5c},_0x224a55={_0x2d201f:0x1ec,_0x592ee0:0x9c,_0x6e9db0:0x2df},_0xcf1464={_0x4da19f:0x262},_0x53838a={_0x1961f9:0xde};function _0x49774b(_0x247ff4,_0x3f5bb8,_0xc83350,_0x2e7b40){return _0x3c93(_0x247ff4-_0x53838a._0x1961f9,_0x3f5bb8);}function _0x162131(_0x53a80b,_0x19b582,_0x5ae6a6,_0x653404){return _0x3c93(_0x5ae6a6- -_0xcf1464._0x4da19f,_0x653404);}return{'role':_0x49774b(_0x1d5114._0x294a2e,0x1b7,0x1e5,0x1dc),'content':_0x574af6[_0x49774b(_0x1d5114._0x4a528d,0x1bf,0x1cf,0x1aa)](_0x370048=>{const _0x2ad3e4={_0x354135:0xbc,_0x2ff89a:0x8e};function _0x414748(_0x357065,_0x5bbee9,_0x5574e5,_0x4893e1){return _0x162131(_0x357065-_0x224a55._0x2d201f,_0x5bbee9-_0x224a55._0x592ee0,_0x5574e5-_0x224a55._0x6e9db0,_0x357065);}function _0x3fc9f0(_0x39f6a4,_0x1b0c69,_0x314fbb,_0x28fe47){return _0x49774b(_0x39f6a4- -0x135,_0x314fbb,_0x314fbb-_0x2ad3e4._0x354135,_0x28fe47-_0x2ad3e4._0x2ff89a);}return{'type':_0x414748(_0x3b4f16._0x5430d5,0x13c,_0x3b4f16._0x2dd529,_0x3b4f16._0x270ac7),'tool_use_id':_0x370048['callId'],'content':_0x370048[_0x3fc9f0(0x88,_0x3b4f16._0x4ab89a,_0x3b4f16._0x5c09bd,0x9a)]??_0x370048['output'],'is_error':_0x370048['status']===_0x3fc9f0(0x6f,0x78,_0x3b4f16._0x3ee488,_0x3b4f16._0x2b60ab)};})};}var INTERRUPTED_TOOL_RESULT_TEXT=_0x384cf3(0x79,0x61,0x79,0x58);function synthesizeMissingToolResults(_0x393cc6){const _0x362992={_0x30b483:0x2f,_0x52dfeb:0x12c,_0x17a7ce:0x137,_0x4bea1a:0x13f,_0x427a7b:0x15d,_0x385937:0x12f,_0x393647:0x148},_0x26835b={_0x1b0b8b:0x166,_0x44c227:0x1ab,_0x322ac6:0xe3},_0x53b45a={_0x44224d:0x85};function _0x41a4cf(_0x237b9e,_0x127183,_0x502617,_0x406cc1){return _0x384cf3(_0x237b9e-0x19d,_0x127183- -_0x53b45a._0x44224d,_0x502617-0x13b,_0x237b9e);}const _0x1200db=new Set();for(const _0x1d868b of _0x393cc6){for(const _0x238d9a of getToolResultBlocks(_0x1d868b)){_0x1200db['add'](_0x238d9a[_0x41a4cf(-_0x362992._0x30b483,-0x1c,-0x2d,-0x28)]);}}const _0x4649b4=[];for(const _0x2aa5d3 of _0x393cc6){_0x4649b4[_0x3576bd(-0x143,-0x130,-_0x362992._0x52dfeb,-_0x362992._0x17a7ce)](_0x2aa5d3);const _0x5a74ac=getToolUseBlocks(_0x2aa5d3)['filter'](_0x3c80c3=>!_0x1200db['has'](_0x3c80c3['id']));if(_0x5a74ac[_0x3576bd(-_0x362992._0x4bea1a,-0x136,-0x149,-0x138)]===0x0)continue;_0x4649b4['push']({'role':_0x3576bd(-0x120,-0x13d,-0x130,-0x14c),'content':_0x5a74ac[_0x3576bd(-_0x362992._0x427a7b,-_0x362992._0x385937,-_0x362992._0x393647,-0x158)](_0x39ef3e=>({'type':_0x41a4cf(-0x45,-0x33,-0x19,-0x2d),'tool_use_id':_0x39ef3e['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0xccbf34 of _0x5a74ac){_0x1200db['add'](_0xccbf34['id']);}}function _0x3576bd(_0x21318c,_0x381d88,_0x1a9bfc,_0x209e8b){return _0x384cf3(_0x21318c-_0x26835b._0x1b0b8b,_0x1a9bfc- -_0x26835b._0x44c227,_0x1a9bfc-_0x26835b._0x322ac6,_0x381d88);}return _0x4649b4;}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage,INTERRUPTED_TOOL_RESULT_TEXT,synthesizeMissingToolResults};
|