@nuvin/agent-core 0.1.0-rc.7 → 0.1.0-rc.9

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.
@@ -1,6 +1,6 @@
1
1
  import type { ListToolsResult } from "@modelcontextprotocol/sdk/types.js";
2
2
  import type { MCPServerConfig } from "@nuvin/config";
3
- import type { AnyToolDefinition } from "../shared/types.ts";
3
+ import type { AnyToolDefinition, JsonValue } from "../shared/types.ts";
4
4
  import { type McpToolClient } from "./mcp-tool-adapter.ts";
5
5
  interface ConnectedMcpClient extends McpToolClient {
6
6
  listTools(): Promise<ListToolsResult>;
@@ -18,9 +18,26 @@ export type McpServerConnectionStatus = {
18
18
  status: "error";
19
19
  message: string;
20
20
  };
21
+ /**
22
+ * One MCP tool's user-facing descriptor, grouped per server. Populated only for
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
+ */
27
+ export type McpServerToolInfo = {
28
+ name: string;
29
+ description?: string;
30
+ inputSchema?: JsonValue;
31
+ };
21
32
  export interface McpToolBundle {
22
33
  tools: AnyToolDefinition[];
23
34
  servers: Record<string, McpServerConnectionStatus>;
35
+ /**
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
+ */
40
+ serverTools?: Record<string, McpServerToolInfo[]>;
24
41
  close(): Promise<void>;
25
42
  }
26
43
  export interface McpConnectionOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvin/agent-core",
3
- "version": "0.1.0-rc.7",
3
+ "version": "0.1.0-rc.9",
4
4
  "private": false,
5
5
  "description": "Core agent, model, format, and tool primitives for Nuvin",
6
6
  "license": "Apache-2.0",
@@ -1 +0,0 @@
1
- (function(_0x5aeb77,_0x4059ec){const _0x562a0e={_0x5f3a64:0x2b1,_0x1a1868:0x35e,_0x5261fa:0x377,_0xef8b9b:0x3ac,_0x219675:0x27b,_0x209bb4:0x2c4,_0x543181:0x2e4,_0x11fa8f:0x2f1,_0x4b1f49:0x2a8,_0x7bd45:0x32c,_0x3862ad:0x349,_0x39a688:0x318,_0x518b79:0x347,_0x92e83c:0x35f,_0x4c28ea:0x321,_0x392df9:0x2fb,_0x4579d1:0x36f,_0x3b9179:0x3d0,_0x5420e5:0x362,_0x5cce26:0x3fb,_0x1dc7c0:0x3bc,_0x111a06:0x3ab},_0x1dca61={_0xa17810:0x307};function _0xb080a7(_0x1aaa7c,_0x4cdcb2,_0x4067cb,_0x83e4b0){return _0x1165(_0x4067cb- -_0x1dca61._0xa17810,_0x1aaa7c);}const _0xeabaf3=_0x5aeb77();function _0x250d76(_0x556dd8,_0x309d6b,_0x1a5066,_0x2f48a6){return _0x1165(_0x1a5066-0x2b0,_0x556dd8);}while(!![]){try{const _0xe4c7bf=-parseInt(_0xb080a7(-_0x562a0e._0x5f3a64,-0x24c,-0x28f,-0x25d))/0x1*(parseInt(_0x250d76(0x344,_0x562a0e._0x1a1868,_0x562a0e._0x5261fa,_0x562a0e._0xef8b9b))/0x2)+parseInt(_0xb080a7(-0x235,-_0x562a0e._0x219675,-0x27b,-0x267))/0x3+parseInt(_0x250d76(_0x562a0e._0x209bb4,_0x562a0e._0x543181,0x317,0x2e8))/0x4+parseInt(_0xb080a7(-_0x562a0e._0x11fa8f,-0x2c6,-0x29c,-_0x562a0e._0x4b1f49))/0x5+-parseInt(_0x250d76(_0x562a0e._0x7bd45,0x2f6,0x331,0x326))/0x6*(-parseInt(_0x250d76(_0x562a0e._0x3862ad,_0x562a0e._0x39a688,_0x562a0e._0x518b79,0x342))/0x7)+parseInt(_0x250d76(0x2e8,_0x562a0e._0x92e83c,_0x562a0e._0x4c28ea,_0x562a0e._0x392df9))/0x8*(-parseInt(_0x250d76(_0x562a0e._0x4579d1,0x3db,0x389,_0x562a0e._0x3b9179))/0x9)+-parseInt(_0x250d76(_0x562a0e._0x5420e5,_0x562a0e._0x5cce26,_0x562a0e._0x1dc7c0,0x413))/0xa*(parseInt(_0x250d76(_0x562a0e._0x111a06,0x3ea,0x3a9,0x39b))/0xb);if(_0xe4c7bf===_0x4059ec)break;else _0xeabaf3['push'](_0xeabaf3['shift']());}catch(_0x6fb71d){_0xeabaf3['push'](_0xeabaf3['shift']());}}}(_0x55af,0x7e95c));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-QDOE7NWO.js';function _0x1165(_0x1dd654,_0x1c35ca){_0x1dd654=_0x1dd654-0x67;const _0x55af66=_0x55af();let _0x1165aa=_0x55af66[_0x1dd654];if(_0x1165['edpJLS']===undefined){var _0x26b250=function(_0x79bd2c){const _0x3f9bf1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x195b45='',_0xb3193b='';for(let _0x25f984=0x0,_0x2664e8,_0x5f4e6b,_0x4d02b3=0x0;_0x5f4e6b=_0x79bd2c['charAt'](_0x4d02b3++);~_0x5f4e6b&&(_0x2664e8=_0x25f984%0x4?_0x2664e8*0x40+_0x5f4e6b:_0x5f4e6b,_0x25f984++%0x4)?_0x195b45+=String['fromCharCode'](0xff&_0x2664e8>>(-0x2*_0x25f984&0x6)):0x0){_0x5f4e6b=_0x3f9bf1['indexOf'](_0x5f4e6b);}for(let _0x729211=0x0,_0x40c72e=_0x195b45['length'];_0x729211<_0x40c72e;_0x729211++){_0xb3193b+='%'+('00'+_0x195b45['charCodeAt'](_0x729211)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xb3193b);};_0x1165['xznNTP']=_0x26b250,_0x1165['fMOGQN']={},_0x1165['edpJLS']=!![];}const _0x75ac25=_0x55af66[0x0],_0x42f3f1=_0x1dd654+_0x75ac25,_0x1d1488=_0x1165['fMOGQN'][_0x42f3f1];return!_0x1d1488?(_0x1165aa=_0x1165['xznNTP'](_0x1165aa),_0x1165['fMOGQN'][_0x42f3f1]=_0x1165aa):_0x1165aa=_0x1d1488,_0x1165aa;}import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x195b45){const _0x359306={_0x407003:0x325,_0x56e469:0x30b,_0x2157a9:0x32a,_0x4b8f1c:0x323,_0xcec9ad:0x2d0},_0x1c51cc={_0x1c8649:0x246},_0x5c8e63={_0x3a97f2:0x2};function _0x56fd9e(_0x4177e7,_0x182839,_0x4430e1,_0x245612){return _0x1165(_0x245612-_0x5c8e63._0x3a97f2,_0x182839);}function _0xfb713(_0x14c628,_0x5381d0,_0x51f9ff,_0x121670){return _0x1165(_0x14c628-_0x1c51cc._0x1c8649,_0x5381d0);}return typeof _0x195b45===_0xfb713(_0x359306._0x407003,0x34c,0x359,_0x359306._0x56e469)&&_0x195b45!==null&&!Array[_0xfb713(_0x359306._0x2157a9,0x363,_0x359306._0x4b8f1c,_0x359306._0xcec9ad)](_0x195b45);}function isToolOutputEnvelope(_0xb3193b){const _0x500296={_0x4b6efe:0x115,_0x4f4a8c:0x10a,_0x395a25:0x20d,_0x1d9f13:0x1ee,_0x4dc564:0x21e,_0x50e044:0x163,_0x282c99:0x16f,_0x3af6f1:0x11c,_0x6d75fb:0xa9,_0x20a00f:0x152,_0x333112:0x14f,_0x5cf241:0x104,_0x226674:0x135,_0x1eddff:0x120},_0x13e0a2={_0x796dc1:0x1e9};function _0x31f7c9(_0x1d1f0a,_0x4ee61c,_0x20a435,_0x29dcce){return _0x1165(_0x29dcce- -_0x13e0a2._0x796dc1,_0x20a435);}if(typeof _0xb3193b!==_0x31f7c9(-0x101,-_0x500296._0x4b6efe,-0x158,-_0x500296._0x4f4a8c)||_0xb3193b===null||Array[_0x5c2b5c(_0x500296._0x395a25,_0x500296._0x1d9f13,_0x500296._0x4dc564,0x222)](_0xb3193b))return![];function _0x5c2b5c(_0xdf7651,_0x2d2213,_0x56b0f6,_0x2aaf69){return _0x1165(_0xdf7651-0x129,_0x2aaf69);}if(typeof _0xb3193b[_0x31f7c9(-_0x500296._0x50e044,-_0x500296._0x282c99,-0x16a,-_0x500296._0x3af6f1)]!==_0x31f7c9(-_0x500296._0x6d75fb,-_0x500296._0x20a00f,-_0x500296._0x333112,-_0x500296._0x5cf241))return![];const _0x25f984=_0xb3193b[_0x31f7c9(-0x10c,-_0x500296._0x226674,-0xea,-_0x500296._0x1eddff)];return _0x25f984===void 0x0||isJsonObject(_0x25f984);}function validateAgainstSchema(_0x2664e8,_0x5f4e6b,_0x4d02b3){const _0x24937b={_0x21a0d1:0x44a,_0x4a822c:0x1a3,_0x200fac:0x41b,_0x33c227:0x46f,_0x589c09:0x3f4,_0x579e6a:0x432,_0x260f77:0x3d2,_0x295336:0x445,_0x746dbc:0x42b,_0xd290af:0x17f,_0x5001e5:0x1c6,_0x562c43:0x3d3,_0x4d325c:0x41c,_0x425a87:0x428,_0x417a88:0x47b,_0x11aa55:0x449,_0x455eeb:0x3f1,_0x11b4bb:0x405,_0x2a8496:0x393,_0xff2c10:0x3dd,_0x42ce86:0x1a8,_0x198b21:0x3df,_0x546a0f:0x40d,_0xe2dc35:0x3ff,_0x180ef3:0x49a,_0x24ebac:0x43c,_0x562a68:0x43d,_0x5c2dac:0x4bc,_0x48f068:0x478},_0x496c5c={_0x34c87d:0x32f,_0x332a9f:0x306},_0x4dc11d={_0x263bc4:0xc9},_0x3dcec7={_0x1b00a6:0x365};function _0x1f6eca(_0x3254c2,_0x35250d,_0x1f450b,_0x1d956c){return _0x1165(_0x35250d-_0x3dcec7._0x1b00a6,_0x3254c2);}function _0x38e335(_0x2363d9,_0x563f5b,_0xe794a,_0x13b98f){return _0x1165(_0x563f5b-_0x4dc11d._0x263bc4,_0x13b98f);}switch(_0x4d02b3['type']){case _0x1f6eca(0x468,_0x24937b._0x21a0d1,0x47f,0x467):if(typeof _0x5f4e6b!==_0x38e335(_0x24937b._0x4a822c,0x1ae,0x18b,0x173))throw new Error(_0x1f6eca(0x43f,_0x24937b._0x200fac,0x44f,_0x24937b._0x33c227)+_0x2664e8+_0x1f6eca(0x441,_0x24937b._0x589c09,_0x24937b._0x579e6a,0x3ae));return;case'number':if(typeof _0x5f4e6b!=='number')throw new Error(_0x1f6eca(0x44a,0x41b,_0x24937b._0x260f77,_0x24937b._0x295336)+_0x2664e8+_0x1f6eca(0x47b,_0x24937b._0x746dbc,0x43f,0x3f9));return;case _0x38e335(0x1f9,0x1c6,0x1e9,0x201):if(typeof _0x5f4e6b!==_0x38e335(_0x24937b._0xd290af,_0x24937b._0x5001e5,0x20c,0x199))throw new Error(_0x1f6eca(0x43d,0x41b,0x3e4,0x414)+_0x2664e8+_0x1f6eca(_0x24937b._0x562c43,_0x24937b._0x4d325c,0x474,_0x24937b._0x425a87));return;case _0x1f6eca(0x468,0x43d,0x48d,_0x24937b._0x417a88):if(!Array[_0x1f6eca(0x454,_0x24937b._0x11aa55,_0x24937b._0x455eeb,_0x24937b._0x11b4bb)](_0x5f4e6b))throw new Error(_0x38e335(0x1cd,_0x24937b._0xd290af,0x140,0x175)+_0x2664e8+_0x1f6eca(_0x24937b._0x2a8496,0x3d7,_0x24937b._0xff2c10,0x38a));_0x5f4e6b['forEach']((_0x729211,_0x40c72e)=>{function _0x398cd9(_0x4fa1d3,_0x377003,_0x1c808f,_0xfcef85){return _0x38e335(_0x4fa1d3-0x52,_0x1c808f-0x152,_0x1c808f-0x75,_0xfcef85);}validateAgainstSchema(_0x2664e8+'['+_0x40c72e+']',_0x729211,_0x4d02b3[_0x398cd9(0x313,0x323,_0x496c5c._0x34c87d,_0x496c5c._0x332a9f)]);});return;case'object':if(!isJsonObject(_0x5f4e6b))throw new Error(_0x38e335(0x12e,0x17f,_0x24937b._0x42ce86,0x195)+_0x2664e8+_0x1f6eca(_0x24937b._0x198b21,_0x24937b._0x546a0f,_0x24937b._0xe2dc35,0x41b));for(const _0x5c1335 of _0x4d02b3['required']??[]){if(!(_0x5c1335 in _0x5f4e6b))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x2664e8+':\x20missing\x20required\x20field\x20\x22'+_0x5c1335+'\x22');}for(const [_0x323b9a,_0xca2e7a]of Object[_0x1f6eca(_0x24937b._0x180ef3,0x47b,_0x24937b._0x24ebac,_0x24937b._0x562a68)](_0x4d02b3[_0x1f6eca(_0x24937b._0x5c2dac,_0x24937b._0x48f068,0x470,0x452)])){_0x323b9a in _0x5f4e6b&&validateAgainstSchema(_0x2664e8+'.'+_0x323b9a,_0x5f4e6b[_0x323b9a],_0xca2e7a);}}}function normalizeToolOutputValue(_0x35435c){const _0x40bdb8={_0x331f25:0x365,_0x311275:0x312,_0x29c858:0x2b0,_0x310907:0x222,_0x196545:0x227,_0x1b6341:0x1cd,_0x17751e:0x25f,_0x4d53a4:0x252,_0x5b3f8b:0x29c,_0x538136:0x287,_0x40b500:0x264,_0x4b5bbc:0x322,_0xc40b6e:0x357},_0x3fbf2f={_0x97b435:0x26c};if(isToolOutputEnvelope(_0x35435c))return{'output':_0x35435c[_0x3987c2(0x339,_0x40bdb8._0x331f25,0x2ec,_0x40bdb8._0x311275)],'structured':_0x35435c[_0x11126f(-0x27b,-0x27d,-0x224,-_0x40bdb8._0x29c858)]??{'value':_0x35435c[_0x11126f(-0x277,-0x277,-_0x40bdb8._0x310907,-0x28a)]},..._0x35435c[_0x11126f(-_0x40bdb8._0x196545,-0x201,-_0x40bdb8._0x1b6341,-0x217)]!==void 0x0?{'content':_0x35435c['content']}:{}};function _0x11126f(_0x4196fa,_0x2a267b,_0x3b0004,_0x29bfb8){return _0x1165(_0x4196fa- -0x344,_0x3b0004);}if(typeof _0x35435c===_0x11126f(-_0x40bdb8._0x17751e,-0x216,-_0x40bdb8._0x4d53a4,-_0x40bdb8._0x5b3f8b))return{'output':_0x35435c,'structured':{'value':_0x35435c}};function _0x3987c2(_0x391bdc,_0x8e4f4d,_0x227e82,_0x9f9984){return _0x1165(_0x391bdc-_0x3fbf2f._0x97b435,_0x227e82);}if(typeof _0x35435c===_0x11126f(-0x265,-0x2b0,-0x25e,-0x2b7)&&_0x35435c!==null&&!Array[_0x11126f(-0x260,-_0x40bdb8._0x538136,-0x2a4,-_0x40bdb8._0x40b500)](_0x35435c))return{'output':JSON['stringify'](_0x35435c,null,0x2),'structured':_0x35435c};return{'output':JSON[_0x3987c2(0x318,0x329,_0x40bdb8._0x4b5bbc,_0x40bdb8._0xc40b6e)](_0x35435c,null,0x2),'structured':{'value':_0x35435c}};}function createToolOutput(_0x2c0d24,_0x5bd4f9={'value':_0x2c0d24},_0x172167){return{'output':_0x2c0d24,'structured':_0x5bd4f9,..._0x172167!==void 0x0?{'content':_0x172167}:{}};}var ToolExecutionError=class extends Error{[_0x17b500(-0x11a,-0x187,-0xe7,-0x131)];constructor(_0x5ca2a2,_0xb40c46={}){const _0x2f7993={_0x158cf9:0xce,_0x4b519f:0xfe,_0x204649:0x116,_0x623ee1:0x116},_0x49e061={_0x12fd63:0x8d},_0x2da0fe={_0x4cd2d2:0xf9,_0x3e6b3c:0x266};super(_0x5ca2a2),this['name']=_0x3ce653(_0x2f7993._0x158cf9,_0x2f7993._0x4b519f,0x127,0x114);function _0x3ce653(_0x1ec9f3,_0x3304ef,_0x3f6f5d,_0x5cd2a7){return _0x17b500(_0x5cd2a7,_0x3304ef-0x1c9,_0x3f6f5d-_0x2da0fe._0x4cd2d2,_0x3304ef-_0x2da0fe._0x3e6b3c);}function _0x3a078e(_0x100563,_0x5b3e55,_0x24993c,_0x383da3){return _0x17b500(_0x100563,_0x5b3e55-0x183,_0x24993c-_0x49e061._0x12fd63,_0x24993c-0x44d);}this[_0x3ce653(_0x2f7993._0x204649,0x135,0x10f,_0x2f7993._0x623ee1)]=_0xb40c46;}};function defineTool(_0x3a4f4b){return _0x3a4f4b;}var ToolRegistry=class{[_0x17b500(-0x127,-0x1c4,-0x19c,-0x172)]=new Map();constructor(_0x5260ca=[]){const _0x2fd0f4={_0x1c825e:0x41c,_0x56bf8e:0x459};function _0x211cd5(_0x53644f,_0x5b7f3b,_0x12258d,_0xa66c30){return _0x17b500(_0x12258d,_0x5b7f3b-0x5e,_0x12258d-0x140,_0x53644f-0x545);}for(const _0x25348f of _0x5260ca){this[_0x211cd5(_0x2fd0f4._0x1c825e,0x451,_0x2fd0f4._0x56bf8e,0x3cf)](_0x25348f);}}['register'](_0x15d1d2){const _0x538a7f={_0x365f93:0x1b1,_0x553b46:0x21a},_0x23cdf2={_0xf95478:0xe8,_0x52c72d:0x365};function _0x54d43a(_0x13ee9d,_0x276735,_0x12b0aa,_0x34e5fc){return _0x17b500(_0x34e5fc,_0x276735-_0x23cdf2._0xf95478,_0x12b0aa-0x81,_0x276735-_0x23cdf2._0x52c72d);}this[_0x54d43a(_0x538a7f._0x365f93,0x1f3,_0x538a7f._0x553b46,0x1ca)]['set'](_0x15d1d2['name'],_0x15d1d2);}[_0x48a7b0(-0x20d,-0x254,-0x216,-0x21c)](_0x5a4c5f){const _0x1532cd={_0x1ccbd1:0x1a7},_0x222160={_0x44ae45:0x3ec};function _0xfc3487(_0x501c12,_0x2215ee,_0xcd723e,_0x2146ba){return _0x48a7b0(_0xcd723e,_0x2215ee-0x153,_0x501c12-_0x222160._0x44ae45,_0x2146ba-0x1d7);}return this['toolsByName'][_0xfc3487(0x1d6,0x1b1,0x19e,_0x1532cd._0x1ccbd1)](_0x5a4c5f);}[_0x48a7b0(-0x231,-0x276,-0x236,-0x291)](){const _0x4009ae={_0x2ee9a5:0x105,_0x458c78:0x135,_0x3dd094:0x119,_0x228303:0x182,_0x791f6:0x13e,_0x2b83a4:0x1d2},_0x275a33={_0xf39984:0x1da};function _0x181a39(_0x4c3f86,_0x3f8238,_0x480e54,_0x3ddf3a){return _0x17b500(_0x3f8238,_0x3f8238-0x106,_0x480e54-0x1c,_0x4c3f86-0x277);}function _0x5394f8(_0x32b74a,_0x441124,_0x53ef39,_0x218c95){return _0x17b500(_0x32b74a,_0x441124-0x1bf,_0x53ef39-_0x275a33._0xf39984,_0x53ef39- -0x1e3);}return[...this[_0x181a39(_0x4009ae._0x2ee9a5,_0x4009ae._0x458c78,_0x4009ae._0x3dd094,0x116)][_0x181a39(_0x4009ae._0x228303,_0x4009ae._0x791f6,0x190,_0x4009ae._0x2b83a4)]()];}['listToolSchemas'](){const _0x1ff2a0={_0x30a0f4:0xaa,_0x585412:0x90,_0x153d05:0x2c6,_0x3ca615:0x271,_0x24d947:0x30c,_0x3912e8:0x2ac},_0x9536ed={_0xb56795:0x27,_0x3bc0f4:0x62,_0x576bf8:0x64,_0x357936:0xc4,_0x3ff116:0x79,_0x4b7005:0x82,_0x109e7b:0xb8,_0x1b5e82:0x71},_0x5136e1={_0x44f4ff:0x352,_0x1ab568:0x184},_0x314cfa={_0x5a1df3:0xfb,_0xaf9183:0x1ba},_0x54031f={_0x47e0a4:0x73,_0xba856a:0x10f},_0x5a4963={_0x4dc4e1:0x124};function _0x58eb79(_0x476bcf,_0x3bbb4a,_0x265567,_0x27432d){return _0x48a7b0(_0x3bbb4a,_0x3bbb4a-0x19c,_0x476bcf- -0x42,_0x27432d-_0x5a4963._0x4dc4e1);}function _0x381937(_0x541f75,_0x26acab,_0x373b87,_0x172a76){return _0x17b500(_0x541f75,_0x26acab-_0x54031f._0x47e0a4,_0x373b87-_0x54031f._0xba856a,_0x26acab-0x19c);}return this[_0x381937(0x76,0x91,_0x1ff2a0._0x30a0f4,_0x1ff2a0._0x585412)]()[_0x58eb79(-_0x1ff2a0._0x153d05,-_0x1ff2a0._0x3ca615,-_0x1ff2a0._0x24d947,-_0x1ff2a0._0x3912e8)](_0x18d8fb=>{function _0x4b6fd6(_0x187ee1,_0x5af99f,_0x1ec53e,_0x5b3906){return _0x381937(_0x187ee1,_0x5b3906- -0xbf,_0x1ec53e-_0x314cfa._0x5a1df3,_0x5b3906-_0x314cfa._0xaf9183);}function _0x7bbd85(_0x5c33c4,_0x18b7b4,_0x1ca9a3,_0x32dfd8){return _0x58eb79(_0x32dfd8-_0x5136e1._0x44f4ff,_0x18b7b4,_0x1ca9a3-0x1a0,_0x32dfd8-_0x5136e1._0x1ab568);}return{'name':_0x18d8fb[_0x4b6fd6(-0x58,-_0x9536ed._0xb56795,-_0x9536ed._0x3bc0f4,-_0x9536ed._0x576bf8)],'description':_0x18d8fb[_0x4b6fd6(-0x93,-_0x9536ed._0x357936,-_0x9536ed._0x3ff116,-_0x9536ed._0x4b7005)],'input_schema':_0x18d8fb[_0x4b6fd6(-_0x9536ed._0x109e7b,-_0x9536ed._0x1b5e82,-0x52,-0x93)]};});}};function validateToolInput(_0x492fbf,_0x3e4976){return validateAgainstSchema('input',_0x492fbf,_0x3e4976),_0x492fbf;}function deriveFinalToolOutput(_0x38674d){const _0x53f5d5={_0x1b3735:0x386,_0x1d8688:0x39e,_0x35ab44:0x3d9,_0x3d61ea:0x3f4,_0x1166e8:0x35e,_0x3dbdc4:0x397,_0x112be5:0x468,_0x161814:0x4a2,_0x178d7b:0x39c,_0x1c128f:0x3eb,_0x2424ed:0x428,_0x19885b:0x374,_0x275eb8:0x3cd,_0x2af1da:0x3d8,_0x22f733:0x345,_0xd0c52f:0x36f,_0x419124:0x382,_0x3aaa07:0x357,_0x2b06d3:0x350,_0x56e92a:0x332,_0x44f5ef:0x36f,_0x2ca65d:0x3b7,_0x149d29:0x3c3,_0x5cee98:0x3ec},_0x37d807={_0x280268:0x171,_0x4809bd:0x1a9,_0x3c4be2:0x4c8},_0x9b4371={_0x1fdd47:0x1c3};function _0x8eb9d3(_0x24eefc,_0x3d5684,_0x13ba0b,_0x5a12c7){return _0x48a7b0(_0x13ba0b,_0x3d5684-_0x9b4371._0x1fdd47,_0x24eefc-0x670,_0x5a12c7-0x183);}if(_0x38674d[_0x3bed7e(0x38c,_0x53f5d5._0x1b3735,_0x53f5d5._0x1d8688,0x388)]===0x0)return{'output':'','structured':{}};function _0x3bed7e(_0x220681,_0x3ef8cf,_0x8d8a76,_0x3dc072){return _0x17b500(_0x8d8a76,_0x3ef8cf-_0x37d807._0x280268,_0x8d8a76-_0x37d807._0x4809bd,_0x3ef8cf-_0x37d807._0x3c4be2);}if(_0x38674d[_0x3bed7e(0x3d9,0x386,_0x53f5d5._0x35ab44,0x3e1)]===0x1)return{'output':_0x38674d[0x0][_0x3bed7e(0x342,0x39b,_0x53f5d5._0x3d61ea,_0x53f5d5._0x1166e8)],'structured':_0x38674d[0x0][_0x3bed7e(0x3de,_0x53f5d5._0x3dbdc4,0x398,0x36d)],..._0x38674d[0x0][_0x8eb9d3(_0x53f5d5._0x112be5,0x49f,_0x53f5d5._0x161814,0x454)]!==void 0x0?{'content':_0x38674d[0x0][_0x3bed7e(_0x53f5d5._0x178d7b,_0x53f5d5._0x1c128f,0x3ee,_0x53f5d5._0x2424ed)]}:{}};const _0xa6a363=_0x38674d[_0x3bed7e(_0x53f5d5._0x19885b,_0x53f5d5._0x275eb8,_0x53f5d5._0x2af1da,0x38a)](_0x212201=>_0x212201[_0x8eb9d3(0x468,0x460,0x41a,0x432)]!==void 0x0);return{'output':_0x38674d[_0x3bed7e(_0x53f5d5._0x22f733,_0x53f5d5._0xd0c52f,0x3a8,0x31b)](_0x48df1b=>_0x48df1b['output'])[_0x3bed7e(_0x53f5d5._0x419124,_0x53f5d5._0x3aaa07,_0x53f5d5._0x2b06d3,_0x53f5d5._0x56e92a)](''),'structured':{'chunks':_0x38674d[_0x3bed7e(0x393,_0x53f5d5._0x44f5ef,0x371,_0x53f5d5._0x2ca65d)](_0x47697c=>_0x47697c[_0x8eb9d3(0x414,0x3c3,0x44d,0x407)])},..._0xa6a363[_0x8eb9d3(0x403,_0x53f5d5._0x149d29,0x40f,_0x53f5d5._0x5cee98)]===0x1?{'content':_0xa6a363[0x0]['content']}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x1f4042,_0x3c7d4a,_0x4dd124,_0x2d8023=[]){const _0x2c5c13={_0x5cbd5e:0x328,_0x382ef8:0x2ee,_0x143f10:0x30f,_0x349f32:0x29a,_0x218185:0x27f,_0x1bf0c3:0x1dd},_0x4de5ba={_0x1d53b1:0x48c};function _0x4274a9(_0x5f4b0d,_0x270d9d,_0x58ee18,_0x2128e3){return _0x17b500(_0x5f4b0d,_0x270d9d-0x36,_0x58ee18-0x13c,_0x270d9d-0x42f);}function _0xd95247(_0x53c1c6,_0x2038b,_0xbe59e7,_0x304e95){return _0x48a7b0(_0x304e95,_0x2038b-0xe7,_0x2038b-_0x4de5ba._0x1d53b1,_0x304e95-0x26);}return{'callId':_0x1f4042['id'],'toolName':_0x1f4042[_0x4274a9(_0x2c5c13._0x5cbd5e,_0x2c5c13._0x382ef8,_0x2c5c13._0x143f10,_0x2c5c13._0x349f32)],'status':_0xd95247(0x24a,0x22b,_0x2c5c13._0x218185,_0x2c5c13._0x1bf0c3),'output':_0x3c7d4a,'structured':_0x4dd124,'chunks':_0x2d8023,'meta':createToolMeta()};}function createRejectedToolResult(_0x342fc1,_0x52c033){const _0x4e234a={_0x4b5f30:0xe4,_0xa02307:0x15e,_0x5d10bf:0x115,_0x143f47:0x157,_0x1e00bc:0x120,_0x10a469:0x160,_0xfc82f7:0x138,_0xea7304:0xe7,_0x1e7152:0xb3,_0x76b9c7:0x171,_0x3bd1ee:0x154,_0x349d26:0x132,_0x501389:0xc6,_0x417ad0:0xd1,_0x150b8a:0x103,_0x49afab:0xcb,_0x226cc9:0x115,_0x4047af:0x16a},_0x58fc40={_0x6755d1:0x148};function _0x555e6b(_0x2e9ec7,_0x4fb5ac,_0x548662,_0x3d9069){return _0x48a7b0(_0x548662,_0x4fb5ac-0x1b1,_0x2e9ec7-0x382,_0x3d9069-_0x58fc40._0x6755d1);}const _0x2a5cdf=_0x52c033?.[_0x21cdd2(-_0x4e234a._0x4b5f30,-0x103,-_0x4e234a._0xa02307,-_0x4e234a._0x5d10bf)]()[_0x21cdd2(-_0x4e234a._0x143f47,-_0x4e234a._0x1e00bc,-_0x4e234a._0x10a469,-0x15b)]?_0x52c033:_0x21cdd2(-_0x4e234a._0xfc82f7,-_0x4e234a._0xea7304,-0x13c,-_0x4e234a._0x1e7152)+_0x342fc1[_0x21cdd2(-_0x4e234a._0x76b9c7,-0x11f,-_0x4e234a._0x3bd1ee,-_0x4e234a._0x349d26)];function _0x21cdd2(_0x54df70,_0x228c6c,_0x2d0f6f,_0x2d3e27){return _0x48a7b0(_0x54df70,_0x228c6c-0x116,_0x228c6c-0x14d,_0x2d3e27-0x2e);}return createErrorToolResult(_0x342fc1,_0x2a5cdf,{'error':_0x555e6b(0x101,_0x4e234a._0x501389,0xd0,_0x4e234a._0x417ad0),..._0x52c033?.[_0x21cdd2(-0x138,-_0x4e234a._0x150b8a,-_0x4e234a._0x49afab,-0x118)]()[_0x555e6b(_0x4e234a._0x226cc9,_0x4e234a._0x4047af,0x15e,0xe4)]?{'reason':_0x52c033}:{}});}function createAbortedToolResult(_0x24f85f,_0x9724f3,_0x458084=[]){const _0x28040a={_0x15e1d4:0x17e,_0x4f117a:0x168,_0x49431d:0x193,_0x133a99:0x178},_0x3f970e={_0x5d8364:0x114,_0x59bd93:0xa5};function _0x419942(_0x167b04,_0x54d924,_0x2ee671,_0x4c7b68){return _0x48a7b0(_0x167b04,_0x54d924-_0x3f970e._0x5d8364,_0x54d924-0xa3,_0x4c7b68-_0x3f970e._0x59bd93);}const _0x3f8f95=toAbortError(_0x9724f3);return createErrorToolResult(_0x24f85f,_0x3f8f95['message'],{'error':_0x3f8f95[_0x419942(-_0x28040a._0x15e1d4,-_0x28040a._0x4f117a,-_0x28040a._0x49431d,-_0x28040a._0x133a99)],'aborted':!![]},_0x458084);}function createSuccessToolResult(_0x7fb980,_0x329daa,_0x47409e){const _0x53aef1={_0x5f5425:0x37a,_0x13c43a:0x38b,_0x3ef6fc:0x36d,_0x228bb5:0x3ad,_0x46e803:0x381,_0x1a4503:0x3d5,_0x5db783:0x1f7},_0x43afe7={_0x17f8bf:0x19,_0xf170f3:0x4ae},_0x463a13={_0x3fab7a:0x12,_0x229812:0x63,_0x5cb705:0x2d4};function _0x52bafb(_0x1bd55f,_0x4d7a95,_0x4e9cff,_0xef38ec){return _0x17b500(_0x4e9cff,_0x4d7a95-_0x463a13._0x3fab7a,_0x4e9cff-_0x463a13._0x229812,_0x1bd55f-_0x463a13._0x5cb705);}function _0x4f7f7d(_0x530e67,_0x5d99c9,_0x6bc77c,_0x30570d){return _0x17b500(_0x6bc77c,_0x5d99c9-_0x43afe7._0x17f8bf,_0x6bc77c-0xec,_0x30570d-_0x43afe7._0xf170f3);}return{'callId':_0x7fb980['id'],'toolName':_0x7fb980[_0x4f7f7d(_0x53aef1._0x5f5425,_0x53aef1._0x13c43a,0x35f,_0x53aef1._0x3ef6fc)],'status':'ok','output':_0x329daa[_0x4f7f7d(0x34c,0x3a3,_0x53aef1._0x228bb5,_0x53aef1._0x46e803)],'structured':_0x329daa[_0x4f7f7d(_0x53aef1._0x1a4503,0x35f,0x343,0x37d)],..._0x329daa[_0x52bafb(_0x53aef1._0x5db783,0x24d,0x21a,0x1a9)]!==void 0x0?{'content':_0x329daa['content']}:{},'chunks':_0x47409e,'meta':createToolMeta()};}function createUnknownToolResult(_0x40e318){const _0x4d2c52={_0x148fe7:0x90,_0x129818:0x60,_0x5d1e0b:0x52,_0x41df78:0x262,_0x670ec6:0x21c},_0xc60a53={_0x298197:0xe4,_0x5dfc32:0x1ea},_0x4e0528={_0x2c51f9:0x47};function _0x209343(_0x182b85,_0x7a717f,_0x3b3d0f,_0x5082ef){return _0x17b500(_0x7a717f,_0x7a717f-_0x4e0528._0x2c51f9,_0x3b3d0f-0xd4,_0x5082ef- -0xa1);}function _0x5108e9(_0x4e4bf7,_0x55a880,_0x1f95c7,_0x2e2499){return _0x17b500(_0x2e2499,_0x55a880-_0xc60a53._0x298197,_0x1f95c7-_0xc60a53._0x5dfc32,_0x4e4bf7-0x193);}return createErrorToolResult(_0x40e318,_0x5108e9(_0x4d2c52._0x148fe7,_0x4d2c52._0x129818,0x66,0x84)+_0x40e318[_0x5108e9(_0x4d2c52._0x5d1e0b,0x5b,0x6f,0x97)],{'error':_0x209343(-0x1de,-_0x4d2c52._0x41df78,-0x1ef,-_0x4d2c52._0x670ec6)});}function isDispatchDecision(_0x2f0866){const _0x357604={_0x115eeb:0x38d,_0x2ca6d6:0x370,_0x49e1da:0x2d8,_0x4179f7:0x304,_0x10443e:0x32c,_0x5495d3:0x37c,_0x1fa4b6:0x32e},_0x469fc0={_0x7ed055:0x1b8,_0x5323e6:0x52e},_0x15540b={_0x5c87a8:0xa3};function _0x56293e(_0x20a600,_0x5e294,_0x106a65,_0x60e19a){return _0x17b500(_0x5e294,_0x5e294-0x38,_0x106a65-_0x15540b._0x5c87a8,_0x60e19a-0x4d2);}function _0x5cb01a(_0x2f4813,_0x22c152,_0x1410f7,_0x29bb74){return _0x48a7b0(_0x2f4813,_0x22c152-_0x469fc0._0x7ed055,_0x22c152-_0x469fc0._0x5323e6,_0x29bb74-0x45);}if(typeof _0x2f0866!=='object'||_0x2f0866===null)return![];return _0x2f0866['action']===_0x56293e(_0x357604._0x115eeb,0x30d,_0x357604._0x2ca6d6,0x366)||_0x2f0866[_0x5cb01a(_0x357604._0x49e1da,0x305,0x35d,_0x357604._0x4179f7)]===_0x56293e(_0x357604._0x10443e,_0x357604._0x5495d3,_0x357604._0x1fa4b6,0x352);}function normalizeExecutionError(_0x2c935f){const _0x533fb6={_0x547e4f:0x12,_0x35b5b6:0x49,_0x5e435c:0x49,_0x4c72eb:0x88,_0x3ceb6d:0x80},_0x29e089={_0x20bae5:0x57};if(_0x2c935f instanceof ToolExecutionError)return{'errorMessage':_0x2c935f[_0xb7f888(_0x533fb6._0x547e4f,-_0x533fb6._0x35b5b6,-0x43,-0x19)],'structured':{'error':_0x2c935f[_0xb7f888(-0x22,-_0x533fb6._0x5e435c,-_0x533fb6._0x4c72eb,-_0x533fb6._0x3ceb6d)],..._0x2c935f['structured']}};function _0xb7f888(_0xabaa05,_0x14aca6,_0x1be7bb,_0x7884f8){return _0x48a7b0(_0x1be7bb,_0x14aca6-0x17,_0x14aca6-0x1c2,_0x7884f8-_0x29e089._0x20bae5);}if(_0x2c935f instanceof Error)return{'errorMessage':_0x2c935f['message'],'structured':{'error':_0x2c935f['message']}};function _0x2d2474(_0x26608b,_0x6542bb,_0x5495b2,_0x53e2d0){return _0x17b500(_0x6542bb,_0x6542bb-0x44,_0x5495b2-0x24,_0x5495b2-0x4ae);}const _0x34d56b=String(_0x2c935f);return{'errorMessage':_0x34d56b,'structured':{'error':_0x34d56b}};}async function emitEvent(_0x4da91f,_0x48d74f,_0x2c3546){await _0x4da91f?.(_0x48d74f,_0x2c3546);}async function resolveDispatchDecision(_0x33dfcf,_0x3adc9e,_0x2e963e){const _0x574d14={_0x56cc8e:0x63,_0x44cc0b:0xcd,_0x1a1fe3:0x82,_0x4b1373:0x419,_0x4b6446:0x46c,_0x3b1532:0x126,_0x56d724:0x13a,_0x3fa858:0x43e,_0x3f32cc:0x447,_0x49a3b6:0x411},_0x1b7c3f={_0x4dd1a5:0x202},_0x431b4a={_0x453392:0x24c,_0x63c8:0x250,_0x4dca48:0x27d,_0x101d00:0x24e,_0xe2b05d:0x2a0,_0x542ec6:0x287,_0x23c4e7:0x248,_0x373d94:0x353,_0x2cd575:0x31e,_0x815313:0x2c6,_0x32561a:0x269,_0x3260a4:0x2c5,_0x463776:0x25f,_0xfc56b3:0x2a2,_0x451ce7:0x2f2},_0x198828={_0x12876e:0x90,_0x2328f1:0x58,_0x5bfad9:0xe6,_0x463dac:0xe3,_0x42367d:0x9c,_0x534065:0x39,_0x6400f5:0x44},_0x5f14e4={_0x4fb9e3:0x48};if(!_0x33dfcf)return{'action':_0x2375b0(_0x574d14._0x56cc8e,0xc7,_0x574d14._0x44cc0b,_0x574d14._0x1a1fe3)};function _0x47a59c(_0x38c9cf,_0x1af664,_0x50d047,_0x48a4fb){return _0x48a7b0(_0x48a4fb,_0x1af664-_0x5f14e4._0x4fb9e3,_0x1af664-0x6f2,_0x48a4fb-0x19d);}const _0x25b055=Promise[_0x2375b0(0x151,0xb9,0xc4,0x112)]()[_0x47a59c(_0x574d14._0x4b1373,0x443,_0x574d14._0x4b6446,0x3ef)](()=>_0x33dfcf(_0x3adc9e,_0x2e963e));if(!_0x2e963e[_0x2375b0(_0x574d14._0x3b1532,_0x574d14._0x56d724,0x126,0xf2)]){const _0xdc6730=await _0x25b055;return isDispatchDecision(_0xdc6730)?_0xdc6730:{'action':'run'};}const _0x3fb849=new Promise((_0x36272a,_0x56fd3c)=>{const _0x494261={_0x4bb90c:0x1cb,_0x3cc5fe:0xa1,_0x2a7339:0x224},_0x36d9e1={_0x43c62c:0x9b,_0x1d58ef:0x392},_0x2fe659=()=>{function _0x39c5d5(_0x1cc450,_0x47f228,_0x2a8e10,_0x3becef){return _0x1165(_0x3becef- -0xf2,_0x1cc450);}_0x2e963e['signal']?.[_0x39c5d5(-0x74,-0x7a,-_0x198828._0x12876e,-_0x198828._0x2328f1)](_0x2d3d7b(-_0x198828._0x5bfad9,-0xed,-0xe2,-_0x198828._0x463dac),_0x2fe659);function _0x2d3d7b(_0x1ab0ee,_0x3dc05c,_0x54f7c3,_0x36e3fd){return _0x1165(_0x54f7c3- -0x17a,_0x36e3fd);}_0x56fd3c(toAbortError(_0x2e963e[_0x2d3d7b(-_0x198828._0x42367d,-_0x198828._0x534065,-0x90,-_0x198828._0x6400f5)]?.[_0x39c5d5(-0x29,-0x3c,-0x49,0x0)]));};function _0x5e38b4(_0x2bcb83,_0x154468,_0x37a4d8,_0x36eb5b){return _0x2375b0(_0x2bcb83,_0x154468-0xeb,_0x37a4d8-_0x36d9e1._0x43c62c,_0x154468- -_0x36d9e1._0x1d58ef);}if(_0x2e963e['signal']?.[_0x5e38b4(-_0x431b4a._0x453392,-0x292,-_0x431b4a._0x63c8,-_0x431b4a._0x4dca48)]){_0x56fd3c(toAbortError(_0x2e963e[_0x5e38b4(-_0x431b4a._0x101d00,-_0x431b4a._0xe2b05d,-_0x431b4a._0x542ec6,-_0x431b4a._0x23c4e7)][_0x4e5864(0x343,_0x431b4a._0x373d94,_0x431b4a._0x2cd575,0x31a)]));return;}function _0x4e5864(_0x272960,_0x40a302,_0x17c43c,_0x20bc9a){return _0x2375b0(_0x272960,_0x40a302-_0x494261._0x4bb90c,_0x17c43c-_0x494261._0x3cc5fe,_0x17c43c-_0x494261._0x2a7339);}_0x2e963e[_0x5e38b4(-0x28b,-0x2a0,-_0x431b4a._0x815313,-_0x431b4a._0x32561a)]?.[_0x5e38b4(-0x2d9,-0x290,-_0x431b4a._0x3260a4,-_0x431b4a._0x463776)](_0x5e38b4(-_0x431b4a._0xfc56b3,-_0x431b4a._0x451ce7,-0x31b,-0x31b),_0x2fe659,{'once':!![]});}),_0x5afaeb=await Promise[_0x47a59c(0x466,0x4ab,0x4d6,0x472)]([_0x25b055,_0x3fb849]);function _0x2375b0(_0x8d5f22,_0x4057a1,_0x286526,_0x3d1c3e){return _0x17b500(_0x8d5f22,_0x4057a1-0x1ef,_0x286526-0x193,_0x3d1c3e-_0x1b7c3f._0x4dd1a5);}return isDispatchDecision(_0x5afaeb)?_0x5afaeb:{'action':_0x47a59c(_0x574d14._0x3fa858,_0x574d14._0x3f32cc,_0x574d14._0x49a3b6,0x466)};}async function executeToolCall(_0x15132e,_0x1bd78e,_0x93af8a,_0x143fb3,_0x25bf97){const _0x187c16={_0x423895:0x328,_0x1287cb:0x34c,_0x4240d4:0x1b9,_0xc42718:0x151,_0xee0db4:0x166,_0xf23ff:0x2db,_0x44f018:0x281,_0x2eb77c:0x229,_0x2e1255:0x149,_0x18d3d8:0x1e6,_0x20df09:0x15d,_0x2cfec5:0x37a,_0x443c5a:0x2a9,_0x38abb4:0x2a6,_0x4131d2:0x21a,_0x3b1674:0x1b0,_0x56e2bd:0x222,_0x565598:0x1d9,_0x5baaf6:0x25c,_0xd97728:0x154,_0x276fef:0x2ae,_0x4b86df:0x178,_0x4373f1:0x1c2,_0x511c46:0x2fa,_0x21c466:0x27a,_0x16da8d:0x2f1,_0x501c43:0x235,_0x322195:0x1e3,_0x4fd8e2:0x2d3,_0x1b6fa7:0x2b2,_0x3b1344:0x1ad,_0x4c7069:0x2b1,_0x13bdef:0x1ab,_0x5a7ccd:0x200,_0x4866a4:0x1dc,_0x12d393:0x36a,_0xe2c658:0x35e,_0x54fff1:0x328,_0xf69667:0x373,_0x55921f:0x11f,_0x481931:0xf1,_0x275c24:0x135},_0x41d720={_0x826197:0x13e,_0x3ee542:0xf1,_0x38fcc6:0x133},_0x1e72be={_0x540b90:0x31},_0x30f471={_0x5d74fc:0x1af,_0xf81274:0x14f},_0x5cef78={..._0x93af8a,'toolCallId':_0x1bd78e['id']};function _0x273c31(_0x18524e,_0x102594,_0x25a348,_0x1f626f){return _0x17b500(_0x18524e,_0x102594-_0x30f471._0x5d74fc,_0x25a348-_0x30f471._0xf81274,_0x102594- -0x196);}throwIfAborted(_0x5cef78['signal']);let _0xa77ffd;try{_0xa77ffd=await resolveDispatchDecision(_0x143fb3,_0x1bd78e,_0x5cef78);}catch(_0x3fc300){if(isAbortError(_0x3fc300)){const _0x3e7ae0=createAbortedToolResult(_0x1bd78e,_0x3fc300);return await emitEvent(_0x25bf97,{'type':'tool_completed','toolCall':_0x1bd78e,'result':_0x3e7ae0},_0x5cef78),_0x3e7ae0;}const {errorMessage:_0x4cafdd,structured:_0x51749d}=normalizeExecutionError(_0x3fc300),_0x2dc9a8=createErrorToolResult(_0x1bd78e,_0x4cafdd,_0x51749d);return await emitEvent(_0x25bf97,{'type':_0x273c31(-0x374,-_0x187c16._0x423895,-0x2fc,-_0x187c16._0x1287cb),'toolCall':_0x1bd78e,'result':_0x2dc9a8},_0x5cef78),_0x2dc9a8;}throwIfAborted(_0x5cef78['signal']);if(_0xa77ffd['action']===_0x3945b7(0x1be,_0x187c16._0x4240d4,_0x187c16._0xc42718,_0x187c16._0xee0db4)){const _0x3b75fe=createRejectedToolResult(_0x1bd78e,_0xa77ffd[_0x273c31(-0x28c,-0x29e,-0x248,-0x25b)]);return await emitEvent(_0x25bf97,{'type':'tool_rejected','toolCall':_0x1bd78e,'result':_0x3b75fe},_0x5cef78),_0x3b75fe;}const _0x904221=_0x15132e[_0x273c31(-_0x187c16._0xf23ff,-_0x187c16._0x44f018,-_0x187c16._0x2eb77c,-0x285)](_0x1bd78e[_0x3945b7(_0x187c16._0x2e1255,_0x187c16._0x18d3d8,_0x187c16._0x20df09,0x191)]);if(!_0x904221){const _0x21c39d=createUnknownToolResult(_0x1bd78e);return await emitEvent(_0x25bf97,{'type':_0x273c31(-_0x187c16._0x2cfec5,-0x328,-0x316,-0x2dc),'toolCall':_0x1bd78e,'result':_0x21c39d},_0x5cef78),_0x21c39d;}throwIfAborted(_0x5cef78[_0x273c31(-_0x187c16._0x443c5a,-_0x187c16._0x38abb4,-0x2f6,-0x2d9)]),await emitEvent(_0x25bf97,{'type':_0x3945b7(_0x187c16._0x4131d2,_0x187c16._0x3b1674,_0x187c16._0x56e2bd,_0x187c16._0x565598),'toolCall':_0x1bd78e},_0x5cef78);function _0x3945b7(_0x703ddb,_0x9cc4d7,_0x3f3df5,_0x540f1e){return _0x48a7b0(_0x703ddb,_0x9cc4d7-0x98,_0x540f1e-0x3fd,_0x540f1e-_0x1e72be._0x540b90);}try{throwIfAborted(_0x5cef78[_0x273c31(-0x25b,-0x2a6,-0x281,-_0x187c16._0x5baaf6)]);const _0x5d4be6=validateToolInput(_0x1bd78e[_0x3945b7(_0x187c16._0xd97728,0x1ad,0x151,0x1a0)],_0x904221['inputSchema']),_0x2a162c=await _0x904221[_0x273c31(-0x299,-0x277,-0x21d,-_0x187c16._0x276fef)](_0x5d4be6,_0x5cef78),_0xa44342=[],_0x395bbe=addAbortListener(_0x5cef78[_0x3945b7(0x1db,_0x187c16._0x4b86df,0x1b4,_0x187c16._0x4373f1)],()=>{const _0x93927d={_0x47aae9:0x1d5,_0x2a996f:0x82,_0x3c578d:0x76};function _0x32d032(_0x3acece,_0x2f36df,_0x4fb1f5,_0x2464a0){return _0x3945b7(_0x4fb1f5,_0x2f36df-0xa7,_0x4fb1f5-0x114,_0x2464a0- -0x1e7);}function _0x4c4387(_0x12b117,_0xad8d6f,_0x15ca02,_0x351ec8){return _0x273c31(_0x12b117,_0xad8d6f-_0x93927d._0x47aae9,_0x15ca02-_0x93927d._0x2a996f,_0x351ec8-_0x93927d._0x3c578d);}void _0x2a162c[_0x32d032(-0x8e,-0xfb,-0xcd,-0xa1)](void 0x0)[_0x4c4387(-_0x41d720._0x826197,-_0x41d720._0x3ee542,-0xa7,-_0x41d720._0x38fcc6)](()=>{});});try{throwIfAborted(_0x5cef78[_0x273c31(-_0x187c16._0x511c46,-0x2a6,-_0x187c16._0x21c466,-_0x187c16._0x16da8d)]);let _0x382588=await _0x2a162c[_0x3945b7(_0x187c16._0x501c43,0x1ce,0x1c9,_0x187c16._0x322195)]();while(!_0x382588[_0x3945b7(0x1b7,0x17a,0x21c,0x1d3)]){throwIfAborted(_0x5cef78[_0x273c31(-_0x187c16._0x4fd8e2,-0x2a6,-0x2bd,-0x263)]);const _0x4aa1a2=normalizeToolOutputValue(_0x382588['value']);_0xa44342[_0x273c31(-0x2e1,-0x2fb,-0x333,-_0x187c16._0x1b6fa7)](_0x4aa1a2),await emitEvent(_0x25bf97,{'type':'tool_output_chunk','toolCall':_0x1bd78e,'chunk':_0x4aa1a2},_0x5cef78),throwIfAborted(_0x5cef78['signal']),_0x382588=await _0x2a162c[_0x3945b7(0x1fd,0x1a0,_0x187c16._0x3b1344,0x1e3)]();}throwIfAborted(_0x5cef78[_0x273c31(-_0x187c16._0x4c7069,-0x2a6,-0x2b8,-0x2f0)]);const _0x19ba5b=_0x382588[_0x3945b7(_0x187c16._0x13bdef,_0x187c16._0x5a7ccd,0x18e,_0x187c16._0x4866a4)]===void 0x0?deriveFinalToolOutput(_0xa44342):normalizeToolOutputValue(_0x382588['value']),_0x5b7bad=createSuccessToolResult(_0x1bd78e,_0x19ba5b,_0xa44342);return await emitEvent(_0x25bf97,{'type':'tool_completed','toolCall':_0x1bd78e,'result':_0x5b7bad},_0x5cef78),_0x5b7bad;}catch(_0x4d4c42){if(isAbortError(_0x4d4c42)){const _0x4ec767=createAbortedToolResult(_0x1bd78e,_0x4d4c42,_0xa44342);return await emitEvent(_0x25bf97,{'type':'tool_completed','toolCall':_0x1bd78e,'result':_0x4ec767},_0x5cef78),_0x4ec767;}const {errorMessage:_0x1de667,structured:_0x346d37}=normalizeExecutionError(_0x4d4c42),_0xcd57a3=createErrorToolResult(_0x1bd78e,_0x1de667,_0x346d37,_0xa44342);return await emitEvent(_0x25bf97,{'type':_0x273c31(-_0x187c16._0x12d393,-_0x187c16._0x423895,-0x2d6,-_0x187c16._0xe2c658),'toolCall':_0x1bd78e,'result':_0xcd57a3},_0x5cef78),_0xcd57a3;}finally{_0x395bbe();}}catch(_0x5d8008){if(isAbortError(_0x5d8008)){const _0x3228a1=createAbortedToolResult(_0x1bd78e,_0x5d8008);return await emitEvent(_0x25bf97,{'type':_0x273c31(-0x364,-_0x187c16._0x54fff1,-0x357,-_0x187c16._0xf69667),'toolCall':_0x1bd78e,'result':_0x3228a1},_0x5cef78),_0x3228a1;}const {errorMessage:_0x393b42,structured:_0x27bf00}=normalizeExecutionError(_0x5d8008),_0x263a1f=createErrorToolResult(_0x1bd78e,_0x393b42,_0x27bf00);return await emitEvent(_0x25bf97,{'type':_0x3945b7(_0x187c16._0x55921f,_0x187c16._0x481931,_0x187c16._0x275c24,0x140),'toolCall':_0x1bd78e,'result':_0x263a1f},_0x5cef78),_0x263a1f;}}function createInternalToolRuntime(_0x5ddf8a=[],_0x3207be={}){const _0x1b085f={_0x36568c:0x493,_0x406d6d:0x49a,_0x2db57e:0x4a7},_0x525e60={_0x2be31f:0x120},_0x1c962d={_0x213923:0x3dc},_0x3af400={_0x5284de:0x278,_0x4461f8:0x212,_0x5d6f0f:0x296},_0x421625={_0x3bbf5f:0x15e};let _0x31fb12=new ToolRegistry(_0x5ddf8a);return{'listToolSchemas'(){function _0x267f59(_0x9753a9,_0x1ce12f,_0x572043,_0x14d6f8){return _0x1165(_0x9753a9-_0x421625._0x3bbf5f,_0x572043);}return _0x31fb12[_0x267f59(0x246,_0x3af400._0x5284de,_0x3af400._0x4461f8,_0x3af400._0x5d6f0f)]();},'setTools'(_0x104a3e){_0x31fb12=new ToolRegistry(_0x104a3e);},async 'executeCalls'(_0x482fa9,_0xa5021d){const _0x1ada66={_0x3a3bf1:0x3d6};function _0xe46111(_0x42ec66,_0x59a180,_0x3f2616,_0x517713){return _0x1165(_0x59a180-_0x1ada66._0x3a3bf1,_0x517713);}function _0x2d9e2b(_0x58cd8f,_0x57a2fa,_0x683e6d,_0x1db297){return _0x1165(_0x58cd8f-_0x1c962d._0x213923,_0x683e6d);}return await Promise[_0xe46111(0x441,0x43f,_0x1b085f._0x36568c,0x47c)](_0x482fa9[_0xe46111(_0x1b085f._0x406d6d,0x477,_0x1b085f._0x2db57e,0x46f)](async _0x4860a7=>{const _0x277cdf={_0xdcb330:0x94},_0x2df004={_0x3090d8:0x18f,_0x9ae456:0x9};function _0x29582c(_0x474531,_0x41a3c8,_0x415a69,_0x38ab0e){return _0x2d9e2b(_0x41a3c8- -0x56f,_0x41a3c8-_0x2df004._0x3090d8,_0x38ab0e,_0x38ab0e-_0x2df004._0x9ae456);}function _0x9f7bfa(_0x143f65,_0x49ab9d,_0x3dfa8c,_0x3459e6){return _0x2d9e2b(_0x143f65- -0x1d5,_0x49ab9d-_0x277cdf._0xdcb330,_0x3459e6,_0x3459e6-0x7d);}return await executeToolCall(_0x31fb12,_0x4860a7,_0xa5021d,_0x3207be[_0x29582c(-0x11d,-0xd7,-0xe8,-0xbf)],_0x3207be[_0x29582c(-0xff,-0x126,-_0x525e60._0x2be31f,-0xee)]);}));},async 'execute'(_0x141025,_0x38017b){function _0x293685(_0x3e3da8,_0x287733,_0xa6d65e,_0x579a3b){return _0x1165(_0x579a3b-0x1c8,_0xa6d65e);}const [_0xee9daf]=await this[_0x293685(0x227,0x2bc,0x22e,0x27c)]([_0x141025],_0x38017b);return _0xee9daf;}};}function getOrderedObserverExtensions(_0x23545c,_0x44fa09){const _0x182f5f={_0x570c7d:0x29b,_0x1b9409:0x2f6,_0x19367d:0x2bc,_0x2c0419:0x26c,_0xf26ae8:0x2f9,_0x373d87:0x29f},_0x3f89d4={_0x2c516f:0x177,_0x9091d4:0x166,_0x3b153f:0xcb,_0x1c6116:0x1dd,_0x2f0db3:0x205,_0x25d1c0:0x1df,_0x8a5263:0x16b,_0x30169e:0x19b},_0x293f43={_0x491337:0xbd,_0x5cc5cb:0x64},_0x105ba1={_0x404b61:0x140},_0xf94ca9={_0x66f14f:0x345,_0x2324e9:0x1c1};function _0x2a289d(_0x177423,_0x4c9511,_0xbe093b,_0x25fd24){return _0x17b500(_0x4c9511,_0x4c9511-0xaa,_0xbe093b-0x1d6,_0x25fd24- -0x1c1);}function _0x28a1b8(_0x51edd5,_0x403014,_0x12c653,_0xc355c3){return _0x48a7b0(_0x51edd5,_0x403014-0x78,_0xc355c3-_0xf94ca9._0x66f14f,_0xc355c3-_0xf94ca9._0x2324e9);}return _0x23545c[_0x2a289d(-0x294,-_0x182f5f._0x570c7d,-_0x182f5f._0x1b9409,-_0x182f5f._0x19367d)](_0x1ffae8=>{function _0x42c94f(_0x10a393,_0x20c812,_0x3fc86d,_0x49ad87){return _0x2a289d(_0x10a393-0x2e,_0x49ad87,_0x3fc86d-_0x105ba1._0x404b61,_0x3fc86d-0x49c);}function _0x214a8a(_0x57a01d,_0x3f12a3,_0x10a708,_0x3baa5c){return _0x2a289d(_0x57a01d-_0x293f43._0x491337,_0x57a01d,_0x10a708-_0x293f43._0x5cc5cb,_0x3f12a3-0x1c8);}return _0x1ffae8[_0x42c94f(_0x3f89d4._0x2c516f,0x1a7,0x15e,_0x3f89d4._0x9091d4)]!==![]&&_0x1ffae8[_0x214a8a(-0xc4,-0x111,-_0x3f89d4._0x3b153f,-0xda)]===_0x44fa09&&_0x1ffae8[_0x42c94f(0x1a0,_0x3f89d4._0x1c6116,0x1d6,_0x3f89d4._0x2f0db3)]===_0x214a8a(-_0x3f89d4._0x25d1c0,-0x187,-_0x3f89d4._0x8a5263,-_0x3f89d4._0x30169e);})[_0x2a289d(-_0x182f5f._0x2c0419,-0x2a0,-_0x182f5f._0xf26ae8,-_0x182f5f._0x373d87)]((_0x3f1819,_0x1e4576)=>_0x3f1819[_0x28a1b8(0x8f,0x4e,0xe4,0x9c)]-_0x1e4576[_0x2a289d(-0x36b,-0x32e,-0x33e,-0x33f)]);}function getOrderedTransformerExtensions(_0x63a314,_0x34ee04){const _0x4895b0={_0x24babb:0xb4,_0x54bd9e:0x9e,_0x129911:0xb2,_0x22cffb:0x8b,_0x5d1fea:0x7d,_0x2bb247:0x77},_0x5ae1af={_0x2bc862:0x386},_0x444095={_0x448c4b:0x144,_0x4b26c1:0x222};function _0x3350a9(_0x2f5790,_0x4e678d,_0x3c69b2,_0x288504){return _0x17b500(_0x2f5790,_0x4e678d-0x197,_0x3c69b2-_0x444095._0x448c4b,_0x288504-_0x444095._0x4b26c1);}function _0x2f8b0c(_0x9b0e66,_0x11bf62,_0x246826,_0x1706c6){return _0x17b500(_0x9b0e66,_0x11bf62-0xd3,_0x246826-0x9d,_0x11bf62-0x541);}return _0x63a314['filter'](_0x111edd=>{function _0x2902a4(_0x4e80c2,_0x2fce72,_0x35286e,_0x154c05){return _0x1165(_0x154c05- -0x180,_0x4e80c2);}function _0x39a38d(_0x5854cd,_0x18f62e,_0xdabde5,_0xc9ec42){return _0x1165(_0x5854cd-_0x5ae1af._0x2bc862,_0x18f62e);}return _0x111edd['enabled']!==![]&&_0x111edd[_0x2902a4(-0x49,-_0x4895b0._0x24babb,-0xd0,-_0x4895b0._0x54bd9e)]===_0x34ee04&&_0x111edd[_0x2902a4(-0xad,-_0x4895b0._0x129911,-0xb1,-_0x4895b0._0x22cffb)]===_0x2902a4(-0x5c,-_0x4895b0._0x5d1fea,-0x29,-_0x4895b0._0x2bb247);})['sort']((_0x180932,_0x345695)=>_0x180932[_0x3350a9(0xb5,0xb6,0x5e,0xa4)]-_0x345695[_0x2f8b0c(0x3b8,0x3c3,0x3e2,0x3bc)]);}function createExtensionRegistry(){const _0x56f63c={_0x1c61d2:0x2a0,_0x3e01d4:0x2f7},_0x15f550={_0x36d7b2:0x28a},_0x2fc4f6=[];return{'register'(_0x4da64a){function _0x531765(_0x191bea,_0x49ae65,_0x25e3f3,_0x381a16){return _0x1165(_0x381a16- -0x33e,_0x25e3f3);}_0x2fc4f6[_0x531765(-_0x15f550._0x36d7b2,-0x2ed,-0x25a,-0x2a9)](_0x4da64a);},async 'runTransformers'(_0x4090ff,_0x13a269,_0x4c690d){function _0x1ebf95(_0x4d244b,_0x230a5b,_0x4dff00,_0x300e17){return _0x1165(_0x230a5b-0x27d,_0x300e17);}let _0x253922=_0x13a269;for(const _0x2f9145 of getOrderedTransformerExtensions(_0x2fc4f6,_0x4090ff)){_0x253922=await _0x2f9145[_0x1ebf95(_0x56f63c._0x1c61d2,_0x56f63c._0x3e01d4,0x2ed,0x31d)](_0x253922,_0x4c690d);}return _0x253922;},async 'runObservers'(_0x2fbc80,_0x3e580f,_0x1c1994){for(const _0x513f7e of getOrderedObserverExtensions(_0x2fc4f6,_0x2fbc80)){await _0x513f7e['run'](_0x3e580f,_0x1c1994);}}};}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(_0x5c6733={}){const _0x1a62dd={_0x185239:0x34a,_0x3b4a43:0x38a,_0x373b07:0x3cf},_0x4e97f2={_0x3a4dde:0x12b,_0x17a9a5:0x29c,_0xa8cb5f:0x248,_0x15a332:0x244,_0x40d2ca:0x2f4,_0xaee148:0x296,_0x4e5a86:0x2cd,_0x4b8c95:0x2a0,_0x488773:0x280,_0x572ca7:0x2c1,_0x2d2832:0x263,_0x55ba40:0x26f,_0x5e0af9:0x106,_0x92cdd7:0x11f,_0xbc3b8d:0x268,_0xf27ecf:0x27e,_0x2b0882:0xda,_0x37cc75:0xe5,_0x814915:0x25f,_0x2d87c0:0x246,_0x15d3e5:0x2bc,_0x269bea:0x279,_0x1c041d:0x257,_0x246679:0x22d,_0x3626df:0xee,_0x4ebdd7:0x267,_0x489742:0x24c,_0x48a9a9:0x2bd,_0x513851:0x9b,_0x41b7e9:0xfa,_0x2796b2:0xd1,_0x5263a2:0x250,_0xeada46:0x1fa,_0x497831:0x218,_0x536e30:0xbe,_0x6cd0b2:0x114,_0x489729:0x14f,_0xe073cf:0x111,_0x3f8297:0x21e},_0x5da2a5={_0x331277:0x6f};let _0x2c2fd3=createEmptySnapshot();const _0xc42c54=new Set();let _0x226dd9;const _0x37f559=()=>{const _0x26d429={..._0x2c2fd3};for(const _0x310c21 of _0xc42c54)_0x310c21(_0x26d429);};return{'getSnapshot'(){return{..._0x2c2fd3};},'recordEvent'(_0x145215){if(_0x145215['type']===_0x112806(0x18c,0x1b1,_0x4e97f2._0x3a4dde,0x187)){_0x226dd9=Date[_0x5f0881(-_0x4e97f2._0x17a9a5,-_0x4e97f2._0xa8cb5f,-_0x4e97f2._0x15a332,-_0x4e97f2._0x40d2ca)]();const _0x4a7988=_0x5c6733[_0x5f0881(-_0x4e97f2._0xaee148,-0x2a2,-0x254,-_0x4e97f2._0x4e5a86)]?.(_0x145215[_0x5f0881(-_0x4e97f2._0x4b8c95,-_0x4e97f2._0x488773,-0x2f0,-_0x4e97f2._0x572ca7)]);_0x4a7988!==void 0x0&&(_0x2c2fd3={..._0x2c2fd3,'contextWindowLimit':_0x4a7988},_0x37f559());return;}function _0x112806(_0xa26f0b,_0xe56368,_0x47cde3,_0x7c8c41){return _0x1165(_0x7c8c41-_0x5da2a5._0x331277,_0xa26f0b);}if(_0x145215['type']==='model_response'){const _0x5c80f3=_0x145215[_0x5f0881(-_0x4e97f2._0x2d2832,-_0x4e97f2._0x55ba40,-0x264,-0x225)]['usage'][_0x112806(0x143,0x157,_0x4e97f2._0x5e0af9,_0x4e97f2._0x92cdd7)],_0x112a80=_0x145215[_0x5f0881(-0x263,-_0x4e97f2._0xbc3b8d,-0x2b1,-_0x4e97f2._0xf27ecf)][_0x112806(_0x4e97f2._0x2b0882,0x12e,_0x4e97f2._0x37cc75,0xfc)]['outputTokens'],_0x46b720=_0x145215[_0x5f0881(-_0x4e97f2._0x2d2832,-_0x4e97f2._0x814915,-_0x4e97f2._0x2d87c0,-_0x4e97f2._0x15a332)][_0x5f0881(-0x2ac,-_0x4e97f2._0x15d3e5,-0x29a,-0x2d6)][_0x5f0881(-_0x4e97f2._0x269bea,-_0x4e97f2._0x1c041d,-_0x4e97f2._0x269bea,-_0x4e97f2._0x246679)]??0x0,_0x2fc3e9=_0x5c80f3+_0x112a80,_0x13472d=_0x226dd9===void 0x0?0x0:Date['now']()-_0x226dd9;_0x226dd9=void 0x0,_0x2c2fd3={..._0x2c2fd3,'totalTokens':_0x2c2fd3[_0x112806(0xdb,0x107,_0x4e97f2._0x3626df,0xed)]+_0x2fc3e9,'totalInputTokens':_0x2c2fd3[_0x5f0881(-_0x4e97f2._0x4ebdd7,-_0x4e97f2._0x489742,-0x271,-_0x4e97f2._0x48a9a9)]+_0x5c80f3,'totalOutputTokens':_0x2c2fd3[_0x112806(0x128,_0x4e97f2._0x513851,0x13d,0xe3)]+_0x112a80,'totalReasoningTokens':_0x2c2fd3[_0x112806(_0x4e97f2._0x41b7e9,_0x4e97f2._0x2796b2,0x146,0xf3)]+_0x46b720,'modelCallCount':_0x2c2fd3[_0x5f0881(-_0x4e97f2._0x5263a2,-_0x4e97f2._0xeada46,-0x23d,-_0x4e97f2._0x497831)]+0x1,'totalModelTimeMs':_0x2c2fd3[_0x112806(0x143,_0x4e97f2._0x536e30,0x123,0x116)]+_0x13472d,'currentTokens':_0x2fc3e9,'currentInputTokens':_0x5c80f3,'currentOutputTokens':_0x112a80,'currentReasoningTokens':_0x46b720,'currentModelTimeMs':_0x13472d,..._0x2c2fd3[_0x112806(0x105,0xfc,0xdf,0x13a)]&&_0x2fc3e9>0x0?{'contextWindowUsage':_0x2fc3e9/_0x2c2fd3[_0x112806(0x184,0x100,_0x4e97f2._0x6cd0b2,0x13a)]}:{}},_0x37f559();return;}function _0x5f0881(_0x7a6633,_0x103b16,_0x51bfa9,_0x23abd1){return _0x1165(_0x7a6633- -0x339,_0x23abd1);}if(_0x145215[_0x112806(0x163,_0x4e97f2._0x489729,0xfb,_0x4e97f2._0xe073cf)]===_0x5f0881(-_0x4e97f2._0x3f8297,-0x25d,-0x206,-0x25f)){_0x2c2fd3={..._0x2c2fd3,'toolCallCount':_0x2c2fd3['toolCallCount']+0x1},_0x37f559();return;}_0x145215['type']==='turn_complete'&&(_0x2c2fd3={..._0x2c2fd3,'requestCount':_0x2c2fd3['requestCount']+0x1},_0x37f559());},'reset'(){_0x2c2fd3=createEmptySnapshot(),_0x226dd9=void 0x0,_0x37f559();},'subscribe'(_0x5121ff){return _0xc42c54['add'](_0x5121ff),()=>{const _0x4e9133={_0x1ee3f6:0x296};function _0x16c5f2(_0xabba43,_0x33a176,_0x2e3221,_0x58aa50){return _0x1165(_0x33a176-_0x4e9133._0x1ee3f6,_0x58aa50);}_0xc42c54[_0x16c5f2(_0x1a62dd._0x185239,_0x1a62dd._0x3b4a43,_0x1a62dd._0x373b07,0x333)](_0x5121ff);};}};}function makeExtensionContext(_0x43c6c5){return{'state':_0x43c6c5};}async function runStage(_0x969654,_0x3c9054,_0x2645bd,_0x25f9f2){const _0xf8702a={_0x4873e0:0x16,_0x1cb58b:0x1b,_0x37dc21:0x52,_0x283395:0x2a,_0x312de3:0xc5},_0x548aa2={_0x59d61a:0x9f,_0x1afb41:0xc2},_0x2f1ceb={_0x58f660:0x1ea},_0x581320=await _0x969654[_0x1ed724(-_0xf8702a._0x4873e0,-_0xf8702a._0x1cb58b,-_0xf8702a._0x37dc21,-_0xf8702a._0x283395)](_0x3c9054,_0x2645bd,_0x25f9f2);function _0x4f9fa8(_0x2b49ef,_0x442d00,_0x3255e3,_0x1c8021){return _0x48a7b0(_0x1c8021,_0x442d00-0x100,_0x442d00-0x596,_0x1c8021-_0x2f1ceb._0x58f660);}await _0x969654[_0x1ed724(-0x9f,-_0xf8702a._0x312de3,-0x76,-0x2e)](_0x3c9054,_0x581320,_0x25f9f2);function _0x1ed724(_0x4218d8,_0x44ae99,_0x5586a9,_0x10de93){return _0x17b500(_0x10de93,_0x44ae99-0x15a,_0x5586a9-_0x548aa2._0x59d61a,_0x5586a9-_0x548aa2._0x1afb41);}return _0x581320;}async function emitEvent2(_0x44c2d0,_0x5a3ada,_0x56e508){await _0x44c2d0?.(_0x5a3ada,_0x56e508);}function replaceToolUseBlocks(_0x3d5c73,_0xbc5747){const _0x6fbb64={_0x4cb59d:0x383,_0x77253a:0x38e,_0x5dc4b9:0x3a0},_0x1a68cd={_0xf3b8d9:0x23d},_0x3fa465={_0x42e4cb:0xee,_0x34da4c:0xb7},_0x248b65={_0x306de2:0x117,_0xdd5633:0x14d},_0x5ce817={_0x46a60d:0xea,_0x1c0e51:0x1cd,_0x38a67b:0x151};function _0x1a0940(_0x1ba666,_0x2d9672,_0x4de1ed,_0x438cc3){return _0x17b500(_0x4de1ed,_0x2d9672-_0x5ce817._0x46a60d,_0x4de1ed-_0x5ce817._0x1c0e51,_0x438cc3- -_0x5ce817._0x38a67b);}function _0x18731a(_0x5077b9,_0x213795,_0x5c0e55,_0x292cb1){return _0x17b500(_0x5077b9,_0x213795-_0x248b65._0x306de2,_0x5c0e55-_0x248b65._0xdd5633,_0x292cb1-0x4f9);}let _0x3c9fb4=0x0;return{..._0x3d5c73,'content':_0x3d5c73[_0x18731a(0x440,0x460,0x459,0x41c)][_0x18731a(_0x6fbb64._0x4cb59d,0x38e,_0x6fbb64._0x77253a,_0x6fbb64._0x5dc4b9)](_0x2ab28b=>{function _0x2cd390(_0x22cce4,_0x5219d3,_0x2b2938,_0x567fc1){return _0x1a0940(_0x22cce4-_0x3fa465._0x42e4cb,_0x5219d3-0x15d,_0x5219d3,_0x2b2938-_0x3fa465._0x34da4c);}if(_0x2ab28b[_0x2cd390(-0x214,-0x22c,-0x1f2,-_0x1a68cd._0xf3b8d9)]!=='tool_use')return _0x2ab28b;const _0x3f7874=_0xbc5747[_0x3c9fb4];return _0x3c9fb4+=0x1,structuredClone(_0x3f7874);})};}function createAssistantMessageId(_0x4fadec,_0x255850){return _0x4fadec+':assistant:'+_0x255850;}function _0x55af(){const _0x462e48=['yMvMB3jLvg9VBfjLC3vSDefWCgvUza','Aw5KzxG','zgvWCW','zxHLy3v0zunHBgXZ','oNjLyxnVBMLUzW','sw52ywXPzcb0B29SigLUChv0igf0ia','oIbLEhbLy3rLzcbIB29SzwfU','BgvUz3rO','BMfTzq','Dgv4Da','C29Tzq','B25uB29Sq2fSBa','Dg9VBfj1BNrPBwu','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','DgHPBMTPBMC','CMvHC29UAw5Nvg9Rzw5Z','Bw9KzwW','CNvUt2jZzxj2zxjZ','CMvZzxrnzxnZywDLCW','zxjYB3i','y29UDgvUDeLUzgv4','oIbLEhbLy3rLzcbUDw1Izxi','ntK4qwjgAun0','Aw5WDxq','C3rYDwn0DxjLza','y2f0y2G','y29UDgv4DfDPBMrVD0XPBwL0','DhvYBI0','B3v0Chv0','BwvZC2fNzxm','C3rYzwfT','DhvYBLn0yxj0zwrbDa','CMvNAxn0zxi','Dg90ywXjBNb1DfrVA2vUCW','Bwf4vg9Rzw5Z','CMvHC29UAw5Nx2nODw5R','DhjPBq','CMvZCg9UC2u','ywz0zxjnB2rLBfjLC3bVBNnL','yxjYyxK','ou1VCM5dva','C3rHDgu','yMvMB3jLqxnZAxn0yw50qxbWzw5K','zMLUywXFBwvZC2fNzq','Dg9VBfjLC3vSDhm','CMfJzq','B2jQzwn0','y2HHDe1VzgvS','CMvHC29UAw5Nu3rHCNrLzef0','C3rHz2u','zxH0zw5ZAw9UCW','AxnbCNjHEq','C3rYAw5N','CNvUvhjHBNnMB3jTzxjZ','zMLUywXnzxnZywDL','BgLZDfrVB2Xty2HLBwfZ','Bw9KzwXdywXSq291BNq','C2LNBMfS','CMfUzg9T','DhvYBKLUzgv4','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','C3rYzwfTAw5N','BgLZDa','zgvSDge','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','CMvHC29U','B3v0Chv0rM9YBwf0','zgvSzxrL','A2LUza','y29UDgvUDf9KzwX0yq','vw5RBM93BIb0B29SoIa','ywjVCNrLza','mtmYEvnRzxbr','ywrKrxzLBNrmAxn0zw5LCG','zg9Uzq','ywn0Aw9U','yM9VBgvHBG','Bwv0CMLJCW','zMLSDgvY','yxnZAxn0yw50x21LC3nHz2u','Dg9VBf9ZDgfYDgvK','ywz0zxjuB29SuMvZDwX0','AxrLBuLK','DMfSDwu','DMfSDwvZ','Bwv0yq','Dg9VBf91C2vFzgvSDge','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','DhjHBNnMB3jTzxi','CMvZB2X2zq','BMv4Da','mJq1mZiWseHys0Lt','y2f1C2u','z2v0vg9VBhm','z2v0','B3v0Chv0sw5KzxG','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','yxnZAxn0yw50twvZC2fNzuLK','ChjVCgvYDgLLCW','AxrLBxm','C2vZC2LVBKrPCG','zw50CMLLCW','y29TCgXLDgu','Bw9KzwXFCMvXDwvZDa','zxHLy3v0zq','BwvZC2fNzq','Dg9VBf9JywXS','C29YDa','y29UDgvUDa','mJeYmdKWoejbDgXvEG','Dg9VBf9JB21WBgv0zwq','ywXS','C3LZDgvT','mJi0mtm0mhHKDhvvwa','B2jZzxj2zxi','B25fDMvUDa','CMv0DxjU','Dg9VBhm','ywz0zxjuDxjUq29TCgXLDgu','ntu1otm2ohfxAxrTvG','oIbLEhbLy3rLzcbHCNjHEq','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','Dg90ywXpDxrWDxruB2TLBNm','C2vUza','DgHLBG','C3vTBwfYEuLUzgv4','mJiXnxPgzNnRtW','yxnRvxnLCG','CNvU','y29TCgXLDgvK','B3jKzxi','zw5HyMXLza','Dg90ywXuB2TLBNm','Dw5RBM93BL90B29S','yxnZAxn0yw50x2nODw5R','nZjqEeDtvuO','Dg9tDhjPBMC','DhvYBKLK','Dg90ywXszwfZB25PBMDuB2TLBNm','CMvNAxn0CNK','Dg9VBf9Yzxn1Bhq','CMvHC29UAw5Nx21LC3nHz2u','Dg9VBhncEu5HBwu','AM9PBG','Aw5WDxrty2HLBwe','x3n5C3rLBvbYB21WDa','nZa4mdq1C0zPA0HM','DxnHz2u','CMvQzwn0','oIbLEhbLy3rLzcbZDhjPBMC','C2v0vg9VBhm','CMvHC29UAw5Nq29TCgXLDgvKqxq','vg9VBev4zwn1DgLVBKvYCM9Y','C3LZDgvTuhjVBxb0','DxnLCL9TzxnZywDL','ChvZAa','zgvMyxvSDe1LC3nHz2u','ntu3nde3qLrVsgXk','ywjVCNq','CMvXDwvZDa','CMvTB3zLrxzLBNrmAxn0zw5LCG','zgvZy3jPChrPB24','C2XPy2u','BM93','DhvYBKnVBxbSzxrLzef0','DhvYBL9JB21WBgv0zq','C2v0vg9WAwm','BwfW','DhLWzq','z2v0q29UDgv4DfDPBMrVD0XPBwL0','Dg9VBf9YzwPLy3rLza','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','ChjVDMLKzxi','Dg90ywXnB2rLBfrPBwvnCW','oIbLEhbLy3rLzcbVyMPLy3q','C2v0u2vZC2LVBKLK','C2vZC2LVBKLK','zNvUy3rPB24','C3rYAw5NAwz5','CMvJB3jKrxzLBNq','Aw5WDxrezwX0yq','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','Aw5WDxruB2TLBNm'];_0x55af=function(){return _0x462e48;};return _0x55af();}function createReasoningMessageId(_0x13e384){const _0x465095={_0x5bb71f:0x0,_0x1f9752:0x73,_0x3caae0:0x5a,_0x2690db:0x84},_0x375380={_0x56d19e:0xf5,_0x132784:0x216,_0x34689e:0x164};function _0x3005bd(_0x227848,_0x4f8bd3,_0x3de0e6,_0x4e57ec){return _0x48a7b0(_0x227848,_0x4f8bd3-_0x375380._0x56d19e,_0x3de0e6-_0x375380._0x132784,_0x4e57ec-_0x375380._0x34689e);}return _0x13e384+_0x3005bd(_0x465095._0x5bb71f,-_0x465095._0x1f9752,-_0x465095._0x3caae0,-_0x465095._0x2690db);}function withMessageId(_0x417662,_0x1147ce){if(_0x417662['id']===_0x1147ce)return _0x417662;return{..._0x417662,'id':_0x1147ce};}function createAssistantChunkEvent(_0x207d3f,_0x4f9abf){const _0x4e1240={_0x35a3b6:0x1df,_0x558da2:0x1c8,_0x37c643:0x212,_0x7e214b:0x1c7,_0x27a85a:0x1a2,_0x533e24:0x1b0,_0x3e2a59:0x138,_0x3b484b:0x16d,_0xf49fd9:0x18b,_0x1fd577:0x1c4,_0x298f3a:0x13b,_0x4f4edc:0x122,_0xb24546:0x1c7},_0x105a2a={_0xd2b5f4:0x9f,_0x3710f2:0x138,_0x3d0e07:0x1f1},_0x5926de={_0x183f87:0x1bb};function _0x2102e3(_0x1b24af,_0x109bce,_0x288498,_0x321071){return _0x48a7b0(_0x288498,_0x109bce-_0x5926de._0x183f87,_0x1b24af-0xa4,_0x321071-0xc4);}function _0x26ee2c(_0xd225b8,_0x560c39,_0x4319d4,_0x5d23de){return _0x48a7b0(_0x560c39,_0x560c39-_0x105a2a._0xd2b5f4,_0x4319d4-_0x105a2a._0x3710f2,_0x5d23de-_0x105a2a._0x3d0e07);}if(_0x207d3f[_0x2102e3(-_0x4e1240._0x35a3b6,-_0x4e1240._0x558da2,-0x1b5,-_0x4e1240._0x37c643)]!==_0x26ee2c(-0xfc,-0xcb,-0xf7,-0xd4))return void 0x0;if(_0x207d3f[_0x2102e3(-_0x4e1240._0x7e214b,-_0x4e1240._0x27a85a,-0x1f4,-0x1ac)]===void 0x0)return void 0x0;return{'type':_0x26ee2c(-_0x4e1240._0x533e24,-_0x4e1240._0x3e2a59,-_0x4e1240._0x3b484b,-0x1a6),'index':_0x207d3f['index']??0x0,'messageId':_0x4f9abf,'chunk':{'type':_0x2102e3(-_0x4e1240._0xf49fd9,-0x1a2,-_0x4e1240._0x1fd577,-0x14d),'index':_0x207d3f[_0x26ee2c(-0x102,-0x113,-_0x4e1240._0x298f3a,-_0x4e1240._0x4f4edc)]??0x0,'text':_0x207d3f[_0x2102e3(-_0x4e1240._0xb24546,-0x1b7,-0x1d2,-0x1c6)]}};}function createToolUseChunkEvent(_0x1d47a9,_0x1f951b){const _0xbbc096={_0x4cd9aa:0x47,_0x394080:0x3c,_0x6dac04:0x1b,_0x35a726:0x15,_0x2247bc:0xff,_0x35d1fa:0x7e,_0x35ab22:0x10f,_0x2f57d4:0xc0,_0x49f0ad:0x98,_0x506a43:0x44,_0x2bb669:0x19,_0x10754b:0x67},_0x3ff9cc={_0x28fb11:0x19f,_0x186be5:0x5f},_0x3f467f={_0x4061f0:0x2de};function _0x28d34a(_0xbe43f6,_0x381a65,_0x349002,_0x384f5f){return _0x48a7b0(_0x349002,_0x381a65-0x33,_0x384f5f-_0x3f467f._0x4061f0,_0x384f5f-0xdc);}function _0x539092(_0x224a24,_0xb69dd3,_0x229122,_0xcabf40){return _0x17b500(_0x224a24,_0xb69dd3-_0x3ff9cc._0x28fb11,_0x229122-_0x3ff9cc._0x186be5,_0xcabf40-0x133);}if(_0x1d47a9[_0x539092(-_0xbbc096._0x4cd9aa,0x2f,0x5,-0x25)]!=='tool_use_delta')return void 0x0;return{'type':'tool_use_chunk','index':_0x1d47a9[_0x539092(-_0xbbc096._0x394080,-_0xbbc096._0x6dac04,-0x1,-_0xbbc096._0x35a726)]??0x0,'messageId':_0x1f951b,'chunk':{'type':_0x28d34a(_0xbbc096._0x2247bc,_0xbbc096._0x35d1fa,_0xbbc096._0x35ab22,_0xbbc096._0x2f57d4),'id':_0x1d47a9['id']??'','index':_0x1d47a9[_0x28d34a(0x47,_0xbbc096._0x49f0ad,0x55,0x6b)]??0x0,..._0x1d47a9['name']!==void 0x0?{'name':_0x1d47a9['name']}:{},..._0x1d47a9[_0x539092(-_0xbbc096._0x506a43,-0x57,-0x8,-_0xbbc096._0x2bb669)]!==void 0x0?{'inputDelta':_0x1d47a9[_0x28d34a(0x5d,0xae,0x66,_0xbbc096._0x10754b)]}:{}}};}function createReasoningChunkEvent(_0x261ba5,_0x2faab7){const _0x21f7c9={_0x9abeef:0x24b,_0x3c9212:0x37c,_0x4b5adb:0x35f,_0x4b22b9:0x296,_0x46f651:0x2c5,_0x3c9b98:0x281,_0x42e584:0x299,_0x29f586:0x2aa,_0x34da57:0x25e,_0x3b5065:0x355,_0x27d9e2:0x2f9,_0x3538c6:0x316,_0x9a5a85:0x2f7,_0x3e94ac:0x43b,_0x50a8bd:0x41f,_0x12d140:0x3f5,_0x3b66a9:0x3b4,_0x25f9fe:0x3b2,_0x7ac060:0x416,_0x29ed29:0x439,_0x393f27:0x2f4,_0x5af929:0x342,_0x5c4c84:0x2b5,_0x44637e:0x428,_0xcf0f8a:0x3dd,_0x15a313:0x2de,_0x37b3df:0x338,_0x133f3f:0x30b,_0x4c0079:0x403,_0x52bba0:0x3b1,_0x199bc9:0x415,_0x462544:0x3c1,_0x8c1a8:0x2ee,_0x58af0a:0x2b4,_0x27cffd:0x3f5,_0x497987:0x3aa,_0x2406bf:0x37e},_0x453e99={_0x267126:0xef};function _0x1aa895(_0x459fe2,_0x6dfdff,_0x94996f,_0x2555c9){return _0x48a7b0(_0x94996f,_0x6dfdff-0x15e,_0x2555c9-0x612,_0x2555c9-_0x453e99._0x267126);}function _0x5bfdbb(_0x3c4968,_0x27f316,_0x36c2e3,_0x12996d){return _0x17b500(_0x36c2e3,_0x27f316-0x155,_0x36c2e3-0x100,_0x27f316-0x3eb);}switch(_0x261ba5[_0x5bfdbb(0x2b6,0x293,0x2eb,_0x21f7c9._0x9abeef)]){case _0x1aa895(_0x21f7c9._0x3c9212,_0x21f7c9._0x4b5adb,0x37c,0x3ab):return{'type':_0x5bfdbb(_0x21f7c9._0x4b22b9,_0x21f7c9._0x46f651,_0x21f7c9._0x3c9b98,_0x21f7c9._0x42e584),'index':_0x261ba5[_0x5bfdbb(_0x21f7c9._0x29f586,0x2a3,0x283,0x2aa)],'messageId':_0x2faab7,'chunk':{'type':'anthropic_thinking_delta','index':_0x261ba5['index']??0x0,'thinking':_0x261ba5['thinking']??''},'text':_0x261ba5[_0x5bfdbb(_0x21f7c9._0x34da57,0x2b0,0x308,0x2c7)]??''};case _0x5bfdbb(_0x21f7c9._0x3b5065,_0x21f7c9._0x27d9e2,_0x21f7c9._0x3538c6,_0x21f7c9._0x9a5a85):return{'type':'reasoning_chunk','index':_0x261ba5['contentIndex'],'messageId':_0x2faab7,'chunk':{'type':_0x1aa895(_0x21f7c9._0x3e94ac,_0x21f7c9._0x50a8bd,0x3a6,_0x21f7c9._0x12d140),'contentIndex':_0x261ba5[_0x1aa895(0x38f,_0x21f7c9._0x12d140,_0x21f7c9._0x3b66a9,_0x21f7c9._0x25f9fe)]??0x0,'delta':_0x261ba5[_0x1aa895(_0x21f7c9._0x7ac060,_0x21f7c9._0x29ed29,0x414,0x3dd)]??'','itemId':_0x261ba5[_0x5bfdbb(0x302,_0x21f7c9._0x393f27,_0x21f7c9._0x5af929,_0x21f7c9._0x5c4c84)]??'','outputIndex':_0x261ba5['outputIndex']??0x0},'text':_0x261ba5[_0x1aa895(_0x21f7c9._0x44637e,0x432,0x3b3,_0x21f7c9._0xcf0f8a)]??''};case _0x5bfdbb(0x300,_0x21f7c9._0x15a313,_0x21f7c9._0x37b3df,_0x21f7c9._0x133f3f):return{'type':_0x1aa895(_0x21f7c9._0x4c0079,_0x21f7c9._0x52bba0,_0x21f7c9._0x199bc9,_0x21f7c9._0x462544),'index':_0x261ba5['summaryIndex'],'messageId':_0x2faab7,'chunk':{'type':_0x5bfdbb(0x286,0x2de,_0x21f7c9._0x8c1a8,0x2a5),'delta':_0x261ba5[_0x5bfdbb(_0x21f7c9._0x58af0a,0x2e1,0x290,0x286)]??'','itemId':_0x261ba5['itemId']??'','outputIndex':_0x261ba5[_0x1aa895(0x405,_0x21f7c9._0x27cffd,_0x21f7c9._0x497987,0x3fd)]??0x0,'summaryIndex':_0x261ba5[_0x1aa895(0x333,_0x21f7c9._0x2406bf,0x343,0x364)]??0x0},'text':_0x261ba5['delta']??''};default:return void 0x0;}}function isAbortedToolResult(_0x3ab4e7){const _0x5ba391={_0x4ad788:0x24d,_0x19c0b5:0x298,_0xdca8ce:0x25c},_0xa75b18={_0x565e86:0x4fa},_0x58f5b1={_0x3ae78d:0xa7,_0x1a7194:0x140};function _0x438bb3(_0x41a90c,_0x5e83a6,_0x3728c5,_0x53495e){return _0x48a7b0(_0x53495e,_0x5e83a6-_0x58f5b1._0x3ae78d,_0x5e83a6-0x4a9,_0x53495e-_0x58f5b1._0x1a7194);}function _0x4fa3a4(_0xb75304,_0x5714f6,_0x2f7fb0,_0x92383){return _0x17b500(_0x2f7fb0,_0x5714f6-0x1c4,_0x2f7fb0-0x147,_0xb75304-_0xa75b18._0x565e86);}return _0x3ab4e7['status']===_0x438bb3(0x1f4,0x248,_0x5ba391._0x4ad788,_0x5ba391._0x19c0b5)&&_0x3ab4e7[_0x438bb3(0x24b,0x24d,_0x5ba391._0xdca8ce,0x2a5)]['aborted']===!![];}async function executeModelRequest(_0x55f126,_0x278f33,_0x5bfa54,_0x233bfa,_0x1ee027){const _0x427dc8={_0x30ef3f:0x29a,_0x47c953:0x299,_0x4359fb:0x29d,_0x1187c9:0x2b6,_0x55d17c:0x286,_0x113403:0x290,_0x121955:0x2d6,_0x20bf0f:0x27f,_0x31a1a4:0x2da,_0x4bd6c9:0x331,_0x16054b:0x2ad,_0x599f6d:0x26b,_0x14fe5b:0x25b,_0x5a798e:0x2ed,_0x1f70fb:0x2e5,_0x4e266d:0x2d0,_0xf5ed64:0x253,_0x36cd2f:0x27b,_0x5a4df2:0x23d,_0x355c3b:0x2b3,_0x325c98:0x28e,_0x6fe89b:0x27e,_0x1a6fb2:0x2a4,_0x43e88b:0x2c3,_0x3dbc15:0x254,_0x5a0a29:0x214,_0x6a2d28:0x281,_0x210043:0x258,_0x4992c1:0x207,_0x95d6b2:0x27c,_0x24f739:0x292,_0x1bef75:0x252,_0x5439a2:0x296,_0x1034d2:0x2cb,_0x3278e7:0x22a,_0x4378b2:0x268,_0x17f490:0x2b6,_0x5e821c:0x2df,_0x5f13e4:0x277,_0x4b14a4:0x265,_0x3d0020:0x2b1,_0x9a7d10:0x31e,_0x1e60a4:0x2bf,_0x54071f:0x26c,_0x31b865:0x2c7,_0x50a7a7:0x2a5,_0x1d4e79:0x2da,_0x100f02:0x224,_0x9f176a:0x20d,_0x2d92a1:0x207,_0x18d85c:0x2ca,_0xfd3ec3:0x2d5,_0x3e80d1:0x322,_0x233d23:0x31f,_0x32a318:0x1e0,_0x3bc3b8:0x294,_0x3a41fd:0x274},_0x1bac52={_0x37bbe1:0x4d5,_0x59a13b:0x3e},_0x1018cd={_0x3d0024:0x16f,_0x583d94:0x12f};throwIfAborted(_0x278f33[_0x48624e(0x2a0,0x2e0,0x2ed,_0x427dc8._0x30ef3f)]);function _0x14ea84(_0x4f7d7f,_0x10d4c6,_0x49dc76,_0x11019e){return _0x17b500(_0x49dc76,_0x10d4c6-_0x1018cd._0x3d0024,_0x49dc76-_0x1018cd._0x583d94,_0x10d4c6-0x3bd);}if(!_0x278f33[_0x48624e(_0x427dc8._0x47c953,0x2f0,_0x427dc8._0x4359fb,0x29e)]||!_0x5bfa54[_0x48624e(0x2a3,_0x427dc8._0x1187c9,_0x427dc8._0x55d17c,_0x427dc8._0x113403)][_0x48624e(0x2b9,0x236,_0x427dc8._0x121955,_0x427dc8._0x20bf0f)])return await _0x5bfa54['chatModel'][_0x14ea84(0x2c3,_0x427dc8._0x31a1a4,_0x427dc8._0x4bd6c9,0x301)](_0x55f126,{'signal':_0x278f33[_0x14ea84(0x2bc,_0x427dc8._0x16054b,_0x427dc8._0x1187c9,0x2a9)]});let _0x315ead;for await(const _0x2fff82 of _0x5bfa54['chatModel'][_0x48624e(_0x427dc8._0x599f6d,_0x427dc8._0x14fe5b,0x236,0x27f)](_0x55f126,{'signal':_0x278f33[_0x48624e(_0x427dc8._0x5a798e,0x296,_0x427dc8._0x1f70fb,0x29a)]})){throwIfAborted(_0x278f33[_0x14ea84(0x28c,0x2ad,0x2bc,_0x427dc8._0x4e266d)]);if(_0x2fff82[_0x48624e(_0x427dc8._0xf5ed64,_0x427dc8._0x36cd2f,_0x427dc8._0x5a4df2,0x252)]===_0x14ea84(_0x427dc8._0x355c3b,0x2be,0x2ba,0x30a)){_0x1ee027[_0x14ea84(0x2f1,0x2c9,_0x427dc8._0x325c98,_0x427dc8._0x6fe89b)][_0x14ea84(0x277,_0x427dc8._0x1a6fb2,_0x427dc8._0x43e88b,0x2c9)]!==void 0x0&&_0x1ee027[_0x48624e(0x2f0,0x2f3,0x2af,0x2b6)][_0x14ea84(_0x427dc8._0x5a4df2,_0x427dc8._0x3dbc15,0x254,_0x427dc8._0x5a0a29)]===void 0x0&&(_0x1ee027[_0x48624e(0x283,_0x427dc8._0x6a2d28,0x2ad,0x2b6)]['reasoningCompletedAt']=Date[_0x14ea84(0x267,0x260,_0x427dc8._0x210043,0x248)]());_0x315ead=_0x2fff82['response'];continue;}if(_0x2fff82[_0x48624e(_0x427dc8._0x4992c1,_0x427dc8._0x95d6b2,_0x427dc8._0x24f739,_0x427dc8._0x1bef75)]==='provider_retry'){await emitEvent2(_0x5bfa54['onEvent'],_0x2fff82,_0x233bfa);continue;}const _0x2dd149=createReasoningChunkEvent(_0x2fff82,_0x1ee027['reasoningMessageId']);if(_0x2dd149&&_0x2dd149[_0x48624e(0x20c,0x26e,_0x427dc8._0x5439a2,_0x427dc8._0x1bef75)]===_0x14ea84(0x291,0x297,_0x427dc8._0x1034d2,0x288)&&_0x2dd149['text'][_0x48624e(_0x427dc8._0x3278e7,_0x427dc8._0x36cd2f,0x2a7,_0x427dc8._0x4378b2)]>0x0){_0x1ee027[_0x48624e(0x27d,0x25c,0x30a,_0x427dc8._0x17f490)][_0x14ea84(0x26c,_0x427dc8._0x1a6fb2,_0x427dc8._0x5e821c,_0x427dc8._0x5f13e4)]===void 0x0&&(_0x1ee027['meta']['reasoningStartedAt']=Date['now']());await emitEvent2(_0x5bfa54[_0x14ea84(0x211,0x230,_0x427dc8._0x4b14a4,0x216)],_0x2dd149,_0x233bfa);continue;}const _0x530ba7=createAssistantChunkEvent(_0x2fff82,_0x1ee027[_0x48624e(0x281,_0x427dc8._0x3d0020,0x2d1,0x2c2)]);if(_0x530ba7){_0x1ee027[_0x14ea84(_0x427dc8._0x24f739,0x2c9,_0x427dc8._0x9a7d10,_0x427dc8._0x1e60a4)][_0x48624e(_0x427dc8._0x54071f,0x28b,0x2dc,0x291)]!==void 0x0&&_0x1ee027[_0x48624e(_0x427dc8._0x31b865,_0x427dc8._0x50a7a7,0x2e7,_0x427dc8._0x1187c9)]['reasoningCompletedAt']===void 0x0&&(_0x1ee027[_0x14ea84(0x276,0x2c9,_0x427dc8._0x1d4e79,0x27b)][_0x48624e(0x1ed,0x294,0x1fd,0x241)]=Date[_0x14ea84(_0x427dc8._0x100f02,0x260,_0x427dc8._0x9f176a,_0x427dc8._0x2d92a1)]());await emitEvent2(_0x5bfa54['onEvent'],_0x530ba7,_0x233bfa);continue;}const _0x3a037e=createToolUseChunkEvent(_0x2fff82,_0x1ee027[_0x14ea84(_0x427dc8._0x18d85c,_0x427dc8._0xfd3ec3,_0x427dc8._0x3e80d1,_0x427dc8._0x233d23)]);_0x3a037e&&await emitEvent2(_0x5bfa54[_0x14ea84(_0x427dc8._0x32a318,0x230,0x256,0x1ed)],_0x3a037e,_0x233bfa);}if(!_0x315ead)throw new Error(_0x48624e(_0x427dc8._0x3bc3b8,0x253,_0x427dc8._0x3a41fd,0x255));function _0x48624e(_0x5b97c3,_0x5d138e,_0x4d5b8b,_0xabb547){return _0x48a7b0(_0x5d138e,_0x5d138e-0x17f,_0xabb547-_0x1bac52._0x37bbe1,_0xabb547-_0x1bac52._0x59a13b);}return _0x315ead;}function makeTurnGuards(_0x2c75df,_0x5c605a,_0x921edd,_0xeb1cd6,_0x2db5d5){return{async 'stage'(_0x4872b6,_0x2fe77a){return throwIfAborted(_0x2c75df),await runStage(_0x5c605a,_0x4872b6,_0x2fe77a,_0xeb1cd6);},async 'emit'(_0x4328f4){throwIfAborted(_0x2c75df),await emitEvent2(_0x921edd,_0x4328f4,_0x2db5d5);},async 'stageUnchecked'(_0x828006,_0x12ac33){return await runStage(_0x5c605a,_0x828006,_0x12ac33,_0xeb1cd6);},async 'emitUnchecked'(_0x293db1){await emitEvent2(_0x921edd,_0x293db1,_0x2db5d5);}};}async function runTurn(_0x496d6b,_0x3b05e3){const _0xd8e020={_0x4e91e1:0x2a0,_0x1c4c01:0x217,_0x10f584:0x261,_0x326172:0x1f,_0x15f54e:0xba,_0x3d1360:0x1f9,_0xef36a9:0x1dd,_0x3ef9f6:0x207,_0x219aa7:0x35,_0x3e51c7:0x5a,_0x49e049:0x1,_0x358055:0x25,_0x4eb122:0x187,_0x40647b:0x1b8,_0x1abed5:0x72,_0x3af1f2:0x4c,_0x2f5d28:0x78,_0x1c5d06:0x39,_0x55d92:0x93,_0x99edbe:0xa0,_0x56f58f:0x208,_0x523c96:0x1bf,_0x1e0138:0x227,_0x50e3b8:0x272,_0x115db3:0x1ef,_0x30d288:0x1c6,_0xd62e06:0x207,_0x54506a:0x1e0,_0xb905de:0x19b,_0x53f890:0x28,_0x17f72c:0x52,_0x3ca068:0x57,_0x187a66:0x1e,_0x4cb4c3:0x15,_0x49027c:0x1bf,_0x151f1c:0x1f2,_0x2091a3:0x30,_0x11a5a0:0x47,_0x3b5948:0x25d,_0x2efa21:0x211,_0x190230:0x206,_0x456af3:0x254,_0x4836dc:0x220,_0x57b69d:0x23d,_0x7a5452:0x215,_0x3a5f0f:0x1d0,_0x3b049c:0x236,_0x2ee22e:0x25e,_0x38c421:0x230,_0x3e4229:0x18f,_0x130aaa:0x17f,_0x434b8a:0xe,_0x11292d:0x219,_0x1f3197:0x21a,_0x3c56d8:0x204,_0x389147:0x28,_0x29397f:0x30,_0xafac90:0x1,_0x3cc38e:0x27e,_0x1d26b6:0x250,_0x173c27:0x298,_0x1a41a5:0xd3,_0x2f351f:0xef,_0x16f9e7:0x96,_0x403d7d:0xc3,_0x3630eb:0x29,_0x59c797:0xe,_0x1bc57c:0x30,_0x1587d2:0xa2,_0x46f4e2:0x216,_0x25fb6f:0x1bc,_0xdc5061:0x1c6,_0x1e6e45:0x25a,_0x847b70:0x1d6,_0x141b9a:0x1fe,_0x24fd60:0x1fa,_0x49786f:0x235,_0x8f20b4:0x1e4,_0x5865e2:0x79,_0x362154:0x7e,_0x1cadad:0x74,_0x4edbfd:0x1f1,_0x4a7c48:0x1fb,_0x148321:0x51,_0x4641ff:0x36,_0xc88399:0x6b,_0x3ee46a:0x99,_0x7b5553:0x215,_0x3b5a80:0x22c,_0x5bdec1:0x40,_0x174b8e:0x218,_0xf1c290:0x6f,_0x260d6f:0x8d,_0x4395a7:0x4c,_0x3f2703:0x22b,_0x33c922:0x239,_0x2a74c2:0x26e,_0x5ab02b:0x1e2,_0x4f4a6c:0x1e7,_0x36d9ab:0x22a,_0x500ca4:0x21f,_0x1f36ee:0x26f,_0x440a8c:0x1d,_0x4d78f6:0x3f,_0xdd476:0x1a,_0x10e964:0x1b3,_0x9ec8b3:0x1d8,_0x291763:0x241,_0x5bb51e:0x25c,_0x283775:0x25d,_0x15fb67:0x18e,_0x3715d8:0x198,_0x78e0dd:0xb,_0x240f1b:0xaa,_0x5599c0:0x5b,_0xe31b7d:0x1c5,_0xd1fb64:0x23c,_0x21a27f:0x193,_0x309704:0x64,_0x2a0811:0x4f,_0x5bd1da:0x22f,_0x49b7ac:0x20c,_0x1d0c2d:0xa1,_0x403372:0x68,_0x20c257:0x4c,_0x54f359:0x1a6,_0x3699d0:0x1f3,_0x25885f:0x1f2,_0xda1cc8:0x2ad,_0x270fd1:0x297,_0x35248d:0x281,_0x5b67ed:0x262,_0x32813c:0x255},_0x448fdf={_0x3f7585:0x442},_0x1322e1={_0x1194d7:0x6e},_0x4c7c24={_0x89d3b:0x482,_0x155707:0x81},_0x2bbad3=_0x496d6b[_0xeeb027(_0xd8e020._0x4e91e1,_0xd8e020._0x1c4c01,0x247,_0xd8e020._0x10f584)]??new AbortController()[_0x2f3fef(_0xd8e020._0x326172,0x2f,0x68,_0xd8e020._0x15f54e)],_0x1d6538={'sessionId':_0x496d6b[_0xeeb027(_0xd8e020._0x3d1360,_0xd8e020._0xef36a9,_0xd8e020._0x3ef9f6,_0xd8e020._0x3ef9f6)],'turnId':_0x496d6b[_0x2f3fef(_0xd8e020._0x219aa7,_0xd8e020._0x3e51c7,_0xd8e020._0x49e049,_0xd8e020._0x358055)],'system':normalizeSystem(_0x496d6b[_0xeeb027(0x1e7,_0xd8e020._0x4eb122,0x1c7,_0xd8e020._0x40647b)]),'messages':(_0x496d6b[_0x2f3fef(0x8e,_0xd8e020._0x1abed5,_0xd8e020._0x3af1f2,_0xd8e020._0x2f5d28)]??[])['map'](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x3b05e3[_0x2f3fef(_0xd8e020._0x1c5d06,0xc9,_0xd8e020._0x55d92,_0xd8e020._0x99edbe)]===_0xeeb027(0x1bd,0x1c5,_0xd8e020._0x56f58f,_0xd8e020._0x523c96)?_0x3b05e3['sessionDir']():_0x3b05e3[_0xeeb027(_0xd8e020._0x1e0138,0x294,_0xd8e020._0x50e3b8,0x2b1)]};function _0xeeb027(_0x4e9db9,_0x7cf9ed,_0x5386c9,_0x11414e){return _0x48a7b0(_0x4e9db9,_0x7cf9ed-0x87,_0x5386c9-_0x4c7c24._0x89d3b,_0x11414e-_0x4c7c24._0x155707);}function _0x2f3fef(_0x527eb6,_0xb4811c,_0x2c257d,_0x307230){return _0x17b500(_0xb4811c,_0xb4811c-_0x1322e1._0x1194d7,_0x2c257d-0xc7,_0x2c257d-0x178);}const _0x430f38=makeExtensionContext(_0x1d6538),_0x2e9944={'sessionId':_0x1d6538[_0xeeb027(_0xd8e020._0x115db3,_0xd8e020._0x30d288,_0xd8e020._0xd62e06,_0xd8e020._0x54506a)],'turnId':_0x1d6538[_0xeeb027(0x1ba,0x1ea,_0xd8e020._0x54506a,_0xd8e020._0xb905de)],'state':_0x1d6538,'signal':_0x2bbad3,..._0x3b05e3['askUser']?{'askUser':_0x3b05e3[_0x2f3fef(-_0xd8e020._0x53f890,_0xd8e020._0x17f72c,-0x9,-0x26)]}:{},..._0x3b05e3[_0x2f3fef(-0x36,_0xd8e020._0x3ca068,_0xd8e020._0x187a66,0x55)]?{'setTopic':_0x3b05e3['setTopic']}:{}},{stage:_0x4c7ff6,emit:_0xb347d0,stageUnchecked:_0x4a9c4c,emitUnchecked:_0x55818d}=makeTurnGuards(_0x2bbad3,_0x3b05e3['registry'],_0x3b05e3[_0x2f3fef(-0x60,0x2e,-_0xd8e020._0x4cb4c3,0x30)],_0x430f38,_0x2e9944),_0x158b68=async(_0x157807,_0x16b3fc)=>{const _0x37c0f0={_0x1b563b:0x43f},_0x3df777=_0x16b3fc?{..._0x430f38,'turnMeta':_0x16b3fc}:_0x430f38;function _0x2894a5(_0x1ba765,_0x274e65,_0x136652,_0x43bd83){return _0x2f3fef(_0x1ba765-0xc7,_0x136652,_0x1ba765-_0x37c0f0._0x1b563b,_0x43bd83-0x1a3);}await _0x3b05e3[_0x2894a5(_0x448fdf._0x3f7585,0x494,0x426,0x46a)]['runObservers']('afterMessageAppend',structuredClone(_0x157807),_0x3df777);};let _0x3c136c=0x0;try{const _0x263883=await _0x4c7ff6('onUserMessage',normalizeMessage(_0x496d6b['message']));_0x1d6538['messages'][_0xeeb027(_0xd8e020._0x49027c,0x1b3,_0xd8e020._0x151f1c,0x1cd)](_0x263883),await _0x158b68(_0x263883),await _0xb347d0({'type':_0x2f3fef(0x47,-0xf,0x12,_0xd8e020._0x2091a3),'message':_0x263883});while(!![]){throwIfAborted(_0x2bbad3),_0x3c136c+=0x1;const _0x323d69=createAssistantMessageId(_0x1d6538['turnId'],_0x3c136c),_0x325ed9=createReasoningMessageId(_0x323d69),_0x4a3a76={'model':_0x3b05e3[_0x2f3fef(_0xd8e020._0x11a5a0,0x42,0x5e,0x39)][_0xeeb027(_0xd8e020._0x3b5948,_0xd8e020._0x2efa21,0x21e,_0xd8e020._0x190230)],..._0x3b05e3[_0xeeb027(_0xd8e020._0x456af3,_0xd8e020._0x4836dc,_0xd8e020._0x57b69d,_0xd8e020._0x7a5452)][_0xeeb027(_0xd8e020._0x3a5f0f,_0xd8e020._0x3b049c,0x203,_0xd8e020._0x2ee22e)]?{'provider':_0x3b05e3['chatModel']['provider']}:{}};let _0x2ae038={'model':_0x3b05e3[_0x2f3fef(0x74,0x6,0x5e,0xb2)]['model'],'maxTokens':_0x3b05e3['chatModel'][_0xeeb027(0x1e2,0x210,_0xd8e020._0x38c421,0x1e5)]??0x4000,'system':structuredClone(_0x1d6538[_0xeeb027(_0xd8e020._0x3e4229,0x16d,0x1c7,_0xd8e020._0x130aaa)]),'messages':structuredClone(_0x1d6538[_0x2f3fef(0x67,_0xd8e020._0x434b8a,0x4c,0x12)]),'tools':_0x3b05e3[_0xeeb027(0x24a,_0xd8e020._0x11292d,_0xd8e020._0x1f3197,_0xd8e020._0x3c56d8)]['listToolSchemas'](),'metadata':{'sessionId':_0x1d6538[_0x2f3fef(0x5b,0x2b,_0xd8e020._0x389147,0x72)],'turnId':_0x1d6538[_0x2f3fef(-0x55,-_0xd8e020._0x29397f,_0xd8e020._0xafac90,-0x16)]},..._0x3b05e3[_0xeeb027(_0xd8e020._0x3cc38e,0x28d,0x250,0x268)]?{'outputFormat':_0x3b05e3[_0xeeb027(0x2a4,0x26d,_0xd8e020._0x1d26b6,_0xd8e020._0x173c27)]}:{}};_0x2ae038=await _0x4c7ff6('beforeModelRequest',_0x2ae038),await _0xb347d0({'type':_0x2f3fef(_0xd8e020._0x1a41a5,_0xd8e020._0x2f351f,_0xd8e020._0x16f9e7,_0xd8e020._0x403d7d),'request':_0x2ae038}),_0x4a3a76[_0x2f3fef(0x87,0x49,0x4e,_0xd8e020._0x3630eb)]=Date[_0x2f3fef(-0x31,_0xd8e020._0x59c797,0x1b,0x2c)]();let _0x3bd8df=await executeModelRequest(_0x2ae038,_0x496d6b,_0x3b05e3,_0x2e9944,{'assistantMessageId':_0x323d69,'reasoningMessageId':_0x325ed9,'meta':_0x4a3a76});_0x4a3a76[_0x2f3fef(0x3a,-_0xd8e020._0x1bc57c,0x1c,0x1c)]=Date[_0x2f3fef(0x73,-0x19,0x1b,_0xd8e020._0x11a5a0)](),_0x3bd8df=await _0x4c7ff6(_0x2f3fef(0x1,_0xd8e020._0x1587d2,0x55,0xa6),_0x3bd8df),await _0xb347d0({'type':'model_response','response':_0x3bd8df}),_0x1d6538['lastResponse']=_0x3bd8df;let _0x4f98c3=await _0x4c7ff6(_0xeeb027(0x1de,_0xd8e020._0x3d1360,0x238,_0xd8e020._0x46f4e2),withMessageId(responseToAssistantMessage(_0x3bd8df),_0x323d69));_0x4f98c3=withMessageId(_0x4f98c3,_0x323d69);const _0x4e5cd5=getToolUseBlocks(_0x4f98c3),_0x52aeb3=await Promise[_0xeeb027(0x18c,_0xd8e020._0x25fb6f,_0xd8e020._0xdc5061,0x1da)](_0x4e5cd5[_0xeeb027(_0xd8e020._0x1e6e45,_0xd8e020._0x847b70,_0xd8e020._0x141b9a,_0xd8e020._0x24fd60)](_0x5a7eba=>_0x4c7ff6('beforeToolExecution',_0x5a7eba)));_0x52aeb3[_0xeeb027(0x1f1,0x1ea,_0xd8e020._0x7a5452,0x267)]>0x0&&(_0x4f98c3=replaceToolUseBlocks(_0x4f98c3,_0x52aeb3));const _0x1f4866=withMessageId(_0x4f98c3,_0x323d69);_0x4f98c3=_0x1f4866;const _0x1f86e1=createReasoningMessage(_0x4f98c3),_0x2f09f3=createAssistantTextMessage(_0x4f98c3),_0x3d5d0a=createToolUseMessage(_0x4f98c3);_0x1f86e1&&await _0xb347d0({'type':_0xeeb027(_0xd8e020._0x49786f,0x1af,_0xd8e020._0x8f20b4,_0xd8e020._0xd62e06),'message':withMessageId(_0x1f86e1,_0x325ed9)});_0x2f09f3&&await _0xb347d0({'type':_0x2f3fef(0x54,_0xd8e020._0x5865e2,_0xd8e020._0x362154,_0xd8e020._0x1cadad),'message':withMessageId(_0x2f09f3,_0x323d69)});_0x3d5d0a&&await _0xb347d0({'type':'tool_use_message','message':withMessageId(_0x3d5d0a,_0x323d69)});_0x1d6538[_0xeeb027(0x226,_0xd8e020._0x4edbfd,0x22b,0x231)][_0xeeb027(_0xd8e020._0x57b69d,0x198,0x1f2,_0xd8e020._0x4a7c48)](_0x1f4866);_0x52aeb3[_0x2f3fef(0x37,_0xd8e020._0x148321,_0xd8e020._0x4641ff,_0xd8e020._0xc88399)]>0x0&&await _0x158b68(_0x1f4866,_0x4a3a76);for(const _0x2b94d1 of _0x52aeb3){await _0xb347d0({'type':_0x2f3fef(0xb9,0xd0,_0xd8e020._0x3ee46a,0xc7),'toolCall':_0x2b94d1});}if(_0x52aeb3[_0xeeb027(0x215,0x267,_0xd8e020._0x7b5553,_0xd8e020._0x3b5a80)]===0x0){const _0x4672d3=await _0x4c7ff6('beforeFinalOutput',_0x4f98c3),_0x1f0398=withMessageId(_0x4672d3,_0x323d69);return _0x1d6538[_0x2f3fef(0x31,_0xd8e020._0x5bdec1,0x65,_0xd8e020._0x2091a3)]=_0x1f0398,_0x1d6538[_0xeeb027(0x264,0x1d6,0x22b,_0xd8e020._0x174b8e)][_0x1d6538[_0x2f3fef(_0xd8e020._0xf1c290,_0xd8e020._0x260d6f,_0xd8e020._0x4395a7,0x2)][_0xeeb027(0x1e4,_0xd8e020._0x3f2703,0x215,0x21d)]-0x1]=_0x1f0398,await _0x158b68(_0x1f0398,_0x4a3a76),await _0xb347d0({'type':_0xeeb027(0x22c,0x1fa,_0xd8e020._0x33c922,_0xd8e020._0x2a74c2),'message':_0x1f0398}),throwIfAborted(_0x2bbad3),await _0x3b05e3[_0xeeb027(0x22c,0x207,_0xd8e020._0x5ab02b,_0xd8e020._0x4f4a6c)][_0xeeb027(0x250,_0xd8e020._0x36d9ab,_0xd8e020._0x500ca4,_0xd8e020._0x1f36ee)](_0x2f3fef(0x38,-_0xd8e020._0x440a8c,-0x12,-_0xd8e020._0x4d78f6),_0x1d6538,_0x430f38),await _0xb347d0({'type':_0x2f3fef(-_0xd8e020._0xdd476,0xa,_0xd8e020._0x440a8c,_0xd8e020._0x3ca068),'state':_0x1d6538}),{'status':_0xeeb027(_0xd8e020._0x10e964,_0xd8e020._0x9ec8b3,_0xd8e020._0x9ec8b3,0x1e1),'finalMessage':_0x1f0398,'state':_0x1d6538};}let _0x1ae21a=await _0x3b05e3[_0xeeb027(0x20f,_0xd8e020._0x291763,_0xd8e020._0x1f3197,0x1ec)][_0xeeb027(0x24b,0x1e0,0x211,0x265)](_0x52aeb3,_0x2e9944);const _0x4cb615=_0x1ae21a[_0xeeb027(_0xd8e020._0x5bb51e,_0xd8e020._0x283775,_0xd8e020._0x174b8e,0x1dc)](isAbortedToolResult),_0x2de7fc=_0x4cb615?_0x4a9c4c:_0x4c7ff6,_0x23de4a=_0x4cb615?_0x55818d:_0xb347d0;_0x1ae21a=await Promise[_0xeeb027(0x197,_0xd8e020._0x15fb67,_0xd8e020._0x30d288,_0xd8e020._0x3715d8)](_0x1ae21a[_0x2f3fef(0x2a,0x3d,0x1f,-_0xd8e020._0x78e0dd)](_0xeae6b6=>_0x2de7fc(_0x2f3fef(0xa3,0x78,0x80,0x26),_0xeae6b6))),_0x1d6538[_0x2f3fef(_0xd8e020._0x240f1b,0x0,_0xd8e020._0x5599c0,0x5c)][_0xeeb027(_0xd8e020._0xe31b7d,0x214,0x1f2,_0xd8e020._0x141b9a)](..._0x1ae21a);for(const _0xf1248c of _0x1ae21a){await _0x23de4a({'type':_0xeeb027(0x221,_0xd8e020._0xd1fb64,0x1e3,_0xd8e020._0x21a27f),'result':_0xf1248c});}const _0x144b85=await _0x2de7fc(_0x2f3fef(_0xd8e020._0x309704,0x6,0x2f,_0xd8e020._0x2a0811),createToolResultUserMessage(_0x1ae21a));await _0x23de4a({'type':_0xeeb027(0x264,_0xd8e020._0x5bd1da,_0xd8e020._0x49b7ac,0x23c),'message':_0x144b85}),_0x1d6538[_0x2f3fef(_0xd8e020._0x1d0c2d,_0xd8e020._0x403372,_0xd8e020._0x20c257,0x7b)][_0xeeb027(_0xd8e020._0x54f359,_0xd8e020._0x3699d0,_0xd8e020._0x25885f,0x1a9)](_0x144b85),await _0x158b68(_0x144b85);if(_0x4cb615)return{'status':_0xeeb027(_0xd8e020._0xda1cc8,_0xd8e020._0x270fd1,0x255,0x213),'state':_0x1d6538};}}catch(_0x2f3b18){if(!_0x2bbad3[_0x2f3fef(0xaa,0x4e,0x76,0x6a)])throw new TurnFailedError(_0x2f3b18,_0x1d6538);return{'status':_0xeeb027(_0xd8e020._0x35248d,_0xd8e020._0x5b67ed,_0xd8e020._0x32813c,_0xd8e020._0x24fd60),'state':_0x1d6538};}}function createSessionId(){const _0x2cc953={_0x25c1c7:0x5d,_0xebf318:0x12,_0x4f6b8d:0x5c,_0x16e050:0x2c,_0x263529:0x73,_0x166a3c:0x46,_0xad4759:0x69},_0x3239ca={_0xbbbd7e:0x2ce,_0x111286:0xc1},_0x4d1c95={_0x359b69:0x1ba,_0x3e71b7:0x7d,_0x40248b:0x1a4};function _0x28201d(_0x204f7f,_0x162e46,_0x257db3,_0x157b2a){return _0x17b500(_0x162e46,_0x162e46-_0x4d1c95._0x359b69,_0x257db3-_0x4d1c95._0x3e71b7,_0x257db3-_0x4d1c95._0x40248b);}function _0x3dd18b(_0x300494,_0x55e26a,_0x9b153b,_0x138a05){return _0x48a7b0(_0x138a05,_0x55e26a-0x148,_0x55e26a-_0x3239ca._0xbbbd7e,_0x138a05-_0x3239ca._0x111286);}return'session-'+Date[_0x28201d(0xa2,0x88,0x47,0x4)]()+'-'+Math[_0x28201d(_0x2cc953._0x25c1c7,0xa3,0x95,0x99)]()[_0x28201d(-_0x2cc953._0xebf318,_0x2cc953._0x4f6b8d,_0x2cc953._0x16e050,_0x2cc953._0x263529)](0x10)[_0x28201d(0x2f,0x18,_0x2cc953._0x166a3c,_0x2cc953._0xad4759)](0x2,0xa);}function _0x48a7b0(_0x2cb870,_0x1bf584,_0x375580,_0x346ce3){const _0x422795={_0x203bfe:0x325};return _0x1165(_0x375580- -_0x422795._0x203bfe,_0x2cb870);}function createTurnId(_0x5324a8){const _0x245cc1={_0x5e73e4:0xc3,_0x3d5120:0xfe};function _0x3bffae(_0x4ca2fe,_0x3e9014,_0x365bb8,_0x39dd77){return _0x17b500(_0x39dd77,_0x3e9014-0x1a7,_0x365bb8-0x8b,_0x4ca2fe-0x4e);}return _0x3bffae(-0xe0,-_0x245cc1._0x5e73e4,-_0x245cc1._0x3d5120,-0x122)+_0x5324a8;}function _0x17b500(_0xed3c47,_0x4f7f72,_0x4dd98d,_0x64621f){const _0x5691ba={_0x1d5327:0x1fa};return _0x1165(_0x64621f- -_0x5691ba._0x1d5327,_0xed3c47);}function createDefaultMessage(_0x559093){if(_0x559093===void 0x0)return void 0x0;return normalizeUserInput(_0x559093);}function normalizeUserInput(_0x2fe517){const _0x2fb2d3={_0x431dfe:0xb5,_0x18796b:0xeb,_0x4994dd:0xa1},_0x28ad94={_0x438947:0x18b};function _0x52d174(_0x32663d,_0x19347e,_0x434fee,_0xb746f3){return _0x48a7b0(_0xb746f3,_0x19347e-0x1dd,_0x32663d-_0x28ad94._0x438947,_0xb746f3-0xdf);}if(typeof _0x2fe517===_0x52d174(-_0x2fb2d3._0x431dfe,-_0x2fb2d3._0x18796b,-0xce,-_0x2fb2d3._0x4994dd))return{'role':'user','content':[{'type':'text','text':_0x2fe517}]};return normalizeMessage(_0x2fe517);}function resolveChatModel(_0x9ce06){const _0x804f6b={_0x30aada:0x167,_0x2d4730:0x15f,_0x14fa6d:0x15b,_0x359cd6:0x121,_0x5e714e:0xfe,_0x525a32:0x149},_0x4fdf35={_0x730432:0x1cd},_0x4227d1={_0x54bc88:0x165};function _0x446d04(_0x406e7f,_0x3a7c91,_0x168252,_0x291082){return _0x48a7b0(_0x3a7c91,_0x3a7c91-0x87,_0x291082-0x20f,_0x291082-_0x4227d1._0x54bc88);}function _0x511a12(_0x24c489,_0x8b7cad,_0xf8c76e,_0x3e19ac){return _0x48a7b0(_0x8b7cad,_0x8b7cad-0x83,_0xf8c76e-0xf3,_0x3e19ac-_0x4fdf35._0x730432);}if(!_0x9ce06[_0x511a12(-_0x804f6b._0x30aada,-0x1a5,-0x152,-_0x804f6b._0x2d4730)])throw new Error(_0x511a12(-0x141,-_0x804f6b._0x14fa6d,-_0x804f6b._0x359cd6,-_0x804f6b._0x5e714e));return _0x9ce06[_0x511a12(-_0x804f6b._0x525a32,-0xfa,-0x152,-0x19f)];}function createRegistry(_0x3768f2){const _0x3612fd={_0x2a17a4:0x3f9,_0x4abc41:0x429,_0x1d39d2:0x194,_0x6336e:0x1e7,_0x3fea70:0x4a0,_0x42cb38:0x4bc},_0x5cdf0e={_0x44de5b:0x68,_0x3cfa39:0x1b3,_0x3f57f6:0x57d};function _0x5a1af3(_0x43cab2,_0x5bf6d,_0x174093,_0xc5a878){return _0x17b500(_0x43cab2,_0x5bf6d-_0x5cdf0e._0x44de5b,_0x174093-_0x5cdf0e._0x3cfa39,_0x5bf6d-_0x5cdf0e._0x3f57f6);}function _0x451540(_0x1bd18a,_0xc573d1,_0x1daf15,_0x56e311){return _0x17b500(_0x1daf15,_0xc573d1-0xf7,_0x1daf15-0x1d6,_0x56e311-0x35c);}if(_0x3768f2[_0x5a1af3(_0x3612fd._0x2a17a4,0x408,0x451,_0x3612fd._0x4abc41)])return _0x3768f2[_0x451540(0x1fc,0x1c5,_0x3612fd._0x1d39d2,_0x3612fd._0x6336e)];const _0x573eb4=createExtensionRegistry(),_0x3a2819=_0x3768f2[_0x5a1af3(_0x3612fd._0x3fea70,0x466,_0x3612fd._0x42cb38,0x4bb)]??[];for(const _0x2b4b50 of _0x3a2819){_0x573eb4['register'](_0x2b4b50);}return _0x573eb4;}var Agent=class{[_0x48a7b0(-0x270,-0x26d,-0x29a,-0x246)];[_0x17b500(-0x162,-0x14b,-0x14d,-0x147)];['metrics'];[_0x48a7b0(-0x2ab,-0x2c3,-0x27b,-0x240)];[_0x48a7b0(-0x291,-0x1fc,-0x257,-0x2b2)];[_0x48a7b0(-0x286,-0x2d2,-0x28f,-0x26f)];[_0x48a7b0(-0x252,-0x25e,-0x239,-0x22d)];constructor(_0x444b78={}){const _0x24ea3c={_0x29fec8:0x144,_0x427bff:0x11d,_0x3c0482:0xfb,_0x62c9e7:0xd6,_0x1c5cb3:0x30b,_0x37ef6d:0x317,_0x1b18dd:0x301,_0x1e8216:0x297,_0x52e28d:0x262,_0xd92b9d:0xe2,_0x4d1a8f:0x106,_0x112c63:0x142,_0x877a2:0x18b,_0x4b1ab4:0x18d,_0x2f7f13:0x187,_0x168aa5:0x8f,_0x557af1:0xa6,_0x408fc5:0x251,_0x2c745f:0x249,_0x34f800:0x2bf,_0x41a3ed:0x264,_0x4c8adc:0x2f7,_0x227988:0xee,_0x248bc7:0x11e,_0xe98239:0x144,_0x5b18a7:0x113,_0x1980da:0x10d,_0x5c7774:0x137,_0x45f807:0x166},_0x156c90={_0x5dd5fd:0x1b3,_0x43f9ec:0x1ef},_0x3be2e9={_0x12e20c:0x46c,_0x3fe9d8:0x1dd,_0x35e01e:0x1f4},_0x135fd1={_0x3180db:0x16a,_0x16773c:0x26d},_0x519224={_0x4b5067:0x1e0};this[_0x1228b6(_0x24ea3c._0x29fec8,0x13b,0x179,_0x24ea3c._0x427bff)]=_0x444b78[_0x1228b6(_0x24ea3c._0x3c0482,_0x24ea3c._0x62c9e7,0x14b,_0x24ea3c._0x427bff)]??createSessionId(),this[_0x211778(0x2f8,_0x24ea3c._0x1c5cb3,_0x24ea3c._0x37ef6d,_0x24ea3c._0x1b18dd)]=0x0;function _0x211778(_0x31c18c,_0xb4b7d9,_0x217821,_0x3656d6){return _0x48a7b0(_0xb4b7d9,_0xb4b7d9-0x1d8,_0x31c18c-0x531,_0x3656d6-_0x519224._0x4b5067);}this[_0x211778(_0x24ea3c._0x1e8216,_0x24ea3c._0x52e28d,0x264,0x2b8)]=_0x444b78[_0x1228b6(_0x24ea3c._0xd92b9d,0xe8,0xaa,_0x24ea3c._0x4d1a8f)]??'';function _0x1228b6(_0x553638,_0x51d132,_0x4a1a8d,_0x96ec5f){return _0x17b500(_0x553638,_0x51d132-0x1ac,_0x4a1a8d-_0x135fd1._0x3180db,_0x96ec5f-_0x135fd1._0x16773c);}this[_0x1228b6(0x12f,0x15e,0x147,0x141)]=(_0x444b78['messages']??[])['map'](normalizeMessage),this['defaultMessage']=createDefaultMessage(_0x444b78[_0x1228b6(_0x24ea3c._0x29fec8,_0x24ea3c._0x112c63,_0x24ea3c._0x877a2,_0x24ea3c._0x4b1ab4)]),this[_0x1228b6(0x155,_0x24ea3c._0x2f7f13,0x137,0x171)]=createAgentMetrics({'getContextWindowLimit':_0x444b78['getContextWindowLimit']});const _0x413150=_0x444b78[_0x1228b6(_0x24ea3c._0x168aa5,_0x24ea3c._0x557af1,0x108,0xe0)],_0x5ae72c=async(_0x176d1b,_0x54d684)=>{function _0x159b06(_0x5a891e,_0x255698,_0x141602,_0x26793b){return _0x211778(_0x5a891e- -_0x3be2e9._0x12e20c,_0x141602,_0x141602-_0x3be2e9._0x3fe9d8,_0x26793b-_0x3be2e9._0x35e01e);}this['metrics'][_0x159b06(-_0x156c90._0x5dd5fd,-0x1a6,-_0x156c90._0x43f9ec,-0x1ba)](_0x176d1b),await _0x413150?.(_0x176d1b,_0x54d684);},_0x254fc0=createInternalToolRuntime(_0x444b78[_0x211778(0x27b,_0x24ea3c._0x408fc5,0x28d,_0x24ea3c._0x2c745f)]??[],{'onEvent':_0x5ae72c,'onToolCall':_0x444b78['onToolCall']});this[_0x211778(_0x24ea3c._0x34f800,_0x24ea3c._0x41a3ed,0x279,_0x24ea3c._0x4c8adc)]={'registry':createRegistry(_0x444b78),'chatModel':resolveChatModel(_0x444b78),'toolRuntime':_0x254fc0,'askUser':_0x444b78['askUser'],'setTopic':_0x444b78[_0x1228b6(_0x24ea3c._0x227988,_0x24ea3c._0x248bc7,_0x24ea3c._0xe98239,_0x24ea3c._0x5b18a7)],'onEvent':_0x5ae72c,'sessionDir':_0x444b78[_0x1228b6(0x134,0x185,0x1d3,0x188)],'outputFormat':_0x444b78[_0x1228b6(0x110,_0x24ea3c._0x1980da,_0x24ea3c._0x5c7774,_0x24ea3c._0x45f807)]};}get[_0x17b500(-0x185,-0x166,-0x122,-0x167)](){const _0x3b62c5={_0x38a0a4:0x1ff,_0x49882e:0x208,_0x31da74:0x245},_0x2957dc={_0x1efeff:0xde,_0x3fc5c3:0x6a,_0x211514:0x90};function _0x43cb38(_0x5c84a0,_0xca89e7,_0x27a62b,_0x46c7bf){return _0x17b500(_0x27a62b,_0xca89e7-_0x2957dc._0x1efeff,_0x27a62b-_0x2957dc._0x3fc5c3,_0x5c84a0- -_0x2957dc._0x211514);}return this[_0x43cb38(-_0x3b62c5._0x38a0a4,-_0x3b62c5._0x49882e,-0x1bb,-_0x3b62c5._0x31da74)];}[_0x48a7b0(-0x2bb,-0x29c,-0x295,-0x2b0)](_0x4c4d93=[]){const _0x12d12e={_0x402a51:0x204,_0x5b3938:0x20c,_0x49089c:0x20f,_0x7f56a5:0x28c},_0x574fac={_0x427c2e:0xc2,_0x477cfd:0x41},_0x441aaa={_0x5673bc:0xf5,_0xa43868:0xc9};function _0xf12b3d(_0xb24c63,_0x1e6757,_0x1ed867,_0x2b2c2f){return _0x17b500(_0x1ed867,_0x1e6757-0x14f,_0x1ed867-_0x441aaa._0x5673bc,_0x2b2c2f- -_0x441aaa._0xa43868);}function _0x44378b(_0x119adf,_0x387cd5,_0xb730de,_0x153a33){return _0x48a7b0(_0x153a33,_0x387cd5-_0x574fac._0x427c2e,_0xb730de-0x481,_0x153a33-_0x574fac._0x477cfd);}this['deps'][_0x44378b(_0x12d12e._0x402a51,0x247,0x219,_0x12d12e._0x5b3938)][_0xf12b3d(-_0x12d12e._0x49089c,-0x1e5,-_0x12d12e._0x7f56a5,-0x233)](_0x4c4d93);}[_0x48a7b0(-0x212,-0x272,-0x217,-0x24c)](){const _0x19d280={_0x1b9fd8:0x92,_0x22a47e:0x9b,_0x19e723:0x8a,_0x5a363c:0x9c,_0x1d7010:0xe4,_0x33a60d:0x57,_0x442e7e:0xc7,_0x13c738:0xa2,_0x4a9768:0xdc},_0x135713={_0x14a6c8:0x304,_0xa7b8d0:0xc9};function _0x126f84(_0x39ed0d,_0x4b4ee9,_0x49f0a8,_0x42891c){return _0x48a7b0(_0x42891c,_0x4b4ee9-0x123,_0x39ed0d-_0x135713._0x14a6c8,_0x42891c-_0x135713._0xa7b8d0);}function _0x144525(_0x3095fb,_0x1463eb,_0x33a674,_0x5d8b5b){return _0x17b500(_0x33a674,_0x1463eb-0xb8,_0x33a674-0xc2,_0x3095fb-0x134);}return this[_0x126f84(_0x19d280._0x1b9fd8,0xa8,_0x19d280._0x22a47e,_0x19d280._0x19e723)][_0x126f84(_0x19d280._0x5a363c,0xc9,_0x19d280._0x1d7010,_0x19d280._0x33a60d)][_0x126f84(_0x19d280._0x442e7e,_0x19d280._0x13c738,0xa8,_0x19d280._0x4a9768)]();}['setSystemPrompt'](_0x11fe9c,_0x5bc8c1={}){const _0x41bf3e={_0x1f939b:0x228,_0x74f4fe:0x278,_0x32c63c:0x25a,_0x4eb324:0x269,_0x3d98e3:0x2e7,_0x14b6c0:0x2ec,_0x2c4bc9:0x324,_0x510aa8:0x2a1},_0x4af69b={_0x5b56f6:0xf1,_0x20dced:0x1df,_0x5a11f7:0xe0},_0x4e83ee={_0x29cc1b:0xdf};this[_0x4031d8(-0x24f,-0x29f,-_0x41bf3e._0x1f939b,-_0x41bf3e._0x74f4fe)]=_0x11fe9c;function _0x2f8c68(_0x272cc6,_0x2f5deb,_0x3f49fa,_0x4c73f9){return _0x17b500(_0x4c73f9,_0x2f5deb-_0x4e83ee._0x29cc1b,_0x3f49fa-0x38,_0x2f5deb- -0x1bb);}function _0x4031d8(_0x2af138,_0x588573,_0x27244f,_0x23cbc4){return _0x17b500(_0x23cbc4,_0x588573-_0x4af69b._0x5b56f6,_0x27244f-_0x4af69b._0x20dced,_0x2af138- -_0x4af69b._0x5a11f7);}_0x5bc8c1[_0x4031d8(-0x217,-0x242,-_0x41bf3e._0x32c63c,-_0x41bf3e._0x4eb324)]===!![]&&(this[_0x2f8c68(-0x2e7,-_0x41bf3e._0x3d98e3,-0x300,-_0x41bf3e._0x14b6c0)]=[],this[_0x2f8c68(-_0x41bf3e._0x2c4bc9,-0x2c9,-0x2ab,-_0x41bf3e._0x510aa8)]=0x0);}[_0x48a7b0(-0x227,-0x2c9,-0x27c,-0x2d7)](_0x431987){const _0xfdf0f9={_0x408464:0x57};function _0x9f78e7(_0x439482,_0x50672c,_0x12e5ea,_0x16296d){return _0x17b500(_0x439482,_0x50672c-0x4e,_0x12e5ea-0xa2,_0x16296d-0x106);}this[_0x9f78e7(-_0xfdf0f9._0x408464,-0x8d,-0x1f,-0x4a)]=_0x431987;}['setChatModel'](_0x5efe62){this['deps']['chatModel']=_0x5efe62;}async[_0x48a7b0(-0x2af,-0x2e0,-0x2b0,-0x301)](_0x2cfa23=this[_0x48a7b0(-0x2b0,-0x257,-0x28f,-0x29b)],_0x1daf9b={}){const _0x34b361={_0x3dee2c:0x317,_0x3cfad3:0x2fb,_0x2d0d06:0x2eb,_0x4b5144:0x364,_0x45d69f:0x372,_0x2f26c4:0x2f1,_0x331fce:0x336,_0x32e2f1:0x362,_0xebfc36:0x18f,_0x5db310:0x150,_0x227876:0x144,_0x5861d7:0x17c,_0x4d49c1:0x16b,_0x21a8ac:0xfe,_0x909ffa:0x174,_0x289653:0x352,_0x2bed5f:0x150,_0x32a469:0x373,_0x50073e:0x2e4,_0x513c0b:0x319,_0x4b1b39:0x34d,_0x28c242:0x36f,_0x4fa15d:0x2f6,_0x3eb31b:0x342,_0x4cc22b:0x17b,_0x46ec9d:0x150,_0x590234:0x120,_0x39f600:0x2c7},_0x1c3c8e={_0x3aa6b9:0x107},_0x10ba39={_0x43fd2e:0x10d,_0x5a9aa1:0x472};if(!_0x2cfa23)throw new Error(_0x1b659d(_0x34b361._0x3dee2c,0x31d,_0x34b361._0x3cfad3,_0x34b361._0x2d0d06));function _0x1b659d(_0x494d7a,_0x57ebaf,_0xfe57a4,_0xcdd599){return _0x17b500(_0x494d7a,_0x57ebaf-0x1e2,_0xfe57a4-_0x10ba39._0x43fd2e,_0xcdd599-_0x10ba39._0x5a9aa1);}this[_0x1b659d(_0x34b361._0x4b5144,0x309,0x376,0x364)]+=0x1;function _0x552eb9(_0x50886e,_0x23e923,_0x4b76f5,_0x154740){return _0x48a7b0(_0x50886e,_0x23e923-0x115,_0x4b76f5-_0x1c3c8e._0x3aa6b9,_0x154740-0x13f);}try{const _0x5c4771=await runTurn({'sessionId':this[_0x1b659d(_0x34b361._0x45d69f,0x32b,_0x34b361._0x2f26c4,0x322)],'turnId':createTurnId(this['turnIndex']),'streaming':_0x1daf9b[_0x1b659d(0x331,0x36e,0x348,0x366)],'signal':_0x1daf9b[_0x1b659d(0x3a1,0x341,_0x34b361._0x331fce,_0x34b361._0x32e2f1)],'system':this[_0x1b659d(0x320,0x366,0x2fa,0x30b)],'messages':this[_0x552eb9(-0x19d,-_0x34b361._0xebfc36,-_0x34b361._0x5db310,-0x151)],'message':normalizeUserInput(_0x2cfa23)},this[_0x552eb9(-_0x34b361._0x227876,-_0x34b361._0x5861d7,-_0x34b361._0x4d49c1,-0x15e)]);return this[_0x552eb9(-0x1a6,-_0x34b361._0x21a8ac,-0x150,-_0x34b361._0x909ffa)]=_0x5c4771[_0x1b659d(0x34f,0x34f,0x3ac,_0x34b361._0x289653)][_0x552eb9(-0x102,-0x10d,-_0x34b361._0x2bed5f,-0x144)][_0x1b659d(0x338,_0x34b361._0x32a469,_0x34b361._0x50073e,_0x34b361._0x513c0b)](normalizeMessage),_0x5c4771;}catch(_0x298090){if(_0x298090 instanceof TurnFailedError){this[_0x1b659d(0x35d,_0x34b361._0x4b1b39,_0x34b361._0x28c242,0x346)]=synthesizeMissingToolResults(_0x298090[_0x1b659d(_0x34b361._0x4fa15d,_0x34b361._0x3eb31b,0x330,0x352)][_0x552eb9(-_0x34b361._0x4cc22b,-0xf9,-_0x34b361._0x46ec9d,-_0x34b361._0x590234)][_0x1b659d(0x2de,0x2ef,_0x34b361._0x39f600,_0x34b361._0x513c0b)](normalizeMessage));throw _0x298090[_0x552eb9(-0xd7,-0xf3,-0x111,-0x125)];}throw _0x298090;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
@@ -1 +0,0 @@
1
- function _0x54f2(_0x544475,_0x310e75){_0x544475=_0x544475-0x1d1;const _0x433de9=_0x433d();let _0x54f229=_0x433de9[_0x544475];if(_0x54f2['jOqHhJ']===undefined){var _0x4b33d8=function(_0x1019c8){const _0xd034a2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x9d4b5e='',_0x1e9f11='';for(let _0x3ff3d7=0x0,_0x42ce8e,_0x52e098,_0x253399=0x0;_0x52e098=_0x1019c8['charAt'](_0x253399++);~_0x52e098&&(_0x42ce8e=_0x3ff3d7%0x4?_0x42ce8e*0x40+_0x52e098:_0x52e098,_0x3ff3d7++%0x4)?_0x9d4b5e+=String['fromCharCode'](0xff&_0x42ce8e>>(-0x2*_0x3ff3d7&0x6)):0x0){_0x52e098=_0xd034a2['indexOf'](_0x52e098);}for(let _0x34ded0=0x0,_0x120eb7=_0x9d4b5e['length'];_0x34ded0<_0x120eb7;_0x34ded0++){_0x1e9f11+='%'+('00'+_0x9d4b5e['charCodeAt'](_0x34ded0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1e9f11);};_0x54f2['CMrlOh']=_0x4b33d8,_0x54f2['RHdPvp']={},_0x54f2['jOqHhJ']=!![];}const _0x46b955=_0x433de9[0x0],_0x3a6dde=_0x544475+_0x46b955,_0x41489b=_0x54f2['RHdPvp'][_0x3a6dde];return!_0x41489b?(_0x54f229=_0x54f2['CMrlOh'](_0x54f229),_0x54f2['RHdPvp'][_0x3a6dde]=_0x54f229):_0x54f229=_0x41489b,_0x54f229;}(function(_0x389a11,_0x31990f){const _0x25828b={_0x3b5889:0x11d,_0x321ca2:0xfc,_0x1595cb:0xd5,_0x39d6fc:0xbf,_0x5d13bf:0xc9,_0x1d0e68:0xc0,_0x3c7270:0x12,_0x4846f1:0x14,_0x2bdc3c:0x6,_0x4a05da:0xff,_0x446193:0xd6,_0x18efb5:0xf1,_0x5abe2e:0x104,_0x52b51b:0x121,_0x51e8ee:0x103,_0x52cf3d:0xf8,_0x18f221:0x16,_0x30e7ba:0x8,_0x579862:0x2a,_0x1e0d19:0xde,_0x616e60:0xd4,_0x1543f8:0xc2,_0x4f7dfb:0x5d,_0x5b7e13:0x3b},_0x17b77b={_0x4cdb29:0x210};function _0x3706e6(_0x4a51f9,_0x405d09,_0x328f95,_0x38a12a){return _0x54f2(_0x328f95- -0x2d5,_0x38a12a);}function _0x211543(_0x10df77,_0x37bc02,_0x36cb04,_0x329ee9){return _0x54f2(_0x329ee9- -_0x17b77b._0x4cdb29,_0x10df77);}const _0x51b22b=_0x389a11();while(!![]){try{const _0x548b04=parseInt(_0x3706e6(-0xf7,-0xf0,-0xdc,-0xd3))/0x1+parseInt(_0x3706e6(-_0x25828b._0x3b5889,-0xf5,-0xfe,-_0x25828b._0x321ca2))/0x2*(-parseInt(_0x3706e6(-0xf2,-_0x25828b._0x1595cb,-0xd7,-_0x25828b._0x39d6fc))/0x3)+parseInt(_0x3706e6(-0xdd,-0xcc,-_0x25828b._0x5d13bf,-_0x25828b._0x1d0e68))/0x4*(-parseInt(_0x211543(_0x25828b._0x3c7270,-_0x25828b._0x4846f1,-_0x25828b._0x2bdc3c,-0x2))/0x5)+parseInt(_0x3706e6(-0xd7,-_0x25828b._0x4a05da,-0xf4,-0xf7))/0x6*(parseInt(_0x3706e6(-0xbe,-0xda,-_0x25828b._0x446193,-0xcd))/0x7)+-parseInt(_0x3706e6(-_0x25828b._0x18efb5,-0x124,-_0x25828b._0x5abe2e,-_0x25828b._0x52b51b))/0x8*(-parseInt(_0x3706e6(-0x11c,-0xe9,-_0x25828b._0x51e8ee,-_0x25828b._0x52cf3d))/0x9)+-parseInt(_0x211543(0x7,-_0x25828b._0x18f221,-_0x25828b._0x30e7ba,-0x5))/0xa*(parseInt(_0x211543(-0x29,-0x3b,-_0x25828b._0x579862,-0x24))/0xb)+-parseInt(_0x3706e6(-0xd8,-_0x25828b._0x1e0d19,-_0x25828b._0x616e60,-_0x25828b._0x1543f8))/0xc*(parseInt(_0x211543(-0x42,-0x33,-_0x25828b._0x4f7dfb,-_0x25828b._0x5b7e13))/0xd);if(_0x548b04===_0x31990f)break;else _0x51b22b['push'](_0x51b22b['shift']());}catch(_0x10fb50){_0x51b22b['push'](_0x51b22b['shift']());}}}(_0x433d,0x8017f));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-QDOE7NWO.js';function systemToInstructions(_0x9d4b5e){const _0x2c691d={_0x4045a2:0x1ab,_0xeb97a2:0x1cd,_0x37372a:0x3ac,_0x658969:0x3d6,_0x17f77a:0x3b8,_0x58b6cf:0x3a2},_0x4a43a3={_0x36bc56:0x3a0};function _0x309266(_0x4aae0c,_0x21fc19,_0x4019d,_0x59fd50){return _0x54f2(_0x4019d-0x1c8,_0x4aae0c);}function _0x5f1ca0(_0x34b7cc,_0x1c3e10,_0x27166c,_0x41e124){return _0x54f2(_0x1c3e10- -_0x4a43a3._0x36bc56,_0x27166c);}return normalizeContent(_0x9d4b5e)[_0x5f1ca0(-0x1c0,-_0x2c691d._0x4045a2,-0x1a0,-_0x2c691d._0xeb97a2)](_0x1e9f11=>_0x1e9f11[_0x5f1ca0(-0x1df,-0x1cd,-0x1c1,-0x1c0)]==='text')[_0x309266(_0x2c691d._0x37372a,0x3d7,0x3ba,0x3cd)](_0x3ff3d7=>_0x3ff3d7['text'])[_0x309266(_0x2c691d._0x658969,0x3bf,_0x2c691d._0x17f77a,_0x2c691d._0x58b6cf)]('\x0a\x0a');}function pushUserContentMessage(_0x42ce8e,_0x52e098,_0x253399){const _0x492a96={_0x5018a2:0x2fc,_0x3c7400:0x2fe,_0x19589d:0x2fe,_0x551fda:0x2c7},_0x1bc87f={_0x217fa6:0xeb};function _0x523bd8(_0x16e371,_0x2141d2,_0x568197,_0x4264da){return _0x54f2(_0x2141d2-_0x1bc87f._0x217fa6,_0x568197);}if(_0x253399['length']===0x0)return;function _0xc463cd(_0x47f744,_0xee3917,_0x3cb2a3,_0x4aaba7){return _0x54f2(_0xee3917- -0x1cb,_0x47f744);}_0x42ce8e[_0x523bd8(_0x492a96._0x5018a2,_0x492a96._0x3c7400,_0x492a96._0x19589d,0x2fc)]({'type':_0x523bd8(0x2d3,_0x492a96._0x551fda,0x2d2,0x2c1),'role':_0x52e098,'content':_0x253399});}function hasSerializableToolUse(_0x34ded0){const _0x49c714={_0x564242:0x6a,_0x3cb852:0x54,_0x4f3a9a:0x60,_0xebe2b8:0x71,_0x3022b0:0x7d,_0x3fb568:0x68,_0x52c4fc:0x79},_0xa1a409={_0x3b8d67:0x18c};function _0x57a0cb(_0x4c0716,_0x4e73ed,_0x87953a,_0xfc67cd){return _0x54f2(_0x87953a- -_0xa1a409._0x3b8d67,_0x4c0716);}function _0x1182b2(_0x403ef2,_0x54a0ce,_0x4c939c,_0x500d7a){return _0x54f2(_0x54a0ce-0x149,_0x4c939c);}return _0x34ded0['id'][_0x57a0cb(0x5b,0x8c,_0x49c714._0x564242,_0x49c714._0x3cb852)]()['length']>0x0&&_0x34ded0[_0x57a0cb(_0x49c714._0x4f3a9a,_0x49c714._0xebe2b8,_0x49c714._0x3022b0,0x91)]['trim']()[_0x57a0cb(0x7a,0x69,_0x49c714._0x3fb568,_0x49c714._0x52c4fc)]>0x0;}function hasSerializableToolResult(_0x120eb7){const _0x20c5f8={_0x181fbc:0x3e6,_0x2ceca6:0x401,_0x3165e1:0x45e,_0x67a877:0x46d};function _0x6c471a(_0x133869,_0x14a47f,_0xd2c1a1,_0x485869){return _0x54f2(_0x133869-0x200,_0x485869);}function _0xe0ad32(_0x1f1ee2,_0x389c22,_0x3e89d5,_0x5b2995){return _0x54f2(_0x3e89d5-0x25b,_0x1f1ee2);}return _0x120eb7[_0x6c471a(_0x20c5f8._0x181fbc,0x3e4,0x3d9,_0x20c5f8._0x2ceca6)][_0xe0ad32(0x45e,_0x20c5f8._0x3165e1,0x451,_0x20c5f8._0x67a877)]()['length']>0x0;}function isResponseInputObject(_0x206534){const _0x119f1a={_0x4e4e86:0x1b5,_0x1b86dd:0x19c,_0xf63447:0x1be,_0x571cac:0x1b4,_0x4ad25f:0x1e3,_0x2ad480:0x1be,_0x40addc:0x1a3},_0x2ccbbc={_0x237e4a:0x15};if(typeof _0x206534!==_0x22cefd(-_0x119f1a._0x4e4e86,-_0x119f1a._0x1b86dd,-_0x119f1a._0xf63447,-_0x119f1a._0x571cac)||_0x206534===null||Array[_0x1fd134(0x203,_0x119f1a._0x4ad25f,0x1e1,0x1cf)](_0x206534))return![];const _0x11706a=_0x206534;function _0x22cefd(_0x98e54,_0x4650a1,_0x268711,_0xcf363d){return _0x54f2(_0x98e54- -0x39a,_0x4650a1);}function _0x1fd134(_0x9b15fa,_0x16938c,_0x4d885f,_0x380392){return _0x54f2(_0x16938c- -_0x2ccbbc._0x237e4a,_0x9b15fa);}return typeof _0x11706a[_0x1fd134(0x1c4,_0x119f1a._0x2ad480,0x1ca,_0x119f1a._0x40addc)]==='string';}function isImageToolResultBlock(_0x1e6e97){const _0x79f9b5={_0xe3b639:0x14c,_0x211b98:0x16a,_0x5003f8:0x37b,_0x1d4bfd:0x39c,_0x476024:0x17f,_0x59f063:0x179,_0x27a246:0x178,_0x2fa757:0x180,_0x36f8fa:0x17e,_0x16eccd:0x173,_0x26efa9:0x177,_0x2a3b95:0x372,_0x1e43e6:0x354,_0x3bcd13:0x33c,_0xb1a440:0x359,_0x312c1c:0x350},_0x12bd53={_0x587579:0x183};if(typeof _0x1e6e97!==_0xbda3f3(0x18a,_0x79f9b5._0xe3b639,_0x79f9b5._0x211b98,0x164)||_0x1e6e97===null||Array[_0x36e1bc(0x376,_0x79f9b5._0x5003f8,_0x79f9b5._0x1d4bfd,0x377)](_0x1e6e97))return![];const _0x2586ad=_0x1e6e97;function _0x36e1bc(_0x4e3161,_0x1350fb,_0xa267a3,_0x1ad2ff){return _0x54f2(_0x1350fb-_0x12bd53._0x587579,_0x4e3161);}function _0xbda3f3(_0x50130d,_0x3d6e4a,_0x112a66,_0xcc303b){return _0x54f2(_0x112a66- -0x7b,_0xcc303b);}return _0x2586ad['type']===_0xbda3f3(0x196,_0x79f9b5._0x476024,0x18d,0x178)&&_0x2586ad['source']?.['type']===_0xbda3f3(0x17c,_0x79f9b5._0x59f063,_0x79f9b5._0x27a246,0x15b)&&typeof _0x2586ad[_0xbda3f3(0x173,_0x79f9b5._0x2fa757,0x168,_0x79f9b5._0x36f8fa)][_0xbda3f3(_0x79f9b5._0x16eccd,0x184,0x182,0x181)]==='string'&&typeof _0x2586ad[_0xbda3f3(_0x79f9b5._0x26efa9,0x186,0x168,0x169)][_0x36e1bc(0x390,_0x79f9b5._0x2a3b95,_0x79f9b5._0x1e43e6,0x36a)]===_0x36e1bc(_0x79f9b5._0x3bcd13,_0x79f9b5._0xb1a440,_0x79f9b5._0x312c1c,0x349);}function getToolResultText(_0x2e4775){const _0x222396={_0x3e765b:0x35b,_0x532a4a:0x364,_0x4d5c0a:0x355,_0x41efae:0x3aa,_0x35b1be:0x38a,_0x29ab49:0x394,_0x22a756:0x387,_0x431bb5:0x37b,_0x54223b:0x3a9,_0x44f95c:0x127,_0x4c3373:0xf4,_0x188d25:0x135,_0x5555b8:0x118},_0x3b9e1e={_0x38ed5b:0xe1},_0x3a368d={_0x450a5c:0x4e6,_0x2c5281:0x516,_0x338ade:0x4f0},_0x327723={_0x1b9678:0x1a5,_0x1bc157:0x48c,_0x5deff8:0x179},_0x108f54={_0x106ece:0x1e2,_0x3bb62a:0x10c};if(typeof _0x2e4775===_0x28b172(_0x222396._0x3e765b,0x36b,_0x222396._0x532a4a,_0x222396._0x4d5c0a))return _0x2e4775;const _0x626739=_0x2e4775[_0x28b172(_0x222396._0x41efae,_0x222396._0x35b1be,0x36a,0x38c)](_0x2a18aa=>{function _0x2868c8(_0x5d94e5,_0x17b2c5,_0x2b7e6b,_0x45dc55){return _0x28b172(_0x5d94e5-_0x108f54._0x106ece,_0x17b2c5-0x17a,_0x2b7e6b-_0x108f54._0x3bb62a,_0x2b7e6b);}function _0x8bd885(_0x51dfcf,_0x3a9fca,_0x4b67c2,_0x3dbb39){return _0x370cb6(_0x51dfcf-_0x327723._0x1b9678,_0x3dbb39,_0x3a9fca-_0x327723._0x1bc157,_0x3dbb39-_0x327723._0x5deff8);}return typeof _0x2a18aa===_0x2868c8(_0x3a368d._0x450a5c,0x4f4,_0x3a368d._0x2c5281,0x4da)&&_0x2a18aa!==null&&_0x2a18aa['type']===_0x2868c8(0x507,0x4f7,_0x3a368d._0x338ade,0x4da);})[_0x28b172(_0x222396._0x29ab49,_0x222396._0x22a756,_0x222396._0x431bb5,_0x222396._0x54223b)](_0x5adc97=>_0x5adc97[_0x28b172(0x393,0x37d,0x37a,0x373)])[_0x370cb6(_0x222396._0x44f95c,_0x222396._0x4c3373,0x10f,0x120)]('\x0a\x0a')[_0x370cb6(0x117,_0x222396._0x188d25,0x115,_0x222396._0x5555b8)]();function _0x370cb6(_0x4db44e,_0x49700c,_0x3027ed,_0x540641){return _0x54f2(_0x3027ed- -_0x3b9e1e._0x38ed5b,_0x49700c);}function _0x28b172(_0x5b4246,_0x21ace7,_0x154f9c,_0x299176){return _0x54f2(_0x21ace7-0x195,_0x299176);}return _0x626739['length']>0x0?_0x626739:_0x370cb6(0x125,0x11e,0x110,0xf5);}function getToolResultImages(_0x16646c){return Array['isArray'](_0x16646c)?_0x16646c['filter'](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x46cf09){const _0x4408cd={_0x486a28:0x2de,_0x485ae6:0x2d4,_0xbc2339:0x2db,_0x12a431:0x316,_0x15293b:0x300,_0xc911a5:0x308,_0x2ef04e:0x317},_0x42ec22={_0x41c51b:0xf0};function _0x5ec8cc(_0x4b1d99,_0x308840,_0x5c21d9,_0x4bd3f2){return _0x54f2(_0x4b1d99-0x3e2,_0x5c21d9);}function _0x5dd7be(_0x35c14f,_0x585e39,_0x7e0d9,_0x3db89d){return _0x54f2(_0x585e39-_0x42ec22._0x41c51b,_0x7e0d9);}return _0x46cf09[_0x5dd7be(_0x4408cd._0x486a28,0x2ea,0x2d8,_0x4408cd._0x485ae6)]?.[_0x5dd7be(0x2e9,_0x4408cd._0xbc2339,0x2ea,0x2d7)]??_0x5dd7be(_0x4408cd._0x12a431,_0x4408cd._0x15293b,_0x4408cd._0xc911a5,_0x4408cd._0x2ef04e);}function createOpenAiResponsesReasoning(_0x1d8568){const _0x28ab3a={_0x2ec306:0x1be,_0x4af67b:0x196,_0x1b6073:0xd7,_0x2c0d29:0x1ba,_0x47868a:0x1b1,_0x204c19:0x105,_0x8974b8:0x102,_0x221d68:0xec,_0x32bf04:0x10d,_0x493a65:0x109,_0x5a5d90:0xdf,_0x15015c:0x18b,_0x54341d:0xe5,_0x1eaf86:0xd9,_0x1a6b58:0xf8,_0x1fb5a2:0xdd,_0x12086d:0xbb,_0x4da21f:0xf5},_0x660a19={_0x5b20d1:0x46},_0x4624a5=resolveOpenAiReasoningConfig(_0x1d8568[_0x3f9b0e(0x1b4,_0x28ab3a._0x2ec306,_0x28ab3a._0x4af67b,_0x28ab3a._0x4af67b)]);if(!_0x4624a5)return{};const _0x5aaa52={};function _0x3f9b0e(_0x6a271,_0x20d055,_0x388a34,_0x3e47d9){return _0x54f2(_0x6a271- -_0x660a19._0x5b20d1,_0x388a34);}const _0x549629=_0x4624a5[_0x2c79d1(-0xe5,-0xf9,-_0x28ab3a._0x1b6073,-_0x28ab3a._0x1b6073)]??(resolveReasoningVisibility(_0x1d8568)===_0x3f9b0e(0x1ca,0x1d2,_0x28ab3a._0x2c0d29,_0x28ab3a._0x47868a)?_0x2c79d1(-0xfb,-_0x28ab3a._0x204c19,-_0x28ab3a._0x8974b8,-_0x28ab3a._0x221d68):void 0x0);_0x4624a5[_0x2c79d1(-0xf4,-0xfe,-_0x28ab3a._0x32bf04,-_0x28ab3a._0x493a65)]&&(_0x5aaa52[_0x2c79d1(-0xf4,-_0x28ab3a._0x5a5d90,-0x101,-0xf5)]=_0x4624a5[_0x3f9b0e(0x199,0x19a,_0x28ab3a._0x15015c,0x1b0)]);_0x549629&&(_0x5aaa52[_0x2c79d1(-_0x28ab3a._0x54341d,-_0x28ab3a._0x1eaf86,-_0x28ab3a._0x1a6b58,-_0x28ab3a._0x1fb5a2)]=_0x549629);function _0x2c79d1(_0x4ca747,_0x2b4696,_0x242b4c,_0x3d439a){return _0x54f2(_0x4ca747- -0x2d3,_0x2b4696);}return{..._0x4624a5[_0x2c79d1(-0xd1,-0xb2,-0xb0,-0xbc)]===![]?{}:{'include':[_0x2c79d1(-0xc2,-_0x28ab3a._0x12086d,-0xc1,-0xcc)]},...Object['keys'](_0x5aaa52)[_0x2c79d1(-0xdf,-0xda,-0xc6,-_0x28ab3a._0x4da21f)]>0x0?{'reasoning':_0x5aaa52}:{}};}function pushAssistantProviderState(_0x152764,_0x1a8621){const _0x303c32={_0x6bba66:0x317,_0x59ed8d:0x33d,_0x2a7612:0x310,_0x26416e:0x332,_0x1dcb68:0x4d7,_0x18ee1a:0x50a,_0x1da086:0x4de,_0x359974:0x4ee,_0x111b57:0x326,_0x45ea67:0x328,_0x3297de:0x353,_0x141284:0x342};function _0x1ab8bb(_0x49c091,_0x48e9a6,_0x5df9d7,_0x3264d5){return _0x54f2(_0x3264d5-0x14e,_0x48e9a6);}if(_0x1a8621['role']!==_0x1ab8bb(_0x303c32._0x6bba66,_0x303c32._0x59ed8d,_0x303c32._0x2a7612,_0x303c32._0x26416e))return![];const _0x540194=_0x1a8621[_0x2ae7a8(0x4e8,0x4dd,_0x303c32._0x1dcb68,_0x303c32._0x18ee1a)]?.[_0x2ae7a8(0x4e6,_0x303c32._0x1da086,_0x303c32._0x359974,0x506)]??[];function _0x2ae7a8(_0x5a7d99,_0x5da3c3,_0x15869c,_0x374c4f){return _0x54f2(_0x5a7d99-0x306,_0x374c4f);}if(_0x540194[_0x1ab8bb(_0x303c32._0x111b57,_0x303c32._0x45ea67,_0x303c32._0x3297de,_0x303c32._0x141284)]===0x0)return![];for(const _0x4263df of _0x540194){isResponseInputObject(_0x4263df)&&_0x152764['push'](structuredClone(_0x4263df));}return!![];}function _0x433d(){const _0x3dae7f=['DhjPBq','BwvZC2fNzxm','AxnbCNjHEq','otCZmtqWy1nqD3vS','CMvHC29UAw5N','C3rYDwn0DxjLzf9VDxrWDxq','zgf0ytO','BwvKAwfFDhLWzq','mJa2mJK3ngLLwu5kAG','mta1n01XCM95qG','Aw5WDxrFDgv4Da','mtj3B2Lxyxu','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','Dg9VBhm','B3v0Chv0rM9YBwf0','B3v0Chv0x3rLEhq','zNvUy3rPB25Fy2fSBa','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','Aw1Hz2u','BMfTzq','Aw5WDxrFAw1Hz2u','mJe0mJa1meTcAKnlyq','mJy5mdrwzhD2r1e','C3bSAwnL','nJvtDenwuuK','y29UDgvUDa','DxnLCI12AxnPyMXL','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','Bwf4vg9Rzw5Z','ChvZAa','CM9Szq','mtG3otC2t1b4Dezn','mZzZB3bfu3i','DhLWzq','Bw9KzwW','ntG0oti4nwnWyLLAsa','C3rYAw5N','mKLXAw9sqq','yxv0BW','Aw5WDxq','DxnLCG','ANnVBL9Zy2HLBwe','BwvZC2fNzq','zNvUy3rPB24','C3rYAw5NAwz5','zwzMB3j0','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','mZu2mZrQC0nsqMG','ChjVDMLKzxjtDgf0zq','C291CMnL','yxnZAxn0yw50','B2jQzwn0','Dg9VBf91C2vFAwq','o2jHC2u2ncW','Dgv4Da','zgvZy3jPChrPB24','C3LZDgvT','DMLZAwjPBgL0Eq','mtfMENfpzwS','C2nOzw1H','C3vTBwfYEq','zgf0yq','AM9PBG','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','BwfW','yMfZzty0','BgvUz3rO','zMLSDgvY'];_0x433d=function(){return _0x3dae7f;};return _0x433d();}function toOpenAiResponsesRequest(_0x20a8d3){const _0x1ff43f={_0x34c74d:0x3d4,_0x48f1a2:0x108,_0x440668:0x13c,_0x28c2a7:0x10e,_0xace331:0x3b5,_0x4ec30d:0x3b0,_0x301dd4:0x3cf,_0x569091:0x11a,_0x8b1c09:0x119,_0x5a926b:0x39b,_0x8ac5a5:0x3ea,_0x14ad43:0xfe,_0x5528c0:0x3b5,_0x5c7b8d:0x3b1,_0x3a05d4:0x11c,_0x1b6da3:0x114,_0x1b36a3:0x10a,_0x5b0daa:0x3df,_0xb06e0f:0x3d8,_0x43192a:0x3d8,_0x3cf9e3:0x3da,_0x5b7e2b:0x3fa,_0x5a3f3d:0xdc,_0x152e89:0x107,_0x24f2fb:0xf2,_0x389c9f:0xce,_0x378c39:0xe6,_0x12f31d:0x3e1,_0x2ade19:0x3e2,_0x4180c4:0x10d,_0x47e2b5:0x127,_0x2077f4:0xef,_0x35f65c:0xfa,_0x391071:0x13b,_0x55d858:0x123,_0x57d8e5:0x113,_0xcce39:0x106,_0x415a5c:0xf9,_0x2b9b7a:0x103,_0x155b40:0x3d2,_0x30b249:0x3e6,_0x5e44f4:0x3d9,_0x1b6206:0x3e5,_0x526d12:0xf0,_0x559580:0xe5,_0xbad561:0xea,_0x3a4c26:0xec,_0x5cc588:0x3f2,_0x2a4138:0x3dc,_0x3ce3bb:0x3a6,_0x45429b:0x3bd,_0x22e69f:0x10f,_0x507f42:0xf8,_0x54b2a3:0x3e4,_0x32f6f1:0x3c9,_0x57618d:0x3ad,_0x54fd9f:0x3a7,_0x29e6fe:0x3a7,_0x345bbc:0x3df,_0x55a16e:0x3b9,_0x90f325:0x3cd,_0x5e3cce:0x10b,_0x206dc1:0x118,_0x1f1ce0:0x101,_0x40418b:0x3f4,_0x266e53:0x3b8},_0xc05ffc={_0x4a74cb:0x46b,_0xb1b1a6:0x48b,_0x427b18:0x47f},_0x2fda02={_0x22190f:0xa8},_0x9e13ff={_0x152fae:0x1d2};function _0x5a6339(_0x45decc,_0xc4b1b4,_0x5856c4,_0x5404cb){return _0x54f2(_0x5404cb- -0xec,_0x45decc);}function _0x2498d6(_0x3ebaf5,_0x3e364a,_0x2324a1,_0x1eb5b2){return _0x54f2(_0x3ebaf5-_0x9e13ff._0x152fae,_0x1eb5b2);}const _0x133bab=[];for(const _0x44d97a of _0x20a8d3[_0x2498d6(0x3c9,_0x1ff43f._0x34c74d,0x3ba,0x3dd)]){if(pushAssistantProviderState(_0x133bab,_0x44d97a))continue;const _0x4f92dd=[];for(const _0x525fc8 of normalizeContent(_0x44d97a[_0x5a6339(_0x1ff43f._0x48f1a2,0x142,0x13c,0x123)])){if(_0x525fc8[_0x2498d6(0x3a5,0x3aa,0x3b3,0x388)]==='text'){_0x4f92dd['push'](_0x44d97a[_0x5a6339(0x131,_0x1ff43f._0x440668,_0x1ff43f._0x28c2a7,0x128)]===_0x2498d6(0x3b6,_0x1ff43f._0xace331,_0x1ff43f._0x4ec30d,_0x1ff43f._0x301dd4)?{'type':_0x5a6339(_0x1ff43f._0x569091,0x132,0x119,_0x1ff43f._0x8b1c09),'text':_0x525fc8[_0x2498d6(0x3ba,0x3da,0x3a8,_0x1ff43f._0x5a926b)]}:{'type':_0x2498d6(0x3d2,0x3bd,0x3e8,0x3d5),'text':_0x525fc8[_0x5a6339(0x104,0x105,0xf3,0xfc)]});continue;}if(_0x525fc8[_0x5a6339(0xe6,0x100,0xf9,0xe7)]==='image'){_0x4f92dd[_0x2498d6(0x3e5,0x401,_0x1ff43f._0x8ac5a5,0x3e4)]({'type':_0x5a6339(_0x1ff43f._0x28c2a7,0x114,_0x1ff43f._0x14ad43,0x11e),'image_url':'data:'+_0x525fc8[_0x2498d6(_0x1ff43f._0x5528c0,_0x1ff43f._0x5c7b8d,0x3ce,0x3c2)]['media_type']+_0x5a6339(0xfa,_0x1ff43f._0x3a05d4,0xf8,0xfb)+_0x525fc8[_0x5a6339(0xe3,_0x1ff43f._0x1b6da3,_0x1ff43f._0x1b36a3,0xf7)]['data']});continue;}pushUserContentMessage(_0x133bab,_0x44d97a['role'],_0x4f92dd[_0x2498d6(_0x1ff43f._0x5b0daa,0x3d5,0x3eb,_0x1ff43f._0xb06e0f)](0x0));if(_0x525fc8['type']==='tool_use'){if(!hasSerializableToolUse(_0x525fc8))continue;_0x133bab['push']({'type':_0x2498d6(_0x1ff43f._0x43192a,_0x1ff43f._0x3cf9e3,0x3c9,_0x1ff43f._0x5b7e2b),'call_id':_0x525fc8['id'],'name':_0x525fc8['name'],'arguments':JSON[_0x5a6339(_0x1ff43f._0x5a3f3d,_0x1ff43f._0x152e89,0x106,_0x1ff43f._0x24f2fb)](_0x525fc8[_0x5a6339(_0x1ff43f._0x389c9f,0x10a,0xe6,0xed)]??{})});continue;}if(_0x525fc8[_0x5a6339(_0x1ff43f._0x378c39,0xda,0xcf,0xe7)]==='tool_result'){if(!hasSerializableToolResult(_0x525fc8))continue;const _0x4f97f2=getToolResultText(_0x525fc8[_0x2498d6(_0x1ff43f._0x12f31d,_0x1ff43f._0x2ade19,0x3c6,0x3f6)]);_0x133bab[_0x5a6339(0x120,_0x1ff43f._0x4180c4,0x11e,_0x1ff43f._0x47e2b5)]({'type':'function_call_output','call_id':_0x525fc8[_0x5a6339(_0x1ff43f._0x2077f4,0xfb,0x102,_0x1ff43f._0x35f65c)],'output':_0x4f97f2});const _0x4d46a1=getToolResultImages(_0x525fc8[_0x5a6339(0x139,0x13f,_0x1ff43f._0x391071,_0x1ff43f._0x55d858)]);_0x4d46a1[_0x5a6339(_0x1ff43f._0x57d8e5,0xff,_0x1ff43f._0x35f65c,0x108)]>0x0&&_0x133bab[_0x5a6339(0x134,_0x1ff43f._0xcce39,_0x1ff43f._0x47e2b5,0x127)]({'type':'message','role':_0x5a6339(0xcd,_0x1ff43f._0x415a5c,_0x1ff43f._0x2b9b7a,0xee),'content':[{'type':_0x2498d6(_0x1ff43f._0x155b40,0x3c0,_0x1ff43f._0x30b249,0x3c0),'text':_0x2498d6(_0x1ff43f._0x5e44f4,_0x1ff43f._0x1b6206,0x3ca,0x3df)+_0x525fc8[_0x5a6339(_0x1ff43f._0x526d12,_0x1ff43f._0x559580,0x111,_0x1ff43f._0x35f65c)]+'.'},..._0x4d46a1[_0x5a6339(_0x1ff43f._0xbad561,_0x1ff43f._0x3a4c26,_0x1ff43f._0x55d858,0x106)](_0x18e363=>({'type':'input_image','image_url':_0x2498d6(0x3ce,0x3bf,0x3c4,0x3c9)+_0x18e363[_0x5a6339(0x10f,0x10a,0x117,0xf7)][_0x5a6339(0xf1,0x129,0x104,0x111)]+_0x5a6339(0xef,0xde,0xe1,0xfb)+_0x18e363[_0x5a6339(0x10e,0x105,0xda,0xf7)][_0x5a6339(0xfe,0x10c,0x121,0x103)]}))]});}}pushUserContentMessage(_0x133bab,_0x44d97a[_0x2498d6(0x3e6,0x3ff,_0x1ff43f._0x5cc588,_0x1ff43f._0x2a4138)],_0x4f92dd);}return{...createOpenAiResponsesReasoning(_0x20a8d3),'model':_0x20a8d3[_0x2498d6(_0x1ff43f._0x3ce3bb,0x39b,0x3c0,_0x1ff43f._0x45429b)],'instructions':systemToInstructions(_0x20a8d3[_0x5a6339(_0x1ff43f._0x22e69f,_0x1ff43f._0x507f42,0xef,_0x1ff43f._0x14ad43)]),'input':_0x133bab,'max_output_tokens':_0x20a8d3[_0x2498d6(_0x1ff43f._0x54b2a3,0x3f8,0x404,0x3ea)],'tools':_0x20a8d3[_0x2498d6(0x3d5,0x3d0,0x3cc,0x3b5)]['map'](_0x217cf5=>{const _0x1a5712={_0x2892e1:0xbc,_0x437ea1:0x19f};function _0x4b36a3(_0x2591a9,_0x525672,_0x4e6031,_0x38b392){return _0x2498d6(_0x2591a9-_0x1a5712._0x2892e1,_0x525672-0x13e,_0x4e6031-_0x1a5712._0x437ea1,_0x38b392);}function _0x5d1745(_0x1526cb,_0x4ce54a,_0x5751d3,_0x2609f3){return _0x5a6339(_0x2609f3,_0x4ce54a-0x12e,_0x5751d3-_0x2fda02._0x22190f,_0x5751d3-0x1c5);}return{'type':_0x4b36a3(_0xc05ffc._0x4a74cb,0x46d,0x457,0x48c),'name':_0x217cf5[_0x4b36a3(0x497,_0xc05ffc._0xb1b1a6,0x4b6,_0xc05ffc._0x427b18)],'description':_0x217cf5[_0x5d1745(0x2ab,0x2aa,0x2c2,0x2d3)],'parameters':_0x217cf5['input_schema']};}),..._0x20a8d3[_0x2498d6(0x3d6,0x3df,_0x1ff43f._0x32f6f1,0x3f8)]?{'text':{'format':{'type':_0x2498d6(_0x1ff43f._0x57618d,0x3ac,_0x1ff43f._0x54fd9f,_0x1ff43f._0x29e6fe),'name':_0x20a8d3[_0x2498d6(0x3d6,0x3c7,_0x1ff43f._0x345bbc,_0x1ff43f._0x55a16e)]['name']??_0x2498d6(_0x1ff43f._0x90f325,0x3c0,0x3e4,0x3d2),'schema':_0x20a8d3['outputFormat'][_0x5a6339(_0x1ff43f._0x5e3cce,_0x1ff43f._0x206dc1,0xee,_0x1ff43f._0x1f1ce0)],'strict':_0x20a8d3[_0x2498d6(0x3d6,_0x1ff43f._0x40418b,_0x1ff43f._0x266e53,0x3b5)]['strict']??!![]}}}:{}};}export{toOpenAiResponsesRequest};
@@ -1 +0,0 @@
1
- (function(_0x4009d0,_0x48648e){const _0x44fe12={_0x636d0d:0x2c,_0x2c2c42:0x1e,_0x183df1:0x2c,_0x261797:0x4d3,_0x4bd8a3:0x4ca,_0x37b501:0x31,_0x33d398:0x39,_0x149876:0x40,_0x43b381:0x4af,_0xc2404a:0x491,_0x12a665:0x480,_0x4746d6:0x2d,_0x339b2e:0x1c,_0xa5970:0x4b,_0x58a57f:0x59,_0x447ad8:0x48c,_0x3d4033:0x49b,_0x5d8de1:0x497,_0x129ccb:0x4a6,_0x1e5ec1:0x31,_0x5f5045:0x51,_0xcc4f78:0x39,_0x50df86:0x32,_0x2e47d8:0x4b7,_0x287c6b:0x4c8,_0x449f89:0x4bb,_0x487c82:0x14,_0x326459:0x2a,_0x493b5d:0x4b9},_0x4c0acf={_0x499f0f:0x17c};function _0x6aae68(_0xa7dc19,_0x41933f,_0x2bc088,_0x35b3ff){return _0xfe7f(_0xa7dc19-0x35a,_0x35b3ff);}function _0x444e3a(_0x378f74,_0x1a433e,_0x54d6dd,_0x5674f3){return _0xfe7f(_0x5674f3- -_0x4c0acf._0x499f0f,_0x378f74);}const _0x23b6a2=_0x4009d0();while(!![]){try{const _0xe2221d=parseInt(_0x444e3a(-_0x44fe12._0x636d0d,-0x1d,-_0x44fe12._0x2c2c42,-_0x44fe12._0x183df1))/0x1*(parseInt(_0x6aae68(0x4b4,_0x44fe12._0x261797,_0x44fe12._0x4bd8a3,0x4cf))/0x2)+parseInt(_0x444e3a(-_0x44fe12._0x37b501,-0x34,-_0x44fe12._0x33d398,-_0x44fe12._0x149876))/0x3+parseInt(_0x6aae68(0x4b5,0x4ac,0x4b7,_0x44fe12._0x43b381))/0x4*(parseInt(_0x6aae68(_0x44fe12._0xc2404a,_0x44fe12._0x12a665,0x49c,0x489))/0x5)+parseInt(_0x444e3a(-_0x44fe12._0x4746d6,-0x27,-_0x44fe12._0x339b2e,-_0x44fe12._0x33d398))/0x6*(parseInt(_0x444e3a(-_0x44fe12._0xa5970,-_0x44fe12._0x58a57f,-0x45,-0x56))/0x7)+-parseInt(_0x6aae68(_0x44fe12._0x447ad8,_0x44fe12._0x3d4033,_0x44fe12._0x5d8de1,_0x44fe12._0x129ccb))/0x8+parseInt(_0x444e3a(-_0x44fe12._0x1e5ec1,-_0x44fe12._0x5f5045,-_0x44fe12._0xcc4f78,-_0x44fe12._0x50df86))/0x9*(parseInt(_0x6aae68(_0x44fe12._0x2e47d8,_0x44fe12._0x287c6b,0x4c5,_0x44fe12._0x449f89))/0xa)+-parseInt(_0x444e3a(-0x3b,-0x21,-_0x44fe12._0x487c82,-_0x44fe12._0x326459))/0xb*(parseInt(_0x6aae68(0x4a2,_0x44fe12._0x493b5d,0x499,0x4b9))/0xc);if(_0xe2221d===_0x48648e)break;else _0x23b6a2['push'](_0x23b6a2['shift']());}catch(_0x1687ae){_0x23b6a2['push'](_0x23b6a2['shift']());}}}(_0xecab,0xa47c8));function _0xfe7f(_0x47cac0,_0x4a1f86){_0x47cac0=_0x47cac0-0x125;const _0xecabaf=_0xecab();let _0xfe7f84=_0xecabaf[_0x47cac0];if(_0xfe7f['iujYcq']===undefined){var _0x2dceed=function(_0x630ce6){const _0x28800b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x25dbd2='',_0x20e156='';for(let _0x20eccb=0x0,_0x19e38e,_0x1fe509,_0x27cfb9=0x0;_0x1fe509=_0x630ce6['charAt'](_0x27cfb9++);~_0x1fe509&&(_0x19e38e=_0x20eccb%0x4?_0x19e38e*0x40+_0x1fe509:_0x1fe509,_0x20eccb++%0x4)?_0x25dbd2+=String['fromCharCode'](0xff&_0x19e38e>>(-0x2*_0x20eccb&0x6)):0x0){_0x1fe509=_0x28800b['indexOf'](_0x1fe509);}for(let _0x3f3883=0x0,_0x548347=_0x25dbd2['length'];_0x3f3883<_0x548347;_0x3f3883++){_0x20e156+='%'+('00'+_0x25dbd2['charCodeAt'](_0x3f3883)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20e156);};_0xfe7f['kAXVeI']=_0x2dceed,_0xfe7f['ulVvzi']={},_0xfe7f['iujYcq']=!![];}const _0x383594=_0xecabaf[0x0],_0x1cb2fc=_0x47cac0+_0x383594,_0x211278=_0xfe7f['ulVvzi'][_0x1cb2fc];return!_0x211278?(_0xfe7f84=_0xfe7f['kAXVeI'](_0xfe7f84),_0xfe7f['ulVvzi'][_0x1cb2fc]=_0xfe7f84):_0xfe7f84=_0x211278,_0xfe7f84;}function createTextBlock(_0x25dbd2){const _0x30d445={_0x251891:0x3b1};function _0x471d14(_0x1ea36e,_0x575985,_0x29339e,_0x1a282d){return _0xfe7f(_0x1a282d- -_0x30d445._0x251891,_0x1ea36e);}return{'type':_0x471d14(-0x27b,-0x253,-0x253,-0x26c),'text':_0x25dbd2};}function normalizeTextBlock(_0x20e156){const _0x60169d={_0x1eb769:0x4cf,_0x7314ec:0x4b8};function _0x2aa069(_0x4ea3e4,_0x51833b,_0x5ddb7b,_0x3abb3d){return _0xfe7f(_0x3abb3d-0x36d,_0x51833b);}return createTextBlock(_0x20e156[_0x2aa069(0x4b6,_0x60169d._0x1eb769,_0x60169d._0x7314ec,0x4b2)]??'');}function normalizeContent(_0x20eccb){const _0xc43143={_0x58677a:0x275,_0x3fc6da:0xb2,_0x467584:0xc6},_0x491379={_0x4248f0:0x48f,_0x171d4c:0x475,_0x774e45:0x48e},_0x9f0ebe={_0x3152c7:0xdd,_0x2cb93a:0x6fd},_0x3b9bd6={_0x4de081:0x1da},_0x1bc9fa={_0x5dd375:0x3bc};if(typeof _0x20eccb==='string')return[createTextBlock(_0x20eccb)];function _0x320d3e(_0x53de42,_0x1cefae,_0x588793,_0x49bf68){return _0xfe7f(_0x588793- -_0x1bc9fa._0x5dd375,_0x49bf68);}function _0x2610c7(_0x2bf09a,_0x561cb5,_0x2a8dad,_0x2449fe){return _0xfe7f(_0x2449fe- -0x21c,_0x561cb5);}if(!Array[_0x320d3e(-_0xc43143._0x58677a,-0x24a,-0x268,-0x264)](_0x20eccb))return[];return _0x20eccb[_0x2610c7(-0xae,-0xc5,-_0xc43143._0x3fc6da,-_0xc43143._0x467584)](_0x19e38e=>{function _0x2f3398(_0x29e363,_0x268d5d,_0x4fe69b,_0x10c3b4){return _0x320d3e(_0x29e363-_0x3b9bd6._0x4de081,_0x268d5d-0x70,_0x10c3b4-0x53c,_0x4fe69b);}if(_0x19e38e[_0x2a9f7b(0x47b,0x463,0x48a,0x470)]===_0x2a9f7b(0x486,_0x491379._0x4248f0,_0x491379._0x171d4c,_0x491379._0x774e45))return normalizeTextBlock(_0x19e38e);function _0x2a9f7b(_0x93e45c,_0xb2f352,_0x4feaca,_0x54cc57){return _0x320d3e(_0x93e45c-0x5,_0xb2f352-_0x9f0ebe._0x3152c7,_0x93e45c-_0x9f0ebe._0x2cb93a,_0x4feaca);}return structuredClone(_0x19e38e);});}function normalizeSystem(_0x1fe509=[]){const _0x566762={_0x517710:0x219,_0x258513:0x1ff},_0x1a3170={_0x48d263:0x367};function _0xfb9087(_0x51ac08,_0x14215f,_0x1be826,_0x6fbddd){return _0xfe7f(_0x51ac08- -_0x1a3170._0x48d263,_0x14215f);}function _0x2770b2(_0x1eb302,_0x4957b4,_0x1e0010,_0xa8e7cc){return _0xfe7f(_0x1eb302-0x116,_0x4957b4);}return normalizeContent(_0x1fe509)[_0xfb9087(-_0x566762._0x517710,-0x228,-_0x566762._0x258513,-0x205)](_0x27cfb9=>_0x27cfb9[_0x2770b2(0x250,0x256,0x23e,0x23c)]==='text');}function normalizeMessage(_0x3f3883){const _0x465f4c={_0x39d28a:0xb5,_0x1a8382:0x97,_0x406bb4:0xa1,_0x54dfa2:0x8d,_0x5206b8:0x78,_0x5d7578:0x83},_0x59a0c4={_0x549b06:0x2ec};function _0x5afafa(_0x29a727,_0x251c76,_0x484be9,_0x4d9879){return _0xfe7f(_0x4d9879-_0x59a0c4._0x549b06,_0x251c76);}function _0x37ca03(_0x559b3f,_0x18753e,_0x2aa74,_0x144e2c){return _0xfe7f(_0x559b3f- -0x1e2,_0x144e2c);}return{...typeof _0x3f3883['id']===_0x37ca03(-_0x465f4c._0x39d28a,-_0x465f4c._0x1a8382,-0xa6,-_0x465f4c._0x406bb4)?{'id':_0x3f3883['id']}:{},'role':_0x3f3883['role'],'content':normalizeContent(_0x3f3883['content']),..._0x3f3883['providerState']?{'providerState':structuredClone(_0x3f3883[_0x37ca03(-0x97,-_0x465f4c._0x54dfa2,-_0x465f4c._0x5206b8,-_0x465f4c._0x5d7578)])}:{}};}function compileRequest(_0x548347){const _0x25254c={_0x929a77:0xf9,_0x1767cb:0xf5,_0x5332e7:0xfb,_0x4e85fc:0x119,_0x567aa7:0x10c,_0x2db8a4:0x102,_0x3dddb9:0xde,_0x5c3ba2:0xd3,_0x291814:0xe8,_0x474506:0x123,_0x86f0e5:0x124,_0x2eb860:0x12f,_0x138d6e:0x10a,_0x32a511:0x11e};function _0x4c2c7a(_0x59f5f0,_0x2c49c4,_0x321833,_0x373822){return _0xfe7f(_0x59f5f0- -0x22f,_0x2c49c4);}function _0x372bc1(_0x136833,_0x22c37f,_0x4108d2,_0x2c6d70){return _0xfe7f(_0x22c37f- -0x1c,_0x136833);}return{'model':_0x548347[_0x4c2c7a(-0xf4,-0x111,-_0x25254c._0x929a77,-_0x25254c._0x1767cb)]??_0x4c2c7a(-_0x25254c._0x5332e7,-_0x25254c._0x4e85fc,-0xe4,-0x119),'max_tokens':_0x548347['max_tokens']??0x400,..._0x548347[_0x4c2c7a(-0xf7,-_0x25254c._0x567aa7,-_0x25254c._0x2db8a4,-0x107)]?{'reasoning':structuredClone(_0x548347[_0x4c2c7a(-0xf7,-_0x25254c._0x3dddb9,-0xea,-0x112)])}:{},'system':normalizeSystem(_0x548347['system']),'messages':_0x548347[_0x4c2c7a(-_0x25254c._0x5c3ba2,-_0x25254c._0x291814,-0xe3,-0xd5)]['map'](normalizeMessage),'tools':structuredClone(_0x548347[_0x372bc1(_0x25254c._0x474506,0x112,0x126,0x10a)]??[]),'metadata':{'session_id':_0x548347[_0x372bc1(0x12a,_0x25254c._0x86f0e5,_0x25254c._0x2eb860,_0x25254c._0x138d6e)],'turn_id':_0x548347[_0x372bc1(0x12b,_0x25254c._0x474506,0x11e,_0x25254c._0x32a511)]}};}function toChatRequest(_0x481ca3){const _0x4aec6f={_0xcede7d:0xb5,_0x48b4e8:0xc3,_0x3f65ed:0xb8,_0x18c64b:0xaa,_0x1692bd:0xa6,_0x5641a3:0xb3,_0x54d9f3:0xad,_0x1e9393:0xa8,_0x471c89:0xad,_0x1c0aa6:0xb9,_0x1b8955:0x92,_0x32facc:0x9f,_0x1ba0b7:0x94,_0x144adc:0x9c,_0x459f0f:0x9e,_0x1fdae4:0xa8,_0x58e79b:0x8e,_0x15cae8:0xa4,_0x7b88c2:0x4b4,_0x30149b:0x4cb,_0x186652:0x4ba,_0x26795e:0xce,_0x213575:0xb3,_0x162940:0xb6};function _0x243d06(_0x2bbdeb,_0x2db563,_0x287489,_0x486725){return _0xfe7f(_0x486725-0x373,_0x287489);}function _0x15e477(_0x8e8502,_0x5fba5f,_0x524718,_0x291443){return _0xfe7f(_0x291443- -0x1e5,_0x5fba5f);}return{'model':_0x481ca3[_0x15e477(-_0x4aec6f._0xcede7d,-_0x4aec6f._0x48b4e8,-_0x4aec6f._0x3f65ed,-_0x4aec6f._0x18c64b)],'maxTokens':_0x481ca3[_0x15e477(-0xcc,-_0x4aec6f._0x1692bd,-0xca,-0xbc)],..._0x481ca3[_0x15e477(-_0x4aec6f._0x5641a3,-0xac,-0xbf,-_0x4aec6f._0x54d9f3)]?{'reasoning':structuredClone(_0x481ca3[_0x15e477(-0xb0,-0xa0,-_0x4aec6f._0x1e9393,-_0x4aec6f._0x471c89)])}:{},'system':structuredClone(_0x481ca3[_0x15e477(-0xbf,-0x98,-_0x4aec6f._0x1c0aa6,-0xb5)]),'messages':structuredClone(_0x481ca3[_0x15e477(-_0x4aec6f._0x1b8955,-0x98,-0x82,-0x89)]),'tools':structuredClone(_0x481ca3['tools']),'metadata':{'sessionId':_0x481ca3[_0x15e477(-_0x4aec6f._0x32facc,-_0x4aec6f._0x1ba0b7,-_0x4aec6f._0x144adc,-_0x4aec6f._0x459f0f)][_0x15e477(-_0x4aec6f._0x1fdae4,-_0x4aec6f._0x58e79b,-0x91,-_0x4aec6f._0x15cae8)],'turnId':_0x481ca3[_0x243d06(_0x4aec6f._0x7b88c2,_0x4aec6f._0x30149b,0x4ce,_0x4aec6f._0x186652)]['turn_id']},..._0x481ca3['outputFormat']?{'outputFormat':structuredClone(_0x481ca3[_0x15e477(-0xa6,-_0x4aec6f._0x26795e,-_0x4aec6f._0x213575,-_0x4aec6f._0x162940)])}:{}};}function _0xecab(){const _0x261f0e=['CMvHC29UAw5Nvg9Rzw5Z','yxnZAxn0yw50','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','mJu0nfrkDK1wrW','mtm4mdu4ngL0zNbTuW','BwvZC2fNzxm','odq2mZyWwerkqKjL','C3rVCf9YzwfZB24','Dg9VBf9Yzxn1Bhq','BwvZC2fNzq','AM9PBG','ywrK','mtrYBNzxzMq','CMvHC29UAw5Nx3rVA2vUCW','B3v0Chv0vg9Rzw5Z','Bwf4x3rVA2vUCW','yw50AhjVCgLJx3rOAw5RAw5N','C3rHDhvZ','Aw5WDxruB2TLBNm','C3rYAw5N','Dg9VBhm','B3v0Chv0rM9YBwf0','C3LZDgvT','Dg9VBf91C2u','mZu0nZmYofbxvwvTzW','ChvZAa','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','y29UDgvUDa','DhjPBq','mtbZALPuAeW','CMvHC29UAw5N','B3v0Chv0','DhLWzq','Bw9KzwW','mJCXotq0m1rjvMLkAW','khjLzgfJDgvKihjLyxnVBMLUzYK','zxjYB3i','DhvYBKLK','C2vZC2LVBKLK','C2vZC2LVBL9Pza','BgvUz3rO','nJC3mJiWt0XPv01b','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','Dgv4Da','DxnHz2u','Bwv0ywrHDge','mJuXotCXmZjcveThugq','DxnLCG','ntrlAKndDgK','ChjVDMLKzxjtDgf0zq','B3bLBMfPx3jLyxnVBMLUzW','DgHPBMTPBMC','zMLSDgvY','B3v0Chv0x3rVA2vUCW','nJK3uwPsAhLl','AgfZ','mtfoBhzjwfe','Aw5WDxrFDg9Rzw5Z','AxnbCNjHEq','y2fSBeLK','BwfW'];_0xecab=function(){return _0x261f0e;};return _0xecab();}function toModelRequest(_0x841402){const _0x272917={_0x460526:0x83,_0x27d39f:0x9a,_0x4598cf:0x78,_0xda60e1:0x8e,_0x5df2ef:0x97,_0x35e867:0x7a,_0x324dc1:0x244,_0x2b364d:0x25d,_0x3b40e1:0x89,_0xb3c493:0xad,_0x736748:0x242,_0x4f3d91:0x232,_0x3dfdce:0xc1,_0x191d32:0xa0,_0xbcbabd:0x254,_0xe4d6f6:0x268,_0x145db7:0x246,_0x5ee1a4:0x25c,_0x1cd701:0x9f,_0x335525:0x6f},_0x51702b={_0x5846d8:0xa1};function _0x2e43df(_0xeba530,_0x4e16a0,_0x4687e2,_0x2bda16){return _0xfe7f(_0x4687e2- -_0x51702b._0x5846d8,_0x4e16a0);}function _0xe50bc2(_0x5ca16d,_0x2f5870,_0x4ea428,_0x566570){return _0xfe7f(_0x566570- -0x38b,_0x2f5870);}return{'model':_0x841402[_0x2e43df(_0x272917._0x460526,0xa1,_0x272917._0x27d39f,0x8e)],'max_tokens':_0x841402['maxTokens'],..._0x841402[_0x2e43df(0xab,0x9d,0x97,0x7f)]?{'reasoning':structuredClone(_0x841402[_0x2e43df(_0x272917._0x4598cf,_0x272917._0xda60e1,_0x272917._0x5df2ef,_0x272917._0x35e867)])}:{},'system':structuredClone(_0x841402['system']),'messages':structuredClone(_0x841402['messages']),'tools':structuredClone(_0x841402[_0xe50bc2(-0x26e,-_0x272917._0x324dc1,-0x27a,-_0x272917._0x2b364d)]),'metadata':{'session_id':_0x841402[_0x2e43df(_0x272917._0x3b40e1,0x97,0xa6,_0x272917._0xb3c493)][_0xe50bc2(-_0x272917._0x736748,-0x25b,-_0x272917._0x4f3d91,-0x24b)],'turn_id':_0x841402[_0x2e43df(_0x272917._0x3dfdce,_0x272917._0x191d32,0xa6,0xc4)]['turnId']},..._0x841402[_0xe50bc2(-_0x272917._0xbcbabd,-_0x272917._0xe4d6f6,-_0x272917._0x145db7,-_0x272917._0x5ee1a4)]?{'outputFormat':structuredClone(_0x841402[_0x2e43df(0x86,_0x272917._0x1cd701,0x8e,_0x272917._0x335525)])}:{}};}function toProviderModelRequest(_0x156b5a){const _0x404881={_0x5ed2c1:0x31e,_0x4eef09:0x335,_0x20b1ad:0x321,_0x782385:0x9d,_0x17e5ca:0x8e,_0x326473:0x350,_0x4efeaf:0x340,_0x16b972:0x323,_0x3429b9:0x33b},_0x2fce95={_0x21b576:0x1f5},_0x35d572={_0x35b1d0:0xa2};function _0x579e46(_0x1f8c83,_0x86daee,_0x1617e6,_0x14ac27){return _0xfe7f(_0x1617e6- -_0x35d572._0x35b1d0,_0x86daee);}function _0x354747(_0x734fc1,_0x1f595c,_0x4adf4e,_0x2a3dd4){return _0xfe7f(_0x734fc1-_0x2fce95._0x21b576,_0x1f595c);}return{'model':_0x156b5a[_0x354747(0x330,_0x404881._0x5ed2c1,_0x404881._0x4eef09,_0x404881._0x20b1ad)],'max_tokens':_0x156b5a['maxTokens'],'system':structuredClone(_0x156b5a[_0x579e46(0x93,_0x404881._0x782385,_0x404881._0x17e5ca,0x78)]),'messages':structuredClone(_0x156b5a[_0x354747(0x351,_0x404881._0x326473,0x353,_0x404881._0x4efeaf)]),'tools':structuredClone(_0x156b5a[_0x354747(_0x404881._0x16b972,_0x404881._0x3429b9,0x33b,0x31f)])};}function _0x1a1e1e(_0x168da7,_0x53feb4,_0x3d3a84,_0x35d114){return _0xfe7f(_0x35d114- -0x398,_0x168da7);}function toChatResponse(_0x37782f){const _0x114467={_0x316537:0x1f0,_0x3054a0:0x1f3,_0x3b7109:0x201,_0x19c243:0x1ff,_0x44f417:0x205,_0x30dd53:0x203,_0x1d2004:0x21a,_0xb966e5:0x1f7,_0x517e3c:0x1ed,_0x442b3d:0x20e,_0x291938:0x224,_0x186537:0x20c,_0x49759f:0x257,_0x5471b0:0x274,_0x43a590:0x267,_0x1af76d:0x276,_0x4c6d05:0x20a,_0x2a7d20:0x220,_0x3105ac:0x21c,_0x4afcf7:0x1e2,_0x5223a3:0x1c6,_0x70e0de:0x254,_0x502c2c:0x269,_0x41bd43:0x238,_0x201eb5:0x232,_0x16bb90:0x234,_0x4737a0:0x206,_0x4ae701:0x20a,_0x5df5b6:0x25c,_0x48e185:0x247},_0x299a35={_0x4857ea:0xbb};function _0x4c223c(_0x2ee9ba,_0x23cfdd,_0x20b0a3,_0xc9a501){return _0xfe7f(_0x2ee9ba-0x111,_0x20b0a3);}function _0x425fc1(_0x3ec18a,_0x234e5c,_0x269373,_0xf39842){return _0xfe7f(_0x3ec18a-_0x299a35._0x4857ea,_0x269373);}return{'id':_0x37782f['id'],'content':structuredClone(_0x37782f[_0x425fc1(_0x114467._0x316537,_0x114467._0x3054a0,_0x114467._0x3b7109,_0x114467._0x19c243)]),'stopReason':_0x37782f[_0x425fc1(0x219,_0x114467._0x44f417,_0x114467._0x30dd53,0x20c)],'usage':{'inputTokens':_0x37782f[_0x425fc1(0x201,_0x114467._0x1d2004,_0x114467._0xb966e5,_0x114467._0x517e3c)][_0x425fc1(_0x114467._0x442b3d,_0x114467._0x291938,0x1f6,_0x114467._0x186537)],'outputTokens':_0x37782f[_0x4c223c(_0x114467._0x49759f,_0x114467._0x5471b0,_0x114467._0x43a590,_0x114467._0x1af76d)][_0x425fc1(_0x114467._0x4c6d05,_0x114467._0x2a7d20,_0x114467._0x3105ac,0x208)],..._0x37782f['usage'][_0x425fc1(_0x114467._0x4afcf7,_0x114467._0x5223a3,0x1cb,_0x114467._0x5223a3)]!==void 0x0?{'reasoningTokens':_0x37782f[_0x4c223c(0x257,_0x114467._0x70e0de,_0x114467._0x502c2c,0x240)][_0x4c223c(_0x114467._0x41bd43,_0x114467._0x201eb5,0x236,_0x114467._0x16bb90)]}:{}},..._0x37782f[_0x425fc1(_0x114467._0x4737a0,0x217,0x219,_0x114467._0x4ae701)]?{'providerState':structuredClone(_0x37782f[_0x4c223c(_0x114467._0x5df5b6,0x259,0x260,_0x114467._0x48e185)])}:{}};}function toModelResponse(_0x5c13a0){const _0xb509c4={_0x36c7a7:0x187,_0x78c27a:0x1ac,_0x51aad3:0x18d,_0x4a3c36:0x1a3,_0x3df5f2:0x1a3,_0x4a9d30:0x1b2,_0x41762f:0x1a1,_0x12bfa2:0x1bc,_0x230a13:0x1a0,_0x1bafb8:0x1a3,_0x168479:0x1c1,_0x1f8d5f:0x1a7,_0x78f358:0x1cc,_0x3abf91:0x1c6,_0x1e04a7:0x1b0,_0x4b7ac0:0x1af,_0xe6f5d3:0x1b7,_0x1e746e:0x1bf,_0x3f0b17:0x1f4,_0x1a2c73:0x1f0,_0x26a686:0x18f,_0x576979:0x1a9,_0x131aeb:0x1de,_0x52eabd:0x1c7,_0x1c633d:0x1e4,_0x581ca7:0x1be,_0xd2143c:0x1c9},_0x5f2ac6={_0x3a979e:0x87};function _0x467c3f(_0x133afc,_0x171132,_0x2a8a5f,_0x5bb27a){return _0xfe7f(_0x2a8a5f-_0x5f2ac6._0x3a979e,_0x133afc);}function _0x36f771(_0x3c08fd,_0x5b66a6,_0x41d98b,_0x43ac9f){return _0xfe7f(_0x41d98b- -0x2ed,_0x3c08fd);}return{'id':_0x5c13a0['id'],'type':_0x36f771(-_0xb509c4._0x36c7a7,-_0xb509c4._0x78c27a,-_0xb509c4._0x51aad3,-_0xb509c4._0x4a3c36),'role':_0x36f771(-_0xb509c4._0x3df5f2,-0x1a5,-0x195,-_0xb509c4._0x4a9d30),'content':structuredClone(_0x5c13a0[_0x467c3f(0x1a4,_0xb509c4._0x41762f,_0xb509c4._0x12bfa2,_0xb509c4._0x230a13)]),'stop_reason':_0x5c13a0['stopReason'],'stop_sequence':null,'usage':{'input_tokens':_0x5c13a0[_0x36f771(-_0xb509c4._0x1bafb8,-_0xb509c4._0x168479,-_0xb509c4._0x1f8d5f,-0x1b0)][_0x36f771(-0x1b0,-_0xb509c4._0x78f358,-0x1c1,-0x1da)],'output_tokens':_0x5c13a0[_0x36f771(-_0xb509c4._0x3abf91,-0x1a3,-0x1a7,-_0xb509c4._0x1e04a7)][_0x467c3f(0x1cc,0x1be,_0xb509c4._0x4b7ac0,_0xb509c4._0x4a9d30)],..._0x5c13a0[_0x36f771(-_0xb509c4._0xe6f5d3,-_0xb509c4._0x1e746e,-0x1a7,-0x19d)][_0x467c3f(_0xb509c4._0x3f0b17,_0xb509c4._0x1a2c73,0x1de,0x1da)]!==void 0x0?{'reasoning_tokens':_0x5c13a0[_0x36f771(-_0xb509c4._0x26a686,-_0xb509c4._0x576979,-0x1a7,-_0xb509c4._0x4a9d30)][_0x467c3f(0x1da,0x1d3,_0xb509c4._0x131aeb,_0xb509c4._0x52eabd)]}:{}},..._0x5c13a0['providerState']?{'providerState':structuredClone(_0x5c13a0[_0x467c3f(_0xb509c4._0x1c633d,_0xb509c4._0x581ca7,0x1d2,_0xb509c4._0xd2143c)])}:{}};}function responseToAssistantMessage(_0x21fa60){const _0x1f3ff6={_0xf5fed9:0xa1,_0x4560bf:0xaa,_0x5ceed0:0x26e,_0x47ee36:0x257,_0x3671b3:0xb9};function _0x29eb80(_0x2cdc82,_0x35add3,_0x5a1565,_0x271244){return _0xfe7f(_0x2cdc82- -0xa6,_0x5a1565);}function _0x20830a(_0x4eb5fd,_0xd959ad,_0x542d50,_0x1ebceb){return _0xfe7f(_0x4eb5fd-0x123,_0x1ebceb);}return{'role':_0x29eb80(0xb2,0xd0,_0x1f3ff6._0xf5fed9,_0x1f3ff6._0x4560bf),'content':normalizeContent(_0x21fa60[_0x20830a(0x258,_0x1f3ff6._0x5ceed0,0x241,_0x1f3ff6._0x47ee36)]),..._0x21fa60['providerState']?{'providerState':structuredClone(_0x21fa60[_0x29eb80(0xa5,0x8e,_0x1f3ff6._0x3671b3,0xa7)])}:{}};}function createReasoningMessage(_0x3ad2de){const _0x45e0da={_0x18c335:0x1ae,_0x359710:0x1c3,_0x29ac8d:0x1c8,_0x535ddb:0x1bb,_0x259465:0x195,_0x4b6d83:0x18c,_0x492974:0x197,_0x3a2216:0x1b3},_0x511b97={_0x4d9c15:0x5b},_0x57b1ef={_0x31c259:0x425,_0x4cbde0:0x419,_0x58bdaa:0x326,_0x4d5d24:0x312,_0x386099:0x41c,_0x142e37:0x428,_0x1a7f2d:0x43e,_0x5891b3:0x440,_0x18e4ab:0x41f},_0x338a50={_0x1ee05a:0x5d5,_0x42092a:0x174},_0x53c2f3=normalizeContent(_0x3ad2de?.[_0x3d4d27(-_0x45e0da._0x18c335,-_0x45e0da._0x359710,-0x1ad,-_0x45e0da._0x29ac8d)])[_0x24af8c(_0x45e0da._0x535ddb,_0x45e0da._0x18c335,_0x45e0da._0x259465,0x1a9)](_0x32bab9=>{const _0x1afe48={_0x5a97e2:0x9b,_0x48d915:0x15f};function _0x20d83b(_0x322097,_0x245f90,_0x47e443,_0x47695a){return _0x3d4d27(_0x245f90-_0x338a50._0x1ee05a,_0x245f90-_0x338a50._0x42092a,_0x47e443-0x122,_0x47695a);}function _0x44538e(_0x40f10b,_0x2e3764,_0x159479,_0x1c3258){return _0x24af8c(_0x40f10b-_0x1afe48._0x5a97e2,_0x2e3764-_0x1afe48._0x48d915,_0x159479,_0x40f10b-0x182);}return _0x32bab9[_0x20d83b(_0x57b1ef._0x31c259,0x42c,_0x57b1ef._0x4cbde0,0x410)]==='anthropic_redacted_thinking'||_0x32bab9[_0x44538e(0x317,0x329,_0x57b1ef._0x58bdaa,_0x57b1ef._0x4d5d24)]===_0x20d83b(0x434,_0x57b1ef._0x386099,0x424,_0x57b1ef._0x142e37)||_0x32bab9['type']===_0x20d83b(0x428,_0x57b1ef._0x1a7f2d,_0x57b1ef._0x5891b3,_0x57b1ef._0x18e4ab);});function _0x3d4d27(_0x556541,_0xf328ce,_0x56c9e1,_0x4b60cf){return _0xfe7f(_0x556541- -0x2e3,_0x4b60cf);}function _0x24af8c(_0x8f69a5,_0x19b63f,_0x57c623,_0x24e971){return _0xfe7f(_0x24e971-_0x511b97._0x4d9c15,_0x57c623);}if(_0x53c2f3[_0x24af8c(_0x45e0da._0x4b6d83,0x1b5,_0x45e0da._0x492974,0x19d)]===0x0)return void 0x0;return{'role':_0x24af8c(_0x45e0da._0x3a2216,0x1b5,0x1c1,0x1b3),'content':_0x53c2f3};}function createAssistantTextMessage(_0x20a342){const _0x2d5a3f={_0x1a0d26:0x1ac,_0x5a7c92:0x1d1,_0x5c8f96:0x1b6,_0x205550:0x1ce},_0x4854fa={_0x480b95:0xe1},_0x42e549={_0x1dccbb:0x50,_0x5cd2ab:0x16f},_0x10e12c=normalizeContent(_0x20a342?.['content'])[_0x1013c4(-_0x2d5a3f._0x1a0d26,-0x1b1,-0x1bf,-0x197)](_0x9eb182=>{const _0x6ffc60={_0x262e19:0x11},_0x266201={_0x2d0e2b:0x36,_0x4e53c7:0x10b,_0x2cb5df:0x92};function _0x37e3ae(_0x5a6e89,_0x4c0c4f,_0x97821c,_0x4acfc9){return _0x1013c4(_0x4c0c4f,_0x5a6e89-_0x266201._0x2d0e2b,_0x97821c-_0x266201._0x4e53c7,_0x4acfc9-_0x266201._0x2cb5df);}function _0x39fbe8(_0x2ce4c4,_0x312228,_0x1ea501,_0x25561c){return _0x1013c4(_0x25561c,_0x312228-0x209,_0x1ea501-_0x6ffc60._0x262e19,_0x25561c-0x17b);}return _0x9eb182[_0x39fbe8(_0x42e549._0x1dccbb,0x44,0x62,0x26)]===_0x37e3ae(-0x184,-_0x42e549._0x5cd2ab,-0x1a3,-0x1a1);});function _0xbea90(_0xb34599,_0xa0a34f,_0x10a3e0,_0x37b937){return _0xfe7f(_0x37b937-_0x4854fa._0x480b95,_0xb34599);}function _0x1013c4(_0x49880c,_0x49050c,_0xcdaf04,_0x3dd538){return _0xfe7f(_0x49050c- -0x2ff,_0x49880c);}if(_0x10e12c[_0x1013c4(-_0x2d5a3f._0x5a7c92,-0x1bd,-_0x2d5a3f._0x5c8f96,-_0x2d5a3f._0x205550)]===0x0)return void 0x0;return{'role':'assistant','content':_0x10e12c};}function createToolUseMessage(_0x538ced){const _0x67c33d={_0x35add6:0x27c,_0x1a9adf:0x27e,_0x41ace4:0x264,_0x1a94a4:0x240,_0x24fc00:0x23e,_0x552fd6:0x458},_0x7f4e25={_0xb4df76:0x39c},_0x16d92f={_0x24f69b:0x2ce,_0x59fb18:0x2e0,_0x5c5b67:0x2be,_0x37d23e:0x2f0},_0x1b70fe={_0x4e4418:0x153},_0x4f55d9={_0x556b45:0x14};function _0x1751fe(_0x520762,_0x1400e0,_0x48f689,_0x59427a){return _0xfe7f(_0x48f689-0x312,_0x1400e0);}const _0x34bc2a=normalizeContent(_0x538ced?.[_0x717f61(-0x271,-0x267,-_0x67c33d._0x35add6,-_0x67c33d._0x1a9adf)])['filter'](_0x373d10=>{function _0x113b8d(_0x50f715,_0x58c0dd,_0x3046ad,_0x406435){return _0x717f61(_0x50f715-0xfe,_0x58c0dd-0x60f,_0x3046ad,_0x406435-_0x4f55d9._0x556b45);}function _0x42e0c3(_0xc15f75,_0x589060,_0x30428d,_0x1e73ad){return _0x717f61(_0xc15f75-0xf5,_0x589060-0x543,_0x1e73ad,_0x1e73ad-_0x1b70fe._0x4e4418);}return _0x373d10[_0x42e0c3(_0x16d92f._0x24f69b,0x2e1,0x2c6,_0x16d92f._0x59fb18)]===_0x42e0c3(_0x16d92f._0x5c5b67,0x2d8,_0x16d92f._0x37d23e,0x2e1);});function _0x717f61(_0x6d53fb,_0x3259dd,_0x5d23db,_0x33c33e){return _0xfe7f(_0x3259dd- -_0x7f4e25._0xb4df76,_0x5d23db);}if(_0x34bc2a[_0x717f61(-_0x67c33d._0x41ace4,-0x25a,-_0x67c33d._0x1a94a4,-_0x67c33d._0x24fc00)]===0x0)return void 0x0;return{'role':_0x1751fe(0x452,_0x67c33d._0x552fd6,0x46a,0x482),'content':_0x34bc2a};}function getTextFromMessage(_0x5287c9){const _0x532bb4={_0x4ac70d:0x4ad,_0x49548a:0x4a3,_0x3b16d1:0x4ab,_0x7032ab:0x4d6,_0x4acb64:0x47c,_0x9aa54b:0x463,_0x6efb94:0x454,_0x3f63eb:0x4c7};function _0xe9adba(_0x322236,_0x351638,_0x37d554,_0x2ef2ab){return _0xfe7f(_0x37d554-0x36e,_0x322236);}function _0x2729ae(_0x58d870,_0x1a677d,_0xd306b,_0x259b73){return _0xfe7f(_0xd306b-0x30d,_0x259b73);}return normalizeContent(_0x5287c9?.[_0xe9adba(0x489,_0x532bb4._0x4ac70d,0x4a3,_0x532bb4._0x49548a)])[_0xe9adba(0x4c0,_0x532bb4._0x3b16d1,0x4bc,_0x532bb4._0x7032ab)](_0x511949=>_0x511949['type']===_0x2729ae(0x435,0x45f,0x452,0x464))[_0x2729ae(_0x532bb4._0x4acb64,0x45f,_0x532bb4._0x9aa54b,_0x532bb4._0x6efb94)](_0x939729=>_0x939729[_0x2729ae(0x451,0x463,0x452,0x44a)])[_0xe9adba(0x4ec,_0x532bb4._0x3f63eb,0x4cf,0x4ed)]('\x0a');}function getReasoningTextFromMessage(_0x5e62cb){const _0xc37b9a={_0x339da5:0x34d,_0x12f9b2:0x335,_0x43d1e0:0x338},_0x296b2a={_0x309d83:0x1fc,_0x50149:0x20a,_0x59741c:0x213,_0x172834:0x20d,_0x12ed48:0x1f7,_0x64c398:0x207,_0x39afbc:0x18d,_0x533c5c:0x1a0,_0x18d767:0x1d8,_0x4f4f2b:0x1f0,_0x1b260f:0x1f7,_0x4709c9:0x1f9,_0x5deeec:0x192,_0x43655e:0x177,_0x1ebffb:0x198,_0x53c1a6:0x195,_0x36bc16:0x173,_0x435bfb:0x1d3,_0x24d786:0x1e7,_0x26616d:0x1e7,_0x391922:0x169,_0x3c331f:0x19e,_0x3937a3:0x202,_0x599fc2:0x1f6,_0x3e853a:0x1fe,_0xee41fa:0x1fb,_0x340878:0x183,_0x347a7e:0x173,_0x317a17:0x206,_0x58e587:0x1ee,_0x378b67:0x18a,_0x3b6616:0x173,_0x38bde5:0x16e},_0x32ba82={_0x1c444d:0x1d7};function _0x4b198f(_0x2d48bc,_0x32dac9,_0x115020,_0x4f0aa2){return _0xfe7f(_0x4f0aa2-_0x32ba82._0x1c444d,_0x2d48bc);}return normalizeContent(_0x5e62cb?.['content'])['flatMap'](_0x2781da=>{const _0x45f48c={_0x30c94c:0x33d},_0x91de01={_0x38b43d:0x2cf};if(_0x2781da[_0x3ebcfb(-_0x296b2a._0x309d83,-0x210,-0x202,-0x203)]===_0x3ebcfb(-0x1f6,-_0x296b2a._0x50149,-0x21b,-_0x296b2a._0x59741c))return _0x2781da[_0x3ebcfb(-_0x296b2a._0x172834,-_0x296b2a._0x12ed48,-0x1d2,-0x1f0)][_0x3ebcfb(-0x224,-0x1fe,-0x20b,-_0x296b2a._0x64c398)]()[_0x41ecdb(-_0x296b2a._0x39afbc,-0x1a1,-0x181,-_0x296b2a._0x533c5c)]>0x0?[_0x2781da[_0x3ebcfb(-0x1e5,-0x1eb,-_0x296b2a._0x18d767,-_0x296b2a._0x4f4f2b)]]:[];if(_0x2781da['type']===_0x3ebcfb(-_0x296b2a._0x1b260f,-0x1dc,-0x204,-_0x296b2a._0x4709c9))return[_0x41ecdb(-_0x296b2a._0x5deeec,-_0x296b2a._0x43655e,-0x19f,-_0x296b2a._0x1ebffb)];if(_0x2781da['type']!==_0x41ecdb(-0x183,-0x176,-_0x296b2a._0x53c1a6,-_0x296b2a._0x36bc16))return[];function _0x41ecdb(_0x1acc30,_0x347a61,_0x2b0dc6,_0x4b902c){return _0xfe7f(_0x1acc30- -_0x91de01._0x38b43d,_0x4b902c);}function _0x3ebcfb(_0x29db33,_0x7cc4b7,_0x50a204,_0x6b30b9){return _0xfe7f(_0x6b30b9- -_0x45f48c._0x30c94c,_0x29db33);}const _0xe220dc=_0x2781da['summary'][_0x3ebcfb(-_0x296b2a._0x435bfb,-0x1d1,-_0x296b2a._0x24d786,-_0x296b2a._0x26616d)](_0xdcefd1=>_0xdcefd1[_0x3ebcfb(-0x1ed,-0x206,-0x215,-0x1f8)])[_0x41ecdb(-0x181,-_0x296b2a._0x391922,-_0x296b2a._0x3c331f,-0x16f)](_0x4558ce=>_0x4558ce[_0x41ecdb(-0x199,-0x1a9,-0x180,-0x19e)]()[_0x41ecdb(-0x18d,-0x17d,-0x18a,-0x19c)]>0x0)['join']('\x0a\x0a');if(_0xe220dc[_0x3ebcfb(-_0x296b2a._0x3937a3,-_0x296b2a._0x599fc2,-_0x296b2a._0x3e853a,-_0x296b2a._0xee41fa)]>0x0)return[_0xe220dc];if(_0x2781da[_0x41ecdb(-0x18a,-_0x296b2a._0x340878,-_0x296b2a._0x347a7e,-0x190)]&&_0x2781da['text'][_0x3ebcfb(-_0x296b2a._0x317a17,-0x21f,-0x1f7,-0x207)]()[_0x3ebcfb(-_0x296b2a._0x58e587,-0x1de,-0x1e6,-_0x296b2a._0xee41fa)]>0x0)return[_0x2781da[_0x41ecdb(-_0x296b2a._0x378b67,-_0x296b2a._0x53c1a6,-_0x296b2a._0x3b6616,-_0x296b2a._0x38bde5)]];return _0x2781da['encryptedContent']?['(encrypted\x20reasoning)']:[];})[_0x4b198f(_0xc37b9a._0x339da5,0x34d,_0xc37b9a._0x12f9b2,_0xc37b9a._0x43d1e0)]('\x0a\x0a');}function getToolUseBlocks(_0x1547bf){const _0x1d97f3={_0x2264be:0x1e,_0x4130e4:0x34,_0x384a6f:0x4c,_0x51a387:0x1ce,_0x5f56dd:0x1eb},_0x5bfe81={_0x1c9703:0x83};function _0x17c998(_0x1fb19c,_0x44356b,_0x56418a,_0x25092f){return _0xfe7f(_0x25092f-_0x5bfe81._0x1c9703,_0x44356b);}function _0x255619(_0x3f9f9d,_0xfecdd0,_0x4d8a00,_0x5f41b7){return _0xfe7f(_0x4d8a00- -0x169,_0xfecdd0);}return normalizeContent(_0x1547bf?.[_0x255619(-_0x1d97f3._0x2264be,-0x19,-_0x1d97f3._0x4130e4,-_0x1d97f3._0x384a6f)])[_0x17c998(0x1b5,_0x1d97f3._0x51a387,_0x1d97f3._0x5f56dd,0x1d1)](_0x1c454d=>_0x1c454d[_0x255619(-0x1a,-0x40,-0x2f,-0x31)]==='tool_use');}function getToolResultBlocks(_0x2a887b){const _0x5552bc={_0x4fc946:0x314,_0x1182c2:0x2f8,_0x285355:0x2ff,_0x2faa6e:0x31e,_0x28220e:0x320},_0x460d1f={_0x10e126:0x1e2};function _0x237b4b(_0x557ee6,_0x241227,_0x517700,_0x30e82d){return _0xfe7f(_0x241227-_0x460d1f._0x10e126,_0x30e82d);}function _0x403aa4(_0x29dfe0,_0x1b289e,_0x2c7a11,_0xa0f2f9){return _0xfe7f(_0x2c7a11-0x1c4,_0xa0f2f9);}return normalizeContent(_0x2a887b?.[_0x237b4b(_0x5552bc._0x4fc946,0x317,_0x5552bc._0x1182c2,_0x5552bc._0x285355)])[_0x237b4b(_0x5552bc._0x2faa6e,0x330,_0x5552bc._0x28220e,0x33d)](_0xfefce4=>_0xfefce4[_0x237b4b(0x310,0x31c,0x300,0x30b)]===_0x237b4b(0x341,0x341,0x35d,0x34d));}function createToolResultUserMessage(_0x316eaf){const _0x2dfda0={_0x1c35c5:0x22f,_0x2d8101:0x246,_0x195ec5:0x22f,_0x27922c:0x209,_0x2b42c2:0x219,_0x5b4917:0x220},_0x29e221={_0x4dfa06:0x9a,_0x23d255:0xcd,_0x42520c:0xc4,_0x245f9f:0xad,_0xbc06b5:0xa9,_0x1bc38f:0x415,_0xca79d7:0x43a},_0x5d21da={_0xd36819:0x9f,_0x39596a:0x138},_0x21b470={_0x40eb29:0x21};function _0x50958a(_0x466f2e,_0x1d7453,_0x15b5ca,_0x406bff){return _0xfe7f(_0x1d7453-_0x21b470._0x40eb29,_0x406bff);}function _0x412395(_0x3ed118,_0x4603c4,_0x299a71,_0x855eb){return _0xfe7f(_0x855eb- -0x376,_0x4603c4);}return{'role':_0x412395(-_0x2dfda0._0x1c35c5,-0x246,-_0x2dfda0._0x2d8101,-0x22d),'content':_0x316eaf[_0x412395(-_0x2dfda0._0x195ec5,-_0x2dfda0._0x27922c,-_0x2dfda0._0x2b42c2,-_0x2dfda0._0x5b4917)](_0x2ad4af=>{function _0x1061b3(_0xca4d44,_0x40f8b5,_0x1a52e8,_0x317e41){return _0x50958a(_0xca4d44-0x5a,_0x317e41- -0xcf,_0x1a52e8-0x1cc,_0x40f8b5);}function _0x377d87(_0x482fc9,_0x468871,_0x34449a,_0x29bb6f){return _0x412395(_0x482fc9-_0x5d21da._0xd36819,_0x482fc9,_0x34449a-_0x5d21da._0x39596a,_0x34449a-0x660);}return{'type':_0x1061b3(0xc4,_0x29e221._0x4dfa06,_0x29e221._0x23d255,0xb1),'tool_use_id':_0x2ad4af[_0x1061b3(_0x29e221._0x42520c,_0x29e221._0x245f9f,0xbd,0xa7)],'content':_0x2ad4af['content']??_0x2ad4af[_0x1061b3(0xa1,_0x29e221._0xbc06b5,0x75,0x8b)],'is_error':_0x2ad4af[_0x377d87(0x426,0x406,_0x29e221._0x1bc38f,0x425)]===_0x377d87(0x428,_0x29e221._0xca79d7,0x428,0x409)};})};}var INTERRUPTED_TOOL_RESULT_TEXT=_0x1a1e1e(-0x223,-0x237,-0x256,-0x23f);function synthesizeMissingToolResults(_0x2a6b65){const _0x1c642a={_0x1ce94a:0x97,_0x2778d:0xb5,_0x475389:0x96,_0x56283a:0x2a7,_0x19f0e4:0x2b5,_0x3c2e70:0x299,_0x23aab7:0x2b6,_0xbdb320:0x2b8},_0x30b5c6={_0x4ed0e2:0x1ab,_0x5c872b:0x141,_0x27996b:0x50c},_0x2226a6={_0x3c6631:0x1a1},_0x48bf3a=new Set();for(const _0x47c1af of _0x2a6b65){for(const _0x31021d of getToolResultBlocks(_0x47c1af)){_0x48bf3a['add'](_0x31021d['tool_use_id']);}}const _0x26b44a=[];function _0x1fbae6(_0x5da463,_0x2f78ac,_0x1aa196,_0x256e50){return _0x1a1e1e(_0x1aa196,_0x2f78ac-0x1e4,_0x1aa196-0x158,_0x2f78ac-_0x2226a6._0x3c6631);}for(const _0x1c5ee0 of _0x2a6b65){_0x26b44a[_0x1fbae6(-0xa9,-0xc4,-0xcf,-0xc4)](_0x1c5ee0);const _0x464cbf=getToolUseBlocks(_0x1c5ee0)['filter'](_0x3f025b=>!_0x48bf3a[_0x1fbae6(-0xb8,-0xa6,-0xa6,-0xad)](_0x3f025b['id']));if(_0x464cbf[_0x1fbae6(-_0x1c642a._0x1ce94a,-_0x1c642a._0x2778d,-0xc5,-_0x1c642a._0x475389)]===0x0)continue;_0x26b44a[_0x2a7702(_0x1c642a._0x56283a,_0x1c642a._0x19f0e4,0x28a,0x2bf)]({'role':'user','content':_0x464cbf['map'](_0x4c87de=>({'type':_0x2a7702(0x2d3,0x2de,0x2d0,0x2cc),'tool_use_id':_0x4c87de['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x2cfd18 of _0x464cbf){_0x48bf3a[_0x2a7702(_0x1c642a._0x3c2e70,_0x1c642a._0x23aab7,_0x1c642a._0xbdb320,0x298)](_0x2cfd18['id']);}}function _0x2a7702(_0xe62816,_0x114ab7,_0x571a38,_0x107f74){return _0x1a1e1e(_0x571a38,_0x114ab7-_0x30b5c6._0x4ed0e2,_0x571a38-_0x30b5c6._0x5c872b,_0xe62816-_0x30b5c6._0x27996b);}return _0x26b44a;}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};