@treasuredata/tdx 0.8.1 → 0.8.3

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.
Files changed (119) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/client/cdp-api-client.js +1 -1
  8. package/dist/client/engage-api-client.js +1 -1
  9. package/dist/client/http-client.js +1 -1
  10. package/dist/client/llm-api-client.js +1 -1
  11. package/dist/client/rate-limiter.js +1 -1
  12. package/dist/client/td-api-client.js +1 -1
  13. package/dist/client/trino-api-client.js +1 -1
  14. package/dist/client/workflow-client.js +1 -1
  15. package/dist/commands/activations.js +1 -1
  16. package/dist/commands/api-command.js +1 -1
  17. package/dist/commands/auth-command.js +1 -1
  18. package/dist/commands/chat-command.js +1 -1
  19. package/dist/commands/claude-command.d.ts.map +1 -1
  20. package/dist/commands/claude-command.js +1 -1
  21. package/dist/commands/claude-command.js.map +1 -1
  22. package/dist/commands/claude-statusline-command.js +1 -1
  23. package/dist/commands/claude-usage-command.js +1 -1
  24. package/dist/commands/command.js +1 -1
  25. package/dist/commands/connection-command.js +1 -1
  26. package/dist/commands/context-command.js +1 -1
  27. package/dist/commands/databases.js +1 -1
  28. package/dist/commands/describe.js +1 -1
  29. package/dist/commands/engage-command.js +1 -1
  30. package/dist/commands/job-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/llm-proxy.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/profiles-command.js +1 -1
  35. package/dist/commands/query-command.js +1 -1
  36. package/dist/commands/segment-command.js +1 -1
  37. package/dist/commands/segment-create-command.js +1 -1
  38. package/dist/commands/segment-fields-command.js +1 -1
  39. package/dist/commands/segment-pull-command.js +1 -1
  40. package/dist/commands/segment-push-command.js +1 -1
  41. package/dist/commands/segment-update-command.js +1 -1
  42. package/dist/commands/segment-use-command.js +1 -1
  43. package/dist/commands/segments.js +1 -1
  44. package/dist/commands/show.js +1 -1
  45. package/dist/commands/tables.js +1 -1
  46. package/dist/commands/use-command.js +1 -1
  47. package/dist/commands/user-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/config.js +1 -1
  51. package/dist/core/connection-cache.js +1 -1
  52. package/dist/core/credential-cache.js +1 -1
  53. package/dist/core/global-context.js +1 -1
  54. package/dist/core/keychain.js +1 -1
  55. package/dist/core/profile.js +1 -1
  56. package/dist/core/project-config.js +1 -1
  57. package/dist/core/session.js +1 -1
  58. package/dist/core/user-cache.js +1 -1
  59. package/dist/index.js +1 -1
  60. package/dist/proxy/anthropic-adapter.d.ts +11 -19
  61. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  62. package/dist/proxy/anthropic-adapter.js +1 -1
  63. package/dist/proxy/anthropic-adapter.js.map +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/context-signature.js +1 -1
  66. package/dist/proxy/conversation-utils.js +1 -1
  67. package/dist/proxy/conversation-utils.js.map +1 -1
  68. package/dist/proxy/server.d.ts.map +1 -1
  69. package/dist/proxy/server.js +1 -1
  70. package/dist/proxy/server.js.map +1 -1
  71. package/dist/proxy/session-cache.js +1 -1
  72. package/dist/sdk/api.js +1 -1
  73. package/dist/sdk/connection.js +1 -1
  74. package/dist/sdk/engage.js +1 -1
  75. package/dist/sdk/errors.js +1 -1
  76. package/dist/sdk/index.js +1 -1
  77. package/dist/sdk/job.js +1 -1
  78. package/dist/sdk/llm.js +1 -1
  79. package/dist/sdk/query.js +1 -1
  80. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  81. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  82. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  83. package/dist/sdk/segment.js +1 -1
  84. package/dist/sdk/user.js +1 -1
  85. package/dist/sdk/workflow.js +1 -1
  86. package/dist/types/endpoints.js +1 -1
  87. package/dist/types/index.js +1 -1
  88. package/dist/utils/agent-ref-parser.js +1 -1
  89. package/dist/utils/async.js +1 -1
  90. package/dist/utils/chat-cache.js +1 -1
  91. package/dist/utils/colors.js +1 -1
  92. package/dist/utils/command-output.js +1 -1
  93. package/dist/utils/constants.js +1 -1
  94. package/dist/utils/diff.js +1 -1
  95. package/dist/utils/fields-display.js +1 -1
  96. package/dist/utils/file-permissions.js +1 -1
  97. package/dist/utils/format-detector.js +1 -1
  98. package/dist/utils/formatters.js +1 -1
  99. package/dist/utils/json-loader.js +1 -1
  100. package/dist/utils/llm-backup-utils.js +1 -1
  101. package/dist/utils/model-aliases.js +1 -1
  102. package/dist/utils/model-factors.js +1 -1
  103. package/dist/utils/option-validation.js +1 -1
  104. package/dist/utils/port.js +1 -1
  105. package/dist/utils/process.js +1 -1
  106. package/dist/utils/prompt.js +1 -1
  107. package/dist/utils/segment-path-parser.js +1 -1
  108. package/dist/utils/segment-ref-parser.js +1 -1
  109. package/dist/utils/spinner.js +1 -1
  110. package/dist/utils/sql-parser.js +1 -1
  111. package/dist/utils/sse-parser.js +1 -1
  112. package/dist/utils/string-utils.js +1 -1
  113. package/dist/utils/table-ref-parser.js +1 -1
  114. package/dist/utils/tdx-config.js +1 -1
  115. package/dist/utils/tdx-logger.js +1 -1
  116. package/dist/utils/tree-formatter.js +1 -1
  117. package/dist/utils/version-check.js +1 -1
  118. package/dist/utils/workflow-utils.js +1 -1
  119. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x3f4cc1,_0x2a179f){const _0x41260f=a88_0x26b4,_0x41feef=_0x3f4cc1();while(!![]){try{const _0x35dae1=parseInt(_0x41260f(0x1c9))/0x1+parseInt(_0x41260f(0x1ca))/0x2*(-parseInt(_0x41260f(0x1c5))/0x3)+-parseInt(_0x41260f(0x1c6))/0x4*(parseInt(_0x41260f(0x1d0))/0x5)+parseInt(_0x41260f(0x1ba))/0x6+parseInt(_0x41260f(0x1c0))/0x7*(-parseInt(_0x41260f(0x1b4))/0x8)+-parseInt(_0x41260f(0x1b6))/0x9*(parseInt(_0x41260f(0x1c4))/0xa)+-parseInt(_0x41260f(0x1bd))/0xb*(-parseInt(_0x41260f(0x1b9))/0xc);if(_0x35dae1===_0x2a179f)break;else _0x41feef['push'](_0x41feef['shift']());}catch(_0x3143c8){_0x41feef['push'](_0x41feef['shift']());}}}(a88_0x2a64,0xa344c));import{Chalk}from'chalk';export function shouldUseColor(_0x2c175f={}){const _0x3857b7=a88_0x26b4;if(_0x2c175f[_0x3857b7(0x1c8)]===!![])return![];if(_0x2c175f[_0x3857b7(0x1cf)]===!![])return!![];if(process[_0x3857b7(0x1bc)][_0x3857b7(0x1be)]!==undefined)return![];return process[_0x3857b7(0x1b3)][_0x3857b7(0x1c2)]??![];}export function getChalk(_0x45a690={}){if(shouldUseColor(_0x45a690))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x3a21e7,_0xa005d9={}){const _0x14470b=a88_0x26b4;return getChalk(_0xa005d9)[_0x14470b(0x1d1)](_0x3a21e7);}export function colorHeader(_0x4dba6b,_0x19db1d={}){const _0xb8a558=a88_0x26b4;return getChalk(_0x19db1d)[_0xb8a558(0x1cd)](_0x4dba6b);}export function colorType(_0x19228e,_0x545638={}){const _0x4c61fe=a88_0x26b4;return getChalk(_0x545638)[_0x4c61fe(0x1d1)](_0x19228e);}export function colorJSONKey(_0x9c1b0d,_0x29ceab={}){return getChalk(_0x29ceab)['blue'](_0x9c1b0d);}export function colorJSONString(_0x11e1ec,_0x3d7899={}){return getChalk(_0x3d7899)['green'](_0x11e1ec);}export function colorJSONNumber(_0x4b9141,_0x35406b={}){const _0x457774=a88_0x26b4;return getChalk(_0x35406b)[_0x457774(0x1cd)](_0x4b9141);}export function colorJSONBoolean(_0x5577cc,_0x1fb8cb={}){const _0x3d0566=a88_0x26b4;return getChalk(_0x1fb8cb)[_0x3d0566(0x1ce)](_0x5577cc);}export function colorJSONNull(_0xc4c238,_0x59dfa4={}){return getChalk(_0x59dfa4)['dim'](_0xc4c238);}export function colorizeJSONCompact(_0x98e7a2,_0x4043ca={}){const _0x413d77=a88_0x26b4;if(!shouldUseColor(_0x4043ca))return JSON['stringify'](_0x98e7a2);if(_0x98e7a2===null)return colorJSONNull(_0x413d77(0x1cc),_0x4043ca);if(typeof _0x98e7a2===_0x413d77(0x1b7))return colorJSONBoolean(String(_0x98e7a2),_0x4043ca);if(typeof _0x98e7a2===_0x413d77(0x1c7))return colorJSONNumber(String(_0x98e7a2),_0x4043ca);if(typeof _0x98e7a2==='string')return colorJSONString(JSON[_0x413d77(0x1b8)](_0x98e7a2),_0x4043ca);if(Array['isArray'](_0x98e7a2)){if(_0x98e7a2[_0x413d77(0x1c1)]===0x0)return'[]';const _0x563173=_0x98e7a2[_0x413d77(0x1cb)](_0x3672ce=>colorizeJSONCompact(_0x3672ce,_0x4043ca));return'['+_0x563173[_0x413d77(0x1b5)](',')+']';}if(typeof _0x98e7a2===_0x413d77(0x1bf)){const _0x381495=Object[_0x413d77(0x1bb)](_0x98e7a2);if(_0x381495[_0x413d77(0x1c1)]===0x0)return'{}';const _0x5b0a74=_0x381495[_0x413d77(0x1cb)](([_0x13696d,_0x1f87c6])=>{const _0x154998=_0x413d77,_0x565a3b=colorJSONKey(JSON[_0x154998(0x1b8)](_0x13696d),_0x4043ca),_0x25a8f6=colorizeJSONCompact(_0x1f87c6,_0x4043ca);return _0x565a3b+':'+_0x25a8f6;});return'{'+_0x5b0a74[_0x413d77(0x1b5)](',')+'}';}return String(_0x98e7a2);}function a88_0x2a64(){const _0x305860=['map','null','cyan','yellow','color','1598530DYHeou','dim','isArray','stdout','1008456hLiSZi','join','22500DhyoJu','boolean','stringify','15166464FYcAep','6261342JSRhrI','entries','env','22yNlADj','NO_COLOR','object','35EqZIoS','length','isTTY','repeat','3360XSUIwW','15ShRmHk','8TAsKrP','number','noColor','352699kROKXi','458222AqPtXc'];a88_0x2a64=function(){return _0x305860;};return a88_0x2a64();}function a88_0x26b4(_0x302819,_0x357634){_0x302819=_0x302819-0x1b2;const _0x2a6447=a88_0x2a64();let _0x26b4ce=_0x2a6447[_0x302819];return _0x26b4ce;}export function colorizeJSON(_0x544b62,_0x4c9d1b={},_0x9f956f=0x0){const _0x2def5a=a88_0x26b4;if(!shouldUseColor(_0x4c9d1b))return JSON[_0x2def5a(0x1b8)](_0x544b62,null,0x2);const _0x10a257='\x20'[_0x2def5a(0x1c3)](_0x9f956f),_0x102c64=_0x9f956f+0x2;if(_0x544b62===null)return colorJSONNull(_0x2def5a(0x1cc),_0x4c9d1b);if(typeof _0x544b62==='boolean')return colorJSONBoolean(String(_0x544b62),_0x4c9d1b);if(typeof _0x544b62===_0x2def5a(0x1c7))return colorJSONNumber(String(_0x544b62),_0x4c9d1b);if(typeof _0x544b62==='string')return colorJSONString(JSON[_0x2def5a(0x1b8)](_0x544b62),_0x4c9d1b);if(Array[_0x2def5a(0x1b2)](_0x544b62)){if(_0x544b62[_0x2def5a(0x1c1)]===0x0)return'[]';const _0xb08331=_0x544b62['map'](_0x3d7d4c=>{const _0x1d9c6c=_0x2def5a,_0x1c6fae=colorizeJSON(_0x3d7d4c,_0x4c9d1b,_0x102c64);return''+'\x20'[_0x1d9c6c(0x1c3)](_0x102c64)+_0x1c6fae;});return'[\x0a'+_0xb08331[_0x2def5a(0x1b5)](',\x0a')+('\x0a'+_0x10a257+']');}if(typeof _0x544b62==='object'){const _0x2e0375=Object[_0x2def5a(0x1bb)](_0x544b62);if(_0x2e0375[_0x2def5a(0x1c1)]===0x0)return'{}';const _0x78db59=_0x2e0375['map'](([_0x2bd376,_0x493184])=>{const _0x3d4544=_0x2def5a,_0xa5c183=colorJSONKey(JSON['stringify'](_0x2bd376),_0x4c9d1b),_0x510286=colorizeJSON(_0x493184,_0x4c9d1b,_0x102c64);return''+'\x20'[_0x3d4544(0x1c3)](_0x102c64)+_0xa5c183+':\x20'+_0x510286;});return'{\x0a'+_0x78db59['join'](',\x0a')+('\x0a'+_0x10a257+'}');}return String(_0x544b62);}
1
+ (function(_0x1259e8,_0x5e3e68){const _0x566719=a88_0x9179,_0x17cc93=_0x1259e8();while(!![]){try{const _0x4c32f0=parseInt(_0x566719(0xa6))/0x1*(parseInt(_0x566719(0xa1))/0x2)+parseInt(_0x566719(0xad))/0x3*(-parseInt(_0x566719(0xb5))/0x4)+parseInt(_0x566719(0xa8))/0x5+-parseInt(_0x566719(0xab))/0x6*(-parseInt(_0x566719(0xb9))/0x7)+-parseInt(_0x566719(0xa5))/0x8*(-parseInt(_0x566719(0xaf))/0x9)+-parseInt(_0x566719(0xb2))/0xa+parseInt(_0x566719(0xb4))/0xb;if(_0x4c32f0===_0x5e3e68)break;else _0x17cc93['push'](_0x17cc93['shift']());}catch(_0x3f35e8){_0x17cc93['push'](_0x17cc93['shift']());}}}(a88_0x2943,0xc9e34));import{Chalk}from'chalk';export function shouldUseColor(_0x16092c={}){const _0x29bc07=a88_0x9179;if(_0x16092c[_0x29bc07(0xb3)]===!![])return![];if(_0x16092c[_0x29bc07(0xa4)]===!![])return!![];if(process[_0x29bc07(0xae)][_0x29bc07(0xa2)]!==undefined)return![];return process['stdout'][_0x29bc07(0xb6)]??![];}export function getChalk(_0x318946={}){if(shouldUseColor(_0x318946))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0xfc4aa6,_0x103f9a={}){return getChalk(_0x103f9a)['dim'](_0xfc4aa6);}export function colorHeader(_0x36fa05,_0x554676={}){const _0x1b0f46=a88_0x9179;return getChalk(_0x554676)[_0x1b0f46(0xb1)](_0x36fa05);}export function colorType(_0x1be35a,_0x20e5b0={}){return getChalk(_0x20e5b0)['dim'](_0x1be35a);}function a88_0x9179(_0x5d7cf5,_0xf77cd){_0x5d7cf5=_0x5d7cf5-0x9f;const _0x294332=a88_0x2943();let _0x91796f=_0x294332[_0x5d7cf5];return _0x91796f;}export function colorJSONKey(_0x38aecc,_0x11e2e8={}){const _0x5c0c2b=a88_0x9179;return getChalk(_0x11e2e8)[_0x5c0c2b(0xb0)](_0x38aecc);}export function colorJSONString(_0x12b9c0,_0x39b4a9={}){return getChalk(_0x39b4a9)['green'](_0x12b9c0);}export function colorJSONNumber(_0x2b4334,_0x8e00d8={}){const _0x17cee6=a88_0x9179;return getChalk(_0x8e00d8)[_0x17cee6(0xb1)](_0x2b4334);}export function colorJSONBoolean(_0x5558f3,_0x526f7b={}){const _0x3ca77f=a88_0x9179;return getChalk(_0x526f7b)[_0x3ca77f(0xbb)](_0x5558f3);}export function colorJSONNull(_0x2638ba,_0x325aa9={}){const _0x3f2881=a88_0x9179;return getChalk(_0x325aa9)[_0x3f2881(0xb7)](_0x2638ba);}function a88_0x2943(){const _0x3f799b=['blue','cyan','12820540iBgtXp','noColor','7619161FZPWdE','44lAHxab','isTTY','dim','join','42tMjFxJ','repeat','yellow','null','boolean','entries','66526GtdWvQ','NO_COLOR','length','color','8OEfqaO','25CSjInN','number','2686915BXvjdq','map','string','510684XZCXrp','stringify','359703XXZdrj','env','7700436aIQwpD'];a88_0x2943=function(){return _0x3f799b;};return a88_0x2943();}export function colorizeJSONCompact(_0xe96465,_0x2016c4={}){const _0x495501=a88_0x9179;if(!shouldUseColor(_0x2016c4))return JSON[_0x495501(0xac)](_0xe96465);if(_0xe96465===null)return colorJSONNull(_0x495501(0xbc),_0x2016c4);if(typeof _0xe96465===_0x495501(0x9f))return colorJSONBoolean(String(_0xe96465),_0x2016c4);if(typeof _0xe96465===_0x495501(0xa7))return colorJSONNumber(String(_0xe96465),_0x2016c4);if(typeof _0xe96465==='string')return colorJSONString(JSON['stringify'](_0xe96465),_0x2016c4);if(Array['isArray'](_0xe96465)){if(_0xe96465[_0x495501(0xa3)]===0x0)return'[]';const _0x1be42b=_0xe96465['map'](_0x91a725=>colorizeJSONCompact(_0x91a725,_0x2016c4));return'['+_0x1be42b[_0x495501(0xb8)](',')+']';}if(typeof _0xe96465==='object'){const _0x1d85d3=Object[_0x495501(0xa0)](_0xe96465);if(_0x1d85d3[_0x495501(0xa3)]===0x0)return'{}';const _0x140fdf=_0x1d85d3[_0x495501(0xa9)](([_0x1a1f95,_0x4f98f1])=>{const _0x20816a=colorJSONKey(JSON['stringify'](_0x1a1f95),_0x2016c4),_0x2e1249=colorizeJSONCompact(_0x4f98f1,_0x2016c4);return _0x20816a+':'+_0x2e1249;});return'{'+_0x140fdf[_0x495501(0xb8)](',')+'}';}return String(_0xe96465);}export function colorizeJSON(_0x564644,_0x22c9af={},_0x3df2e0=0x0){const _0x5f08e2=a88_0x9179;if(!shouldUseColor(_0x22c9af))return JSON[_0x5f08e2(0xac)](_0x564644,null,0x2);const _0x52416a='\x20'[_0x5f08e2(0xba)](_0x3df2e0),_0x4e3474=_0x3df2e0+0x2;if(_0x564644===null)return colorJSONNull(_0x5f08e2(0xbc),_0x22c9af);if(typeof _0x564644===_0x5f08e2(0x9f))return colorJSONBoolean(String(_0x564644),_0x22c9af);if(typeof _0x564644===_0x5f08e2(0xa7))return colorJSONNumber(String(_0x564644),_0x22c9af);if(typeof _0x564644===_0x5f08e2(0xaa))return colorJSONString(JSON['stringify'](_0x564644),_0x22c9af);if(Array['isArray'](_0x564644)){if(_0x564644[_0x5f08e2(0xa3)]===0x0)return'[]';const _0x4f95cf=_0x564644['map'](_0x12d512=>{const _0x121477=colorizeJSON(_0x12d512,_0x22c9af,_0x4e3474);return''+'\x20'['repeat'](_0x4e3474)+_0x121477;});return'[\x0a'+_0x4f95cf['join'](',\x0a')+('\x0a'+_0x52416a+']');}if(typeof _0x564644==='object'){const _0x395eda=Object[_0x5f08e2(0xa0)](_0x564644);if(_0x395eda[_0x5f08e2(0xa3)]===0x0)return'{}';const _0x15a5f7=_0x395eda[_0x5f08e2(0xa9)](([_0x4679fa,_0x5d7fea])=>{const _0xe457db=_0x5f08e2,_0xe2456e=colorJSONKey(JSON[_0xe457db(0xac)](_0x4679fa),_0x22c9af),_0x5a8729=colorizeJSON(_0x5d7fea,_0x22c9af,_0x4e3474);return''+'\x20'[_0xe457db(0xba)](_0x4e3474)+_0xe2456e+':\x20'+_0x5a8729;});return'{\x0a'+_0x15a5f7['join'](',\x0a')+('\x0a'+_0x52416a+'}');}return String(_0x564644);}
@@ -1 +1 @@
1
- (function(_0x4c8191,_0x1bd007){const _0x53afce=a89_0x2c77,_0x3ca615=_0x4c8191();while(!![]){try{const _0x26e2ac=parseInt(_0x53afce(0x1ef))/0x1*(-parseInt(_0x53afce(0x1e3))/0x2)+-parseInt(_0x53afce(0x1e7))/0x3+-parseInt(_0x53afce(0x1ec))/0x4+parseInt(_0x53afce(0x1ae))/0x5+-parseInt(_0x53afce(0x1df))/0x6*(parseInt(_0x53afce(0x1e2))/0x7)+parseInt(_0x53afce(0x1b5))/0x8*(parseInt(_0x53afce(0x1b1))/0x9)+-parseInt(_0x53afce(0x1cb))/0xa*(-parseInt(_0x53afce(0x1b3))/0xb);if(_0x26e2ac===_0x1bd007)break;else _0x3ca615['push'](_0x3ca615['shift']());}catch(_0xd41906){_0x3ca615['push'](_0x3ca615['shift']());}}}(a89_0x2d05,0x622eb));import{writeFileSync}from'fs';function a89_0x2c77(_0x193d26,_0x23b1db){_0x193d26=_0x193d26-0x1a9;const _0x2d05ff=a89_0x2d05();let _0x2c771d=_0x2d05ff[_0x193d26];return _0x2c771d;}import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a89_0x543509 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';export function isStructuredFormat(_0x1690ad){const _0x47fd22=a89_0x2c77;return _0x1690ad[_0x47fd22(0x1c8)]===_0x47fd22(0x1c5)||_0x1690ad[_0x47fd22(0x1c8)]==='jsonl'||_0x1690ad['format']===_0x47fd22(0x1da)||_0x1690ad[_0x47fd22(0x1c8)]==='table'||_0x1690ad[_0x47fd22(0x1c5)]===!![]||_0x1690ad['jsonl']===!![]||_0x1690ad[_0x47fd22(0x1da)]===!![]||_0x1690ad['table']===!![];}export function parseOutputOptions(_0x3f5b13){const _0x25bc19=a89_0x2c77;return{'format':_0x3f5b13[_0x25bc19(0x1c8)]||_0x25bc19(0x1c7),'output':_0x3f5b13[_0x25bc19(0x1b0)]||'','limit':_0x3f5b13[_0x25bc19(0x1ea)],'color':_0x3f5b13[_0x25bc19(0x1d7)],'noColor':_0x3f5b13[_0x25bc19(0x1ad)]};}function convertSDKResultToQueryResult(_0x2461bc){const _0x628a59=a89_0x2c77,_0x2af450=[];if(_0x2461bc['length']>0x0){const _0xc3c157=_0x2461bc[0x0];for(const [_0x155525,_0xa382b9]of Object[_0x628a59(0x1eb)](_0xc3c157)){let _0x4d9147=_0x628a59(0x1e6);if(typeof _0xa382b9===_0x628a59(0x1d1))_0x4d9147=Number[_0x628a59(0x1ac)](_0xa382b9)?_0x628a59(0x1b2):_0x628a59(0x1d8);else{if(typeof _0xa382b9===_0x628a59(0x1c6))_0x4d9147=_0x628a59(0x1c6);else _0xa382b9===null&&(_0x4d9147=_0x628a59(0x1e6));}_0x2af450[_0x628a59(0x1cd)]({'name':_0x155525,'type':_0x4d9147});}}return{'queryId':_0x628a59(0x1c9),'columns':_0x2af450,'data':_0x2461bc,'stats':{'state':_0x628a59(0x1f0),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x2461bc['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x2b464b,_0x16da62){const _0x18dbf7=convertSDKResultToQueryResult(_0x2b464b);return formatQueryOutput(_0x18dbf7,_0x16da62);}export async function formatQueryOutput(_0x4de2bb,_0x2f682a){const _0x28ad07=a89_0x2c77,{format:_0xef12f8,limit:_0x8e9203,output:_0xb1c8fa,color:_0x3e8a6e,noColor:_0x1c3606}=_0x2f682a,_0x4f356c=Boolean(_0xb1c8fa)&&!_0x3e8a6e,_0x1e836f={'color':_0x3e8a6e,'noColor':_0x1c3606||_0x4f356c};if(_0xef12f8===_0x28ad07(0x1c7)){const _0x5ea200=shouldUseLess(_0xef12f8,_0xb1c8fa);return formatAsTable(_0x4de2bb,_0x8e9203,_0x5ea200,_0x1e836f);}else{if(_0xef12f8===_0x28ad07(0x1c5))return formatAsJSON(_0x4de2bb,_0x1e836f);else return _0xef12f8==='jsonl'?formatAsJSONL(_0x4de2bb,_0x1e836f):formatQueryResult(_0x4de2bb,_0xef12f8);}}function shouldUseLess(_0x49aa52,_0x5cda64){const _0x2093f0=a89_0x2c77;return _0x49aa52===_0x2093f0(0x1c7)&&process[_0x2093f0(0x1ca)][_0x2093f0(0x1b9)]&&!_0x5cda64;}function a89_0x2d05(){const _0x3cb8b1=['debug','cyan','forEach','red','[query]','end','json','boolean','table','format','sdk-result','stdout','20mEyouI','padEnd','push','cmdout','[Object]','resolve','number','query','[error]','map','[params]','spawn','color','double','length','tsv','max','log','filter','keys','115932LbqYIs','jsonl','repeat','189yuAaFt','695904QXgTie','params','split','varchar','2176584oPKGFh','less','bold','limit','entries','1662748vByCgR','blue','close','1yApLYJ','FINISHED','inherit','stdin','join','isInteger','noColor','1273475SntRdn','yellow','output','1867167QcSumK','bigint','10729719gHcfJD','-FXRSn','8cAzQPj','error','stringify','No\x20data','isTTY','trim','stderr','string','rule','object'];a89_0x2d05=function(){return _0x3cb8b1;};return a89_0x2d05();}export function resolveOutputOptions(_0x360167){const _0x4fa3f6=a89_0x2c77,_0x1e51fd=resolveOutputFormat(_0x360167['format'],_0x360167['output'],_0x4fa3f6(0x1c7));let _0x4a37f9=typeof _0x360167['limit']===_0x4fa3f6(0x1d1)?_0x360167[_0x4fa3f6(0x1ea)]:parseInt(_0x360167[_0x4fa3f6(0x1ea)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x14a8ee=_0x360167[_0x4fa3f6(0x1b0)]||'';return shouldUseLess(_0x1e51fd,_0x14a8ee)&&(_0x4a37f9=Infinity),{'format':_0x1e51fd,'output':_0x14a8ee,'limit':_0x4a37f9,'color':_0x360167[_0x4fa3f6(0x1d7)],'noColor':_0x360167[_0x4fa3f6(0x1ad)]};}export function writeOutput(_0x3973d1,_0x1cf89a,_0x2a7c27){const _0x3ebe7f=a89_0x2c77;return _0x1cf89a?(writeFileSync(_0x1cf89a,_0x3973d1),console['error']('Results\x20saved\x20to\x20'+_0x1cf89a),Promise[_0x3ebe7f(0x1d0)]()):shouldUseLess(_0x2a7c27||'','')?new Promise(_0x5fbdb5=>{const _0x19f606=_0x3ebe7f,_0xe33ba=spawn(_0x19f606(0x1e8),[_0x19f606(0x1b4)],{'stdio':['pipe',_0x19f606(0x1a9),_0x19f606(0x1a9)]});let _0x2c6f63=![];_0xe33ba['on'](_0x19f606(0x1b6),()=>{const _0x1560e5=_0x19f606;!_0x2c6f63&&(_0x2c6f63=!![],console[_0x1560e5(0x1dc)](_0x3973d1),_0x5fbdb5());}),_0xe33ba['on'](_0x19f606(0x1ee),()=>{!_0x2c6f63&&(_0x2c6f63=!![],_0x5fbdb5());}),_0xe33ba['on'](_0x19f606(0x1d6),()=>{const _0x485351=_0x19f606;!_0x2c6f63&&_0xe33ba[_0x485351(0x1aa)]&&(_0xe33ba[_0x485351(0x1aa)]['on'](_0x485351(0x1b6),()=>{}),_0xe33ba[_0x485351(0x1aa)]['write'](_0x3973d1),_0xe33ba['stdin'][_0x485351(0x1c4)]());}),!_0xe33ba[_0x19f606(0x1aa)]&&(!_0x2c6f63&&(_0x2c6f63=!![],console[_0x19f606(0x1dc)](_0x3973d1),_0x5fbdb5()));}):(console[_0x3ebe7f(0x1dc)](_0x3973d1),Promise[_0x3ebe7f(0x1d0)]());}export async function handleSDKOutput(_0x340ec7,_0xc93770){const _0xf5da87=a89_0x2c77,_0x31e70d=resolveOutputOptions(_0xc93770),_0x39759=await formatSDKOutput(_0x340ec7,_0x31e70d);await writeOutput(_0x39759,_0x31e70d[_0xf5da87(0x1b0)]||undefined,_0x31e70d[_0xf5da87(0x1c8)]);}export async function handleQueryOutput(_0x6a7153,_0x2fe2c4){const _0xe0c098=a89_0x2c77,_0x5ced7c=resolveOutputOptions(_0x2fe2c4),_0x14b981=await formatQueryOutput(_0x6a7153,_0x5ced7c);await writeOutput(_0x14b981,_0x5ced7c[_0xe0c098(0x1b0)]||undefined,_0x5ced7c[_0xe0c098(0x1c8)]);}async function formatSingleObject(_0x2b71e5,_0x406390){const _0x2e05ec=a89_0x2c77,{format:_0xab1980,color:_0x2d49cf,noColor:_0x59da60}=_0x406390,_0x31dd6e={'color':_0x2d49cf,'noColor':_0x59da60};if(_0xab1980==='json'){if(shouldUseColor(_0x31dd6e))return colorizeJSON(_0x2b71e5,_0x31dd6e);return JSON[_0x2e05ec(0x1b7)](_0x2b71e5,null,0x2);}else{if(_0xab1980===_0x2e05ec(0x1e0)){if(shouldUseColor(_0x31dd6e))return colorizeJSONCompact(_0x2b71e5,_0x31dd6e);return JSON['stringify'](_0x2b71e5);}else{if(_0xab1980===_0x2e05ec(0x1da))return Object['entries'](_0x2b71e5)[_0x2e05ec(0x1d4)](([_0x3935e0,_0x42cf63])=>_0x3935e0+'\x09'+_0x42cf63)[_0x2e05ec(0x1ab)]('\x0a');else{const _0x18f648=Object[_0x2e05ec(0x1eb)](_0x2b71e5);if(_0x18f648['length']===0x0)return _0x2e05ec(0x1b8);const _0x5c5200=_0x2b71e5[_0x2e05ec(0x1bf)],_0x5a1ea3=_0x2b71e5['query'],_0x4bc969=_0x2b71e5[_0x2e05ec(0x1e4)],_0x57032b=_0x2b71e5[_0x2e05ec(0x1bd)],_0x55cd1a=_0x5a1ea3?typeof _0x5a1ea3===_0x2e05ec(0x1bc)?_0x5a1ea3:JSON[_0x2e05ec(0x1b7)](_0x5a1ea3,null,0x2):undefined,_0x21c116=_0x4bc969&&Object['keys'](_0x4bc969)[_0x2e05ec(0x1d9)]>0x0?JSON['stringify'](_0x4bc969,null,0x2):undefined,_0x3358b6=_0x57032b&&Object[_0x2e05ec(0x1de)](_0x57032b)[_0x2e05ec(0x1d9)]>0x0?JSON[_0x2e05ec(0x1b7)](_0x57032b,null,0x2):undefined,_0x52bc12=_0x18f648[_0x2e05ec(0x1dd)](([_0x7dbb6])=>_0x7dbb6!=='debug'&&_0x7dbb6!==_0x2e05ec(0x1d2)&&_0x7dbb6!==_0x2e05ec(0x1e4)&&_0x7dbb6!=='rule'),_0x25f01b=Math['max'](..._0x52bc12['map'](([_0x3df45d])=>_0x3df45d[_0x2e05ec(0x1d9)])),_0x5439ae=Math[_0x2e05ec(0x1db)](..._0x52bc12['map'](([,_0xce16b8])=>{const _0x4dde17=_0x2e05ec;try{const _0x224e95=_0xce16b8===null||_0xce16b8===undefined?'':typeof _0xce16b8===_0x4dde17(0x1be)?JSON['stringify'](_0xce16b8):String(_0xce16b8),_0x57d90e=_0x224e95[_0x4dde17(0x1e5)]('\x0a');return Math[_0x4dde17(0x1db)](..._0x57d90e['map'](_0x59023a=>_0x59023a[_0x4dde17(0x1d9)]),0x0);}catch{return 0x0;}}),0x14),_0x119a9e=[];_0x119a9e[_0x2e05ec(0x1cd)](colorBorder('┌─'+'─'['repeat'](_0x25f01b)+'─┬─'+'─'[_0x2e05ec(0x1e1)](_0x5439ae)+'─┐',_0x31dd6e)),_0x52bc12[_0x2e05ec(0x1c1)](([_0x11feb7,_0x4480f0])=>{const _0x1a2451=_0x2e05ec;let _0x4cb0f4;try{_0x4cb0f4=_0x4480f0===null||_0x4480f0===undefined?'':typeof _0x4480f0==='object'?JSON[_0x1a2451(0x1b7)](_0x4480f0):String(_0x4480f0);}catch{_0x4cb0f4=_0x1a2451(0x1cf);}const _0x12fe56=_0x11feb7[_0x1a2451(0x1cc)](_0x25f01b),_0x5efc5b=_0x4cb0f4[_0x1a2451(0x1e5)]('\x0a');_0x5efc5b[_0x1a2451(0x1c1)]((_0x3e94ad,_0x2a4c7b)=>{const _0x1294e1=_0x1a2451,_0x344ac0=colorBorder('│',_0x31dd6e);_0x2a4c7b===0x0?_0x119a9e[_0x1294e1(0x1cd)](_0x344ac0+'\x20'+_0x12fe56+'\x20'+_0x344ac0+'\x20'+_0x3e94ad[_0x1294e1(0x1cc)](_0x5439ae)+'\x20'+_0x344ac0):_0x119a9e[_0x1294e1(0x1cd)](_0x344ac0+'\x20'+'\x20'[_0x1294e1(0x1e1)](_0x25f01b)+'\x20'+_0x344ac0+'\x20'+_0x3e94ad[_0x1294e1(0x1cc)](_0x5439ae)+'\x20'+_0x344ac0);});}),_0x119a9e[_0x2e05ec(0x1cd)](colorBorder('└─'+'─'[_0x2e05ec(0x1e1)](_0x25f01b)+'─┴─'+'─'['repeat'](_0x5439ae)+'─┘',_0x31dd6e));_0x55cd1a&&(_0x119a9e[_0x2e05ec(0x1cd)](''),_0x119a9e['push'](String(a89_0x543509[_0x2e05ec(0x1af)][_0x2e05ec(0x1e9)](_0x2e05ec(0x1c3)))),_0x119a9e[_0x2e05ec(0x1cd)](_0x55cd1a));_0x21c116&&(_0x119a9e[_0x2e05ec(0x1cd)](''),_0x119a9e[_0x2e05ec(0x1cd)](String(a89_0x543509[_0x2e05ec(0x1ed)][_0x2e05ec(0x1e9)](_0x2e05ec(0x1d5)))),_0x119a9e[_0x2e05ec(0x1cd)](_0x21c116));_0x3358b6&&(_0x119a9e[_0x2e05ec(0x1cd)](''),_0x119a9e[_0x2e05ec(0x1cd)](String(a89_0x543509['magenta'][_0x2e05ec(0x1e9)]('[rule]'))),_0x119a9e[_0x2e05ec(0x1cd)](_0x3358b6));if(_0x5c5200){if(_0x5c5200[_0x2e05ec(0x1bb)]){_0x119a9e['push'](''),_0x119a9e[_0x2e05ec(0x1cd)](String(a89_0x543509[_0x2e05ec(0x1c2)]['bold'](_0x2e05ec(0x1d3))));const _0x1c96e0=_0x5c5200[_0x2e05ec(0x1bb)][_0x2e05ec(0x1e5)]('\x0a');_0x1c96e0[_0x2e05ec(0x1c1)](_0x1cb6d2=>{const _0x2fe5fc=_0x2e05ec;_0x1cb6d2[_0x2fe5fc(0x1ba)]()&&_0x119a9e[_0x2fe5fc(0x1cd)](_0x1cb6d2);});}if(_0x5c5200[_0x2e05ec(0x1ce)]){_0x119a9e[_0x2e05ec(0x1cd)](''),_0x119a9e['push'](String(a89_0x543509[_0x2e05ec(0x1c0)][_0x2e05ec(0x1e9)]('[logs]')));const _0x2c684c=_0x5c5200[_0x2e05ec(0x1ce)]['split']('\x0a');_0x2c684c[_0x2e05ec(0x1c1)](_0x1c4e86=>{const _0x2cb9bf=_0x2e05ec;_0x1c4e86[_0x2cb9bf(0x1ba)]()&&_0x119a9e[_0x2cb9bf(0x1cd)](_0x1c4e86);});}}return _0x119a9e['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x322938,_0x271241){const _0x44ea4f=a89_0x2c77;if(_0x271241[_0x44ea4f(0x1c8)]===_0x44ea4f(0x1c7)){await handleSDKOutput([_0x322938],_0x271241);return;}const _0x36ae49=resolveOutputOptions(_0x271241),_0x4564a3=await formatSingleObject(_0x322938,_0x36ae49);await writeOutput(_0x4564a3,_0x36ae49[_0x44ea4f(0x1b0)]||undefined,_0x36ae49['format']);}
1
+ (function(_0x5acdd6,_0xbf1cae){const _0x61de3c=a89_0x3810,_0x376e81=_0x5acdd6();while(!![]){try{const _0x312779=-parseInt(_0x61de3c(0x1e7))/0x1*(-parseInt(_0x61de3c(0x1f0))/0x2)+parseInt(_0x61de3c(0x1cc))/0x3*(-parseInt(_0x61de3c(0x1b3))/0x4)+parseInt(_0x61de3c(0x1e3))/0x5+-parseInt(_0x61de3c(0x1d1))/0x6*(parseInt(_0x61de3c(0x1cf))/0x7)+-parseInt(_0x61de3c(0x1df))/0x8*(-parseInt(_0x61de3c(0x1b6))/0x9)+parseInt(_0x61de3c(0x1c1))/0xa*(parseInt(_0x61de3c(0x1e9))/0xb)+-parseInt(_0x61de3c(0x1c9))/0xc;if(_0x312779===_0xbf1cae)break;else _0x376e81['push'](_0x376e81['shift']());}catch(_0x73275){_0x376e81['push'](_0x376e81['shift']());}}}(a89_0x37ee,0x6a6ed));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a89_0x168a47 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';function a89_0x3810(_0x3ccfe5,_0x16cd68){_0x3ccfe5=_0x3ccfe5-0x1b1;const _0x37eeff=a89_0x37ee();let _0x38107d=_0x37eeff[_0x3ccfe5];return _0x38107d;}export function isStructuredFormat(_0x301562){const _0x2b8701=a89_0x3810;return _0x301562[_0x2b8701(0x1c3)]===_0x2b8701(0x1da)||_0x301562[_0x2b8701(0x1c3)]===_0x2b8701(0x1ba)||_0x301562['format']==='tsv'||_0x301562['format']===_0x2b8701(0x1f2)||_0x301562[_0x2b8701(0x1da)]===!![]||_0x301562[_0x2b8701(0x1ba)]===!![]||_0x301562[_0x2b8701(0x1de)]===!![]||_0x301562['table']===!![];}export function parseOutputOptions(_0x5bcdf7){const _0x29b6ec=a89_0x3810;return{'format':_0x5bcdf7['format']||'table','output':_0x5bcdf7[_0x29b6ec(0x1b7)]||'','limit':_0x5bcdf7[_0x29b6ec(0x1d2)],'color':_0x5bcdf7[_0x29b6ec(0x1ef)],'noColor':_0x5bcdf7[_0x29b6ec(0x1bd)]};}function convertSDKResultToQueryResult(_0x123b81){const _0x10e0db=a89_0x3810,_0x3c8c76=[];if(_0x123b81[_0x10e0db(0x1ee)]>0x0){const _0x39496d=_0x123b81[0x0];for(const [_0x244bf6,_0x324405]of Object[_0x10e0db(0x1e2)](_0x39496d)){let _0x4a1817=_0x10e0db(0x1f8);if(typeof _0x324405===_0x10e0db(0x1ed))_0x4a1817=Number[_0x10e0db(0x1c7)](_0x324405)?_0x10e0db(0x1f6):'double';else{if(typeof _0x324405===_0x10e0db(0x1d0))_0x4a1817='boolean';else _0x324405===null&&(_0x4a1817=_0x10e0db(0x1f8));}_0x3c8c76[_0x10e0db(0x1cb)]({'name':_0x244bf6,'type':_0x4a1817});}}return{'queryId':'sdk-result','columns':_0x3c8c76,'data':_0x123b81,'stats':{'state':_0x10e0db(0x1f3),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x123b81[_0x10e0db(0x1ee)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x4ed75b,_0x5242ab){const _0x2093ed=convertSDKResultToQueryResult(_0x4ed75b);return formatQueryOutput(_0x2093ed,_0x5242ab);}export async function formatQueryOutput(_0x542e42,_0x4991a8){const _0x5eff4d=a89_0x3810,{format:_0x418713,limit:_0x385373,output:_0x57523f,color:_0x1ccdb7,noColor:_0x1e4038}=_0x4991a8,_0x135eb1=Boolean(_0x57523f)&&!_0x1ccdb7,_0x38b47f={'color':_0x1ccdb7,'noColor':_0x1e4038||_0x135eb1};if(_0x418713===_0x5eff4d(0x1f2)){const _0x5dbee8=shouldUseLess(_0x418713,_0x57523f);return formatAsTable(_0x542e42,_0x385373,_0x5dbee8,_0x38b47f);}else{if(_0x418713==='json')return formatAsJSON(_0x542e42,_0x38b47f);else return _0x418713==='jsonl'?formatAsJSONL(_0x542e42,_0x38b47f):formatQueryResult(_0x542e42,_0x418713);}}function shouldUseLess(_0x5a96cf,_0x40afe6){const _0x41406d=a89_0x3810;return _0x5a96cf===_0x41406d(0x1f2)&&process[_0x41406d(0x1db)]['isTTY']&&!_0x40afe6;}export function resolveOutputOptions(_0x6a383e){const _0x57a6f9=a89_0x3810,_0x5666da=resolveOutputFormat(_0x6a383e[_0x57a6f9(0x1c3)],_0x6a383e['output'],_0x57a6f9(0x1f2));let _0x4ae7ec=typeof _0x6a383e[_0x57a6f9(0x1d2)]==='number'?_0x6a383e['limit']:parseInt(_0x6a383e[_0x57a6f9(0x1d2)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x10b37a=_0x6a383e[_0x57a6f9(0x1b7)]||'';return shouldUseLess(_0x5666da,_0x10b37a)&&(_0x4ae7ec=Infinity),{'format':_0x5666da,'output':_0x10b37a,'limit':_0x4ae7ec,'color':_0x6a383e[_0x57a6f9(0x1ef)],'noColor':_0x6a383e['noColor']};}export function writeOutput(_0x291a15,_0x1eef54,_0x5dc926){const _0x306b8e=a89_0x3810;return _0x1eef54?(writeFileSync(_0x1eef54,_0x291a15),console[_0x306b8e(0x1c2)](_0x306b8e(0x1dc)+_0x1eef54),Promise[_0x306b8e(0x1d5)]()):shouldUseLess(_0x5dc926||'','')?new Promise(_0x19407=>{const _0x205988=_0x306b8e,_0x487073=spawn(_0x205988(0x1e6),['-FXRSn'],{'stdio':[_0x205988(0x1d8),_0x205988(0x1f5),'inherit']});let _0xfb62a9=![];_0x487073['on'](_0x205988(0x1c2),()=>{const _0x15bf06=_0x205988;!_0xfb62a9&&(_0xfb62a9=!![],console[_0x15bf06(0x1c0)](_0x291a15),_0x19407());}),_0x487073['on'](_0x205988(0x1d4),()=>{!_0xfb62a9&&(_0xfb62a9=!![],_0x19407());}),_0x487073['on'](_0x205988(0x1b8),()=>{const _0x327b9a=_0x205988;!_0xfb62a9&&_0x487073[_0x327b9a(0x1ea)]&&(_0x487073[_0x327b9a(0x1ea)]['on']('error',()=>{}),_0x487073[_0x327b9a(0x1ea)][_0x327b9a(0x1e5)](_0x291a15),_0x487073[_0x327b9a(0x1ea)]['end']());}),!_0x487073[_0x205988(0x1ea)]&&(!_0xfb62a9&&(_0xfb62a9=!![],console[_0x205988(0x1c0)](_0x291a15),_0x19407()));}):(console['log'](_0x291a15),Promise['resolve']());}export async function handleSDKOutput(_0x5750af,_0x458081){const _0x51dfa8=a89_0x3810,_0x492f4f=resolveOutputOptions(_0x458081),_0x4bc1d0=await formatSDKOutput(_0x5750af,_0x492f4f);await writeOutput(_0x4bc1d0,_0x492f4f[_0x51dfa8(0x1b7)]||undefined,_0x492f4f[_0x51dfa8(0x1c3)]);}export async function handleQueryOutput(_0x3256af,_0x465813){const _0x231811=a89_0x3810,_0x3ec0bc=resolveOutputOptions(_0x465813),_0x46b3d7=await formatQueryOutput(_0x3256af,_0x3ec0bc);await writeOutput(_0x46b3d7,_0x3ec0bc[_0x231811(0x1b7)]||undefined,_0x3ec0bc[_0x231811(0x1c3)]);}function a89_0x37ee(){const _0x49c076=['number','length','color','1319666cSuNGg','keys','table','FINISHED','forEach','inherit','bigint','blue','varchar','magenta','padEnd','bold','769292EfpkPN','debug','map','3315789DenvxG','output','spawn','No\x20data','jsonl','[error]','cyan','noColor','yellow','stringify','log','10LphKWa','error','format','rule','cmdout','[params]','isInteger','repeat','6931872hIfcXQ','stderr','push','9LkSxzL','[rule]','filter','13706yGVQud','boolean','1470JfZqnK','limit','─┬─','close','resolve','max','object','pipe','params','json','stdout','Results\x20saved\x20to\x20','─┴─','tsv','8PlbtRx','query','trim','entries','3394295CvosxK','string','write','less','1wqNRAy','split','3994881qnufSW','stdin','join','[Object]'];a89_0x37ee=function(){return _0x49c076;};return a89_0x37ee();}async function formatSingleObject(_0x26d203,_0x529f09){const _0x393b83=a89_0x3810,{format:_0x1dc187,color:_0x576401,noColor:_0x2b8e48}=_0x529f09,_0x2a1fe1={'color':_0x576401,'noColor':_0x2b8e48};if(_0x1dc187===_0x393b83(0x1da)){if(shouldUseColor(_0x2a1fe1))return colorizeJSON(_0x26d203,_0x2a1fe1);return JSON[_0x393b83(0x1bf)](_0x26d203,null,0x2);}else{if(_0x1dc187===_0x393b83(0x1ba)){if(shouldUseColor(_0x2a1fe1))return colorizeJSONCompact(_0x26d203,_0x2a1fe1);return JSON[_0x393b83(0x1bf)](_0x26d203);}else{if(_0x1dc187===_0x393b83(0x1de))return Object[_0x393b83(0x1e2)](_0x26d203)[_0x393b83(0x1b5)](([_0x518710,_0x526fe3])=>_0x518710+'\x09'+_0x526fe3)['join']('\x0a');else{const _0x14ca9d=Object[_0x393b83(0x1e2)](_0x26d203);if(_0x14ca9d['length']===0x0)return _0x393b83(0x1b9);const _0x3ae58d=_0x26d203[_0x393b83(0x1b4)],_0x2a9ac6=_0x26d203[_0x393b83(0x1e0)],_0x1069df=_0x26d203[_0x393b83(0x1d9)],_0x1e378e=_0x26d203[_0x393b83(0x1c4)],_0x23732f=_0x2a9ac6?typeof _0x2a9ac6===_0x393b83(0x1e4)?_0x2a9ac6:JSON[_0x393b83(0x1bf)](_0x2a9ac6,null,0x2):undefined,_0x482d94=_0x1069df&&Object[_0x393b83(0x1f1)](_0x1069df)[_0x393b83(0x1ee)]>0x0?JSON[_0x393b83(0x1bf)](_0x1069df,null,0x2):undefined,_0x5eb786=_0x1e378e&&Object[_0x393b83(0x1f1)](_0x1e378e)[_0x393b83(0x1ee)]>0x0?JSON['stringify'](_0x1e378e,null,0x2):undefined,_0x4d0e70=_0x14ca9d[_0x393b83(0x1ce)](([_0x3f9e5e])=>_0x3f9e5e!==_0x393b83(0x1b4)&&_0x3f9e5e!==_0x393b83(0x1e0)&&_0x3f9e5e!==_0x393b83(0x1d9)&&_0x3f9e5e!==_0x393b83(0x1c4)),_0x1d80f6=Math['max'](..._0x4d0e70[_0x393b83(0x1b5)](([_0x1ab735])=>_0x1ab735['length'])),_0x49a1ab=Math[_0x393b83(0x1d6)](..._0x4d0e70[_0x393b83(0x1b5)](([,_0x326b87])=>{const _0x457303=_0x393b83;try{const _0x54b3e9=_0x326b87===null||_0x326b87===undefined?'':typeof _0x326b87==='object'?JSON[_0x457303(0x1bf)](_0x326b87):String(_0x326b87),_0x3c340c=_0x54b3e9[_0x457303(0x1e8)]('\x0a');return Math[_0x457303(0x1d6)](..._0x3c340c['map'](_0x1b06f9=>_0x1b06f9[_0x457303(0x1ee)]),0x0);}catch{return 0x0;}}),0x14),_0x44d435=[];_0x44d435[_0x393b83(0x1cb)](colorBorder('┌─'+'─'[_0x393b83(0x1c8)](_0x1d80f6)+_0x393b83(0x1d3)+'─'['repeat'](_0x49a1ab)+'─┐',_0x2a1fe1)),_0x4d0e70[_0x393b83(0x1f4)](([_0x55ee28,_0x411261])=>{const _0x12cb1e=_0x393b83;let _0x3e4d4e;try{_0x3e4d4e=_0x411261===null||_0x411261===undefined?'':typeof _0x411261===_0x12cb1e(0x1d7)?JSON[_0x12cb1e(0x1bf)](_0x411261):String(_0x411261);}catch{_0x3e4d4e=_0x12cb1e(0x1ec);}const _0x284dcf=_0x55ee28['padEnd'](_0x1d80f6),_0x54acee=_0x3e4d4e[_0x12cb1e(0x1e8)]('\x0a');_0x54acee['forEach']((_0x3ddf51,_0x5c7e6a)=>{const _0x128746=_0x12cb1e,_0xbb0200=colorBorder('│',_0x2a1fe1);_0x5c7e6a===0x0?_0x44d435['push'](_0xbb0200+'\x20'+_0x284dcf+'\x20'+_0xbb0200+'\x20'+_0x3ddf51[_0x128746(0x1b1)](_0x49a1ab)+'\x20'+_0xbb0200):_0x44d435[_0x128746(0x1cb)](_0xbb0200+'\x20'+'\x20'[_0x128746(0x1c8)](_0x1d80f6)+'\x20'+_0xbb0200+'\x20'+_0x3ddf51[_0x128746(0x1b1)](_0x49a1ab)+'\x20'+_0xbb0200);});}),_0x44d435[_0x393b83(0x1cb)](colorBorder('└─'+'─'['repeat'](_0x1d80f6)+_0x393b83(0x1dd)+'─'[_0x393b83(0x1c8)](_0x49a1ab)+'─┘',_0x2a1fe1));_0x23732f&&(_0x44d435[_0x393b83(0x1cb)](''),_0x44d435[_0x393b83(0x1cb)](String(a89_0x168a47[_0x393b83(0x1be)]['bold']('[query]'))),_0x44d435[_0x393b83(0x1cb)](_0x23732f));_0x482d94&&(_0x44d435['push'](''),_0x44d435[_0x393b83(0x1cb)](String(a89_0x168a47[_0x393b83(0x1f7)]['bold'](_0x393b83(0x1c6)))),_0x44d435[_0x393b83(0x1cb)](_0x482d94));_0x5eb786&&(_0x44d435[_0x393b83(0x1cb)](''),_0x44d435[_0x393b83(0x1cb)](String(a89_0x168a47[_0x393b83(0x1f9)]['bold'](_0x393b83(0x1cd)))),_0x44d435[_0x393b83(0x1cb)](_0x5eb786));if(_0x3ae58d){if(_0x3ae58d[_0x393b83(0x1ca)]){_0x44d435['push'](''),_0x44d435[_0x393b83(0x1cb)](String(a89_0x168a47['red'][_0x393b83(0x1b2)](_0x393b83(0x1bb))));const _0x13bf6b=_0x3ae58d[_0x393b83(0x1ca)]['split']('\x0a');_0x13bf6b['forEach'](_0x4cbb38=>{const _0x5d0b9b=_0x393b83;_0x4cbb38[_0x5d0b9b(0x1e1)]()&&_0x44d435[_0x5d0b9b(0x1cb)](_0x4cbb38);});}if(_0x3ae58d[_0x393b83(0x1c5)]){_0x44d435[_0x393b83(0x1cb)](''),_0x44d435[_0x393b83(0x1cb)](String(a89_0x168a47[_0x393b83(0x1bc)][_0x393b83(0x1b2)]('[logs]')));const _0x1da1f9=_0x3ae58d[_0x393b83(0x1c5)][_0x393b83(0x1e8)]('\x0a');_0x1da1f9[_0x393b83(0x1f4)](_0x58ea09=>{const _0x538223=_0x393b83;_0x58ea09['trim']()&&_0x44d435[_0x538223(0x1cb)](_0x58ea09);});}}return _0x44d435[_0x393b83(0x1eb)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x345a01,_0xe66466){const _0x60ca39=a89_0x3810;if(_0xe66466[_0x60ca39(0x1c3)]===_0x60ca39(0x1f2)){await handleSDKOutput([_0x345a01],_0xe66466);return;}const _0x5c3ca=resolveOutputOptions(_0xe66466),_0x2dad3f=await formatSingleObject(_0x345a01,_0x5c3ca);await writeOutput(_0x2dad3f,_0x5c3ca['output']||undefined,_0x5c3ca[_0x60ca39(0x1c3)]);}
@@ -1 +1 @@
1
- (function(_0x2aa645,_0x44abb9){const _0x4cd13f=a90_0x4474,_0x566788=_0x2aa645();while(!![]){try{const _0x24eab6=parseInt(_0x4cd13f(0x1e3))/0x1+-parseInt(_0x4cd13f(0x1e1))/0x2*(-parseInt(_0x4cd13f(0x1e2))/0x3)+-parseInt(_0x4cd13f(0x1dd))/0x4+-parseInt(_0x4cd13f(0x1df))/0x5*(-parseInt(_0x4cd13f(0x1e0))/0x6)+parseInt(_0x4cd13f(0x1db))/0x7*(-parseInt(_0x4cd13f(0x1da))/0x8)+parseInt(_0x4cd13f(0x1e5))/0x9+-parseInt(_0x4cd13f(0x1de))/0xa*(parseInt(_0x4cd13f(0x1dc))/0xb);if(_0x24eab6===_0x44abb9)break;else _0x566788['push'](_0x566788['shift']());}catch(_0x5b4ee0){_0x566788['push'](_0x566788['shift']());}}}(a90_0x8b61,0xa1267));export const DEFAULT_DISPLAY_LIMIT=0x28;export const DEFAULT_LISTING_LIMIT=0x2710;function a90_0x4474(_0x2ef50d,_0x5cfb10){_0x2ef50d=_0x2ef50d-0x1da;const _0x8b61e4=a90_0x8b61();let _0x4474e5=_0x8b61e4[_0x2ef50d];return _0x4474e5;}export const DEFAULT_LLM_LIMIT=0x32;function a90_0x8b61(){const _0x5596db=['1583320mqtsdY','92890YFSQwH','430180QqWMFs','6jiChrG','1222968nlrXJQ','3EpkyKe','757976hFXjXP','number','113031qlCNYH','82144soNbIj','91xHBWeh','330Oseaaf'];a90_0x8b61=function(){return _0x5596db;};return a90_0x8b61();}export function resolveLimit(_0x1acea4,_0x4ba12c){const _0x4f18ca=a90_0x4474;if(_0x1acea4===undefined)return _0x4ba12c;if(typeof _0x1acea4===_0x4f18ca(0x1e4))return _0x1acea4;return parseInt(_0x1acea4,0xa);}
1
+ (function(_0x40cc56,_0x542171){const _0x35a4dd=a90_0x4668,_0x30264b=_0x40cc56();while(!![]){try{const _0x5ad377=-parseInt(_0x35a4dd(0x70))/0x1+parseInt(_0x35a4dd(0x6b))/0x2+parseInt(_0x35a4dd(0x6d))/0x3+parseInt(_0x35a4dd(0x71))/0x4+-parseInt(_0x35a4dd(0x6f))/0x5+parseInt(_0x35a4dd(0x6c))/0x6+-parseInt(_0x35a4dd(0x6e))/0x7;if(_0x5ad377===_0x542171)break;else _0x30264b['push'](_0x30264b['shift']());}catch(_0x311ddc){_0x30264b['push'](_0x30264b['shift']());}}}(a90_0x1bbc,0xd4655));export const DEFAULT_DISPLAY_LIMIT=0x28;function a90_0x1bbc(){const _0x3ab6f6=['14762713upGPmN','4536830joSIyo','925164dcnOOc','3781064HSnEoN','2263424CSMirY','8922390dDoaQw','3742257rmvsIJ'];a90_0x1bbc=function(){return _0x3ab6f6;};return a90_0x1bbc();}export const DEFAULT_LISTING_LIMIT=0x2710;function a90_0x4668(_0x42277c,_0x43ac7e){_0x42277c=_0x42277c-0x6b;const _0x1bbcf6=a90_0x1bbc();let _0x4668cb=_0x1bbcf6[_0x42277c];return _0x4668cb;}export const DEFAULT_LLM_LIMIT=0x32;export function resolveLimit(_0x46a010,_0x19e604){if(_0x46a010===undefined)return _0x19e604;if(typeof _0x46a010==='number')return _0x46a010;return parseInt(_0x46a010,0xa);}
@@ -1 +1 @@
1
- (function(_0x24756f,_0x2b6146){const _0x141032=a91_0xdcae,_0x29dce4=_0x24756f();while(!![]){try{const _0x163000=-parseInt(_0x141032(0x1f1))/0x1*(-parseInt(_0x141032(0x1e4))/0x2)+-parseInt(_0x141032(0x1d9))/0x3*(parseInt(_0x141032(0x1ed))/0x4)+-parseInt(_0x141032(0x1d5))/0x5*(-parseInt(_0x141032(0x1d3))/0x6)+parseInt(_0x141032(0x1e1))/0x7*(parseInt(_0x141032(0x1e8))/0x8)+-parseInt(_0x141032(0x1d4))/0x9+-parseInt(_0x141032(0x1db))/0xa+-parseInt(_0x141032(0x1df))/0xb;if(_0x163000===_0x2b6146)break;else _0x29dce4['push'](_0x29dce4['shift']());}catch(_0x39ad34){_0x29dce4['push'](_0x29dce4['shift']());}}}(a91_0x2e5c,0x9aa38));function a91_0xdcae(_0x463211,_0x211749){_0x463211=_0x463211-0x1cd;const _0x2e5c96=a91_0x2e5c();let _0xdcae4f=_0x2e5c96[_0x463211];return _0xdcae4f;}import a91_0x352e66 from'chalk';export function generateDiff(_0x4b439b,_0x5e857e){const _0x506cab=a91_0xdcae,_0x46eb91=_0x4b439b[_0x506cab(0x1d1)]('\x0a'),_0x191191=_0x5e857e[_0x506cab(0x1d1)]('\x0a'),_0x4f563e=[],_0xe5c9f9=computeLCS(_0x46eb91,_0x191191);let _0xee382f=0x0,_0x5cffea=0x0,_0xabb9d6=0x0;while(_0xee382f<_0x46eb91[_0x506cab(0x1f0)]||_0x5cffea<_0x191191[_0x506cab(0x1f0)]){if(_0xabb9d6<_0xe5c9f9[_0x506cab(0x1f0)]&&_0xee382f<_0x46eb91[_0x506cab(0x1f0)]&&_0x46eb91[_0xee382f]===_0xe5c9f9[_0xabb9d6])_0x5cffea<_0x191191['length']&&_0x191191[_0x5cffea]===_0xe5c9f9[_0xabb9d6]?(_0x4f563e[_0x506cab(0x1f2)]({'type':_0x506cab(0x1cf),'content':_0x46eb91[_0xee382f]}),_0xee382f++,_0x5cffea++,_0xabb9d6++):(_0x4f563e[_0x506cab(0x1f2)]({'type':_0x506cab(0x1ec),'content':_0x191191[_0x5cffea]}),_0x5cffea++);else{if(_0xabb9d6<_0xe5c9f9[_0x506cab(0x1f0)]&&_0x5cffea<_0x191191['length']&&_0x191191[_0x5cffea]===_0xe5c9f9[_0xabb9d6])_0x4f563e[_0x506cab(0x1f2)]({'type':_0x506cab(0x1d2),'content':_0x46eb91[_0xee382f]}),_0xee382f++;else{if(_0xee382f<_0x46eb91['length']&&(_0xabb9d6>=_0xe5c9f9['length']||_0x46eb91[_0xee382f]!==_0xe5c9f9[_0xabb9d6]))_0x4f563e[_0x506cab(0x1f2)]({'type':'removed','content':_0x46eb91[_0xee382f]}),_0xee382f++;else _0x5cffea<_0x191191[_0x506cab(0x1f0)]&&(_0x4f563e[_0x506cab(0x1f2)]({'type':_0x506cab(0x1ec),'content':_0x191191[_0x5cffea]}),_0x5cffea++);}}}return _0x4f563e;}function a91_0x2e5c(){const _0x4f159c=['repeat','map','11673kFWWBt','old','3030380mIbQnI','add','\x20\x20\x20','join','15413717YrxIDp','\x20\x20...','14QqljxD','padStart','content','758066kUBzjp','dim','new','some','2322456xxFkGD','max','\x20-\x20','type','added','8cIIklL','cyan','\x20+\x20','length','3WpjQiF','push','green','min','has','unchanged','fill','split','removed','24ntnjRf','4815846HdGPmc','1453560jYCxLp','red'];a91_0x2e5c=function(){return _0x4f159c;};return a91_0x2e5c();}function computeLCS(_0x12a1bb,_0x297a9e){const _0x37f23d=a91_0xdcae,_0x1cf4af=_0x12a1bb[_0x37f23d(0x1f0)],_0x58c911=_0x297a9e['length'],_0x185ee9=Array(_0x1cf4af+0x1)[_0x37f23d(0x1d0)](null)[_0x37f23d(0x1d8)](()=>Array(_0x58c911+0x1)[_0x37f23d(0x1d0)](0x0));for(let _0x15d663=0x1;_0x15d663<=_0x1cf4af;_0x15d663++){for(let _0x115fd1=0x1;_0x115fd1<=_0x58c911;_0x115fd1++){_0x12a1bb[_0x15d663-0x1]===_0x297a9e[_0x115fd1-0x1]?_0x185ee9[_0x15d663][_0x115fd1]=_0x185ee9[_0x15d663-0x1][_0x115fd1-0x1]+0x1:_0x185ee9[_0x15d663][_0x115fd1]=Math[_0x37f23d(0x1e9)](_0x185ee9[_0x15d663-0x1][_0x115fd1],_0x185ee9[_0x15d663][_0x115fd1-0x1]);}}const _0x5b1823=[];let _0x516f79=_0x1cf4af,_0x3eb68d=_0x58c911;while(_0x516f79>0x0&&_0x3eb68d>0x0){if(_0x12a1bb[_0x516f79-0x1]===_0x297a9e[_0x3eb68d-0x1])_0x5b1823['unshift'](_0x12a1bb[_0x516f79-0x1]),_0x516f79--,_0x3eb68d--;else _0x185ee9[_0x516f79-0x1][_0x3eb68d]>_0x185ee9[_0x516f79][_0x3eb68d-0x1]?_0x516f79--:_0x3eb68d--;}return _0x5b1823;}export function formatDiffWithColors(_0x2455c9,_0x5aed35=0x3){const _0x56a795=a91_0xdcae,_0x1957bb=new Set();_0x2455c9['forEach']((_0x4fc5b1,_0x52667a)=>{const _0x1d0cd0=a91_0xdcae;_0x4fc5b1[_0x1d0cd0(0x1eb)]!==_0x1d0cd0(0x1cf)&&_0x1957bb[_0x1d0cd0(0x1dc)](_0x52667a);});if(_0x1957bb['size']===0x0)return'';const _0x44f18b=new Set();for(const _0x2924b9 of _0x1957bb){for(let _0x5972d4=Math[_0x56a795(0x1e9)](0x0,_0x2924b9-_0x5aed35);_0x5972d4<=Math[_0x56a795(0x1cd)](_0x2455c9[_0x56a795(0x1f0)]-0x1,_0x2924b9+_0x5aed35);_0x5972d4++){_0x44f18b[_0x56a795(0x1dc)](_0x5972d4);}}const _0x414d65=[];let _0x4891aa=-0x1;const _0x4b8b78=_0x2455c9[_0x56a795(0x1f0)],_0x480154=Math[_0x56a795(0x1e9)](0x3,String(_0x4b8b78)[_0x56a795(0x1f0)]),_0x107b64=[];let _0x4276a6=0x0,_0x382c5d=0x0;for(const _0x42cb10 of _0x2455c9){if(_0x42cb10[_0x56a795(0x1eb)]===_0x56a795(0x1d2))_0x4276a6++,_0x107b64[_0x56a795(0x1f2)]({'old':_0x4276a6,'new':0x0});else _0x42cb10[_0x56a795(0x1eb)]==='added'?(_0x382c5d++,_0x107b64[_0x56a795(0x1f2)]({'old':0x0,'new':_0x382c5d})):(_0x4276a6++,_0x382c5d++,_0x107b64[_0x56a795(0x1f2)]({'old':_0x4276a6,'new':_0x382c5d}));}for(let _0x46c1fc=0x0;_0x46c1fc<_0x2455c9['length'];_0x46c1fc++){if(!_0x44f18b[_0x56a795(0x1ce)](_0x46c1fc))continue;_0x4891aa!==-0x1&&_0x46c1fc>_0x4891aa+0x1&&_0x414d65[_0x56a795(0x1f2)](a91_0x352e66[_0x56a795(0x1ee)](_0x56a795(0x1e0)));_0x4891aa=_0x46c1fc;const _0x5c8f85=_0x2455c9[_0x46c1fc],_0x57f2de=_0x107b64[_0x46c1fc],_0x2ee795=_0x57f2de[_0x56a795(0x1da)]>0x0?String(_0x57f2de[_0x56a795(0x1da)])[_0x56a795(0x1e2)](_0x480154):'\x20'[_0x56a795(0x1d7)](_0x480154),_0x2feb6d=_0x57f2de[_0x56a795(0x1e6)]>0x0?String(_0x57f2de[_0x56a795(0x1e6)])[_0x56a795(0x1e2)](_0x480154):'\x20'[_0x56a795(0x1d7)](_0x480154);switch(_0x5c8f85[_0x56a795(0x1eb)]){case _0x56a795(0x1d2):_0x414d65['push'](a91_0x352e66[_0x56a795(0x1d6)](_0x2ee795+'\x20'+_0x2feb6d+_0x56a795(0x1ea)+_0x5c8f85['content']));break;case _0x56a795(0x1ec):_0x414d65['push'](a91_0x352e66[_0x56a795(0x1f3)](_0x2ee795+'\x20'+_0x2feb6d+_0x56a795(0x1ef)+_0x5c8f85[_0x56a795(0x1e3)]));break;default:_0x414d65[_0x56a795(0x1f2)](a91_0x352e66[_0x56a795(0x1e5)](_0x2ee795+'\x20'+_0x2feb6d+_0x56a795(0x1dd)+_0x5c8f85['content']));break;}}return _0x414d65[_0x56a795(0x1de)]('\x0a');}export function hasChanges(_0x5702ef){const _0x4c5cef=a91_0xdcae;return _0x5702ef[_0x4c5cef(0x1e7)](_0x59f851=>_0x59f851['type']!==_0x4c5cef(0x1cf));}
1
+ (function(_0xfe0fd1,_0xe158fa){const _0x534ec5=a91_0x46a5,_0x517387=_0xfe0fd1();while(!![]){try{const _0x2320f6=-parseInt(_0x534ec5(0xb0))/0x1+-parseInt(_0x534ec5(0xa9))/0x2*(-parseInt(_0x534ec5(0xb3))/0x3)+parseInt(_0x534ec5(0x97))/0x4+-parseInt(_0x534ec5(0xad))/0x5*(parseInt(_0x534ec5(0xb5))/0x6)+parseInt(_0x534ec5(0x9d))/0x7*(-parseInt(_0x534ec5(0xb2))/0x8)+-parseInt(_0x534ec5(0xa7))/0x9*(-parseInt(_0x534ec5(0xa8))/0xa)+parseInt(_0x534ec5(0x9c))/0xb;if(_0x2320f6===_0xe158fa)break;else _0x517387['push'](_0x517387['shift']());}catch(_0x13ff5d){_0x517387['push'](_0x517387['shift']());}}}(a91_0x5288,0xe840c));import a91_0x1b1e5b from'chalk';export function generateDiff(_0x4c4850,_0x19a07a){const _0x296aad=a91_0x46a5,_0x494769=_0x4c4850[_0x296aad(0x9b)]('\x0a'),_0x16387b=_0x19a07a[_0x296aad(0x9b)]('\x0a'),_0x24e034=[],_0x28b320=computeLCS(_0x494769,_0x16387b);let _0x2bc659=0x0,_0xc05cb1=0x0,_0x381909=0x0;while(_0x2bc659<_0x494769[_0x296aad(0xb1)]||_0xc05cb1<_0x16387b[_0x296aad(0xb1)]){if(_0x381909<_0x28b320[_0x296aad(0xb1)]&&_0x2bc659<_0x494769[_0x296aad(0xb1)]&&_0x494769[_0x2bc659]===_0x28b320[_0x381909])_0xc05cb1<_0x16387b[_0x296aad(0xb1)]&&_0x16387b[_0xc05cb1]===_0x28b320[_0x381909]?(_0x24e034[_0x296aad(0xb7)]({'type':_0x296aad(0x99),'content':_0x494769[_0x2bc659]}),_0x2bc659++,_0xc05cb1++,_0x381909++):(_0x24e034[_0x296aad(0xb7)]({'type':_0x296aad(0xa3),'content':_0x16387b[_0xc05cb1]}),_0xc05cb1++);else{if(_0x381909<_0x28b320[_0x296aad(0xb1)]&&_0xc05cb1<_0x16387b['length']&&_0x16387b[_0xc05cb1]===_0x28b320[_0x381909])_0x24e034['push']({'type':_0x296aad(0xab),'content':_0x494769[_0x2bc659]}),_0x2bc659++;else{if(_0x2bc659<_0x494769[_0x296aad(0xb1)]&&(_0x381909>=_0x28b320[_0x296aad(0xb1)]||_0x494769[_0x2bc659]!==_0x28b320[_0x381909]))_0x24e034[_0x296aad(0xb7)]({'type':_0x296aad(0xab),'content':_0x494769[_0x2bc659]}),_0x2bc659++;else _0xc05cb1<_0x16387b[_0x296aad(0xb1)]&&(_0x24e034[_0x296aad(0xb7)]({'type':'added','content':_0x16387b[_0xc05cb1]}),_0xc05cb1++);}}}return _0x24e034;}function a91_0x5288(){const _0x4136cb=['5gIxcLJ','fill','\x20-\x20','450834vOthoI','length','14024592KgQvbD','12ixfhtz','unshift','11065134Ljxhio','old','push','content','\x20\x20...','dim','min','6507120mVDxaN','new','unchanged','cyan','split','9127261YKGMwq','7JFtbBz','has','\x20\x20\x20','max','\x20+\x20','padStart','added','repeat','some','add','1413eaaCSp','108860brKMSn','416886XPcVYu','map','removed','type'];a91_0x5288=function(){return _0x4136cb;};return a91_0x5288();}function computeLCS(_0x5628a8,_0xb7d812){const _0x1e1c62=a91_0x46a5,_0xec869f=_0x5628a8[_0x1e1c62(0xb1)],_0x4cd9fc=_0xb7d812['length'],_0x295105=Array(_0xec869f+0x1)[_0x1e1c62(0xae)](null)[_0x1e1c62(0xaa)](()=>Array(_0x4cd9fc+0x1)[_0x1e1c62(0xae)](0x0));for(let _0x487fa2=0x1;_0x487fa2<=_0xec869f;_0x487fa2++){for(let _0x126179=0x1;_0x126179<=_0x4cd9fc;_0x126179++){_0x5628a8[_0x487fa2-0x1]===_0xb7d812[_0x126179-0x1]?_0x295105[_0x487fa2][_0x126179]=_0x295105[_0x487fa2-0x1][_0x126179-0x1]+0x1:_0x295105[_0x487fa2][_0x126179]=Math['max'](_0x295105[_0x487fa2-0x1][_0x126179],_0x295105[_0x487fa2][_0x126179-0x1]);}}const _0x48f979=[];let _0x57ebc7=_0xec869f,_0x3eb7b1=_0x4cd9fc;while(_0x57ebc7>0x0&&_0x3eb7b1>0x0){if(_0x5628a8[_0x57ebc7-0x1]===_0xb7d812[_0x3eb7b1-0x1])_0x48f979[_0x1e1c62(0xb4)](_0x5628a8[_0x57ebc7-0x1]),_0x57ebc7--,_0x3eb7b1--;else _0x295105[_0x57ebc7-0x1][_0x3eb7b1]>_0x295105[_0x57ebc7][_0x3eb7b1-0x1]?_0x57ebc7--:_0x3eb7b1--;}return _0x48f979;}function a91_0x46a5(_0x36183c,_0x47f736){_0x36183c=_0x36183c-0x93;const _0x528881=a91_0x5288();let _0x46a52=_0x528881[_0x36183c];return _0x46a52;}export function formatDiffWithColors(_0x1cad19,_0xde977a=0x3){const _0x635b7a=a91_0x46a5,_0x4d7d07=new Set();_0x1cad19['forEach']((_0x41a62a,_0x2168e7)=>{const _0x1e0003=a91_0x46a5;_0x41a62a[_0x1e0003(0xac)]!==_0x1e0003(0x99)&&_0x4d7d07['add'](_0x2168e7);});if(_0x4d7d07['size']===0x0)return'';const _0x3dc7d5=new Set();for(const _0x1473d0 of _0x4d7d07){for(let _0x436ec4=Math['max'](0x0,_0x1473d0-_0xde977a);_0x436ec4<=Math[_0x635b7a(0x96)](_0x1cad19[_0x635b7a(0xb1)]-0x1,_0x1473d0+_0xde977a);_0x436ec4++){_0x3dc7d5[_0x635b7a(0xa6)](_0x436ec4);}}const _0x211275=[];let _0x4195cd=-0x1;const _0x2d2de9=_0x1cad19[_0x635b7a(0xb1)],_0x89c861=Math[_0x635b7a(0xa0)](0x3,String(_0x2d2de9)[_0x635b7a(0xb1)]),_0x4c43ee=[];let _0x583816=0x0,_0x30a49c=0x0;for(const _0x156b8b of _0x1cad19){if(_0x156b8b[_0x635b7a(0xac)]===_0x635b7a(0xab))_0x583816++,_0x4c43ee['push']({'old':_0x583816,'new':0x0});else _0x156b8b[_0x635b7a(0xac)]===_0x635b7a(0xa3)?(_0x30a49c++,_0x4c43ee['push']({'old':0x0,'new':_0x30a49c})):(_0x583816++,_0x30a49c++,_0x4c43ee[_0x635b7a(0xb7)]({'old':_0x583816,'new':_0x30a49c}));}for(let _0x5b849b=0x0;_0x5b849b<_0x1cad19['length'];_0x5b849b++){if(!_0x3dc7d5[_0x635b7a(0x9e)](_0x5b849b))continue;_0x4195cd!==-0x1&&_0x5b849b>_0x4195cd+0x1&&_0x211275['push'](a91_0x1b1e5b[_0x635b7a(0x9a)](_0x635b7a(0x94)));_0x4195cd=_0x5b849b;const _0x4fb0bc=_0x1cad19[_0x5b849b],_0xdf4641=_0x4c43ee[_0x5b849b],_0x5429d7=_0xdf4641['old']>0x0?String(_0xdf4641[_0x635b7a(0xb6)])['padStart'](_0x89c861):'\x20'[_0x635b7a(0xa4)](_0x89c861),_0x2399bf=_0xdf4641['new']>0x0?String(_0xdf4641[_0x635b7a(0x98)])[_0x635b7a(0xa2)](_0x89c861):'\x20'[_0x635b7a(0xa4)](_0x89c861);switch(_0x4fb0bc['type']){case _0x635b7a(0xab):_0x211275[_0x635b7a(0xb7)](a91_0x1b1e5b['red'](_0x5429d7+'\x20'+_0x2399bf+_0x635b7a(0xaf)+_0x4fb0bc[_0x635b7a(0x93)]));break;case'added':_0x211275['push'](a91_0x1b1e5b['green'](_0x5429d7+'\x20'+_0x2399bf+_0x635b7a(0xa1)+_0x4fb0bc[_0x635b7a(0x93)]));break;default:_0x211275[_0x635b7a(0xb7)](a91_0x1b1e5b[_0x635b7a(0x95)](_0x5429d7+'\x20'+_0x2399bf+_0x635b7a(0x9f)+_0x4fb0bc[_0x635b7a(0x93)]));break;}}return _0x211275['join']('\x0a');}export function hasChanges(_0x7e3bc){const _0x113334=a91_0x46a5;return _0x7e3bc[_0x113334(0xa5)](_0x5ac8bb=>_0x5ac8bb['type']!==_0x113334(0x99));}
@@ -1 +1 @@
1
- (function(_0x49d0e0,_0x3c99f4){const _0x4468de=a92_0x3573,_0x1d9732=_0x49d0e0();while(!![]){try{const _0x26cdd0=-parseInt(_0x4468de(0xb6))/0x1+parseInt(_0x4468de(0xac))/0x2*(parseInt(_0x4468de(0xba))/0x3)+parseInt(_0x4468de(0x96))/0x4*(parseInt(_0x4468de(0xb4))/0x5)+parseInt(_0x4468de(0xaf))/0x6+-parseInt(_0x4468de(0xa6))/0x7+-parseInt(_0x4468de(0xa4))/0x8*(-parseInt(_0x4468de(0xa0))/0x9)+parseInt(_0x4468de(0xb8))/0xa;if(_0x26cdd0===_0x3c99f4)break;else _0x1d9732['push'](_0x1d9732['shift']());}catch(_0x237e09){_0x1d9732['push'](_0x1d9732['shift']());}}}(a92_0x404f,0xb9dab));import a92_0x391ff6 from'chalk';import{withQuerySpinner}from'./spinner.js';export function buildSchemaResult(_0x1f3e01){const _0x2af22e=a92_0x3573,_0x3d8fb7=_0x1f3e01[_0x2af22e(0x9c)][_0x2af22e(0xb0)](_0x4272e2=>({'column_name':_0x4272e2['name'],'column_type':_0x4272e2['type'],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x1f3e01,'columns':[{'name':_0x2af22e(0xc3),'type':'varchar'},{'name':_0x2af22e(0xc6),'type':_0x2af22e(0xbb)},{'name':'null','type':_0x2af22e(0xbb)},{'name':_0x2af22e(0x9d),'type':'varchar'},{'name':'default','type':_0x2af22e(0xbb)},{'name':_0x2af22e(0xc0),'type':_0x2af22e(0xbb)}],'data':_0x3d8fb7};}export async function executeSchemaQuery(_0x5237d8,_0x509d36,_0x4aac1d){const _0x153fd2=a92_0x3573,_0x19b70c=_0x5237d8[_0x153fd2(0xc1)]()[_0x153fd2(0xa9)](/;+$/,''),_0x11584d='SELECT\x20*\x20FROM\x20(\x0a'+_0x19b70c+_0x153fd2(0xaa);_0x4aac1d[_0x153fd2(0xbc)]&&console['error'](_0x153fd2(0x8e)+_0x11584d);const _0x408456=await withQuerySpinner(_0x153fd2(0xb1),async _0x17b558=>{const _0x34425f=_0x153fd2,_0x16dac4=await _0x509d36[_0x34425f(0xb2)][_0x34425f(0xad)](_0x11584d,{'catalog':'td','schema':_0x34425f(0xa5),'onJobId':_0x2e3d0f=>{const _0x5bd076=_0x34425f;_0x17b558[_0x5bd076(0x90)](_0x2e3d0f);}});return _0x16dac4;},{'verbose':_0x4aac1d[_0x153fd2(0xbc)]});return buildSchemaResult(_0x408456[_0x153fd2(0x97)]);}function a92_0x3573(_0x15ed6b,_0x4bec49){_0x15ed6b=_0x15ed6b-0x8d;const _0x404fd8=a92_0x404f();let _0x3573ae=_0x404fd8[_0x15ed6b];return _0x3573ae;}function a92_0x404f(){const _0x316d05=['information_schema','8387253XFBlqs','cyan','size','replace','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','Unknown','644ytIdfL','execute','startsWith','8357292iErfkU','map','Fetching\x20schema...','query','\x20\x20\x20\x20','2130xiOEha','slice','365305rtdIOM','error','4523760xfurAA','behaviorName','324cVFIpD','varchar','verbose','type','parentColumn','displayName','extra','trim','Attributes','column_name','source','fields','column_type','groupingName','Schema\x20query:\x0a','length','setJobId','dim','bold','behavior','parentTableName','filter','1268aRPEPN','data','tableName','push','set','localeCompare','columns','key','get','sort','2787003QksuME','entries','name','Behaviors','8rNuzaR'];a92_0x404f=function(){return _0x316d05;};return a92_0x404f();}export function displayFieldsHumanReadable(_0x2ee99c,_0x1e80fc){const _0x5f0935=a92_0x3573,_0x2a027c=_0x2ee99c[_0x5f0935(0x95)](_0x53c8c9=>_0x53c8c9[_0x5f0935(0xc4)]==='attribute'),_0x25c325=_0x2ee99c['filter'](_0x57ed60=>_0x57ed60[_0x5f0935(0xc4)]===_0x5f0935(0x93)),_0x7210a5=new Map();for(const _0x1dc1c7 of _0x2a027c){const _0x5c8258=_0x1dc1c7[_0x5f0935(0x8d)]||_0x1dc1c7['parentTableName']||_0x5f0935(0xab),_0x35d71a=_0x7210a5[_0x5f0935(0x9e)](_0x5c8258);_0x35d71a?_0x35d71a[_0x5f0935(0xc5)][_0x5f0935(0x99)](_0x1dc1c7):_0x7210a5[_0x5f0935(0x9a)](_0x5c8258,{'displayName':_0x5c8258,'tableName':_0x1dc1c7[_0x5f0935(0x94)],'fields':[_0x1dc1c7]});}const _0x490fea=new Map();for(const _0x1f698d of _0x25c325){const _0x37eec0=_0x1f698d[_0x5f0935(0xb9)]||_0x5f0935(0xab),_0xd1cf63=_0x490fea[_0x5f0935(0x9e)](_0x37eec0)||[];_0xd1cf63[_0x5f0935(0x99)](_0x1f698d),_0x490fea[_0x5f0935(0x9a)](_0x37eec0,_0xd1cf63);}console['error']('\x0a'+a92_0x391ff6['bold'](_0x1e80fc));if(_0x7210a5[_0x5f0935(0xa8)]>0x0){console[_0x5f0935(0xb7)]('\x0a'+a92_0x391ff6[_0x5f0935(0x91)](_0x5f0935(0xc2)));const _0x42e726=[..._0x7210a5['entries']()]['sort']((_0x410fea,_0x22c1e8)=>_0x410fea[0x0][_0x5f0935(0x9b)](_0x22c1e8[0x0]));for(const [,_0x5cdc9f]of _0x42e726){const _0x3c1e38=_0x5cdc9f[_0x5f0935(0x98)]&&_0x5cdc9f['tableName']!==_0x5cdc9f[_0x5f0935(0xbf)]?'\x20'+a92_0x391ff6[_0x5f0935(0x91)]('('+_0x5cdc9f['tableName']+')'):'';console[_0x5f0935(0xb7)]('\x20\x20'+a92_0x391ff6[_0x5f0935(0x92)](_0x5cdc9f[_0x5f0935(0xbf)])+_0x3c1e38);const _0x51fcbf=[..._0x5cdc9f['fields']][_0x5f0935(0x9f)]((_0xcd9080,_0x5cc711)=>_0xcd9080[_0x5f0935(0xa2)][_0x5f0935(0x9b)](_0x5cc711[_0x5f0935(0xa2)]));for(const _0x166bdf of _0x51fcbf){const _0x462994=_0x166bdf[_0x5f0935(0xbe)]&&_0x166bdf[_0x5f0935(0xbe)]!==_0x166bdf[_0x5f0935(0xa2)]?'\x20'+a92_0x391ff6[_0x5f0935(0x91)]('('+_0x166bdf[_0x5f0935(0xbe)]+')'):'';console['error'](_0x5f0935(0xb3)+_0x166bdf[_0x5f0935(0xa2)]+_0x462994+':\x20'+a92_0x391ff6['cyan'](_0x166bdf[_0x5f0935(0xbd)]));}}}if(_0x490fea['size']>0x0){console[_0x5f0935(0xb7)]('\x0a'+a92_0x391ff6['dim'](_0x5f0935(0xa3)));const _0x82c849=[..._0x490fea[_0x5f0935(0xa1)]()][_0x5f0935(0x9f)]((_0x4b9584,_0x4e8c52)=>_0x4b9584[0x0]['localeCompare'](_0x4e8c52[0x0]));for(const [_0x1d4453,_0x4f2f9d]of _0x82c849){const _0x511c17=_0x4f2f9d[0x0],_0x4f2df0=_0x511c17?.[_0x5f0935(0x94)]||'';console[_0x5f0935(0xb7)]('\x20\x20'+a92_0x391ff6[_0x5f0935(0x92)](_0x1d4453)+(_0x4f2df0?'\x20'+a92_0x391ff6[_0x5f0935(0x91)]('('+_0x4f2df0+')'):''));const _0x44e229=[..._0x4f2f9d][_0x5f0935(0x9f)]((_0x11ed07,_0x244927)=>_0x11ed07[_0x5f0935(0xa2)][_0x5f0935(0x9b)](_0x244927['name']));for(const _0x5cc06a of _0x44e229){const _0x30ba19=_0x5cc06a[_0x5f0935(0xa2)][_0x5f0935(0xae)](_0x1d4453+'.')?_0x5cc06a[_0x5f0935(0xa2)][_0x5f0935(0xb5)](_0x1d4453[_0x5f0935(0x8f)]+0x1):_0x5cc06a[_0x5f0935(0xa2)],_0x3f740b=_0x5cc06a[_0x5f0935(0xbe)]&&_0x5cc06a[_0x5f0935(0xbe)]!==_0x30ba19?'\x20'+a92_0x391ff6[_0x5f0935(0x91)]('('+_0x5cc06a['parentColumn']+')'):'';console['error']('\x20\x20\x20\x20'+_0x30ba19+_0x3f740b+':\x20'+a92_0x391ff6[_0x5f0935(0xa7)](_0x5cc06a[_0x5f0935(0xbd)]));}}}console[_0x5f0935(0xb7)]('');}
1
+ (function(_0x10d3c8,_0x4a380e){const _0x1fc492=a92_0x196f,_0x59e2fd=_0x10d3c8();while(!![]){try{const _0x4840ad=-parseInt(_0x1fc492(0x1ce))/0x1*(parseInt(_0x1fc492(0x1b9))/0x2)+-parseInt(_0x1fc492(0x1b1))/0x3*(parseInt(_0x1fc492(0x1b7))/0x4)+-parseInt(_0x1fc492(0x1cb))/0x5+parseInt(_0x1fc492(0x1a9))/0x6+-parseInt(_0x1fc492(0x1c9))/0x7*(parseInt(_0x1fc492(0x1a3))/0x8)+-parseInt(_0x1fc492(0x1d2))/0x9*(-parseInt(_0x1fc492(0x1a4))/0xa)+parseInt(_0x1fc492(0x1b5))/0xb;if(_0x4840ad===_0x4a380e)break;else _0x59e2fd['push'](_0x59e2fd['shift']());}catch(_0xa8c7fc){_0x59e2fd['push'](_0x59e2fd['shift']());}}}(a92_0x12dd,0x52569));import a92_0x6b8838 from'chalk';function a92_0x196f(_0x1235a2,_0x1c0e01){_0x1235a2=_0x1235a2-0x1a2;const _0x12dd72=a92_0x12dd();let _0x196f21=_0x12dd72[_0x1235a2];return _0x196f21;}import{withQuerySpinner}from'./spinner.js';function a92_0x12dd(){const _0x472311=['replace','Attributes','query','data','6bRFeHF','localeCompare','startsWith','length','7914148bqiXqW','information_schema','930724MUOSHq','key','516746wHwQIh','filter','type','tableName','behavior','displayName','set','fields','Behaviors','Fetching\x20schema...','parentColumn','extra','error','trim','dim','setJobId','8771BzTOUC','null','1975535cyeuHl','Unknown','Schema\x20query:\x0a','1HvoPKz','\x20\x20\x20\x20','parentTableName','default','3177nbFCeE','column_type','source','get','varchar','push','sort','3312JuaHYn','18070iTYLNt','entries','bold','verbose','size','3705012wcmSJM','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','name','cyan'];a92_0x12dd=function(){return _0x472311;};return a92_0x12dd();}export function buildSchemaResult(_0x5c6b96){const _0x266d26=a92_0x196f,_0x5ab564=_0x5c6b96['columns']['map'](_0x1f7988=>({'column_name':_0x1f7988[_0x266d26(0x1ab)],'column_type':_0x1f7988[_0x266d26(0x1bb)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x5c6b96,'columns':[{'name':'column_name','type':'varchar'},{'name':_0x266d26(0x1d3),'type':_0x266d26(0x1d6)},{'name':_0x266d26(0x1ca),'type':_0x266d26(0x1d6)},{'name':_0x266d26(0x1b8),'type':_0x266d26(0x1d6)},{'name':_0x266d26(0x1d1),'type':_0x266d26(0x1d6)},{'name':_0x266d26(0x1c4),'type':_0x266d26(0x1d6)}],'data':_0x5ab564};}export async function executeSchemaQuery(_0x51f3f2,_0x5dca5e,_0x26a83b){const _0xfaf208=a92_0x196f,_0x279812=_0x51f3f2[_0xfaf208(0x1c6)]()[_0xfaf208(0x1ad)](/;+$/,''),_0x22df29='SELECT\x20*\x20FROM\x20(\x0a'+_0x279812+_0xfaf208(0x1aa);_0x26a83b['verbose']&&console[_0xfaf208(0x1c5)](_0xfaf208(0x1cd)+_0x22df29);const _0x8e0114=await withQuerySpinner(_0xfaf208(0x1c2),async _0x41b73c=>{const _0x4c3a48=_0xfaf208,_0x1c68b6=await _0x5dca5e[_0x4c3a48(0x1af)]['execute'](_0x22df29,{'catalog':'td','schema':_0x4c3a48(0x1b6),'onJobId':_0x3d5469=>{const _0x2b4ecd=_0x4c3a48;_0x41b73c[_0x2b4ecd(0x1c8)](_0x3d5469);}});return _0x1c68b6;},{'verbose':_0x26a83b[_0xfaf208(0x1a7)]});return buildSchemaResult(_0x8e0114[_0xfaf208(0x1b0)]);}export function displayFieldsHumanReadable(_0x2d9660,_0x52c5fd){const _0x1f4ec8=a92_0x196f,_0x40a553=_0x2d9660[_0x1f4ec8(0x1ba)](_0x3248a3=>_0x3248a3[_0x1f4ec8(0x1d4)]==='attribute'),_0x528bce=_0x2d9660['filter'](_0x1f3ab3=>_0x1f3ab3[_0x1f4ec8(0x1d4)]===_0x1f4ec8(0x1bd)),_0x280eaa=new Map();for(const _0x3d11d6 of _0x40a553){const _0x20c42c=_0x3d11d6['groupingName']||_0x3d11d6['parentTableName']||_0x1f4ec8(0x1cc),_0x2903a2=_0x280eaa[_0x1f4ec8(0x1d5)](_0x20c42c);_0x2903a2?_0x2903a2['fields'][_0x1f4ec8(0x1d7)](_0x3d11d6):_0x280eaa[_0x1f4ec8(0x1bf)](_0x20c42c,{'displayName':_0x20c42c,'tableName':_0x3d11d6[_0x1f4ec8(0x1d0)],'fields':[_0x3d11d6]});}const _0xa8339e=new Map();for(const _0x48e570 of _0x528bce){const _0x5da66a=_0x48e570['behaviorName']||_0x1f4ec8(0x1cc),_0x5aa58c=_0xa8339e[_0x1f4ec8(0x1d5)](_0x5da66a)||[];_0x5aa58c['push'](_0x48e570),_0xa8339e[_0x1f4ec8(0x1bf)](_0x5da66a,_0x5aa58c);}console['error']('\x0a'+a92_0x6b8838[_0x1f4ec8(0x1a6)](_0x52c5fd));if(_0x280eaa[_0x1f4ec8(0x1a8)]>0x0){console[_0x1f4ec8(0x1c5)]('\x0a'+a92_0x6b8838[_0x1f4ec8(0x1c7)](_0x1f4ec8(0x1ae)));const _0x8c50ed=[..._0x280eaa[_0x1f4ec8(0x1a5)]()]['sort']((_0x572001,_0x3217c5)=>_0x572001[0x0][_0x1f4ec8(0x1b2)](_0x3217c5[0x0]));for(const [,_0x7a6ee4]of _0x8c50ed){const _0x34707e=_0x7a6ee4[_0x1f4ec8(0x1bc)]&&_0x7a6ee4[_0x1f4ec8(0x1bc)]!==_0x7a6ee4[_0x1f4ec8(0x1be)]?'\x20'+a92_0x6b8838[_0x1f4ec8(0x1c7)]('('+_0x7a6ee4[_0x1f4ec8(0x1bc)]+')'):'';console[_0x1f4ec8(0x1c5)]('\x20\x20'+a92_0x6b8838[_0x1f4ec8(0x1a6)](_0x7a6ee4['displayName'])+_0x34707e);const _0x1e5ecb=[..._0x7a6ee4[_0x1f4ec8(0x1c0)]]['sort']((_0x403d89,_0x23ee33)=>_0x403d89[_0x1f4ec8(0x1ab)][_0x1f4ec8(0x1b2)](_0x23ee33['name']));for(const _0x2337e9 of _0x1e5ecb){const _0x2165e5=_0x2337e9[_0x1f4ec8(0x1c3)]&&_0x2337e9[_0x1f4ec8(0x1c3)]!==_0x2337e9[_0x1f4ec8(0x1ab)]?'\x20'+a92_0x6b8838[_0x1f4ec8(0x1c7)]('('+_0x2337e9[_0x1f4ec8(0x1c3)]+')'):'';console[_0x1f4ec8(0x1c5)](_0x1f4ec8(0x1cf)+_0x2337e9[_0x1f4ec8(0x1ab)]+_0x2165e5+':\x20'+a92_0x6b8838[_0x1f4ec8(0x1ac)](_0x2337e9[_0x1f4ec8(0x1bb)]));}}}if(_0xa8339e['size']>0x0){console[_0x1f4ec8(0x1c5)]('\x0a'+a92_0x6b8838['dim'](_0x1f4ec8(0x1c1)));const _0x563c4f=[..._0xa8339e[_0x1f4ec8(0x1a5)]()][_0x1f4ec8(0x1a2)]((_0x124f44,_0x3e3a50)=>_0x124f44[0x0][_0x1f4ec8(0x1b2)](_0x3e3a50[0x0]));for(const [_0x8c1e3,_0x5376d3]of _0x563c4f){const _0xb4a725=_0x5376d3[0x0],_0x3e4765=_0xb4a725?.['parentTableName']||'';console[_0x1f4ec8(0x1c5)]('\x20\x20'+a92_0x6b8838[_0x1f4ec8(0x1a6)](_0x8c1e3)+(_0x3e4765?'\x20'+a92_0x6b8838[_0x1f4ec8(0x1c7)]('('+_0x3e4765+')'):''));const _0x398962=[..._0x5376d3][_0x1f4ec8(0x1a2)]((_0x4afcac,_0x5acfe5)=>_0x4afcac[_0x1f4ec8(0x1ab)]['localeCompare'](_0x5acfe5[_0x1f4ec8(0x1ab)]));for(const _0x309d79 of _0x398962){const _0x19d68e=_0x309d79[_0x1f4ec8(0x1ab)][_0x1f4ec8(0x1b3)](_0x8c1e3+'.')?_0x309d79[_0x1f4ec8(0x1ab)]['slice'](_0x8c1e3[_0x1f4ec8(0x1b4)]+0x1):_0x309d79[_0x1f4ec8(0x1ab)],_0x1bd64f=_0x309d79[_0x1f4ec8(0x1c3)]&&_0x309d79[_0x1f4ec8(0x1c3)]!==_0x19d68e?'\x20'+a92_0x6b8838['dim']('('+_0x309d79[_0x1f4ec8(0x1c3)]+')'):'';console[_0x1f4ec8(0x1c5)](_0x1f4ec8(0x1cf)+_0x19d68e+_0x1bd64f+':\x20'+a92_0x6b8838[_0x1f4ec8(0x1ac)](_0x309d79[_0x1f4ec8(0x1bb)]));}}}console[_0x1f4ec8(0x1c5)]('');}
@@ -1 +1 @@
1
- (function(_0x125de2,_0x1d6656){const _0x135488=a93_0x5278,_0x25bcff=_0x125de2();while(!![]){try{const _0x4baea4=parseInt(_0x135488(0x10c))/0x1*(-parseInt(_0x135488(0x116))/0x2)+parseInt(_0x135488(0x10e))/0x3*(parseInt(_0x135488(0x117))/0x4)+-parseInt(_0x135488(0x106))/0x5+parseInt(_0x135488(0x114))/0x6*(-parseInt(_0x135488(0x111))/0x7)+-parseInt(_0x135488(0x107))/0x8+-parseInt(_0x135488(0x108))/0x9+-parseInt(_0x135488(0x10a))/0xa*(-parseInt(_0x135488(0x103))/0xb);if(_0x4baea4===_0x1d6656)break;else _0x25bcff['push'](_0x25bcff['shift']());}catch(_0x25d72f){_0x25bcff['push'](_0x25bcff['shift']());}}}(a93_0x4523,0xb3ebd));function a93_0x5278(_0x578d39,_0x4a3ff8){_0x578d39=_0x578d39-0x102;const _0x45230d=a93_0x4523();let _0x527801=_0x45230d[_0x578d39];return _0x527801;}import*as a93_0x1bad47 from'node:fs';import*as a93_0xe353fa from'node:path';function a93_0x4523(){const _0x3bdd8b=['193935rMwRYG','warn',').\x20','174OcLsKk','\x20has\x20insecure\x20permissions\x20(','1401124bopWwQ','2228aSezRl','toString','342353oDyzSt','Warning:\x20','statSync','6252735yOehec','7878432iHeUIJ','10139301rrmjOA','Should\x20be\x200600\x20or\x20more\x20restrictive.','1770TvbKFZ','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','1sbNavq','writeFileSync','507fKVFqe','chmodSync','existsSync'];a93_0x4523=function(){return _0x3bdd8b;};return a93_0x4523();}export function setSecureFilePermissions(_0x2942b6){const _0x423b46=a93_0x5278;try{a93_0x1bad47[_0x423b46(0x10f)](_0x2942b6,0x180);}catch{console[_0x423b46(0x112)](_0x423b46(0x10b)+_0x2942b6);}}export function setSecureDirectoryPermissions(_0x80242c){const _0x53d839=a93_0x5278;try{a93_0x1bad47['chmodSync'](_0x80242c,0x1c0);}catch{console[_0x53d839(0x112)](_0x53d839(0x10b)+_0x80242c);}}export function createSecureDirectory(_0x499e6c){const _0x518555=a93_0x5278;!a93_0x1bad47[_0x518555(0x110)](_0x499e6c)&&(a93_0x1bad47['mkdirSync'](_0x499e6c,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x499e6c));}export function validateSecureFilePermissions(_0x3fcd49){const _0x4e11bf=a93_0x5278;try{const _0x2fbaac=a93_0x1bad47[_0x4e11bf(0x105)](_0x3fcd49),_0x33c7da=_0x2fbaac['mode']&0x1ff,_0x531f38=(_0x33c7da&0x3f)!==0x0;if(_0x531f38)return console[_0x4e11bf(0x112)](_0x4e11bf(0x104)+_0x3fcd49+_0x4e11bf(0x115)+_0x33c7da[_0x4e11bf(0x102)](0x8)+_0x4e11bf(0x113)+_0x4e11bf(0x109)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x2d3a5e,_0xbf7158){const _0x2a5eb6=a93_0x5278,_0x4f3379=a93_0xe353fa['dirname'](_0x2d3a5e);createSecureDirectory(_0x4f3379),a93_0x1bad47[_0x2a5eb6(0x10d)](_0x2d3a5e,_0xbf7158,{'mode':0x180}),setSecureFilePermissions(_0x2d3a5e);}
1
+ (function(_0x2dc01b,_0x4c071e){const _0x383b95=a93_0x46f4,_0x2a8bd7=_0x2dc01b();while(!![]){try{const _0x1195d7=-parseInt(_0x383b95(0xa6))/0x1+-parseInt(_0x383b95(0x99))/0x2*(parseInt(_0x383b95(0xa0))/0x3)+parseInt(_0x383b95(0x97))/0x4+-parseInt(_0x383b95(0xa2))/0x5+parseInt(_0x383b95(0xa4))/0x6+-parseInt(_0x383b95(0x95))/0x7*(parseInt(_0x383b95(0xa3))/0x8)+parseInt(_0x383b95(0x9f))/0x9;if(_0x1195d7===_0x4c071e)break;else _0x2a8bd7['push'](_0x2a8bd7['shift']());}catch(_0x17d3f1){_0x2a8bd7['push'](_0x2a8bd7['shift']());}}}(a93_0x124d,0xa3fb4));import*as a93_0xb93eab from'node:fs';import*as a93_0x192a58 from'node:path';export function setSecureFilePermissions(_0x3d98fa){const _0x437202=a93_0x46f4;try{a93_0xb93eab[_0x437202(0xa5)](_0x3d98fa,0x180);}catch{console[_0x437202(0x94)](_0x437202(0x98)+_0x3d98fa);}}function a93_0x124d(){const _0x291137=['44yxssIa','mkdirSync','Warning:\x20','dirname','existsSync','Should\x20be\x200600\x20or\x20more\x20restrictive.','20994993FUcjPG','42243mRGgez','statSync','6017135xDmidm','24ppOkUJ','6050376togcQQ','chmodSync','408933dGCQsp',').\x20','warn','2758238kFRmzO','\x20has\x20insecure\x20permissions\x20(','1738956WwnmKq','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'];a93_0x124d=function(){return _0x291137;};return a93_0x124d();}export function setSecureDirectoryPermissions(_0x95c9a4){const _0x5ee717=a93_0x46f4;try{a93_0xb93eab['chmodSync'](_0x95c9a4,0x1c0);}catch{console[_0x5ee717(0x94)](_0x5ee717(0x98)+_0x95c9a4);}}function a93_0x46f4(_0x1e071f,_0x3ad84b){_0x1e071f=_0x1e071f-0x94;const _0x124d21=a93_0x124d();let _0x46f48a=_0x124d21[_0x1e071f];return _0x46f48a;}export function createSecureDirectory(_0x2d9e65){const _0x2f8239=a93_0x46f4;!a93_0xb93eab[_0x2f8239(0x9d)](_0x2d9e65)&&(a93_0xb93eab[_0x2f8239(0x9a)](_0x2d9e65,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x2d9e65));}export function validateSecureFilePermissions(_0x4dbc45){const _0x14d064=a93_0x46f4;try{const _0x1d5682=a93_0xb93eab[_0x14d064(0xa1)](_0x4dbc45),_0x50f610=_0x1d5682['mode']&0x1ff,_0x3bcf09=(_0x50f610&0x3f)!==0x0;if(_0x3bcf09)return console[_0x14d064(0x94)](_0x14d064(0x9b)+_0x4dbc45+_0x14d064(0x96)+_0x50f610['toString'](0x8)+_0x14d064(0xa7)+_0x14d064(0x9e)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x59c73f,_0x582e71){const _0x33d4f6=a93_0x46f4,_0x582488=a93_0x192a58[_0x33d4f6(0x9c)](_0x59c73f);createSecureDirectory(_0x582488),a93_0xb93eab['writeFileSync'](_0x59c73f,_0x582e71,{'mode':0x180}),setSecureFilePermissions(_0x59c73f);}
@@ -1 +1 @@
1
- (function(_0x3fb7fe,_0xd7fc4d){const _0x4dfcbf=a94_0x1494,_0x130858=_0x3fb7fe();while(!![]){try{const _0x34b7f5=-parseInt(_0x4dfcbf(0x1b3))/0x1+parseInt(_0x4dfcbf(0x1c1))/0x2+-parseInt(_0x4dfcbf(0x1b5))/0x3*(-parseInt(_0x4dfcbf(0x1b1))/0x4)+parseInt(_0x4dfcbf(0x1c0))/0x5+-parseInt(_0x4dfcbf(0x1bc))/0x6*(-parseInt(_0x4dfcbf(0x1bd))/0x7)+parseInt(_0x4dfcbf(0x1b8))/0x8+-parseInt(_0x4dfcbf(0x1bf))/0x9;if(_0x34b7f5===_0xd7fc4d)break;else _0x130858['push'](_0x130858['shift']());}catch(_0x389c84){_0x130858['push'](_0x130858['shift']());}}}(a94_0x2580,0x21d9a));function a94_0x1494(_0x110bba,_0x3adc7d){_0x110bba=_0x110bba-0x1b1;const _0x25808f=a94_0x2580();let _0x14941a=_0x25808f[_0x110bba];return _0x14941a;}export function detectFormatFromExtension(_0x1c3b28){const _0x376084=a94_0x1494,_0x48fcc2=_0x1c3b28[_0x376084(0x1b7)]()[_0x376084(0x1bb)]('.')[_0x376084(0x1b2)]();switch(_0x48fcc2){case _0x376084(0x1b6):return _0x376084(0x1b6);case _0x376084(0x1b4):return _0x376084(0x1b4);case _0x376084(0x1be):case _0x376084(0x1b9):return _0x376084(0x1be);case'txt':case'text':return _0x376084(0x1ba);default:return undefined;}}function a94_0x2580(){const _0x25636a=['tsv','1995696TiUhTu','814545nwlxPl','128258GltgUn','102356wcAhGc','pop','152673HSiIRv','jsonl','3nNVepY','json','toLowerCase','814144GLZrjz','tab','table','split','48qaNKQD','138838ypkLLM'];a94_0x2580=function(){return _0x25636a;};return a94_0x2580();}export function resolveOutputFormat(_0x4a67e6,_0x341575,_0x3cc92f){if(_0x4a67e6)return _0x4a67e6;if(_0x341575){const _0x57ab94=detectFormatFromExtension(_0x341575);if(_0x57ab94)return _0x57ab94;}return _0x3cc92f;}
1
+ function a94_0x4ca1(_0x744d4c,_0x31d6aa){_0x744d4c=_0x744d4c-0x7f;const _0x30d559=a94_0x30d5();let _0x4ca15c=_0x30d559[_0x744d4c];return _0x4ca15c;}function a94_0x30d5(){const _0x4d5303=['8jbgQnX','4739913aSPvVi','split','52498FBrgJY','6cWjVZM','1499892hzDYkg','pop','tsv','table','16138450auyCsR','4159253DWYbuV','15oYWqUm','json','jsonl','toLowerCase','416600LzLjoY','633871lYGjHn','text'];a94_0x30d5=function(){return _0x4d5303;};return a94_0x30d5();}(function(_0x1030be,_0x515567){const _0x38b549=a94_0x4ca1,_0x20cb1f=_0x1030be();while(!![]){try{const _0x15f406=-parseInt(_0x38b549(0x87))/0x1+parseInt(_0x38b549(0x8c))/0x2*(-parseInt(_0x38b549(0x82))/0x3)+-parseInt(_0x38b549(0x8e))/0x4+-parseInt(_0x38b549(0x86))/0x5+parseInt(_0x38b549(0x8d))/0x6*(-parseInt(_0x38b549(0x81))/0x7)+parseInt(_0x38b549(0x89))/0x8*(parseInt(_0x38b549(0x8a))/0x9)+parseInt(_0x38b549(0x80))/0xa;if(_0x15f406===_0x515567)break;else _0x20cb1f['push'](_0x20cb1f['shift']());}catch(_0x15961a){_0x20cb1f['push'](_0x20cb1f['shift']());}}}(a94_0x30d5,0x4ed62));export function detectFormatFromExtension(_0x1cddde){const _0x31e2ff=a94_0x4ca1,_0x4dffca=_0x1cddde[_0x31e2ff(0x85)]()[_0x31e2ff(0x8b)]('.')[_0x31e2ff(0x8f)]();switch(_0x4dffca){case _0x31e2ff(0x83):return _0x31e2ff(0x83);case _0x31e2ff(0x84):return _0x31e2ff(0x84);case _0x31e2ff(0x90):case'tab':return'tsv';case'txt':case _0x31e2ff(0x88):return _0x31e2ff(0x7f);default:return undefined;}}export function resolveOutputFormat(_0x24de94,_0xd507b2,_0x3dbf63){if(_0x24de94)return _0x24de94;if(_0xd507b2){const _0x1875b3=detectFormatFromExtension(_0xd507b2);if(_0x1875b3)return _0x1875b3;}return _0x3dbf63;}
@@ -1 +1 @@
1
- (function(_0x57732c,_0x381292){const _0x123d46=a95_0x370b,_0x5ed461=_0x57732c();while(!![]){try{const _0xf16a90=parseInt(_0x123d46(0x162))/0x1+-parseInt(_0x123d46(0x171))/0x2*(parseInt(_0x123d46(0x16c))/0x3)+-parseInt(_0x123d46(0x173))/0x4*(parseInt(_0x123d46(0x15d))/0x5)+parseInt(_0x123d46(0x15e))/0x6*(parseInt(_0x123d46(0x17c))/0x7)+-parseInt(_0x123d46(0x187))/0x8*(-parseInt(_0x123d46(0x166))/0x9)+-parseInt(_0x123d46(0x17a))/0xa*(parseInt(_0x123d46(0x16a))/0xb)+parseInt(_0x123d46(0x168))/0xc;if(_0xf16a90===_0x381292)break;else _0x5ed461['push'](_0x5ed461['shift']());}catch(_0x8f793d){_0x5ed461['push'](_0x5ed461['shift']());}}}(a95_0x2811,0x350f0));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x2940dc=a95_0x370b;return process[_0x2940dc(0x181)][_0x2940dc(0x175)]||Infinity;}export function formatAsTable(_0xd3b166,_0x47254f=DEFAULT_MAX_DISPLAY_ROWS,_0x384b9e=![],_0x385117={}){const _0x3f7628=a95_0x370b;if(_0xd3b166[_0x3f7628(0x170)][_0x3f7628(0x172)]===0x0)return _0x3f7628(0x16e);const _0x338439=_0xd3b166[_0x3f7628(0x175)][_0x3f7628(0x17e)](_0x1ca9df=>_0x1ca9df[_0x3f7628(0x186)]),_0x42a338=_0xd3b166[_0x3f7628(0x175)][_0x3f7628(0x17e)](_0x3c1499=>simplifyType(_0x3c1499['type'])),_0x327495=_0xd3b166['data']['slice'](0x0,_0x47254f),_0xcb452c=_0xd3b166[_0x3f7628(0x170)][_0x3f7628(0x172)],_0x44c05b=_0xcb452c>_0x47254f,_0xbd9161=[],_0x5c62f5=getTerminalWidth(),_0x424cdc=_0x5c62f5!==Infinity,_0x34cc78=0x32;let _0x1f8751=_0x338439[_0x3f7628(0x17e)]((_0x245e9d,_0x288b10)=>{const _0x1058fd=_0x3f7628,_0x45ecf2=stringWidth(_0x42a338[_0x288b10]),_0x4e47ad=Math['max'](..._0x327495[_0x1058fd(0x17e)](_0x29ca85=>{const _0x4ce867=_0x29ca85[_0x245e9d];return stringWidth(formatValue(_0x4ce867));})),_0x17c15d=Math['max'](stringWidth(_0x245e9d),_0x45ecf2,_0x4e47ad);return _0x384b9e?_0x17c15d:Math[_0x1058fd(0x15f)](_0x17c15d,_0x34cc78);});if(_0x424cdc&&!_0x384b9e&&_0x338439[_0x3f7628(0x172)]>0x0){const _0x3e03b0=_0x52fb28=>{let _0x55d642=0x1;for(const _0x3690e3 of _0x52fb28){_0x55d642+=_0x3690e3+0x3;}return _0x55d642+0x1;};let _0x48cf78=_0x3e03b0(_0x1f8751);if(_0x48cf78>_0x5c62f5){const _0x1079d9=0x3;for(let _0x5973ea=_0x1f8751[_0x3f7628(0x172)]-0x1;_0x5973ea>=0x0;_0x5973ea--){_0x48cf78=_0x3e03b0(_0x1f8751);if(_0x48cf78<=_0x5c62f5)break;const _0x3fafb1=_0x1f8751[_0x5973ea],_0x6614a3=_0x48cf78-_0x5c62f5,_0x4da8f8=_0x3fafb1-_0x1079d9,_0x647a16=Math[_0x3f7628(0x15f)](_0x6614a3,_0x4da8f8);_0x647a16>0x0&&(_0x1f8751[_0x5973ea]=_0x3fafb1-_0x647a16);}}}const _0x5a8842=_0x338439,_0x274deb=_0x42a338,_0x226468=_0x1f8751,_0x4056d6=_0x1f8751;_0xbd9161[_0x3f7628(0x164)](colorBorder('┌'+_0x4056d6[_0x3f7628(0x17e)](_0x31d203=>'─'['repeat'](_0x31d203+0x2))[_0x3f7628(0x161)]('┬')+'┐',_0x385117));const _0x50e8bc=_0x5a8842[_0x3f7628(0x17e)]((_0x3d45c2,_0x41a332)=>centerAlign(_0x3d45c2,_0x226468[_0x41a332]));_0xbd9161['push'](colorBorder('│',_0x385117)+'\x20'+_0x50e8bc['join']('\x20'+colorBorder('│',_0x385117)+'\x20')+'\x20'+colorBorder('│',_0x385117));const _0x4612f0=_0x274deb['map']((_0xdfccee,_0x5c5046)=>colorType(centerAlign(_0xdfccee,_0x226468[_0x5c5046]),_0x385117));_0xbd9161[_0x3f7628(0x164)](colorBorder('│',_0x385117)+'\x20'+_0x4612f0[_0x3f7628(0x161)]('\x20'+colorBorder('│',_0x385117)+'\x20')+'\x20'+colorBorder('│',_0x385117)),_0xbd9161[_0x3f7628(0x164)](colorBorder('├'+_0x4056d6[_0x3f7628(0x17e)](_0x34ae26=>'─'[_0x3f7628(0x17d)](_0x34ae26+0x2))['join']('┼')+'┤',_0x385117));const _0x2b4103=(_0x36eb88,_0x2d44a2)=>{const _0x1b23fb=stringWidth(_0x36eb88);if(_0x1b23fb<=_0x2d44a2)return _0x36eb88;let _0x1c4ac0=_0x36eb88;while(stringWidth(_0x1c4ac0+'…')>_0x2d44a2&&_0x1c4ac0['length']>0x0){_0x1c4ac0=_0x1c4ac0['slice'](0x0,-0x1);}return _0x1c4ac0+'…';};_0x327495[_0x3f7628(0x188)](_0xed347d=>{const _0x549d14=_0x3f7628,_0x3e5f81=_0x338439[_0x549d14(0x17e)]((_0x576443,_0x549d62)=>{const _0x5f0679=_0xed347d[_0x576443],_0x291232=formatValue(_0x5f0679),_0x2357d6=_0x226468[_0x549d62],_0x46e51c=_0x2b4103(_0x291232,_0x2357d6),_0x49f682=typeof _0x5f0679==='number'||typeof _0x5f0679==='string'&&/^-?\d+$/['test'](_0x5f0679);return _0x49f682?padStart(_0x46e51c,_0x2357d6):padEnd(_0x46e51c,_0x2357d6);});_0xbd9161[_0x549d14(0x164)](colorBorder('│',_0x385117)+'\x20'+_0x3e5f81['join']('\x20'+colorBorder('│',_0x385117)+'\x20')+'\x20'+colorBorder('│',_0x385117));});const _0x35fe46=_0x4056d6[_0x3f7628(0x180)]((_0x5aa7e5,_0x4a5433)=>_0x5aa7e5+_0x4a5433+0x3,-0x1);_0xbd9161[_0x3f7628(0x164)](colorBorder('├'+_0x4056d6[_0x3f7628(0x17e)](_0x36c232=>'─'[_0x3f7628(0x17d)](_0x36c232+0x2))[_0x3f7628(0x161)]('┴')+'┤',_0x385117));let _0x9511e6;_0x44c05b?_0x9511e6=_0xcb452c+_0x3f7628(0x17b)+_0x47254f+_0x3f7628(0x185):_0x9511e6=_0xcb452c+_0x3f7628(0x18a)+(_0xcb452c===0x1?'':'s');const _0x3b3a47=_0x9511e6[_0x3f7628(0x169)](_0x35fe46-0x2);return _0xbd9161[_0x3f7628(0x164)](colorBorder('│',_0x385117)+'\x20'+_0x3b3a47+'\x20'+colorBorder('│',_0x385117)),_0xbd9161[_0x3f7628(0x164)](colorBorder('└'+'─'[_0x3f7628(0x17d)](_0x35fe46)+'┘',_0x385117)),_0xbd9161['join']('\x0a');}function simplifyType(_0x176666){const _0x438735=a95_0x370b,_0x3f592a={'varchar':'string','bigint':_0x438735(0x18c),'integer':_0x438735(0x189),'double':_0x438735(0x167),'boolean':'bool','date':'date','timestamp':_0x438735(0x18e),'array':'array','map':_0x438735(0x17e),'row':_0x438735(0x177)},_0x592dc4=_0x176666['toLowerCase']();for(const [_0x2e640a,_0x35c65c]of Object[_0x438735(0x16b)](_0x3f592a)){if(_0x592dc4['startsWith'](_0x2e640a))return _0x35c65c;}return _0x176666[_0x438735(0x172)]>0xa?_0x176666[_0x438735(0x17f)](0x0,0xa):_0x176666;}export function formatAsJSON(_0x1cff32,_0x1cddb9={}){const _0x340979=a95_0x370b;if(_0x1cff32['data'][_0x340979(0x172)]===0x0)return'[]';if(shouldUseColor(_0x1cddb9))return colorizeJSON(_0x1cff32[_0x340979(0x170)],_0x1cddb9);const _0x38de13=_0x1cff32[_0x340979(0x170)][_0x340979(0x17e)](_0x21dc66=>'\x20\x20'+JSON[_0x340979(0x179)](_0x21dc66));return'[\x0a'+_0x38de13[_0x340979(0x161)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x11d557,_0x231c97={}){const _0x1ba94f=a95_0x370b;if(_0x11d557[_0x1ba94f(0x170)][_0x1ba94f(0x172)]===0x0)return'';if(shouldUseColor(_0x231c97))return _0x11d557[_0x1ba94f(0x170)][_0x1ba94f(0x17e)](_0x386fa0=>colorizeJSONCompact(_0x386fa0,_0x231c97))['join']('\x0a');return _0x11d557[_0x1ba94f(0x170)][_0x1ba94f(0x17e)](_0x37e610=>JSON[_0x1ba94f(0x179)](_0x37e610))[_0x1ba94f(0x161)]('\x0a');}export function formatAsTSV(_0x4e67c0){const _0x58fc21=a95_0x370b;if(_0x4e67c0['data']['length']===0x0)return'';const _0x5986ad=[],_0x148aaf=_0x4e67c0[_0x58fc21(0x175)][_0x58fc21(0x17e)](_0xe360c4=>_0xe360c4['name']);return _0x5986ad[_0x58fc21(0x164)](_0x148aaf['join']('\x09')),_0x4e67c0[_0x58fc21(0x170)][_0x58fc21(0x188)](_0x5400d6=>{const _0x41e804=_0x58fc21,_0x390947=_0x148aaf[_0x41e804(0x17e)](_0x1e84f1=>{const _0x33c5c9=_0x5400d6[_0x1e84f1];return formatValueForTSV(_0x33c5c9);});_0x5986ad['push'](_0x390947[_0x41e804(0x161)]('\x09'));}),_0x5986ad[_0x58fc21(0x161)]('\x0a');}function formatValue(_0x433d8a){const _0x1dbc15=a95_0x370b;if(_0x433d8a===null||_0x433d8a===undefined)return'';if(typeof _0x433d8a===_0x1dbc15(0x165)){const _0x493525=_0x433d8a[_0x1dbc15(0x16f)](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr')[_0x1dbc15(0x16f)](/\t/g,'\x5ct');return _0x493525;}if(typeof _0x433d8a===_0x1dbc15(0x160))return String(_0x433d8a);if(typeof _0x433d8a===_0x1dbc15(0x176))return _0x433d8a?'true':_0x1dbc15(0x183);if(_0x433d8a instanceof Date)return _0x433d8a[_0x1dbc15(0x18b)]();if(typeof _0x433d8a===_0x1dbc15(0x15b))return JSON['stringify'](_0x433d8a);return String(_0x433d8a);}function a95_0x370b(_0x4c84b1,_0x400d3a){_0x4c84b1=_0x4c84b1-0x15b;const _0x2811c8=a95_0x2811();let _0x370b8a=_0x2811c8[_0x4c84b1];return _0x370b8a;}function formatValueForTSV(_0x3c24db){const _0x37210d=a95_0x370b;if(_0x3c24db===null||_0x3c24db===undefined)return'';if(typeof _0x3c24db===_0x37210d(0x165))return _0x3c24db['replace'](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x3c24db===_0x37210d(0x160)||typeof _0x3c24db==='boolean')return String(_0x3c24db);if(_0x3c24db instanceof Date)return _0x3c24db[_0x37210d(0x18b)]();if(typeof _0x3c24db===_0x37210d(0x15b))return JSON['stringify'](_0x3c24db);return String(_0x3c24db);}export function formatQueryResult(_0xa4541f,_0x1ca9d2){const _0xc6ff8e=a95_0x370b;switch(_0x1ca9d2){case'table':return formatAsTable(_0xa4541f);case _0xc6ff8e(0x18d):return formatAsJSON(_0xa4541f);case _0xc6ff8e(0x184):return formatAsJSONL(_0xa4541f);case'tsv':return formatAsTSV(_0xa4541f);default:return formatAsJSON(_0xa4541f);}}function a95_0x2811(){const _0x19ce65=['112okcMsv','forEach','int','\x20row','toISOString','long','json','timestamp','object','pow','4625AQUgGl','132378fMKncC','min','number','join','25356FnhhAX','0\x20B','push','string','24147iameFA','double','9279804objwSn','padEnd','2304698bMNdGs','entries','3jfcapD','log','No\x20rows\x20returned','replace','data','679686rKdkWB','length','1064dIkTTe','toFixed','columns','boolean','row','toString','stringify','10OwguTx','\x20rows\x20(','56ZoulnT','repeat','map','substring','reduce','stdout','floor','false','jsonl','\x20shown)','name'];a95_0x2811=function(){return _0x19ce65;};return a95_0x2811();}export function formatBytes(_0x154238){const _0x1410d6=a95_0x370b;if(_0x154238===0x0)return _0x1410d6(0x163);const _0x45dbe7=['B','KB','MB','GB','TB'],_0x4db9f9=0x400,_0x2f52c3=Math[_0x1410d6(0x182)](Math[_0x1410d6(0x16d)](_0x154238)/Math[_0x1410d6(0x16d)](_0x4db9f9)),_0x2d0305=_0x154238/Math[_0x1410d6(0x15c)](_0x4db9f9,_0x2f52c3),_0x5d186b=_0x2d0305>=0xa?0x1:0x2;return _0x2d0305['toFixed'](_0x5d186b)+'\x20'+_0x45dbe7[_0x2f52c3];}export function formatRows(_0x1105c1){const _0x61317=a95_0x370b;if(_0x1105c1==null)return'-';if(_0x1105c1===0x0)return'0';if(_0x1105c1<0x3e8)return _0x1105c1[_0x61317(0x178)]();const _0x145639=['','K','M','B','T'],_0x382823=0x3e8,_0x30ea84=Math[_0x61317(0x182)](Math[_0x61317(0x16d)](_0x1105c1)/Math[_0x61317(0x16d)](_0x382823)),_0x25b7aa=_0x1105c1/Math[_0x61317(0x15c)](_0x382823,_0x30ea84),_0x3fc061=_0x25b7aa>=0xa?0x1:0x2;return''+_0x25b7aa[_0x61317(0x174)](_0x3fc061)+_0x145639[_0x30ea84];}
1
+ (function(_0x36114e,_0x5e11bd){const _0x5c9002=a95_0x3d64,_0x4912b5=_0x36114e();while(!![]){try{const _0x2148b9=-parseInt(_0x5c9002(0xa4))/0x1*(parseInt(_0x5c9002(0x99))/0x2)+-parseInt(_0x5c9002(0xa2))/0x3*(-parseInt(_0x5c9002(0x82))/0x4)+parseInt(_0x5c9002(0x91))/0x5+parseInt(_0x5c9002(0x93))/0x6*(-parseInt(_0x5c9002(0xac))/0x7)+-parseInt(_0x5c9002(0xa5))/0x8*(parseInt(_0x5c9002(0xa9))/0x9)+parseInt(_0x5c9002(0xad))/0xa+parseInt(_0x5c9002(0x96))/0xb*(parseInt(_0x5c9002(0xa1))/0xc);if(_0x2148b9===_0x5e11bd)break;else _0x4912b5['push'](_0x4912b5['shift']());}catch(_0x493319){_0x4912b5['push'](_0x4912b5['shift']());}}}(a95_0x4f9c,0x83979));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';function a95_0x4f9c(){const _0x42e4eb=['true','toISOString','toLowerCase','0\x20B','false','jsonl','forEach','reduce','max','2449110bLhCrM','repeat','5334510ACIdWz','toString','long','512809UuVpfW','slice','stringify','2sLHwDE','boolean','name','replace','\x20rows\x20(','min','int','map','180ZFWkUf','98205kzspxc','tsv','264371lJXCKg','16SuVlhG','padEnd','join','test','3879054GkEnEk','row','substring','7wQPsxw','6779270FAKZGw','toFixed','floor','startsWith','length','json','type','push','string','log','No\x20rows\x20returned','84CUuGbp','columns','pow','data','number','\x20row'];a95_0x4f9c=function(){return _0x42e4eb;};return a95_0x4f9c();}const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){return process['stdout']['columns']||Infinity;}export function formatAsTable(_0x3ade96,_0x467952=DEFAULT_MAX_DISPLAY_ROWS,_0x3fa397=![],_0x11854a={}){const _0x949401=a95_0x3d64;if(_0x3ade96[_0x949401(0x85)][_0x949401(0xb1)]===0x0)return _0x949401(0x81);const _0x862489=_0x3ade96['columns'][_0x949401(0xa0)](_0x5f0c28=>_0x5f0c28[_0x949401(0x9b)]),_0x34a16c=_0x3ade96[_0x949401(0x83)][_0x949401(0xa0)](_0x29187a=>simplifyType(_0x29187a[_0x949401(0x7d)])),_0x5eff40=_0x3ade96['data'][_0x949401(0x97)](0x0,_0x467952),_0x1c6b37=_0x3ade96['data']['length'],_0x413234=_0x1c6b37>_0x467952,_0x86a2aa=[],_0x165198=getTerminalWidth(),_0x47c631=_0x165198!==Infinity,_0x31cf21=0x32;let _0x4483e8=_0x862489[_0x949401(0xa0)]((_0x648ade,_0x35b1fc)=>{const _0x4d5374=_0x949401,_0x283db9=stringWidth(_0x34a16c[_0x35b1fc]),_0x1dac1f=Math[_0x4d5374(0x90)](..._0x5eff40[_0x4d5374(0xa0)](_0x354ac6=>{const _0x2135dd=_0x354ac6[_0x648ade];return stringWidth(formatValue(_0x2135dd));})),_0x5c1f37=Math[_0x4d5374(0x90)](stringWidth(_0x648ade),_0x283db9,_0x1dac1f);return _0x3fa397?_0x5c1f37:Math[_0x4d5374(0x9e)](_0x5c1f37,_0x31cf21);});if(_0x47c631&&!_0x3fa397&&_0x862489[_0x949401(0xb1)]>0x0){const _0x434463=_0x47ba0b=>{let _0x94ea=0x1;for(const _0x19dda7 of _0x47ba0b){_0x94ea+=_0x19dda7+0x3;}return _0x94ea+0x1;};let _0x46c571=_0x434463(_0x4483e8);if(_0x46c571>_0x165198){const _0x18a1e3=0x3;for(let _0x3c0903=_0x4483e8[_0x949401(0xb1)]-0x1;_0x3c0903>=0x0;_0x3c0903--){_0x46c571=_0x434463(_0x4483e8);if(_0x46c571<=_0x165198)break;const _0x4c53e8=_0x4483e8[_0x3c0903],_0x42abeb=_0x46c571-_0x165198,_0x410ca3=_0x4c53e8-_0x18a1e3,_0x1c92d1=Math['min'](_0x42abeb,_0x410ca3);_0x1c92d1>0x0&&(_0x4483e8[_0x3c0903]=_0x4c53e8-_0x1c92d1);}}}const _0x1b9652=_0x862489,_0x551081=_0x34a16c,_0x2adbe1=_0x4483e8,_0x39670a=_0x4483e8;_0x86a2aa[_0x949401(0x7e)](colorBorder('┌'+_0x39670a[_0x949401(0xa0)](_0x1a3894=>'─'[_0x949401(0x92)](_0x1a3894+0x2))[_0x949401(0xa7)]('┬')+'┐',_0x11854a));const _0x3d161a=_0x1b9652[_0x949401(0xa0)]((_0x3d6220,_0x5231af)=>centerAlign(_0x3d6220,_0x2adbe1[_0x5231af]));_0x86a2aa[_0x949401(0x7e)](colorBorder('│',_0x11854a)+'\x20'+_0x3d161a[_0x949401(0xa7)]('\x20'+colorBorder('│',_0x11854a)+'\x20')+'\x20'+colorBorder('│',_0x11854a));const _0x48110c=_0x551081[_0x949401(0xa0)]((_0xa18ca8,_0x411350)=>colorType(centerAlign(_0xa18ca8,_0x2adbe1[_0x411350]),_0x11854a));_0x86a2aa['push'](colorBorder('│',_0x11854a)+'\x20'+_0x48110c[_0x949401(0xa7)]('\x20'+colorBorder('│',_0x11854a)+'\x20')+'\x20'+colorBorder('│',_0x11854a)),_0x86a2aa[_0x949401(0x7e)](colorBorder('├'+_0x39670a[_0x949401(0xa0)](_0x485187=>'─'['repeat'](_0x485187+0x2))[_0x949401(0xa7)]('┼')+'┤',_0x11854a));const _0x52aa65=(_0x3da5f2,_0x4a6267)=>{const _0x2a0822=_0x949401,_0xcbc989=stringWidth(_0x3da5f2);if(_0xcbc989<=_0x4a6267)return _0x3da5f2;let _0x2d16ee=_0x3da5f2;while(stringWidth(_0x2d16ee+'…')>_0x4a6267&&_0x2d16ee[_0x2a0822(0xb1)]>0x0){_0x2d16ee=_0x2d16ee[_0x2a0822(0x97)](0x0,-0x1);}return _0x2d16ee+'…';};_0x5eff40[_0x949401(0x8e)](_0x5bcf89=>{const _0x9a5b48=_0x949401,_0x3ad329=_0x862489[_0x9a5b48(0xa0)]((_0x4e1bef,_0x325472)=>{const _0x345791=_0x9a5b48,_0x110638=_0x5bcf89[_0x4e1bef],_0x23bff4=formatValue(_0x110638),_0x257d23=_0x2adbe1[_0x325472],_0xbcd2da=_0x52aa65(_0x23bff4,_0x257d23),_0x35faf1=typeof _0x110638==='number'||typeof _0x110638===_0x345791(0x7f)&&/^-?\d+$/[_0x345791(0xa8)](_0x110638);return _0x35faf1?padStart(_0xbcd2da,_0x257d23):padEnd(_0xbcd2da,_0x257d23);});_0x86a2aa[_0x9a5b48(0x7e)](colorBorder('│',_0x11854a)+'\x20'+_0x3ad329['join']('\x20'+colorBorder('│',_0x11854a)+'\x20')+'\x20'+colorBorder('│',_0x11854a));});const _0x20cd7e=_0x39670a[_0x949401(0x8f)]((_0x3623e9,_0xecf7e1)=>_0x3623e9+_0xecf7e1+0x3,-0x1);_0x86a2aa[_0x949401(0x7e)](colorBorder('├'+_0x39670a['map'](_0x28d351=>'─'[_0x949401(0x92)](_0x28d351+0x2))[_0x949401(0xa7)]('┴')+'┤',_0x11854a));let _0x4dca9e;_0x413234?_0x4dca9e=_0x1c6b37+_0x949401(0x9d)+_0x467952+'\x20shown)':_0x4dca9e=_0x1c6b37+_0x949401(0x87)+(_0x1c6b37===0x1?'':'s');const _0xb96001=_0x4dca9e[_0x949401(0xa6)](_0x20cd7e-0x2);return _0x86a2aa[_0x949401(0x7e)](colorBorder('│',_0x11854a)+'\x20'+_0xb96001+'\x20'+colorBorder('│',_0x11854a)),_0x86a2aa['push'](colorBorder('└'+'─'[_0x949401(0x92)](_0x20cd7e)+'┘',_0x11854a)),_0x86a2aa[_0x949401(0xa7)]('\x0a');}function a95_0x3d64(_0x153998,_0x56df53){_0x153998=_0x153998-0x7d;const _0x4f9c27=a95_0x4f9c();let _0x3d6483=_0x4f9c27[_0x153998];return _0x3d6483;}function simplifyType(_0x4ab8e3){const _0x1c855b=a95_0x3d64,_0x5f39c4={'varchar':_0x1c855b(0x7f),'bigint':_0x1c855b(0x95),'integer':_0x1c855b(0x9f),'double':'double','boolean':'bool','date':'date','timestamp':'timestamp','array':'array','map':'map','row':_0x1c855b(0xaa)},_0x1e9f42=_0x4ab8e3[_0x1c855b(0x8a)]();for(const [_0x173427,_0x4988f8]of Object['entries'](_0x5f39c4)){if(_0x1e9f42[_0x1c855b(0xb0)](_0x173427))return _0x4988f8;}return _0x4ab8e3['length']>0xa?_0x4ab8e3[_0x1c855b(0xab)](0x0,0xa):_0x4ab8e3;}export function formatAsJSON(_0x47daa8,_0x347c4b={}){const _0x2a95f1=a95_0x3d64;if(_0x47daa8[_0x2a95f1(0x85)]['length']===0x0)return'[]';if(shouldUseColor(_0x347c4b))return colorizeJSON(_0x47daa8[_0x2a95f1(0x85)],_0x347c4b);const _0x251781=_0x47daa8[_0x2a95f1(0x85)][_0x2a95f1(0xa0)](_0x1e9519=>'\x20\x20'+JSON[_0x2a95f1(0x98)](_0x1e9519));return'[\x0a'+_0x251781[_0x2a95f1(0xa7)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x417c84,_0x12b249={}){const _0x5d3555=a95_0x3d64;if(_0x417c84[_0x5d3555(0x85)][_0x5d3555(0xb1)]===0x0)return'';if(shouldUseColor(_0x12b249))return _0x417c84[_0x5d3555(0x85)][_0x5d3555(0xa0)](_0x468998=>colorizeJSONCompact(_0x468998,_0x12b249))['join']('\x0a');return _0x417c84[_0x5d3555(0x85)]['map'](_0x14a24b=>JSON['stringify'](_0x14a24b))['join']('\x0a');}export function formatAsTSV(_0x4edf99){const _0x37850b=a95_0x3d64;if(_0x4edf99[_0x37850b(0x85)]['length']===0x0)return'';const _0xe71ba2=[],_0x72a934=_0x4edf99[_0x37850b(0x83)][_0x37850b(0xa0)](_0x531108=>_0x531108['name']);return _0xe71ba2[_0x37850b(0x7e)](_0x72a934[_0x37850b(0xa7)]('\x09')),_0x4edf99[_0x37850b(0x85)][_0x37850b(0x8e)](_0x341c4e=>{const _0x170812=_0x37850b,_0x36abac=_0x72a934['map'](_0x295c43=>{const _0x1515c0=_0x341c4e[_0x295c43];return formatValueForTSV(_0x1515c0);});_0xe71ba2[_0x170812(0x7e)](_0x36abac[_0x170812(0xa7)]('\x09'));}),_0xe71ba2['join']('\x0a');}function formatValue(_0x211c77){const _0x2b1b67=a95_0x3d64;if(_0x211c77===null||_0x211c77===undefined)return'';if(typeof _0x211c77===_0x2b1b67(0x7f)){const _0x318611=_0x211c77['replace'](/\n/g,'\x5cn')[_0x2b1b67(0x9c)](/\r/g,'\x5cr')[_0x2b1b67(0x9c)](/\t/g,'\x5ct');return _0x318611;}if(typeof _0x211c77===_0x2b1b67(0x86))return String(_0x211c77);if(typeof _0x211c77===_0x2b1b67(0x9a))return _0x211c77?_0x2b1b67(0x88):_0x2b1b67(0x8c);if(_0x211c77 instanceof Date)return _0x211c77[_0x2b1b67(0x89)]();if(typeof _0x211c77==='object')return JSON[_0x2b1b67(0x98)](_0x211c77);return String(_0x211c77);}function formatValueForTSV(_0x4cf121){const _0x4dfc28=a95_0x3d64;if(_0x4cf121===null||_0x4cf121===undefined)return'';if(typeof _0x4cf121===_0x4dfc28(0x7f))return _0x4cf121[_0x4dfc28(0x9c)](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x4cf121===_0x4dfc28(0x86)||typeof _0x4cf121===_0x4dfc28(0x9a))return String(_0x4cf121);if(_0x4cf121 instanceof Date)return _0x4cf121['toISOString']();if(typeof _0x4cf121==='object')return JSON['stringify'](_0x4cf121);return String(_0x4cf121);}export function formatQueryResult(_0xb244ea,_0x7d5790){const _0x996346=a95_0x3d64;switch(_0x7d5790){case'table':return formatAsTable(_0xb244ea);case _0x996346(0xb2):return formatAsJSON(_0xb244ea);case _0x996346(0x8d):return formatAsJSONL(_0xb244ea);case _0x996346(0xa3):return formatAsTSV(_0xb244ea);default:return formatAsJSON(_0xb244ea);}}export function formatBytes(_0x504c12){const _0x57a260=a95_0x3d64;if(_0x504c12===0x0)return _0x57a260(0x8b);const _0x488656=['B','KB','MB','GB','TB'],_0x55f8d2=0x400,_0x15aa17=Math[_0x57a260(0xaf)](Math[_0x57a260(0x80)](_0x504c12)/Math[_0x57a260(0x80)](_0x55f8d2)),_0x47d3ab=_0x504c12/Math['pow'](_0x55f8d2,_0x15aa17),_0x564a79=_0x47d3ab>=0xa?0x1:0x2;return _0x47d3ab[_0x57a260(0xae)](_0x564a79)+'\x20'+_0x488656[_0x15aa17];}export function formatRows(_0x425feb){const _0x37f739=a95_0x3d64;if(_0x425feb==null)return'-';if(_0x425feb===0x0)return'0';if(_0x425feb<0x3e8)return _0x425feb[_0x37f739(0x94)]();const _0x4e4539=['','K','M','B','T'],_0x553503=0x3e8,_0x1b852f=Math['floor'](Math[_0x37f739(0x80)](_0x425feb)/Math[_0x37f739(0x80)](_0x553503)),_0x513491=_0x425feb/Math[_0x37f739(0x84)](_0x553503,_0x1b852f),_0x143bf8=_0x513491>=0xa?0x1:0x2;return''+_0x513491[_0x37f739(0xae)](_0x143bf8)+_0x4e4539[_0x1b852f];}
@@ -1 +1 @@
1
- (function(_0x3f430c,_0xdcce00){const _0x162e91=a96_0x2569,_0x531dff=_0x3f430c();while(!![]){try{const _0x3b7509=parseInt(_0x162e91(0x1b4))/0x1+parseInt(_0x162e91(0x1b5))/0x2*(-parseInt(_0x162e91(0x1b3))/0x3)+parseInt(_0x162e91(0x1bb))/0x4+parseInt(_0x162e91(0x1af))/0x5+parseInt(_0x162e91(0x1c3))/0x6+parseInt(_0x162e91(0x1b8))/0x7+-parseInt(_0x162e91(0x1b0))/0x8;if(_0x3b7509===_0xdcce00)break;else _0x531dff['push'](_0x531dff['shift']());}catch(_0x482b4b){_0x531dff['push'](_0x531dff['shift']());}}}(a96_0x3780,0xf0c08));import{readFile}from'fs/promises';function a96_0x2569(_0x23843,_0x49b09e){_0x23843=_0x23843-0x1af;const _0x37801f=a96_0x3780();let _0x2569c7=_0x37801f[_0x23843];return _0x2569c7;}import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x348ef3,_0x5ea0c9){const _0x31c67f=a96_0x2569;try{if(_0x5ea0c9){const _0xfe56f4=await readFile(_0x348ef3,'utf-8');try{return JSON[_0x31c67f(0x1c0)](_0xfe56f4);}catch(_0x4b3d0d){throw new SDKError(ErrorCode[_0x31c67f(0x1c1)],_0x31c67f(0x1b9)+_0x348ef3+_0x31c67f(0x1be)+(_0x4b3d0d instanceof Error?_0x4b3d0d[_0x31c67f(0x1bc)]:String(_0x4b3d0d)));}}else try{return JSON['parse'](_0x348ef3);}catch(_0x27d5d1){throw new SDKError(ErrorCode[_0x31c67f(0x1c1)],_0x31c67f(0x1b7)+(_0x27d5d1 instanceof Error?_0x27d5d1[_0x31c67f(0x1bc)]:String(_0x27d5d1)));}}catch(_0x1422d9){if(_0x1422d9 instanceof SDKError)throw _0x1422d9;if(_0x1422d9 instanceof Error&&_0x31c67f(0x1b6)in _0x1422d9){const _0x2556f8=_0x1422d9;if(_0x2556f8['code']===_0x31c67f(0x1b1))throw new SDKError(ErrorCode[_0x31c67f(0x1ba)],'File\x20not\x20found:\x20'+_0x348ef3);else{if(_0x2556f8['code']==='EACCES')throw new SDKError(ErrorCode[_0x31c67f(0x1c2)],_0x31c67f(0x1bf)+_0x348ef3);}}throw new SDKError(ErrorCode['INTERNAL'],_0x31c67f(0x1bd)+(_0x1422d9 instanceof Error?_0x1422d9['message']:String(_0x1422d9)));}}function a96_0x3780(){const _0x2e704d=['8684130jklmeS','6725380YzRVOy','23913720FhbSrO','ENOENT','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','5040813erAIst','900205jvvLVL','2EKOMBv','code','Invalid\x20JSON\x20string:\x20','1163036BYoKGz','Invalid\x20JSON\x20in\x20file\x20\x27','NOT_FOUND','7187288dAwiQA','message','Failed\x20to\x20load\x20JSON:\x20','\x27:\x20','Permission\x20denied\x20reading\x20file:\x20','parse','INVALID_ARGUMENT','PERMISSION_DENIED'];a96_0x3780=function(){return _0x2e704d;};return a96_0x3780();}export async function loadJSONFromOptions(_0x12327b,_0x12efb1){const _0x35f877=a96_0x2569;if(_0x12327b&&_0x12efb1)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x35f877(0x1b2));if(_0x12327b)return await loadJSON(_0x12327b,![]);if(_0x12efb1)return await loadJSON(_0x12efb1,!![]);return undefined;}
1
+ function a96_0x5b46(){const _0x119c2d=['1302VTmfhE','parse','Permission\x20denied\x20reading\x20file:\x20','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','Invalid\x20JSON\x20string:\x20','ENOENT','message','1183115sURsHR','File\x20not\x20found:\x20','EACCES','3873312TocyPl','8279103vrfuiR','\x27:\x20','1434476kDKTep','PERMISSION_DENIED','Failed\x20to\x20load\x20JSON:\x20','code','9828232zBCmts','NOT_FOUND','433350OvvyYb','INVALID_ARGUMENT','124kcUcEO'];a96_0x5b46=function(){return _0x119c2d;};return a96_0x5b46();}(function(_0x47dff3,_0x319723){const _0x43bc99=a96_0xca58,_0x63ea67=_0x47dff3();while(!![]){try{const _0x4dd37e=parseInt(_0x43bc99(0xd1))/0x1+parseInt(_0x43bc99(0xd7))/0x2+-parseInt(_0x43bc99(0xda))/0x3*(-parseInt(_0x43bc99(0xd9))/0x4)+-parseInt(_0x43bc99(0xe1))/0x5+-parseInt(_0x43bc99(0xe4))/0x6+parseInt(_0x43bc99(0xe5))/0x7+-parseInt(_0x43bc99(0xd5))/0x8;if(_0x4dd37e===_0x319723)break;else _0x63ea67['push'](_0x63ea67['shift']());}catch(_0x43c435){_0x63ea67['push'](_0x63ea67['shift']());}}}(a96_0x5b46,0xb3d76));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x197c38,_0x500e6c){const _0x160ec8=a96_0xca58;try{if(_0x500e6c){const _0x3beb5f=await readFile(_0x197c38,'utf-8');try{return JSON[_0x160ec8(0xdb)](_0x3beb5f);}catch(_0x799900){throw new SDKError(ErrorCode[_0x160ec8(0xd8)],'Invalid\x20JSON\x20in\x20file\x20\x27'+_0x197c38+_0x160ec8(0xe6)+(_0x799900 instanceof Error?_0x799900[_0x160ec8(0xe0)]:String(_0x799900)));}}else try{return JSON['parse'](_0x197c38);}catch(_0x628f16){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x160ec8(0xde)+(_0x628f16 instanceof Error?_0x628f16[_0x160ec8(0xe0)]:String(_0x628f16)));}}catch(_0x1cf0b5){if(_0x1cf0b5 instanceof SDKError)throw _0x1cf0b5;if(_0x1cf0b5 instanceof Error&&_0x160ec8(0xd4)in _0x1cf0b5){const _0x5ed5b2=_0x1cf0b5;if(_0x5ed5b2['code']===_0x160ec8(0xdf))throw new SDKError(ErrorCode[_0x160ec8(0xd6)],_0x160ec8(0xe2)+_0x197c38);else{if(_0x5ed5b2['code']===_0x160ec8(0xe3))throw new SDKError(ErrorCode[_0x160ec8(0xd2)],_0x160ec8(0xdc)+_0x197c38);}}throw new SDKError(ErrorCode['INTERNAL'],_0x160ec8(0xd3)+(_0x1cf0b5 instanceof Error?_0x1cf0b5[_0x160ec8(0xe0)]:String(_0x1cf0b5)));}}function a96_0xca58(_0x51ea8a,_0x434631){_0x51ea8a=_0x51ea8a-0xd1;const _0x5b4663=a96_0x5b46();let _0xca58b3=_0x5b4663[_0x51ea8a];return _0xca58b3;}export async function loadJSONFromOptions(_0x2ecb9c,_0x1179dd){const _0x2bb76d=a96_0xca58;if(_0x2ecb9c&&_0x1179dd)throw new SDKError(ErrorCode[_0x2bb76d(0xd8)],_0x2bb76d(0xdd));if(_0x2ecb9c)return await loadJSON(_0x2ecb9c,![]);if(_0x1179dd)return await loadJSON(_0x1179dd,!![]);return undefined;}
@@ -1 +1 @@
1
- function a97_0x656e(){const _0x1d7292=['30679SJdIFw','276904fuPsLH','map','8bIRUvz','1.0','7286062AzgZaG','10QDBXgh','900EDYzZf','get','attributes','12VptzVm','targetKnowledgeBaseId','462547vhGICl','6hMANHz','1059450JORzTd','targetAgentId','tools','2394009hEDVVz','7009672pVgLxm'];a97_0x656e=function(){return _0x1d7292;};return a97_0x656e();}(function(_0x2eab40,_0x41f942){const _0x5df8b8=a97_0x1344,_0x7b20d1=_0x2eab40();while(!![]){try{const _0x58ad0b=parseInt(_0x5df8b8(0x14c))/0x1+-parseInt(_0x5df8b8(0x154))/0x2*(parseInt(_0x5df8b8(0x14a))/0x3)+parseInt(_0x5df8b8(0x152))/0x4+-parseInt(_0x5df8b8(0x14e))/0x5*(-parseInt(_0x5df8b8(0x14d))/0x6)+parseInt(_0x5df8b8(0x145))/0x7*(-parseInt(_0x5df8b8(0x156))/0x8)+-parseInt(_0x5df8b8(0x151))/0x9*(-parseInt(_0x5df8b8(0x146))/0xa)+parseInt(_0x5df8b8(0x153))/0xb*(-parseInt(_0x5df8b8(0x147))/0xc);if(_0x58ad0b===_0x41f942)break;else _0x7b20d1['push'](_0x7b20d1['shift']());}catch(_0x579b72){_0x7b20d1['push'](_0x7b20d1['shift']());}}}(a97_0x656e,0xd90af));export function canCreateAgent(_0x1fdda8,_0x3f0030){const _0x425093=a97_0x1344;for(const _0x27231a of _0x1fdda8[_0x425093(0x149)][_0x425093(0x150)]){if(_0x27231a[_0x425093(0x14f)]&&!_0x3f0030['has'](_0x27231a[_0x425093(0x14f)]))return![];}return!![];}function a97_0x1344(_0x545412,_0x1cd775){_0x545412=_0x545412-0x145;const _0x656e29=a97_0x656e();let _0x1344af=_0x656e29[_0x545412];return _0x1344af;}export function remapToolIds(_0x1a17ae,_0x31f4fd,_0x983dd0){const _0x4d6042=a97_0x1344;return _0x1a17ae[_0x4d6042(0x155)](_0x4d005a=>({..._0x4d005a,'targetKnowledgeBaseId':_0x4d005a[_0x4d6042(0x14b)]?_0x31f4fd[_0x4d6042(0x148)](_0x4d005a[_0x4d6042(0x14b)])||_0x4d005a[_0x4d6042(0x14b)]:undefined,'targetAgentId':_0x4d005a[_0x4d6042(0x14f)]?_0x983dd0['get'](_0x4d005a['targetAgentId'])||_0x4d005a[_0x4d6042(0x14f)]:undefined}));}export function remapVariableIds(_0x137ca2,_0x402326){const _0x5314cc=a97_0x1344;return _0x137ca2[_0x5314cc(0x155)](_0x48fd04=>({..._0x48fd04,'targetKnowledgeBaseId':_0x402326[_0x5314cc(0x148)](_0x48fd04['targetKnowledgeBaseId'])||_0x48fd04[_0x5314cc(0x14b)]}));}export function isSupportedBackupVersion(_0x3f85b5){const _0xf2617=a97_0x1344;return _0x3f85b5===_0xf2617(0x157);}
1
+ (function(_0x1139f6,_0x329c09){const _0x498892=a97_0xcdc5,_0xffd834=_0x1139f6();while(!![]){try{const _0x3f1e8c=parseInt(_0x498892(0xd1))/0x1*(parseInt(_0x498892(0xdd))/0x2)+-parseInt(_0x498892(0xe0))/0x3*(-parseInt(_0x498892(0xd8))/0x4)+-parseInt(_0x498892(0xd4))/0x5+parseInt(_0x498892(0xd3))/0x6+-parseInt(_0x498892(0xe1))/0x7+parseInt(_0x498892(0xdf))/0x8+-parseInt(_0x498892(0xdb))/0x9;if(_0x3f1e8c===_0x329c09)break;else _0xffd834['push'](_0xffd834['shift']());}catch(_0x238827){_0xffd834['push'](_0xffd834['shift']());}}}(a97_0x51df,0x1ec25));export function canCreateAgent(_0x454da6,_0x2641c3){const _0x2fd9e6=a97_0xcdc5;for(const _0x16e1c1 of _0x454da6[_0x2fd9e6(0xde)][_0x2fd9e6(0xd6)]){if(_0x16e1c1[_0x2fd9e6(0xd7)]&&!_0x2641c3[_0x2fd9e6(0xd5)](_0x16e1c1[_0x2fd9e6(0xd7)]))return![];}return!![];}export function remapToolIds(_0x10910a,_0x3481be,_0x46884c){const _0x2e54e0=a97_0xcdc5;return _0x10910a[_0x2e54e0(0xdc)](_0x7d9422=>({..._0x7d9422,'targetKnowledgeBaseId':_0x7d9422[_0x2e54e0(0xda)]?_0x3481be[_0x2e54e0(0xd9)](_0x7d9422[_0x2e54e0(0xda)])||_0x7d9422['targetKnowledgeBaseId']:undefined,'targetAgentId':_0x7d9422[_0x2e54e0(0xd7)]?_0x46884c[_0x2e54e0(0xd9)](_0x7d9422[_0x2e54e0(0xd7)])||_0x7d9422[_0x2e54e0(0xd7)]:undefined}));}export function remapVariableIds(_0x1c6b84,_0x411fe7){const _0x3d6b72=a97_0xcdc5;return _0x1c6b84[_0x3d6b72(0xdc)](_0x18dae8=>({..._0x18dae8,'targetKnowledgeBaseId':_0x411fe7[_0x3d6b72(0xd9)](_0x18dae8[_0x3d6b72(0xda)])||_0x18dae8['targetKnowledgeBaseId']}));}function a97_0x51df(){const _0xd80c1f=['3404FrefSq','get','targetKnowledgeBaseId','2328993dyKDEZ','map','554vQjmpn','attributes','1031984rwDKXe','237NYbzqb','213248IWyDYx','623XyORPy','1.0','1267542zXtSZN','824125AOfhOA','has','tools','targetAgentId'];a97_0x51df=function(){return _0xd80c1f;};return a97_0x51df();}function a97_0xcdc5(_0x7af165,_0x562c2f){_0x7af165=_0x7af165-0xd1;const _0x51df68=a97_0x51df();let _0xcdc5b6=_0x51df68[_0x7af165];return _0xcdc5b6;}export function isSupportedBackupVersion(_0x26225d){const _0x24773d=a97_0xcdc5;return _0x26225d===_0x24773d(0xd2);}
@@ -1 +1 @@
1
- (function(_0x4f6fa2,_0x17e57c){const _0x573880=a98_0xa940,_0x5db9e2=_0x4f6fa2();while(!![]){try{const _0x8935e9=parseInt(_0x573880(0x117))/0x1+-parseInt(_0x573880(0x114))/0x2*(-parseInt(_0x573880(0x10c))/0x3)+-parseInt(_0x573880(0x116))/0x4*(parseInt(_0x573880(0x115))/0x5)+-parseInt(_0x573880(0x112))/0x6*(-parseInt(_0x573880(0x110))/0x7)+parseInt(_0x573880(0x10a))/0x8*(parseInt(_0x573880(0x10b))/0x9)+-parseInt(_0x573880(0x10e))/0xa+parseInt(_0x573880(0x113))/0xb*(parseInt(_0x573880(0x111))/0xc);if(_0x8935e9===_0x17e57c)break;else _0x5db9e2['push'](_0x5db9e2['shift']());}catch(_0x19f946){_0x5db9e2['push'](_0x5db9e2['shift']());}}}(a98_0x28aa,0xc235a));const MODEL_ALIASES={'haiku':'claude-4.5-haiku','sonnet':'claude-4.5-sonnet'};function a98_0xa940(_0x50cb34,_0x1d264a){_0x50cb34=_0x50cb34-0x10a;const _0x28aa8c=a98_0x28aa();let _0xa9401b=_0x28aa8c[_0x50cb34];return _0xa9401b;}export function extractModelAlias(_0x429c4b){const _0x2af9b4=a98_0xa940,_0x312820=_0x429c4b[_0x2af9b4(0x10f)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x312820)return _0x312820[0x1][_0x2af9b4(0x10d)]();return _0x429c4b;}function a98_0x28aa(){const _0x3f0f98=['775775FIXKar','36MtJdSw','30lFKcpa','572396UaCkFY','2IizNHA','182715NYbesw','48UPakpQ','639218SFvfFt','400ssZTyp','71577bfmJOA','1908357ReCPKG','toLowerCase','11492220wZxRJs','match'];a98_0x28aa=function(){return _0x3f0f98;};return a98_0x28aa();}export function resolveModelAlias(_0x43eaab){const _0x268690=a98_0xa940;return MODEL_ALIASES[_0x43eaab[_0x268690(0x10d)]()]||_0x43eaab;}export function getModelAliases(){return{...MODEL_ALIASES};}
1
+ const a98_0x26c229=a98_0xd306;(function(_0x136c45,_0x1464c4){const _0x1c814e=a98_0xd306,_0x1e9ace=_0x136c45();while(!![]){try{const _0x1dd2d3=parseInt(_0x1c814e(0xdc))/0x1*(-parseInt(_0x1c814e(0xd5))/0x2)+-parseInt(_0x1c814e(0xdd))/0x3+-parseInt(_0x1c814e(0xd8))/0x4*(-parseInt(_0x1c814e(0xd6))/0x5)+-parseInt(_0x1c814e(0xd4))/0x6+-parseInt(_0x1c814e(0xda))/0x7+-parseInt(_0x1c814e(0xdb))/0x8*(-parseInt(_0x1c814e(0xd1))/0x9)+-parseInt(_0x1c814e(0xd9))/0xa*(-parseInt(_0x1c814e(0xd3))/0xb);if(_0x1dd2d3===_0x1464c4)break;else _0x1e9ace['push'](_0x1e9ace['shift']());}catch(_0x493abb){_0x1e9ace['push'](_0x1e9ace['shift']());}}}(a98_0x1c67,0x61c1c));function a98_0xd306(_0x277e6d,_0x4b1097){_0x277e6d=_0x277e6d-0xd1;const _0x1c67ac=a98_0x1c67();let _0xd306fd=_0x1c67ac[_0x277e6d];return _0xd306fd;}const MODEL_ALIASES={'haiku':a98_0x26c229(0xd2),'sonnet':'claude-4.5-sonnet'};export function extractModelAlias(_0x3f8fad){const _0x27fa86=a98_0x26c229,_0x1a55c4=_0x3f8fad[_0x27fa86(0xde)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x1a55c4)return _0x1a55c4[0x1][_0x27fa86(0xd7)]();return _0x3f8fad;}export function resolveModelAlias(_0x42df7c){return MODEL_ALIASES[_0x42df7c['toLowerCase']()]||_0x42df7c;}function a98_0x1c67(){const _0x40505d=['claude-4.5-haiku','2285404NnNbrX','2986980tIVrLU','126252MZZBmZ','229210feruas','toLowerCase','8TkQcNR','70JFebUi','1232448LvGhDc','72CnVkDR','10tYlTES','1492209CNTEPG','match','656937pKayFX'];a98_0x1c67=function(){return _0x40505d;};return a98_0x1c67();}export function getModelAliases(){return{...MODEL_ALIASES};}
@@ -1 +1 @@
1
- (function(_0x27d821,_0xa48103){const _0x39d42a=a99_0x398d,_0x111e1e=_0x27d821();while(!![]){try{const _0x325b8e=parseInt(_0x39d42a(0x181))/0x1*(parseInt(_0x39d42a(0x18e))/0x2)+parseInt(_0x39d42a(0x17e))/0x3+-parseInt(_0x39d42a(0x17a))/0x4*(parseInt(_0x39d42a(0x18a))/0x5)+parseInt(_0x39d42a(0x176))/0x6+parseInt(_0x39d42a(0x182))/0x7+parseInt(_0x39d42a(0x17f))/0x8*(-parseInt(_0x39d42a(0x189))/0x9)+parseInt(_0x39d42a(0x180))/0xa*(-parseInt(_0x39d42a(0x179))/0xb);if(_0x325b8e===_0xa48103)break;else _0x111e1e['push'](_0x111e1e['shift']());}catch(_0x14bf2e){_0x111e1e['push'](_0x111e1e['shift']());}}}(a99_0x4c9b,0x9c5a8));export const MODEL_FACTORS={'sonnet':0xa,'claude-4.5-sonnet':0xa,'claude-sonnet-4':0xa,'haiku':3.4,'claude-4.5-haiku':3.4,'claude-haiku-4':3.4,'opus':0xf,'claude-4-opus':0xf,'claude-opus-4':0xf};export const CONTEXT_LIMITS={'sonnet':0x30d40,'haiku':0x30d40,'opus':0x30d40,'default':0x30d40};export function getModelFactor(_0x1a41e0){const _0x303fbb=a99_0x398d,_0x1bb8e7=_0x1a41e0[_0x303fbb(0x18b)]();if(MODEL_FACTORS[_0x1bb8e7])return MODEL_FACTORS[_0x1bb8e7];if(_0x1bb8e7[_0x303fbb(0x188)](_0x303fbb(0x187)))return MODEL_FACTORS[_0x303fbb(0x187)];if(_0x1bb8e7[_0x303fbb(0x188)](_0x303fbb(0x17c)))return MODEL_FACTORS[_0x303fbb(0x17c)];if(_0x1bb8e7[_0x303fbb(0x188)](_0x303fbb(0x17d)))return MODEL_FACTORS[_0x303fbb(0x17d)];return MODEL_FACTORS[_0x303fbb(0x187)];}export function getContextLimit(_0x5ad343){const _0x2ef148=a99_0x398d,_0x128bb5=_0x5ad343['toLowerCase']();if(_0x128bb5[_0x2ef148(0x188)]('sonnet'))return CONTEXT_LIMITS['sonnet'];if(_0x128bb5['includes']('haiku'))return CONTEXT_LIMITS['haiku'];if(_0x128bb5['includes']('opus'))return CONTEXT_LIMITS[_0x2ef148(0x17d)];return CONTEXT_LIMITS['default'];}export function calculateChatUnit(_0x4cdfde,_0x44e685,_0x331c70){return(_0x4cdfde+_0x44e685)/0x1388*_0x331c70;}export function calculateCredits(_0x3f70cc){return _0x3f70cc/0x2904;}function a99_0x398d(_0x318452,_0x58a570){_0x318452=_0x318452-0x175;const _0x4c9bc5=a99_0x4c9b();let _0x398d73=_0x4c9bc5[_0x318452];return _0x398d73;}function a99_0x4c9b(){const _0x482b39=['121MJDDdG','20RbgsPS','Sonnet\x204','haiku','opus','1357011LGraAt','624KIJFsX','237890XvBesi','57qMMsIf','7777637GgkwFY','Sonnet\x204.5','Claude','Opus\x204.5','4-5','sonnet','includes','121239wjHKnf','747815zaJhpw','toLowerCase','4.5','Opus\x204','18004abflIe','round','3744684oBNzyL','en-US','toLocaleString'];a99_0x4c9b=function(){return _0x482b39;};return a99_0x4c9b();}export function getModelDisplayName(_0x35e6fb){const _0xec4ce=a99_0x398d,_0x2c4ca5=_0x35e6fb['toLowerCase']();if(_0x2c4ca5[_0xec4ce(0x188)](_0xec4ce(0x187))){if(_0x2c4ca5[_0xec4ce(0x188)](_0xec4ce(0x186))||_0x2c4ca5[_0xec4ce(0x188)](_0xec4ce(0x18c)))return _0xec4ce(0x183);return _0xec4ce(0x17b);}if(_0x2c4ca5[_0xec4ce(0x188)]('haiku')){if(_0x2c4ca5[_0xec4ce(0x188)](_0xec4ce(0x186))||_0x2c4ca5['includes'](_0xec4ce(0x18c)))return'Haiku\x204.5';return'Haiku\x204';}if(_0x2c4ca5[_0xec4ce(0x188)](_0xec4ce(0x17d))){if(_0x2c4ca5['includes'](_0xec4ce(0x186))||_0x2c4ca5[_0xec4ce(0x188)](_0xec4ce(0x18c)))return _0xec4ce(0x185);return _0xec4ce(0x18d);}return _0xec4ce(0x184);}export function formatTokenCount(_0x54b365){const _0x7032fe=a99_0x398d;return _0x54b365[_0x7032fe(0x178)](_0x7032fe(0x177));}export function calculateContextPercentage(_0x357d30,_0xb8f78f){const _0x3dfc93=a99_0x398d,_0x19260b=getContextLimit(_0xb8f78f);return Math[_0x3dfc93(0x175)](_0x357d30/_0x19260b*0x64);}
1
+ (function(_0x771674,_0x5bb1b2){const _0x166448=a99_0x5176,_0x5a6443=_0x771674();while(!![]){try{const _0x4051fb=parseInt(_0x166448(0x19c))/0x1+-parseInt(_0x166448(0x195))/0x2*(parseInt(_0x166448(0x193))/0x3)+-parseInt(_0x166448(0x190))/0x4+-parseInt(_0x166448(0x19b))/0x5+-parseInt(_0x166448(0x1a0))/0x6*(-parseInt(_0x166448(0x194))/0x7)+parseInt(_0x166448(0x19f))/0x8+-parseInt(_0x166448(0x1a6))/0x9*(parseInt(_0x166448(0x19e))/0xa);if(_0x4051fb===_0x5bb1b2)break;else _0x5a6443['push'](_0x5a6443['shift']());}catch(_0x5c138b){_0x5a6443['push'](_0x5a6443['shift']());}}}(a99_0x4c53,0x57059));export const MODEL_FACTORS={'sonnet':0xa,'claude-4.5-sonnet':0xa,'claude-sonnet-4':0xa,'haiku':3.4,'claude-4.5-haiku':3.4,'claude-haiku-4':3.4,'opus':0xf,'claude-4-opus':0xf,'claude-opus-4':0xf};export const CONTEXT_LIMITS={'sonnet':0x30d40,'haiku':0x30d40,'opus':0x30d40,'default':0x30d40};export function getModelFactor(_0x33f4a4){const _0x4b0478=a99_0x5176,_0x2f857d=_0x33f4a4[_0x4b0478(0x18c)]();if(MODEL_FACTORS[_0x2f857d])return MODEL_FACTORS[_0x2f857d];if(_0x2f857d[_0x4b0478(0x198)](_0x4b0478(0x19a)))return MODEL_FACTORS[_0x4b0478(0x19a)];if(_0x2f857d[_0x4b0478(0x198)](_0x4b0478(0x199)))return MODEL_FACTORS[_0x4b0478(0x199)];if(_0x2f857d['includes'](_0x4b0478(0x196)))return MODEL_FACTORS['opus'];return MODEL_FACTORS[_0x4b0478(0x19a)];}export function getContextLimit(_0x13d234){const _0x1b8314=a99_0x5176,_0x5beb8f=_0x13d234[_0x1b8314(0x18c)]();if(_0x5beb8f[_0x1b8314(0x198)](_0x1b8314(0x19a)))return CONTEXT_LIMITS[_0x1b8314(0x19a)];if(_0x5beb8f[_0x1b8314(0x198)]('haiku'))return CONTEXT_LIMITS[_0x1b8314(0x199)];if(_0x5beb8f[_0x1b8314(0x198)](_0x1b8314(0x196)))return CONTEXT_LIMITS[_0x1b8314(0x196)];return CONTEXT_LIMITS['default'];}export function calculateChatUnit(_0x35f337,_0x2730b2,_0x4652db){return(_0x35f337+_0x2730b2)/0x1388*_0x4652db;}function a99_0x5176(_0x219cf0,_0x58c89f){_0x219cf0=_0x219cf0-0x18c;const _0x4c534f=a99_0x4c53();let _0x517688=_0x4c534f[_0x219cf0];return _0x517688;}export function calculateCredits(_0x3111a8){return _0x3111a8/0x2904;}function a99_0x4c53(){const _0x267f23=['opus','Opus\x204.5','includes','haiku','sonnet','1916395tLqxKm','651860UbGzQp','4-5','3098470tWpPFj','3751472PINfNe','923664YBchmO','Sonnet\x204.5','Opus\x204','en-US','round','Sonnet\x204','9QqNNJO','toLowerCase','4.5','Haiku\x204.5','toLocaleString','94340QmSHQU','Claude','Haiku\x204','66ZeqthV','7dmQbuo','18326XEYCXv'];a99_0x4c53=function(){return _0x267f23;};return a99_0x4c53();}export function getModelDisplayName(_0x4ac771){const _0x1d634c=a99_0x5176,_0x81c45a=_0x4ac771[_0x1d634c(0x18c)]();if(_0x81c45a[_0x1d634c(0x198)]('sonnet')){if(_0x81c45a[_0x1d634c(0x198)]('4-5')||_0x81c45a['includes'](_0x1d634c(0x18d)))return _0x1d634c(0x1a1);return _0x1d634c(0x1a5);}if(_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x199))){if(_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x19d))||_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x18d)))return _0x1d634c(0x18e);return _0x1d634c(0x192);}if(_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x196))){if(_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x19d))||_0x81c45a[_0x1d634c(0x198)](_0x1d634c(0x18d)))return _0x1d634c(0x197);return _0x1d634c(0x1a2);}return _0x1d634c(0x191);}export function formatTokenCount(_0x5eba78){const _0x3c0c68=a99_0x5176;return _0x5eba78[_0x3c0c68(0x18f)](_0x3c0c68(0x1a3));}export function calculateContextPercentage(_0x5348ce,_0x5470b8){const _0x1aec75=a99_0x5176,_0x2719de=getContextLimit(_0x5470b8);return Math[_0x1aec75(0x1a4)](_0x5348ce/_0x2719de*0x64);}
@@ -1 +1 @@
1
- (function(_0x2f273c,_0x4cb398){const _0x145946=a100_0x5868,_0x6586f7=_0x2f273c();while(!![]){try{const _0x13355d=parseInt(_0x145946(0xa3))/0x1+-parseInt(_0x145946(0x9d))/0x2*(parseInt(_0x145946(0xa4))/0x3)+parseInt(_0x145946(0x9e))/0x4*(-parseInt(_0x145946(0xa6))/0x5)+-parseInt(_0x145946(0xa1))/0x6+-parseInt(_0x145946(0xa0))/0x7+-parseInt(_0x145946(0x99))/0x8+parseInt(_0x145946(0xa7))/0x9*(parseInt(_0x145946(0x98))/0xa);if(_0x13355d===_0x4cb398)break;else _0x6586f7['push'](_0x6586f7['shift']());}catch(_0x42ccc9){_0x6586f7['push'](_0x6586f7['shift']());}}}(a100_0x34ae,0x8bb44));function a100_0x5868(_0x2896e6,_0x4f51e1){_0x2896e6=_0x2896e6-0x98;const _0x34aea0=a100_0x34ae();let _0x58686f=_0x34aea0[_0x2896e6];return _0x58686f;}function a100_0x34ae(){const _0x2fd6ef=['52RojwVT','.\x20Must\x20be\x20a\x20number.','452256JioBZr','6400674ImKxvE','isInteger','1052722hLquYO','9330fubevv','number','61185tUkloR','36PvkVEI','.\x20Must\x20be\x20a\x20positive\x20integer.','4461550PbNQGk','3866128Kfblmh','Invalid\x20limit\x20value:\x20','Invalid\x20timeout\x20value:\x20','.\x20Must\x20be\x20an\x20integer.','316QMNITM'];a100_0x34ae=function(){return _0x2fd6ef;};return a100_0x34ae();}export function validateLimitOption(_0x186484){const _0x439fa2=a100_0x5868;if(!Number[_0x439fa2(0xa2)](_0x186484))return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x186484+_0x439fa2(0x9c)};if(_0x186484<=0x0)return{'isValid':![],'error':_0x439fa2(0x9a)+_0x186484+_0x439fa2(0xa8)};return{'isValid':!![],'value':_0x186484};}export function validateTimeoutOption(_0x2fcb6c,_0x4c7a05=0x1e){const _0x4c3542=a100_0x5868;if(_0x2fcb6c===undefined)return{'isValid':!![],'value':_0x4c7a05};const _0x3b5930=typeof _0x2fcb6c===_0x4c3542(0xa5)?_0x2fcb6c:parseFloat(_0x2fcb6c);if(isNaN(_0x3b5930))return{'isValid':![],'error':_0x4c3542(0x9b)+_0x2fcb6c+_0x4c3542(0x9f)};if(_0x3b5930<=0x0)return{'isValid':![],'error':_0x4c3542(0x9b)+_0x3b5930+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x3b5930};}
1
+ function a100_0x1eec(_0x5ee1d1,_0x5cc316){_0x5ee1d1=_0x5ee1d1-0x192;const _0x3bca3a=a100_0x3bca();let _0x1eec02=_0x3bca3a[_0x5ee1d1];return _0x1eec02;}(function(_0x19c876,_0x217575){const _0x171503=a100_0x1eec,_0x41c3d8=_0x19c876();while(!![]){try{const _0x56fc27=-parseInt(_0x171503(0x1a2))/0x1*(-parseInt(_0x171503(0x194))/0x2)+parseInt(_0x171503(0x19c))/0x3+parseInt(_0x171503(0x1a3))/0x4*(-parseInt(_0x171503(0x19d))/0x5)+parseInt(_0x171503(0x193))/0x6*(-parseInt(_0x171503(0x19b))/0x7)+-parseInt(_0x171503(0x195))/0x8*(-parseInt(_0x171503(0x19a))/0x9)+parseInt(_0x171503(0x1a1))/0xa*(-parseInt(_0x171503(0x199))/0xb)+parseInt(_0x171503(0x198))/0xc*(parseInt(_0x171503(0x196))/0xd);if(_0x56fc27===_0x217575)break;else _0x41c3d8['push'](_0x41c3d8['shift']());}catch(_0x709456){_0x41c3d8['push'](_0x41c3d8['shift']());}}}(a100_0x3bca,0x23d74));export function validateLimitOption(_0x3ee19a){const _0x54ca80=a100_0x1eec;if(!Number['isInteger'](_0x3ee19a))return{'isValid':![],'error':_0x54ca80(0x19e)+_0x3ee19a+_0x54ca80(0x192)};if(_0x3ee19a<=0x0)return{'isValid':![],'error':_0x54ca80(0x19e)+_0x3ee19a+_0x54ca80(0x1a0)};return{'isValid':!![],'value':_0x3ee19a};}export function validateTimeoutOption(_0x16a0de,_0x19dfe4=0x1e){const _0x19de96=a100_0x1eec;if(_0x16a0de===undefined)return{'isValid':!![],'value':_0x19dfe4};const _0x136938=typeof _0x16a0de===_0x19de96(0x19f)?_0x16a0de:parseFloat(_0x16a0de);if(isNaN(_0x136938))return{'isValid':![],'error':_0x19de96(0x1a4)+_0x16a0de+_0x19de96(0x197)};if(_0x136938<=0x0)return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x136938+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x136938};}function a100_0x3bca(){const _0x17368e=['11112HwmyXC','2750PONvdU','16UUtOBo','5616aoRsKc','.\x20Must\x20be\x20a\x20number.','4476abRoFY','773102VpZkAS','963639JvdUGQ','469LenPlk','377511YroWCk','1280uogOIA','Invalid\x20limit\x20value:\x20','number','.\x20Must\x20be\x20a\x20positive\x20integer.','10ZMVbXq','41hGAWFM','3380mPtCJt','Invalid\x20timeout\x20value:\x20','.\x20Must\x20be\x20an\x20integer.'];a100_0x3bca=function(){return _0x17368e;};return a100_0x3bca();}
@@ -1 +1 @@
1
- (function(_0x4da9f9,_0x25bf1c){const _0x4fcd54=a101_0x58f4,_0x30e0b5=_0x4da9f9();while(!![]){try{const _0x335efc=-parseInt(_0x4fcd54(0x100))/0x1+parseInt(_0x4fcd54(0xfe))/0x2*(parseInt(_0x4fcd54(0x104))/0x3)+parseInt(_0x4fcd54(0x108))/0x4+-parseInt(_0x4fcd54(0x102))/0x5+parseInt(_0x4fcd54(0x10a))/0x6+parseInt(_0x4fcd54(0x10e))/0x7*(-parseInt(_0x4fcd54(0x101))/0x8)+parseInt(_0x4fcd54(0x10d))/0x9;if(_0x335efc===_0x25bf1c)break;else _0x30e0b5['push'](_0x30e0b5['shift']());}catch(_0x40471d){_0x30e0b5['push'](_0x30e0b5['shift']());}}}(a101_0x3bb4,0xc67db));import{createServer}from'node:net';function a101_0x3bb4(){const _0x507f64=['10194GzkbMs','once','close','error','306048YPAfxb','\x20and\x20','1962618SdKzOf','0.0.0.0','No\x20available\x20port\x20found\x20between\x20','6132132qgybLK','6883485mJgPbo','526gpUwIE','code','39588rOzzvY','8NoQxch','713375XqYhEQ','EADDRINUSE'];a101_0x3bb4=function(){return _0x507f64;};return a101_0x3bb4();}function a101_0x58f4(_0x321332,_0x43fec6){_0x321332=_0x321332-0xfe;const _0x3bb428=a101_0x3bb4();let _0x58f4eb=_0x3bb428[_0x321332];return _0x58f4eb;}export async function isPortAvailable(_0x27f1fb){return new Promise(_0x3a2841=>{const _0xc1f885=a101_0x58f4,_0x36e943=createServer();_0x36e943[_0xc1f885(0x105)](_0xc1f885(0x107),_0xa16b4a=>{const _0x1c9333=_0xc1f885;_0xa16b4a[_0x1c9333(0xff)]===_0x1c9333(0x103)?_0x3a2841(![]):_0x3a2841(![]);}),_0x36e943[_0xc1f885(0x105)]('listening',()=>{const _0x4f72a8=_0xc1f885;_0x36e943[_0x4f72a8(0x106)](),_0x3a2841(!![]);}),_0x36e943['listen'](_0x27f1fb,_0xc1f885(0x10b));});}export async function findAvailablePort(_0x3731ee=0xfa0,_0x54ac1b=0x64){const _0x66d2ec=a101_0x58f4;for(let _0x4cb8ec=0x0;_0x4cb8ec<_0x54ac1b;_0x4cb8ec++){const _0x9a7ee8=_0x3731ee+_0x4cb8ec;if(await isPortAvailable(_0x9a7ee8))return _0x9a7ee8;}throw new Error(_0x66d2ec(0x10c)+_0x3731ee+_0x66d2ec(0x109)+(_0x3731ee+_0x54ac1b-0x1));}
1
+ (function(_0x528eb7,_0x31120a){const _0x5b7268=a101_0x1364,_0x2836c1=_0x528eb7();while(!![]){try{const _0x30394a=parseInt(_0x5b7268(0x7e))/0x1*(parseInt(_0x5b7268(0x7a))/0x2)+parseInt(_0x5b7268(0x81))/0x3+-parseInt(_0x5b7268(0x82))/0x4*(parseInt(_0x5b7268(0x7b))/0x5)+-parseInt(_0x5b7268(0x77))/0x6*(-parseInt(_0x5b7268(0x73))/0x7)+parseInt(_0x5b7268(0x75))/0x8+-parseInt(_0x5b7268(0x74))/0x9*(parseInt(_0x5b7268(0x7f))/0xa)+-parseInt(_0x5b7268(0x80))/0xb;if(_0x30394a===_0x31120a)break;else _0x2836c1['push'](_0x2836c1['shift']());}catch(_0x32f0df){_0x2836c1['push'](_0x2836c1['shift']());}}}(a101_0x1897,0xdd6b2));import{createServer}from'node:net';export async function isPortAvailable(_0x4fe4e7){return new Promise(_0x113109=>{const _0x569871=a101_0x1364,_0x5471d6=createServer();_0x5471d6[_0x569871(0x7c)](_0x569871(0x7d),_0xca1214=>{const _0x5d5fb6=_0x569871;_0xca1214[_0x5d5fb6(0x79)]===_0x5d5fb6(0x78)?_0x113109(![]):_0x113109(![]);}),_0x5471d6[_0x569871(0x7c)]('listening',()=>{_0x5471d6['close'](),_0x113109(!![]);}),_0x5471d6[_0x569871(0x83)](_0x4fe4e7,_0x569871(0x76));});}function a101_0x1364(_0x32084c,_0x591785){_0x32084c=_0x32084c-0x72;const _0x18977e=a101_0x1897();let _0x13644c=_0x18977e[_0x32084c];return _0x13644c;}function a101_0x1897(){const _0x48a907=['7939295wtlaAT','7236819VlIhks','416608RBIpxZ','0.0.0.0','6pqoHVd','EADDRINUSE','code','469774PNCSQX','581190VmQIDw','once','error','5BcbTNb','10CzdawB','6009575thMdHs','2828376qleZCq','36JEPLzi','listen','No\x20available\x20port\x20found\x20between\x20'];a101_0x1897=function(){return _0x48a907;};return a101_0x1897();}export async function findAvailablePort(_0x5205f8=0xfa0,_0x4109c5=0x64){const _0x2d8c43=a101_0x1364;for(let _0x2930af=0x0;_0x2930af<_0x4109c5;_0x2930af++){const _0x59cdd4=_0x5205f8+_0x2930af;if(await isPortAvailable(_0x59cdd4))return _0x59cdd4;}throw new Error(_0x2d8c43(0x72)+_0x5205f8+'\x20and\x20'+(_0x5205f8+_0x4109c5-0x1));}
@@ -1 +1 @@
1
- const a102_0xde137f=a102_0x2f27;function a102_0x3c76(){const _0x32deb9=['pop','split','xonsh','filter','1819677yPmxfH','toLowerCase','has','\x20on\x20POSIX:','elvish','trim','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','pwsh',')\x20spawned\x20by\x20','500325kKnqKk','DEBUG','code','utf-8','dash','length','\x20get\x20ParentProcessId,Name\x20/format:csv','comm','bash','1625211nszWCy','kill','claude','tcsh','100nOzFgC','84HVvyrq','pid','error','csh','\x20-o\x20ppid=,comm=','8dJifsB','14052918TEGymY','\x20on\x20Windows:','env','platform','14NNMeyc','Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20','24EOPMVz','wmic\x20process\x20where\x20ProcessId=','4950896GSFhGC','ps\x20-p\x20','replace','678537rkCuOC',',\x20continuing\x20up',',\x20using\x20fallback','ppid','ion','2245502RdbRFQ'];a102_0x3c76=function(){return _0x32deb9;};return a102_0x3c76();}(function(_0x5980d0,_0x12920a){const _0x53ab50=a102_0x2f27,_0x6759c=_0x5980d0();while(!![]){try{const _0x4f9771=parseInt(_0x53ab50(0x157))/0x1+-parseInt(_0x53ab50(0x172))/0x2+-parseInt(_0x53ab50(0x145))/0x3*(-parseInt(_0x53ab50(0x161))/0x4)+parseInt(_0x53ab50(0x14e))/0x5*(-parseInt(_0x53ab50(0x15c))/0x6)+parseInt(_0x53ab50(0x166))/0x7*(-parseInt(_0x53ab50(0x16a))/0x8)+parseInt(_0x53ab50(0x16d))/0x9*(-parseInt(_0x53ab50(0x15b))/0xa)+-parseInt(_0x53ab50(0x162))/0xb*(-parseInt(_0x53ab50(0x168))/0xc);if(_0x4f9771===_0x12920a)break;else _0x6759c['push'](_0x6759c['shift']());}catch(_0x403a7a){_0x6759c['push'](_0x6759c['shift']());}}}(a102_0x3c76,0xd660a));import{execSync}from'node:child_process';const SHELL_NAMES=new Set([a102_0xde137f(0x156),'zsh','sh','fish','ksh',a102_0xde137f(0x15a),a102_0xde137f(0x15f),a102_0xde137f(0x152),a102_0xde137f(0x14c),'powershell','nu',a102_0xde137f(0x171),a102_0xde137f(0x149),a102_0xde137f(0x143)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a102_0xde137f(0x159),a102_0xde137f(0x150),'cursor']);function getProcessInfoWindows(_0x5c09fe){const _0xe5f947=a102_0xde137f;try{const _0x50c926=execSync(_0xe5f947(0x169)+_0x5c09fe+_0xe5f947(0x154),{'encoding':_0xe5f947(0x151),'windowsHide':!![]})[_0xe5f947(0x14a)](),_0xae2d4=_0x50c926['split']('\x0a')[_0xe5f947(0x144)](_0x5acf7e=>_0x5acf7e[_0xe5f947(0x14a)]());if(_0xae2d4[_0xe5f947(0x153)]<0x2)return null;const _0x30fc8c=_0xae2d4[_0xae2d4[_0xe5f947(0x153)]-0x1][_0xe5f947(0x142)](',');if(_0x30fc8c[_0xe5f947(0x153)]<0x3)return null;const _0x27f8b6=_0x30fc8c[0x1]?.[_0xe5f947(0x14a)]()||'',_0x17f1f4=parseInt(_0x30fc8c[0x2]?.[_0xe5f947(0x14a)]()||'0',0xa);if(isNaN(_0x17f1f4)||!_0x27f8b6)return null;return{'pid':_0x5c09fe,'ppid':_0x17f1f4,'comm':_0x27f8b6[_0xe5f947(0x16c)](/\.exe$/i,'')};}catch(_0x587fba){return process[_0xe5f947(0x164)][_0xe5f947(0x14f)]&&console[_0xe5f947(0x15e)](_0xe5f947(0x14b)+_0x5c09fe+_0xe5f947(0x163),_0x587fba),null;}}function getProcessInfoPosix(_0x53092b){const _0xc6290b=a102_0xde137f;try{const _0x599a2f=execSync(_0xc6290b(0x16b)+_0x53092b+_0xc6290b(0x160),{'encoding':_0xc6290b(0x151)})[_0xc6290b(0x14a)](),[_0x258c5b,..._0xcc4276]=_0x599a2f['split'](/\s+/),_0x48d433=parseInt(_0x258c5b,0xa),_0x2fbae4=_0xcc4276['join']('\x20');if(isNaN(_0x48d433))return null;return{'pid':_0x53092b,'ppid':_0x48d433,'comm':_0x2fbae4};}catch(_0x54ec3b){return process[_0xc6290b(0x164)][_0xc6290b(0x14f)]&&console['error'](_0xc6290b(0x14b)+_0x53092b+_0xc6290b(0x148),_0x54ec3b),null;}}function getProcessInfo(_0x5da282){const _0x25ed85=a102_0xde137f;if(process[_0x25ed85(0x165)]==='win32')return getProcessInfoWindows(_0x5da282);return getProcessInfoPosix(_0x5da282);}function getBasename(_0x1981eb){const _0x39e2a6=a102_0xde137f;return _0x1981eb[_0x39e2a6(0x16c)](/^-/,'')[_0x39e2a6(0x142)]('/')[_0x39e2a6(0x141)]()?.[_0x39e2a6(0x146)]()||'';}function a102_0x2f27(_0x1895f1,_0x5ae280){_0x1895f1=_0x1895f1-0x141;const _0x3c76de=a102_0x3c76();let _0x2f2741=_0x3c76de[_0x1895f1];return _0x2f2741;}function isShell(_0x253b71){const _0x4d4f2a=a102_0xde137f;return SHELL_NAMES[_0x4d4f2a(0x147)](getBasename(_0x253b71));}function isEphemeralShellSpawner(_0x30162c){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x30162c));}let cachedShellPID;function findShellPID(){const _0x42c87f=a102_0xde137f;let _0x337e6a=process[_0x42c87f(0x170)];const _0x3fc487=0xa;let _0x238339=0x0;while(_0x238339<_0x3fc487){const _0x372a7a=getProcessInfo(_0x337e6a);if(!_0x372a7a){process[_0x42c87f(0x164)][_0x42c87f(0x14f)]&&console[_0x42c87f(0x15e)](_0x42c87f(0x167)+_0x337e6a+_0x42c87f(0x16f));break;}if(isShell(_0x372a7a['comm'])){const _0x5b7f5f=getProcessInfo(_0x372a7a[_0x42c87f(0x170)]);if(_0x5b7f5f&&isEphemeralShellSpawner(_0x5b7f5f[_0x42c87f(0x155)])){process[_0x42c87f(0x164)]['DEBUG']&&console[_0x42c87f(0x15e)]('Found\x20ephemeral\x20shell\x20'+_0x372a7a[_0x42c87f(0x15d)]+'\x20('+_0x372a7a['comm']+_0x42c87f(0x14d)+_0x5b7f5f[_0x42c87f(0x155)]+_0x42c87f(0x16e));_0x337e6a=_0x372a7a['ppid'],_0x238339++;continue;}return _0x372a7a[_0x42c87f(0x15d)];}if(_0x372a7a[_0x42c87f(0x170)]===0x0||_0x372a7a[_0x42c87f(0x170)]===0x1){if(isShell(_0x372a7a[_0x42c87f(0x155)]))return _0x372a7a[_0x42c87f(0x15d)];break;}_0x337e6a=_0x372a7a[_0x42c87f(0x170)],_0x238339++;}return process[_0x42c87f(0x164)][_0x42c87f(0x14f)]&&console[_0x42c87f(0x15e)]('No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid'),process[_0x42c87f(0x170)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x22c115){const _0x3f0e9e=a102_0xde137f;try{return process[_0x3f0e9e(0x158)](_0x22c115,0x0),!![];}catch{return![];}}
1
+ const a102_0x5aeca1=a102_0xf741;(function(_0x37be19,_0x14b87c){const _0xffa7f5=a102_0xf741,_0xe828c9=_0x37be19();while(!![]){try{const _0x3bd3f6=parseInt(_0xffa7f5(0x1e4))/0x1*(-parseInt(_0xffa7f5(0x1eb))/0x2)+-parseInt(_0xffa7f5(0x1d1))/0x3*(parseInt(_0xffa7f5(0x1d7))/0x4)+-parseInt(_0xffa7f5(0x1dc))/0x5*(parseInt(_0xffa7f5(0x1de))/0x6)+-parseInt(_0xffa7f5(0x1e6))/0x7+-parseInt(_0xffa7f5(0x1c5))/0x8+parseInt(_0xffa7f5(0x1db))/0x9+parseInt(_0xffa7f5(0x1c9))/0xa;if(_0x3bd3f6===_0x14b87c)break;else _0xe828c9['push'](_0xe828c9['shift']());}catch(_0x7f2305){_0xe828c9['push'](_0xe828c9['shift']());}}}(a102_0x4197,0xad9ce));import{execSync}from'node:child_process';const SHELL_NAMES=new Set(['bash',a102_0x5aeca1(0x1dd),'sh',a102_0x5aeca1(0x1e7),a102_0x5aeca1(0x1c6),'tcsh',a102_0x5aeca1(0x1d2),a102_0x5aeca1(0x1e5),'pwsh',a102_0x5aeca1(0x1d8),'nu',a102_0x5aeca1(0x1e0),'elvish',a102_0x5aeca1(0x1cb)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a102_0x5aeca1(0x1cd),a102_0x5aeca1(0x1e2),a102_0x5aeca1(0x1e8)]);function getProcessInfoWindows(_0x339c60){const _0x1bb0e1=a102_0x5aeca1;try{const _0x176565=execSync(_0x1bb0e1(0x1d4)+_0x339c60+_0x1bb0e1(0x1df),{'encoding':_0x1bb0e1(0x1d9),'windowsHide':!![]})[_0x1bb0e1(0x1ee)](),_0x2d83cd=_0x176565[_0x1bb0e1(0x1c3)]('\x0a')['filter'](_0x10e7fb=>_0x10e7fb['trim']());if(_0x2d83cd[_0x1bb0e1(0x1ce)]<0x2)return null;const _0x119859=_0x2d83cd[_0x2d83cd[_0x1bb0e1(0x1ce)]-0x1]['split'](',');if(_0x119859[_0x1bb0e1(0x1ce)]<0x3)return null;const _0x39f4d1=_0x119859[0x1]?.[_0x1bb0e1(0x1ee)]()||'',_0x1a222a=parseInt(_0x119859[0x2]?.[_0x1bb0e1(0x1ee)]()||'0',0xa);if(isNaN(_0x1a222a)||!_0x39f4d1)return null;return{'pid':_0x339c60,'ppid':_0x1a222a,'comm':_0x39f4d1['replace'](/\.exe$/i,'')};}catch(_0x40e65d){return process[_0x1bb0e1(0x1e9)]['DEBUG']&&console[_0x1bb0e1(0x1cc)]('Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20'+_0x339c60+_0x1bb0e1(0x1ec),_0x40e65d),null;}}function a102_0xf741(_0x10997e,_0x47f6a9){_0x10997e=_0x10997e-0x1c1;const _0x419733=a102_0x4197();let _0xf741b3=_0x419733[_0x10997e];return _0xf741b3;}function getProcessInfoPosix(_0xaf3f1d){const _0x37965d=a102_0x5aeca1;try{const _0x55466d=execSync(_0x37965d(0x1ef)+_0xaf3f1d+_0x37965d(0x1c1),{'encoding':_0x37965d(0x1d9)})['trim'](),[_0x3a4938,..._0x2bbc47]=_0x55466d[_0x37965d(0x1c3)](/\s+/),_0x5e1f6d=parseInt(_0x3a4938,0xa),_0x54a660=_0x2bbc47[_0x37965d(0x1c7)]('\x20');if(isNaN(_0x5e1f6d))return null;return{'pid':_0xaf3f1d,'ppid':_0x5e1f6d,'comm':_0x54a660};}catch(_0x3e235c){return process[_0x37965d(0x1e9)][_0x37965d(0x1e1)]&&console['error'](_0x37965d(0x1d5)+_0xaf3f1d+_0x37965d(0x1f0),_0x3e235c),null;}}function getProcessInfo(_0xcdc554){const _0x55ab35=a102_0x5aeca1;if(process[_0x55ab35(0x1c8)]==='win32')return getProcessInfoWindows(_0xcdc554);return getProcessInfoPosix(_0xcdc554);}function getBasename(_0x39e784){const _0x5513bd=a102_0x5aeca1;return _0x39e784[_0x5513bd(0x1c2)](/^-/,'')['split']('/')[_0x5513bd(0x1d6)]()?.[_0x5513bd(0x1cf)]()||'';}function isShell(_0x5916e8){const _0x213d62=a102_0x5aeca1;return SHELL_NAMES[_0x213d62(0x1ea)](getBasename(_0x5916e8));}function isEphemeralShellSpawner(_0x46d53e){const _0x47ff44=a102_0x5aeca1;return EPHEMERAL_SHELL_SPAWNERS[_0x47ff44(0x1ea)](getBasename(_0x46d53e));}let cachedShellPID;function findShellPID(){const _0x47a96e=a102_0x5aeca1;let _0x26f585=process['ppid'];const _0x2bd007=0xa;let _0x55cdb9=0x0;while(_0x55cdb9<_0x2bd007){const _0x245a5f=getProcessInfo(_0x26f585);if(!_0x245a5f){process[_0x47a96e(0x1e9)]['DEBUG']&&console[_0x47a96e(0x1cc)](_0x47a96e(0x1c4)+_0x26f585+_0x47a96e(0x1e3));break;}if(isShell(_0x245a5f[_0x47a96e(0x1ca)])){const _0x3a9ff3=getProcessInfo(_0x245a5f[_0x47a96e(0x1d3)]);if(_0x3a9ff3&&isEphemeralShellSpawner(_0x3a9ff3['comm'])){process[_0x47a96e(0x1e9)][_0x47a96e(0x1e1)]&&console[_0x47a96e(0x1cc)]('Found\x20ephemeral\x20shell\x20'+_0x245a5f[_0x47a96e(0x1d0)]+'\x20('+_0x245a5f[_0x47a96e(0x1ca)]+_0x47a96e(0x1da)+_0x3a9ff3[_0x47a96e(0x1ca)]+',\x20continuing\x20up');_0x26f585=_0x245a5f[_0x47a96e(0x1d3)],_0x55cdb9++;continue;}return _0x245a5f['pid'];}if(_0x245a5f[_0x47a96e(0x1d3)]===0x0||_0x245a5f[_0x47a96e(0x1d3)]===0x1){if(isShell(_0x245a5f['comm']))return _0x245a5f['pid'];break;}_0x26f585=_0x245a5f[_0x47a96e(0x1d3)],_0x55cdb9++;}return process[_0x47a96e(0x1e9)][_0x47a96e(0x1e1)]&&console[_0x47a96e(0x1cc)]('No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid'),process[_0x47a96e(0x1d3)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x1a8b5d){const _0x46c011=a102_0x5aeca1;try{return process[_0x46c011(0x1ed)](_0x1a8b5d,0x0),!![];}catch{return![];}}function a102_0x4197(){const _0x2c8777=['env','has','1129006UgdCzg','\x20on\x20Windows:','kill','trim','ps\x20-p\x20','\x20on\x20POSIX:','\x20-o\x20ppid=,comm=','replace','split','Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20','2939488TzdcTV','ksh','join','platform','26060830xJnxHp','comm','xonsh','error','claude','length','toLowerCase','pid','6kLjzVN','csh','ppid','wmic\x20process\x20where\x20ProcessId=','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','pop','2063328qpFEZX','powershell','utf-8',')\x20spawned\x20by\x20','12182796OnsZIl','22840YYIJdw','zsh','36PUfiRO','\x20get\x20ParentProcessId,Name\x20/format:csv','ion','DEBUG','code',',\x20using\x20fallback','2jtSmen','dash','4851665gNQLXZ','fish','cursor'];a102_0x4197=function(){return _0x2c8777;};return a102_0x4197();}
@@ -1 +1 @@
1
- function a103_0x5e27(_0x2d3410,_0x4c14a6){_0x2d3410=_0x2d3410-0x142;const _0x46b756=a103_0x46b7();let _0x5e277d=_0x46b756[_0x2d3410];return _0x5e277d;}(function(_0x6aaeb1,_0x429649){const _0x127d3d=a103_0x5e27,_0x450bd3=_0x6aaeb1();while(!![]){try{const _0x5e3405=-parseInt(_0x127d3d(0x144))/0x1*(parseInt(_0x127d3d(0x157))/0x2)+-parseInt(_0x127d3d(0x14e))/0x3+parseInt(_0x127d3d(0x14d))/0x4*(parseInt(_0x127d3d(0x15f))/0x5)+parseInt(_0x127d3d(0x152))/0x6*(parseInt(_0x127d3d(0x142))/0x7)+-parseInt(_0x127d3d(0x160))/0x8*(parseInt(_0x127d3d(0x151))/0x9)+parseInt(_0x127d3d(0x150))/0xa*(parseInt(_0x127d3d(0x14a))/0xb)+-parseInt(_0x127d3d(0x14b))/0xc*(-parseInt(_0x127d3d(0x156))/0xd);if(_0x5e3405===_0x429649)break;else _0x450bd3['push'](_0x450bd3['shift']());}catch(_0x59bf81){_0x450bd3['push'](_0x450bd3['shift']());}}}(a103_0x46b7,0x39ccb));import*as a103_0x471be0 from'readline';export async function confirm(_0x1fffde){const _0x1bc905=a103_0x5e27,_0x45b0ea=a103_0x471be0[_0x1bc905(0x153)]({'input':process[_0x1bc905(0x14f)],'output':process[_0x1bc905(0x145)]});return new Promise(_0x431088=>{const _0x172de3=_0x1bc905;_0x45b0ea[_0x172de3(0x146)](_0x1fffde+'\x20(y/N):\x20',_0x2ec3a6=>{const _0x5ac1cc=_0x172de3;_0x45b0ea[_0x5ac1cc(0x154)](),_0x431088(_0x2ec3a6[_0x5ac1cc(0x15c)]()==='y'||_0x2ec3a6[_0x5ac1cc(0x15c)]()===_0x5ac1cc(0x149));});});}function a103_0x46b7(){const _0x1de8cd=['exit','data','toLowerCase','setRawMode','isTTY','5oUFLbw','208xPGRoY','7MeYhvS','write','2MlnBLV','stdout','question','\x20[y/N]\x20','stderr','yes','1309hAyvjO','60iBhLxn','pause','1881052HEpnIV','755532ywJPBC','stdin','6980NPOgad','116064FRqTNq','1570782zinxMy','createInterface','close','setEncoding','303797hDlKHd','108080BjSXYJ','resume','removeListener'];a103_0x46b7=function(){return _0x1de8cd;};return a103_0x46b7();}export async function confirmKey(_0x3f644d){const _0x30a879=a103_0x5e27;if(!process['stdin'][_0x30a879(0x15e)])return![];return process[_0x30a879(0x148)]['write'](_0x3f644d+_0x30a879(0x147)),new Promise(_0x2fbb38=>{const _0x40f5d0=_0x30a879,_0x5f17c8=process[_0x40f5d0(0x14f)];_0x5f17c8[_0x40f5d0(0x15d)](!![]),_0x5f17c8[_0x40f5d0(0x158)](),_0x5f17c8[_0x40f5d0(0x155)]('utf8');const _0x45af61=_0x7fbd1d=>{const _0x2b8612=_0x40f5d0;_0x5f17c8[_0x2b8612(0x15d)](![]),_0x5f17c8[_0x2b8612(0x14c)](),_0x5f17c8[_0x2b8612(0x159)](_0x2b8612(0x15b),_0x45af61);if(_0x7fbd1d==='\x1b'){process['stderr']['write']('\x0a'),_0x2fbb38(![]);return;}_0x7fbd1d==='\x03'&&(process[_0x2b8612(0x148)][_0x2b8612(0x143)]('\x0a'),process[_0x2b8612(0x15a)](0x82));if(_0x7fbd1d[_0x2b8612(0x15c)]()==='y'){process[_0x2b8612(0x148)][_0x2b8612(0x143)]('y\x0a'),_0x2fbb38(!![]);return;}process['stderr']['write']('\x0a'),_0x2fbb38(![]);};_0x5f17c8['on'](_0x40f5d0(0x15b),_0x45af61);});}
1
+ (function(_0x1dc048,_0x2503e3){const _0x1db0c0=a103_0x537a,_0xd9237e=_0x1dc048();while(!![]){try{const _0x4e9041=-parseInt(_0x1db0c0(0x102))/0x1*(-parseInt(_0x1db0c0(0xfc))/0x2)+-parseInt(_0x1db0c0(0x110))/0x3+parseInt(_0x1db0c0(0x10e))/0x4*(parseInt(_0x1db0c0(0x101))/0x5)+-parseInt(_0x1db0c0(0x112))/0x6+-parseInt(_0x1db0c0(0x113))/0x7*(-parseInt(_0x1db0c0(0x103))/0x8)+parseInt(_0x1db0c0(0xff))/0x9*(-parseInt(_0x1db0c0(0x107))/0xa)+parseInt(_0x1db0c0(0xfe))/0xb;if(_0x4e9041===_0x2503e3)break;else _0xd9237e['push'](_0xd9237e['shift']());}catch(_0x66a59a){_0xd9237e['push'](_0xd9237e['shift']());}}}(a103_0x613f,0xe50fa));function a103_0x537a(_0x20dcb7,_0x305b3e){_0x20dcb7=_0x20dcb7-0xfc;const _0x613f45=a103_0x613f();let _0x537a1f=_0x613f45[_0x20dcb7];return _0x537a1f;}function a103_0x613f(){const _0x1364c6=['7545762qjqtTq','resume','21394KmCmJM','stdout','643423MoZqdU','2747367XWUPxK','question','10SpCbfx','93hQRaue','8vmUELe','\x20[y/N]\x20','setEncoding','close','10XCbUpl','stdin','\x20(y/N):\x20','setRawMode','toLowerCase','write','stderr','1010604qpOZvm','pause','2810109FHAazR','yes','2738292LSFQdL'];a103_0x613f=function(){return _0x1364c6;};return a103_0x613f();}import*as a103_0x3a38eb from'readline';export async function confirm(_0x28ba7e){const _0x3dfcd4=a103_0x537a,_0xcd4248=a103_0x3a38eb['createInterface']({'input':process[_0x3dfcd4(0x108)],'output':process[_0x3dfcd4(0xfd)]});return new Promise(_0x463b9d=>{const _0x1c01ef=_0x3dfcd4;_0xcd4248[_0x1c01ef(0x100)](_0x28ba7e+_0x1c01ef(0x109),_0x3c09c0=>{const _0x4ffc76=_0x1c01ef;_0xcd4248[_0x4ffc76(0x106)](),_0x463b9d(_0x3c09c0['toLowerCase']()==='y'||_0x3c09c0[_0x4ffc76(0x10b)]()===_0x4ffc76(0x111));});});}export async function confirmKey(_0x1f5e3e){const _0x4c1140=a103_0x537a;if(!process[_0x4c1140(0x108)]['isTTY'])return![];return process['stderr'][_0x4c1140(0x10c)](_0x1f5e3e+_0x4c1140(0x104)),new Promise(_0x6d3997=>{const _0xbc4630=_0x4c1140,_0x26dd1b=process[_0xbc4630(0x108)];_0x26dd1b[_0xbc4630(0x10a)](!![]),_0x26dd1b[_0xbc4630(0x114)](),_0x26dd1b[_0xbc4630(0x105)]('utf8');const _0x2266ba=_0x210686=>{const _0x502832=_0xbc4630;_0x26dd1b[_0x502832(0x10a)](![]),_0x26dd1b[_0x502832(0x10f)](),_0x26dd1b['removeListener']('data',_0x2266ba);if(_0x210686==='\x1b'){process[_0x502832(0x10d)][_0x502832(0x10c)]('\x0a'),_0x6d3997(![]);return;}_0x210686==='\x03'&&(process[_0x502832(0x10d)][_0x502832(0x10c)]('\x0a'),process['exit'](0x82));if(_0x210686[_0x502832(0x10b)]()==='y'){process[_0x502832(0x10d)][_0x502832(0x10c)]('y\x0a'),_0x6d3997(!![]);return;}process[_0x502832(0x10d)][_0x502832(0x10c)]('\x0a'),_0x6d3997(![]);};_0x26dd1b['on']('data',_0x2266ba);});}