@treasuredata/tdx 0.16.0 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/llm-proxy.js +1 -1
  24. package/dist/commands/mcp-command.js +1 -1
  25. package/dist/commands/parent-segment-command.js +1 -1
  26. package/dist/commands/profile-command.js +1 -1
  27. package/dist/commands/profiles-command.js +1 -1
  28. package/dist/commands/query-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/tables.js +1 -1
  40. package/dist/commands/unset-command.js +1 -1
  41. package/dist/commands/use-command.js +1 -1
  42. package/dist/commands/user-command.js +1 -1
  43. package/dist/commands/workflow-command.js +1 -1
  44. package/dist/core/auth.js +1 -1
  45. package/dist/core/command-output.js +1 -1
  46. package/dist/core/config.js +1 -1
  47. package/dist/core/connection-cache.js +1 -1
  48. package/dist/core/constants.js +1 -1
  49. package/dist/core/credential-cache.js +1 -1
  50. package/dist/core/global-context.js +1 -1
  51. package/dist/core/keychain.js +1 -1
  52. package/dist/core/profile.js +1 -1
  53. package/dist/core/project-config.js +1 -1
  54. package/dist/core/session.js +1 -1
  55. package/dist/core/user-cache.js +1 -1
  56. package/dist/core/version.js +1 -1
  57. package/dist/index.js +1 -1
  58. package/dist/mcp/server.js +1 -1
  59. package/dist/mcp/tools/index.js +1 -1
  60. package/dist/mcp/tools/tdx-run.js +1 -1
  61. package/dist/mcp/tools/tdx-search.js +1 -1
  62. package/dist/mcp/utils.js +1 -1
  63. package/dist/proxy/anthropic-adapter.js +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/passthrough-server.js +1 -1
  68. package/dist/proxy/server.js +1 -1
  69. package/dist/proxy/session-cache.js +1 -1
  70. package/dist/proxy/sse-usage-parser.js +1 -1
  71. package/dist/sdk/agent/agent-config.js +1 -1
  72. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  73. package/dist/sdk/agent/agent-yaml.js +1 -1
  74. package/dist/sdk/agent/test/evaluator.js +1 -1
  75. package/dist/sdk/agent/test/executor.js +1 -1
  76. package/dist/sdk/agent/test/index.js +1 -1
  77. package/dist/sdk/agent/test/output.js +1 -1
  78. package/dist/sdk/agent/test/parser.js +1 -1
  79. package/dist/sdk/api.js +1 -1
  80. package/dist/sdk/claude-agent/claude-agent-client.d.ts +19 -1
  81. package/dist/sdk/claude-agent/claude-agent-client.d.ts.map +1 -1
  82. package/dist/sdk/claude-agent/claude-agent-client.js +1 -1
  83. package/dist/sdk/claude-agent/claude-agent-client.js.map +1 -1
  84. package/dist/sdk/claude-agent/environment.js +1 -1
  85. package/dist/sdk/claude-agent/index.js +1 -1
  86. package/dist/sdk/claude-agent/system-prompts.js +1 -1
  87. package/dist/sdk/claude-agent/types.d.ts +26 -0
  88. package/dist/sdk/claude-agent/types.d.ts.map +1 -1
  89. package/dist/sdk/client/cdp-api-client.js +1 -1
  90. package/dist/sdk/client/endpoints.js +1 -1
  91. package/dist/sdk/client/engage-api-client.js +1 -1
  92. package/dist/sdk/client/http-client.js +1 -1
  93. package/dist/sdk/client/llm-api-client.js +1 -1
  94. package/dist/sdk/client/rate-limiter.js +1 -1
  95. package/dist/sdk/client/td-api-client.js +1 -1
  96. package/dist/sdk/client/trino-api-client.js +1 -1
  97. package/dist/sdk/client/workflow-client.js +1 -1
  98. package/dist/sdk/connection-validator.js +1 -1
  99. package/dist/sdk/connection.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.js +1 -1
  103. package/dist/sdk/io/index.js +1 -1
  104. package/dist/sdk/io/node-filesystem.js +1 -1
  105. package/dist/sdk/job.js +1 -1
  106. package/dist/sdk/journey.js +1 -1
  107. package/dist/sdk/llm/chat-cache.js +1 -1
  108. package/dist/sdk/llm/index.js +1 -1
  109. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  110. package/dist/sdk/llm/model-aliases.js +1 -1
  111. package/dist/sdk/llm/model-factors.js +1 -1
  112. package/dist/sdk/query/index.js +1 -1
  113. package/dist/sdk/query/sql-parser.js +1 -1
  114. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  115. package/dist/sdk/segment/fields-display.js +1 -1
  116. package/dist/sdk/segment/file-discovery.js +1 -1
  117. package/dist/sdk/segment/journey-utils.js +1 -1
  118. package/dist/sdk/segment/journey-yaml.js +1 -1
  119. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  120. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  121. package/dist/sdk/segment/pull-workflow.js +1 -1
  122. package/dist/sdk/segment/push-workflow.js +1 -1
  123. package/dist/sdk/segment/resolution-context.js +1 -1
  124. package/dist/sdk/segment/segment-path-parser.js +1 -1
  125. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  126. package/dist/sdk/segment/target-resolution.js +1 -1
  127. package/dist/sdk/segment/tdx-config.js +1 -1
  128. package/dist/sdk/segment/validate-files.js +1 -1
  129. package/dist/sdk/segment/yaml-validator.js +1 -1
  130. package/dist/sdk/segment.js +1 -1
  131. package/dist/sdk/types/index.js +1 -1
  132. package/dist/sdk/types/progress.js +1 -1
  133. package/dist/sdk/user.js +1 -1
  134. package/dist/sdk/util/format-detector.js +1 -1
  135. package/dist/sdk/util/formatters.js +1 -1
  136. package/dist/sdk/util/index.js +1 -1
  137. package/dist/sdk/util/tree-formatter.js +1 -1
  138. package/dist/sdk/workflow/clone-workflow.js +1 -1
  139. package/dist/sdk/workflow/index.js +1 -1
  140. package/dist/sdk/workflow/pull-workflow.js +1 -1
  141. package/dist/sdk/workflow/push-workflow.js +1 -1
  142. package/dist/sdk/workflow/tdx-config.js +1 -1
  143. package/dist/sdk/workflow/workflow-utils.js +1 -1
  144. package/dist/utils/async.js +1 -1
  145. package/dist/utils/colors.js +1 -1
  146. package/dist/utils/diff.js +1 -1
  147. package/dist/utils/file-permissions.js +1 -1
  148. package/dist/utils/json-loader.js +1 -1
  149. package/dist/utils/option-validation.js +1 -1
  150. package/dist/utils/port.js +1 -1
  151. package/dist/utils/process.js +1 -1
  152. package/dist/utils/prompt.js +1 -1
  153. package/dist/utils/spinner.js +1 -1
  154. package/dist/utils/sse-parser.js +1 -1
  155. package/dist/utils/string-utils.js +1 -1
  156. package/dist/utils/table-ref-parser.js +1 -1
  157. package/dist/utils/tdx-logger.js +1 -1
  158. package/dist/utils/version-check.js +1 -1
  159. package/package.json +1 -1
@@ -1 +1 @@
1
- function a159_0x328a(){const _0x4f0af3=['1687032BbYaiS','6584JdKLhl','1584JOyKOC','10509650JsYWIS','INTERNAL','Invalid\x20JSON\x20in\x20file\x20\x27','62SECkiG','5531994wocwgJ','18605gtRrAD','Invalid\x20JSON\x20string:\x20','26350vInslY','EACCES','code','42KqdVJA','INVALID_ARGUMENT','utf-8','File\x20not\x20found:\x20','921fDCURb','message','31798547mlHEAJ','Failed\x20to\x20load\x20JSON:\x20','parse','\x27:\x20','ENOENT','12AGKctr','NOT_FOUND'];a159_0x328a=function(){return _0x4f0af3;};return a159_0x328a();}(function(_0x537cb1,_0x6e9464){const _0x478709=a159_0x17d9,_0x34bd8c=_0x537cb1();while(!![]){try{const _0x4fcf08=parseInt(_0x478709(0x1a5))/0x1*(-parseInt(_0x478709(0x1a9))/0x2)+parseInt(_0x478709(0x1b0))/0x3*(parseInt(_0x478709(0x1a0))/0x4)+-parseInt(_0x478709(0x1a7))/0x5*(-parseInt(_0x478709(0x1a1))/0x6)+-parseInt(_0x478709(0x1ac))/0x7*(-parseInt(_0x478709(0x19f))/0x8)+parseInt(_0x478709(0x1a6))/0x9+parseInt(_0x478709(0x1a2))/0xa+-parseInt(_0x478709(0x198))/0xb*(parseInt(_0x478709(0x19d))/0xc);if(_0x4fcf08===_0x6e9464)break;else _0x34bd8c['push'](_0x34bd8c['shift']());}catch(_0x3a294a){_0x34bd8c['push'](_0x34bd8c['shift']());}}}(a159_0x328a,0xad920));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';function a159_0x17d9(_0x156d8c,_0x4b8128){_0x156d8c=_0x156d8c-0x197;const _0x328a39=a159_0x328a();let _0x17d908=_0x328a39[_0x156d8c];return _0x17d908;}export async function loadJSON(_0x22162f,_0x2fa36b){const _0x494e57=a159_0x17d9;try{if(_0x2fa36b){const _0x199ddb=await readFile(_0x22162f,_0x494e57(0x1ae));try{return JSON[_0x494e57(0x19a)](_0x199ddb);}catch(_0x2a9e02){throw new SDKError(ErrorCode[_0x494e57(0x1ad)],_0x494e57(0x1a4)+_0x22162f+_0x494e57(0x19b)+(_0x2a9e02 instanceof Error?_0x2a9e02[_0x494e57(0x197)]:String(_0x2a9e02)));}}else try{return JSON['parse'](_0x22162f);}catch(_0x559d5b){throw new SDKError(ErrorCode[_0x494e57(0x1ad)],_0x494e57(0x1a8)+(_0x559d5b instanceof Error?_0x559d5b[_0x494e57(0x197)]:String(_0x559d5b)));}}catch(_0x368b50){if(_0x368b50 instanceof SDKError)throw _0x368b50;if(_0x368b50 instanceof Error&&'code'in _0x368b50){const _0x58bb12=_0x368b50;if(_0x58bb12[_0x494e57(0x1ab)]===_0x494e57(0x19c))throw new SDKError(ErrorCode[_0x494e57(0x19e)],_0x494e57(0x1af)+_0x22162f);else{if(_0x58bb12[_0x494e57(0x1ab)]===_0x494e57(0x1aa))throw new SDKError(ErrorCode['PERMISSION_DENIED'],'Permission\x20denied\x20reading\x20file:\x20'+_0x22162f);}}throw new SDKError(ErrorCode[_0x494e57(0x1a3)],_0x494e57(0x199)+(_0x368b50 instanceof Error?_0x368b50[_0x494e57(0x197)]:String(_0x368b50)));}}export async function loadJSONFromOptions(_0x3b7e5c,_0x262414){if(_0x3b7e5c&&_0x262414)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.');if(_0x3b7e5c)return await loadJSON(_0x3b7e5c,![]);if(_0x262414)return await loadJSON(_0x262414,!![]);return undefined;}
1
+ (function(_0x26836e,_0x483432){const _0x1c53ed=a159_0x1415,_0x47be24=_0x26836e();while(!![]){try{const _0x29f14d=parseInt(_0x1c53ed(0x11b))/0x1*(-parseInt(_0x1c53ed(0x11d))/0x2)+-parseInt(_0x1c53ed(0x129))/0x3*(parseInt(_0x1c53ed(0x120))/0x4)+parseInt(_0x1c53ed(0x123))/0x5+parseInt(_0x1c53ed(0x113))/0x6*(-parseInt(_0x1c53ed(0x116))/0x7)+parseInt(_0x1c53ed(0x125))/0x8+parseInt(_0x1c53ed(0x128))/0x9+parseInt(_0x1c53ed(0x119))/0xa*(parseInt(_0x1c53ed(0x117))/0xb);if(_0x29f14d===_0x483432)break;else _0x47be24['push'](_0x47be24['shift']());}catch(_0x5f0e20){_0x47be24['push'](_0x47be24['shift']());}}}(a159_0xb809,0xcead5));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x53f33a,_0x4766c2){const _0x3c61b6=a159_0x1415;try{if(_0x4766c2){const _0x2997d8=await readFile(_0x53f33a,_0x3c61b6(0x121));try{return JSON['parse'](_0x2997d8);}catch(_0x148503){throw new SDKError(ErrorCode[_0x3c61b6(0x11e)],_0x3c61b6(0x124)+_0x53f33a+_0x3c61b6(0x11a)+(_0x148503 instanceof Error?_0x148503[_0x3c61b6(0x122)]:String(_0x148503)));}}else try{return JSON['parse'](_0x53f33a);}catch(_0x22cbde){throw new SDKError(ErrorCode[_0x3c61b6(0x11e)],'Invalid\x20JSON\x20string:\x20'+(_0x22cbde instanceof Error?_0x22cbde['message']:String(_0x22cbde)));}}catch(_0x11eba2){if(_0x11eba2 instanceof SDKError)throw _0x11eba2;if(_0x11eba2 instanceof Error&&_0x3c61b6(0x112)in _0x11eba2){const _0xaa0d09=_0x11eba2;if(_0xaa0d09[_0x3c61b6(0x112)]==='ENOENT')throw new SDKError(ErrorCode['NOT_FOUND'],_0x3c61b6(0x11f)+_0x53f33a);else{if(_0xaa0d09[_0x3c61b6(0x112)]===_0x3c61b6(0x115))throw new SDKError(ErrorCode[_0x3c61b6(0x127)],_0x3c61b6(0x126)+_0x53f33a);}}throw new SDKError(ErrorCode[_0x3c61b6(0x114)],_0x3c61b6(0x118)+(_0x11eba2 instanceof Error?_0x11eba2[_0x3c61b6(0x122)]:String(_0x11eba2)));}}export async function loadJSONFromOptions(_0x436976,_0x5a5b9d){const _0x528389=a159_0x1415;if(_0x436976&&_0x5a5b9d)throw new SDKError(ErrorCode[_0x528389(0x11e)],_0x528389(0x11c));if(_0x436976)return await loadJSON(_0x436976,![]);if(_0x5a5b9d)return await loadJSON(_0x5a5b9d,!![]);return undefined;}function a159_0x1415(_0x19f1e7,_0x182932){_0x19f1e7=_0x19f1e7-0x112;const _0xb809cf=a159_0xb809();let _0x1415a9=_0xb809cf[_0x19f1e7];return _0x1415a9;}function a159_0xb809(){const _0x5d52a3=['message','473890IWCoKB','Invalid\x20JSON\x20in\x20file\x20\x27','11786464LEjxeC','Permission\x20denied\x20reading\x20file:\x20','PERMISSION_DENIED','11848239BlRLFP','1893429sndBOO','code','2352tIcmBg','INTERNAL','EACCES','13636IgFbxv','22vmhQKh','Failed\x20to\x20load\x20JSON:\x20','3791670KibsXe','\x27:\x20','337AaZAdV','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','8318rPtdQN','INVALID_ARGUMENT','File\x20not\x20found:\x20','4KfVkBo','utf-8'];a159_0xb809=function(){return _0x5d52a3;};return a159_0xb809();}
@@ -1 +1 @@
1
- (function(_0x84ac48,_0x355d29){const _0x38c5ab=a160_0xc513,_0x5b691d=_0x84ac48();while(!![]){try{const _0xfa8655=parseInt(_0x38c5ab(0xb9))/0x1*(-parseInt(_0x38c5ab(0xb1))/0x2)+-parseInt(_0x38c5ab(0xb8))/0x3*(parseInt(_0x38c5ab(0xb5))/0x4)+parseInt(_0x38c5ab(0xaf))/0x5*(-parseInt(_0x38c5ab(0xb0))/0x6)+-parseInt(_0x38c5ab(0xb6))/0x7*(parseInt(_0x38c5ab(0xb2))/0x8)+-parseInt(_0x38c5ab(0xbb))/0x9+-parseInt(_0x38c5ab(0xb7))/0xa+parseInt(_0x38c5ab(0xae))/0xb;if(_0xfa8655===_0x355d29)break;else _0x5b691d['push'](_0x5b691d['shift']());}catch(_0x4a9599){_0x5b691d['push'](_0x5b691d['shift']());}}}(a160_0x2981,0x8887d));function a160_0xc513(_0x2b41d0,_0x4a95ce){_0x2b41d0=_0x2b41d0-0xac;const _0x2981b5=a160_0x2981();let _0xc513ab=_0x2981b5[_0x2b41d0];return _0xc513ab;}function a160_0x2981(){const _0x2f992d=['523820VcueQO','3392voMtGq','number','.\x20Must\x20be\x20an\x20integer.','4xDRlHM','15295AuJRjJ','9079310ITGvYo','1123302EazyYJ','3dzqMlw','Invalid\x20limit\x20value:\x20','4667409sFVHRC','Invalid\x20timeout\x20value:\x20','.\x20Must\x20be\x20a\x20positive\x20number.','.\x20Must\x20be\x20a\x20positive\x20integer.','51117011sYAuXX','718295KUZFii','24qGVYDq'];a160_0x2981=function(){return _0x2f992d;};return a160_0x2981();}export function validateLimitOption(_0x133f01){const _0x1d1908=a160_0xc513;if(!Number['isInteger'](_0x133f01))return{'isValid':![],'error':_0x1d1908(0xba)+_0x133f01+_0x1d1908(0xb4)};if(_0x133f01<=0x0)return{'isValid':![],'error':_0x1d1908(0xba)+_0x133f01+_0x1d1908(0xad)};return{'isValid':!![],'value':_0x133f01};}export function validateTimeoutOption(_0x13659d,_0xff27ed=0x1e){const _0x2f98de=a160_0xc513;if(_0x13659d===undefined)return{'isValid':!![],'value':_0xff27ed};const _0x3469ac=typeof _0x13659d===_0x2f98de(0xb3)?_0x13659d:parseFloat(_0x13659d);if(isNaN(_0x3469ac))return{'isValid':![],'error':_0x2f98de(0xbc)+_0x13659d+'.\x20Must\x20be\x20a\x20number.'};if(_0x3469ac<=0x0)return{'isValid':![],'error':_0x2f98de(0xbc)+_0x3469ac+_0x2f98de(0xac)};return{'isValid':!![],'value':_0x3469ac};}
1
+ function a160_0x19ef(){const _0x5d490c=['614647jVavSU','71109eeGzOQ','942sYeeeP','222bBvTOz','80MaWBwv','5646970kaVmVs','4GsQuez','2661018VabbVn','8418NVdLGb','33940WYLMgk','number','.\x20Must\x20be\x20an\x20integer.','Invalid\x20limit\x20value:\x20','isInteger','984nhwabc','.\x20Must\x20be\x20a\x20positive\x20number.','5181156OvsmRu','.\x20Must\x20be\x20a\x20positive\x20integer.'];a160_0x19ef=function(){return _0x5d490c;};return a160_0x19ef();}(function(_0x2c8f56,_0x48d331){const _0x2f538e=a160_0x137b,_0x16ff4c=_0x2c8f56();while(!![]){try{const _0x5e1c33=-parseInt(_0x2f538e(0x105))/0x1*(parseInt(_0x2f538e(0x10a))/0x2)+-parseInt(_0x2f538e(0x109))/0x3*(-parseInt(_0x2f538e(0x108))/0x4)+-parseInt(_0x2f538e(0xf9))/0x5*(parseInt(_0x2f538e(0x104))/0x6)+parseInt(_0x2f538e(0x107))/0x7+-parseInt(_0x2f538e(0xfe))/0x8*(-parseInt(_0x2f538e(0x103))/0x9)+-parseInt(_0x2f538e(0x106))/0xa*(parseInt(_0x2f538e(0x102))/0xb)+parseInt(_0x2f538e(0x100))/0xc;if(_0x5e1c33===_0x48d331)break;else _0x16ff4c['push'](_0x16ff4c['shift']());}catch(_0x2250ca){_0x16ff4c['push'](_0x16ff4c['shift']());}}}(a160_0x19ef,0x9ebbc));export function validateLimitOption(_0x29de78){const _0x998a5=a160_0x137b;if(!Number[_0x998a5(0xfd)](_0x29de78))return{'isValid':![],'error':_0x998a5(0xfc)+_0x29de78+_0x998a5(0xfb)};if(_0x29de78<=0x0)return{'isValid':![],'error':_0x998a5(0xfc)+_0x29de78+_0x998a5(0x101)};return{'isValid':!![],'value':_0x29de78};}function a160_0x137b(_0x4b70ff,_0x2ed55f){_0x4b70ff=_0x4b70ff-0xf9;const _0x19ef3f=a160_0x19ef();let _0x137bda=_0x19ef3f[_0x4b70ff];return _0x137bda;}export function validateTimeoutOption(_0x2100b7,_0x5b8ef1=0x1e){const _0x122ef2=a160_0x137b;if(_0x2100b7===undefined)return{'isValid':!![],'value':_0x5b8ef1};const _0x5d6fb5=typeof _0x2100b7===_0x122ef2(0xfa)?_0x2100b7:parseFloat(_0x2100b7);if(isNaN(_0x5d6fb5))return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x2100b7+'.\x20Must\x20be\x20a\x20number.'};if(_0x5d6fb5<=0x0)return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x5d6fb5+_0x122ef2(0xff)};return{'isValid':!![],'value':_0x5d6fb5};}
@@ -1 +1 @@
1
- function a161_0x93ff(_0x24d4c3,_0x444797){_0x24d4c3=_0x24d4c3-0x6c;const _0x5e310d=a161_0x5e31();let _0x93ff68=_0x5e310d[_0x24d4c3];return _0x93ff68;}(function(_0x3eb4c4,_0x4cc89d){const _0x28df27=a161_0x93ff,_0x25ee5e=_0x3eb4c4();while(!![]){try{const _0x561c07=-parseInt(_0x28df27(0x6c))/0x1*(parseInt(_0x28df27(0x72))/0x2)+parseInt(_0x28df27(0x6e))/0x3+-parseInt(_0x28df27(0x71))/0x4+parseInt(_0x28df27(0x73))/0x5+-parseInt(_0x28df27(0x7b))/0x6+parseInt(_0x28df27(0x6d))/0x7+parseInt(_0x28df27(0x76))/0x8;if(_0x561c07===_0x4cc89d)break;else _0x25ee5e['push'](_0x25ee5e['shift']());}catch(_0x479b7e){_0x25ee5e['push'](_0x25ee5e['shift']());}}}(a161_0x5e31,0x49f76));function a161_0x5e31(){const _0x70b8c=['2930178nUrGuw','449PwjVEb','2470559DxYHCp','409125HfmvqY','No\x20available\x20port\x20found\x20between\x20','0.0.0.0','1889868AVaOzV','1604mVVLOy','1711370RcNsoZ','code','listen','6338464CemRuG','error','once','listening','\x20and\x20'];a161_0x5e31=function(){return _0x70b8c;};return a161_0x5e31();}import{createServer}from'node:net';export async function isPortAvailable(_0xd0d7fe){return new Promise(_0x22a098=>{const _0x44436e=a161_0x93ff,_0x3e6446=createServer();_0x3e6446[_0x44436e(0x78)](_0x44436e(0x77),_0x1e7aea=>{const _0x5f37b7=_0x44436e;_0x1e7aea[_0x5f37b7(0x74)]==='EADDRINUSE'?_0x22a098(![]):_0x22a098(![]);}),_0x3e6446[_0x44436e(0x78)](_0x44436e(0x79),()=>{_0x3e6446['close'](),_0x22a098(!![]);}),_0x3e6446[_0x44436e(0x75)](_0xd0d7fe,_0x44436e(0x70));});}export async function findAvailablePort(_0x5d0818=0xfa0,_0x6f1059=0x64){const _0x11fcfe=a161_0x93ff;for(let _0x57e4b6=0x0;_0x57e4b6<_0x6f1059;_0x57e4b6++){const _0x4f78a7=_0x5d0818+_0x57e4b6;if(await isPortAvailable(_0x4f78a7))return _0x4f78a7;}throw new Error(_0x11fcfe(0x6f)+_0x5d0818+_0x11fcfe(0x7a)+(_0x5d0818+_0x6f1059-0x1));}
1
+ (function(_0x2553fa,_0xaf7991){const _0x45b41e=a161_0x2623,_0x5d2936=_0x2553fa();while(!![]){try{const _0x3fdb83=parseInt(_0x45b41e(0xdc))/0x1*(-parseInt(_0x45b41e(0xd4))/0x2)+-parseInt(_0x45b41e(0xd7))/0x3+parseInt(_0x45b41e(0xd1))/0x4+-parseInt(_0x45b41e(0xe0))/0x5*(parseInt(_0x45b41e(0xd3))/0x6)+-parseInt(_0x45b41e(0xd5))/0x7*(-parseInt(_0x45b41e(0xd8))/0x8)+-parseInt(_0x45b41e(0xd2))/0x9+-parseInt(_0x45b41e(0xd6))/0xa*(-parseInt(_0x45b41e(0xdd))/0xb);if(_0x3fdb83===_0xaf7991)break;else _0x5d2936['push'](_0x5d2936['shift']());}catch(_0x2e77d7){_0x5d2936['push'](_0x5d2936['shift']());}}}(a161_0x3208,0x4615d));function a161_0x2623(_0xfee046,_0x597016){_0xfee046=_0xfee046-0xce;const _0x3208bc=a161_0x3208();let _0x2623df=_0x3208bc[_0xfee046];return _0x2623df;}import{createServer}from'node:net';function a161_0x3208(){const _0x24c20d=['25LAztlS','No\x20available\x20port\x20found\x20between\x20','code','close','0.0.0.0','311604ijhWLK','216414BsrZJq','675510TmNXPE','351766rIZJSD','480053sVgfQS','230yarcyK','267993sSbEwl','56hhAeXU','error','listen','once','2erZCMG','362131ckOGZu','\x20and\x20','listening'];a161_0x3208=function(){return _0x24c20d;};return a161_0x3208();}export async function isPortAvailable(_0x5172fe){return new Promise(_0x1e123a=>{const _0xdab2c1=a161_0x2623,_0x279c52=createServer();_0x279c52[_0xdab2c1(0xdb)](_0xdab2c1(0xd9),_0x3bec9c=>{const _0x7f8062=_0xdab2c1;_0x3bec9c[_0x7f8062(0xce)]==='EADDRINUSE'?_0x1e123a(![]):_0x1e123a(![]);}),_0x279c52['once'](_0xdab2c1(0xdf),()=>{const _0x186ddc=_0xdab2c1;_0x279c52[_0x186ddc(0xcf)](),_0x1e123a(!![]);}),_0x279c52[_0xdab2c1(0xda)](_0x5172fe,_0xdab2c1(0xd0));});}export async function findAvailablePort(_0x26d156=0xfa0,_0x338709=0x64){const _0x17c250=a161_0x2623;for(let _0xf30cd7=0x0;_0xf30cd7<_0x338709;_0xf30cd7++){const _0x221d02=_0x26d156+_0xf30cd7;if(await isPortAvailable(_0x221d02))return _0x221d02;}throw new Error(_0x17c250(0xe1)+_0x26d156+_0x17c250(0xde)+(_0x26d156+_0x338709-0x1));}
@@ -1 +1 @@
1
- const a162_0x43252e=a162_0x4267;(function(_0x276c2c,_0x2633dd){const _0x52d992=a162_0x4267,_0x3bf3cb=_0x276c2c();while(!![]){try{const _0x1e8b3a=parseInt(_0x52d992(0x21b))/0x1*(parseInt(_0x52d992(0x217))/0x2)+parseInt(_0x52d992(0x1f3))/0x3+parseInt(_0x52d992(0x21e))/0x4*(parseInt(_0x52d992(0x216))/0x5)+parseInt(_0x52d992(0x21c))/0x6*(parseInt(_0x52d992(0x20e))/0x7)+-parseInt(_0x52d992(0x1ff))/0x8+parseInt(_0x52d992(0x215))/0x9+-parseInt(_0x52d992(0x213))/0xa;if(_0x1e8b3a===_0x2633dd)break;else _0x3bf3cb['push'](_0x3bf3cb['shift']());}catch(_0x317cba){_0x3bf3cb['push'](_0x3bf3cb['shift']());}}}(a162_0x5d9f,0x7e44a));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a162_0x43252e(0x1f5),a162_0x43252e(0x1fd),'sh',a162_0x43252e(0x229),a162_0x43252e(0x1f9),a162_0x43252e(0x219),a162_0x43252e(0x22b),a162_0x43252e(0x1f2),a162_0x43252e(0x228),'powershell','nu','ion',a162_0x43252e(0x209),a162_0x43252e(0x218)]),EPHEMERAL_SHELL_SPAWNERS=new Set(['claude',a162_0x43252e(0x1f7),a162_0x43252e(0x222)]);function getProcessInfoWindows(_0x304710){const _0x571b25=a162_0x43252e;try{if(!Number[_0x571b25(0x206)](_0x304710)||_0x304710<=0x0)return null;const _0xcbc32e=_0x571b25(0x205)+_0x304710+_0x571b25(0x20c),_0x4e0c7b=execSync(_0x571b25(0x20a)+_0xcbc32e+'\x22',{'encoding':_0x571b25(0x204),'windowsHide':!![],'stdio':[_0x571b25(0x1f8),_0x571b25(0x1f8),_0x571b25(0x1f8)]})[_0x571b25(0x1f4)]();if(!_0x4e0c7b)return null;const [_0x33ba55,..._0x90a28b]=_0x4e0c7b[_0x571b25(0x221)](','),_0x210f6f=parseInt(_0x33ba55,0xa),_0x116231=_0x90a28b[_0x571b25(0x211)](',')[_0x571b25(0x1f4)]();if(isNaN(_0x210f6f)||!_0x116231)return null;return{'pid':_0x304710,'ppid':_0x210f6f,'comm':_0x116231[_0x571b25(0x1fc)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x3b6899){const _0x5919ad=a162_0x43252e;try{const _0x14cc2b=0x400000;if(!Number[_0x5919ad(0x206)](_0x3b6899)||_0x3b6899<=0x0||_0x3b6899>_0x14cc2b)return null;const _0x177b75=execSync('ps\x20-p\x20'+_0x3b6899+_0x5919ad(0x1fa),{'encoding':_0x5919ad(0x204),'stdio':'pipe'})[_0x5919ad(0x1f4)](),[_0x20ed9b,..._0x4ac862]=_0x177b75['split'](/\s+/),_0x555a29=parseInt(_0x20ed9b,0xa),_0x51440a=_0x4ac862[_0x5919ad(0x211)]('\x20');if(isNaN(_0x555a29))return null;return{'pid':_0x3b6899,'ppid':_0x555a29,'comm':_0x51440a};}catch{return null;}}function getProcessInfo(_0x1c5860){const _0x5ba0c9=a162_0x43252e;if(process['platform']===_0x5ba0c9(0x207))return getProcessInfoWindows(_0x1c5860);return getProcessInfoPosix(_0x1c5860);}function getBasename(_0x303454){const _0x4bac5d=a162_0x43252e;return _0x303454[_0x4bac5d(0x1fc)](/^-/,'')[_0x4bac5d(0x221)]('/')[_0x4bac5d(0x226)]()?.[_0x4bac5d(0x22d)]()||'';}function isShell(_0x167464){return SHELL_NAMES['has'](getBasename(_0x167464));}function isEphemeralShellSpawner(_0x54d87c){const _0x3ada84=a162_0x43252e;return EPHEMERAL_SHELL_SPAWNERS[_0x3ada84(0x20b)](getBasename(_0x54d87c));}let cachedShellPID;function a162_0x4267(_0x1039ec,_0x4d008b){_0x1039ec=_0x1039ec-0x1f1;const _0x5d9f21=a162_0x5d9f();let _0x4267b3=_0x5d9f21[_0x1039ec];return _0x4267b3;}function findShellPID(){const _0x5069b9=a162_0x43252e;if(process['ppid']===undefined)return process[_0x5069b9(0x202)];let _0xf6ea55=process['ppid'];const _0x170d63=0xa;let _0x2a57ea=0x0;while(_0x2a57ea<_0x170d63){const _0x4cd8ae=getProcessInfo(_0xf6ea55);if(!_0x4cd8ae)break;if(isShell(_0x4cd8ae['comm'])){const _0x274bd7=getProcessInfo(_0x4cd8ae[_0x5069b9(0x20d)]);if(_0x274bd7&&isEphemeralShellSpawner(_0x274bd7[_0x5069b9(0x220)])){_0xf6ea55=_0x4cd8ae[_0x5069b9(0x20d)],_0x2a57ea++;continue;}return _0x4cd8ae[_0x5069b9(0x202)];}if(_0x4cd8ae[_0x5069b9(0x20d)]===0x0||_0x4cd8ae['ppid']===0x1){if(isShell(_0x4cd8ae[_0x5069b9(0x220)]))return _0x4cd8ae[_0x5069b9(0x202)];break;}_0xf6ea55=_0x4cd8ae['ppid'],_0x2a57ea++;}return process[_0x5069b9(0x20d)]!==undefined?process['ppid']:process[_0x5069b9(0x202)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x19d9e9){const _0x375e35=a162_0x43252e;if(!Number[_0x375e35(0x206)](_0x19d9e9)||_0x19d9e9<=0x0)return![];try{return process['kill'](_0x19d9e9,0x0),!![];}catch{return![];}}export function openBrowser(_0x234479){const _0x58bd33=a162_0x43252e;let _0x2b5911;try{_0x2b5911=new URL(_0x234479);}catch{throw new Error(_0x58bd33(0x208)+_0x234479);}if(_0x2b5911[_0x58bd33(0x21f)]!==_0x58bd33(0x223)&&_0x2b5911[_0x58bd33(0x21f)]!==_0x58bd33(0x212))throw new Error(_0x58bd33(0x200)+_0x2b5911['protocol']);const _0x4388e2=_0x2b5911[_0x58bd33(0x1f6)],_0x338135=process[_0x58bd33(0x20f)];if(_0x338135===_0x58bd33(0x207))spawn(_0x58bd33(0x22c),['/c','start','',_0x4388e2],{'detached':!![],'stdio':_0x58bd33(0x214)})[_0x58bd33(0x1fe)]();else{const _0x3df59a=_0x338135==='darwin'?'open':_0x58bd33(0x227);spawn(_0x3df59a,[_0x4388e2],{'detached':!![],'stdio':_0x58bd33(0x214)})[_0x58bd33(0x1fe)]();}}export function isWindows(){const _0x23f33c=a162_0x43252e;return process[_0x23f33c(0x20f)]==='win32';}export function getCrossSpawnOptions(_0x4aab16){return{..._0x4aab16??{},'shell':isWindows()};}export function escapeWindowsArg(_0x13ea18){const _0x5182d2=a162_0x43252e;if(!/[ \t"&|<>^%!`\r\n]/[_0x5182d2(0x224)](_0x13ea18))return _0x13ea18;const _0x364989=_0x13ea18[_0x5182d2(0x1fc)](/"/g,'\x22\x22');return'\x22'+_0x364989+'\x22';}function a162_0x5d9f(){const _0x5efbde=['replace','zsh','unref','2428912BwVzGL','Unsupported\x20protocol:\x20','map','pid','which','utf-8','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','isInteger','win32','Invalid\x20URL:\x20','elvish','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','has','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','ppid','1601341WGFOJZ','platform','toString','join','https:','16085700fhghAR','ignore','8896176TaxmXa','4729705QqQDhw','20IYWvEQ','xonsh','tcsh','error','10939WBqrcO','6hzCSxM','exit','4dUcgtj','protocol','comm','split','cursor','http:','test','where.exe','pop','xdg-open','pwsh','fish','data','csh','cmd.exe','toLowerCase','stderr','dash','470460jiiqeN','trim','bash','href','code','pipe','ksh','\x20-o\x20ppid=,comm=','stdout'];a162_0x5d9f=function(){return _0x5efbde;};return a162_0x5d9f();}export function crossSpawn(_0x717912,_0x2683aa,_0x419e58){const _0xeefac8=a162_0x43252e;if(isWindows()){const _0xf50f0c=escapeWindowsArg(_0x717912),_0x363547=_0x2683aa[_0xeefac8(0x201)](escapeWindowsArg),_0x4bf536=[_0xf50f0c,..._0x363547]['join']('\x20');return spawn(_0x4bf536,[],{..._0x419e58,'shell':!![]});}return spawn(_0x717912,_0x2683aa,{..._0x419e58,'shell':![]});}export function findExecutable(_0x21df10,_0x2b570e=0x1388){return new Promise(_0x5ce564=>{const _0x6a317c=a162_0x4267,_0x2033eb=isWindows()?_0x6a317c(0x225):_0x6a317c(0x203);let _0x34892e=![];const _0x387b5d=crossSpawn(_0x2033eb,[_0x21df10],{'stdio':_0x6a317c(0x1f8)}),_0x44bd75=setTimeout(()=>{!_0x34892e&&(_0x34892e=!![],_0x387b5d['kill'](),_0x5ce564(null));},_0x2b570e);let _0x4187b7='';_0x387b5d[_0x6a317c(0x1fb)]?.['on'](_0x6a317c(0x22a),_0x157de7=>{const _0x1b0d49=_0x6a317c;_0x4187b7+=_0x157de7[_0x1b0d49(0x210)]();}),_0x387b5d[_0x6a317c(0x1f1)]?.['on'](_0x6a317c(0x22a),()=>{}),_0x387b5d['on'](_0x6a317c(0x21d),_0x17d171=>{if(_0x34892e)return;_0x34892e=!![],clearTimeout(_0x44bd75);if(_0x17d171===0x0&&_0x4187b7['trim']()){const _0x5838ad=_0x4187b7['trim']()['split'](/\r?\n/)[0x0];_0x5ce564(_0x5838ad);}else _0x5ce564(null);}),_0x387b5d['on'](_0x6a317c(0x21a),()=>{if(_0x34892e)return;_0x34892e=!![],clearTimeout(_0x44bd75),_0x5ce564(null);});});}
1
+ const a162_0x25dcf4=a162_0x5f2a;function a162_0x5f2a(_0x2cf269,_0x32b9d4){_0x2cf269=_0x2cf269-0x1ca;const _0x5a7df1=a162_0x5a7d();let _0x5f2a21=_0x5a7df1[_0x2cf269];return _0x5f2a21;}(function(_0x102c5f,_0x14671a){const _0x29370d=a162_0x5f2a,_0x1427f8=_0x102c5f();while(!![]){try{const _0x5485a7=parseInt(_0x29370d(0x1f3))/0x1+parseInt(_0x29370d(0x1ca))/0x2*(parseInt(_0x29370d(0x1d8))/0x3)+-parseInt(_0x29370d(0x1e3))/0x4+-parseInt(_0x29370d(0x1d5))/0x5*(-parseInt(_0x29370d(0x1ec))/0x6)+-parseInt(_0x29370d(0x201))/0x7*(parseInt(_0x29370d(0x1e8))/0x8)+-parseInt(_0x29370d(0x1d9))/0x9*(parseInt(_0x29370d(0x1e0))/0xa)+-parseInt(_0x29370d(0x1d3))/0xb*(-parseInt(_0x29370d(0x1e5))/0xc);if(_0x5485a7===_0x14671a)break;else _0x1427f8['push'](_0x1427f8['shift']());}catch(_0x9f1d22){_0x1427f8['push'](_0x1427f8['shift']());}}}(a162_0x5a7d,0xe7230));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a162_0x25dcf4(0x1cc),'zsh','sh','fish',a162_0x25dcf4(0x1d4),'tcsh','csh',a162_0x25dcf4(0x204),a162_0x25dcf4(0x1cd),a162_0x25dcf4(0x1cb),'nu',a162_0x25dcf4(0x1db),a162_0x25dcf4(0x1fc),'xonsh']),EPHEMERAL_SHELL_SPAWNERS=new Set([a162_0x25dcf4(0x1eb),'code',a162_0x25dcf4(0x1fe)]);function getProcessInfoWindows(_0x48631f){const _0x5e834a=a162_0x25dcf4;try{if(!Number[_0x5e834a(0x1d7)](_0x48631f)||_0x48631f<=0x0)return null;const _0x383460=_0x5e834a(0x1fa)+_0x48631f+'\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}',_0x18c862=execSync(_0x5e834a(0x1f5)+_0x383460+'\x22',{'encoding':_0x5e834a(0x1d6),'windowsHide':!![],'stdio':['pipe',_0x5e834a(0x1dd),_0x5e834a(0x1dd)]})[_0x5e834a(0x1e2)]();if(!_0x18c862)return null;const [_0x505c3f,..._0x1ba3f3]=_0x18c862['split'](','),_0x2641f4=parseInt(_0x505c3f,0xa),_0x521c6d=_0x1ba3f3[_0x5e834a(0x1d2)](',')['trim']();if(isNaN(_0x2641f4)||!_0x521c6d)return null;return{'pid':_0x48631f,'ppid':_0x2641f4,'comm':_0x521c6d[_0x5e834a(0x1e1)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x4fd224){const _0x588d1f=a162_0x25dcf4;try{const _0x4e734b=0x400000;if(!Number['isInteger'](_0x4fd224)||_0x4fd224<=0x0||_0x4fd224>_0x4e734b)return null;const _0x4e8fac=execSync('ps\x20-p\x20'+_0x4fd224+'\x20-o\x20ppid=,comm=',{'encoding':'utf-8','stdio':_0x588d1f(0x1dd)})[_0x588d1f(0x1e2)](),[_0xb2e8a8,..._0x74e7bd]=_0x4e8fac[_0x588d1f(0x200)](/\s+/),_0x1d392e=parseInt(_0xb2e8a8,0xa),_0x2970e7=_0x74e7bd['join']('\x20');if(isNaN(_0x1d392e))return null;return{'pid':_0x4fd224,'ppid':_0x1d392e,'comm':_0x2970e7};}catch{return null;}}function getProcessInfo(_0x2e4605){const _0x3fc63a=a162_0x25dcf4;if(process[_0x3fc63a(0x1ce)]===_0x3fc63a(0x1f1))return getProcessInfoWindows(_0x2e4605);return getProcessInfoPosix(_0x2e4605);}function getBasename(_0x13529a){const _0x5c1cd4=a162_0x25dcf4;return _0x13529a['replace'](/^-/,'')[_0x5c1cd4(0x200)]('/')[_0x5c1cd4(0x1f7)]()?.[_0x5c1cd4(0x1ff)]()||'';}function isShell(_0x484468){const _0x3574b2=a162_0x25dcf4;return SHELL_NAMES[_0x3574b2(0x1de)](getBasename(_0x484468));}function isEphemeralShellSpawner(_0x244c19){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x244c19));}let cachedShellPID;function findShellPID(){const _0x24205d=a162_0x25dcf4;if(process[_0x24205d(0x205)]===undefined)return process[_0x24205d(0x1fb)];let _0x5ecd24=process[_0x24205d(0x205)];const _0x50ce11=0xa;let _0x382a4a=0x0;while(_0x382a4a<_0x50ce11){const _0x14cada=getProcessInfo(_0x5ecd24);if(!_0x14cada)break;if(isShell(_0x14cada[_0x24205d(0x202)])){const _0x419077=getProcessInfo(_0x14cada[_0x24205d(0x205)]);if(_0x419077&&isEphemeralShellSpawner(_0x419077[_0x24205d(0x202)])){_0x5ecd24=_0x14cada[_0x24205d(0x205)],_0x382a4a++;continue;}return _0x14cada[_0x24205d(0x1fb)];}if(_0x14cada[_0x24205d(0x205)]===0x0||_0x14cada[_0x24205d(0x205)]===0x1){if(isShell(_0x14cada['comm']))return _0x14cada[_0x24205d(0x1fb)];break;}_0x5ecd24=_0x14cada['ppid'],_0x382a4a++;}return process[_0x24205d(0x205)]!==undefined?process[_0x24205d(0x205)]:process[_0x24205d(0x1fb)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x2653a1){const _0x320aea=a162_0x25dcf4;if(!Number[_0x320aea(0x1d7)](_0x2653a1)||_0x2653a1<=0x0)return![];try{return process['kill'](_0x2653a1,0x0),!![];}catch{return![];}}export function openBrowser(_0xfe64c7){const _0x4d45b9=a162_0x25dcf4;let _0x9dfe41;try{_0x9dfe41=new URL(_0xfe64c7);}catch{throw new Error(_0x4d45b9(0x1e9)+_0xfe64c7);}if(_0x9dfe41[_0x4d45b9(0x1fd)]!==_0x4d45b9(0x1dc)&&_0x9dfe41[_0x4d45b9(0x1fd)]!==_0x4d45b9(0x1f6))throw new Error(_0x4d45b9(0x203)+_0x9dfe41[_0x4d45b9(0x1fd)]);const _0x56b38a=_0x9dfe41[_0x4d45b9(0x1d0)],_0x4b85da=process['platform'];if(_0x4b85da==='win32')spawn(_0x4d45b9(0x1d1),['/c',_0x4d45b9(0x1da),'',_0x56b38a],{'detached':!![],'stdio':'ignore'})[_0x4d45b9(0x1e7)]();else{const _0x50dc17=_0x4b85da===_0x4d45b9(0x1ed)?_0x4d45b9(0x1ee):_0x4d45b9(0x1f4);spawn(_0x50dc17,[_0x56b38a],{'detached':!![],'stdio':_0x4d45b9(0x1f0)})[_0x4d45b9(0x1e7)]();}}export function isWindows(){const _0x3bf5bb=a162_0x25dcf4;return process['platform']===_0x3bf5bb(0x1f1);}export function getCrossSpawnOptions(_0x7d7e2d){return{..._0x7d7e2d??{},'shell':isWindows()};}function a162_0x5a7d(){const _0x587cc0=['stdout','1010tgyghw','replace','trim','5071340eVBtcj','error','516948jSuARw','exit','unref','336jyiydE','Invalid\x20URL:\x20','data','claude','5528742vwfCYW','darwin','open','test','ignore','win32','where.exe','121083HZiEdf','xdg-open','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','https:','pop','stderr','which','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','pid','elvish','protocol','cursor','toLowerCase','split','101227zxVkny','comm','Unsupported\x20protocol:\x20','dash','ppid','1076ohSMaY','powershell','bash','pwsh','platform','kill','href','cmd.exe','join','231qnsGbj','ksh','10PDDVSp','utf-8','isInteger','9213rqhxkT','151389GBRTkd','start','ion','http:','pipe','has'];a162_0x5a7d=function(){return _0x587cc0;};return a162_0x5a7d();}export function escapeWindowsArg(_0x78c92e){const _0x147604=a162_0x25dcf4;if(!/[ \t"&|<>^%!`\r\n]/[_0x147604(0x1ef)](_0x78c92e))return _0x78c92e;const _0x3ac894=_0x78c92e[_0x147604(0x1e1)](/"/g,'\x22\x22');return'\x22'+_0x3ac894+'\x22';}export function crossSpawn(_0x27acfd,_0x5d8f43,_0x4696cf){const _0x3d94d1=a162_0x25dcf4;if(isWindows()){const _0x420632=escapeWindowsArg(_0x27acfd),_0x4f73a1=_0x5d8f43['map'](escapeWindowsArg),_0x8e8cf4=[_0x420632,..._0x4f73a1][_0x3d94d1(0x1d2)]('\x20');return spawn(_0x8e8cf4,[],{..._0x4696cf,'shell':!![]});}return spawn(_0x27acfd,_0x5d8f43,{..._0x4696cf,'shell':![]});}export function findExecutable(_0x2726fc,_0x5cb580=0x1388){return new Promise(_0x1bd799=>{const _0x3cd41b=a162_0x5f2a,_0x1868b0=isWindows()?_0x3cd41b(0x1f2):_0x3cd41b(0x1f9);let _0x46326b=![];const _0x1eba0d=crossSpawn(_0x1868b0,[_0x2726fc],{'stdio':_0x3cd41b(0x1dd)}),_0x573c63=setTimeout(()=>{const _0x5b227d=_0x3cd41b;!_0x46326b&&(_0x46326b=!![],_0x1eba0d[_0x5b227d(0x1cf)](),_0x1bd799(null));},_0x5cb580);let _0x874d41='';_0x1eba0d[_0x3cd41b(0x1df)]?.['on'](_0x3cd41b(0x1ea),_0x775e9=>{_0x874d41+=_0x775e9['toString']();}),_0x1eba0d[_0x3cd41b(0x1f8)]?.['on']('data',()=>{}),_0x1eba0d['on'](_0x3cd41b(0x1e6),_0x333604=>{const _0x42e936=_0x3cd41b;if(_0x46326b)return;_0x46326b=!![],clearTimeout(_0x573c63);if(_0x333604===0x0&&_0x874d41[_0x42e936(0x1e2)]()){const _0x31b51b=_0x874d41[_0x42e936(0x1e2)]()[_0x42e936(0x200)](/\r?\n/)[0x0];_0x1bd799(_0x31b51b);}else _0x1bd799(null);}),_0x1eba0d['on'](_0x3cd41b(0x1e4),()=>{if(_0x46326b)return;_0x46326b=!![],clearTimeout(_0x573c63),_0x1bd799(null);});});}
@@ -1 +1 @@
1
- (function(_0x2ddf6f,_0x6e737f){const _0x706536=a163_0x2594,_0x5787e0=_0x2ddf6f();while(!![]){try{const _0x42652a=parseInt(_0x706536(0x1ff))/0x1+-parseInt(_0x706536(0x1f6))/0x2+-parseInt(_0x706536(0x1f3))/0x3+-parseInt(_0x706536(0x1f2))/0x4*(-parseInt(_0x706536(0x1f5))/0x5)+parseInt(_0x706536(0x1ef))/0x6*(parseInt(_0x706536(0x202))/0x7)+-parseInt(_0x706536(0x1fa))/0x8+-parseInt(_0x706536(0x206))/0x9*(-parseInt(_0x706536(0x1fe))/0xa);if(_0x42652a===_0x6e737f)break;else _0x5787e0['push'](_0x5787e0['shift']());}catch(_0x77f4ae){_0x5787e0['push'](_0x5787e0['shift']());}}}(a163_0x49a1,0xa2e58));import*as a163_0x1c2fb6 from'readline';function a163_0x2594(_0x4788de,_0x2af95d){_0x4788de=_0x4788de-0x1ee;const _0x49a13f=a163_0x49a1();let _0x259424=_0x49a13f[_0x4788de];return _0x259424;}function a163_0x49a1(){const _0x198b24=['3930xGtDZM','44276cDVhFt','toLowerCase','\x20[y/N]\x20','stdin','6874000VhutXL','pause','removeListener','close','296980kEXOPZ','886854xHSZbs','isTTY','\x20(y/N):\x20','3948ewomTL','setRawMode','stderr','createInterface','99yJKwoi','setEncoding','13896llOqTf','yes','data','656wDryGC','3300144NZaZoQ','write'];a163_0x49a1=function(){return _0x198b24;};return a163_0x49a1();}export async function confirm(_0x4247e5){const _0x33d506=a163_0x2594,_0x480de6=a163_0x1c2fb6[_0x33d506(0x205)]({'input':process[_0x33d506(0x1f9)],'output':process['stdout']});return new Promise(_0x5a83bf=>{const _0x3f4749=_0x33d506;_0x480de6['question'](_0x4247e5+_0x3f4749(0x201),_0x5b5fb9=>{const _0x426182=_0x3f4749;_0x480de6[_0x426182(0x1fd)](),_0x5a83bf(_0x5b5fb9[_0x426182(0x1f7)]()==='y'||_0x5b5fb9['toLowerCase']()===_0x426182(0x1f0));});});}export async function confirmKey(_0x1c17df){const _0x7a5c7b=a163_0x2594;if(!process[_0x7a5c7b(0x1f9)][_0x7a5c7b(0x200)])return![];return process[_0x7a5c7b(0x204)]['write'](_0x1c17df+_0x7a5c7b(0x1f8)),new Promise(_0x37b781=>{const _0x1ca95f=_0x7a5c7b,_0x3c7ebd=process[_0x1ca95f(0x1f9)];_0x3c7ebd[_0x1ca95f(0x203)](!![]),_0x3c7ebd['resume'](),_0x3c7ebd[_0x1ca95f(0x1ee)]('utf8');const _0x3ca2bd=_0x1a76de=>{const _0x4d353c=_0x1ca95f;_0x3c7ebd['setRawMode'](![]),_0x3c7ebd[_0x4d353c(0x1fb)](),_0x3c7ebd[_0x4d353c(0x1fc)]('data',_0x3ca2bd);if(_0x1a76de==='\x1b'){process[_0x4d353c(0x204)][_0x4d353c(0x1f4)]('\x0a'),_0x37b781(![]);return;}_0x1a76de==='\x03'&&(process[_0x4d353c(0x204)][_0x4d353c(0x1f4)]('\x0a'),process['exit'](0x82));if(_0x1a76de['toLowerCase']()==='y'){process[_0x4d353c(0x204)][_0x4d353c(0x1f4)]('y\x0a'),_0x37b781(!![]);return;}process[_0x4d353c(0x204)][_0x4d353c(0x1f4)]('\x0a'),_0x37b781(![]);};_0x3c7ebd['on'](_0x1ca95f(0x1f1),_0x3ca2bd);});}
1
+ (function(_0x287584,_0x4dbd16){const _0x31b0e4=a163_0x44db,_0x26ae27=_0x287584();while(!![]){try{const _0x2d5b7a=parseInt(_0x31b0e4(0x1e0))/0x1*(parseInt(_0x31b0e4(0x1e5))/0x2)+parseInt(_0x31b0e4(0x1ec))/0x3+-parseInt(_0x31b0e4(0x1f6))/0x4+-parseInt(_0x31b0e4(0x1f0))/0x5*(-parseInt(_0x31b0e4(0x1ea))/0x6)+-parseInt(_0x31b0e4(0x1e4))/0x7*(-parseInt(_0x31b0e4(0x1f7))/0x8)+-parseInt(_0x31b0e4(0x1e1))/0x9+-parseInt(_0x31b0e4(0x1f8))/0xa*(-parseInt(_0x31b0e4(0x1ed))/0xb);if(_0x2d5b7a===_0x4dbd16)break;else _0x26ae27['push'](_0x26ae27['shift']());}catch(_0x584e1b){_0x26ae27['push'](_0x26ae27['shift']());}}}(a163_0x13f1,0x7a929));function a163_0x44db(_0x31513d,_0x4831b0){_0x31513d=_0x31513d-0x1de;const _0x13f1f7=a163_0x13f1();let _0x44db06=_0x13f1f7[_0x31513d];return _0x44db06;}import*as a163_0x2147ac from'readline';export async function confirm(_0x4aee38){const _0x5a58f2=a163_0x44db,_0x1accd5=a163_0x2147ac['createInterface']({'input':process[_0x5a58f2(0x1ee)],'output':process['stdout']});return new Promise(_0x57fc84=>{const _0x4bc29e=_0x5a58f2;_0x1accd5[_0x4bc29e(0x1de)](_0x4aee38+'\x20(y/N):\x20',_0x22669a=>{const _0x3aca3e=_0x4bc29e;_0x1accd5[_0x3aca3e(0x1f3)](),_0x57fc84(_0x22669a[_0x3aca3e(0x1e6)]()==='y'||_0x22669a['toLowerCase']()===_0x3aca3e(0x1e9));});});}export async function confirmKey(_0x28e577){const _0x7a78ad=a163_0x44db;if(!process[_0x7a78ad(0x1ee)][_0x7a78ad(0x1e7)])return![];return process[_0x7a78ad(0x1e8)][_0x7a78ad(0x1f1)](_0x28e577+_0x7a78ad(0x1e2)),new Promise(_0x5623f0=>{const _0x1d4685=_0x7a78ad,_0x333563=process[_0x1d4685(0x1ee)];_0x333563[_0x1d4685(0x1ef)](!![]),_0x333563[_0x1d4685(0x1eb)](),_0x333563[_0x1d4685(0x1f4)](_0x1d4685(0x1e3));const _0x11f5b3=_0x179fca=>{const _0x5f1730=_0x1d4685;_0x333563[_0x5f1730(0x1ef)](![]),_0x333563[_0x5f1730(0x1df)](),_0x333563[_0x5f1730(0x1f2)](_0x5f1730(0x1f5),_0x11f5b3);if(_0x179fca==='\x1b'){process[_0x5f1730(0x1e8)]['write']('\x0a'),_0x5623f0(![]);return;}_0x179fca==='\x03'&&(process[_0x5f1730(0x1e8)][_0x5f1730(0x1f1)]('\x0a'),process['exit'](0x82));if(_0x179fca['toLowerCase']()==='y'){process[_0x5f1730(0x1e8)][_0x5f1730(0x1f1)]('y\x0a'),_0x5623f0(!![]);return;}process[_0x5f1730(0x1e8)][_0x5f1730(0x1f1)]('\x0a'),_0x5623f0(![]);};_0x333563['on'](_0x1d4685(0x1f5),_0x11f5b3);});}function a163_0x13f1(){const _0x355390=['\x20[y/N]\x20','utf8','1221143aaeYXW','3722ExtLms','toLowerCase','isTTY','stderr','yes','6bftNyH','resume','573342ohpRlx','44rfhxEd','stdin','setRawMode','2243985yzEhce','write','removeListener','close','setEncoding','data','1124392wihAGU','40KqoLZj','265110UBYVoN','question','pause','79sTtsPG','8838576wneSRr'];a163_0x13f1=function(){return _0x355390;};return a163_0x13f1();}
@@ -1 +1 @@
1
- function a164_0x3247(_0x5501cc,_0x555ac8){_0x5501cc=_0x5501cc-0x10a;const _0x516b73=a164_0x516b();let _0x3247b5=_0x516b73[_0x5501cc];return _0x3247b5;}(function(_0x4794fe,_0x6763de){const _0xbb680c=a164_0x3247,_0x35f8c8=_0x4794fe();while(!![]){try{const _0x3b663f=parseInt(_0xbb680c(0x11e))/0x1+parseInt(_0xbb680c(0x10d))/0x2*(-parseInt(_0xbb680c(0x123))/0x3)+parseInt(_0xbb680c(0x11f))/0x4+parseInt(_0xbb680c(0x113))/0x5+-parseInt(_0xbb680c(0x10a))/0x6+parseInt(_0xbb680c(0x121))/0x7+parseInt(_0xbb680c(0x11d))/0x8*(-parseInt(_0xbb680c(0x110))/0x9);if(_0x3b663f===_0x6763de)break;else _0x35f8c8['push'](_0x35f8c8['shift']());}catch(_0x17c31c){_0x35f8c8['push'](_0x35f8c8['shift']());}}}(a164_0x516b,0xa851f));import a164_0x19ef8a from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x53f9a1,_0x5ec7c4={}){const _0x53a782=a164_0x3247,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x5ec7c4;return a164_0x19ef8a({'text':_0x53f9a1,'color':_0x53a782(0x11b),'stream':process[_0x53a782(0x117)],'isEnabled':forceEnabled||process[_0x53a782(0x117)][_0x53a782(0x10b)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0xbf7a8,_0x140008,_0x5101ac={}){const _0x288d57=a164_0x3247,_0x5951f3=_0x5101ac['clock']??(()=>Date[_0x288d57(0x11a)]()),_0xa3f799=createCommandSpinner(_0xbf7a8,_0x5101ac);_0xa3f799[_0x288d57(0x10e)]();const _0x5da629=_0x5951f3();try{const _0x22e572=await _0x140008(),_0x5d522f=_0x5951f3()-_0x5da629;return _0xa3f799[_0x288d57(0x115)](),{'data':_0x22e572,'elapsedMs':_0x5d522f};}catch(_0x36dc24){_0xa3f799[_0x288d57(0x115)]();throw _0x36dc24;}}export async function withProgressSpinner(_0x124106,_0x2f0438,_0x2c51f9={}){const _0x2f1677=a164_0x3247,_0x105dc7=_0x2c51f9[_0x2f1677(0x11c)]??(()=>Date[_0x2f1677(0x11a)]()),_0x7499a7=_0x2c51f9['intervalFactory']??setInterval,_0x4563dd=createCommandSpinner(_0x124106,_0x2c51f9);_0x4563dd[_0x2f1677(0x10e)]();const _0x2bf5ac=_0x105dc7(),_0x4c45df=_0x124106['replace'](_0x2f1677(0x10f),'')['trim']()||_0x2f1677(0x119),_0x84c598={};let _0x430e45=_0x124106;const _0x152e2e=()=>{const _0x188415=_0x2f1677;if(!_0x4563dd['isSpinning'])return;const _0x3e6e19=_0x105dc7()-_0x2bf5ac,_0x4683f3=formatElapsed(_0x3e6e19),_0x296852=_0x84c598[_0x188415(0x10c)]?.[_0x188415(0x114)]()||_0x4c45df,_0x2b6b2c=_0x84c598[_0x188415(0x118)]?_0x188415(0x122)+_0x84c598[_0x188415(0x118)]+']':'',_0x5cdae5=_0x84c598['extra']?'\x20'+_0x84c598[_0x188415(0x120)]:'',_0x325e1d=_0x296852+'\x20'+_0x4683f3+_0x5cdae5+_0x2b6b2c;_0x325e1d!==_0x430e45&&_0x325e1d['trim']()&&(_0x4563dd[_0x188415(0x116)]=_0x325e1d,_0x430e45=_0x325e1d);},_0x3c9a7f=_0x7499a7(()=>{_0x152e2e();},0x3e8),_0x8d0a1b={'setPhase':_0x15ac25=>{const _0x10f1af=_0x2f1677;_0x84c598[_0x10f1af(0x10c)]=_0x15ac25;const _0x45460a=_0x15ac25?.[_0x10f1af(0x114)]()||_0x4c45df,_0x18697a=_0x105dc7()-_0x2bf5ac,_0xaff388=formatElapsed(_0x18697a),_0xae9bf3=_0x84c598[_0x10f1af(0x118)]?'\x20[Job\x20ID:\x20'+_0x84c598[_0x10f1af(0x118)]+']':'',_0x545337=_0x84c598[_0x10f1af(0x120)]?'\x20'+_0x84c598['extra']:'',_0xda68d0=_0x45460a+'\x20'+_0xaff388+_0x545337+_0xae9bf3;_0x4563dd['isSpinning']&&_0xda68d0[_0x10f1af(0x114)]()&&(_0x4563dd[_0x10f1af(0x116)]=_0xda68d0,_0x430e45=_0xda68d0);},'setJobId':_0xa23e82=>{const _0x564ca6=_0x2f1677;_0x84c598[_0x564ca6(0x118)]=_0xa23e82,_0x152e2e();},'setExtra':_0x17153d=>{_0x84c598['extra']=_0x17153d,_0x152e2e();}};_0x152e2e();try{const _0x102c7d=await _0x2f0438(_0x8d0a1b),_0x201c35=_0x105dc7()-_0x2bf5ac;return{'data':_0x102c7d,'elapsedMs':_0x201c35};}finally{clearInterval(_0x3c9a7f),_0x4563dd[_0x2f1677(0x115)]();}}export function formatElapsed(_0xe2816){const _0x4eda34=a164_0x3247,_0x2ef25b=Math[_0x4eda34(0x112)](_0xe2816/0x3e8);if(_0x2ef25b<0x3c)return(_0xe2816/0x3e8)[_0x4eda34(0x111)](0x1)+'s';const _0xb867d9=Math[_0x4eda34(0x112)](_0x2ef25b/0x3c),_0x247191=_0x2ef25b%0x3c;if(_0xb867d9<0x3c)return _0xb867d9+'m\x20'+_0x247191+'s';const _0x55a45b=Math[_0x4eda34(0x112)](_0xb867d9/0x3c),_0x1d7ddf=_0xb867d9%0x3c;return _0x55a45b+'h\x20'+_0x1d7ddf+'m';}function a164_0x516b(){const _0x5d8ce7=['cyan','clock','64xIRlqn','626598hlOIcZ','4792288idKDih','extra','6654116jyhgwL','\x20[Job\x20ID:\x20','2131929jpOXjZ','6241038KHhqvN','isTTY','phase','2xgzFYQ','start','...','1125981DiGrTf','toFixed','floor','3329345uRWzHE','trim','stop','text','stderr','jobId','Processing','now'];a164_0x516b=function(){return _0x5d8ce7;};return a164_0x516b();}
1
+ (function(_0x42ef05,_0x465a50){const _0x287ba7=a164_0x593c,_0x58f546=_0x42ef05();while(!![]){try{const _0x560cff=-parseInt(_0x287ba7(0x114))/0x1+parseInt(_0x287ba7(0x11c))/0x2*(parseInt(_0x287ba7(0x108))/0x3)+parseInt(_0x287ba7(0x120))/0x4+parseInt(_0x287ba7(0x10d))/0x5*(-parseInt(_0x287ba7(0x109))/0x6)+-parseInt(_0x287ba7(0x10e))/0x7*(parseInt(_0x287ba7(0x11e))/0x8)+-parseInt(_0x287ba7(0x10b))/0x9*(parseInt(_0x287ba7(0x10c))/0xa)+parseInt(_0x287ba7(0x11b))/0xb;if(_0x560cff===_0x465a50)break;else _0x58f546['push'](_0x58f546['shift']());}catch(_0x293112){_0x58f546['push'](_0x58f546['shift']());}}}(a164_0x45f1,0x2511a));import a164_0x75a5c0 from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x455c5f,_0x90830b={}){const _0x636e45=a164_0x593c,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x90830b;return a164_0x75a5c0({'text':_0x455c5f,'color':_0x636e45(0x122),'stream':process[_0x636e45(0x11a)],'isEnabled':forceEnabled||process['stderr']['isTTY']&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}function a164_0x45f1(){const _0x53f4f3=['extra','stop','replace','toFixed','stderr','1659097TNLzOf','554OcHtxE','floor','1054472CxjyEL','phase','903820PmIKuM','isSpinning','cyan','2379cNCZGE','6mItGGa','jobId','9NKhVci','1916430sgPuoB','556865YNqycE','7XDgGFs','...','clock','text','\x20[Job\x20ID:\x20','now','9784OQqrgN','trim'];a164_0x45f1=function(){return _0x53f4f3;};return a164_0x45f1();}function a164_0x593c(_0x25469b,_0x52458e){_0x25469b=_0x25469b-0x108;const _0x45f1ec=a164_0x45f1();let _0x593c0e=_0x45f1ec[_0x25469b];return _0x593c0e;}export async function withSpinner(_0x8c8f30,_0x3465fd,_0x504ba3={}){const _0x45fe57=a164_0x593c,_0xc5a7d0=_0x504ba3['clock']??(()=>Date[_0x45fe57(0x113)]()),_0x9a211e=createCommandSpinner(_0x8c8f30,_0x504ba3);_0x9a211e['start']();const _0x197c22=_0xc5a7d0();try{const _0x247e37=await _0x3465fd(),_0x4f9d8f=_0xc5a7d0()-_0x197c22;return _0x9a211e[_0x45fe57(0x117)](),{'data':_0x247e37,'elapsedMs':_0x4f9d8f};}catch(_0x2b996f){_0x9a211e[_0x45fe57(0x117)]();throw _0x2b996f;}}export async function withProgressSpinner(_0x5b5193,_0x3f3386,_0x3414f3={}){const _0x23a85a=a164_0x593c,_0x1c80be=_0x3414f3[_0x23a85a(0x110)]??(()=>Date[_0x23a85a(0x113)]()),_0x25d35a=_0x3414f3['intervalFactory']??setInterval,_0x5f5bdd=createCommandSpinner(_0x5b5193,_0x3414f3);_0x5f5bdd['start']();const _0xefba42=_0x1c80be(),_0x17d0b4=_0x5b5193[_0x23a85a(0x118)](_0x23a85a(0x10f),'')[_0x23a85a(0x115)]()||'Processing',_0xfe0a0a={};let _0xe0e9b1=_0x5b5193;const _0x78d45f=()=>{const _0x5ef761=_0x23a85a;if(!_0x5f5bdd['isSpinning'])return;const _0x4c21ba=_0x1c80be()-_0xefba42,_0x3f4ad8=formatElapsed(_0x4c21ba),_0x525423=_0xfe0a0a[_0x5ef761(0x11f)]?.[_0x5ef761(0x115)]()||_0x17d0b4,_0x470047=_0xfe0a0a[_0x5ef761(0x10a)]?_0x5ef761(0x112)+_0xfe0a0a[_0x5ef761(0x10a)]+']':'',_0x546610=_0xfe0a0a[_0x5ef761(0x116)]?'\x20'+_0xfe0a0a[_0x5ef761(0x116)]:'',_0x28aaf5=_0x525423+'\x20'+_0x3f4ad8+_0x546610+_0x470047;_0x28aaf5!==_0xe0e9b1&&_0x28aaf5['trim']()&&(_0x5f5bdd[_0x5ef761(0x111)]=_0x28aaf5,_0xe0e9b1=_0x28aaf5);},_0x3e8335=_0x25d35a(()=>{_0x78d45f();},0x3e8),_0x4f0c5c={'setPhase':_0x420470=>{const _0x221d5b=_0x23a85a;_0xfe0a0a[_0x221d5b(0x11f)]=_0x420470;const _0x3d50f9=_0x420470?.[_0x221d5b(0x115)]()||_0x17d0b4,_0x4b2641=_0x1c80be()-_0xefba42,_0x20985b=formatElapsed(_0x4b2641),_0x3664cb=_0xfe0a0a[_0x221d5b(0x10a)]?_0x221d5b(0x112)+_0xfe0a0a[_0x221d5b(0x10a)]+']':'',_0x193b72=_0xfe0a0a[_0x221d5b(0x116)]?'\x20'+_0xfe0a0a[_0x221d5b(0x116)]:'',_0x5f0988=_0x3d50f9+'\x20'+_0x20985b+_0x193b72+_0x3664cb;_0x5f5bdd[_0x221d5b(0x121)]&&_0x5f0988[_0x221d5b(0x115)]()&&(_0x5f5bdd[_0x221d5b(0x111)]=_0x5f0988,_0xe0e9b1=_0x5f0988);},'setJobId':_0x5734c1=>{const _0x35c24d=_0x23a85a;_0xfe0a0a[_0x35c24d(0x10a)]=_0x5734c1,_0x78d45f();},'setExtra':_0x2805c2=>{const _0x526784=_0x23a85a;_0xfe0a0a[_0x526784(0x116)]=_0x2805c2,_0x78d45f();}};_0x78d45f();try{const _0x5aaf96=await _0x3f3386(_0x4f0c5c),_0x3eae55=_0x1c80be()-_0xefba42;return{'data':_0x5aaf96,'elapsedMs':_0x3eae55};}finally{clearInterval(_0x3e8335),_0x5f5bdd[_0x23a85a(0x117)]();}}export function formatElapsed(_0x9fe65b){const _0x30e10a=a164_0x593c,_0x4810c3=Math[_0x30e10a(0x11d)](_0x9fe65b/0x3e8);if(_0x4810c3<0x3c)return(_0x9fe65b/0x3e8)[_0x30e10a(0x119)](0x1)+'s';const _0x215723=Math['floor'](_0x4810c3/0x3c),_0x2d0594=_0x4810c3%0x3c;if(_0x215723<0x3c)return _0x215723+'m\x20'+_0x2d0594+'s';const _0x1c0b09=Math['floor'](_0x215723/0x3c),_0x2c0821=_0x215723%0x3c;return _0x1c0b09+'h\x20'+_0x2c0821+'m';}
@@ -1 +1 @@
1
- function a165_0x5500(){const _0x5cf400=['debug','12744050UYsblM','575799pTlInP','event','1665smkYVF','Response\x20body\x20is\x20null','3gPCpNo','getReader','3230633spqwdH','releaseLock','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','pop','body','1907136EwAIfp','decode','[LLM\x20API\x20SSE]\x20','2165292VYVfmW','59274BuuQMH','split','indexOf','1516YVpdsj','read','664eEeKjW','startsWith','slice','data'];a165_0x5500=function(){return _0x5cf400;};return a165_0x5500();}function a165_0x1b24(_0x30c421,_0xf8c1ac){_0x30c421=_0x30c421-0x104;const _0x55000d=a165_0x5500();let _0x1b24ee=_0x55000d[_0x30c421];return _0x1b24ee;}(function(_0x3592a1,_0x9afce6){const _0x266fd1=a165_0x1b24,_0x5117a9=_0x3592a1();while(!![]){try{const _0x117d33=-parseInt(_0x266fd1(0x10e))/0x1+parseInt(_0x266fd1(0x11c))/0x2*(parseInt(_0x266fd1(0x112))/0x3)+-parseInt(_0x266fd1(0x106))/0x4*(-parseInt(_0x266fd1(0x110))/0x5)+-parseInt(_0x266fd1(0x119))/0x6+-parseInt(_0x266fd1(0x114))/0x7+parseInt(_0x266fd1(0x108))/0x8*(-parseInt(_0x266fd1(0x11d))/0x9)+parseInt(_0x266fd1(0x10d))/0xa;if(_0x117d33===_0x9afce6)break;else _0x5117a9['push'](_0x5117a9['shift']());}catch(_0xc3a205){_0x5117a9['push'](_0x5117a9['shift']());}}}(a165_0x5500,0x8df46));export async function*parseSSEStream(_0x755521,_0x4ae967){const _0x1d56d0=a165_0x1b24;if(!_0x755521[_0x1d56d0(0x118)])throw new Error(_0x1d56d0(0x111));const _0xaa52b8=_0x755521['body'][_0x1d56d0(0x113)](),_0x2918dc=new TextDecoder();let _0x50b589='',_0x4a230d={};try{while(!![]){const {done:_0x577e95,value:_0x15b79a}=await _0xaa52b8[_0x1d56d0(0x107)]();if(_0x577e95){if(_0x4a230d['data']){_0x4ae967?.[_0x1d56d0(0x10c)](_0x1d56d0(0x11b)+_0x4a230d[_0x1d56d0(0x10b)]);const _0xfcee1f=parseSSEData(_0x4a230d[_0x1d56d0(0x10b)]);yield _0xfcee1f;}break;}_0x50b589+=_0x2918dc[_0x1d56d0(0x11a)](_0x15b79a,{'stream':!![]});const _0xfaf3b9=_0x50b589[_0x1d56d0(0x104)]('\x0a');_0x50b589=_0xfaf3b9[_0x1d56d0(0x117)]()||'';for(const _0x15f12f of _0xfaf3b9){if(_0x15f12f['trim']()===''){if(_0x4a230d[_0x1d56d0(0x10b)]){_0x4ae967?.['debug'](_0x1d56d0(0x11b)+_0x4a230d[_0x1d56d0(0x10b)]);const _0x459b71=parseSSEData(_0x4a230d[_0x1d56d0(0x10b)]);yield _0x459b71,_0x4a230d={};}continue;}if(_0x15f12f[_0x1d56d0(0x109)](':'))continue;const _0x384224=_0x15f12f[_0x1d56d0(0x105)](':');if(_0x384224===-0x1)continue;const _0x19b734=_0x15f12f[_0x1d56d0(0x10a)](0x0,_0x384224);let _0x4ae100=_0x15f12f[_0x1d56d0(0x10a)](_0x384224+0x1);_0x4ae100[_0x1d56d0(0x109)]('\x20')&&(_0x4ae100=_0x4ae100[_0x1d56d0(0x10a)](0x1));switch(_0x19b734){case _0x1d56d0(0x10f):_0x4a230d[_0x1d56d0(0x10f)]=_0x4ae100;break;case _0x1d56d0(0x10b):_0x4a230d[_0x1d56d0(0x10b)]=_0x4a230d[_0x1d56d0(0x10b)]?_0x4a230d[_0x1d56d0(0x10b)]+'\x0a'+_0x4ae100:_0x4ae100;break;case'id':_0x4a230d['id']=_0x4ae100;break;}}}}finally{_0xaa52b8[_0x1d56d0(0x115)]();}}function parseSSEData(_0x5abe78){const _0x5256aa=a165_0x1b24;try{return JSON['parse'](_0x5abe78);}catch(_0x383c96){throw new Error(_0x5256aa(0x116)+_0x5abe78,{'cause':_0x383c96});}}
1
+ (function(_0x2f6665,_0x172d3b){const _0xbd7e3c=a165_0x1ac8,_0x44df30=_0x2f6665();while(!![]){try{const _0x42422f=-parseInt(_0xbd7e3c(0xe2))/0x1*(-parseInt(_0xbd7e3c(0xd2))/0x2)+parseInt(_0xbd7e3c(0xd3))/0x3+-parseInt(_0xbd7e3c(0xe4))/0x4*(parseInt(_0xbd7e3c(0xdf))/0x5)+parseInt(_0xbd7e3c(0xdb))/0x6+parseInt(_0xbd7e3c(0xde))/0x7*(parseInt(_0xbd7e3c(0xd1))/0x8)+-parseInt(_0xbd7e3c(0xe1))/0x9+parseInt(_0xbd7e3c(0xda))/0xa*(-parseInt(_0xbd7e3c(0xe0))/0xb);if(_0x42422f===_0x172d3b)break;else _0x44df30['push'](_0x44df30['shift']());}catch(_0x5655f0){_0x44df30['push'](_0x44df30['shift']());}}}(a165_0x7cfe,0xe4682));function a165_0x7cfe(){const _0x4859cd=['1JpZZuw','parse','4904352rGiXrJ','body','getReader','debug','trim','event','Response\x20body\x20is\x20null','slice','10588232YbJUIf','3272926iPAJZz','5252139NYniVk','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','releaseLock','[LLM\x20API\x20SSE]\x20','data','startsWith','decode','251060dKocaR','5870460bthimc','pop','indexOf','7Zfbfpm','5dKeYVI','1529xXMZHF','339651xNGnye'];a165_0x7cfe=function(){return _0x4859cd;};return a165_0x7cfe();}export async function*parseSSEStream(_0x479a30,_0x395e95){const _0x3efa88=a165_0x1ac8;if(!_0x479a30['body'])throw new Error(_0x3efa88(0xea));const _0x327131=_0x479a30[_0x3efa88(0xe5)][_0x3efa88(0xe6)](),_0x296284=new TextDecoder();let _0x4b07f8='',_0x2d9703={};try{while(!![]){const {done:_0x5b9eb1,value:_0x40281b}=await _0x327131['read']();if(_0x5b9eb1){if(_0x2d9703[_0x3efa88(0xd7)]){_0x395e95?.['debug']('[LLM\x20API\x20SSE]\x20'+_0x2d9703[_0x3efa88(0xd7)]);const _0xf6be79=parseSSEData(_0x2d9703[_0x3efa88(0xd7)]);yield _0xf6be79;}break;}_0x4b07f8+=_0x296284[_0x3efa88(0xd9)](_0x40281b,{'stream':!![]});const _0xa0010d=_0x4b07f8['split']('\x0a');_0x4b07f8=_0xa0010d[_0x3efa88(0xdc)]()||'';for(const _0x313f75 of _0xa0010d){if(_0x313f75[_0x3efa88(0xe8)]()===''){if(_0x2d9703[_0x3efa88(0xd7)]){_0x395e95?.[_0x3efa88(0xe7)](_0x3efa88(0xd6)+_0x2d9703[_0x3efa88(0xd7)]);const _0xad4733=parseSSEData(_0x2d9703[_0x3efa88(0xd7)]);yield _0xad4733,_0x2d9703={};}continue;}if(_0x313f75['startsWith'](':'))continue;const _0x2d0f2b=_0x313f75[_0x3efa88(0xdd)](':');if(_0x2d0f2b===-0x1)continue;const _0x564790=_0x313f75[_0x3efa88(0xd0)](0x0,_0x2d0f2b);let _0x158205=_0x313f75[_0x3efa88(0xd0)](_0x2d0f2b+0x1);_0x158205[_0x3efa88(0xd8)]('\x20')&&(_0x158205=_0x158205[_0x3efa88(0xd0)](0x1));switch(_0x564790){case _0x3efa88(0xe9):_0x2d9703[_0x3efa88(0xe9)]=_0x158205;break;case'data':_0x2d9703['data']=_0x2d9703[_0x3efa88(0xd7)]?_0x2d9703[_0x3efa88(0xd7)]+'\x0a'+_0x158205:_0x158205;break;case'id':_0x2d9703['id']=_0x158205;break;}}}}finally{_0x327131[_0x3efa88(0xd5)]();}}function a165_0x1ac8(_0x258a31,_0xb3b28b){_0x258a31=_0x258a31-0xd0;const _0x7cfe60=a165_0x7cfe();let _0x1ac82b=_0x7cfe60[_0x258a31];return _0x1ac82b;}function parseSSEData(_0x5bdded){const _0x286716=a165_0x1ac8;try{return JSON[_0x286716(0xe3)](_0x5bdded);}catch(_0x5a2036){throw new Error(_0x286716(0xd4)+_0x5bdded,{'cause':_0x5a2036});}}
@@ -1 +1 @@
1
- (function(_0x41202b,_0x5395ca){const _0xe54bea=a166_0x5d58,_0x5e5d5f=_0x41202b();while(!![]){try{const _0x44de2a=-parseInt(_0xe54bea(0x1db))/0x1+-parseInt(_0xe54bea(0x1df))/0x2*(parseInt(_0xe54bea(0x1cd))/0x3)+-parseInt(_0xe54bea(0x1e8))/0x4*(-parseInt(_0xe54bea(0x1d7))/0x5)+parseInt(_0xe54bea(0x1e7))/0x6*(parseInt(_0xe54bea(0x1d1))/0x7)+parseInt(_0xe54bea(0x1d0))/0x8*(parseInt(_0xe54bea(0x1da))/0x9)+parseInt(_0xe54bea(0x1dd))/0xa*(parseInt(_0xe54bea(0x1e5))/0xb)+parseInt(_0xe54bea(0x1cf))/0xc;if(_0x44de2a===_0x5395ca)break;else _0x5e5d5f['push'](_0x5e5d5f['shift']());}catch(_0x56f0d6){_0x5e5d5f['push'](_0x5e5d5f['shift']());}}}(a166_0x4205,0xedaa5));import a166_0x2ca099 from'string-width';function a166_0x5d58(_0x5a7bfd,_0x1c7153){_0x5a7bfd=_0x5a7bfd-0x1cd;const _0x4205e1=a166_0x4205();let _0x5d582a=_0x4205e1[_0x5a7bfd];return _0x5d582a;}export function stringWidth(_0x5cfa07){return a166_0x2ca099(_0x5cfa07);}export function padEnd(_0x3a051b,_0x5dc4f4){const _0x3bc329=a166_0x5d58,_0x3415e8=stringWidth(_0x3a051b);if(_0x3415e8>=_0x5dc4f4)return _0x3a051b;return _0x3a051b+'\x20'[_0x3bc329(0x1d8)](_0x5dc4f4-_0x3415e8);}export function padStart(_0x1e270e,_0x576f6e){const _0x44bfa0=a166_0x5d58,_0x1aa331=stringWidth(_0x1e270e);if(_0x1aa331>=_0x576f6e)return _0x1e270e;return'\x20'[_0x44bfa0(0x1d8)](_0x576f6e-_0x1aa331)+_0x1e270e;}export function centerAlign(_0x5d96fa,_0x315798){const _0x4c2b0f=a166_0x5d58,_0x3700bd=stringWidth(_0x5d96fa);if(_0x3700bd>_0x315798){if(_0x315798<=0x1)return'…'[_0x4c2b0f(0x1d6)](0x0,_0x315798);let _0x2d04cf=_0x5d96fa;while(stringWidth(_0x2d04cf+'…')>_0x315798){_0x2d04cf=_0x2d04cf['slice'](0x0,-0x1);}return _0x2d04cf+'…';}if(_0x3700bd===_0x315798)return _0x5d96fa;const _0x3edd60=_0x315798-_0x3700bd,_0x57afde=Math[_0x4c2b0f(0x1d4)](_0x3edd60/0x2),_0x117b9e=_0x3edd60-_0x57afde;return'\x20'['repeat'](_0x57afde)+_0x5d96fa+'\x20'[_0x4c2b0f(0x1d8)](_0x117b9e);}export function escapeStringLiteral(_0x8d0329){const _0x2e25c6=a166_0x5d58;if(!_0x8d0329||_0x8d0329[_0x2e25c6(0x1e6)]()[_0x2e25c6(0x1d9)]===0x0)throw new Error(_0x2e25c6(0x1e0));const _0x1ae10c=_0x8d0329[_0x2e25c6(0x1ce)](/'/g,'\x27\x27');return'\x27'+_0x1ae10c+'\x27';}export function globToLike(_0x1071ce){const _0x283b1c=a166_0x5d58;let _0x5641b3=_0x1071ce[_0x283b1c(0x1ce)](/\\/g,'\x5c\x5c')[_0x283b1c(0x1ce)](/%/g,'\x5c%')[_0x283b1c(0x1ce)](/_/g,'\x5c_');return _0x5641b3=_0x5641b3[_0x283b1c(0x1ce)](/\*/g,'%')[_0x283b1c(0x1ce)](/\?/g,'_'),_0x5641b3;}export function buildLikePattern(_0x483d05){const _0x3b4723=a166_0x5d58;if(!_0x483d05||_0x483d05['trim']()[_0x3b4723(0x1d9)]===0x0)throw new Error(_0x3b4723(0x1e3));const _0x50b739=globToLike(_0x483d05),_0x41795c=_0x50b739[_0x3b4723(0x1ce)](/'/g,'\x27\x27');return'\x27'+_0x41795c+'\x27';}export function matchGlobPattern(_0x255512,_0x2e13d2){const _0x51639f=a166_0x5d58,_0x2e014e=_0x2e13d2[_0x51639f(0x1ce)](/[.+^${}()|[\]\\]/g,_0x51639f(0x1d2))['replace'](/\*/g,'.*')['replace'](/\?/g,'.'),_0x3e87f4=new RegExp('^'+_0x2e014e+'$');return _0x3e87f4[_0x51639f(0x1e1)](_0x255512);}export function getSanitizedUsername(){const _0x2599e2=a166_0x5d58,_0x355f8a=process[_0x2599e2(0x1d5)][_0x2599e2(0x1de)]||process[_0x2599e2(0x1d5)][_0x2599e2(0x1e2)]||_0x2599e2(0x1dc);return _0x355f8a['replace'](/[^a-zA-Z0-9]/g,'')[_0x2599e2(0x1e4)]();}export function generateRandomHex(){const _0x4ae855=a166_0x5d58,_0x4be1d0=Math[_0x4ae855(0x1d4)](Math[_0x4ae855(0x1d3)]()*0xfffff);return _0x4be1d0['toString'](0x10)['padStart'](0x5,'0');}export function sanitizeFileName(_0x42e1f){const _0xbe6b43=a166_0x5d58;return _0x42e1f[_0xbe6b43(0x1e4)]()[_0xbe6b43(0x1ce)](/[/\\:*?"<>|]/g,'-')[_0xbe6b43(0x1ce)](/\s+/g,'-')['replace'](/-+/g,'-')[_0xbe6b43(0x1ce)](/^-|-$/g,'');}function a166_0x4205(){const _0x86dc3f=['296BzkoJo','63UDobfm','\x5c$&','random','floor','env','substring','15960gmmazp','repeat','length','57411XtqQlz','1253366dwCtiT','unknown','5814310uFtDCj','USER','141458vyHxrU','Cannot\x20escape\x20empty\x20string\x20literal','test','USERNAME','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','toLowerCase','11gPeIkV','trim','194778KfmcTU','24toQKfj','3aNZakU','replace','14025588yGPZyj'];a166_0x4205=function(){return _0x86dc3f;};return a166_0x4205();}
1
+ (function(_0x44b6cf,_0x59b035){const _0x3d51d2=a166_0x5ef6,_0x2d4868=_0x44b6cf();while(!![]){try{const _0xf38491=-parseInt(_0x3d51d2(0x1f2))/0x1+-parseInt(_0x3d51d2(0x1fc))/0x2+-parseInt(_0x3d51d2(0x201))/0x3+-parseInt(_0x3d51d2(0x1fe))/0x4+parseInt(_0x3d51d2(0x1f9))/0x5+-parseInt(_0x3d51d2(0x1f0))/0x6*(parseInt(_0x3d51d2(0x1fd))/0x7)+parseInt(_0x3d51d2(0x1f5))/0x8;if(_0xf38491===_0x59b035)break;else _0x2d4868['push'](_0x2d4868['shift']());}catch(_0x37a1dd){_0x2d4868['push'](_0x2d4868['shift']());}}}(a166_0x2201,0x3a7df));import a166_0xf4751a from'string-width';export function stringWidth(_0x57f11e){return a166_0xf4751a(_0x57f11e);}function a166_0x5ef6(_0x22729f,_0x29a655){_0x22729f=_0x22729f-0x1ef;const _0x2201b9=a166_0x2201();let _0x5ef6ec=_0x2201b9[_0x22729f];return _0x5ef6ec;}export function padEnd(_0x331c67,_0x1ef770){const _0x36255b=a166_0x5ef6,_0x2e8cb6=stringWidth(_0x331c67);if(_0x2e8cb6>=_0x1ef770)return _0x331c67;return _0x331c67+'\x20'[_0x36255b(0x1f1)](_0x1ef770-_0x2e8cb6);}export function padStart(_0x344b92,_0x8154db){const _0x2e6a06=a166_0x5ef6,_0x5b8965=stringWidth(_0x344b92);if(_0x5b8965>=_0x8154db)return _0x344b92;return'\x20'[_0x2e6a06(0x1f1)](_0x8154db-_0x5b8965)+_0x344b92;}function a166_0x2201(){const _0x2f4b19=['509510wCMunI','test','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','180614TZtspY','221669qoDcBJ','1782540nvPPIh','USERNAME','substring','1252956HPbLmh','unknown','slice','random','length','90Ucayca','repeat','364975EZIhzv','toLowerCase','trim','15450040EghDmp','padStart','env','replace'];a166_0x2201=function(){return _0x2f4b19;};return a166_0x2201();}export function centerAlign(_0x167f64,_0x545c13){const _0x11c7db=a166_0x5ef6,_0x38238f=stringWidth(_0x167f64);if(_0x38238f>_0x545c13){if(_0x545c13<=0x1)return'…'[_0x11c7db(0x200)](0x0,_0x545c13);let _0xa4a7d0=_0x167f64;while(stringWidth(_0xa4a7d0+'…')>_0x545c13){_0xa4a7d0=_0xa4a7d0[_0x11c7db(0x203)](0x0,-0x1);}return _0xa4a7d0+'…';}if(_0x38238f===_0x545c13)return _0x167f64;const _0x35aa3a=_0x545c13-_0x38238f,_0x51e0ea=Math['floor'](_0x35aa3a/0x2),_0x5ac899=_0x35aa3a-_0x51e0ea;return'\x20'[_0x11c7db(0x1f1)](_0x51e0ea)+_0x167f64+'\x20'[_0x11c7db(0x1f1)](_0x5ac899);}export function escapeStringLiteral(_0x4399a8){const _0x7ecaa4=a166_0x5ef6;if(!_0x4399a8||_0x4399a8[_0x7ecaa4(0x1f4)]()[_0x7ecaa4(0x1ef)]===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x2bdc48=_0x4399a8[_0x7ecaa4(0x1f8)](/'/g,'\x27\x27');return'\x27'+_0x2bdc48+'\x27';}export function globToLike(_0x48b655){const _0x3f862e=a166_0x5ef6;let _0x4e8eb4=_0x48b655['replace'](/\\/g,'\x5c\x5c')[_0x3f862e(0x1f8)](/%/g,'\x5c%')[_0x3f862e(0x1f8)](/_/g,'\x5c_');return _0x4e8eb4=_0x4e8eb4[_0x3f862e(0x1f8)](/\*/g,'%')[_0x3f862e(0x1f8)](/\?/g,'_'),_0x4e8eb4;}export function buildLikePattern(_0x5277b2){const _0x2ac575=a166_0x5ef6;if(!_0x5277b2||_0x5277b2['trim']()[_0x2ac575(0x1ef)]===0x0)throw new Error(_0x2ac575(0x1fb));const _0x489b02=globToLike(_0x5277b2),_0xfbc334=_0x489b02['replace'](/'/g,'\x27\x27');return'\x27'+_0xfbc334+'\x27';}export function matchGlobPattern(_0x1df65d,_0x537bb4){const _0x53336f=a166_0x5ef6,_0x12f2e0=_0x537bb4[_0x53336f(0x1f8)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x53336f(0x1f8)](/\?/g,'.'),_0x4678f9=new RegExp('^'+_0x12f2e0+'$');return _0x4678f9[_0x53336f(0x1fa)](_0x1df65d);}export function getSanitizedUsername(){const _0x1a8530=a166_0x5ef6,_0x11fe80=process[_0x1a8530(0x1f7)]['USER']||process[_0x1a8530(0x1f7)][_0x1a8530(0x1ff)]||_0x1a8530(0x202);return _0x11fe80[_0x1a8530(0x1f8)](/[^a-zA-Z0-9]/g,'')[_0x1a8530(0x1f3)]();}export function generateRandomHex(){const _0x5a7ccc=a166_0x5ef6,_0x2fd3ad=Math['floor'](Math[_0x5a7ccc(0x204)]()*0xfffff);return _0x2fd3ad['toString'](0x10)[_0x5a7ccc(0x1f6)](0x5,'0');}export function sanitizeFileName(_0x37f80b){const _0x13b605=a166_0x5ef6;return _0x37f80b[_0x13b605(0x1f3)]()[_0x13b605(0x1f8)](/[/\\:*?"<>|]/g,'-')[_0x13b605(0x1f8)](/\s+/g,'-')[_0x13b605(0x1f8)](/-+/g,'-')[_0x13b605(0x1f8)](/^-|-$/g,'');}
@@ -1 +1 @@
1
- (function(_0x225c3e,_0x4212d5){const _0x142161=a167_0x49c3,_0x415c78=_0x225c3e();while(!![]){try{const _0x525dd0=-parseInt(_0x142161(0x13f))/0x1*(parseInt(_0x142161(0x147))/0x2)+-parseInt(_0x142161(0x146))/0x3+-parseInt(_0x142161(0x152))/0x4*(-parseInt(_0x142161(0x142))/0x5)+-parseInt(_0x142161(0x148))/0x6+parseInt(_0x142161(0x153))/0x7*(parseInt(_0x142161(0x159))/0x8)+parseInt(_0x142161(0x154))/0x9+parseInt(_0x142161(0x157))/0xa;if(_0x525dd0===_0x4212d5)break;else _0x415c78['push'](_0x415c78['shift']());}catch(_0x23a1fb){_0x415c78['push'](_0x415c78['shift']());}}}(a167_0x3b77,0xc1371));function hasWildcard(_0x5f17b2){const _0x26490e=a167_0x49c3;return _0x5f17b2[_0x26490e(0x14c)]('*')||_0x5f17b2[_0x26490e(0x14c)]('?');}function a167_0x49c3(_0x555c65,_0x76269e){_0x555c65=_0x555c65-0x13f;const _0x3b77f0=a167_0x3b77();let _0x49c331=_0x3b77f0[_0x555c65];return _0x49c331;}export function parseTableReference(_0x2e7c4b){const _0x3dce51=a167_0x49c3;if(!_0x2e7c4b||_0x2e7c4b[_0x3dce51(0x14b)]()['length']===0x0)throw new Error(_0x3dce51(0x14f));const _0x17e24d=_0x2e7c4b['trim'](),_0x2b5f96={'original':_0x17e24d},_0x5cb421=_0x17e24d[_0x3dce51(0x141)]('.');if(_0x5cb421[_0x3dce51(0x14a)]===0x1){const _0x34e23b=_0x5cb421[0x0];if(!_0x34e23b)throw new Error(_0x3dce51(0x151));_0x2b5f96[_0x3dce51(0x143)]=_0x34e23b;}else{if(_0x5cb421[_0x3dce51(0x14a)]===0x2){const [_0x20d171,_0x134166]=_0x5cb421;if(!_0x20d171)throw new Error(_0x3dce51(0x145));if(!_0x134166)throw new Error(_0x3dce51(0x14d));_0x2b5f96[_0x3dce51(0x155)]=_0x20d171,_0x2b5f96['table']=_0x134166;}else{if(_0x5cb421[_0x3dce51(0x14a)]===0x3){const [_0x310e87,_0x5752c8,_0x343d7f]=_0x5cb421;if(!_0x310e87||!_0x5752c8||!_0x343d7f)throw new Error(_0x3dce51(0x144));_0x2b5f96['catalog']=_0x310e87,_0x2b5f96['database']=_0x5752c8,_0x2b5f96[_0x3dce51(0x143)]=_0x343d7f;}else throw new Error(_0x3dce51(0x158));}}return _0x2b5f96;}export function formatTableReference(_0x527d38){const _0x291206=a167_0x49c3,_0x4cbcd9=[];return _0x527d38[_0x291206(0x14e)]&&_0x4cbcd9['push'](_0x527d38['catalog']),_0x527d38[_0x291206(0x155)]&&_0x4cbcd9[_0x291206(0x149)](_0x527d38[_0x291206(0x155)]),_0x527d38[_0x291206(0x143)]&&_0x4cbcd9[_0x291206(0x149)](_0x527d38[_0x291206(0x143)]),_0x4cbcd9['join']('.');}export function validateTableListReference(_0x27a976){return undefined;}function a167_0x3b77(){const _0xafbe28=['16806840UKjqrR','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','488gvJmmP','275XHvxfN','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','split','9895ZYSeKJ','table','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','4315077FJUyzt','790WdBSsy','8616348TWrZQI','push','length','trim','includes','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','catalog','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','Pattern\x20cannot\x20be\x20just\x20a\x20dot','1184AeKEeZ','145390fMhnfp','2169117ZRAJRw','database','Table\x20name\x20is\x20required\x20for\x20describe\x20operation'];a167_0x3b77=function(){return _0xafbe28;};return a167_0x3b77();}export function validateTableDescribeReference(_0x2dedb3){const _0x35a9f2=a167_0x49c3;if(!_0x2dedb3[_0x35a9f2(0x143)])return _0x35a9f2(0x156);if(_0x2dedb3[_0x35a9f2(0x155)]&&hasWildcard(_0x2dedb3['database']))return _0x35a9f2(0x140);if(hasWildcard(_0x2dedb3[_0x35a9f2(0x143)]))return _0x35a9f2(0x150);return undefined;}
1
+ function a167_0x5a49(){const _0x3e9d6c=['2234YIuPXI','includes','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','54fBuzzy','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','trim','table','450568PWQkEf','16BlMsKl','799914IiHVUk','5HJXcta','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','catalog','length','database','718HHsJxQ','2119548esWcEz','3867528SlXZpL','11027010oTDAUY','split','join','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','push','2857448aTTirh','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','Table\x20name\x20is\x20required\x20for\x20describe\x20operation'];a167_0x5a49=function(){return _0x3e9d6c;};return a167_0x5a49();}(function(_0x137715,_0x5ac2e4){const _0x3700e3=a167_0x2c3b,_0x39e48e=_0x137715();while(!![]){try{const _0x4f78ed=-parseInt(_0x3700e3(0x1bc))/0x1*(parseInt(_0x3700e3(0x1ab))/0x2)+-parseInt(_0x3700e3(0x1b5))/0x3*(-parseInt(_0x3700e3(0x1b4))/0x4)+-parseInt(_0x3700e3(0x1b6))/0x5*(-parseInt(_0x3700e3(0x1bd))/0x6)+parseInt(_0x3700e3(0x1be))/0x7+parseInt(_0x3700e3(0x1b3))/0x8*(parseInt(_0x3700e3(0x1af))/0x9)+-parseInt(_0x3700e3(0x1bf))/0xa+parseInt(_0x3700e3(0x1c4))/0xb;if(_0x4f78ed===_0x5ac2e4)break;else _0x39e48e['push'](_0x39e48e['shift']());}catch(_0x7b05f0){_0x39e48e['push'](_0x39e48e['shift']());}}}(a167_0x5a49,0xa26d5));function hasWildcard(_0x38ed12){const _0x390f60=a167_0x2c3b;return _0x38ed12[_0x390f60(0x1ac)]('*')||_0x38ed12[_0x390f60(0x1ac)]('?');}function a167_0x2c3b(_0x4b60d1,_0x1ff776){_0x4b60d1=_0x4b60d1-0x1ab;const _0x5a49d9=a167_0x5a49();let _0x2c3bfd=_0x5a49d9[_0x4b60d1];return _0x2c3bfd;}export function parseTableReference(_0x49ca97){const _0x5063ad=a167_0x2c3b;if(!_0x49ca97||_0x49ca97[_0x5063ad(0x1b1)]()[_0x5063ad(0x1ba)]===0x0)throw new Error(_0x5063ad(0x1c2));const _0x14f5c3=_0x49ca97[_0x5063ad(0x1b1)](),_0x12e948={'original':_0x14f5c3},_0x28676a=_0x14f5c3[_0x5063ad(0x1c0)]('.');if(_0x28676a[_0x5063ad(0x1ba)]===0x1){const _0x24a657=_0x28676a[0x0];if(!_0x24a657)throw new Error('Pattern\x20cannot\x20be\x20just\x20a\x20dot');_0x12e948[_0x5063ad(0x1b2)]=_0x24a657;}else{if(_0x28676a['length']===0x2){const [_0x3350ba,_0x10bf0c]=_0x28676a;if(!_0x3350ba)throw new Error(_0x5063ad(0x1ad));if(!_0x10bf0c)throw new Error(_0x5063ad(0x1ae));_0x12e948[_0x5063ad(0x1bb)]=_0x3350ba,_0x12e948[_0x5063ad(0x1b2)]=_0x10bf0c;}else{if(_0x28676a[_0x5063ad(0x1ba)]===0x3){const [_0x5b7046,_0x2c34dc,_0x5508d0]=_0x28676a;if(!_0x5b7046||!_0x2c34dc||!_0x5508d0)throw new Error(_0x5063ad(0x1b8));_0x12e948[_0x5063ad(0x1b9)]=_0x5b7046,_0x12e948[_0x5063ad(0x1bb)]=_0x2c34dc,_0x12e948[_0x5063ad(0x1b2)]=_0x5508d0;}else throw new Error(_0x5063ad(0x1b7));}}return _0x12e948;}export function formatTableReference(_0x55b6d4){const _0x4458b5=a167_0x2c3b,_0x2487ac=[];return _0x55b6d4[_0x4458b5(0x1b9)]&&_0x2487ac[_0x4458b5(0x1c3)](_0x55b6d4[_0x4458b5(0x1b9)]),_0x55b6d4[_0x4458b5(0x1bb)]&&_0x2487ac['push'](_0x55b6d4[_0x4458b5(0x1bb)]),_0x55b6d4[_0x4458b5(0x1b2)]&&_0x2487ac[_0x4458b5(0x1c3)](_0x55b6d4[_0x4458b5(0x1b2)]),_0x2487ac[_0x4458b5(0x1c1)]('.');}export function validateTableListReference(_0x3f16a4){return undefined;}export function validateTableDescribeReference(_0x3dde1e){const _0x539095=a167_0x2c3b;if(!_0x3dde1e[_0x539095(0x1b2)])return _0x539095(0x1c6);if(_0x3dde1e['database']&&hasWildcard(_0x3dde1e[_0x539095(0x1bb)]))return _0x539095(0x1b0);if(hasWildcard(_0x3dde1e[_0x539095(0x1b2)]))return _0x539095(0x1c5);return undefined;}
@@ -1 +1 @@
1
- const a168_0xd9a6c9=a168_0x4cb7;(function(_0x48ca8f,_0x198526){const _0x6ba1d8=a168_0x4cb7,_0x1b4dc1=_0x48ca8f();while(!![]){try{const _0x2cb88f=parseInt(_0x6ba1d8(0x94))/0x1*(parseInt(_0x6ba1d8(0xbd))/0x2)+parseInt(_0x6ba1d8(0xb0))/0x3*(-parseInt(_0x6ba1d8(0xc4))/0x4)+-parseInt(_0x6ba1d8(0xb1))/0x5+parseInt(_0x6ba1d8(0x9e))/0x6*(parseInt(_0x6ba1d8(0xce))/0x7)+-parseInt(_0x6ba1d8(0xc7))/0x8*(parseInt(_0x6ba1d8(0xd0))/0x9)+parseInt(_0x6ba1d8(0xb4))/0xa+parseInt(_0x6ba1d8(0x96))/0xb;if(_0x2cb88f===_0x198526)break;else _0x1b4dc1['push'](_0x1b4dc1['shift']());}catch(_0x72fd02){_0x1b4dc1['push'](_0x1b4dc1['shift']());}}}(a168_0x380f,0x668b2));import{createWriteStream,createReadStream}from'fs';function a168_0x4cb7(_0x3ccc65,_0x285e51){_0x3ccc65=_0x3ccc65-0x92;const _0x380f28=a168_0x380f();let _0x4cb74d=_0x380f28[_0x3ccc65];return _0x4cb74d;}import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createGzip}from'zlib';import{pipeline}from'stream/promises';import a168_0x448828 from'chalk';function safeStringify(_0x59559e){const _0x45f3d5=a168_0x4cb7;if(typeof _0x59559e===_0x45f3d5(0xc3))return _0x59559e;if(_0x59559e instanceof Error)return _0x59559e[_0x45f3d5(0x9c)]||_0x59559e[_0x45f3d5(0xa8)]+':\x20'+_0x59559e[_0x45f3d5(0xbf)];try{return JSON[_0x45f3d5(0xcf)](_0x59559e,(_0x37c60f,_0x198486)=>{const _0x416b26=_0x45f3d5;if(_0x198486 instanceof Error)return{'name':_0x198486[_0x416b26(0xa8)],'message':_0x198486[_0x416b26(0xbf)],'stack':_0x198486[_0x416b26(0x9c)],'cause':_0x198486[_0x416b26(0xc9)]};return _0x198486;});}catch{return String(_0x59559e);}}function a168_0x380f(){const _0x3b4850=['ERROR','getLogPath','includes','Proxy\x20session\x20ended','58731JhUjrS','3454910kZrINz','getTimezoneOffset','info','1175800LvQXkW','TRACE','logLevel','getDate','cyan','-(\x5cd{4}-\x5cd{2}-\x5cd{2})\x5c.log$','INFO','padStart','fileOnly','4ENCprA','DEBUG','message','logStream','logBaseName','tdx','string','44LXNCWa','getMinutes','logDir','5118888DfzGJp','warn','cause','tdx.log','.log','init','getFullYear','63iaLDhN','stringify','9ouAxLC','toString','rotateOldLogs','error','\x5c$&','354842CQGNwy','replace','11543433dcdSEV','join','getMonth','.cache','logFileName','logs','stack','abs','59694uIqLnl','debug','gray','Warning:\x20Error\x20writing\x20to\x20','close','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','floor','trace','WARN','toISOString','name','write','split','getSeconds'];a168_0x380f=function(){return _0x3b4850;};return a168_0x380f();}function getTimezoneOffset(){const _0x40f3fb=a168_0x4cb7,_0x500671=-new Date()[_0x40f3fb(0xb2)](),_0xdda2a5=Math[_0x40f3fb(0xa4)](Math[_0x40f3fb(0x9d)](_0x500671)/0x3c),_0x256896=Math['abs'](_0x500671)%0x3c,_0x9e9344=_0x500671>=0x0?'+':'-';return''+_0x9e9344+_0xdda2a5[_0x40f3fb(0xd1)]()[_0x40f3fb(0xbb)](0x2,'0')+_0x256896[_0x40f3fb(0xd1)]()[_0x40f3fb(0xbb)](0x2,'0');}function formatTimestamp(){const _0x96ab6d=a168_0x4cb7,_0x5e07ee=new Date(),_0x5aa72e=_0x5e07ee[_0x96ab6d(0xcd)](),_0x495234=(_0x5e07ee[_0x96ab6d(0x98)]()+0x1)[_0x96ab6d(0xd1)]()[_0x96ab6d(0xbb)](0x2,'0'),_0x69f7fb=_0x5e07ee[_0x96ab6d(0xb7)]()[_0x96ab6d(0xd1)]()['padStart'](0x2,'0'),_0x2d22fe=_0x5e07ee['getHours']()[_0x96ab6d(0xd1)]()[_0x96ab6d(0xbb)](0x2,'0'),_0x47a89c=_0x5e07ee[_0x96ab6d(0xc5)]()[_0x96ab6d(0xd1)]()[_0x96ab6d(0xbb)](0x2,'0'),_0x5eeaf0=_0x5e07ee[_0x96ab6d(0xab)]()[_0x96ab6d(0xd1)]()['padStart'](0x2,'0'),_0xcfbfcd=_0x5e07ee['getMilliseconds']()[_0x96ab6d(0xd1)]()[_0x96ab6d(0xbb)](0x3,'0'),_0x5e49c3=getTimezoneOffset();return _0x5aa72e+'-'+_0x495234+'-'+_0x69f7fb+'\x20'+_0x2d22fe+':'+_0x47a89c+':'+_0x5eeaf0+'.'+_0xcfbfcd+_0x5e49c3;}function formatColoredLogEntry(_0x4c6809,_0x1be2ba){const _0x54960a=a168_0x4cb7,_0x4f2045=formatTimestamp(),_0x510c6f=_0x1be2ba['map'](safeStringify)[_0x54960a(0x97)]('\x20'),_0x357ce9=a168_0x448828[_0x54960a(0xa0)](_0x4f2045);let _0x45a095;switch(_0x4c6809){case _0x54960a(0xb3):_0x45a095=a168_0x448828[_0x54960a(0xb8)]('['+_0x4c6809+']\x20');break;case _0x54960a(0xc8):_0x45a095=a168_0x448828['yellow']('['+_0x4c6809+']\x20');break;case _0x54960a(0x92):_0x45a095=a168_0x448828['red']('['+_0x4c6809+']');break;case _0x54960a(0x9f):_0x45a095=a168_0x448828[_0x54960a(0xa0)]('['+_0x4c6809+']');break;default:_0x45a095='['+_0x4c6809+']';}return _0x357ce9+'\x20'+_0x45a095+'\x20'+_0x510c6f;}export var LogLevel;(function(_0x1540ea){const _0x95d4ec=a168_0x4cb7;_0x1540ea[_0x1540ea[_0x95d4ec(0xb5)]=-0x2]=_0x95d4ec(0xb5),_0x1540ea[_0x1540ea[_0x95d4ec(0xbe)]=-0x1]=_0x95d4ec(0xbe),_0x1540ea[_0x1540ea[_0x95d4ec(0xba)]=0x0]='INFO',_0x1540ea[_0x1540ea[_0x95d4ec(0xa6)]=0x1]='WARN',_0x1540ea[_0x1540ea[_0x95d4ec(0xac)]=0x2]=_0x95d4ec(0xac);}(LogLevel||(LogLevel={})));export class TDXLogger{[a168_0xd9a6c9(0xc0)];['logDir'];['logLevel'];[a168_0xd9a6c9(0xbc)];[a168_0xd9a6c9(0x9a)];[a168_0xd9a6c9(0xc1)];constructor(_0x4e7086=LogLevel[a168_0xd9a6c9(0xba)],_0x41662a=![],_0x5da604,_0x2b9fe4=a168_0xd9a6c9(0xca)){const _0x1f9f36=a168_0xd9a6c9;this[_0x1f9f36(0xc6)]=_0x5da604||join(homedir(),_0x1f9f36(0x99),_0x1f9f36(0xc2),_0x1f9f36(0x9b)),this[_0x1f9f36(0xb6)]=_0x4e7086,this[_0x1f9f36(0xbc)]=_0x41662a,this[_0x1f9f36(0x9a)]=_0x2b9fe4,this[_0x1f9f36(0xc1)]=_0x2b9fe4[_0x1f9f36(0x95)](/\.log$/,'');}async[a168_0xd9a6c9(0xcc)](){const _0x21cb06=a168_0xd9a6c9;try{await mkdir(this[_0x21cb06(0xc6)],{'recursive':!![]}),await this[_0x21cb06(0xd2)]();const _0x238653=join(this[_0x21cb06(0xc6)],this[_0x21cb06(0x9a)]);this[_0x21cb06(0xc0)]=createWriteStream(_0x238653,{'flags':'a'}),this['logStream']['on']('error',_0xd77e6c=>{const _0x524544=_0x21cb06;console[_0x524544(0x92)](_0x524544(0xa1)+this['logFileName']+':',_0xd77e6c[_0x524544(0xbf)]);});}catch(_0x3cf623){console[_0x21cb06(0x92)](_0x21cb06(0xa3),_0x3cf623);}}async['rotateOldLogs'](){const _0x209fad=a168_0xd9a6c9;try{const _0x5bc743=await readdir(this[_0x209fad(0xc6)]),_0x1cec2d=new Date()[_0x209fad(0xa7)]()[_0x209fad(0xaa)]('T')[0x0];if(_0x5bc743[_0x209fad(0xae)](this['logFileName'])){const _0x2dc6a0=join(this[_0x209fad(0xc6)],this[_0x209fad(0x9a)]),_0x1befb3=await stat(_0x2dc6a0),_0x351b85=new Date(_0x1befb3['mtime'])[_0x209fad(0xa7)]()[_0x209fad(0xaa)]('T')[0x0];if(_0x351b85<_0x1cec2d){const _0x4a9883=join(this['logDir'],this[_0x209fad(0xc1)]+'-'+_0x351b85+_0x209fad(0xcb));await rename(_0x2dc6a0,_0x4a9883);}}const _0x17b15a=await readdir(this[_0x209fad(0xc6)]),_0x3e9470=this['logBaseName'][_0x209fad(0x95)](/[.*+?^${}()|[\]\\]/g,_0x209fad(0x93)),_0xc1c1b6=new RegExp('^'+_0x3e9470+_0x209fad(0xb9)),_0x2b0d7d=_0x17b15a['filter'](_0x27f9a4=>_0xc1c1b6['test'](_0x27f9a4));for(const _0x2245cf of _0x2b0d7d){const _0x12823b=join(this[_0x209fad(0xc6)],_0x2245cf),_0x157f40=join(this[_0x209fad(0xc6)],_0x2245cf+'.gz');try{await pipeline(createReadStream(_0x12823b),createGzip(),createWriteStream(_0x157f40)),await unlink(_0x12823b);}catch(_0x5c570d){console[_0x209fad(0x92)]('Warning:\x20Failed\x20to\x20compress\x20'+_0x2245cf+':',_0x5c570d);}}}catch{}}['debug'](..._0x176750){const _0x37b293=a168_0xd9a6c9;if(this[_0x37b293(0xb6)]>LogLevel[_0x37b293(0xbe)])return;const _0x337ea3=formatColoredLogEntry(_0x37b293(0x9f),_0x176750);this[_0x37b293(0xc0)]?.[_0x37b293(0xa9)](_0x337ea3+'\x0a');}[a168_0xd9a6c9(0xa5)](..._0x477a22){const _0x50b875=a168_0xd9a6c9;if(this[_0x50b875(0xb6)]>LogLevel[_0x50b875(0xb5)])return;const _0x2a79eb=formatColoredLogEntry(_0x50b875(0xa5),_0x477a22);this[_0x50b875(0xc0)]?.[_0x50b875(0xa9)](_0x2a79eb+'\x0a');}[a168_0xd9a6c9(0xb3)](..._0x5d876e){const _0x10415a=a168_0xd9a6c9;if(this[_0x10415a(0xb6)]>LogLevel[_0x10415a(0xba)])return;const _0x25f8ba=formatColoredLogEntry(_0x10415a(0xb3),_0x5d876e);!this[_0x10415a(0xbc)]&&console['log'](_0x25f8ba),this['logStream']?.['write'](_0x25f8ba+'\x0a');}['warn'](..._0x3a53e7){const _0x5be7ba=a168_0xd9a6c9;if(this['logLevel']>LogLevel[_0x5be7ba(0xa6)])return;const _0x41f53c=formatColoredLogEntry(_0x5be7ba(0xc8),_0x3a53e7);!this[_0x5be7ba(0xbc)]&&console[_0x5be7ba(0x92)](_0x41f53c),this[_0x5be7ba(0xc0)]?.[_0x5be7ba(0xa9)](_0x41f53c+'\x0a');}[a168_0xd9a6c9(0x92)](..._0xa6c07d){const _0x21106b=a168_0xd9a6c9,_0x5328ea=formatColoredLogEntry(_0x21106b(0x92),_0xa6c07d);!this[_0x21106b(0xbc)]&&console['error'](_0x5328ea),this[_0x21106b(0xc0)]?.[_0x21106b(0xa9)](_0x5328ea+'\x0a');}async[a168_0xd9a6c9(0xa2)](){const _0x104e6b=a168_0xd9a6c9;return this['info'](_0x104e6b(0xaf)),new Promise(_0x3d780c=>{const _0x13fb4a=_0x104e6b;this[_0x13fb4a(0xc0)]?this[_0x13fb4a(0xc0)]['end'](()=>{_0x3d780c();}):_0x3d780c();});}[a168_0xd9a6c9(0xad)](){const _0x346522=a168_0xd9a6c9;return join(this[_0x346522(0xc6)],this[_0x346522(0x9a)]);}}
1
+ function a168_0x5276(_0x55cbf7,_0x81fbe2){_0x55cbf7=_0x55cbf7-0xee;const _0x5266d9=a168_0x5266();let _0x5276ad=_0x5266d9[_0x55cbf7];return _0x5276ad;}const a168_0x3dafb3=a168_0x5276;(function(_0x58ce6b,_0x3c8842){const _0x11bea1=a168_0x5276,_0x5c1cdc=_0x58ce6b();while(!![]){try{const _0x82e447=parseInt(_0x11bea1(0x10e))/0x1+parseInt(_0x11bea1(0x107))/0x2+parseInt(_0x11bea1(0x10f))/0x3+-parseInt(_0x11bea1(0x106))/0x4+-parseInt(_0x11bea1(0x125))/0x5+parseInt(_0x11bea1(0xf1))/0x6*(-parseInt(_0x11bea1(0x11a))/0x7)+parseInt(_0x11bea1(0x112))/0x8*(parseInt(_0x11bea1(0x11d))/0x9);if(_0x82e447===_0x3c8842)break;else _0x5c1cdc['push'](_0x5c1cdc['shift']());}catch(_0x2aaf5d){_0x5c1cdc['push'](_0x5c1cdc['shift']());}}}(a168_0x5266,0x33dfd));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createGzip}from'zlib';import{pipeline}from'stream/promises';import a168_0x8690d5 from'chalk';function safeStringify(_0x164280){const _0x49bf59=a168_0x5276;if(typeof _0x164280===_0x49bf59(0x108))return _0x164280;if(_0x164280 instanceof Error)return _0x164280[_0x49bf59(0x11b)]||_0x164280[_0x49bf59(0x103)]+':\x20'+_0x164280[_0x49bf59(0x101)];try{return JSON[_0x49bf59(0xf3)](_0x164280,(_0x395356,_0x19e117)=>{const _0x2fe95a=_0x49bf59;if(_0x19e117 instanceof Error)return{'name':_0x19e117[_0x2fe95a(0x103)],'message':_0x19e117['message'],'stack':_0x19e117['stack'],'cause':_0x19e117[_0x2fe95a(0xf6)]};return _0x19e117;});}catch{return String(_0x164280);}}function getTimezoneOffset(){const _0x162d54=a168_0x5276,_0x4bed9c=-new Date()[_0x162d54(0x115)](),_0x4c38d1=Math['floor'](Math['abs'](_0x4bed9c)/0x3c),_0x166b7e=Math[_0x162d54(0x10c)](_0x4bed9c)%0x3c,_0x83c19=_0x4bed9c>=0x0?'+':'-';return''+_0x83c19+_0x4c38d1[_0x162d54(0x124)]()[_0x162d54(0x122)](0x2,'0')+_0x166b7e[_0x162d54(0x124)]()[_0x162d54(0x122)](0x2,'0');}function formatTimestamp(){const _0x18651e=a168_0x5276,_0x5f12a3=new Date(),_0x5a26a1=_0x5f12a3['getFullYear'](),_0x48f2fb=(_0x5f12a3[_0x18651e(0xfc)]()+0x1)[_0x18651e(0x124)]()[_0x18651e(0x122)](0x2,'0'),_0x1af45d=_0x5f12a3[_0x18651e(0x10b)]()['toString']()[_0x18651e(0x122)](0x2,'0'),_0x15e77a=_0x5f12a3[_0x18651e(0x118)]()[_0x18651e(0x124)]()[_0x18651e(0x122)](0x2,'0'),_0x232f75=_0x5f12a3[_0x18651e(0x109)]()[_0x18651e(0x124)]()[_0x18651e(0x122)](0x2,'0'),_0x4df0eb=_0x5f12a3[_0x18651e(0xfb)]()[_0x18651e(0x124)]()[_0x18651e(0x122)](0x2,'0'),_0x2c8a51=_0x5f12a3['getMilliseconds']()[_0x18651e(0x124)]()['padStart'](0x3,'0'),_0x409530=getTimezoneOffset();return _0x5a26a1+'-'+_0x48f2fb+'-'+_0x1af45d+'\x20'+_0x15e77a+':'+_0x232f75+':'+_0x4df0eb+'.'+_0x2c8a51+_0x409530;}function a168_0x5266(){const _0x26c9ad=['warn','trace','close','end','message','logFileName','name','toISOString','-(\x5cd{4}-\x5cd{2}-\x5cd{2})\x5c.log$','1603116xlPJwC','778018MPPkjp','string','getMinutes','getLogPath','getDate','abs','tdx','173742gAEPbP','944712iZgmzn','red','Warning:\x20Error\x20writing\x20to\x20','1303112jjBLWs','info','logDir','getTimezoneOffset','Proxy\x20session\x20ended','debug','getHours','tdx.log','24703bPfGgl','stack','join','9NKfsuX','logStream','cyan','logLevel','filter','padStart','fileOnly','toString','1165965rlKQfd','TRACE','.cache','gray','logBaseName','split','error','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','INFO','WARN','330vFsPEo','DEBUG','stringify','write','ERROR','cause','includes','replace','Warning:\x20Failed\x20to\x20compress\x20','log','getSeconds','getMonth'];a168_0x5266=function(){return _0x26c9ad;};return a168_0x5266();}function formatColoredLogEntry(_0xe4fcb6,_0x576eee){const _0x361a3b=a168_0x5276,_0x1b83be=formatTimestamp(),_0x5a9122=_0x576eee['map'](safeStringify)[_0x361a3b(0x11c)]('\x20'),_0x56341e=a168_0x8690d5[_0x361a3b(0x128)](_0x1b83be);let _0x30fafc;switch(_0xe4fcb6){case'info':_0x30fafc=a168_0x8690d5[_0x361a3b(0x11f)]('['+_0xe4fcb6+']\x20');break;case'warn':_0x30fafc=a168_0x8690d5['yellow']('['+_0xe4fcb6+']\x20');break;case _0x361a3b(0x12b):_0x30fafc=a168_0x8690d5[_0x361a3b(0x110)]('['+_0xe4fcb6+']');break;case'debug':_0x30fafc=a168_0x8690d5['gray']('['+_0xe4fcb6+']');break;default:_0x30fafc='['+_0xe4fcb6+']';}return _0x56341e+'\x20'+_0x30fafc+'\x20'+_0x5a9122;}export var LogLevel;(function(_0x57e164){const _0x5758f9=a168_0x5276;_0x57e164[_0x57e164['TRACE']=-0x2]=_0x5758f9(0x126),_0x57e164[_0x57e164[_0x5758f9(0xf2)]=-0x1]='DEBUG',_0x57e164[_0x57e164[_0x5758f9(0xef)]=0x0]='INFO',_0x57e164[_0x57e164[_0x5758f9(0xf0)]=0x1]='WARN',_0x57e164[_0x57e164[_0x5758f9(0xf5)]=0x2]='ERROR';}(LogLevel||(LogLevel={})));export class TDXLogger{[a168_0x3dafb3(0x11e)];[a168_0x3dafb3(0x114)];[a168_0x3dafb3(0x120)];[a168_0x3dafb3(0x123)];['logFileName'];['logBaseName'];constructor(_0xf68b4d=LogLevel[a168_0x3dafb3(0xef)],_0x46676a=![],_0x597e42,_0x5f119d=a168_0x3dafb3(0x119)){const _0x48b8f1=a168_0x3dafb3;this[_0x48b8f1(0x114)]=_0x597e42||join(homedir(),_0x48b8f1(0x127),_0x48b8f1(0x10d),'logs'),this[_0x48b8f1(0x120)]=_0xf68b4d,this[_0x48b8f1(0x123)]=_0x46676a,this[_0x48b8f1(0x102)]=_0x5f119d,this[_0x48b8f1(0x129)]=_0x5f119d[_0x48b8f1(0xf8)](/\.log$/,'');}async['init'](){const _0xd1dd1f=a168_0x3dafb3;try{await mkdir(this[_0xd1dd1f(0x114)],{'recursive':!![]}),await this['rotateOldLogs']();const _0x142dd6=join(this['logDir'],this[_0xd1dd1f(0x102)]);this[_0xd1dd1f(0x11e)]=createWriteStream(_0x142dd6,{'flags':'a'}),this['logStream']['on'](_0xd1dd1f(0x12b),_0x197191=>{const _0x1efa82=_0xd1dd1f;console[_0x1efa82(0x12b)](_0x1efa82(0x111)+this[_0x1efa82(0x102)]+':',_0x197191[_0x1efa82(0x101)]);});}catch(_0x2e91ba){console[_0xd1dd1f(0x12b)](_0xd1dd1f(0xee),_0x2e91ba);}}async['rotateOldLogs'](){const _0x4b3642=a168_0x3dafb3;try{const _0x54e806=await readdir(this[_0x4b3642(0x114)]),_0x2385b0=new Date()['toISOString']()[_0x4b3642(0x12a)]('T')[0x0];if(_0x54e806[_0x4b3642(0xf7)](this[_0x4b3642(0x102)])){const _0x2f724d=join(this[_0x4b3642(0x114)],this['logFileName']),_0x2a2255=await stat(_0x2f724d),_0xc3ad5f=new Date(_0x2a2255['mtime'])[_0x4b3642(0x104)]()['split']('T')[0x0];if(_0xc3ad5f<_0x2385b0){const _0x51bcc4=join(this['logDir'],this[_0x4b3642(0x129)]+'-'+_0xc3ad5f+'.log');await rename(_0x2f724d,_0x51bcc4);}}const _0x53c58c=await readdir(this['logDir']),_0x100375=this['logBaseName'][_0x4b3642(0xf8)](/[.*+?^${}()|[\]\\]/g,'\x5c$&'),_0x3d4767=new RegExp('^'+_0x100375+_0x4b3642(0x105)),_0x74a33a=_0x53c58c[_0x4b3642(0x121)](_0x1e6201=>_0x3d4767['test'](_0x1e6201));for(const _0x32db7c of _0x74a33a){const _0x41cdec=join(this[_0x4b3642(0x114)],_0x32db7c),_0x17f422=join(this[_0x4b3642(0x114)],_0x32db7c+'.gz');try{await pipeline(createReadStream(_0x41cdec),createGzip(),createWriteStream(_0x17f422)),await unlink(_0x41cdec);}catch(_0x741c3e){console['error'](_0x4b3642(0xf9)+_0x32db7c+':',_0x741c3e);}}}catch{}}[a168_0x3dafb3(0x117)](..._0xd77dfd){const _0x119cca=a168_0x3dafb3;if(this['logLevel']>LogLevel[_0x119cca(0xf2)])return;const _0x352039=formatColoredLogEntry('debug',_0xd77dfd);this['logStream']?.[_0x119cca(0xf4)](_0x352039+'\x0a');}[a168_0x3dafb3(0xfe)](..._0x47f7cb){const _0x54b993=a168_0x3dafb3;if(this[_0x54b993(0x120)]>LogLevel[_0x54b993(0x126)])return;const _0x2d946f=formatColoredLogEntry(_0x54b993(0xfe),_0x47f7cb);this[_0x54b993(0x11e)]?.[_0x54b993(0xf4)](_0x2d946f+'\x0a');}[a168_0x3dafb3(0x113)](..._0x5eeada){const _0x543534=a168_0x3dafb3;if(this[_0x543534(0x120)]>LogLevel[_0x543534(0xef)])return;const _0x290542=formatColoredLogEntry(_0x543534(0x113),_0x5eeada);!this[_0x543534(0x123)]&&console[_0x543534(0xfa)](_0x290542),this[_0x543534(0x11e)]?.['write'](_0x290542+'\x0a');}[a168_0x3dafb3(0xfd)](..._0x12079e){const _0x58a59b=a168_0x3dafb3;if(this[_0x58a59b(0x120)]>LogLevel[_0x58a59b(0xf0)])return;const _0x31fad3=formatColoredLogEntry(_0x58a59b(0xfd),_0x12079e);!this[_0x58a59b(0x123)]&&console['error'](_0x31fad3),this[_0x58a59b(0x11e)]?.[_0x58a59b(0xf4)](_0x31fad3+'\x0a');}['error'](..._0x11e6e3){const _0xc6bb90=a168_0x3dafb3,_0x254b46=formatColoredLogEntry(_0xc6bb90(0x12b),_0x11e6e3);!this[_0xc6bb90(0x123)]&&console['error'](_0x254b46),this[_0xc6bb90(0x11e)]?.[_0xc6bb90(0xf4)](_0x254b46+'\x0a');}async[a168_0x3dafb3(0xff)](){const _0xb2af65=a168_0x3dafb3;return this[_0xb2af65(0x113)](_0xb2af65(0x116)),new Promise(_0x422442=>{const _0x11b932=_0xb2af65;this[_0x11b932(0x11e)]?this[_0x11b932(0x11e)][_0x11b932(0x100)](()=>{_0x422442();}):_0x422442();});}[a168_0x3dafb3(0x10a)](){const _0x4b4221=a168_0x3dafb3;return join(this[_0x4b4221(0x114)],this['logFileName']);}}
@@ -1 +1 @@
1
- const a169_0x165b62=a169_0x2164;(function(_0x270f71,_0x579c44){const _0x5d6a07=a169_0x2164,_0x1430e4=_0x270f71();while(!![]){try{const _0x334968=parseInt(_0x5d6a07(0x161))/0x1+parseInt(_0x5d6a07(0x16d))/0x2+parseInt(_0x5d6a07(0x172))/0x3*(parseInt(_0x5d6a07(0x16a))/0x4)+-parseInt(_0x5d6a07(0x15a))/0x5*(-parseInt(_0x5d6a07(0x15c))/0x6)+-parseInt(_0x5d6a07(0x15b))/0x7*(parseInt(_0x5d6a07(0x177))/0x8)+-parseInt(_0x5d6a07(0x169))/0x9+parseInt(_0x5d6a07(0x17f))/0xa*(-parseInt(_0x5d6a07(0x158))/0xb);if(_0x334968===_0x579c44)break;else _0x1430e4['push'](_0x1430e4['shift']());}catch(_0x2aa8cd){_0x1430e4['push'](_0x1430e4['shift']());}}}(a169_0x5433,0x6b01c));import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';function a169_0x5433(){const _0x43f3b7=['utf-8','end','lastCheck','Invalid\x20version\x20format','stderr','toISOString','HTTP\x20','690010GXjKxm','green','66jVCaaK','data','307745jlzooy','29827CucTOc','60TyPgFr','destroy','parse','getTime','version','485728lpponb','latestVersion','cyan','last_version_check','statusCode','https://registry.npmjs.org/@treasuredata/tdx/latest','isTTY','\x0aRun:\x20','3837762bJALWn','2457908AoOvYz','dim','updateAvailable','37912DQsYnQ','currentVersion','stringify','write','Request\x20timeout','3AusOAz','now','yellow','npm\x20install\x20-g\x20@treasuredata/tdx@latest','Run:','856pZhGIE'];a169_0x5433=function(){return _0x43f3b7;};return a169_0x5433();}import{join}from'path';import{gt,valid}from'semver';import a169_0x4f30a1 from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a169_0x165b62(0x166),TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x206458=a169_0x165b62,_0x523e7a=getCacheDir();return join(_0x523e7a,_0x206458(0x164));}function a169_0x2164(_0x199905,_0x481367){_0x199905=_0x199905-0x157;const _0x5433e6=a169_0x5433();let _0x216486=_0x5433e6[_0x199905];return _0x216486;}function readCache(){const _0x13b73c=a169_0x165b62;try{const _0x29b5ec=getCacheFilePath(),_0x2e0f76=readFileSync(_0x29b5ec,_0x13b73c(0x178));return JSON[_0x13b73c(0x15e)](_0x2e0f76);}catch{return null;}}function writeCache(_0x801608){const _0x32a3f2=a169_0x165b62;try{const _0x3b37fb=getCacheDir();mkdirSync(_0x3b37fb,{'recursive':!![]});const _0x3fe8e3={'lastCheck':new Date()[_0x32a3f2(0x17d)](),'latestVersion':_0x801608},_0x585e16=getCacheFilePath();writeFileSync(_0x585e16,JSON[_0x32a3f2(0x16f)](_0x3fe8e3,null,0x2),'utf-8');}catch{}}function isCacheValid(_0x1bfa2c){const _0x57824a=a169_0x165b62;if(!_0x1bfa2c)return![];const _0x1f62dd=new Date(_0x1bfa2c[_0x57824a(0x17a)])[_0x57824a(0x15f)](),_0x29a2b0=Date[_0x57824a(0x173)]();return _0x29a2b0-_0x1f62dd<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x3c2b6c,_0x28932f)=>{const _0x4025ad=get(NPM_REGISTRY_URL,_0x3da03d=>{const _0x3a38e0=a169_0x2164;if(_0x3da03d[_0x3a38e0(0x165)]!==0xc8){clearTimeout(_0x24f3ec),_0x28932f(new Error(_0x3a38e0(0x17e)+_0x3da03d[_0x3a38e0(0x165)]));return;}let _0x2395ec='';_0x3da03d['on'](_0x3a38e0(0x159),_0xf088dc=>{_0x2395ec+=_0xf088dc;}),_0x3da03d['on'](_0x3a38e0(0x179),()=>{const _0x19660a=_0x3a38e0;clearTimeout(_0x24f3ec);try{const _0x5d69a6=JSON[_0x19660a(0x15e)](_0x2395ec);if(!valid(_0x5d69a6['version'])){_0x28932f(new Error(_0x19660a(0x17b)));return;}_0x3c2b6c(_0x5d69a6[_0x19660a(0x160)]);}catch(_0x51b21a){_0x28932f(_0x51b21a);}});})['on']('error',_0x77b695=>{clearTimeout(_0x24f3ec),_0x28932f(_0x77b695);}),_0x24f3ec=setTimeout(()=>{const _0x19dec6=a169_0x2164;_0x4025ad[_0x19dec6(0x15d)](),_0x28932f(new Error(_0x19dec6(0x171)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x4fabcc){const _0x29312e=a169_0x165b62;try{const _0x14058=readCache();if(isCacheValid(_0x14058)){const _0x4b6ad7=gt(_0x14058[_0x29312e(0x162)],_0x4fabcc);return{'updateAvailable':_0x4b6ad7,'currentVersion':_0x4fabcc,'latestVersion':_0x14058[_0x29312e(0x162)]};}const _0x548165=await fetchLatestVersion();writeCache(_0x548165);const _0x1544e4=gt(_0x548165,_0x4fabcc);return{'updateAvailable':_0x1544e4,'currentVersion':_0x4fabcc,'latestVersion':_0x548165};}catch{return null;}}export function displayUpdateNotification(_0x548fa2){const _0x500758=a169_0x165b62;if(!_0x548fa2[_0x500758(0x16c)])return;const _0x1ec78d=process[_0x500758(0x17c)][_0x500758(0x167)]&&!process['env']['NO_COLOR'],_0x48e8a1=_0x1ec78d?a169_0x4f30a1['gray']('→'):'→',_0x370a4c=_0x1ec78d?a169_0x4f30a1[_0x500758(0x16b)](_0x548fa2[_0x500758(0x16e)]):_0x548fa2[_0x500758(0x16e)],_0x1a240f=_0x1ec78d?a169_0x4f30a1[_0x500758(0x157)](_0x548fa2[_0x500758(0x162)]):_0x548fa2[_0x500758(0x162)],_0x3ad855=_0x1ec78d?a169_0x4f30a1[_0x500758(0x163)](_0x500758(0x175)):_0x500758(0x175),_0x37dccd=_0x1ec78d?'\x0a'+a169_0x4f30a1[_0x500758(0x174)]('Update\x20available:')+'\x20'+_0x370a4c+'\x20'+_0x48e8a1+'\x20'+_0x1a240f+'\x0a'+a169_0x4f30a1[_0x500758(0x16b)](_0x500758(0x176))+'\x20'+_0x3ad855+'\x0a':'\x0aUpdate\x20available:\x20'+_0x370a4c+'\x20'+_0x48e8a1+'\x20'+_0x1a240f+_0x500758(0x168)+_0x3ad855+'\x0a';process['stderr'][_0x500758(0x170)](_0x37dccd);}
1
+ (function(_0x5bc878,_0x1dce02){const _0x4425df=a169_0x4371,_0x3eb17e=_0x5bc878();while(!![]){try{const _0x16a393=parseInt(_0x4425df(0xcc))/0x1+parseInt(_0x4425df(0xd1))/0x2+parseInt(_0x4425df(0xdc))/0x3+-parseInt(_0x4425df(0xe6))/0x4+parseInt(_0x4425df(0xc6))/0x5+-parseInt(_0x4425df(0xcb))/0x6+-parseInt(_0x4425df(0xcf))/0x7*(parseInt(_0x4425df(0xd6))/0x8);if(_0x16a393===_0x1dce02)break;else _0x3eb17e['push'](_0x3eb17e['shift']());}catch(_0x2af76b){_0x3eb17e['push'](_0x3eb17e['shift']());}}}(a169_0x48ed,0xc5683));import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';function a169_0x4371(_0x3b836c,_0x289362){_0x3b836c=_0x3b836c-0xc4;const _0x48ed3d=a169_0x48ed();let _0x4371f4=_0x48ed3d[_0x3b836c];return _0x4371f4;}import a169_0x1a884e from'chalk';import{getCacheDir}from'../core/config.js';function a169_0x48ed(){const _0x885974=['parse','dim','latestVersion','Run:','6377088WLwWns','lastCheck','Request\x20timeout','6237685eQApIE','utf-8','NO_COLOR','HTTP\x20','Invalid\x20version\x20format','3309870vVroaV','213669TkeuUm','cyan','npm\x20install\x20-g\x20@treasuredata/tdx@latest','1379hsYmed','currentVersion','1516868YdULrV','green','error','yellow','isTTY','17480jssbGB','gray','destroy','toISOString','now','version','3495903qDzhIt','\x0aUpdate\x20available:\x20','stringify','stderr','data','statusCode'];a169_0x48ed=function(){return _0x885974;};return a169_0x48ed();}const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL='https://registry.npmjs.org/@treasuredata/tdx/latest',TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x399aa4=getCacheDir();return join(_0x399aa4,'last_version_check');}function readCache(){const _0x451d9d=a169_0x4371;try{const _0x52943e=getCacheFilePath(),_0x3fb130=readFileSync(_0x52943e,'utf-8');return JSON[_0x451d9d(0xe2)](_0x3fb130);}catch{return null;}}function writeCache(_0x193ccc){const _0x46c40d=a169_0x4371;try{const _0x140a73=getCacheDir();mkdirSync(_0x140a73,{'recursive':!![]});const _0x13b03c={'lastCheck':new Date()[_0x46c40d(0xd9)](),'latestVersion':_0x193ccc},_0x225f67=getCacheFilePath();writeFileSync(_0x225f67,JSON[_0x46c40d(0xde)](_0x13b03c,null,0x2),_0x46c40d(0xc7));}catch{}}function isCacheValid(_0x28ab59){const _0x32f566=a169_0x4371;if(!_0x28ab59)return![];const _0x652413=new Date(_0x28ab59[_0x32f566(0xc4)])['getTime'](),_0x3e2c33=Date[_0x32f566(0xda)]();return _0x3e2c33-_0x652413<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x270e70,_0x2fd905)=>{const _0x41d6b2=a169_0x4371,_0x5e6781=get(NPM_REGISTRY_URL,_0x70be66=>{const _0x43188a=a169_0x4371;if(_0x70be66['statusCode']!==0xc8){clearTimeout(_0x582379),_0x2fd905(new Error(_0x43188a(0xc9)+_0x70be66[_0x43188a(0xe1)]));return;}let _0x490c63='';_0x70be66['on'](_0x43188a(0xe0),_0x181768=>{_0x490c63+=_0x181768;}),_0x70be66['on']('end',()=>{const _0x3c022e=_0x43188a;clearTimeout(_0x582379);try{const _0x58e872=JSON[_0x3c022e(0xe2)](_0x490c63);if(!valid(_0x58e872['version'])){_0x2fd905(new Error(_0x3c022e(0xca)));return;}_0x270e70(_0x58e872[_0x3c022e(0xdb)]);}catch(_0x21fb83){_0x2fd905(_0x21fb83);}});})['on'](_0x41d6b2(0xd3),_0x564e1b=>{clearTimeout(_0x582379),_0x2fd905(_0x564e1b);}),_0x582379=setTimeout(()=>{const _0x46475e=_0x41d6b2;_0x5e6781[_0x46475e(0xd8)](),_0x2fd905(new Error(_0x46475e(0xc5)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x33eb43){const _0x1558c5=a169_0x4371;try{const _0x43be20=readCache();if(isCacheValid(_0x43be20)){const _0x315b8f=gt(_0x43be20[_0x1558c5(0xe4)],_0x33eb43);return{'updateAvailable':_0x315b8f,'currentVersion':_0x33eb43,'latestVersion':_0x43be20['latestVersion']};}const _0x82be79=await fetchLatestVersion();writeCache(_0x82be79);const _0x1540dd=gt(_0x82be79,_0x33eb43);return{'updateAvailable':_0x1540dd,'currentVersion':_0x33eb43,'latestVersion':_0x82be79};}catch{return null;}}export function displayUpdateNotification(_0x4e841c){const _0x2a056a=a169_0x4371;if(!_0x4e841c['updateAvailable'])return;const _0x5c41d3=process[_0x2a056a(0xdf)][_0x2a056a(0xd5)]&&!process['env'][_0x2a056a(0xc8)],_0x37f4fb=_0x5c41d3?a169_0x1a884e[_0x2a056a(0xd7)]('→'):'→',_0x3ac4b6=_0x5c41d3?a169_0x1a884e[_0x2a056a(0xe3)](_0x4e841c[_0x2a056a(0xd0)]):_0x4e841c[_0x2a056a(0xd0)],_0x3fd68a=_0x5c41d3?a169_0x1a884e[_0x2a056a(0xd2)](_0x4e841c[_0x2a056a(0xe4)]):_0x4e841c[_0x2a056a(0xe4)],_0x4e2581=_0x5c41d3?a169_0x1a884e[_0x2a056a(0xcd)](_0x2a056a(0xce)):_0x2a056a(0xce),_0x286de2=_0x5c41d3?'\x0a'+a169_0x1a884e[_0x2a056a(0xd4)]('Update\x20available:')+'\x20'+_0x3ac4b6+'\x20'+_0x37f4fb+'\x20'+_0x3fd68a+'\x0a'+a169_0x1a884e['dim'](_0x2a056a(0xe5))+'\x20'+_0x4e2581+'\x0a':_0x2a056a(0xdd)+_0x3ac4b6+'\x20'+_0x37f4fb+'\x20'+_0x3fd68a+'\x0aRun:\x20'+_0x4e2581+'\x0a';process[_0x2a056a(0xdf)]['write'](_0x286de2);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treasuredata/tdx",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
4
4
  "description": "AI-native CLI for Treasure Data - optimized for both human engineers and AI coding assistants",
5
5
  "type": "module",
6
6
  "bin": {