@treasuredata/tdx 0.26.5 → 0.26.7

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 (191) 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.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/engage-command.js +1 -1
  21. package/dist/commands/job-command.d.ts.map +1 -1
  22. package/dist/commands/job-command.js +1 -1
  23. package/dist/commands/job-command.js.map +1 -1
  24. package/dist/commands/journey-command.js +1 -1
  25. package/dist/commands/journey-validate-command.js +1 -1
  26. package/dist/commands/llm-command.js +1 -1
  27. package/dist/commands/mcp-command.js +1 -1
  28. package/dist/commands/parent-segment-command.js +1 -1
  29. package/dist/commands/profile-command.js +1 -1
  30. package/dist/commands/profiles-command.js +1 -1
  31. package/dist/commands/query-command.js +1 -1
  32. package/dist/commands/schedule-command.js +1 -1
  33. package/dist/commands/segment-command.js +1 -1
  34. package/dist/commands/segment-create-command.js +1 -1
  35. package/dist/commands/segment-fields-command.js +1 -1
  36. package/dist/commands/segment-pull-command.js +1 -1
  37. package/dist/commands/segment-push-command.js +1 -1
  38. package/dist/commands/segment-update-command.js +1 -1
  39. package/dist/commands/segment-use-command.js +1 -1
  40. package/dist/commands/segment-validate-command.js +1 -1
  41. package/dist/commands/segments.js +1 -1
  42. package/dist/commands/show.js +1 -1
  43. package/dist/commands/status-command.js +1 -1
  44. package/dist/commands/tables.js +1 -1
  45. package/dist/commands/unset-command.js +1 -1
  46. package/dist/commands/use-command.js +1 -1
  47. package/dist/commands/user-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/command-output.js +1 -1
  51. package/dist/core/config.js +1 -1
  52. package/dist/core/connection-cache.js +1 -1
  53. package/dist/core/constants.js +1 -1
  54. package/dist/core/credential-cache.js +1 -1
  55. package/dist/core/global-context.js +1 -1
  56. package/dist/core/keychain.js +1 -1
  57. package/dist/core/profile.js +1 -1
  58. package/dist/core/project-config.js +1 -1
  59. package/dist/core/session.js +1 -1
  60. package/dist/core/user-cache.js +1 -1
  61. package/dist/core/version.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/mcp/server.js +1 -1
  64. package/dist/mcp/tools/index.js +1 -1
  65. package/dist/mcp/tools/tdx-run.js +1 -1
  66. package/dist/mcp/tools/tdx-search.js +1 -1
  67. package/dist/mcp/utils.js +1 -1
  68. package/dist/proxy/claude-usage-tracker.js +1 -1
  69. package/dist/proxy/passthrough-server.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.d.ts +14 -37
  74. package/dist/sdk/agent/agent-yaml.d.ts.map +1 -1
  75. package/dist/sdk/agent/agent-yaml.js +1 -1
  76. package/dist/sdk/agent/agent-yaml.js.map +1 -1
  77. package/dist/sdk/agent/test/evaluator.js +1 -1
  78. package/dist/sdk/agent/test/executor.js +1 -1
  79. package/dist/sdk/agent/test/index.js +1 -1
  80. package/dist/sdk/agent/test/output.js +1 -1
  81. package/dist/sdk/agent/test/parser.js +1 -1
  82. package/dist/sdk/agent/tool-target-registry.d.ts +82 -0
  83. package/dist/sdk/agent/tool-target-registry.d.ts.map +1 -0
  84. package/dist/sdk/agent/tool-target-registry.js +1 -0
  85. package/dist/sdk/agent/tool-target-registry.js.map +1 -0
  86. package/dist/sdk/agent/types/agent-def.d.ts +3 -2
  87. package/dist/sdk/agent/types/agent-def.d.ts.map +1 -1
  88. package/dist/sdk/api.js +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.d.ts +20 -0
  94. package/dist/sdk/client/llm-api-client.d.ts.map +1 -1
  95. package/dist/sdk/client/llm-api-client.js +1 -1
  96. package/dist/sdk/client/llm-api-client.js.map +1 -1
  97. package/dist/sdk/client/rate-limiter.js +1 -1
  98. package/dist/sdk/client/td-api-client.d.ts +2 -2
  99. package/dist/sdk/client/td-api-client.d.ts.map +1 -1
  100. package/dist/sdk/client/td-api-client.js +1 -1
  101. package/dist/sdk/client/td-api-client.js.map +1 -1
  102. package/dist/sdk/client/trino-api-client.js +1 -1
  103. package/dist/sdk/client/workflow-client.js +1 -1
  104. package/dist/sdk/connection-validator.js +1 -1
  105. package/dist/sdk/connection.js +1 -1
  106. package/dist/sdk/engage.js +1 -1
  107. package/dist/sdk/errors.js +1 -1
  108. package/dist/sdk/index.js +1 -1
  109. package/dist/sdk/io/index.js +1 -1
  110. package/dist/sdk/io/node-filesystem.js +1 -1
  111. package/dist/sdk/job.d.ts +1 -1
  112. package/dist/sdk/job.d.ts.map +1 -1
  113. package/dist/sdk/job.js +1 -1
  114. package/dist/sdk/job.js.map +1 -1
  115. package/dist/sdk/journey.js +1 -1
  116. package/dist/sdk/llm/chat-cache.js +1 -1
  117. package/dist/sdk/llm/index.d.ts.map +1 -1
  118. package/dist/sdk/llm/index.js +1 -1
  119. package/dist/sdk/llm/index.js.map +1 -1
  120. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  121. package/dist/sdk/llm/model-factors.js +1 -1
  122. package/dist/sdk/personalization.js +1 -1
  123. package/dist/sdk/query/index.js +1 -1
  124. package/dist/sdk/query/sql-parser.js +1 -1
  125. package/dist/sdk/realtime.js +1 -1
  126. package/dist/sdk/schedule.js +1 -1
  127. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  128. package/dist/sdk/segment/fields-display.js +1 -1
  129. package/dist/sdk/segment/file-discovery.js +1 -1
  130. package/dist/sdk/segment/journey-utils.js +1 -1
  131. package/dist/sdk/segment/journey-validator.js +1 -1
  132. package/dist/sdk/segment/journey-yaml.js +1 -1
  133. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  134. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  135. package/dist/sdk/segment/pull-workflow.js +1 -1
  136. package/dist/sdk/segment/push-recovery.js +1 -1
  137. package/dist/sdk/segment/push-workflow.js +1 -1
  138. package/dist/sdk/segment/resolution-context.js +1 -1
  139. package/dist/sdk/segment/segment-path-parser.js +1 -1
  140. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  141. package/dist/sdk/segment/target-resolution.js +1 -1
  142. package/dist/sdk/segment/tdx-config.js +1 -1
  143. package/dist/sdk/segment/validate-files.js +1 -1
  144. package/dist/sdk/segment/yaml-validator.js +1 -1
  145. package/dist/sdk/segment.js +1 -1
  146. package/dist/sdk/types/index.js +1 -1
  147. package/dist/sdk/types/progress.js +1 -1
  148. package/dist/sdk/user.js +1 -1
  149. package/dist/sdk/util/format-detector.js +1 -1
  150. package/dist/sdk/util/formatters.js +1 -1
  151. package/dist/sdk/util/index.js +1 -1
  152. package/dist/sdk/util/tree-formatter.js +1 -1
  153. package/dist/sdk/workflow/archive-validation.js +1 -1
  154. package/dist/sdk/workflow/clone-workflow.js +1 -1
  155. package/dist/sdk/workflow/index.js +1 -1
  156. package/dist/sdk/workflow/pull-workflow.js +1 -1
  157. package/dist/sdk/workflow/push-workflow.js +1 -1
  158. package/dist/sdk/workflow/tdx-config.js +1 -1
  159. package/dist/sdk/workflow/workflow-utils.js +1 -1
  160. package/dist/test-utils/command-runner.js +1 -1
  161. package/dist/test-utils/factories.js +1 -1
  162. package/dist/test-utils/fixtures.js +1 -1
  163. package/dist/test-utils/http-mock.js +1 -1
  164. package/dist/test-utils/index.js +1 -1
  165. package/dist/utils/async.js +1 -1
  166. package/dist/utils/colors.js +1 -1
  167. package/dist/utils/diff.js +1 -1
  168. package/dist/utils/file-permissions.js +1 -1
  169. package/dist/utils/global-cache.js +1 -1
  170. package/dist/utils/json-loader.js +1 -1
  171. package/dist/utils/local-cache.js +1 -1
  172. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  173. package/dist/utils/logger/formatters/index.js +1 -1
  174. package/dist/utils/logger/handlers/console-handler.js +1 -1
  175. package/dist/utils/logger/handlers/file-handler.js +1 -1
  176. package/dist/utils/logger/handlers/index.js +1 -1
  177. package/dist/utils/logger/handlers/null-handler.js +1 -1
  178. package/dist/utils/logger/index.js +1 -1
  179. package/dist/utils/logger/logger.js +1 -1
  180. package/dist/utils/logger/types.js +1 -1
  181. package/dist/utils/option-validation.js +1 -1
  182. package/dist/utils/port.js +1 -1
  183. package/dist/utils/process.js +1 -1
  184. package/dist/utils/prompt.js +1 -1
  185. package/dist/utils/spinner.js +1 -1
  186. package/dist/utils/sse-parser.js +1 -1
  187. package/dist/utils/string-utils.js +1 -1
  188. package/dist/utils/table-ref-parser.js +1 -1
  189. package/dist/utils/tdx-logger.js +1 -1
  190. package/dist/utils/version-check.js +1 -1
  191. package/package.json +1 -1
@@ -1 +1 @@
1
- const a42_0x2b3b86=a42_0x464a;(function(_0x55bc64,_0x5d458b){const _0x1426ff=a42_0x464a,_0x426f01=_0x55bc64();while(!![]){try{const _0x10dbf6=parseInt(_0x1426ff(0x317))/0x1+-parseInt(_0x1426ff(0x260))/0x2*(parseInt(_0x1426ff(0x347))/0x3)+parseInt(_0x1426ff(0x24a))/0x4+parseInt(_0x1426ff(0x2c3))/0x5+-parseInt(_0x1426ff(0x283))/0x6*(-parseInt(_0x1426ff(0x2de))/0x7)+parseInt(_0x1426ff(0x1d3))/0x8*(parseInt(_0x1426ff(0x21f))/0x9)+-parseInt(_0x1426ff(0x2f6))/0xa;if(_0x10dbf6===_0x5d458b)break;else _0x426f01['push'](_0x426f01['shift']());}catch(_0x3befb9){_0x426f01['push'](_0x426f01['shift']());}}}(a42_0x4d5f,0x9884b));import a42_0x43d93e from'chalk';import{existsSync}from'fs';import a42_0x44134b from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x456b5e from'prompts';function a42_0x464a(_0x5c4223,_0x527b49){_0x5c4223=_0x5c4223-0x1ad;const _0x4d5f44=a42_0x4d5f();let _0x464a49=_0x4d5f44[_0x5c4223];return _0x464a49;}function getAttemptStatusDisplay(_0x12fbad){const _0x5a3dd1=a42_0x464a;if(!_0x12fbad)return{'icon':'⏳','text':''};const {done:_0x2a4f15,success:_0x20315a,cancelRequested:_0x42ee30}=_0x12fbad;if(!_0x2a4f15)return _0x42ee30?{'icon':'🛑','text':a42_0x43d93e['yellow']('canceling')}:{'icon':'🔄','text':a42_0x43d93e[_0x5a3dd1(0x1e6)](_0x5a3dd1(0x220))};if(_0x20315a)return{'icon':'✅','text':a42_0x43d93e[_0x5a3dd1(0x1f5)](_0x5a3dd1(0x1ec))};return{'icon':'❌','text':a42_0x43d93e[_0x5a3dd1(0x216)](_0x5a3dd1(0x25d))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0x2b3b86(0x20b)](_0x523f1d,_0x4b4427,_0xeab856=0x0){return _0x523f1d[_0xeab856]||_0x4b4427['workflowProject'];}['requireProject'](_0x39e55e,_0x4433d8,_0x143a52=0x0){const _0x2941d6=a42_0x2b3b86,_0x5ca4a2=this[_0x2941d6(0x20b)](_0x39e55e,_0x4433d8,_0x143a52);if(!_0x5ca4a2)return console[_0x2941d6(0x25d)](a42_0x43d93e['red'](_0x2941d6(0x276)),_0x2941d6(0x231)),console[_0x2941d6(0x25d)](a42_0x43d93e['dim'](_0x2941d6(0x301))),null;return _0x5ca4a2;}['parseProjectWorkflowPattern'](_0xc0f517,_0x5c94f1){const _0x4658e2=a42_0x2b3b86;if(_0xc0f517[0x0]){const _0x18078b=_0xc0f517[0x0][_0x4658e2(0x1bd)]('.');if(_0x18078b[_0x4658e2(0x1bb)]===0x1)return{'projectName':_0x18078b[0x0],'workflowName':undefined};else return _0x18078b[_0x4658e2(0x1bb)]===0x2?{'projectName':_0x18078b[0x0],'workflowName':_0x18078b[0x1]}:(console[_0x4658e2(0x25d)](a42_0x43d93e[_0x4658e2(0x216)](_0x4658e2(0x276)),_0x4658e2(0x353)),null);}return{'projectName':_0x5c94f1['workflowProject'],'workflowName':undefined};}[a42_0x2b3b86(0x1ef)](_0x2766bc,_0x31ef58,_0x36085a=0x0){const _0x4f63e8=a42_0x2b3b86;if(_0x2766bc[_0x36085a])return _0x2766bc[_0x36085a];if(_0x31ef58[_0x4f63e8(0x35a)]){const _0x214f24=a42_0x44134b[_0x4f63e8(0x207)](process[_0x4f63e8(0x1fc)](),'workflows',_0x31ef58[_0x4f63e8(0x35a)]);if(existsSync(a42_0x44134b[_0x4f63e8(0x207)](_0x214f24,_0x4f63e8(0x2ea))))return _0x214f24;}return undefined;}async[a42_0x2b3b86(0x23b)](_0x2e90fa,_0x5390e1,_0x5143e8){const _0x3edbe7=a42_0x2b3b86;try{const _0x5474de=await _0x2e90fa[_0x3edbe7(0x355)][_0x3edbe7(0x20f)](_0x5390e1,{'limit':0x1});if(_0x5474de['length']>0x0){const _0x19bfb4=_0x5474de[0x0]['id'],_0x445b31=getWorkflowUrl(_0x5143e8,_0x19bfb4);console[_0x3edbe7(0x25d)]('\x20\x20Console:\x20'+a42_0x43d93e['cyan'](_0x445b31));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a42_0x2b3b86(0x2b8);[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x1d7);async[a42_0x2b3b86(0x273)](_0x40248f){const _0x4ea42e=a42_0x2b3b86,{options:_0x3a6469,args:_0x5391e9,tdx:_0x478084}=_0x40248f,_0x4e4e23=_0x5391e9[0x0],_0x94e214=_0x3a6469['clear'];if(_0x94e214)return saveSessionContext({'workflow_project':undefined},_0x3a6469[_0x4ea42e(0x20a)]),console['log'](a42_0x43d93e[_0x4ea42e(0x1f5)](_0x4ea42e(0x2cc))),0x0;if(!_0x4e4e23)return console[_0x4ea42e(0x25d)](a42_0x43d93e[_0x4ea42e(0x216)](_0x4ea42e(0x276)),_0x4ea42e(0x231)),console[_0x4ea42e(0x25d)](a42_0x43d93e[_0x4ea42e(0x357)](_0x4ea42e(0x31c))),console['error'](a42_0x43d93e['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x39e213=await withSpinner('Resolving\x20project\x20\x27'+_0x4e4e23+'\x27...',()=>_0x478084['workflow'][_0x4ea42e(0x334)](_0x4e4e23),{'verbose':_0x3a6469[_0x4ea42e(0x25f)]}),{name:_0x12fe3b}=_0x39e213[_0x4ea42e(0x1e3)];return saveSessionContext({'workflow_project':_0x12fe3b},_0x3a6469[_0x4ea42e(0x20a)]),console[_0x4ea42e(0x32a)](a42_0x43d93e[_0x4ea42e(0x1f5)](_0x4ea42e(0x31f)+a42_0x43d93e[_0x4ea42e(0x337)](_0x12fe3b))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x2b3b86(0x1c6)]='workflow:projects';[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x2e1);async['execute'](_0x5ba7fd){const _0x20d653=a42_0x2b3b86,{options:_0x144178,args:_0x1e0cba,tdx:_0x3a6261}=_0x5ba7fd,_0x307811=_0x1e0cba[0x0];_0x144178[_0x20d653(0x25f)]&&_0x307811&&console[_0x20d653(0x25d)](_0x20d653(0x291)+_0x307811);const _0x266108=await withSpinner(_0x20d653(0x2d4),()=>_0x3a6261[_0x20d653(0x355)][_0x20d653(0x25a)](_0x307811,{'limit':_0x144178[_0x20d653(0x22c)]}),{'verbose':_0x144178[_0x20d653(0x25f)]});let _0x4d5348=_0x266108[_0x20d653(0x1e3)];_0x4d5348['sort']((_0x267cd4,_0x16b62b)=>_0x267cd4[_0x20d653(0x1c6)][_0x20d653(0x2ab)](_0x16b62b[_0x20d653(0x1c6)]));const _0x31c6ea=_0x144178[_0x20d653(0x22c)]||0x64,_0x241713=_0x4d5348[_0x20d653(0x1bb)]>=_0x31c6ea?a42_0x43d93e[_0x20d653(0x357)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x20d653(0x25d)]('✔\x20Found\x20'+_0x4d5348['length']+_0x20d653(0x1f6)+(_0x4d5348[_0x20d653(0x1bb)]!==0x1?'s':'')+_0x241713);if(_0x144178[_0x20d653(0x30c)]===_0x20d653(0x2f8)||_0x144178[_0x20d653(0x30c)]===_0x20d653(0x2a0)||_0x144178[_0x20d653(0x30c)]==='table')await handleSDKOutput(_0x4d5348,_0x144178);else{if(_0x4d5348[_0x20d653(0x1bb)]===0x0)_0x307811?console['log']('No\x20projects\x20match\x20pattern:\x20'+_0x307811):console[_0x20d653(0x32a)](_0x20d653(0x237));else{const _0x292e9f=_0x4d5348[_0x20d653(0x23e)](_0x220e02=>{const _0x140418=_0x20d653,_0x57553f=_0x220e02[_0x140418(0x2fe)]?.['some'](_0x1b76d7=>_0x1b76d7[_0x140418(0x24c)]===_0x140418(0x33d)),_0x21d619=_0x57553f?a42_0x43d93e[_0x140418(0x357)]('\x20(system)'):'';return _0x140418(0x245)+_0x220e02[_0x140418(0x1c6)]+_0x21d619;});await writeOutput(_0x292e9f[_0x20d653(0x207)]('\x0a'),_0x144178[_0x20d653(0x256)],_0x20d653(0x338));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x2cb);['description']=a42_0x2b3b86(0x2f7);async['execute'](_0x4629e4){const _0x3917ff=a42_0x2b3b86,{options:_0x52610d,args:_0x345316,tdx:_0x3d3a90}=_0x4629e4,_0x343e78=this[_0x3917ff(0x20b)](_0x345316,_0x52610d);_0x52610d['verbose']&&_0x343e78&&console[_0x3917ff(0x25d)](_0x3917ff(0x1cf)+_0x343e78);const _0x3266a1=await withSpinner(_0x3917ff(0x29f),()=>_0x3d3a90[_0x3917ff(0x355)][_0x3917ff(0x20f)](_0x343e78,{'limit':_0x52610d['limit']}),{'verbose':_0x52610d[_0x3917ff(0x25f)]});let _0x2132cf=_0x3266a1[_0x3917ff(0x1e3)];_0x2132cf['sort']((_0x3b2cfe,_0x20edc8)=>{const _0x50fc8e=_0x3917ff,_0x22bd6c=_0x3b2cfe['name'][_0x50fc8e(0x2ab)](_0x20edc8[_0x50fc8e(0x1c6)]);if(_0x22bd6c!==0x0)return _0x22bd6c;return(_0x3b2cfe['project']?.[_0x50fc8e(0x1c6)]||'')[_0x50fc8e(0x2ab)](_0x20edc8[_0x50fc8e(0x329)]?.[_0x50fc8e(0x1c6)]||'');});const _0x54e343=_0x52610d[_0x3917ff(0x22c)]||0x64,_0xc76414=_0x2132cf[_0x3917ff(0x1bb)]>=_0x54e343?a42_0x43d93e[_0x3917ff(0x357)](_0x3917ff(0x1ca)):'';console[_0x3917ff(0x25d)](_0x3917ff(0x327)+_0x2132cf['length']+_0x3917ff(0x1f4)+(_0x2132cf[_0x3917ff(0x1bb)]!==0x1?'s':'')+_0xc76414);if(_0x52610d[_0x3917ff(0x30c)]===_0x3917ff(0x2f8)||_0x52610d['format']==='jsonl'||_0x52610d[_0x3917ff(0x30c)]===_0x3917ff(0x318))await handleSDKOutput(_0x2132cf,_0x52610d);else{if(_0x2132cf[_0x3917ff(0x1bb)]===0x0)_0x343e78?console[_0x3917ff(0x32a)](_0x3917ff(0x2b9)+_0x343e78):console[_0x3917ff(0x32a)]('No\x20workflows\x20found');else{const _0xb2d8c2=_0x52610d[_0x3917ff(0x348)],_0x4c06ab=_0x2132cf[_0x3917ff(0x23e)](_0x3195f7=>{const _0x515b0b=_0x3917ff,_0x1acaa7=a42_0x43d93e[_0x515b0b(0x357)]('#'+_0x3195f7['id']),_0x4c261c=hyperlink(_0x1acaa7,getWorkflowUrl(_0xb2d8c2,_0x3195f7['id'])),_0x295ac3=_0x3195f7['project']?.[_0x515b0b(0x1c6)]?a42_0x43d93e[_0x515b0b(0x357)]('\x20('+_0x3195f7[_0x515b0b(0x329)][_0x515b0b(0x1c6)]+')'):'';return'📋\x20'+_0x4c261c+'\x20'+_0x3195f7[_0x515b0b(0x1c6)]+_0x295ac3;});await writeOutput(_0x4c06ab[_0x3917ff(0x207)]('\x0a'),_0x52610d['output'],_0x3917ff(0x338));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x2b3b86(0x1c6)]='workflow:sessions';[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x267);async[a42_0x2b3b86(0x273)](_0x16e497){const _0x48843f=a42_0x2b3b86,{options:_0xbb69e4,args:_0x138bc4,tdx:_0x529c5e}=_0x16e497,_0x178eb4=this['parseProjectWorkflowPattern'](_0x138bc4,_0xbb69e4);if(!_0x178eb4)return 0x1;const {projectName:_0x22582f,workflowName:_0x33395c}=_0x178eb4;if(_0xbb69e4[_0x48843f(0x25f)]){if(_0x22582f&&_0x33395c)console[_0x48843f(0x25d)](_0x48843f(0x2e8)+_0x22582f+'.'+_0x33395c);else _0x22582f&&console[_0x48843f(0x25d)](_0x48843f(0x259)+_0x22582f);const _0x175de0=_0xbb69e4[_0x48843f(0x250)];_0x175de0&&console[_0x48843f(0x25d)](_0x48843f(0x1e2)+_0x175de0);}let _0x1eed2f=0x28;if(process[_0x48843f(0x352)][_0x48843f(0x28a)]&&!_0xbb69e4[_0x48843f(0x256)]&&!_0xbb69e4[_0x48843f(0x30c)]){const _0x5eefc2=process[_0x48843f(0x352)][_0x48843f(0x284)]||0x28;_0x1eed2f=Math['max'](0x14,Math[_0x48843f(0x280)](_0x5eefc2*0x2/0x3));}const _0x42b827=_0xbb69e4[_0x48843f(0x22c)]||_0x1eed2f,_0x5ce35f=await withSpinner(_0x48843f(0x29e),()=>_0x529c5e[_0x48843f(0x355)][_0x48843f(0x249)]({'projectName':_0x22582f,'workflowName':_0x33395c,'status':_0xbb69e4[_0x48843f(0x250)],'fromTime':_0xbb69e4['from'],'toTime':_0xbb69e4['to'],'limit':_0x42b827}),{'verbose':_0xbb69e4['verbose']}),_0x5390df=_0x5ce35f[_0x48843f(0x1e3)];_0x5390df[_0x48843f(0x2a6)]((_0x3ae1cd,_0x465e95)=>{const _0x4bc869=_0x48843f,_0x3cff74=_0x3ae1cd[_0x4bc869(0x26b)]||'',_0x1a0708=_0x465e95[_0x4bc869(0x26b)]||'';return _0x1a0708['localeCompare'](_0x3cff74);});_0x5390df[_0x48843f(0x1bb)]>=_0x42b827?console[_0x48843f(0x25d)](_0x48843f(0x22d)+_0x5390df[_0x48843f(0x1bb)]+'\x20sessions\x20'+a42_0x43d93e[_0x48843f(0x357)](_0x48843f(0x251))):console['error'](_0x48843f(0x327)+_0x5390df['length']+_0x48843f(0x290)+(_0x5390df['length']!==0x1?'s':''));if(_0xbb69e4[_0x48843f(0x30c)]==='json'||_0xbb69e4[_0x48843f(0x30c)]===_0x48843f(0x2a0)||_0xbb69e4[_0x48843f(0x30c)]===_0x48843f(0x318))await handleSDKOutput(_0x5390df,_0xbb69e4);else{if(!process[_0x48843f(0x352)][_0x48843f(0x28a)]||_0xbb69e4['output']){if(_0x5390df[_0x48843f(0x1bb)]===0x0){if(_0x22582f&&_0x33395c)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x22582f+'.'+_0x33395c);else _0x22582f?console['log'](_0x48843f(0x229)+_0x22582f):console[_0x48843f(0x32a)]('No\x20sessions\x20found');}else{const _0x3750b6=_0xbb69e4[_0x48843f(0x348)],_0x5eb1ee=this[_0x48843f(0x2be)](_0x5390df,_0x3750b6);_0xbb69e4[_0x48843f(0x256)]?await writeOutput(_0x5eb1ee,_0xbb69e4['output'],_0x48843f(0x338)):console[_0x48843f(0x32a)](_0x5eb1ee);}!_0x22582f&&(console[_0x48843f(0x25d)](''),console[_0x48843f(0x25d)](a42_0x43d93e['dim']('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x48843f(0x25d)](a42_0x43d93e[_0x48843f(0x357)](_0x48843f(0x321))+'or'+a42_0x43d93e[_0x48843f(0x357)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x5390df[_0x48843f(0x1bb)]===0x0){if(_0x22582f&&_0x33395c)console[_0x48843f(0x32a)](_0x48843f(0x2c1)+_0x22582f+'.'+_0x33395c);else _0x22582f?console[_0x48843f(0x32a)](_0x48843f(0x229)+_0x22582f):console['log']('No\x20sessions\x20found');}else await this[_0x48843f(0x201)](_0x5390df,_0x16e497,_0x22582f);}}return 0x0;}[a42_0x2b3b86(0x2be)](_0x172f4f,_0x294b64){const _0x3e06f4=a42_0x2b3b86,_0x4df4ba=[],_0x1da8cc=new Map();let _0x51cccb=Infinity,_0x3fa350=-Infinity;for(const _0x39c923 of _0x172f4f){if(_0x39c923[_0x3e06f4(0x1e8)]?.[_0x3e06f4(0x1d8)]){const _0x55860e=new Date(_0x39c923[_0x3e06f4(0x1e8)]['createdAt'])['getTime'](),_0x2c672b=_0x39c923[_0x3e06f4(0x1e8)][_0x3e06f4(0x228)]?new Date(_0x39c923[_0x3e06f4(0x1e8)][_0x3e06f4(0x228)])[_0x3e06f4(0x200)]():Date[_0x3e06f4(0x28d)](),_0x42081b=_0x39c923[_0x3e06f4(0x329)]?.['name']||_0x3e06f4(0x288);!_0x1da8cc[_0x3e06f4(0x1b4)](_0x42081b)&&_0x1da8cc['set'](_0x42081b,[]),_0x1da8cc['get'](_0x42081b)[_0x3e06f4(0x2a4)]({'session':_0x39c923,'startTime':_0x55860e,'endTime':_0x2c672b,'duration':_0x2c672b-_0x55860e}),_0x51cccb=Math[_0x3e06f4(0x2b1)](_0x51cccb,_0x55860e),_0x3fa350=Math[_0x3e06f4(0x1c4)](_0x3fa350,_0x2c672b);}}if(_0x1da8cc[_0x3e06f4(0x2fd)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x5dabf0=process['stdout'][_0x3e06f4(0x294)]||0x78,_0xf30d=0x1e,_0x25062b=0x32,_0x5ae5de=0x4,_0x4bd855=Math[_0x3e06f4(0x2b1)](_0x25062b,Math[_0x3e06f4(0x1c4)](_0xf30d,Math[_0x3e06f4(0x280)](_0x5dabf0*0.3))),_0x2c3525=_0x5dabf0-_0x4bd855-TIMELINE_CONFIG[_0x3e06f4(0x1fe)]-0x3-_0x5ae5de,_0x470934=_0x3fa350-_0x51cccb,_0x2c7a52=_0x470934/_0x4bd855,_0x31ca7f=renderTimeAxis({'startTime':_0x51cccb,'endTime':_0x3fa350,'durationMs':_0x470934,'msPerChar':_0x2c7a52},_0x4bd855),_0x1bcf84=[];for(const _0x5b81c7 of _0x1da8cc[_0x3e06f4(0x1c9)]()){_0x1bcf84[_0x3e06f4(0x2a4)](..._0x5b81c7);}_0x1bcf84[_0x3e06f4(0x2a6)]((_0x5a0edf,_0x17a4b6)=>_0x17a4b6[_0x3e06f4(0x1dd)]-_0x5a0edf['startTime']);const _0x4d933e=new Date(_0x51cccb),_0x289ecf=formatDate(_0x4d933e),_0x276ad4=_0x5ae5de+TIMELINE_CONFIG[_0x3e06f4(0x34f)]+TIMELINE_CONFIG['ICON_SPACING']+_0x2c3525,_0x232142='\x20'[_0x3e06f4(0x30a)](_0x276ad4-_0x289ecf[_0x3e06f4(0x1bb)]),_0x28c96f=_0x232142+a42_0x43d93e[_0x3e06f4(0x357)](_0x289ecf)+'\x20'+_0x31ca7f;_0x4df4ba[_0x3e06f4(0x2a4)](_0x28c96f);const _0x4f517e=0x16;let _0x55d1a8=0x0;for(const _0x2d0aba of _0x1bcf84){const _0x353334=_0x2d0aba[_0x3e06f4(0x20a)][_0x3e06f4(0x329)]?.['name']||'?',_0x406215=Math[_0x3e06f4(0x2b1)](stringWidth(_0x353334),_0x4f517e);_0x55d1a8=Math[_0x3e06f4(0x1c4)](_0x55d1a8,_0x406215);}for(const _0x175e16 of _0x1bcf84){const {session:_0xeab936,startTime:_0x5ab8d2,endTime:_0x4874bb,duration:_0x2a6c85}=_0x175e16,_0x38ae8e=_0xeab936['project']?.['id'],_0x526972=_0xeab936['id'],_0x16dbc9=_0xeab936['project']?.[_0x3e06f4(0x1c6)]||'?',_0x30ed40=_0xeab936[_0x3e06f4(0x355)]?.[_0x3e06f4(0x1c6)]||'?';let _0x126a56,_0x4285fe;if(_0xeab936[_0x3e06f4(0x1e8)]){const _0x2ac31d=_0xeab936[_0x3e06f4(0x1e8)];!_0x2ac31d['done']?(_0x126a56=_0x2ac31d[_0x3e06f4(0x2bc)]?'🛑':'🔄',_0x4285fe=_0x2ac31d['cancelRequested']?a42_0x43d93e[_0x3e06f4(0x2a1)]:a42_0x43d93e['blue']):(_0x126a56=_0x2ac31d['success']?'✅':'❌',_0x4285fe=_0x2ac31d[_0x3e06f4(0x1ec)]?a42_0x43d93e['green']:a42_0x43d93e[_0x3e06f4(0x216)]);}else _0x126a56='⏳',_0x4285fe=a42_0x43d93e[_0x3e06f4(0x357)];const _0xbad55a='#'+_0x526972,_0x5ae8dd=_0x38ae8e?hyperlink(_0xbad55a,getWorkflowSessionUrl(_0x294b64,_0x38ae8e,_0x526972)):_0xbad55a;let _0xec0c01=_0x16dbc9;stringWidth(_0x16dbc9)>_0x4f517e&&(_0xec0c01=_0x16dbc9[_0x3e06f4(0x32f)](0x0,_0x4f517e-0x1)+'…');const _0x59c286=a42_0x43d93e[_0x3e06f4(0x357)](_0xec0c01),_0x9cf0e0=stringWidth(_0xec0c01),_0x2db255='\x20'['repeat'](_0x55d1a8-stringWidth(_0xec0c01)+0x2),_0x27a06d='('+formatElapsed(_0x2a6c85)+')',_0x3700d7=stringWidth(_0x27a06d),_0x396c91=stringWidth(_0xbad55a),_0x2945bd=_0x396c91+0x1+_0x9cf0e0+_0x2db255[_0x3e06f4(0x1bb)],_0x4bbf72=_0x2c3525-_0x2945bd-_0x3700d7-0x1-0x8;let _0x58251b=_0x30ed40;stringWidth(_0x58251b)>_0x4bbf72&&(_0x58251b=_0x58251b[_0x3e06f4(0x32f)](0x0,_0x4bbf72-0x1)+'…');const _0x374798=_0x5ae8dd+'\x20'+_0x59c286+_0x2db255+_0x58251b,_0x418ae1=stringWidth(_0x374798),_0x5b77f0=_0x2c3525-_0x418ae1-_0x3700d7,_0x419118=_0x374798+'\x20'[_0x3e06f4(0x30a)](Math['max'](0x1,_0x5b77f0))+a42_0x43d93e['dim'](_0x27a06d),_0x22fe01=Math[_0x3e06f4(0x280)]((_0x5ab8d2-_0x51cccb)/_0x2c7a52),_0x21faa6=Math[_0x3e06f4(0x280)]((_0x4874bb-_0x51cccb)/_0x2c7a52),_0x742b3b=Math[_0x3e06f4(0x1c4)](_0x22fe01+0x1,_0x21faa6),_0x1d48a9=new Array(_0x4bd855)[_0x3e06f4(0x31e)]('\x20');for(let _0x364b84=_0x22fe01;_0x364b84<Math[_0x3e06f4(0x2b1)](_0x742b3b,_0x4bd855);_0x364b84++){_0x1d48a9[_0x364b84]='─';}const _0xd9d7a9=_0x1d48a9[_0x3e06f4(0x23e)](_0x18c19b=>_0x18c19b==='\x20'?'\x20':_0x4285fe(_0x18c19b))['join']('');_0x4df4ba['push'](_0x126a56+'\x20'+_0x419118+'│'+_0xd9d7a9+'│');}return _0x4df4ba[_0x3e06f4(0x207)]('\x0a');}async[a42_0x2b3b86(0x201)](_0x5c8512,_0x213169,_0xbf1e9e){const _0x46b30f=a42_0x2b3b86,{options:_0x21b7a8,tdx:_0x47755f}=_0x213169,_0x4519f8=_0x21b7a8['site'],{timelineRows:_0x2c80a1,timeAxisHeader:_0x219681}=this[_0x46b30f(0x35b)](_0x5c8512,_0x4519f8),_0x422144=_0x2c80a1['filter'](_0x476d81=>_0x476d81[_0x46b30f(0x1e7)]);if(_0x422144[_0x46b30f(0x1bb)]===0x0){const _0x58143d=this[_0x46b30f(0x2be)](_0x5c8512,_0x4519f8);console[_0x46b30f(0x32a)](_0x58143d);!_0xbf1e9e&&(console[_0x46b30f(0x25d)](''),console[_0x46b30f(0x25d)](a42_0x43d93e[_0x46b30f(0x357)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x46b30f(0x25d)](a42_0x43d93e['dim'](_0x46b30f(0x321))+'or'+a42_0x43d93e[_0x46b30f(0x357)](_0x46b30f(0x313))));return;}_0x219681&&console['log'](_0x219681);const _0x5ce42f=_0x2c80a1[_0x46b30f(0x2a8)](_0x365c51=>_0x365c51['attemptId'])['map'](_0x3504f1=>({'title':_0x3504f1[_0x46b30f(0x246)],'value':_0x3504f1[_0x46b30f(0x1e7)]})),_0x434d96=process[_0x46b30f(0x352)]['rows']||0x3c,_0x5362ee=Math[_0x46b30f(0x1c4)](0x28,Math[_0x46b30f(0x280)](_0x434d96*0x2/0x3)),_0x5be3bd=await a42_0x456b5e({'type':_0x46b30f(0x296),'name':_0x46b30f(0x1e7),'message':_0x46b30f(0x1c7),'choices':_0x5ce42f,'initial':-0x1,'limit':_0x5362ee,'clearFirst':!![],'fallback':{'title':_0x46b30f(0x2b7),'value':null},'suggest':(_0x3a8eca,_0x2fe735)=>{const _0x54b103=_0x46b30f;if(!_0x3a8eca)return Promise[_0x54b103(0x2e4)](_0x2fe735);const _0x5acde9=_0x2fe735[_0x54b103(0x2a8)](_0x5a553a=>{const _0x54f0e9=_0x54b103,_0x14d774=_0x5a553a;return _0x14d774['title'][_0x54f0e9(0x203)]()[_0x54f0e9(0x27a)](_0x3a8eca['toLowerCase']());});return Promise['resolve'](_0x5acde9);}}),_0x5a646e=()=>{const _0x45998b=_0x46b30f;process[_0x45998b(0x352)]['write'](_0x45998b(0x1d9)),process[_0x45998b(0x352)]['write']('\x1b[1A\x1b[2K'),process[_0x45998b(0x352)][_0x45998b(0x1eb)]('\x1b[1A\x1b[2K');},_0x5c4ea0=_0x5be3bd&&_0x5be3bd[_0x46b30f(0x1e7)]&&_0x5be3bd[_0x46b30f(0x1e7)]!==null&&_0x5be3bd[_0x46b30f(0x1e7)][_0x46b30f(0x1fd)]()!=='';if(!_0x5c4ea0){_0x5a646e(),console['log'](a42_0x43d93e['dim']('Cancelled'));return;}_0x5a646e();const _0x3fedd1=_0x5c8512[_0x46b30f(0x1ae)](_0x350c4f=>_0x350c4f[_0x46b30f(0x1e8)]?.['id']===_0x5be3bd[_0x46b30f(0x1e7)]);if(_0x3fedd1){const _0x559804=_0x3fedd1[_0x46b30f(0x329)]?.['name']||'?',_0x3dc6a6=_0x3fedd1['workflow']?.[_0x46b30f(0x1c6)]||'?';console['log'](_0x46b30f(0x286)+a42_0x43d93e['dim'](_0x559804)+_0x46b30f(0x306)+a42_0x43d93e[_0x46b30f(0x357)](_0x3dc6a6));}const _0x51d866=new WorkflowTimelineCommand();await _0x51d866['execute']({'args':[],'options':{..._0x21b7a8,'attemptId':_0x5be3bd['attemptId']},'tdx':_0x47755f});}[a42_0x2b3b86(0x35b)](_0x2ba6ab,_0x6a3ee){const _0x4ce505=a42_0x2b3b86,_0x3c9479=new Map();for(const _0xa98c0c of _0x2ba6ab){_0xa98c0c['id']&&_0xa98c0c[_0x4ce505(0x1e8)]?.['id']&&_0x3c9479[_0x4ce505(0x27b)](_0xa98c0c['id'],_0xa98c0c[_0x4ce505(0x1e8)]['id']);}const _0x1266e4=[];let _0x14078e='';const _0xde44b2=this['renderSessionsTimeline'](_0x2ba6ab,_0x6a3ee),_0xf51afd=_0xde44b2[_0x4ce505(0x1bd)]('\x0a');for(const _0x330c9f of _0xf51afd){if(_0x330c9f['startsWith'](_0x4ce505(0x322))||_0x330c9f[_0x4ce505(0x217)](/^\s+\d{4}-\d{2}-\d{2}/))_0x14078e=_0x330c9f;else{if(_0x330c9f[_0x4ce505(0x217)](/^[✅❌🔄🛑⏳]/)){const _0x2b012f=_0x330c9f['match'](/#(\d+)/),_0x2a7e42=_0x2b012f?_0x2b012f[0x1]:null,_0x5b8fd8=_0x2a7e42?_0x3c9479[_0x4ce505(0x1bf)](_0x2a7e42)||null:null,_0x20e2a3=_0x2ba6ab[_0x4ce505(0x1ae)](_0x3b302e=>_0x3b302e['id']===_0x2a7e42),_0x436c47=_0x20e2a3?.[_0x4ce505(0x329)]?.[_0x4ce505(0x1c6)]||'';_0x1266e4[_0x4ce505(0x2a4)]({'displayLine':_0x330c9f,'attemptId':_0x5b8fd8,'projectName':_0x436c47});}}}return{'timelineRows':_0x1266e4,'timeAxisHeader':_0x14078e};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x2d2);[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x2c8);async[a42_0x2b3b86(0x273)](_0x5118f9){const _0xe0111d=a42_0x2b3b86,{options:_0x416098,args:_0x32c4a2,tdx:_0x114118}=_0x5118f9,_0x4dec36=this['parseProjectWorkflowPattern'](_0x32c4a2,_0x416098);if(!_0x4dec36)return 0x1;const {projectName:_0x5a1e00,workflowName:_0x1ba7f7}=_0x4dec36,_0x4a57b3=_0x416098[_0xe0111d(0x2cf)];if(_0x416098[_0xe0111d(0x25f)]){if(_0x5a1e00&&_0x1ba7f7)console['error']('Filter:\x20'+_0x5a1e00+'.'+_0x1ba7f7);else _0x5a1e00&&console[_0xe0111d(0x25d)](_0xe0111d(0x259)+_0x5a1e00);_0x4a57b3&&console[_0xe0111d(0x25d)](_0xe0111d(0x1c0));}const _0x38c937=await withSpinner(_0xe0111d(0x223),()=>_0x114118['workflow']['attempts']({'projectName':_0x5a1e00,'workflowName':_0x1ba7f7,'includeRetried':_0x4a57b3,'limit':_0x416098[_0xe0111d(0x22c)]}),{'verbose':_0x416098['verbose']}),_0xb0fda2=_0x38c937[_0xe0111d(0x1e3)],_0x435555=_0x416098[_0xe0111d(0x22c)]||0x64,_0x3260e5=_0xb0fda2['length']>=_0x435555?a42_0x43d93e['dim'](_0xe0111d(0x1ca)):'';console[_0xe0111d(0x25d)](_0xe0111d(0x327)+_0xb0fda2['length']+_0xe0111d(0x2ca)+(_0xb0fda2[_0xe0111d(0x1bb)]!==0x1?'s':'')+_0x3260e5);if(_0x416098[_0xe0111d(0x30c)]===_0xe0111d(0x2f8)||_0x416098[_0xe0111d(0x30c)]===_0xe0111d(0x2a0)||_0x416098[_0xe0111d(0x30c)]==='table')await handleSDKOutput(_0xb0fda2,_0x416098);else{if(_0xb0fda2['length']===0x0){if(_0x5a1e00&&_0x1ba7f7)console[_0xe0111d(0x32a)]('No\x20attempts\x20found\x20for:\x20'+_0x5a1e00+'.'+_0x1ba7f7);else _0x5a1e00?console[_0xe0111d(0x32a)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x5a1e00):console[_0xe0111d(0x32a)](_0xe0111d(0x1df));}else{const _0xa9778d=_0x416098[_0xe0111d(0x348)],_0x87a2a0=_0xb0fda2[_0xe0111d(0x23e)](_0x3ad6bc=>{const _0xcd49dd=_0xe0111d,_0x910946=a42_0x43d93e[_0xcd49dd(0x357)]('#'+_0x3ad6bc['id']),_0x50ebf1=_0x3ad6bc[_0xcd49dd(0x329)]?.['id'],_0x3dac45=_0x3ad6bc[_0xcd49dd(0x204)]||_0x3ad6bc[_0xcd49dd(0x309)],_0x38a6e4=_0x50ebf1&&_0x3dac45?hyperlink(_0x910946,getWorkflowAttemptUrl(_0xa9778d,_0x50ebf1,_0x3dac45,_0x3ad6bc['id'])):_0x910946,{icon:_0x1a456d,text:_0x32dcc2}=getAttemptStatusDisplay(_0x3ad6bc),_0xbc5c47=(_0x3ad6bc[_0xcd49dd(0x329)]?.[_0xcd49dd(0x1c6)]||'?')+'.'+(_0x3ad6bc[_0xcd49dd(0x355)]?.[_0xcd49dd(0x1c6)]||'?'),_0x4faa1f=_0x3ad6bc['sessionTime']?a42_0x43d93e[_0xcd49dd(0x357)](_0x3ad6bc[_0xcd49dd(0x26b)]):'';return(_0x38a6e4+'\x20'+_0x1a456d+(_0x32dcc2?'\x20'+_0x32dcc2:'')+'\x20'+_0xbc5c47+'\x20'+_0x4faa1f)[_0xcd49dd(0x2ac)]();});await writeOutput(_0x87a2a0[_0xe0111d(0x207)]('\x0a'),_0x416098[_0xe0111d(0x256)],_0xe0111d(0x338));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x253);[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x2bd);async['execute'](_0x193c87){const _0x402a5f=a42_0x2b3b86,{options:_0x1fb85d,args:_0x4f2217,tdx:_0x82ee0e}=_0x193c87,_0x5b82b3=_0x4f2217[0x0];if(!_0x5b82b3)return console[_0x402a5f(0x25d)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x1fb85d[_0x402a5f(0x25f)]&&console[_0x402a5f(0x25d)](_0x402a5f(0x344)+_0x5b82b3);const _0x80441=await withSpinner(_0x402a5f(0x224),()=>_0x82ee0e[_0x402a5f(0x355)][_0x402a5f(0x25e)](_0x5b82b3),{'verbose':_0x1fb85d[_0x402a5f(0x25f)]}),_0x102aec=_0x80441['data'];let _0x31b60e;!_0x102aec['done']?_0x31b60e=_0x102aec['cancelRequested']?_0x402a5f(0x226):_0x402a5f(0x220):_0x31b60e=_0x102aec[_0x402a5f(0x1ec)]?_0x402a5f(0x1ec):_0x402a5f(0x25d);let _0x3d698e;if(_0x102aec[_0x402a5f(0x1d8)]&&_0x102aec[_0x402a5f(0x228)]){const _0x459049=new Date(_0x102aec[_0x402a5f(0x1d8)])[_0x402a5f(0x200)](),_0x3b3791=new Date(_0x102aec[_0x402a5f(0x228)])[_0x402a5f(0x200)]();_0x3d698e=Math[_0x402a5f(0x320)]((_0x3b3791-_0x459049)/0x3e8);}const _0x422960={'attempt_id':_0x102aec['id'],'status':_0x31b60e,..._0x102aec[_0x402a5f(0x1ba)]!==undefined&&{'index':_0x102aec['index']},..._0x102aec[_0x402a5f(0x329)]&&{'project':_0x102aec['project'][_0x402a5f(0x1c6)]},..._0x102aec[_0x402a5f(0x355)]&&{'workflow':_0x102aec[_0x402a5f(0x355)]['name']},..._0x102aec['sessionId']&&{'session_id':_0x102aec[_0x402a5f(0x309)]},..._0x102aec[_0x402a5f(0x26b)]&&{'session_time':_0x102aec['sessionTime']},..._0x102aec[_0x402a5f(0x2c5)]&&{'retry_attempt':_0x102aec[_0x402a5f(0x2c5)]},..._0x3d698e!==undefined&&{'duration_sec':_0x3d698e},..._0x102aec[_0x402a5f(0x1d8)]&&{'created_at':_0x102aec[_0x402a5f(0x1d8)]},..._0x102aec[_0x402a5f(0x228)]&&{'finished_at':_0x102aec[_0x402a5f(0x228)]},...Object[_0x402a5f(0x2b6)](_0x102aec['params'])[_0x402a5f(0x1bb)]>0x0&&{'params':_0x102aec[_0x402a5f(0x2f0)]}};return await handleSingleObjectOutput(_0x422960,_0x1fb85d),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x1b8);['description']='Show\x20tasks\x20for\x20an\x20attempt';async[a42_0x2b3b86(0x273)](_0x36410c){const _0x358293=a42_0x2b3b86,{options:_0x5ae06e,args:_0x1623a0,tdx:_0x16df19}=_0x36410c,_0x38f887=_0x1623a0[0x0];if(!_0x38f887)return console[_0x358293(0x25d)](_0x358293(0x304)),0x1;const _0x370638=_0x5ae06e[_0x358293(0x252)];_0x5ae06e['verbose']&&(console['error']('Attempt\x20ID:\x20'+_0x38f887),_0x370638&&console['error'](_0x358293(0x232)));const _0x5dc47f=await withSpinner(_0x358293(0x240),()=>_0x16df19[_0x358293(0x355)][_0x358293(0x1ff)](_0x38f887,_0x370638||![]),{'verbose':_0x5ae06e[_0x358293(0x25f)]}),_0x2fdbcd=_0x5dc47f[_0x358293(0x1e3)];return console[_0x358293(0x25d)](_0x358293(0x327)+_0x2fdbcd[_0x358293(0x1bb)]+'\x20task'+(_0x2fdbcd[_0x358293(0x1bb)]!==0x1?'s':'')),await handleSDKOutput(_0x2fdbcd,_0x5ae06e),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a42_0x2b3b86(0x274);[a42_0x2b3b86(0x341)]='Show\x20logs\x20for\x20a\x20workflow\x20attempt';async[a42_0x2b3b86(0x273)](_0x231d6c){const _0x47c6a3=a42_0x2b3b86,{options:_0x5e2a83,args:_0x3694a6,tdx:_0x410e27}=_0x231d6c,_0xfbfc2d=_0x3694a6[0x0];let _0x384f8f=_0x3694a6[0x1];if(!_0xfbfc2d)return console[_0x47c6a3(0x25d)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x5e2a83[_0x47c6a3(0x25f)]&&(console[_0x47c6a3(0x25d)]('Attempt\x20ID:\x20'+_0xfbfc2d),_0x384f8f&&console[_0x47c6a3(0x25d)](_0x47c6a3(0x25b)+_0x384f8f));const _0x81aa07=await withSpinner('Fetching\x20log\x20files...',()=>_0x410e27[_0x47c6a3(0x355)]['logFiles'](_0xfbfc2d,_0x384f8f),{'verbose':_0x5e2a83[_0x47c6a3(0x25f)]}),_0x40d97b=_0x81aa07[_0x47c6a3(0x1e3)];if(_0x40d97b['length']===0x0)return console[_0x47c6a3(0x25d)](_0x47c6a3(0x275)),0x0;if(!_0x384f8f&&(_0x5e2a83[_0x47c6a3(0x2f8)]||_0x5e2a83[_0x47c6a3(0x30c)]))return await handleSDKOutput(_0x40d97b,_0x5e2a83),0x0;if(!_0x384f8f){const _0xe8a8e1=_0x40d97b[_0x47c6a3(0x23e)](_0x503f0a=>({'title':_0x503f0a[_0x47c6a3(0x1e1)]+'\x20('+formatBytes(_0x503f0a['fileSize'])+')','value':_0x503f0a['taskName']})),_0x1ff395=await a42_0x456b5e({'type':_0x47c6a3(0x1cb),'name':'task','message':_0x47c6a3(0x1f1),'choices':_0xe8a8e1});if(!_0x1ff395[_0x47c6a3(0x269)])return console['error'](_0x47c6a3(0x319)),0x0;_0x384f8f=_0x1ff395['task'];}const _0x1d8f53=await withSpinner('Downloading\x20logs...',()=>_0x410e27[_0x47c6a3(0x355)][_0x47c6a3(0x1c3)](_0xfbfc2d,_0x384f8f),{'verbose':_0x5e2a83[_0x47c6a3(0x25f)]}),_0x353292=_0x1d8f53['data'];return _0x353292?console[_0x47c6a3(0x32a)](_0x353292):console['error'](_0x47c6a3(0x1cd)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x2b2);[a42_0x2b3b86(0x341)]='Kill\x20a\x20running\x20attempt';async[a42_0x2b3b86(0x273)](_0x57e3ed){const _0x15243d=a42_0x2b3b86,{options:_0x509b90,args:_0x29702c,tdx:_0x1b76d3}=_0x57e3ed,_0x41def9=_0x29702c[0x0];if(!_0x41def9)return console[_0x15243d(0x25d)](_0x15243d(0x304)),0x1;const _0x3722cc=_0x509b90[_0x15243d(0x2d8)];_0x509b90[_0x15243d(0x25f)]&&(console[_0x15243d(0x25d)]('Attempt\x20ID:\x20'+_0x41def9),_0x3722cc&&console['error'](_0x15243d(0x2a9)+_0x3722cc));if(!_0x509b90[_0x15243d(0x263)]){if(!isInteractive())return console['error'](a42_0x43d93e[_0x15243d(0x216)](_0x15243d(0x29a)),_0x15243d(0x358)),console[_0x15243d(0x25d)](a42_0x43d93e['dim'](_0x15243d(0x293))),0x1;const _0xe943ec=await confirmKey(_0x15243d(0x298)+_0x41def9+'?');if(!_0xe943ec)return console[_0x15243d(0x25d)](a42_0x43d93e['yellow'](_0x15243d(0x319))),0x1;}const _0x1bfc8a=await withSpinner(_0x15243d(0x202),()=>_0x1b76d3['workflow'][_0x15243d(0x315)](_0x41def9,_0x3722cc),{'verbose':_0x509b90[_0x15243d(0x25f)]}),_0x2d0a9a=_0x1bfc8a[_0x15243d(0x1e3)];return console[_0x15243d(0x25d)]('✔\x20'+_0x2d0a9a),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x330);[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x2af);async[a42_0x2b3b86(0x273)](_0x5cdfda){const _0x3e93d3=a42_0x2b3b86,{options:_0x706ff7,args:_0x24ec79,tdx:_0x4239cc}=_0x5cdfda,_0x6df12b=_0x24ec79[0x0];if(!_0x6df12b)return console['error'](_0x3e93d3(0x247)),console[_0x3e93d3(0x25d)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x34c908=![],_0x5960ec=_0x6df12b;if(_0x6df12b[_0x3e93d3(0x2c0)](_0x3e93d3(0x1d1)))_0x34c908=!![],_0x5960ec=_0x6df12b[_0x3e93d3(0x2cd)](0x8);else{if(_0x6df12b[_0x3e93d3(0x2c0)](_0x3e93d3(0x2da)))_0x34c908=![],_0x5960ec=_0x6df12b['substring'](0x8);else return console[_0x3e93d3(0x25d)](_0x3e93d3(0x238)),console[_0x3e93d3(0x25d)](_0x3e93d3(0x2e9)),0x1;}const _0x704e70=_0x706ff7[_0x3e93d3(0x2a5)],_0x1d749d=_0x706ff7[_0x3e93d3(0x2c9)],_0x3838f4=_0x706ff7['params'],_0x191557=_0x706ff7[_0x3e93d3(0x27c)];_0x706ff7[_0x3e93d3(0x25f)]&&(console[_0x3e93d3(0x25d)](_0x3e93d3(0x244)+(_0x34c908?_0x3e93d3(0x20a):_0x3e93d3(0x25e))+'\x20'+_0x5960ec),_0x704e70&&console[_0x3e93d3(0x25d)](_0x3e93d3(0x2f1)+_0x704e70),_0x1d749d&&console[_0x3e93d3(0x25d)]('Resume\x20from:\x20'+_0x1d749d),_0x3838f4&&console[_0x3e93d3(0x25d)](_0x3e93d3(0x20c)+_0x3838f4),_0x191557&&console['error'](_0x3e93d3(0x2eb)));let _0x543fad;if(_0x3838f4)try{if(_0x3838f4[_0x3e93d3(0x2c0)]('@')){const _0x37cf87=await import(_0x3e93d3(0x34e)),_0x490cfa=_0x3838f4[_0x3e93d3(0x2cd)](0x1),_0x15ff41=await _0x37cf87[_0x3e93d3(0x21e)](_0x490cfa,'utf-8');_0x543fad=JSON[_0x3e93d3(0x312)](_0x15ff41);}else _0x543fad=JSON[_0x3e93d3(0x312)](_0x3838f4);}catch{return console[_0x3e93d3(0x25d)](_0x3e93d3(0x29d)),0x1;}if(!_0x706ff7[_0x3e93d3(0x263)]){if(!isInteractive())return console['error'](a42_0x43d93e[_0x3e93d3(0x216)](_0x3e93d3(0x29a)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x3e93d3(0x25d)](a42_0x43d93e[_0x3e93d3(0x357)](_0x3e93d3(0x293))),0x1;const _0x4ad874=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x34c908?_0x3e93d3(0x20a):_0x3e93d3(0x25e))+'\x20'+_0x5960ec+'?');if(!_0x4ad874)return console[_0x3e93d3(0x25d)](a42_0x43d93e[_0x3e93d3(0x2a1)]('Cancelled')),0x1;}let _0x132bce;_0x34c908?_0x132bce=await withSpinner(_0x3e93d3(0x24f),()=>_0x4239cc[_0x3e93d3(0x355)][_0x3e93d3(0x33a)](_0x5960ec,{'fromTask':_0x704e70,'retryParams':_0x543fad}),{'verbose':_0x706ff7['verbose']}):_0x132bce=await withSpinner(_0x3e93d3(0x342),()=>_0x4239cc[_0x3e93d3(0x355)][_0x3e93d3(0x1f9)](_0x5960ec,{'resumeFrom':_0x1d749d,'retryParams':_0x543fad,'force':_0x191557}),{'verbose':_0x706ff7['verbose']});const _0x364017=_0x132bce[_0x3e93d3(0x1e3)];return console['error'](_0x3e93d3(0x287)),console[_0x3e93d3(0x25d)](_0x3e93d3(0x2fc)+_0x364017[_0x3e93d3(0x1e7)]),console[_0x3e93d3(0x25d)](_0x3e93d3(0x1b7)+_0x364017[_0x3e93d3(0x309)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x1db);['description']=a42_0x2b3b86(0x270);async[a42_0x2b3b86(0x273)](_0x5a2e32){const _0x5012d2=a42_0x2b3b86,{options:_0x347d89,args:_0x37df7c,tdx:_0x470955}=_0x5a2e32;let _0x3e61ae=_0x37df7c[0x0];if(!_0x3e61ae){const _0x48170c=this[_0x5012d2(0x20b)]([],_0x347d89),_0x2d2458=await withSpinner(_0x5012d2(0x29b),()=>_0x470955[_0x5012d2(0x355)]['workflows'](_0x48170c,{'limit':_0x347d89['limit']}),{'verbose':_0x347d89['verbose']}),_0x50e2eb=_0x2d2458[_0x5012d2(0x1e3)];if(_0x50e2eb['length']===0x0)return console[_0x5012d2(0x25d)](_0x5012d2(0x230)),!_0x48170c&&console[_0x5012d2(0x25d)](a42_0x43d93e[_0x5012d2(0x357)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x504cb2=_0x50e2eb[_0x5012d2(0x23e)](_0x2caf58=>({'title':_0x2caf58[_0x5012d2(0x329)]?.[_0x5012d2(0x1c6)]+'.'+_0x2caf58[_0x5012d2(0x1c6)],'value':_0x2caf58[_0x5012d2(0x329)]?.[_0x5012d2(0x1c6)]+'.'+_0x2caf58['name'],'description':_0x2caf58[_0x5012d2(0x281)]?_0x5012d2(0x2d3)+_0x2caf58[_0x5012d2(0x281)]:undefined})),_0x10aee7=await a42_0x456b5e({'type':_0x5012d2(0x1cb),'name':'workflow','message':_0x5012d2(0x2ec),'choices':_0x504cb2});if(!_0x10aee7[_0x5012d2(0x355)])return 0x1;_0x3e61ae=_0x10aee7['workflow'];}if(!_0x3e61ae[_0x5012d2(0x27a)]('.')){const _0x46b0aa=this[_0x5012d2(0x20b)]([],_0x347d89);if(_0x46b0aa)_0x3e61ae=_0x46b0aa+'.'+_0x3e61ae;else return console[_0x5012d2(0x25d)](a42_0x43d93e[_0x5012d2(0x216)](_0x5012d2(0x276)),_0x5012d2(0x1de)),console['error'](a42_0x43d93e[_0x5012d2(0x357)](_0x5012d2(0x301))),0x1;}const _0x2790b1=_0x347d89[_0x5012d2(0x1b9)],_0x3d45b0=_0x347d89[_0x5012d2(0x26b)],_0x57ffa5={};if(_0x2790b1&&Array[_0x5012d2(0x1f2)](_0x2790b1))for(const _0x1511db of _0x2790b1){const _0x513211=_0x1511db['indexOf']('=');if(_0x513211===-0x1)return console[_0x5012d2(0x25d)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x1511db),console[_0x5012d2(0x25d)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x793c89=_0x1511db[_0x5012d2(0x2cd)](0x0,_0x513211),_0x2b81c0=_0x1511db[_0x5012d2(0x2cd)](_0x513211+0x1);try{_0x57ffa5[_0x793c89]=JSON[_0x5012d2(0x312)](_0x2b81c0);}catch{_0x57ffa5[_0x793c89]=_0x2b81c0;}}_0x347d89[_0x5012d2(0x25f)]&&(console['error']('Workflow:\x20'+_0x3e61ae),Object[_0x5012d2(0x2b6)](_0x57ffa5)['length']>0x0&&console[_0x5012d2(0x25d)](_0x5012d2(0x1f3)+JSON[_0x5012d2(0x2c7)](_0x57ffa5)),_0x3d45b0&&console[_0x5012d2(0x25d)]('Session\x20time:\x20'+_0x3d45b0));const _0x2ca00b=await withSpinner('Starting\x20workflow\x20run...',()=>_0x470955[_0x5012d2(0x355)][_0x5012d2(0x34c)](_0x3e61ae,_0x57ffa5,{'sessionTime':_0x3d45b0}),{'verbose':_0x347d89[_0x5012d2(0x25f)]}),_0x4d9c37=_0x2ca00b[_0x5012d2(0x1e3)];console['error']('✔\x20Workflow\x20run\x20started'),console[_0x5012d2(0x25d)](_0x5012d2(0x1dc)+_0x4d9c37['id']),console[_0x5012d2(0x25d)](_0x5012d2(0x1b7)+_0x4d9c37[_0x5012d2(0x309)]),console[_0x5012d2(0x25d)](_0x5012d2(0x2d5)+_0x4d9c37[_0x5012d2(0x329)]?.[_0x5012d2(0x1c6)]),console[_0x5012d2(0x25d)](_0x5012d2(0x2ad)+_0x4d9c37[_0x5012d2(0x355)]?.[_0x5012d2(0x1c6)]);if(_0x4d9c37[_0x5012d2(0x329)]?.['id']&&_0x4d9c37[_0x5012d2(0x309)]&&_0x4d9c37['id']){const _0x4a8779=_0x347d89['site'],_0x22c0da=getConsoleUrl(_0x4a8779,_0x5012d2(0x27f)+_0x4d9c37[_0x5012d2(0x329)]['id']+'/sessions/'+_0x4d9c37[_0x5012d2(0x309)]+_0x5012d2(0x1d4)+_0x4d9c37['id']);console[_0x5012d2(0x25d)](_0x5012d2(0x1b6)+a42_0x43d93e['cyan'](_0x22c0da));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a42_0x2b3b86(0x2c4);[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x33b);async['execute'](_0x5927e7){const _0xaec787=a42_0x2b3b86,{options:_0x1686d6,args:_0x23d48a,tdx:_0x3d2c71}=_0x5927e7,_0x39bfaa=_0x23d48a[0x0],_0x211478=_0x23d48a[0x1]||'.';if(!_0x39bfaa)return console[_0xaec787(0x25d)](_0xaec787(0x1b3)),console[_0xaec787(0x25d)](_0xaec787(0x1b0)),0x1;const _0x17d8fb=_0x1686d6['revision'];_0x1686d6[_0xaec787(0x25f)]&&(console['error'](_0xaec787(0x286)+_0x39bfaa),console[_0xaec787(0x25d)](_0xaec787(0x1b1)+_0x211478),_0x17d8fb&&console[_0xaec787(0x25d)](_0xaec787(0x219)+_0x17d8fb));const _0x353f9a=await withSpinner('Downloading\x20project\x20'+_0x39bfaa+_0xaec787(0x24b),()=>_0x3d2c71[_0xaec787(0x355)][_0xaec787(0x32b)](_0x39bfaa,_0x211478,{'revision':_0x17d8fb}),{'verbose':_0x1686d6[_0xaec787(0x25f)]}),_0x502e44=_0x353f9a['data'];return console['error'](_0xaec787(0x1f0)+_0x502e44[_0xaec787(0x1d5)]),console[_0xaec787(0x25d)](_0xaec787(0x1c8)+_0x502e44[_0xaec787(0x281)]),console['error'](_0xaec787(0x1cc)+_0x502e44['filesExtracted']),console[_0xaec787(0x25d)](_0xaec787(0x242)+_0x211478+'/'+_0x502e44[_0xaec787(0x1d5)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x323);[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x21d);async['execute'](_0x5e194b){const _0x1d0d04=a42_0x2b3b86,{options:_0x2d7943,args:_0xca1eb7,tdx:_0xbbc324}=_0x5e194b;let _0x2f4c57='.',_0x171cd4=_0x2d7943[_0x1d0d04(0x1c6)];if(_0xca1eb7[0x0]){const {promises:_0x3267b0}=await import('fs');try{const _0x142883=await _0x3267b0[_0x1d0d04(0x1ce)](_0xca1eb7[0x0]);if(_0x142883[_0x1d0d04(0x2ed)]())_0x2f4c57=_0xca1eb7[0x0];else return console[_0x1d0d04(0x25d)](_0x1d0d04(0x30d)+_0xca1eb7[0x0]+_0x1d0d04(0x23c)),0x1;}catch{_0x171cd4=_0xca1eb7[0x0],_0x2f4c57='.';}}const _0x5f22d8=_0x2d7943[_0x1d0d04(0x281)],_0x172883=_0x2d7943[_0x1d0d04(0x1ee)];_0x2d7943[_0x1d0d04(0x25f)]&&(console['error']('Project\x20directory:\x20'+_0x2f4c57),_0x171cd4&&console[_0x1d0d04(0x25d)](_0x1d0d04(0x2d6)+_0x171cd4),_0x5f22d8&&console[_0x1d0d04(0x25d)](_0x1d0d04(0x219)+_0x5f22d8),_0x172883&&console[_0x1d0d04(0x25d)](_0x1d0d04(0x314)));const _0x5750ab=await withSpinner(_0x1d0d04(0x33e),()=>_0xbbc324['workflow'][_0x1d0d04(0x2a4)](_0x2f4c57,{'projectName':_0x171cd4,'revision':_0x5f22d8,'skipValidation':_0x172883}),{'verbose':_0x2d7943[_0x1d0d04(0x25f)]}),_0x28e9a5=_0x5750ab[_0x1d0d04(0x1e3)];return console[_0x1d0d04(0x25d)](_0x1d0d04(0x2c6)+_0x28e9a5['projectName']),console['error'](_0x1d0d04(0x308)+_0x28e9a5['projectId']),console[_0x1d0d04(0x25d)](_0x1d0d04(0x1c8)+_0x28e9a5[_0x1d0d04(0x281)]),await this['showWorkflowConsoleUrl'](_0xbbc324,_0x28e9a5[_0x1d0d04(0x1d5)],_0x2d7943[_0x1d0d04(0x348)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x285);[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x21c);async[a42_0x2b3b86(0x273)](_0x472ca0){const _0xd9417c=a42_0x2b3b86,{options:_0x2e47c2,args:_0x5d7b15,tdx:_0x418df2}=_0x472ca0,_0x2eb7ad=_0x5d7b15[0x0],_0x34ae5c=_0x5d7b15[0x1];if(!_0x2eb7ad)return console[_0xd9417c(0x25d)](a42_0x43d93e['red']('Error:'),'Project\x20name\x20is\x20required'),console[_0xd9417c(0x25d)](a42_0x43d93e[_0xd9417c(0x357)](_0xd9417c(0x1e4))),0x1;const _0xe00ca3=_0x2e47c2[_0xd9417c(0x281)];_0x2e47c2[_0xd9417c(0x25f)]&&(console[_0xd9417c(0x25d)]('Project:\x20'+_0x2eb7ad),_0x34ae5c&&console['error'](_0xd9417c(0x28e)+_0x34ae5c),_0xe00ca3&&console['error']('Revision:\x20'+_0xe00ca3),_0x2e47c2['dryRun']&&console[_0xd9417c(0x25d)](_0xd9417c(0x1af)));const _0x469e52=await withSpinner(_0xd9417c(0x35d)+_0x2eb7ad+_0xd9417c(0x24b),()=>_0x418df2['workflow']['pullProject'](_0x2eb7ad,{'targetDir':_0x34ae5c,'revision':_0xe00ca3}),{'verbose':_0x2e47c2[_0xd9417c(0x25f)]}),_0x498297=_0x469e52[_0xd9417c(0x1e3)];_0x498297[_0xd9417c(0x227)]?console['error'](_0xd9417c(0x2ba)+_0x498297[_0xd9417c(0x1d5)]):console[_0xd9417c(0x25d)](_0xd9417c(0x2e2)+_0x498297[_0xd9417c(0x1d5)]);console['error'](_0xd9417c(0x1c8)+_0x498297[_0xd9417c(0x281)]),console[_0xd9417c(0x25d)](_0xd9417c(0x2dd)+(a42_0x44134b[_0xd9417c(0x268)](process[_0xd9417c(0x1fc)](),_0x498297[_0xd9417c(0x27e)])||'.')),console['error'](_0xd9417c(0x303)+a42_0x43d93e[_0xd9417c(0x1f5)]('+'+_0x498297[_0xd9417c(0x2ef)][_0xd9417c(0x299)]+_0xd9417c(0x1b2))+',\x20'+(a42_0x43d93e[_0xd9417c(0x2a1)]('~'+_0x498297[_0xd9417c(0x2ef)]['modified']+_0xd9417c(0x27d))+',\x20')+(a42_0x43d93e[_0xd9417c(0x216)]('-'+_0x498297['summary'][_0xd9417c(0x1fb)]+'\x20deleted')+',\x20')+(''+a42_0x43d93e[_0xd9417c(0x357)](_0x498297[_0xd9417c(0x2ef)][_0xd9417c(0x23f)]+_0xd9417c(0x332))));for(const _0x455502 of _0x498297[_0xd9417c(0x32c)]){_0x455502['type']===_0xd9417c(0x351)&&_0x455502['diff']&&(console[_0xd9417c(0x25d)]('\x0a'+a42_0x43d93e['cyan'](_0xd9417c(0x336)+_0x455502[_0xd9417c(0x2bf)])),console[_0xd9417c(0x25d)](_0x455502[_0xd9417c(0x35c)]));}if(!_0x498297['hasChanges'])return saveSessionContext({'workflow_project':_0x498297['projectName']},_0x2e47c2[_0xd9417c(0x20a)]),console[_0xd9417c(0x25d)](a42_0x43d93e[_0xd9417c(0x1f5)](_0xd9417c(0x2d1))),console['error'](a42_0x43d93e[_0xd9417c(0x357)](_0xd9417c(0x311)+_0x498297[_0xd9417c(0x1d5)])),0x0;if(_0x2e47c2[_0xd9417c(0x289)])return console[_0xd9417c(0x25d)](a42_0x43d93e[_0xd9417c(0x2a1)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x2e47c2[_0xd9417c(0x263)]){if(!isInteractive())return console[_0xd9417c(0x25d)](a42_0x43d93e[_0xd9417c(0x216)](_0xd9417c(0x29a)),_0xd9417c(0x358)),console[_0xd9417c(0x25d)](a42_0x43d93e[_0xd9417c(0x357)](_0xd9417c(0x293))),0x1;const _0x397103=await confirmKey(_0xd9417c(0x32e));if(!_0x397103)return console[_0xd9417c(0x25d)](a42_0x43d93e[_0xd9417c(0x2a1)](_0xd9417c(0x319)),_0xd9417c(0x325)),0x1;}await withSpinner('Writing\x20files...',()=>_0x418df2[_0xd9417c(0x355)][_0xd9417c(0x22f)](_0x498297,{'revision':_0xe00ca3}),{'verbose':_0x2e47c2[_0xd9417c(0x25f)]}),saveSessionContext({'workflow_project':_0x498297[_0xd9417c(0x1d5)]},_0x2e47c2['session']),console[_0xd9417c(0x25d)](a42_0x43d93e[_0xd9417c(0x1f5)](_0xd9417c(0x258)));const _0x5b3818=a42_0x44134b[_0xd9417c(0x268)](process[_0xd9417c(0x1fc)](),_0x498297[_0xd9417c(0x27e)])||'.';return console[_0xd9417c(0x25d)](a42_0x43d93e[_0xd9417c(0x357)]('\x20\x20Location:\x20'+_0x5b3818)),console['error'](a42_0x43d93e[_0xd9417c(0x357)](_0xd9417c(0x311)+_0x498297['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x243);[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x2db);async[a42_0x2b3b86(0x273)](_0x55733d){const _0x143d15=a42_0x2b3b86,{options:_0x4588b4,args:_0xdff430,tdx:_0x199889}=_0x55733d,_0x35d287=this[_0x143d15(0x1ef)](_0xdff430,_0x4588b4),_0x162ec5=_0x4588b4[_0x143d15(0x281)],_0x10f6c3=_0x4588b4['skipValidation'];_0x4588b4[_0x143d15(0x25f)]&&(_0x35d287&&console['error'](_0x143d15(0x1ed)+_0x35d287),_0x162ec5&&console[_0x143d15(0x25d)](_0x143d15(0x219)+_0x162ec5),_0x4588b4['dryRun']&&console[_0x143d15(0x25d)]('Dry\x20run:\x20yes'),_0x10f6c3&&console[_0x143d15(0x25d)](_0x143d15(0x314)));let _0x42654a;try{_0x42654a=await withSpinner(_0x143d15(0x2d0),()=>_0x199889[_0x143d15(0x355)][_0x143d15(0x265)]({'sourceDir':_0x35d287,'revision':_0x162ec5,'skipValidation':_0x10f6c3}),{'verbose':_0x4588b4[_0x143d15(0x25f)]});}catch(_0x42607e){if(_0x42607e instanceof Error&&_0x42607e[_0x143d15(0x1b5)][_0x143d15(0x27a)](_0x143d15(0x2a7)))return console[_0x143d15(0x25d)](a42_0x43d93e[_0x143d15(0x216)](_0x143d15(0x276)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x4588b4[_0x143d15(0x35a)]?console['error'](a42_0x43d93e[_0x143d15(0x357)]('Tip:\x20cd\x20to\x20workflows/'+_0x4588b4['workflowProject']+_0x143d15(0x1d0)+_0x4588b4[_0x143d15(0x35a)]+'\x27')):console[_0x143d15(0x25d)](a42_0x43d93e['dim'](_0x143d15(0x33c))),0x1;throw _0x42607e;}const _0x21d9eb=_0x42654a[_0x143d15(0x1e3)];console['error'](_0x143d15(0x1f8)+_0x21d9eb['projectName']),console['error'](_0x143d15(0x316)+_0x21d9eb[_0x143d15(0x239)]),console['error'](_0x143d15(0x1c8)+_0x21d9eb[_0x143d15(0x281)]),console[_0x143d15(0x25d)]('\x20\x20Changes:\x20'+a42_0x43d93e[_0x143d15(0x1f5)]('+'+_0x21d9eb['summary'][_0x143d15(0x299)]+_0x143d15(0x1b2))+',\x20'+(a42_0x43d93e[_0x143d15(0x2a1)]('~'+_0x21d9eb[_0x143d15(0x2ef)][_0x143d15(0x351)]+'\x20modified')+',\x20')+(a42_0x43d93e[_0x143d15(0x216)]('-'+_0x21d9eb[_0x143d15(0x2ef)][_0x143d15(0x1fb)]+_0x143d15(0x343))+',\x20')+(''+a42_0x43d93e[_0x143d15(0x357)](_0x21d9eb['summary'][_0x143d15(0x23f)]+'\x20unchanged')));for(const _0x6feed2 of _0x21d9eb['changes']){_0x6feed2[_0x143d15(0x2b4)]===_0x143d15(0x351)&&_0x6feed2['diff']&&(console[_0x143d15(0x25d)]('\x0a'+a42_0x43d93e[_0x143d15(0x337)](_0x143d15(0x336)+_0x6feed2[_0x143d15(0x2bf)])),console[_0x143d15(0x25d)](_0x6feed2[_0x143d15(0x35c)]));}if(!_0x21d9eb[_0x143d15(0x2e5)])return console[_0x143d15(0x25d)](a42_0x43d93e[_0x143d15(0x1f5)](_0x143d15(0x31d))),await this[_0x143d15(0x23b)](_0x199889,_0x21d9eb[_0x143d15(0x1d5)],_0x4588b4[_0x143d15(0x348)]),0x0;if(_0x4588b4['dryRun'])return console[_0x143d15(0x25d)](a42_0x43d93e[_0x143d15(0x2a1)](_0x143d15(0x1e9))),0x0;if(!_0x4588b4[_0x143d15(0x263)]){if(!isInteractive())return console[_0x143d15(0x25d)](a42_0x43d93e[_0x143d15(0x216)]('\x0aError:'),_0x143d15(0x358)),console[_0x143d15(0x25d)](a42_0x43d93e[_0x143d15(0x357)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x5c2298=await confirmKey(_0x143d15(0x307));if(!_0x5c2298)return console[_0x143d15(0x25d)](a42_0x43d93e[_0x143d15(0x2a1)](_0x143d15(0x319)),_0x143d15(0x350)),0x1;}const _0x39620c=await withSpinner(_0x143d15(0x2bb),()=>_0x199889[_0x143d15(0x355)][_0x143d15(0x292)](_0x21d9eb),{'verbose':_0x4588b4['verbose']}),_0x4bd5d6=_0x39620c[_0x143d15(0x1e3)];return console['error'](a42_0x43d93e[_0x143d15(0x1f5)]('✔\x20Push\x20complete')),console['error'](_0x143d15(0x308)+_0x4bd5d6[_0x143d15(0x35f)]),console[_0x143d15(0x25d)](_0x143d15(0x1c8)+_0x4bd5d6[_0x143d15(0x281)]),await this[_0x143d15(0x23b)](_0x199889,_0x4bd5d6[_0x143d15(0x1d5)],_0x4588b4[_0x143d15(0x348)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x2dc);[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x1be);async[a42_0x2b3b86(0x273)](_0x1242ea){const _0x525900=a42_0x2b3b86,{options:_0x3d90f5,args:_0x138784,tdx:_0x1fb90a}=_0x1242ea,_0x6e30da=this[_0x525900(0x1ef)](_0x138784,_0x3d90f5),_0x40f17f=_0x3d90f5[_0x525900(0x1c6)],_0x56050d=_0x3d90f5[_0x525900(0x281)],_0x21da6b=_0x3d90f5[_0x525900(0x1ee)];if(!_0x6e30da)return console[_0x525900(0x25d)](a42_0x43d93e[_0x525900(0x216)](_0x525900(0x276)),_0x525900(0x21a)),console['error'](a42_0x43d93e[_0x525900(0x357)](_0x525900(0x279))),console[_0x525900(0x25d)](a42_0x43d93e[_0x525900(0x357)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x40f17f)return console[_0x525900(0x25d)](a42_0x43d93e[_0x525900(0x216)](_0x525900(0x276)),_0x525900(0x29c)),console[_0x525900(0x25d)](a42_0x43d93e['dim'](_0x525900(0x279))),0x1;_0x3d90f5['verbose']&&(console[_0x525900(0x25d)](_0x525900(0x1ed)+_0x6e30da),console[_0x525900(0x25d)](_0x525900(0x25c)+_0x40f17f),_0x56050d&&console[_0x525900(0x25d)](_0x525900(0x219)+_0x56050d),_0x3d90f5[_0x525900(0x289)]&&console[_0x525900(0x25d)](_0x525900(0x1af)),_0x21da6b&&console[_0x525900(0x25d)](_0x525900(0x314)));const _0xbab3c2=await withSpinner('Analyzing\x20project...',()=>_0x1fb90a[_0x525900(0x355)][_0x525900(0x218)](_0x6e30da,_0x40f17f,{'revision':_0x56050d,'skipValidation':_0x21da6b}),{'verbose':_0x3d90f5['verbose']}),_0x1b262d=_0xbab3c2[_0x525900(0x1e3)];console[_0x525900(0x25d)]('Source:\x20'+_0x1b262d[_0x525900(0x239)]);_0x1b262d['sourceProjectName']&&console['error'](_0x525900(0x221)+_0x1b262d['sourceProjectName']);console[_0x525900(0x25d)](_0x525900(0x25c)+_0x1b262d['newProjectName']),console['error'](_0x525900(0x219)+_0x1b262d[_0x525900(0x281)]),console['error'](_0x525900(0x356)+_0x1b262d[_0x525900(0x324)]);_0x1b262d['targetExists']&&(console[_0x525900(0x25d)](a42_0x43d93e[_0x525900(0x2a1)](_0x525900(0x335)+_0x1b262d[_0x525900(0x1da)]+_0x525900(0x295)+_0x1b262d['existingProjectId']+')')),console['error'](a42_0x43d93e[_0x525900(0x2a1)](_0x525900(0x210))));if(_0x3d90f5[_0x525900(0x289)])return console[_0x525900(0x25d)](a42_0x43d93e[_0x525900(0x2a1)](_0x525900(0x24d))),0x0;if(!_0x3d90f5[_0x525900(0x263)]){if(!isInteractive())return console['error'](a42_0x43d93e[_0x525900(0x216)](_0x525900(0x29a)),_0x525900(0x358)),console[_0x525900(0x25d)](a42_0x43d93e['dim'](_0x525900(0x293))),0x1;const _0x20c201=_0x1b262d[_0x525900(0x30e)]||a42_0x44134b[_0x525900(0x328)](_0x6e30da),_0x20f425=_0x1b262d[_0x525900(0x1ad)]?_0x525900(0x2c2)+_0x40f17f+_0x525900(0x2e7):_0x525900(0x2d7)+_0x20c201+'\x22\x20to\x20new\x20project\x20\x22'+_0x40f17f+'\x22?',_0x2c3ab3=await confirmKey(_0x20f425);if(!_0x2c3ab3)return console['error'](a42_0x43d93e[_0x525900(0x2a1)](_0x525900(0x319))),0x1;}const _0xb8ca5d=await withSpinner(_0x1b262d[_0x525900(0x1ad)]?_0x525900(0x1c5)+_0x40f17f+'...':_0x525900(0x2e6)+_0x40f17f+_0x525900(0x24b),()=>_0x1fb90a[_0x525900(0x355)][_0x525900(0x26c)](_0x1b262d),{'verbose':_0x3d90f5[_0x525900(0x25f)]}),_0x42de84=_0xb8ca5d[_0x525900(0x1e3)];return console[_0x525900(0x25d)](a42_0x43d93e[_0x525900(0x1f5)](_0x1b262d['targetExists']?'✔\x20Project\x20updated':_0x525900(0x266))),console[_0x525900(0x25d)](_0x525900(0x2d5)+_0x42de84['newProjectName']),console[_0x525900(0x25d)](_0x525900(0x308)+_0x42de84['newProjectId']),console[_0x525900(0x25d)](_0x525900(0x1c8)+_0x42de84[_0x525900(0x281)]),await this[_0x525900(0x23b)](_0x1fb90a,_0x42de84[_0x525900(0x1da)],_0x3d90f5[_0x525900(0x348)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x346);[a42_0x2b3b86(0x341)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0x2b3b86(0x273)](_0x1e51e1){const _0x3c209f=a42_0x2b3b86,{options:_0x67884c,args:_0x5e4134,tdx:_0x12f9a9}=_0x1e51e1,_0xf1995d=_0x5e4134[0x0];if(!_0xf1995d)return console[_0x3c209f(0x25d)](_0x3c209f(0x2f9)),console[_0x3c209f(0x25d)](_0x3c209f(0x2e0)),0x1;_0x67884c['verbose']&&console['error'](_0x3c209f(0x286)+_0xf1995d);if(!_0x67884c[_0x3c209f(0x263)]){if(!isInteractive())return console['error'](a42_0x43d93e[_0x3c209f(0x216)](_0x3c209f(0x29a)),_0x3c209f(0x358)),console[_0x3c209f(0x25d)](a42_0x43d93e[_0x3c209f(0x357)](_0x3c209f(0x293))),0x1;const _0x6fba8a=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0xf1995d+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x6fba8a)return console[_0x3c209f(0x25d)](a42_0x43d93e['yellow'](_0x3c209f(0x319))),0x1;}const _0x55dcff=await withSpinner(_0x3c209f(0x248)+_0xf1995d+_0x3c209f(0x24b),()=>_0x12f9a9[_0x3c209f(0x355)][_0x3c209f(0x310)](_0xf1995d),{'verbose':_0x67884c[_0x3c209f(0x25f)]}),_0x45dbf5=_0x55dcff[_0x3c209f(0x1e3)];return console[_0x3c209f(0x25d)]('✔\x20Deleted\x20project\x20'+_0x45dbf5[_0x3c209f(0x1d5)]),console[_0x3c209f(0x25d)](_0x3c209f(0x308)+_0x45dbf5[_0x3c209f(0x35f)]),0x0;}}export function parseKeyValue(_0x4447a7){const _0x279ffd=a42_0x2b3b86,_0x4bd86c=_0x4447a7[_0x279ffd(0x2f5)]('=');if(_0x4bd86c===-0x1)throw new Error(_0x279ffd(0x26f)+_0x4447a7+'.\x20Expected\x20format:\x20KEY=VALUE');const _0xe6f3df=_0x4447a7[_0x279ffd(0x2cd)](0x0,_0x4bd86c),_0xc4050d=_0x4447a7[_0x279ffd(0x2cd)](_0x4bd86c+0x1);if(!_0xe6f3df)throw new Error(_0x279ffd(0x213));return{'key':_0xe6f3df,'value':_0xc4050d};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x277);[a42_0x2b3b86(0x341)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a42_0x2b3b86(0x273)](_0x527312){const _0x15e363=a42_0x2b3b86,{options:_0x3fdd2c,args:_0xce69e2,tdx:_0x42fdea}=_0x527312,_0xa183fc=this[_0x15e363(0x339)](_0xce69e2,_0x3fdd2c);if(!_0xa183fc)return 0x1;_0x3fdd2c[_0x15e363(0x25f)]&&console[_0x15e363(0x25d)]('Project:\x20'+_0xa183fc);const _0x154afd=await withSpinner(_0x15e363(0x236),()=>_0x42fdea['workflow']['listSecrets'](_0xa183fc),{'verbose':_0x3fdd2c[_0x15e363(0x25f)]}),{secrets:_0x1322c9}=_0x154afd[_0x15e363(0x1e3)];return console[_0x15e363(0x25d)](_0x15e363(0x327)+_0x1322c9[_0x15e363(0x1bb)]+_0x15e363(0x28f)+(_0x1322c9[_0x15e363(0x1bb)]!==0x1?'s':'')),await handleSDKOutput(_0x1322c9,_0x3fdd2c),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0x2b3b86(0x1c6)]='workflow:secrets:set';['description']=a42_0x2b3b86(0x31a);async[a42_0x2b3b86(0x273)](_0x2d4b73){const _0x14c52f=a42_0x2b3b86,{options:_0x220a6f,args:_0x267ffc,tdx:_0x17eb2d}=_0x2d4b73;let _0x2d5eaa,_0x1d3d78;if(_0x267ffc[_0x14c52f(0x1bb)]>=0x2)_0x2d5eaa=_0x267ffc[0x0],_0x1d3d78=_0x267ffc[0x1];else{if(_0x267ffc[_0x14c52f(0x1bb)]===0x1&&_0x220a6f['workflowProject'])_0x2d5eaa=_0x220a6f[_0x14c52f(0x35a)],_0x1d3d78=_0x267ffc[0x0];else return _0x267ffc['length']===0x1?(console[_0x14c52f(0x25d)](_0x14c52f(0x1b3)),console[_0x14c52f(0x25d)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x14c52f(0x25d)](_0x14c52f(0x255)),console[_0x14c52f(0x25d)](_0x14c52f(0x222)),0x1);}let _0xfc9136,_0x5d8145;try{({key:_0xfc9136,value:_0x5d8145}=parseKeyValue(_0x1d3d78));}catch(_0x3847f7){return _0x3847f7 instanceof Error&&console[_0x14c52f(0x25d)](a42_0x43d93e['red'](_0x14c52f(0x276)),_0x3847f7[_0x14c52f(0x1b5)]),0x1;}_0x220a6f['verbose']&&(console[_0x14c52f(0x25d)](_0x14c52f(0x286)+_0x2d5eaa),console[_0x14c52f(0x25d)](_0x14c52f(0x2a3)+_0xfc9136));const _0x30d5ed=await withSpinner(_0x14c52f(0x359),()=>_0x17eb2d[_0x14c52f(0x355)][_0x14c52f(0x2ae)](_0x2d5eaa,_0xfc9136,_0x5d8145),{'verbose':_0x220a6f[_0x14c52f(0x25f)]}),_0x1ca825=_0x30d5ed[_0x14c52f(0x1e3)];return console[_0x14c52f(0x25d)](_0x14c52f(0x23d)+_0x1ca825[_0x14c52f(0x24c)]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x1ca825[_0x14c52f(0x1d5)]+'\x27'),(_0x220a6f[_0x14c52f(0x2f8)]||_0x220a6f[_0x14c52f(0x2a0)])&&await handleSingleObjectOutput(_0x1ca825,_0x220a6f),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a42_0x2b3b86(0x2b5);[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x262);async[a42_0x2b3b86(0x273)](_0x2411c7){const _0x14ac7c=a42_0x2b3b86,{options:_0x42283b,args:_0x101984,tdx:_0x19a2a5}=_0x2411c7;let _0xbf5a69,_0x3b55c8;if(_0x101984[_0x14ac7c(0x1bb)]>=0x2)_0xbf5a69=_0x101984[0x0],_0x3b55c8=_0x101984[0x1];else{if(_0x101984[_0x14ac7c(0x1bb)]===0x1&&_0x42283b[_0x14ac7c(0x35a)])_0xbf5a69=_0x42283b['workflowProject'],_0x3b55c8=_0x101984[0x0];else return _0x101984[_0x14ac7c(0x1bb)]===0x1?(console[_0x14ac7c(0x25d)](_0x14ac7c(0x1b3)),console['error']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x14ac7c(0x25d)](_0x14ac7c(0x1f7)),console[_0x14ac7c(0x25d)](_0x14ac7c(0x2ee)),0x1);}_0x42283b['verbose']&&(console[_0x14ac7c(0x25d)](_0x14ac7c(0x286)+_0xbf5a69),console['error'](_0x14ac7c(0x2a3)+_0x3b55c8));if(!_0x42283b[_0x14ac7c(0x263)]){if(!isInteractive())return console[_0x14ac7c(0x25d)](a42_0x43d93e['red'](_0x14ac7c(0x29a)),_0x14ac7c(0x358)),console[_0x14ac7c(0x25d)](a42_0x43d93e['dim'](_0x14ac7c(0x293))),0x1;const _0x51e990=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x3b55c8+_0x14ac7c(0x24e)+_0xbf5a69+'\x27?');if(!_0x51e990)return console['error'](a42_0x43d93e[_0x14ac7c(0x2a1)](_0x14ac7c(0x319))),0x1;}const _0x728be9=await withSpinner(_0x14ac7c(0x264),()=>_0x19a2a5['workflow'][_0x14ac7c(0x209)](_0xbf5a69,_0x3b55c8),{'verbose':_0x42283b['verbose']}),_0x4d71cc=_0x728be9[_0x14ac7c(0x1e3)];return console['error'](_0x14ac7c(0x23d)+_0x4d71cc['key']+_0x14ac7c(0x272)+_0x4d71cc['projectName']+'\x27'),(_0x42283b[_0x14ac7c(0x2f8)]||_0x42283b[_0x14ac7c(0x2a0)])&&await handleSingleObjectOutput(_0x4d71cc,_0x42283b),0x0;}}const TIMELINE_CONFIG={'TASK_NAME_WIDTH':0x28,'ICON_WIDTH':0x2,'ICON_SPACING':0x1,'GUTTER':0x5,'MIN_TIMELINE_WIDTH':0x28,'MAX_TIMELINE_WIDTH':0x50,'LABEL_MIN_SPACING':0x2,'POLL_INTERVAL_MS':0x7d0,'MAX_POLL_TIME_MS':0x36ee80,'MAX_POLL_ITERATIONS':0x708,'MAX_TASKS_DISPLAY':0x64,'MIN_LABEL_COUNT':0x3,'MAX_LABEL_COUNT':0x6,'LABEL_WIDTH_DIVISOR':0xf};function formatElapsed(_0x38d366){const _0x3f19ce=a42_0x2b3b86,_0x47e1f5=Math[_0x3f19ce(0x280)](_0x38d366/0x3e8),_0x1845fd=Math[_0x3f19ce(0x280)](_0x47e1f5/0x3c),_0x5b3772=Math[_0x3f19ce(0x280)](_0x1845fd/0x3c),_0x59e010=Math[_0x3f19ce(0x280)](_0x5b3772/0x18);if(_0x59e010>0x0){const _0x68c5cd=_0x5b3772%0x18;return _0x68c5cd>0x0?_0x59e010+'d\x20'+_0x68c5cd+'h':_0x59e010+'d';}else{if(_0x5b3772>0x0){const _0x3f60c7=_0x1845fd%0x3c;return _0x3f60c7>0x0?_0x5b3772+'h\x20'+_0x3f60c7+'m':_0x5b3772+'h';}else{if(_0x1845fd>0x0){const _0xf38bd8=_0x47e1f5%0x3c;return _0xf38bd8>0x0?_0x1845fd+'m\x20'+_0xf38bd8+'s':_0x1845fd+'m';}else return _0x47e1f5+'s';}}}function formatTimestamp(_0x2b2d62,_0x11bda1){const _0x3874be=a42_0x2b3b86,_0x708372=new Date(_0x2b2d62),_0x354edd=String(_0x708372[_0x3874be(0x1ea)]())[_0x3874be(0x1d6)](0x2,'0'),_0x54e081=String(_0x708372['getMinutes']())[_0x3874be(0x1d6)](0x2,'0'),_0x3bf239=_0x354edd+':'+_0x54e081,_0x35b722=_0x708372[_0x3874be(0x21b)]()===_0x11bda1[_0x3874be(0x21b)]()&&_0x708372[_0x3874be(0x33f)]()===_0x11bda1[_0x3874be(0x33f)]()&&_0x708372[_0x3874be(0x208)]()===_0x11bda1['getDate']();if(_0x35b722)return _0x3bf239;else{const _0x25feb2=String(_0x708372['getMonth']()+0x1)[_0x3874be(0x1d6)](0x2,'0'),_0x25c424=String(_0x708372[_0x3874be(0x208)]())[_0x3874be(0x1d6)](0x2,'0');return _0x25feb2+'-'+_0x25c424+'\x20'+_0x3bf239;}}function formatDate(_0x120fde){const _0xbc8569=a42_0x2b3b86,_0x4ac74c=_0x120fde[_0xbc8569(0x21b)](),_0x27cf01=String(_0x120fde[_0xbc8569(0x33f)]()+0x1)['padStart'](0x2,'0'),_0x4f12db=String(_0x120fde[_0xbc8569(0x208)]())[_0xbc8569(0x1d6)](0x2,'0');return _0x4ac74c+'-'+_0x27cf01+'-'+_0x4f12db;}function getTaskStateIcon(_0x3ef611){const _0x13f4d0={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x13f4d0[_0x3ef611]||'⚪';}function getBarChar(_0x3a5593){const _0x4a9bbf=a42_0x2b3b86;return _0x3a5593==='error'||_0x3a5593===_0x4a9bbf(0x326)?'×':'─';}function getBarColor(_0x25e1a5){const _0x16538b=a42_0x2b3b86,_0x550e41={'success':a42_0x43d93e[_0x16538b(0x1f5)],'error':a42_0x43d93e[_0x16538b(0x216)],'group_error':a42_0x43d93e[_0x16538b(0x216)],'running':a42_0x43d93e[_0x16538b(0x1e6)],'blocked':a42_0x43d93e[_0x16538b(0x2a1)],'planned':a42_0x43d93e[_0x16538b(0x357)],'canceling':a42_0x43d93e['yellow']};return _0x550e41[_0x25e1a5]||a42_0x43d93e[_0x16538b(0x2f2)];}function parseTaskName(_0x15ceff){const _0x5f191a=a42_0x2b3b86;let _0xc081d0=_0x15ceff[_0x5f191a(0x282)](/^\++/,'');const _0x2a41ac=_0xc081d0['split']('+'),_0x1c7dd0=_0x2a41ac['length']>0x1?_0x2a41ac[_0x5f191a(0x1bb)]-0x2:0x0,_0x51217b=_0x2a41ac[_0x2a41ac[_0x5f191a(0x1bb)]-0x1]||_0xc081d0;return{'level':_0x1c7dd0,'name':'+'+_0x51217b};}function truncateTaskName(_0x5ea13b,_0x289a59){const _0x7c2751=a42_0x2b3b86,_0x71c97f=stringWidth(_0x5ea13b);if(_0x71c97f<=_0x289a59)return _0x5ea13b;let _0xac4bf4=_0x5ea13b;while(stringWidth(_0xac4bf4+'…')>_0x289a59&&_0xac4bf4[_0x7c2751(0x1bb)]>0x0){_0xac4bf4=_0xac4bf4['slice'](0x0,-0x1);}return _0xac4bf4+'…';}function calculateTimeScale(_0x14613f,_0x4f6fa8){const _0x1a9162=a42_0x2b3b86;return{'startTime':_0x14613f[_0x1a9162(0x32d)],'endTime':_0x14613f[_0x1a9162(0x22b)],'durationMs':_0x14613f[_0x1a9162(0x28b)],'msPerChar':_0x14613f['duration']/_0x4f6fa8};}function timeToPosition(_0xa489e6,_0xc65a7f,_0x505953){const _0x3bc571=a42_0x2b3b86,_0x17f447=_0xa489e6-_0xc65a7f[_0x3bc571(0x1dd)],_0x1778ee=Math['floor'](_0x17f447/_0xc65a7f['msPerChar']);return Math[_0x3bc571(0x1c4)](0x0,Math[_0x3bc571(0x2b1)](_0x1778ee,_0x505953));}function renderTimeAxis(_0x5bde90,_0x33eead){const _0x2860af=a42_0x2b3b86,_0x2616e1=Math[_0x2860af(0x2b1)](TIMELINE_CONFIG[_0x2860af(0x234)],Math[_0x2860af(0x1c4)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math['floor'](_0x33eead/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x16315f=_0x5bde90['durationMs']/(_0x2616e1-0x1),_0x2668ff=new Date(_0x5bde90[_0x2860af(0x1dd)]),_0x984011=[];for(let _0x398b5b=0x0;_0x398b5b<_0x2616e1;_0x398b5b++){const _0x2be52e=_0x5bde90[_0x2860af(0x1dd)]+_0x398b5b*_0x16315f,_0x2423dc=timeToPosition(_0x2be52e,_0x5bde90,_0x33eead),_0x48dde3=formatTimestamp(_0x2be52e,_0x2668ff);_0x984011['push']({'pos':_0x2423dc,'text':_0x48dde3});}const _0x3ecf7f=new Array(_0x33eead)[_0x2860af(0x31e)]('\x20');let _0x2e7ccf=-0x1;for(const {pos:_0x31d72c,text:_0x3e0b1d}of _0x984011){let _0x5589ed=Math[_0x2860af(0x1c4)](0x0,_0x31d72c-Math[_0x2860af(0x280)](_0x3e0b1d['length']/0x2));_0x5589ed<=_0x2e7ccf+TIMELINE_CONFIG[_0x2860af(0x345)]&&(_0x5589ed=_0x2e7ccf+TIMELINE_CONFIG[_0x2860af(0x345)]+0x1);_0x5589ed+_0x3e0b1d[_0x2860af(0x1bb)]>_0x33eead&&(_0x5589ed=_0x33eead-_0x3e0b1d[_0x2860af(0x1bb)]);if(_0x5589ed>=0x0&&_0x5589ed+_0x3e0b1d[_0x2860af(0x1bb)]<=_0x33eead&&_0x5589ed>_0x2e7ccf){for(let _0x32ff63=0x0;_0x32ff63<_0x3e0b1d[_0x2860af(0x1bb)];_0x32ff63++){_0x3ecf7f[_0x5589ed+_0x32ff63]=_0x3e0b1d[_0x32ff63];}_0x2e7ccf=_0x5589ed+_0x3e0b1d[_0x2860af(0x1bb)]-0x1;}}return _0x3ecf7f['join']('');}function renderTaskRow(_0x31320d,_0x5d5130,_0x2002b7,_0x4209ab){const _0x448694=a42_0x2b3b86,{level:_0x5f36c2,name:_0x36b53f}=parseTaskName(_0x31320d['name']),_0x42a2d3='\x20'['repeat'](_0x5f36c2),_0x2d746e=_0x31320d['window']?'('+formatElapsed(_0x31320d[_0x448694(0x2aa)][_0x448694(0x28b)])+')':'',_0x13c8d1=stringWidth(_0x2d746e),_0xe18da8=_0x5f36c2*0x1,_0x373b21=_0x4209ab-_0xe18da8-_0x13c8d1-0x1,_0x5d322a=truncateTaskName(_0x36b53f,_0x373b21),_0x1a0c9f=_0x42a2d3+_0x5d322a,_0x3dd319=stringWidth(_0x1a0c9f),_0x5ebb09=_0x4209ab-_0x3dd319-_0x13c8d1,_0x2c69cc=_0x1a0c9f+'\x20'[_0x448694(0x30a)](Math[_0x448694(0x1c4)](0x1,_0x5ebb09))+a42_0x43d93e['dim'](_0x2d746e),_0x154395=getTaskStateIcon(_0x31320d[_0x448694(0x2f4)]),_0x4cea9d=new Array(_0x2002b7)[_0x448694(0x31e)]('\x20');if(_0x31320d[_0x448694(0x2aa)]){const _0x5441fe=timeToPosition(_0x31320d[_0x448694(0x2aa)][_0x448694(0x32d)],_0x5d5130,_0x2002b7),_0x2a8feb=timeToPosition(_0x31320d[_0x448694(0x2aa)]['end'],_0x5d5130,_0x2002b7),_0x145fe7=getBarChar(_0x31320d[_0x448694(0x2f4)]),_0x42f778=Math['max'](_0x5441fe+0x1,_0x2a8feb);for(let _0x5c585f=_0x5441fe;_0x5c585f<Math['min'](_0x42f778,_0x2002b7);_0x5c585f++){_0x4cea9d[_0x5c585f]=_0x145fe7;}}const _0x1dc100=getBarColor(_0x31320d[_0x448694(0x2f4)]),_0x20a3d8=_0x4cea9d[_0x448694(0x23e)](_0x2cb68f=>_0x2cb68f==='\x20'?'\x20':_0x1dc100(_0x2cb68f))[_0x448694(0x207)]('');return _0x154395+'\x20'+_0x2c69cc+'│'+_0x20a3d8+'│';}function calculateStats(_0x209b09){const _0x3f5611=a42_0x2b3b86,_0x2938c3={'total':_0x209b09[_0x3f5611(0x1bb)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x578149 of _0x209b09){if(_0x578149[_0x3f5611(0x2f4)]==='success')_0x2938c3[_0x3f5611(0x1ec)]++;else{if(_0x578149[_0x3f5611(0x2f4)]==='error'||_0x578149['state']===_0x3f5611(0x326))_0x2938c3[_0x3f5611(0x25d)]++;else _0x578149['state']===_0x3f5611(0x220)?_0x2938c3[_0x3f5611(0x220)]++:_0x2938c3[_0x3f5611(0x26d)]++;}}return _0x2938c3;}function formatStats(_0x4fae4c){const _0x1cee0f=a42_0x2b3b86;return[_0x1cee0f(0x1e0)+_0x4fae4c[_0x1cee0f(0x1bc)],'✅\x20'+_0x4fae4c[_0x1cee0f(0x1ec)],'❌\x20'+_0x4fae4c['error'],_0x1cee0f(0x31b)+_0x4fae4c['running'],'⏳\x20'+_0x4fae4c[_0x1cee0f(0x26d)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a42_0x2b3b86(0x1c6)]=a42_0x2b3b86(0x1fa);[a42_0x2b3b86(0x341)]=a42_0x2b3b86(0x305);async[a42_0x2b3b86(0x273)](_0x4bca95){const _0x10038c=a42_0x2b3b86,{options:_0xf15a7e,args:_0x2d8c42,tdx:_0x49a818}=_0x4bca95;let _0x117963,_0x44b19b,_0x341ec2=![];if(_0x2d8c42[0x0]){if(_0x2d8c42[0x0][_0x10038c(0x27a)]('.')){const _0x2680f0=this[_0x10038c(0x1c2)](_0x2d8c42,_0xf15a7e);if(!_0x2680f0)return 0x1;_0x117963=_0x2680f0[_0x10038c(0x1d5)],_0x44b19b=_0x2680f0[_0x10038c(0x34d)];}else{_0x44b19b=_0x2d8c42[0x0],_0x117963=_0xf15a7e['workflowProject'];if(!_0x117963)return console[_0x10038c(0x25d)](a42_0x43d93e[_0x10038c(0x216)](_0x10038c(0x276)),_0x10038c(0x35e)),0x1;_0x341ec2=!![];}}else{const _0x1658d0=this[_0x10038c(0x1c2)](_0x2d8c42,_0xf15a7e);if(!_0x1658d0)return 0x1;_0x117963=_0x1658d0[_0x10038c(0x1d5)],_0x44b19b=_0x1658d0[_0x10038c(0x34d)];}if(_0xf15a7e[_0x10038c(0x25f)]){if(_0x117963&&_0x44b19b)console['error']('Filter:\x20'+_0x117963+'.'+_0x44b19b);else _0x117963&&console[_0x10038c(0x25d)]('Filter:\x20project='+_0x117963);}const _0x5bfda7=_0xf15a7e[_0x10038c(0x1e7)],_0x3ea7a5=_0xf15a7e[_0x10038c(0x309)];if(_0x5bfda7){_0x3ea7a5&&console[_0x10038c(0x25d)](a42_0x43d93e['yellow'](_0x10038c(0x2fa)),_0x10038c(0x2b3));const _0xfb1d54=_0xf15a7e[_0x10038c(0x215)];return _0xfb1d54?await this[_0x10038c(0x302)](_0x4bca95,_0x5bfda7):await this[_0x10038c(0x241)](_0x4bca95,_0x5bfda7,_0xf15a7e),0x0;}if(_0x3ea7a5){const _0x7f4ff1=await withSpinner(_0x10038c(0x235),()=>_0x49a818['workflow']['sessions']({'projectName':_0x117963,'workflowName':_0x44b19b,'limit':0x64}),{'verbose':_0xf15a7e['verbose']}),_0x5ee4c6=_0x7f4ff1['data'][_0x10038c(0x1ae)](_0x232eac=>_0x232eac['id']===_0x3ea7a5);if(!_0x5ee4c6)return console['error'](a42_0x43d93e[_0x10038c(0x216)](_0x10038c(0x276)),_0x10038c(0x30b)+_0x3ea7a5),0x1;if(!_0x5ee4c6['lastAttempt']?.['id'])return console[_0x10038c(0x25d)](a42_0x43d93e[_0x10038c(0x216)]('Error:'),_0x10038c(0x22a)+_0x3ea7a5+_0x10038c(0x1c1)),0x1;const _0x4707b4=_0x5ee4c6['lastAttempt']['id'];_0xf15a7e['verbose']&&console[_0x10038c(0x25d)]('Using\x20attempt\x20'+_0x4707b4+_0x10038c(0x2e3)+_0x3ea7a5);const _0x5be8c1=_0xf15a7e[_0x10038c(0x215)];return _0x5be8c1?await this[_0x10038c(0x302)](_0x4bca95,_0x4707b4):await this['renderSingleTimeline'](_0x4bca95,_0x4707b4,_0xf15a7e),0x0;}const _0x2524d8=await withSpinner(_0x10038c(0x26a),()=>_0x49a818[_0x10038c(0x355)][_0x10038c(0x249)]({'projectName':_0x117963,'workflowName':_0x44b19b,'limit':_0xf15a7e[_0x10038c(0x22c)]||0x32}),{'verbose':_0xf15a7e[_0x10038c(0x25f)]}),_0x3fecaf=_0x2524d8[_0x10038c(0x1e3)];if(_0x3fecaf['length']===0x0){if(_0x117963&&_0x44b19b)console[_0x10038c(0x25d)](_0x10038c(0x2c1)+_0x117963+'.'+_0x44b19b);else _0x117963?console[_0x10038c(0x25d)](_0x10038c(0x229)+_0x117963):(console[_0x10038c(0x25d)](_0x10038c(0x2d9)),console['error'](a42_0x43d93e[_0x10038c(0x357)](_0x10038c(0x214))));return 0x0;}_0x3fecaf['sort']((_0x44b487,_0x95611e)=>{const _0x601021=_0x10038c,_0x32dcec=_0x44b487['sessionTime']||'',_0x5fea57=_0x95611e[_0x601021(0x26b)]||'';return _0x5fea57[_0x601021(0x2ab)](_0x32dcec);});if(_0xf15a7e[_0x10038c(0x2f8)]||_0xf15a7e[_0x10038c(0x2a0)])return await handleSDKOutput(_0x3fecaf,_0xf15a7e),0x0;let _0x283190;if(_0x341ec2){const _0x222eee=_0x3fecaf[0x0];if(!_0x222eee['lastAttempt']?.['id'])return console[_0x10038c(0x25d)]('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x283190=_0x222eee[_0x10038c(0x1e8)]['id'],_0xf15a7e[_0x10038c(0x25f)]&&console[_0x10038c(0x25d)](_0x10038c(0x254)+_0x222eee[_0x10038c(0x26b)]);}else{const _0x37d95f=_0x3fecaf[_0x10038c(0x23e)](_0x2eb601=>{const _0x247c00=_0x10038c,_0x692182=getAttemptStatusDisplay(_0x2eb601[_0x247c00(0x1e8)]);return{'title':_0x2eb601[_0x247c00(0x329)]?.[_0x247c00(0x1c6)]+'.'+_0x2eb601[_0x247c00(0x355)]?.[_0x247c00(0x1c6)]+_0x247c00(0x26e)+_0x2eb601[_0x247c00(0x26b)]+'\x20'+_0x692182['icon'],'value':_0x2eb601[_0x247c00(0x1e8)]?.['id']||'','description':_0x692182[_0x247c00(0x34b)]};}),_0x127629=await a42_0x456b5e({'type':_0x10038c(0x1cb),'name':'attemptId','message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x37d95f[_0x10038c(0x2a8)](_0x342ce3=>_0x342ce3[_0x10038c(0x271)]!=='')});if(!_0x127629[_0x10038c(0x1e7)])return 0x0;_0x283190=_0x127629[_0x10038c(0x1e7)];}const _0x49e2db=_0xf15a7e['follow'];return _0x49e2db?await this['pollTimeline'](_0x4bca95,_0x283190):await this[_0x10038c(0x241)](_0x4bca95,_0x283190,_0xf15a7e),0x0;}async[a42_0x2b3b86(0x241)](_0x109c82,_0x1aa5fd,_0x469970){const _0x25c5ee=a42_0x2b3b86,{tdx:_0x4d52b8}=_0x109c82;let _0x224988,_0x599f73;try{[_0x224988,_0x599f73]=await Promise[_0x25c5ee(0x261)]([_0x4d52b8[_0x25c5ee(0x355)]['attempt'](_0x1aa5fd),_0x4d52b8[_0x25c5ee(0x355)]['tasks'](_0x1aa5fd,![])]);}catch(_0x29561c){console['error'](a42_0x43d93e['red'](_0x25c5ee(0x211)));_0x469970[_0x25c5ee(0x25f)]&&console[_0x25c5ee(0x25d)](_0x29561c);throw _0x29561c;}if(_0x469970[_0x25c5ee(0x2f8)]||_0x469970[_0x25c5ee(0x2a0)]){const _0x1a1a2e=this[_0x25c5ee(0x354)](_0x224988,_0x599f73);await handleSDKOutput([_0x1a1a2e],_0x469970);return;}const _0xcdc2dd=_0x4d52b8['context'][_0x25c5ee(0x348)],_0x1b07ab=this[_0x25c5ee(0x233)](_0x224988,_0x599f73,_0xcdc2dd);console[_0x25c5ee(0x32a)](_0x1b07ab);}async[a42_0x2b3b86(0x302)](_0x48573d,_0x23e07a){const _0x595c52=a42_0x2b3b86,{tdx:_0xb09505}=_0x48573d,_0x4edffd=TIMELINE_CONFIG[_0x595c52(0x1e5)],_0x4f5a29=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x11c92c=0x0;while(_0x11c92c<_0x4f5a29){process[_0x595c52(0x352)]['isTTY']&&process[_0x595c52(0x352)][_0x595c52(0x1eb)]('\x1bc');let _0xf1c39e,_0x14a074;try{[_0xf1c39e,_0x14a074]=await Promise[_0x595c52(0x261)]([_0xb09505['workflow'][_0x595c52(0x25e)](_0x23e07a),_0xb09505[_0x595c52(0x355)][_0x595c52(0x1ff)](_0x23e07a,![])]);}catch(_0x37b1d8){console[_0x595c52(0x25d)](a42_0x43d93e[_0x595c52(0x216)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x11c92c>0x0&&console['error'](a42_0x43d93e['dim'](_0x595c52(0x34a)+_0x11c92c));throw _0x37b1d8;}const _0x50050b=_0xb09505[_0x595c52(0x20e)][_0x595c52(0x348)],_0x2d71c5=this[_0x595c52(0x233)](_0xf1c39e,_0x14a074,_0x50050b);console[_0x595c52(0x32a)](_0x2d71c5);const _0x491394=_0xf1c39e['done']&&_0x14a074[_0x595c52(0x333)](_0x45f804=>_0x45f804['state']!==_0x595c52(0x220)&&_0x45f804[_0x595c52(0x2f4)]!==_0x595c52(0x30f));if(_0x491394){console[_0x595c52(0x25d)](a42_0x43d93e[_0x595c52(0x1f5)](_0x595c52(0x297)));break;}console[_0x595c52(0x25d)](a42_0x43d93e[_0x595c52(0x357)]('\x0aPolling...\x20('+_0x11c92c*0x2+_0x595c52(0x349))),await new Promise(_0x5350c7=>setTimeout(_0x5350c7,_0x4edffd)),_0x11c92c++;}_0x11c92c>=_0x4f5a29&&console[_0x595c52(0x25d)](a42_0x43d93e[_0x595c52(0x2a1)](_0x595c52(0x212)));}[a42_0x2b3b86(0x233)](_0x24b726,_0x413711,_0x20faf6){const _0x191e11=a42_0x2b3b86,_0x360320=[],_0x4587b1=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x90b7b4=0x5,_0x32b0c1=process['stdout'][_0x191e11(0x294)]||0x78,_0x23a13f=_0x32b0c1-_0x4587b1-_0x90b7b4,_0x3b25d1=Math[_0x191e11(0x1c4)](TIMELINE_CONFIG[_0x191e11(0x225)],Math['min'](_0x23a13f,TIMELINE_CONFIG[_0x191e11(0x300)])),_0x453dde=new Date(_0x24b726[_0x191e11(0x1d8)])[_0x191e11(0x200)](),_0x3eb35f=_0x24b726['finishedAt']?new Date(_0x24b726[_0x191e11(0x228)])[_0x191e11(0x200)]():Date[_0x191e11(0x28d)](),_0x15eab2={'start':_0x453dde,'end':_0x3eb35f,'duration':_0x3eb35f-_0x453dde},_0x503bf5=new Map(),_0xc9c198=[];for(const _0x1003ff of _0x413711){if(_0x1003ff[_0x191e11(0x2f3)]){const _0x4a19d9=new Date(_0x1003ff[_0x191e11(0x2f3)])[_0x191e11(0x200)](),_0x44e38d=_0x1003ff[_0x191e11(0x1d2)]?new Date(_0x1003ff[_0x191e11(0x1d2)])[_0x191e11(0x200)]():Date['now'](),_0x2047d9={'start':_0x4a19d9,'end':_0x44e38d,'duration':_0x44e38d-_0x4a19d9};_0x503bf5[_0x191e11(0x27b)](_0x1003ff['id'],_0x2047d9),_0xc9c198[_0x191e11(0x2a4)]({'name':_0x1003ff['fullName'],'state':_0x1003ff['state']||'unknown','window':_0x2047d9});}else _0xc9c198['push']({'name':_0x1003ff[_0x191e11(0x2a2)],'state':_0x1003ff[_0x191e11(0x2f4)]||'planned','window':undefined});}_0xc9c198['sort']((_0x240a57,_0x459242)=>{const _0x567ad8=_0x191e11;if(!_0x240a57[_0x567ad8(0x2aa)])return 0x1;if(!_0x459242['window'])return-0x1;return _0x240a57[_0x567ad8(0x2aa)][_0x567ad8(0x32d)]-_0x459242[_0x567ad8(0x2aa)][_0x567ad8(0x32d)];});const _0x25056c=_0xc9c198[_0x191e11(0x1bb)],_0x4a4a2c=_0x25056c>TIMELINE_CONFIG[_0x191e11(0x2b0)];_0x4a4a2c&&_0xc9c198[_0x191e11(0x23a)](TIMELINE_CONFIG[_0x191e11(0x2b0)]);const _0xc0bf96=calculateTimeScale(_0x15eab2,_0x3b25d1),_0x3bc516=_0x24b726[_0x191e11(0x205)]?_0x24b726[_0x191e11(0x1ec)]?a42_0x43d93e[_0x191e11(0x1f5)](_0x191e11(0x1ec)):a42_0x43d93e[_0x191e11(0x216)]('error'):a42_0x43d93e[_0x191e11(0x1e6)](_0x191e11(0x220)),_0x21bdc2=_0x24b726['project']?.['id'],_0x222b20=_0x24b726[_0x191e11(0x309)];let _0x54de20;if(_0x21bdc2&&_0x222b20){const _0x533bb4=getWorkflowAttemptUrl(_0x20faf6,_0x21bdc2,_0x222b20,_0x24b726['id']);_0x54de20=hyperlink(a42_0x43d93e[_0x191e11(0x357)](_0x24b726['id']),_0x533bb4);}else _0x54de20=a42_0x43d93e[_0x191e11(0x357)](_0x24b726['id']);_0x360320['push'](_0x191e11(0x278)+_0x54de20+_0x191e11(0x26e)+_0x3bc516+'\x20-\x20'+formatElapsed(_0x15eab2[_0x191e11(0x28b)]));if(_0xc9c198[_0x191e11(0x1bb)]>0x0){const _0x1466d8=renderTimeAxis(_0xc0bf96,_0x3b25d1),_0x26185e=new Date(_0x15eab2[_0x191e11(0x32d)]),_0x30f960=formatDate(_0x26185e),_0x425f6f=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x191e11(0x2ce)]+_0x4587b1,_0x13e568=_0x30f960[_0x191e11(0x1d6)](_0x425f6f),_0x385ec6=a42_0x43d93e[_0x191e11(0x357)](_0x13e568);_0x360320['push'](_0x385ec6+'\x20'+_0x1466d8);for(const _0x68213 of _0xc9c198){_0x360320['push'](renderTaskRow(_0x68213,_0xc0bf96,_0x3b25d1,_0x4587b1));}const _0x40c6ba=calculateStats(_0xc9c198);_0x360320[_0x191e11(0x2a4)](formatStats(_0x40c6ba)),_0x4a4a2c&&_0x360320[_0x191e11(0x2a4)](a42_0x43d93e['yellow'](_0x191e11(0x331)+TIMELINE_CONFIG[_0x191e11(0x2b0)]+_0x191e11(0x20d)+_0x25056c+_0x191e11(0x2df))),_0x360320['push'](''),_0x360320[_0x191e11(0x2a4)](a42_0x43d93e[_0x191e11(0x357)](_0x191e11(0x28c))+(_0x191e11(0x2ff)+_0x24b726['id']+_0x191e11(0x2fb))+a42_0x43d93e[_0x191e11(0x357)](_0x191e11(0x340)));}else _0x360320[_0x191e11(0x2a4)](_0x191e11(0x257));return _0x360320[_0x191e11(0x207)]('\x0a');}[a42_0x2b3b86(0x354)](_0x54aabd,_0x1af4ff){const _0x28d7c7=a42_0x2b3b86,_0x3ebb56=new Date(_0x54aabd[_0x28d7c7(0x1d8)])['getTime'](),_0x4e5be6=_0x54aabd[_0x28d7c7(0x228)]?new Date(_0x54aabd['finishedAt'])[_0x28d7c7(0x200)]():Date['now'](),_0x52a336=_0x4e5be6-_0x3ebb56,_0x3f235f=[];for(const _0x897bdf of _0x1af4ff){if(_0x897bdf[_0x28d7c7(0x2f3)]){const _0xfb6d23=new Date(_0x897bdf[_0x28d7c7(0x2f3)])[_0x28d7c7(0x200)](),_0x3b9b7f=_0x897bdf[_0x28d7c7(0x1d2)]?new Date(_0x897bdf[_0x28d7c7(0x1d2)])[_0x28d7c7(0x200)]():Date[_0x28d7c7(0x28d)]();_0x3f235f['push']({'name':_0x897bdf[_0x28d7c7(0x2a2)],'state':_0x897bdf[_0x28d7c7(0x2f4)]||_0x28d7c7(0x206),'window':{'start':_0xfb6d23,'end':_0x3b9b7f,'duration':_0x3b9b7f-_0xfb6d23}});}else _0x3f235f[_0x28d7c7(0x2a4)]({'name':_0x897bdf[_0x28d7c7(0x2a2)],'state':_0x897bdf[_0x28d7c7(0x2f4)]||_0x28d7c7(0x30f),'window':undefined});}const _0x11043f=calculateStats(_0x3f235f);return{'attempt':{'id':_0x54aabd['id'],'status':_0x54aabd['done']?_0x54aabd[_0x28d7c7(0x1ec)]?'success':_0x28d7c7(0x25d):_0x28d7c7(0x220),'createdAt':_0x54aabd[_0x28d7c7(0x1d8)],'finishedAt':_0x54aabd[_0x28d7c7(0x228)],'duration_ms':_0x52a336},'tasks':_0x3f235f['map'](_0x2f1a98=>({'name':_0x2f1a98[_0x28d7c7(0x1c6)],'state':_0x2f1a98['state'],'startedAt':_0x2f1a98[_0x28d7c7(0x2aa)]?new Date(_0x2f1a98[_0x28d7c7(0x2aa)][_0x28d7c7(0x32d)])[_0x28d7c7(0x22e)]():null,'updatedAt':_0x2f1a98['window']?new Date(_0x2f1a98[_0x28d7c7(0x2aa)][_0x28d7c7(0x22b)])['toISOString']():null,'duration_ms':_0x2f1a98['window']?.['duration']||null})),'stats':_0x11043f};}}function a42_0x4d5f(){const _0x2c0a7d=['Set\x20default\x20workflow\x20project\x20for\x20this\x20session','createdAt','\x1b[1A\x1b[2K','newProjectName','workflow:run','\x20\x20Attempt\x20ID:\x20','startTime','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','No\x20attempts\x20found','Total:\x20','taskName','Status:\x20','data','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','POLL_INTERVAL_MS','blue','attemptId','lastAttempt','\x0aDry\x20run\x20-\x20nothing\x20pushed','getHours','write','success','Source\x20directory:\x20','skipValidation','resolveProjectDir','✔\x20Downloaded\x20','Select\x20a\x20task\x20to\x20view\x20logs:','isArray','Parameters:\x20','\x20workflow','green','\x20project','Error:\x20Secret\x20key\x20is\x20required','✔\x20Project:\x20','retryAttempt','workflow:timeline','deleted','cwd','trim','GUTTER','tasks','getTime','navigateSessionsInteractive','Killing\x20attempt...','toLowerCase','session_id','done','unknown','join','getDate','deleteSecret','session','resolveProject','Params:\x20','\x20of\x20','context','workflows','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Failed\x20to\x20fetch\x20attempt\x20data','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','Key\x20cannot\x20be\x20empty','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','follow','red','match','prepareCloneProject','Revision:\x20','Source\x20directory\x20is\x20required','getFullYear','Pull\x20workflow\x20project\x20to\x20local\x20folder','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','readFile','6045066jMyaAT','running','Source\x20project:\x20','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','Listing\x20workflow\x20attempts...','Getting\x20attempt\x20details...','MIN_TIMELINE_WIDTH','canceling','isNewProject','finishedAt','No\x20sessions\x20found\x20in\x20project:\x20','Session\x20','end','limit','✔\x20Showing\x20','toISOString','applyPullProject','No\x20workflows\x20found','Project\x20name\x20is\x20required','Including\x20subtasks:\x20yes','renderTimeline','MAX_LABEL_COUNT','Loading\x20session...','Listing\x20secrets...','No\x20workflow\x20projects\x20found','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','sourceDir','splice','showWorkflowConsoleUrl','\x20is\x20not\x20a\x20directory','✔\x20Secret\x20\x27','map','unchanged','Getting\x20attempt\x20tasks...','renderSingleTimeline','\x20\x20Location:\x20','workflow:push','Target:\x20','📁\x20','displayLine','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Deleting\x20project\x20','sessions','4935724RLwwxs','...','key','\x0aDry\x20run\x20-\x20no\x20project\x20created','\x27\x20from\x20project\x20\x27','Retrying\x20session...','status','(use\x20--limit\x20to\x20see\x20more)','includeSubtasks','workflow:attempt','Auto-selected\x20latest\x20session:\x20','Error:\x20KEY=VALUE\x20is\x20required','output','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','✔\x20Pull\x20complete','Filter:\x20project=','projects','Task\x20name:\x20','New\x20project\x20name:\x20','error','attempt','verbose','38lQyxJP','all','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','yes','Deleting\x20secret...','preparePushProject','✔\x20Clone\x20complete','List\x20workflow\x20execution\x20sessions','relative','task','Loading\x20sessions...','sessionTime','executeCloneProject','pending','\x20-\x20','Invalid\x20format:\x20','Start\x20a\x20workflow\x20run','value','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','execute','workflow:logs','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Error:','workflow:secrets:list','Attempt:\x20','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','includes','set','force','\x20modified','targetDir','/app/workflows/','floor','revision','replace','6pLeonh','rows','workflow:pull','Project:\x20','✔\x20Retry\x20started','(unknown)','dryRun','isTTY','duration','💡\x20Tip:\x20Use\x20','now','Target\x20directory:\x20','\x20secret','\x20session','Pattern:\x20','executePushProject','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','columns','\x22\x20already\x20exists\x20(ID:\x20','autocomplete','\x0a✔\x20Attempt\x20complete','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','new','\x0aError:','Loading\x20workflows...','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Error:\x20Invalid\x20JSON\x20in\x20--params','Listing\x20workflow\x20sessions...','Listing\x20workflows...','jsonl','yellow','fullName','Key:\x20','push','fromTask','sort','No\x20workflow\x20tdx.json\x20found','filter','Reason:\x20','window','localeCompare','trimEnd','\x20\x20Workflow:\x20','setSecret','Retry\x20a\x20session\x20or\x20attempt','MAX_TASKS_DISPLAY','min','workflow:kill','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','type','workflow:secrets:delete','keys','No\x20matching\x20sessions\x20found','workflow:use','No\x20workflows\x20found\x20in\x20project:\x20','→\x20New\x20project:\x20','Pushing\x20project...','cancelRequested','Show\x20specific\x20attempt\x20details','renderSessionsTimeline','path','startsWith','No\x20sessions\x20found\x20for:\x20','\x0aUpdate\x20existing\x20project\x20\x22','4583270KsRfmn','workflow:download','retryAttemptName','✔\x20Pushed\x20','stringify','List\x20workflow\x20attempts','resumeFrom','\x20attempt','workflow:workflows','✔\x20Workflow\x20project\x20context\x20cleared.','substring','ICON_SPACING','includeRetried','Analyzing\x20changes...','\x0a✔\x20Already\x20up\x20to\x20date','workflow:attempts','revision:\x20','Listing\x20workflow\x20projects...','\x20\x20Project:\x20','Project\x20name:\x20','\x0aClone\x20\x22','reason','No\x20workflow\x20sessions\x20found','attempt:','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','workflow:clone','\x20\x20Target:\x20','7911561spHtsw','\x20tasks','Usage:\x20workflow:delete\x20<project-name-or-id>','List\x20all\x20workflow\x20projects','→\x20Project:\x20','\x20from\x20session\x20','resolve','hasChanges','Cloning\x20to\x20','\x22\x20with\x20new\x20revision?','Filter:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','tdx.json','Force:\x20yes','Select\x20a\x20workflow\x20to\x20run','isDirectory','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','summary','params','From\x20task:\x20','white','startedAt','state','indexOf','30930010TPcOVC','List\x20workflows','json','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Warning:','\x20logs','\x20\x20New\x20attempt\x20ID:\x20','size','metadata','tdx\x20wf\x20attempt\x20','MAX_TIMELINE_WIDTH','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','pollTimeline','\x20\x20Changes:\x20','Error:\x20Attempt\x20ID\x20is\x20required','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt',',\x20Workflow:\x20','\x0aPush\x20these\x20changes?','\x20\x20Project\x20ID:\x20','sessionId','repeat','Session\x20not\x20found:\x20','format','Error:\x20','sourceProjectName','planned','delete','\x20\x20Session\x20context\x20set\x20to:\x20','parse','\x20\x20tdx\x20wf\x20use\x20<project>','Validation:\x20skipped','kill','\x20\x20Source:\x20','385888lmrYhV','table','Cancelled','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','🔄\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','\x0a✔\x20No\x20changes\x20to\x20push','fill','✔\x20Workflow\x20project\x20set\x20to:\x20','round','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','workflow:upload','fileCount','-\x20no\x20files\x20written','group_error','✔\x20Found\x20','basename','project','log','download','changes','start','\x0aApply\x20these\x20changes?','slice','workflow:retry','⚠\x20Showing\x20first\x20','\x20unchanged','every','resolveProjectId','\x0a⚠\x20Project\x20\x22','---\x20','cyan','list','requireProject','retrySession','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','sys','Pushing\x20workflow\x20project...','getMonth','\x20to\x20see\x20detailed\x20logs','description','Retrying\x20attempt...','\x20deleted','Attempt\x20ID:\x20','LABEL_MIN_SPACING','workflow:delete','97998lMEwiG','site','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','text','run','workflowName','fs/promises','ICON_WIDTH','-\x20nothing\x20pushed','modified','stdout','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','buildTimelineData','workflow','Files\x20to\x20upload:\x20','dim','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Setting\x20secret...','workflowProject','generateSessionTimelineRows','diff','Pulling\x20project\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','projectId','targetExists','find','Dry\x20run:\x20yes','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Output\x20directory:\x20','\x20new','Error:\x20Project\x20name\x20is\x20required','has','message','\x20\x20Console:\x20','\x20\x20Session\x20ID:\x20','workflow:tasks','param','index','length','total','split','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','get','Include\x20retried:\x20yes','\x20has\x20no\x20attempts','parseProjectWorkflowPattern','logs','max','Updating\x20','name','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','\x20\x20Revision:\x20','values','\x20(use\x20--limit\x20to\x20show\x20more)','select','\x20\x20Files\x20extracted:\x20','No\x20log\x20content\x20found','stat','Project\x20filter:\x20','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','session:','updatedAt','8McFupU','/attempt/','projectName','padStart'];a42_0x4d5f=function(){return _0x2c0a7d;};return a42_0x4d5f();}
1
+ const a42_0xc57567=a42_0x15e8;(function(_0x308154,_0x339c18){const _0x209f40=a42_0x15e8,_0x291026=_0x308154();while(!![]){try{const _0x41cc86=-parseInt(_0x209f40(0x291))/0x1+parseInt(_0x209f40(0x33e))/0x2*(parseInt(_0x209f40(0x28a))/0x3)+parseInt(_0x209f40(0x35a))/0x4+-parseInt(_0x209f40(0x2c0))/0x5+parseInt(_0x209f40(0x246))/0x6+-parseInt(_0x209f40(0x288))/0x7*(-parseInt(_0x209f40(0x2e3))/0x8)+-parseInt(_0x209f40(0x373))/0x9*(parseInt(_0x209f40(0x393))/0xa);if(_0x41cc86===_0x339c18)break;else _0x291026['push'](_0x291026['shift']());}catch(_0x374fce){_0x291026['push'](_0x291026['shift']());}}}(a42_0x4a1f,0x6f2d1));import a42_0x28d120 from'chalk';import{existsSync}from'fs';import a42_0x4c5f63 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x4fae from'prompts';function getAttemptStatusDisplay(_0x4588ce){const _0x4ed782=a42_0x15e8;if(!_0x4588ce)return{'icon':'⏳','text':''};const {done:_0x52bc50,success:_0x4e838e,cancelRequested:_0x2e643a}=_0x4588ce;if(!_0x52bc50)return _0x2e643a?{'icon':'🛑','text':a42_0x28d120[_0x4ed782(0x2a1)]('canceling')}:{'icon':'🔄','text':a42_0x28d120[_0x4ed782(0x1fd)](_0x4ed782(0x272))};if(_0x4e838e)return{'icon':'✅','text':a42_0x28d120[_0x4ed782(0x382)](_0x4ed782(0x32b))};return{'icon':'❌','text':a42_0x28d120['red'](_0x4ed782(0x343))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0xc57567(0x247)](_0x2789ef,_0x334e97,_0x4a7f31=0x0){const _0x2ce1d6=a42_0xc57567;return _0x2789ef[_0x4a7f31]||_0x334e97[_0x2ce1d6(0x220)];}[a42_0xc57567(0x2e6)](_0x273415,_0x52586c,_0x5a329d=0x0){const _0x50dbfb=a42_0xc57567,_0x443f0e=this[_0x50dbfb(0x247)](_0x273415,_0x52586c,_0x5a329d);if(!_0x443f0e)return console['error'](a42_0x28d120['red'](_0x50dbfb(0x2c8)),_0x50dbfb(0x383)),console[_0x50dbfb(0x343)](a42_0x28d120[_0x50dbfb(0x307)](_0x50dbfb(0x2e9))),null;return _0x443f0e;}[a42_0xc57567(0x323)](_0x36a559,_0x24411d){const _0x3722c8=a42_0xc57567;if(_0x36a559[0x0]){const _0x2154ad=_0x36a559[0x0][_0x3722c8(0x294)]('.');if(_0x2154ad[_0x3722c8(0x22b)]===0x1)return{'projectName':_0x2154ad[0x0],'workflowName':undefined};else return _0x2154ad[_0x3722c8(0x22b)]===0x2?{'projectName':_0x2154ad[0x0],'workflowName':_0x2154ad[0x1]}:(console['error'](a42_0x28d120[_0x3722c8(0x356)](_0x3722c8(0x2c8)),_0x3722c8(0x224)),null);}return{'projectName':_0x24411d[_0x3722c8(0x220)],'workflowName':undefined};}[a42_0xc57567(0x2de)](_0x309399,_0x138e0c,_0x48c265=0x0){const _0x5e9624=a42_0xc57567;if(_0x309399[_0x48c265])return _0x309399[_0x48c265];if(_0x138e0c[_0x5e9624(0x220)]){const _0x43bae4=a42_0x4c5f63['join'](process['cwd'](),_0x5e9624(0x34d),_0x138e0c[_0x5e9624(0x220)]);if(existsSync(a42_0x4c5f63['join'](_0x43bae4,_0x5e9624(0x2c6))))return _0x43bae4;}return undefined;}async[a42_0xc57567(0x2be)](_0x187d5f,_0x48b26f,_0x3c084d){const _0xc9c78f=a42_0xc57567;try{const _0x5c82bc=await _0x187d5f[_0xc9c78f(0x2da)][_0xc9c78f(0x34d)](_0x48b26f,{'limit':0x1});if(_0x5c82bc[_0xc9c78f(0x22b)]>0x0){const _0x5d821c=_0x5c82bc[0x0]['id'],_0x3f3afe=getWorkflowUrl(_0x3c084d,_0x5d821c);console[_0xc9c78f(0x343)](_0xc9c78f(0x2c4)+a42_0x28d120['cyan'](_0x3f3afe));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x244);[a42_0xc57567(0x371)]=a42_0xc57567(0x257);async[a42_0xc57567(0x2dc)](_0x1b3c80){const _0x1cfd22=a42_0xc57567,{options:_0x454575,args:_0x333ddc,tdx:_0x2823cf}=_0x1b3c80,_0x123607=_0x333ddc[0x0],_0x1499b8=_0x454575[_0x1cfd22(0x298)];if(_0x1499b8)return saveSessionContext({'workflow_project':undefined},_0x454575['session']),console['log'](a42_0x28d120[_0x1cfd22(0x382)](_0x1cfd22(0x23e))),0x0;if(!_0x123607)return console[_0x1cfd22(0x343)](a42_0x28d120['red'](_0x1cfd22(0x2c8)),'Project\x20name\x20is\x20required'),console[_0x1cfd22(0x343)](a42_0x28d120['dim'](_0x1cfd22(0x2e4))),console['error'](a42_0x28d120[_0x1cfd22(0x307)](_0x1cfd22(0x1ff))),0x1;const _0x1aabb6=await withSpinner(_0x1cfd22(0x23b)+_0x123607+'\x27...',()=>_0x2823cf[_0x1cfd22(0x2da)][_0x1cfd22(0x27b)](_0x123607),{'verbose':_0x454575[_0x1cfd22(0x250)]}),{name:_0x1f5516}=_0x1aabb6[_0x1cfd22(0x201)];return saveSessionContext({'workflow_project':_0x1f5516},_0x454575[_0x1cfd22(0x317)]),console['log'](a42_0x28d120[_0x1cfd22(0x382)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a42_0x28d120['cyan'](_0x1f5516))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a42_0xc57567(0x2ce);['description']=a42_0xc57567(0x275);async[a42_0xc57567(0x2dc)](_0xcd6c65){const _0xae4642=a42_0xc57567,{options:_0x3650de,args:_0x45ee93,tdx:_0x421495}=_0xcd6c65,_0x11657a=_0x45ee93[0x0];_0x3650de[_0xae4642(0x250)]&&_0x11657a&&console[_0xae4642(0x343)]('Pattern:\x20'+_0x11657a);const _0x3572a9=await withSpinner(_0xae4642(0x217),()=>_0x421495[_0xae4642(0x2da)][_0xae4642(0x2ed)](_0x11657a,{'limit':_0x3650de[_0xae4642(0x22d)]}),{'verbose':_0x3650de[_0xae4642(0x250)]});let _0x37fffc=_0x3572a9['data'];_0x37fffc['sort']((_0x50348e,_0x130049)=>_0x50348e['name'][_0xae4642(0x2f1)](_0x130049[_0xae4642(0x331)]));const _0x29c81a=_0x3650de[_0xae4642(0x22d)]||0x64,_0x3a178d=_0x37fffc['length']>=_0x29c81a?a42_0x28d120['dim'](_0xae4642(0x301)):'';console[_0xae4642(0x343)](_0xae4642(0x36f)+_0x37fffc[_0xae4642(0x22b)]+_0xae4642(0x221)+(_0x37fffc[_0xae4642(0x22b)]!==0x1?'s':'')+_0x3a178d);if(_0x3650de[_0xae4642(0x24b)]===_0xae4642(0x1fc)||_0x3650de[_0xae4642(0x24b)]===_0xae4642(0x39a)||_0x3650de[_0xae4642(0x24b)]===_0xae4642(0x39e))await handleSDKOutput(_0x37fffc,_0x3650de);else{if(_0x37fffc[_0xae4642(0x22b)]===0x0)_0x11657a?console[_0xae4642(0x385)](_0xae4642(0x303)+_0x11657a):console[_0xae4642(0x385)]('No\x20workflow\x20projects\x20found');else{const _0x3386b0=_0x37fffc[_0xae4642(0x27a)](_0x1844b9=>{const _0x61694c=_0xae4642,_0x2adc19=_0x1844b9[_0x61694c(0x286)]?.['some'](_0x203029=>_0x203029['key']===_0x61694c(0x228)),_0x55c5f1=_0x2adc19?a42_0x28d120[_0x61694c(0x307)](_0x61694c(0x314)):'';return'📁\x20'+_0x1844b9[_0x61694c(0x331)]+_0x55c5f1;});await writeOutput(_0x3386b0[_0xae4642(0x238)]('\x0a'),_0x3650de[_0xae4642(0x209)],_0xae4642(0x233));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x397);['description']='List\x20workflows';async['execute'](_0x2f01f3){const _0x146346=a42_0xc57567,{options:_0x41a009,args:_0x52bed3,tdx:_0x1bf77d}=_0x2f01f3,_0x484a79=this[_0x146346(0x247)](_0x52bed3,_0x41a009);_0x41a009['verbose']&&_0x484a79&&console[_0x146346(0x343)]('Project\x20filter:\x20'+_0x484a79);const _0x55848d=await withSpinner(_0x146346(0x254),()=>_0x1bf77d[_0x146346(0x2da)][_0x146346(0x34d)](_0x484a79,{'limit':_0x41a009[_0x146346(0x22d)]}),{'verbose':_0x41a009[_0x146346(0x250)]});let _0x3cb024=_0x55848d[_0x146346(0x201)];_0x3cb024[_0x146346(0x208)]((_0x5abb14,_0x2127c4)=>{const _0x3ae55e=_0x146346,_0x43177a=_0x5abb14['name'][_0x3ae55e(0x2f1)](_0x2127c4[_0x3ae55e(0x331)]);if(_0x43177a!==0x0)return _0x43177a;return(_0x5abb14[_0x3ae55e(0x296)]?.['name']||'')[_0x3ae55e(0x2f1)](_0x2127c4[_0x3ae55e(0x296)]?.[_0x3ae55e(0x331)]||'');});const _0x1b38cb=_0x41a009[_0x146346(0x22d)]||0x64,_0x4a491f=_0x3cb024[_0x146346(0x22b)]>=_0x1b38cb?a42_0x28d120[_0x146346(0x307)](_0x146346(0x301)):'';console['error'](_0x146346(0x36f)+_0x3cb024[_0x146346(0x22b)]+_0x146346(0x2dd)+(_0x3cb024['length']!==0x1?'s':'')+_0x4a491f);if(_0x41a009[_0x146346(0x24b)]===_0x146346(0x1fc)||_0x41a009['format']===_0x146346(0x39a)||_0x41a009['format']==='table')await handleSDKOutput(_0x3cb024,_0x41a009);else{if(_0x3cb024['length']===0x0)_0x484a79?console[_0x146346(0x385)](_0x146346(0x35b)+_0x484a79):console['log'](_0x146346(0x26b));else{const _0x5222cc=_0x41a009[_0x146346(0x31d)],_0x52ebbe=_0x3cb024[_0x146346(0x27a)](_0x11d599=>{const _0x1f01da=_0x146346,_0x47b307=a42_0x28d120[_0x1f01da(0x307)]('#'+_0x11d599['id']),_0xf457a3=hyperlink(_0x47b307,getWorkflowUrl(_0x5222cc,_0x11d599['id'])),_0x44d407=_0x11d599[_0x1f01da(0x296)]?.[_0x1f01da(0x331)]?a42_0x28d120[_0x1f01da(0x307)]('\x20('+_0x11d599[_0x1f01da(0x296)][_0x1f01da(0x331)]+')'):'';return _0x1f01da(0x2d9)+_0xf457a3+'\x20'+_0x11d599[_0x1f01da(0x331)]+_0x44d407;});await writeOutput(_0x52ebbe[_0x146346(0x238)]('\x0a'),_0x41a009[_0x146346(0x209)],_0x146346(0x233));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x2b0);[a42_0xc57567(0x371)]=a42_0xc57567(0x292);async[a42_0xc57567(0x2dc)](_0x22a5ac){const _0x20800d=a42_0xc57567,{options:_0x15d702,args:_0x5ee259,tdx:_0x296883}=_0x22a5ac,_0x34fe89=this['parseProjectWorkflowPattern'](_0x5ee259,_0x15d702);if(!_0x34fe89)return 0x1;const {projectName:_0x45d7c8,workflowName:_0x514e98}=_0x34fe89;if(_0x15d702[_0x20800d(0x250)]){if(_0x45d7c8&&_0x514e98)console['error'](_0x20800d(0x2ef)+_0x45d7c8+'.'+_0x514e98);else _0x45d7c8&&console[_0x20800d(0x343)](_0x20800d(0x2b4)+_0x45d7c8);const _0x384196=_0x15d702[_0x20800d(0x2ea)];_0x384196&&console['error']('Status:\x20'+_0x384196);}let _0x12d373=0x28;if(process[_0x20800d(0x297)][_0x20800d(0x24d)]&&!_0x15d702[_0x20800d(0x209)]&&!_0x15d702[_0x20800d(0x24b)]){const _0x1f1fc6=process[_0x20800d(0x297)][_0x20800d(0x218)]||0x28;_0x12d373=Math[_0x20800d(0x30f)](0x14,Math[_0x20800d(0x347)](_0x1f1fc6*0x2/0x3));}const _0x2b2264=_0x15d702[_0x20800d(0x22d)]||_0x12d373,_0x338edb=await withSpinner(_0x20800d(0x211),()=>_0x296883[_0x20800d(0x2da)][_0x20800d(0x2d4)]({'projectName':_0x45d7c8,'workflowName':_0x514e98,'status':_0x15d702[_0x20800d(0x2ea)],'fromTime':_0x15d702['from'],'toTime':_0x15d702['to'],'limit':_0x2b2264}),{'verbose':_0x15d702[_0x20800d(0x250)]}),_0x5698af=_0x338edb[_0x20800d(0x201)];_0x5698af[_0x20800d(0x208)]((_0x37070c,_0x5ce3e1)=>{const _0x1dd0b1=_0x20800d,_0x4773d4=_0x37070c[_0x1dd0b1(0x24f)]||'',_0x18a78b=_0x5ce3e1[_0x1dd0b1(0x24f)]||'';return _0x18a78b[_0x1dd0b1(0x2f1)](_0x4773d4);});_0x5698af[_0x20800d(0x22b)]>=_0x2b2264?console[_0x20800d(0x343)]('✔\x20Showing\x20'+_0x5698af['length']+'\x20sessions\x20'+a42_0x28d120['dim'](_0x20800d(0x339))):console['error'](_0x20800d(0x36f)+_0x5698af[_0x20800d(0x22b)]+'\x20session'+(_0x5698af['length']!==0x1?'s':''));if(_0x15d702[_0x20800d(0x24b)]===_0x20800d(0x1fc)||_0x15d702['format']===_0x20800d(0x39a)||_0x15d702[_0x20800d(0x24b)]===_0x20800d(0x39e))await handleSDKOutput(_0x5698af,_0x15d702);else{if(!process[_0x20800d(0x297)]['isTTY']||_0x15d702[_0x20800d(0x209)]){if(_0x5698af[_0x20800d(0x22b)]===0x0){if(_0x45d7c8&&_0x514e98)console[_0x20800d(0x385)]('No\x20sessions\x20found\x20for:\x20'+_0x45d7c8+'.'+_0x514e98);else _0x45d7c8?console[_0x20800d(0x385)](_0x20800d(0x32a)+_0x45d7c8):console[_0x20800d(0x385)](_0x20800d(0x243));}else{const _0x1161d9=_0x15d702[_0x20800d(0x31d)],_0x3e8ff7=this[_0x20800d(0x23a)](_0x5698af,_0x1161d9);_0x15d702[_0x20800d(0x209)]?await writeOutput(_0x3e8ff7,_0x15d702[_0x20800d(0x209)],_0x20800d(0x233)):console[_0x20800d(0x385)](_0x3e8ff7);}!_0x45d7c8&&(console[_0x20800d(0x343)](''),console[_0x20800d(0x343)](a42_0x28d120[_0x20800d(0x307)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console['error'](a42_0x28d120[_0x20800d(0x307)](_0x20800d(0x34e))+'or'+a42_0x28d120[_0x20800d(0x307)](_0x20800d(0x37c))));}else{if(_0x5698af[_0x20800d(0x22b)]===0x0){if(_0x45d7c8&&_0x514e98)console[_0x20800d(0x385)](_0x20800d(0x269)+_0x45d7c8+'.'+_0x514e98);else _0x45d7c8?console[_0x20800d(0x385)](_0x20800d(0x32a)+_0x45d7c8):console['log'](_0x20800d(0x243));}else await this['navigateSessionsInteractive'](_0x5698af,_0x22a5ac,_0x45d7c8);}}return 0x0;}[a42_0xc57567(0x23a)](_0x1373bd,_0x4ae897){const _0x21cacf=a42_0xc57567,_0x4356b3=[],_0x1d2144=new Map();let _0x4842c5=Infinity,_0x1b85f9=-Infinity;for(const _0xa4101 of _0x1373bd){if(_0xa4101['lastAttempt']?.[_0x21cacf(0x2ac)]){const _0xf5af27=new Date(_0xa4101[_0x21cacf(0x2a9)][_0x21cacf(0x2ac)])['getTime'](),_0x5f3c4a=_0xa4101[_0x21cacf(0x2a9)][_0x21cacf(0x23f)]?new Date(_0xa4101[_0x21cacf(0x2a9)][_0x21cacf(0x23f)])[_0x21cacf(0x2e8)]():Date[_0x21cacf(0x2c1)](),_0x2c395e=_0xa4101[_0x21cacf(0x296)]?.[_0x21cacf(0x331)]||_0x21cacf(0x2df);!_0x1d2144[_0x21cacf(0x34a)](_0x2c395e)&&_0x1d2144[_0x21cacf(0x25a)](_0x2c395e,[]),_0x1d2144[_0x21cacf(0x2c3)](_0x2c395e)['push']({'session':_0xa4101,'startTime':_0xf5af27,'endTime':_0x5f3c4a,'duration':_0x5f3c4a-_0xf5af27}),_0x4842c5=Math[_0x21cacf(0x232)](_0x4842c5,_0xf5af27),_0x1b85f9=Math[_0x21cacf(0x30f)](_0x1b85f9,_0x5f3c4a);}}if(_0x1d2144[_0x21cacf(0x33d)]===0x0)return _0x21cacf(0x2ec);const _0x1cbafa=process[_0x21cacf(0x297)][_0x21cacf(0x350)]||0x78,_0x9dd6aa=0x1e,_0x370faa=0x32,_0x38fcc=0x4,_0x5d8269=Math[_0x21cacf(0x232)](_0x370faa,Math[_0x21cacf(0x30f)](_0x9dd6aa,Math[_0x21cacf(0x347)](_0x1cbafa*0.3))),_0x43ab95=_0x1cbafa-_0x5d8269-TIMELINE_CONFIG['GUTTER']-0x3-_0x38fcc,_0x4363f3=_0x1b85f9-_0x4842c5,_0x29adf9=_0x4363f3/_0x5d8269,_0x259153=renderTimeAxis({'startTime':_0x4842c5,'endTime':_0x1b85f9,'durationMs':_0x4363f3,'msPerChar':_0x29adf9},_0x5d8269),_0x3c73e5=[];for(const _0x49e645 of _0x1d2144[_0x21cacf(0x387)]()){_0x3c73e5[_0x21cacf(0x2c5)](..._0x49e645);}_0x3c73e5['sort']((_0x4656c2,_0x477adf)=>_0x477adf['startTime']-_0x4656c2[_0x21cacf(0x205)]);const _0x6eea9d=new Date(_0x4842c5),_0x1a1630=formatDate(_0x6eea9d),_0xd507f7=_0x38fcc+TIMELINE_CONFIG[_0x21cacf(0x360)]+TIMELINE_CONFIG[_0x21cacf(0x27e)]+_0x43ab95,_0x248fd0='\x20'[_0x21cacf(0x335)](_0xd507f7-_0x1a1630[_0x21cacf(0x22b)]),_0x401460=_0x248fd0+a42_0x28d120[_0x21cacf(0x307)](_0x1a1630)+'\x20'+_0x259153;_0x4356b3['push'](_0x401460);const _0x1bb44c=0x16;let _0x2c6262=0x0;for(const _0x55be63 of _0x3c73e5){const _0x34d730=_0x55be63[_0x21cacf(0x317)][_0x21cacf(0x296)]?.[_0x21cacf(0x331)]||'?',_0x22d543=Math[_0x21cacf(0x232)](stringWidth(_0x34d730),_0x1bb44c);_0x2c6262=Math[_0x21cacf(0x30f)](_0x2c6262,_0x22d543);}for(const _0x17444a of _0x3c73e5){const {session:_0x5888cd,startTime:_0x170225,endTime:_0xedeed1,duration:_0x121e79}=_0x17444a,_0x1532ed=_0x5888cd[_0x21cacf(0x296)]?.['id'],_0x57dfb4=_0x5888cd['id'],_0x2c9e69=_0x5888cd[_0x21cacf(0x296)]?.[_0x21cacf(0x331)]||'?',_0x812677=_0x5888cd[_0x21cacf(0x2da)]?.[_0x21cacf(0x331)]||'?';let _0x3536de,_0x1bc776;if(_0x5888cd[_0x21cacf(0x2a9)]){const _0x17ef38=_0x5888cd[_0x21cacf(0x2a9)];!_0x17ef38['done']?(_0x3536de=_0x17ef38[_0x21cacf(0x398)]?'🛑':'🔄',_0x1bc776=_0x17ef38[_0x21cacf(0x398)]?a42_0x28d120[_0x21cacf(0x2a1)]:a42_0x28d120[_0x21cacf(0x1fd)]):(_0x3536de=_0x17ef38[_0x21cacf(0x32b)]?'✅':'❌',_0x1bc776=_0x17ef38[_0x21cacf(0x32b)]?a42_0x28d120[_0x21cacf(0x382)]:a42_0x28d120[_0x21cacf(0x356)]);}else _0x3536de='⏳',_0x1bc776=a42_0x28d120['dim'];const _0x246f67='#'+_0x57dfb4,_0x1f116d=_0x1532ed?hyperlink(_0x246f67,getWorkflowSessionUrl(_0x4ae897,_0x1532ed,_0x57dfb4)):_0x246f67;let _0x409c13=_0x2c9e69;stringWidth(_0x2c9e69)>_0x1bb44c&&(_0x409c13=_0x2c9e69[_0x21cacf(0x273)](0x0,_0x1bb44c-0x1)+'…');const _0x513870=a42_0x28d120[_0x21cacf(0x307)](_0x409c13),_0x58d08d=stringWidth(_0x409c13),_0x2b2246='\x20'[_0x21cacf(0x335)](_0x2c6262-stringWidth(_0x409c13)+0x2),_0x4160d8='('+formatElapsed(_0x121e79)+')',_0x5f472d=stringWidth(_0x4160d8),_0x2063f5=stringWidth(_0x246f67),_0x4cf9a7=_0x2063f5+0x1+_0x58d08d+_0x2b2246[_0x21cacf(0x22b)],_0x9e273a=_0x43ab95-_0x4cf9a7-_0x5f472d-0x1-0x8;let _0x391a76=_0x812677;stringWidth(_0x391a76)>_0x9e273a&&(_0x391a76=_0x391a76['slice'](0x0,_0x9e273a-0x1)+'…');const _0x4602f5=_0x1f116d+'\x20'+_0x513870+_0x2b2246+_0x391a76,_0x8b58f2=stringWidth(_0x4602f5),_0x326f91=_0x43ab95-_0x8b58f2-_0x5f472d,_0x23cd2d=_0x4602f5+'\x20'[_0x21cacf(0x335)](Math[_0x21cacf(0x30f)](0x1,_0x326f91))+a42_0x28d120['dim'](_0x4160d8),_0x5ccdeb=Math[_0x21cacf(0x347)]((_0x170225-_0x4842c5)/_0x29adf9),_0x3ca8ce=Math['floor']((_0xedeed1-_0x4842c5)/_0x29adf9),_0x3b4927=Math[_0x21cacf(0x30f)](_0x5ccdeb+0x1,_0x3ca8ce),_0x5ce6bd=new Array(_0x5d8269)[_0x21cacf(0x261)]('\x20');for(let _0x10b69a=_0x5ccdeb;_0x10b69a<Math[_0x21cacf(0x232)](_0x3b4927,_0x5d8269);_0x10b69a++){_0x5ce6bd[_0x10b69a]='─';}const _0x1ff4f2=_0x5ce6bd[_0x21cacf(0x27a)](_0x37c886=>_0x37c886==='\x20'?'\x20':_0x1bc776(_0x37c886))[_0x21cacf(0x238)]('');_0x4356b3[_0x21cacf(0x2c5)](_0x3536de+'\x20'+_0x23cd2d+'│'+_0x1ff4f2+'│');}return _0x4356b3[_0x21cacf(0x238)]('\x0a');}async[a42_0xc57567(0x32f)](_0x681e71,_0x579721,_0x2f4ed3){const _0x451bc2=a42_0xc57567,{options:_0x3db90a,tdx:_0x2d8ebb}=_0x579721,_0x43d305=_0x3db90a['site'],{timelineRows:_0x27970e,timeAxisHeader:_0x239c75}=this[_0x451bc2(0x2ee)](_0x681e71,_0x43d305),_0x155fd0=_0x27970e[_0x451bc2(0x36b)](_0xc83e16=>_0xc83e16[_0x451bc2(0x270)]);if(_0x155fd0['length']===0x0){const _0x354113=this[_0x451bc2(0x23a)](_0x681e71,_0x43d305);console[_0x451bc2(0x385)](_0x354113);!_0x2f4ed3&&(console[_0x451bc2(0x343)](''),console[_0x451bc2(0x343)](a42_0x28d120[_0x451bc2(0x307)](_0x451bc2(0x1fe))),console[_0x451bc2(0x343)](a42_0x28d120[_0x451bc2(0x307)](_0x451bc2(0x34e))+'or'+a42_0x28d120[_0x451bc2(0x307)](_0x451bc2(0x37c))));return;}_0x239c75&&console['log'](_0x239c75);const _0x2f5fe5=_0x27970e[_0x451bc2(0x36b)](_0x2b9f79=>_0x2b9f79[_0x451bc2(0x270)])[_0x451bc2(0x27a)](_0x228772=>({'title':_0x228772[_0x451bc2(0x372)],'value':_0x228772[_0x451bc2(0x270)]})),_0x11bb02=process[_0x451bc2(0x297)][_0x451bc2(0x218)]||0x3c,_0xc42a1f=Math[_0x451bc2(0x30f)](0x28,Math['floor'](_0x11bb02*0x2/0x3)),_0x5b1d4a=await a42_0x4fae({'type':_0x451bc2(0x352),'name':_0x451bc2(0x270),'message':_0x451bc2(0x2d1),'choices':_0x2f5fe5,'initial':-0x1,'limit':_0xc42a1f,'clearFirst':!![],'fallback':{'title':_0x451bc2(0x2a6),'value':null},'suggest':(_0x5e704b,_0x5f07dc)=>{const _0x510758=_0x451bc2;if(!_0x5e704b)return Promise[_0x510758(0x310)](_0x5f07dc);const _0x50e8a0=_0x5f07dc[_0x510758(0x36b)](_0xfebec2=>{const _0x148200=_0x510758,_0x38a0bf=_0xfebec2;return _0x38a0bf[_0x148200(0x334)][_0x148200(0x279)]()[_0x148200(0x26d)](_0x5e704b[_0x148200(0x279)]());});return Promise[_0x510758(0x310)](_0x50e8a0);}}),_0x1255aa=()=>{const _0x1f7812=_0x451bc2;process[_0x1f7812(0x297)][_0x1f7812(0x268)](_0x1f7812(0x289)),process['stdout'][_0x1f7812(0x268)](_0x1f7812(0x289)),process['stdout'][_0x1f7812(0x268)](_0x1f7812(0x289));},_0x26affe=_0x5b1d4a&&_0x5b1d4a['attemptId']&&_0x5b1d4a[_0x451bc2(0x270)]!==null&&_0x5b1d4a[_0x451bc2(0x270)]['trim']()!=='';if(!_0x26affe){_0x1255aa(),console[_0x451bc2(0x385)](a42_0x28d120[_0x451bc2(0x307)]('Cancelled'));return;}_0x1255aa();const _0x155605=_0x681e71['find'](_0x1dc7fa=>_0x1dc7fa[_0x451bc2(0x2a9)]?.['id']===_0x5b1d4a[_0x451bc2(0x270)]);if(_0x155605){const _0x1a2488=_0x155605[_0x451bc2(0x296)]?.['name']||'?',_0x20c989=_0x155605[_0x451bc2(0x2da)]?.[_0x451bc2(0x331)]||'?';console[_0x451bc2(0x385)]('Project:\x20'+a42_0x28d120[_0x451bc2(0x307)](_0x1a2488)+_0x451bc2(0x306)+a42_0x28d120[_0x451bc2(0x307)](_0x20c989));}const _0x3575f1=new WorkflowTimelineCommand();await _0x3575f1[_0x451bc2(0x2dc)]({'args':[],'options':{..._0x3db90a,'attemptId':_0x5b1d4a[_0x451bc2(0x270)]},'tdx':_0x2d8ebb});}['generateSessionTimelineRows'](_0x42b057,_0xdc6967){const _0x4ec773=a42_0xc57567,_0x3ac66d=new Map();for(const _0x317ffa of _0x42b057){_0x317ffa['id']&&_0x317ffa[_0x4ec773(0x2a9)]?.['id']&&_0x3ac66d[_0x4ec773(0x25a)](_0x317ffa['id'],_0x317ffa[_0x4ec773(0x2a9)]['id']);}const _0x202e24=[];let _0x10f2f9='';const _0x1c0877=this[_0x4ec773(0x23a)](_0x42b057,_0xdc6967),_0x58c9ce=_0x1c0877[_0x4ec773(0x294)]('\x0a');for(const _0x1db360 of _0x58c9ce){if(_0x1db360['startsWith'](_0x4ec773(0x348))||_0x1db360[_0x4ec773(0x353)](/^\s+\d{4}-\d{2}-\d{2}/))_0x10f2f9=_0x1db360;else{if(_0x1db360['match'](/^[✅❌🔄🛑⏳]/)){const _0x1e5e7b=_0x1db360['match'](/#(\d+)/),_0x4a97f0=_0x1e5e7b?_0x1e5e7b[0x1]:null,_0x1959c6=_0x4a97f0?_0x3ac66d[_0x4ec773(0x2c3)](_0x4a97f0)||null:null,_0x3d2e2a=_0x42b057[_0x4ec773(0x386)](_0x94204=>_0x94204['id']===_0x4a97f0),_0x66518e=_0x3d2e2a?.[_0x4ec773(0x296)]?.[_0x4ec773(0x331)]||'';_0x202e24['push']({'displayLine':_0x1db360,'attemptId':_0x1959c6,'projectName':_0x66518e});}}}return{'timelineRows':_0x202e24,'timeAxisHeader':_0x10f2f9};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x290);[a42_0xc57567(0x371)]=a42_0xc57567(0x258);async[a42_0xc57567(0x2dc)](_0xb6ba71){const _0x4428b8=a42_0xc57567,{options:_0x245951,args:_0x42bf9e,tdx:_0x5a84ab}=_0xb6ba71,_0x480b94=this['parseProjectWorkflowPattern'](_0x42bf9e,_0x245951);if(!_0x480b94)return 0x1;const {projectName:_0x436580,workflowName:_0x4ef2ec}=_0x480b94,_0x1b9c17=_0x245951['includeRetried'];if(_0x245951['verbose']){if(_0x436580&&_0x4ef2ec)console['error'](_0x4428b8(0x2ef)+_0x436580+'.'+_0x4ef2ec);else _0x436580&&console[_0x4428b8(0x343)](_0x4428b8(0x2b4)+_0x436580);_0x1b9c17&&console[_0x4428b8(0x343)](_0x4428b8(0x35d));}const _0x2cd774=await withSpinner(_0x4428b8(0x1f7),()=>_0x5a84ab['workflow']['attempts']({'projectName':_0x436580,'workflowName':_0x4ef2ec,'includeRetried':_0x1b9c17,'limit':_0x245951[_0x4428b8(0x22d)]}),{'verbose':_0x245951[_0x4428b8(0x250)]}),_0x2d6c56=_0x2cd774[_0x4428b8(0x201)],_0x182d4d=_0x245951[_0x4428b8(0x22d)]||0x64,_0x5e091=_0x2d6c56[_0x4428b8(0x22b)]>=_0x182d4d?a42_0x28d120[_0x4428b8(0x307)](_0x4428b8(0x301)):'';console[_0x4428b8(0x343)](_0x4428b8(0x36f)+_0x2d6c56[_0x4428b8(0x22b)]+_0x4428b8(0x22f)+(_0x2d6c56[_0x4428b8(0x22b)]!==0x1?'s':'')+_0x5e091);if(_0x245951[_0x4428b8(0x24b)]===_0x4428b8(0x1fc)||_0x245951['format']==='jsonl'||_0x245951[_0x4428b8(0x24b)]===_0x4428b8(0x39e))await handleSDKOutput(_0x2d6c56,_0x245951);else{if(_0x2d6c56[_0x4428b8(0x22b)]===0x0){if(_0x436580&&_0x4ef2ec)console['log']('No\x20attempts\x20found\x20for:\x20'+_0x436580+'.'+_0x4ef2ec);else _0x436580?console['log'](_0x4428b8(0x322)+_0x436580):console['log'](_0x4428b8(0x22c));}else{const _0x2312b7=_0x245951[_0x4428b8(0x31d)],_0x382d69=_0x2d6c56[_0x4428b8(0x27a)](_0x4266ea=>{const _0x203016=_0x4428b8,_0x1ee06a=a42_0x28d120['dim']('#'+_0x4266ea['id']),_0xe8dd53=_0x4266ea[_0x203016(0x296)]?.['id'],_0x566d95=_0x4266ea[_0x203016(0x300)]||_0x4266ea[_0x203016(0x1f6)],_0x24878f=_0xe8dd53&&_0x566d95?hyperlink(_0x1ee06a,getWorkflowAttemptUrl(_0x2312b7,_0xe8dd53,_0x566d95,_0x4266ea['id'])):_0x1ee06a,{icon:_0x49b6d7,text:_0x23de87}=getAttemptStatusDisplay(_0x4266ea),_0x266e39=(_0x4266ea[_0x203016(0x296)]?.[_0x203016(0x331)]||'?')+'.'+(_0x4266ea['workflow']?.[_0x203016(0x331)]||'?'),_0x2a94f9=_0x4266ea['sessionTime']?a42_0x28d120[_0x203016(0x307)](_0x4266ea[_0x203016(0x24f)]):'';return(_0x24878f+'\x20'+_0x49b6d7+(_0x23de87?'\x20'+_0x23de87:'')+'\x20'+_0x266e39+'\x20'+_0x2a94f9)[_0x203016(0x2a0)]();});await writeOutput(_0x382d69[_0x4428b8(0x238)]('\x0a'),_0x245951[_0x4428b8(0x209)],_0x4428b8(0x233));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x35c);[a42_0xc57567(0x371)]=a42_0xc57567(0x23c);async[a42_0xc57567(0x2dc)](_0x51857a){const _0x106a21=a42_0xc57567,{options:_0x1cb89e,args:_0x5686f9,tdx:_0x1cb342}=_0x51857a,_0x5cb2f7=_0x5686f9[0x0];if(!_0x5cb2f7)return console[_0x106a21(0x343)](_0x106a21(0x392)),0x1;_0x1cb89e[_0x106a21(0x250)]&&console['error'](_0x106a21(0x2b2)+_0x5cb2f7);const _0x50d4fd=await withSpinner(_0x106a21(0x32d),()=>_0x1cb342['workflow'][_0x106a21(0x320)](_0x5cb2f7),{'verbose':_0x1cb89e[_0x106a21(0x250)]}),_0x47b612=_0x50d4fd[_0x106a21(0x201)];let _0x28aac5;!_0x47b612[_0x106a21(0x21e)]?_0x28aac5=_0x47b612[_0x106a21(0x398)]?_0x106a21(0x28d):_0x106a21(0x272):_0x28aac5=_0x47b612[_0x106a21(0x32b)]?_0x106a21(0x32b):_0x106a21(0x343);let _0x3a59a9;if(_0x47b612[_0x106a21(0x2ac)]&&_0x47b612[_0x106a21(0x23f)]){const _0x2446b1=new Date(_0x47b612[_0x106a21(0x2ac)])[_0x106a21(0x2e8)](),_0x58e78d=new Date(_0x47b612[_0x106a21(0x23f)])['getTime']();_0x3a59a9=Math['round']((_0x58e78d-_0x2446b1)/0x3e8);}const _0x104452={'attempt_id':_0x47b612['id'],'status':_0x28aac5,..._0x47b612[_0x106a21(0x28b)]!==undefined&&{'index':_0x47b612['index']},..._0x47b612[_0x106a21(0x296)]&&{'project':_0x47b612[_0x106a21(0x296)][_0x106a21(0x331)]},..._0x47b612['workflow']&&{'workflow':_0x47b612[_0x106a21(0x2da)][_0x106a21(0x331)]},..._0x47b612['sessionId']&&{'session_id':_0x47b612['sessionId']},..._0x47b612[_0x106a21(0x24f)]&&{'session_time':_0x47b612[_0x106a21(0x24f)]},..._0x47b612['retryAttemptName']&&{'retry_attempt':_0x47b612[_0x106a21(0x349)]},..._0x3a59a9!==undefined&&{'duration_sec':_0x3a59a9},..._0x47b612[_0x106a21(0x2ac)]&&{'created_at':_0x47b612[_0x106a21(0x2ac)]},..._0x47b612[_0x106a21(0x23f)]&&{'finished_at':_0x47b612[_0x106a21(0x23f)]},...Object[_0x106a21(0x377)](_0x47b612['params'])[_0x106a21(0x22b)]>0x0&&{'params':_0x47b612[_0x106a21(0x2f6)]}};return await handleSingleObjectOutput(_0x104452,_0x1cb89e),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x2d2);['description']=a42_0xc57567(0x2fd);async[a42_0xc57567(0x2dc)](_0xc3f3b9){const _0x3bef86=a42_0xc57567,{options:_0x29a7f7,args:_0x5d9fa5,tdx:_0xd05b3b}=_0xc3f3b9,_0x1872f6=_0x5d9fa5[0x0];if(!_0x1872f6)return console[_0x3bef86(0x343)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x3ce004=_0x29a7f7[_0x3bef86(0x338)];_0x29a7f7[_0x3bef86(0x250)]&&(console[_0x3bef86(0x343)](_0x3bef86(0x2b2)+_0x1872f6),_0x3ce004&&console['error'](_0x3bef86(0x280)));const _0x28e594=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0xd05b3b[_0x3bef86(0x2da)][_0x3bef86(0x332)](_0x1872f6,_0x3ce004||![]),{'verbose':_0x29a7f7[_0x3bef86(0x250)]}),_0x181535=_0x28e594['data'];return console['error'](_0x3bef86(0x36f)+_0x181535[_0x3bef86(0x22b)]+_0x3bef86(0x389)+(_0x181535[_0x3bef86(0x22b)]!==0x1?'s':'')),await handleSDKOutput(_0x181535,_0x29a7f7),0x0;}}function a42_0x4a1f(){const _0x3949d8=['\x0aDry\x20run\x20-\x20nothing\x20pushed','Filter:\x20project=','renderSingleTimeline','\x0aPolling...\x20(','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Fetching\x20log\x20files...','utf-8','revision','Select\x20a\x20task\x20to\x20view\x20logs:','param','workflow:upload','showWorkflowConsoleUrl','unchanged','1353900aARBFW','now','\x20\x20Project:\x20','get','\x20\x20Console:\x20','push','tdx.json','Usage:\x20workflow:delete\x20<project-name-or-id>','Error:','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','projectId','✔\x20Pushed\x20','context','pollTimeline','workflow:projects','\x0aClone\x20\x22','TASK_NAME_WIDTH','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','workflow:tasks','projectName','sessions','Target:\x20','getFullYear','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','targetExists','📋\x20','workflow','startsWith','execute','\x20workflow','resolveProjectDir','(unknown)','preparePushProject','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','\x20\x20Location:\x20','1576JvXilJ','Usage:\x20tdx\x20wf\x20use\x20<project>','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','requireProject','\x0aPush\x20these\x20changes?','getTime','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','status','✔\x20Clone\x20complete','No\x20sessions\x20with\x20timing\x20information','projects','generateSessionTimelineRows','Filter:\x20','Killing\x20attempt...','localeCompare','\x20new','\x22?\x20This\x20cannot\x20be\x20undone.','POLL_INTERVAL_MS','No\x20workflow\x20sessions\x20found','params','path','duration','\x0aUpdate\x20existing\x20project\x20\x22','Invalid\x20format:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Show\x20tasks\x20for\x20an\x20attempt','replace','select','session_id','\x20(use\x20--limit\x20to\x20show\x20more)','group_error','No\x20projects\x20match\x20pattern:\x20','Files\x20to\x20upload:\x20','workflow:retry',',\x20Workflow:\x20','dim','all','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','dryRun','\x0aFailed\x20to\x20fetch\x20attempt\x20data','session:','workflow:secrets:list','task','max','resolve','\x20deleted','✔\x20Deleted\x20project\x20','prepareCloneProject','\x20(system)','Tip:\x20cd\x20to\x20workflows/','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','session','New\x20project\x20name:\x20','\x20\x20Changes:\x20','Project\x20directory:\x20','newProjectName','\x20logs','site','workflowName','Setting\x20secret...','attempt','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','No\x20attempts\x20found\x20in\x20project:\x20','parseProjectWorkflowPattern','Resume\x20from:\x20','diff','\x20to\x20see\x20detailed\x20logs','Session\x20not\x20found:\x20','existingProjectId','Source:\x20','No\x20sessions\x20found\x20in\x20project:\x20','success','Writing\x20files...','Getting\x20attempt\x20details...','---\x20','navigateSessionsInteractive','\x22\x20with\x20new\x20revision?','name','tasks','\x20\x20Session\x20context\x20set\x20to:\x20','title','repeat','Cloning\x20to\x20','getMinutes','includeSubtasks','(use\x20--limit\x20to\x20see\x20more)','applyPullProject','getHours','workflow:download','size','2DxYMnE','\x0a✔\x20Attempt\x20complete','splice','white','Source\x20directory:\x20','error','Total:\x20','Downloading\x20project\x20','Deleting\x20project\x20','floor','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','retryAttemptName','has','end','updatedAt','workflows','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20secret','columns','modified','autocomplete','match','Output\x20directory:\x20','workflow:run','red','Kill\x20a\x20running\x20attempt','reason','Validation:\x20skipped','690424uUIdhS','No\x20workflows\x20found\x20in\x20project:\x20','workflow:attempt','Include\x20retried:\x20yes','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','summary','ICON_WIDTH','indexOf','Pull\x20workflow\x20project\x20to\x20local\x20folder','-\x20nothing\x20pushed','Retry\x20a\x20session\x20or\x20attempt','MIN_TIMELINE_WIDTH','taskName','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','fullName','isNewProject','filter','Target\x20directory:\x20','type','Error:\x20','✔\x20Found\x20','fromTask','description','displayLine','806805sxVbfZ','\x0a⚠\x20Project\x20\x22','\x20\x20Project\x20ID:\x20','✔\x20Downloaded\x20','keys','Latest\x20session\x20has\x20no\x20attempt','\x20-\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','MIN_LABEL_COUNT','\x20\x20tdx\x20wf\x20use\x20<project>','Retrying\x20session...','start','\x20\x20Revision:\x20','\x22\x20to\x20new\x20project\x20\x22','Revision:\x20','green','Project\x20name\x20is\x20required','Task\x20name:\x20','log','find','values','From\x20task:\x20','\x20task','run','fs/promises','Project\x20name:\x20','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','✔\x20Project:\x20','\x20modified','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','executeCloneProject','Error:\x20Attempt\x20ID\x20is\x20required','30IGfvDi','Parameters:\x20','skipValidation','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','workflow:workflows','cancelRequested','→\x20New\x20project:\x20','jsonl','delete','new','\x0aError:','table','stringify','text','sessionId','Listing\x20workflow\x20attempts...','\x20from\x20session\x20','\x0aApply\x20these\x20changes?','msPerChar','sourceProjectName','json','blue','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Pulling\x20project\x20','data','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','buildTimelineData','Attempt:\x20','startTime','newProjectId','✔\x20Retry\x20started','sort','output','💡\x20Tip:\x20Use\x20','Analyzing\x20changes...','Pushing\x20workflow\x20project...','retrySession','Workflow:\x20','\x22\x20already\x20exists\x20(ID:\x20','MAX_TASKS_DISPLAY','Listing\x20workflow\x20sessions...','parse','readFile','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','window','cwd','Listing\x20workflow\x20projects...','rows','✔\x20Pull\x20complete','/attempt/','substring','state','basename','done','\x20unchanged','workflowProject','\x20project','Error:\x20KEY=VALUE\x20is\x20required','MAX_POLL_ITERATIONS','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Start\x20a\x20workflow\x20run','Dry\x20run:\x20yes','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','sys','workflow:push','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','length','No\x20attempts\x20found','limit','kill','\x20attempt','padStart','unknown','min','list','revision:\x20','Updating\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','join','stat','renderSessionsTimeline','Resolving\x20project\x20\x27','Show\x20specific\x20attempt\x20details','workflow:pull','✔\x20Workflow\x20project\x20context\x20cleared.','finishedAt','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','\x20\x20Session\x20ID:\x20','follow','No\x20sessions\x20found','workflow:use','🔄\x20','3714996icddzr','resolveProject','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Pushing\x20project...','deleteSecret','format','icon','isTTY','fileCount','sessionTime','verbose','→\x20Project:\x20','download','yes','Listing\x20workflows...','Error:\x20Project\x20name\x20is\x20required','Using\x20attempt\x20','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','List\x20workflow\x20attempts','Loading\x20sessions...','set','\x20\x20New\x20attempt\x20ID:\x20','Auto-selected\x20latest\x20session:\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','logs','.\x20Expected\x20format:\x20KEY=VALUE','cyan','fill','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','renderTimeline','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','pullProject','✔\x20Push\x20complete','Key:\x20','write','No\x20sessions\x20found\x20for:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','No\x20workflows\x20found','\x20\x20Files\x20extracted:\x20','includes','\x20\x20Attempt\x20ID:\x20','planned','attemptId','retryAttempt','running','slice','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','List\x20all\x20workflow\x20projects','isArray','getDate','deleted','toLowerCase','map','resolveProjectId','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','fileSize','ICON_SPACING','Session\x20','Including\x20subtasks:\x20yes','...','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','hasChanges','/sessions/','Error:\x20Invalid\x20JSON\x20in\x20--params','metadata','resumeFrom','6587cUoUfn','\x1b[1A\x1b[2K','861633BFTxof','index','toISOString','canceling','startedAt','\x0aDry\x20run\x20-\x20no\x20files\x20written','workflow:attempts','269268MuFkXU','List\x20workflow\x20execution\x20sessions','sourceDir','split','message','project','stdout','clear','workflow:secrets:delete','pending','attempt:','getMonth','Downloading\x20logs...','changes','Project:\x20','trimEnd','yellow','Failed\x20to\x20fetch\x20attempt\x20data','Session\x20time:\x20','Listing\x20secrets...','listSecrets','No\x20matching\x20sessions\x20found','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Show\x20logs\x20for\x20a\x20workflow\x20attempt','lastAttempt','workflow:secrets:set','Params:\x20','createdAt','workflow:clone','Cancelled','LABEL_MIN_SPACING','workflow:sessions','executePushProject','Attempt\x20ID:\x20'];a42_0x4a1f=function(){return _0x3949d8;};return a42_0x4a1f();}export class WorkflowLogsCommand extends BaseCommand{[a42_0xc57567(0x331)]='workflow:logs';[a42_0xc57567(0x371)]=a42_0xc57567(0x2a8);async['execute'](_0x1e15d4){const _0x48220f=a42_0xc57567,{options:_0xac30ee,args:_0x37e05a,tdx:_0x20895c}=_0x1e15d4,_0x66eded=_0x37e05a[0x0];let _0x16eb36=_0x37e05a[0x1];if(!_0x66eded)return console[_0x48220f(0x343)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0xac30ee['verbose']&&(console['error']('Attempt\x20ID:\x20'+_0x66eded),_0x16eb36&&console['error'](_0x48220f(0x384)+_0x16eb36));const _0x456cac=await withSpinner(_0x48220f(0x2b8),()=>_0x20895c[_0x48220f(0x2da)]['logFiles'](_0x66eded,_0x16eb36),{'verbose':_0xac30ee[_0x48220f(0x250)]}),_0x5c60ed=_0x456cac[_0x48220f(0x201)];if(_0x5c60ed[_0x48220f(0x22b)]===0x0)return console[_0x48220f(0x343)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x16eb36&&(_0xac30ee[_0x48220f(0x1fc)]||_0xac30ee['format']))return await handleSDKOutput(_0x5c60ed,_0xac30ee),0x0;if(!_0x16eb36){const _0x467cbe=_0x5c60ed[_0x48220f(0x27a)](_0x30cc54=>({'title':_0x30cc54[_0x48220f(0x366)]+'\x20('+formatBytes(_0x30cc54[_0x48220f(0x27d)])+')','value':_0x30cc54[_0x48220f(0x366)]})),_0x244e89=await a42_0x4fae({'type':_0x48220f(0x2ff),'name':_0x48220f(0x30e),'message':_0x48220f(0x2bb),'choices':_0x467cbe});if(!_0x244e89[_0x48220f(0x30e)])return console[_0x48220f(0x343)](_0x48220f(0x2ae)),0x0;_0x16eb36=_0x244e89[_0x48220f(0x30e)];}const _0x163f68=await withSpinner(_0x48220f(0x29d),()=>_0x20895c[_0x48220f(0x2da)][_0x48220f(0x25e)](_0x66eded,_0x16eb36),{'verbose':_0xac30ee['verbose']}),_0x3b83f3=_0x163f68[_0x48220f(0x201)];return _0x3b83f3?console[_0x48220f(0x385)](_0x3b83f3):console[_0x48220f(0x343)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']='workflow:kill';[a42_0xc57567(0x371)]=a42_0xc57567(0x357);async[a42_0xc57567(0x2dc)](_0xaf5da4){const _0x1b0363=a42_0xc57567,{options:_0x2f6646,args:_0x53a455,tdx:_0x2c3155}=_0xaf5da4,_0x206dcf=_0x53a455[0x0];if(!_0x206dcf)return console[_0x1b0363(0x343)](_0x1b0363(0x392)),0x1;const _0x77c632=_0x2f6646[_0x1b0363(0x358)];_0x2f6646[_0x1b0363(0x250)]&&(console[_0x1b0363(0x343)](_0x1b0363(0x2b2)+_0x206dcf),_0x77c632&&console[_0x1b0363(0x343)]('Reason:\x20'+_0x77c632));if(!_0x2f6646['yes']){if(!isInteractive())return console[_0x1b0363(0x343)](a42_0x28d120[_0x1b0363(0x356)]('\x0aError:'),_0x1b0363(0x2e5)),console['error'](a42_0x28d120[_0x1b0363(0x307)](_0x1b0363(0x25d))),0x1;const _0xb1c46e=await confirmKey(_0x1b0363(0x2fc)+_0x206dcf+'?');if(!_0xb1c46e)return console[_0x1b0363(0x343)](a42_0x28d120[_0x1b0363(0x2a1)](_0x1b0363(0x2ae))),0x1;}const _0x27170e=await withSpinner(_0x1b0363(0x2f0),()=>_0x2c3155['workflow'][_0x1b0363(0x22e)](_0x206dcf,_0x77c632),{'verbose':_0x2f6646[_0x1b0363(0x250)]}),_0x61b350=_0x27170e[_0x1b0363(0x201)];return console[_0x1b0363(0x343)]('✔\x20'+_0x61b350),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x305);[a42_0xc57567(0x371)]=a42_0xc57567(0x364);async[a42_0xc57567(0x2dc)](_0x2ba04c){const _0x59bbd0=a42_0xc57567,{options:_0x5f36c2,args:_0x7c6935,tdx:_0x38c457}=_0x2ba04c,_0x48d247=_0x7c6935[0x0];if(!_0x48d247)return console[_0x59bbd0(0x343)](_0x59bbd0(0x27c)),console[_0x59bbd0(0x343)](_0x59bbd0(0x2fb)),0x1;let _0x477f6c=![],_0x57b842=_0x48d247;if(_0x48d247[_0x59bbd0(0x2db)](_0x59bbd0(0x30c)))_0x477f6c=!![],_0x57b842=_0x48d247['substring'](0x8);else{if(_0x48d247[_0x59bbd0(0x2db)](_0x59bbd0(0x29b)))_0x477f6c=![],_0x57b842=_0x48d247[_0x59bbd0(0x21b)](0x8);else return console[_0x59bbd0(0x343)](_0x59bbd0(0x2a7)),console[_0x59bbd0(0x343)](_0x59bbd0(0x2fb)),0x1;}const _0x2d2070=_0x5f36c2[_0x59bbd0(0x370)],_0x103d88=_0x5f36c2[_0x59bbd0(0x287)],_0x47dbcb=_0x5f36c2[_0x59bbd0(0x2f6)],_0x3ea512=_0x5f36c2['force'];_0x5f36c2[_0x59bbd0(0x250)]&&(console[_0x59bbd0(0x343)](_0x59bbd0(0x2d5)+(_0x477f6c?_0x59bbd0(0x317):_0x59bbd0(0x320))+'\x20'+_0x57b842),_0x2d2070&&console[_0x59bbd0(0x343)](_0x59bbd0(0x388)+_0x2d2070),_0x103d88&&console[_0x59bbd0(0x343)](_0x59bbd0(0x324)+_0x103d88),_0x47dbcb&&console[_0x59bbd0(0x343)](_0x59bbd0(0x2ab)+_0x47dbcb),_0x3ea512&&console['error']('Force:\x20yes'));let _0x505f8c;if(_0x47dbcb)try{if(_0x47dbcb[_0x59bbd0(0x2db)]('@')){const _0x4e778b=await import(_0x59bbd0(0x38b)),_0x3a4de3=_0x47dbcb['substring'](0x1),_0x4cbedb=await _0x4e778b[_0x59bbd0(0x213)](_0x3a4de3,_0x59bbd0(0x2b9));_0x505f8c=JSON[_0x59bbd0(0x212)](_0x4cbedb);}else _0x505f8c=JSON[_0x59bbd0(0x212)](_0x47dbcb);}catch{return console[_0x59bbd0(0x343)](_0x59bbd0(0x285)),0x1;}if(!_0x5f36c2[_0x59bbd0(0x253)]){if(!isInteractive())return console[_0x59bbd0(0x343)](a42_0x28d120[_0x59bbd0(0x356)](_0x59bbd0(0x39d)),_0x59bbd0(0x2e5)),console[_0x59bbd0(0x343)](a42_0x28d120[_0x59bbd0(0x307)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x32a5f5=await confirmKey(_0x59bbd0(0x237)+(_0x477f6c?_0x59bbd0(0x317):_0x59bbd0(0x320))+'\x20'+_0x57b842+'?');if(!_0x32a5f5)return console[_0x59bbd0(0x343)](a42_0x28d120[_0x59bbd0(0x2a1)](_0x59bbd0(0x2ae))),0x1;}let _0x23a80a;_0x477f6c?_0x23a80a=await withSpinner(_0x59bbd0(0x37d),()=>_0x38c457[_0x59bbd0(0x2da)][_0x59bbd0(0x20d)](_0x57b842,{'fromTask':_0x2d2070,'retryParams':_0x505f8c}),{'verbose':_0x5f36c2[_0x59bbd0(0x250)]}):_0x23a80a=await withSpinner('Retrying\x20attempt...',()=>_0x38c457[_0x59bbd0(0x2da)][_0x59bbd0(0x271)](_0x57b842,{'resumeFrom':_0x103d88,'retryParams':_0x505f8c,'force':_0x3ea512}),{'verbose':_0x5f36c2[_0x59bbd0(0x250)]});const _0x1a22df=_0x23a80a[_0x59bbd0(0x201)];return console['error'](_0x59bbd0(0x207)),console['error'](_0x59bbd0(0x25b)+_0x1a22df['attemptId']),console[_0x59bbd0(0x343)](_0x59bbd0(0x241)+_0x1a22df['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x355);[a42_0xc57567(0x371)]=a42_0xc57567(0x225);async[a42_0xc57567(0x2dc)](_0x4707e4){const _0x4eb7f3=a42_0xc57567,{options:_0x5db6cb,args:_0x2c1c3a,tdx:_0x2526b8}=_0x4707e4;let _0x3394a9=_0x2c1c3a[0x0];if(!_0x3394a9){const _0x2dceed=this[_0x4eb7f3(0x247)]([],_0x5db6cb),_0x4c97b7=await withSpinner('Loading\x20workflows...',()=>_0x2526b8[_0x4eb7f3(0x2da)][_0x4eb7f3(0x34d)](_0x2dceed,{'limit':_0x5db6cb[_0x4eb7f3(0x22d)]}),{'verbose':_0x5db6cb[_0x4eb7f3(0x250)]}),_0x4a1ed5=_0x4c97b7[_0x4eb7f3(0x201)];if(_0x4a1ed5['length']===0x0)return console[_0x4eb7f3(0x343)]('No\x20workflows\x20found'),!_0x2dceed&&console['error'](a42_0x28d120[_0x4eb7f3(0x307)](_0x4eb7f3(0x2e9))),0x1;const _0x110c40=_0x4a1ed5[_0x4eb7f3(0x27a)](_0x377a25=>({'title':_0x377a25['project']?.[_0x4eb7f3(0x331)]+'.'+_0x377a25[_0x4eb7f3(0x331)],'value':_0x377a25['project']?.[_0x4eb7f3(0x331)]+'.'+_0x377a25['name'],'description':_0x377a25[_0x4eb7f3(0x2ba)]?_0x4eb7f3(0x234)+_0x377a25[_0x4eb7f3(0x2ba)]:undefined})),_0x44209=await a42_0x4fae({'type':_0x4eb7f3(0x2ff),'name':'workflow','message':'Select\x20a\x20workflow\x20to\x20run','choices':_0x110c40});if(!_0x44209[_0x4eb7f3(0x2da)])return 0x1;_0x3394a9=_0x44209[_0x4eb7f3(0x2da)];}if(!_0x3394a9[_0x4eb7f3(0x26d)]('.')){const _0x1794b=this[_0x4eb7f3(0x247)]([],_0x5db6cb);if(_0x1794b)_0x3394a9=_0x1794b+'.'+_0x3394a9;else return console[_0x4eb7f3(0x343)](a42_0x28d120[_0x4eb7f3(0x356)]('Error:'),_0x4eb7f3(0x316)),console[_0x4eb7f3(0x343)](a42_0x28d120['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x92fd8a=_0x5db6cb[_0x4eb7f3(0x2bc)],_0x47b3c1=_0x5db6cb[_0x4eb7f3(0x24f)],_0x21e0af={};if(_0x92fd8a&&Array[_0x4eb7f3(0x276)](_0x92fd8a))for(const _0x20d3f0 of _0x92fd8a){const _0xb4bb54=_0x20d3f0[_0x4eb7f3(0x361)]('=');if(_0xb4bb54===-0x1)return console[_0x4eb7f3(0x343)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x20d3f0),console[_0x4eb7f3(0x343)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x29fc2d=_0x20d3f0[_0x4eb7f3(0x21b)](0x0,_0xb4bb54),_0xf2ada9=_0x20d3f0[_0x4eb7f3(0x21b)](_0xb4bb54+0x1);try{_0x21e0af[_0x29fc2d]=JSON['parse'](_0xf2ada9);}catch{_0x21e0af[_0x29fc2d]=_0xf2ada9;}}_0x5db6cb[_0x4eb7f3(0x250)]&&(console['error'](_0x4eb7f3(0x20e)+_0x3394a9),Object[_0x4eb7f3(0x377)](_0x21e0af)[_0x4eb7f3(0x22b)]>0x0&&console[_0x4eb7f3(0x343)](_0x4eb7f3(0x394)+JSON[_0x4eb7f3(0x1f4)](_0x21e0af)),_0x47b3c1&&console[_0x4eb7f3(0x343)](_0x4eb7f3(0x2a3)+_0x47b3c1));const _0xd6d334=await withSpinner('Starting\x20workflow\x20run...',()=>_0x2526b8[_0x4eb7f3(0x2da)][_0x4eb7f3(0x38a)](_0x3394a9,_0x21e0af,{'sessionTime':_0x47b3c1}),{'verbose':_0x5db6cb[_0x4eb7f3(0x250)]}),_0x104b1f=_0xd6d334[_0x4eb7f3(0x201)];console[_0x4eb7f3(0x343)]('✔\x20Workflow\x20run\x20started'),console[_0x4eb7f3(0x343)](_0x4eb7f3(0x26e)+_0x104b1f['id']),console[_0x4eb7f3(0x343)](_0x4eb7f3(0x241)+_0x104b1f[_0x4eb7f3(0x1f6)]),console[_0x4eb7f3(0x343)](_0x4eb7f3(0x2c2)+_0x104b1f[_0x4eb7f3(0x296)]?.[_0x4eb7f3(0x331)]),console[_0x4eb7f3(0x343)]('\x20\x20Workflow:\x20'+_0x104b1f[_0x4eb7f3(0x2da)]?.[_0x4eb7f3(0x331)]);if(_0x104b1f[_0x4eb7f3(0x296)]?.['id']&&_0x104b1f[_0x4eb7f3(0x1f6)]&&_0x104b1f['id']){const _0x772a3f=_0x5db6cb[_0x4eb7f3(0x31d)],_0x4ae94f=getConsoleUrl(_0x772a3f,'/app/workflows/'+_0x104b1f['project']['id']+_0x4eb7f3(0x284)+_0x104b1f['sessionId']+_0x4eb7f3(0x21a)+_0x104b1f['id']);console[_0x4eb7f3(0x343)](_0x4eb7f3(0x2c4)+a42_0x28d120[_0x4eb7f3(0x260)](_0x4ae94f));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a42_0xc57567(0x33c);['description']=a42_0xc57567(0x309);async[a42_0xc57567(0x2dc)](_0x37e8e8){const _0x50c4c9=a42_0xc57567,{options:_0x3dd296,args:_0x6373bf,tdx:_0x4d835a}=_0x37e8e8,_0x265ecb=_0x6373bf[0x0],_0xf55b3b=_0x6373bf[0x1]||'.';if(!_0x265ecb)return console[_0x50c4c9(0x343)](_0x50c4c9(0x255)),console[_0x50c4c9(0x343)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0xb4397b=_0x3dd296[_0x50c4c9(0x2ba)];_0x3dd296[_0x50c4c9(0x250)]&&(console['error'](_0x50c4c9(0x29f)+_0x265ecb),console[_0x50c4c9(0x343)](_0x50c4c9(0x354)+_0xf55b3b),_0xb4397b&&console[_0x50c4c9(0x343)](_0x50c4c9(0x381)+_0xb4397b));const _0x31ef7a=await withSpinner(_0x50c4c9(0x345)+_0x265ecb+_0x50c4c9(0x281),()=>_0x4d835a['workflow'][_0x50c4c9(0x252)](_0x265ecb,_0xf55b3b,{'revision':_0xb4397b}),{'verbose':_0x3dd296[_0x50c4c9(0x250)]}),_0x447e8b=_0x31ef7a[_0x50c4c9(0x201)];return console['error'](_0x50c4c9(0x376)+_0x447e8b[_0x50c4c9(0x2d3)]),console[_0x50c4c9(0x343)](_0x50c4c9(0x37f)+_0x447e8b[_0x50c4c9(0x2ba)]),console['error'](_0x50c4c9(0x26c)+_0x447e8b['filesExtracted']),console['error'](_0x50c4c9(0x2e2)+_0xf55b3b+'/'+_0x447e8b[_0x50c4c9(0x2d3)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x2bd);[a42_0xc57567(0x371)]=a42_0xc57567(0x2c9);async['execute'](_0x4d0f57){const _0x2e95a6=a42_0xc57567,{options:_0x33d5f3,args:_0x5a4862,tdx:_0x52fdbf}=_0x4d0f57;let _0x1aaada='.',_0x57682e=_0x33d5f3[_0x2e95a6(0x331)];if(_0x5a4862[0x0]){const {promises:_0x1ec962}=await import('fs');try{const _0x2fd465=await _0x1ec962[_0x2e95a6(0x239)](_0x5a4862[0x0]);if(_0x2fd465['isDirectory']())_0x1aaada=_0x5a4862[0x0];else return console[_0x2e95a6(0x343)](_0x2e95a6(0x36e)+_0x5a4862[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x57682e=_0x5a4862[0x0],_0x1aaada='.';}}const _0x238db1=_0x33d5f3[_0x2e95a6(0x2ba)],_0xed205c=_0x33d5f3[_0x2e95a6(0x395)];_0x33d5f3[_0x2e95a6(0x250)]&&(console[_0x2e95a6(0x343)](_0x2e95a6(0x31a)+_0x1aaada),_0x57682e&&console[_0x2e95a6(0x343)](_0x2e95a6(0x38c)+_0x57682e),_0x238db1&&console['error'](_0x2e95a6(0x381)+_0x238db1),_0xed205c&&console['error']('Validation:\x20skipped'));const _0x3a34dd=await withSpinner(_0x2e95a6(0x20c),()=>_0x52fdbf[_0x2e95a6(0x2da)]['push'](_0x1aaada,{'projectName':_0x57682e,'revision':_0x238db1,'skipValidation':_0xed205c}),{'verbose':_0x33d5f3[_0x2e95a6(0x250)]}),_0x47246e=_0x3a34dd[_0x2e95a6(0x201)];return console[_0x2e95a6(0x343)](_0x2e95a6(0x2cb)+_0x47246e[_0x2e95a6(0x2d3)]),console['error'](_0x2e95a6(0x375)+_0x47246e['projectId']),console[_0x2e95a6(0x343)](_0x2e95a6(0x37f)+_0x47246e['revision']),await this['showWorkflowConsoleUrl'](_0x52fdbf,_0x47246e['projectName'],_0x33d5f3[_0x2e95a6(0x31d)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x23d);[a42_0xc57567(0x371)]=a42_0xc57567(0x362);async[a42_0xc57567(0x2dc)](_0x21270f){const _0x566f77=a42_0xc57567,{options:_0x220fd5,args:_0x373230,tdx:_0x4246c9}=_0x21270f,_0x1296de=_0x373230[0x0],_0x580163=_0x373230[0x1];if(!_0x1296de)return console['error'](a42_0x28d120[_0x566f77(0x356)](_0x566f77(0x2c8)),'Project\x20name\x20is\x20required'),console['error'](a42_0x28d120[_0x566f77(0x307)](_0x566f77(0x37a))),0x1;const _0x4a93d9=_0x220fd5[_0x566f77(0x2ba)];_0x220fd5['verbose']&&(console[_0x566f77(0x343)](_0x566f77(0x29f)+_0x1296de),_0x580163&&console[_0x566f77(0x343)](_0x566f77(0x36c)+_0x580163),_0x4a93d9&&console[_0x566f77(0x343)](_0x566f77(0x381)+_0x4a93d9),_0x220fd5['dryRun']&&console['error'](_0x566f77(0x226)));const _0x180718=await withSpinner(_0x566f77(0x200)+_0x1296de+'...',()=>_0x4246c9[_0x566f77(0x2da)][_0x566f77(0x265)](_0x1296de,{'targetDir':_0x580163,'revision':_0x4a93d9}),{'verbose':_0x220fd5[_0x566f77(0x250)]}),_0x3e090c=_0x180718['data'];_0x3e090c[_0x566f77(0x36a)]?console[_0x566f77(0x343)](_0x566f77(0x399)+_0x3e090c[_0x566f77(0x2d3)]):console['error'](_0x566f77(0x251)+_0x3e090c['projectName']);console[_0x566f77(0x343)]('\x20\x20Revision:\x20'+_0x3e090c['revision']),console['error']('\x20\x20Target:\x20'+(a42_0x4c5f63['relative'](process[_0x566f77(0x216)](),_0x3e090c['targetDir'])||'.')),console[_0x566f77(0x343)](_0x566f77(0x319)+a42_0x28d120[_0x566f77(0x382)]('+'+_0x3e090c[_0x566f77(0x35f)][_0x566f77(0x39c)]+_0x566f77(0x2f2))+',\x20'+(a42_0x28d120['yellow']('~'+_0x3e090c[_0x566f77(0x35f)][_0x566f77(0x351)]+_0x566f77(0x38f))+',\x20')+(a42_0x28d120['red']('-'+_0x3e090c[_0x566f77(0x35f)][_0x566f77(0x278)]+_0x566f77(0x311))+',\x20')+(''+a42_0x28d120[_0x566f77(0x307)](_0x3e090c[_0x566f77(0x35f)][_0x566f77(0x2bf)]+_0x566f77(0x21f))));for(const _0x56875c of _0x3e090c[_0x566f77(0x29e)]){_0x56875c[_0x566f77(0x36d)]===_0x566f77(0x351)&&_0x56875c[_0x566f77(0x325)]&&(console[_0x566f77(0x343)]('\x0a'+a42_0x28d120['cyan'](_0x566f77(0x32e)+_0x56875c[_0x566f77(0x2f7)])),console['error'](_0x56875c[_0x566f77(0x325)]));}if(!_0x3e090c[_0x566f77(0x283)])return saveSessionContext({'workflow_project':_0x3e090c['projectName']},_0x220fd5[_0x566f77(0x317)]),console[_0x566f77(0x343)](a42_0x28d120[_0x566f77(0x382)]('\x0a✔\x20Already\x20up\x20to\x20date')),console['error'](a42_0x28d120[_0x566f77(0x307)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x3e090c[_0x566f77(0x2d3)])),0x0;if(_0x220fd5['dryRun'])return console[_0x566f77(0x343)](a42_0x28d120[_0x566f77(0x2a1)](_0x566f77(0x28f))),0x0;if(!_0x220fd5['yes']){if(!isInteractive())return console['error'](a42_0x28d120[_0x566f77(0x356)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x566f77(0x343)](a42_0x28d120[_0x566f77(0x307)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4c10c2=await confirmKey(_0x566f77(0x1f9));if(!_0x4c10c2)return console[_0x566f77(0x343)](a42_0x28d120[_0x566f77(0x2a1)](_0x566f77(0x2ae)),'-\x20no\x20files\x20written'),0x1;}await withSpinner(_0x566f77(0x32c),()=>_0x4246c9[_0x566f77(0x2da)][_0x566f77(0x33a)](_0x3e090c,{'revision':_0x4a93d9}),{'verbose':_0x220fd5[_0x566f77(0x250)]}),saveSessionContext({'workflow_project':_0x3e090c[_0x566f77(0x2d3)]},_0x220fd5[_0x566f77(0x317)]),console[_0x566f77(0x343)](a42_0x28d120[_0x566f77(0x382)](_0x566f77(0x219)));const _0x3548b2=a42_0x4c5f63['relative'](process[_0x566f77(0x216)](),_0x3e090c['targetDir'])||'.';return console[_0x566f77(0x343)](a42_0x28d120['dim'](_0x566f77(0x2e2)+_0x3548b2)),console['error'](a42_0x28d120[_0x566f77(0x307)](_0x566f77(0x333)+_0x3e090c[_0x566f77(0x2d3)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x229);[a42_0xc57567(0x371)]=a42_0xc57567(0x2d7);async[a42_0xc57567(0x2dc)](_0x557227){const _0x52f75b=a42_0xc57567,{options:_0x41dda1,args:_0x17c134,tdx:_0xf71735}=_0x557227,_0x15d9d6=this[_0x52f75b(0x2de)](_0x17c134,_0x41dda1),_0x16c6ab=_0x41dda1[_0x52f75b(0x2ba)],_0x16be2d=_0x41dda1[_0x52f75b(0x395)];_0x41dda1['verbose']&&(_0x15d9d6&&console['error'](_0x52f75b(0x342)+_0x15d9d6),_0x16c6ab&&console[_0x52f75b(0x343)](_0x52f75b(0x381)+_0x16c6ab),_0x41dda1['dryRun']&&console[_0x52f75b(0x343)](_0x52f75b(0x226)),_0x16be2d&&console[_0x52f75b(0x343)](_0x52f75b(0x359)));let _0x377757;try{_0x377757=await withSpinner(_0x52f75b(0x20b),()=>_0xf71735[_0x52f75b(0x2da)][_0x52f75b(0x2e0)]({'sourceDir':_0x15d9d6,'revision':_0x16c6ab,'skipValidation':_0x16be2d}),{'verbose':_0x41dda1[_0x52f75b(0x250)]});}catch(_0xa6523b){if(_0xa6523b instanceof Error&&_0xa6523b[_0x52f75b(0x295)][_0x52f75b(0x26d)]('No\x20workflow\x20tdx.json\x20found'))return console['error'](a42_0x28d120[_0x52f75b(0x356)](_0x52f75b(0x2c8)),_0x52f75b(0x202)),_0x41dda1[_0x52f75b(0x220)]?console['error'](a42_0x28d120['dim'](_0x52f75b(0x315)+_0x41dda1['workflowProject']+_0x52f75b(0x368)+_0x41dda1[_0x52f75b(0x220)]+'\x27')):console[_0x52f75b(0x343)](a42_0x28d120[_0x52f75b(0x307)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0xa6523b;}const _0x1b6b33=_0x377757['data'];console['error'](_0x52f75b(0x38e)+_0x1b6b33[_0x52f75b(0x2d3)]),console['error']('\x20\x20Source:\x20'+_0x1b6b33[_0x52f75b(0x293)]),console[_0x52f75b(0x343)](_0x52f75b(0x37f)+_0x1b6b33['revision']),console[_0x52f75b(0x343)](_0x52f75b(0x319)+a42_0x28d120[_0x52f75b(0x382)]('+'+_0x1b6b33['summary'][_0x52f75b(0x39c)]+'\x20new')+',\x20'+(a42_0x28d120[_0x52f75b(0x2a1)]('~'+_0x1b6b33[_0x52f75b(0x35f)][_0x52f75b(0x351)]+_0x52f75b(0x38f))+',\x20')+(a42_0x28d120[_0x52f75b(0x356)]('-'+_0x1b6b33[_0x52f75b(0x35f)][_0x52f75b(0x278)]+'\x20deleted')+',\x20')+(''+a42_0x28d120[_0x52f75b(0x307)](_0x1b6b33[_0x52f75b(0x35f)][_0x52f75b(0x2bf)]+_0x52f75b(0x21f))));for(const _0x3d6e29 of _0x1b6b33[_0x52f75b(0x29e)]){_0x3d6e29[_0x52f75b(0x36d)]==='modified'&&_0x3d6e29[_0x52f75b(0x325)]&&(console[_0x52f75b(0x343)]('\x0a'+a42_0x28d120[_0x52f75b(0x260)](_0x52f75b(0x32e)+_0x3d6e29[_0x52f75b(0x2f7)])),console[_0x52f75b(0x343)](_0x3d6e29[_0x52f75b(0x325)]));}if(!_0x1b6b33[_0x52f75b(0x283)])return console[_0x52f75b(0x343)](a42_0x28d120[_0x52f75b(0x382)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x52f75b(0x2be)](_0xf71735,_0x1b6b33['projectName'],_0x41dda1[_0x52f75b(0x31d)]),0x0;if(_0x41dda1[_0x52f75b(0x30a)])return console[_0x52f75b(0x343)](a42_0x28d120['yellow'](_0x52f75b(0x2b3))),0x0;if(!_0x41dda1['yes']){if(!isInteractive())return console[_0x52f75b(0x343)](a42_0x28d120['red'](_0x52f75b(0x39d)),_0x52f75b(0x2e5)),console['error'](a42_0x28d120[_0x52f75b(0x307)](_0x52f75b(0x25d))),0x1;const _0x126e3c=await confirmKey(_0x52f75b(0x2e7));if(!_0x126e3c)return console[_0x52f75b(0x343)](a42_0x28d120['yellow']('Cancelled'),_0x52f75b(0x363)),0x1;}const _0x1e57a9=await withSpinner(_0x52f75b(0x249),()=>_0xf71735[_0x52f75b(0x2da)][_0x52f75b(0x2b1)](_0x1b6b33),{'verbose':_0x41dda1[_0x52f75b(0x250)]}),_0x36f75a=_0x1e57a9[_0x52f75b(0x201)];return console['error'](a42_0x28d120[_0x52f75b(0x382)](_0x52f75b(0x266))),console[_0x52f75b(0x343)](_0x52f75b(0x375)+_0x36f75a['projectId']),console[_0x52f75b(0x343)]('\x20\x20Revision:\x20'+_0x36f75a[_0x52f75b(0x2ba)]),await this[_0x52f75b(0x2be)](_0xf71735,_0x36f75a[_0x52f75b(0x2d3)],_0x41dda1[_0x52f75b(0x31d)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x2ad);[a42_0xc57567(0x371)]=a42_0xc57567(0x321);async[a42_0xc57567(0x2dc)](_0x5d0f9a){const _0x271c7c=a42_0xc57567,{options:_0x1a8b27,args:_0x19b312,tdx:_0x518d49}=_0x5d0f9a,_0x31b8af=this[_0x271c7c(0x2de)](_0x19b312,_0x1a8b27),_0x2e0dbd=_0x1a8b27['name'],_0x340bfa=_0x1a8b27['revision'],_0x1d2e89=_0x1a8b27[_0x271c7c(0x395)];if(!_0x31b8af)return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x356)](_0x271c7c(0x2c8)),'Source\x20directory\x20is\x20required'),console['error'](a42_0x28d120[_0x271c7c(0x307)](_0x271c7c(0x22a))),console['error'](a42_0x28d120[_0x271c7c(0x307)](_0x271c7c(0x274))),0x1;if(!_0x2e0dbd)return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x356)]('Error:'),_0x271c7c(0x2b7)),console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x307)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x1a8b27['verbose']&&(console['error'](_0x271c7c(0x342)+_0x31b8af),console[_0x271c7c(0x343)](_0x271c7c(0x318)+_0x2e0dbd),_0x340bfa&&console['error'](_0x271c7c(0x381)+_0x340bfa),_0x1a8b27[_0x271c7c(0x30a)]&&console[_0x271c7c(0x343)]('Dry\x20run:\x20yes'),_0x1d2e89&&console[_0x271c7c(0x343)](_0x271c7c(0x359)));const _0x3527fe=await withSpinner('Analyzing\x20project...',()=>_0x518d49[_0x271c7c(0x2da)][_0x271c7c(0x313)](_0x31b8af,_0x2e0dbd,{'revision':_0x340bfa,'skipValidation':_0x1d2e89}),{'verbose':_0x1a8b27[_0x271c7c(0x250)]}),_0x5688e7=_0x3527fe[_0x271c7c(0x201)];console[_0x271c7c(0x343)](_0x271c7c(0x329)+_0x5688e7[_0x271c7c(0x293)]);_0x5688e7['sourceProjectName']&&console[_0x271c7c(0x343)]('Source\x20project:\x20'+_0x5688e7[_0x271c7c(0x1fb)]);console['error'](_0x271c7c(0x318)+_0x5688e7[_0x271c7c(0x31b)]),console['error'](_0x271c7c(0x381)+_0x5688e7[_0x271c7c(0x2ba)]),console['error'](_0x271c7c(0x304)+_0x5688e7[_0x271c7c(0x24e)]);_0x5688e7[_0x271c7c(0x2d8)]&&(console['error'](a42_0x28d120['yellow'](_0x271c7c(0x374)+_0x5688e7[_0x271c7c(0x31b)]+_0x271c7c(0x20f)+_0x5688e7[_0x271c7c(0x328)]+')')),console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x2a1)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x1a8b27['dryRun'])return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x2a1)](_0x271c7c(0x236))),0x0;if(!_0x1a8b27[_0x271c7c(0x253)]){if(!isInteractive())return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x356)](_0x271c7c(0x39d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x307)](_0x271c7c(0x25d))),0x1;const _0x3e69e3=_0x5688e7[_0x271c7c(0x1fb)]||a42_0x4c5f63[_0x271c7c(0x21d)](_0x31b8af),_0x1c2011=_0x5688e7[_0x271c7c(0x2d8)]?_0x271c7c(0x2f9)+_0x2e0dbd+_0x271c7c(0x330):_0x271c7c(0x2cf)+_0x3e69e3+_0x271c7c(0x380)+_0x2e0dbd+'\x22?',_0x5ac55f=await confirmKey(_0x1c2011);if(!_0x5ac55f)return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x2a1)](_0x271c7c(0x2ae))),0x1;}const _0x1173f2=await withSpinner(_0x5688e7[_0x271c7c(0x2d8)]?_0x271c7c(0x235)+_0x2e0dbd+_0x271c7c(0x281):_0x271c7c(0x336)+_0x2e0dbd+'...',()=>_0x518d49[_0x271c7c(0x2da)][_0x271c7c(0x391)](_0x5688e7),{'verbose':_0x1a8b27[_0x271c7c(0x250)]}),_0x43cc71=_0x1173f2[_0x271c7c(0x201)];return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x382)](_0x5688e7['targetExists']?'✔\x20Project\x20updated':_0x271c7c(0x2eb))),console[_0x271c7c(0x343)](_0x271c7c(0x2c2)+_0x43cc71[_0x271c7c(0x31b)]),console[_0x271c7c(0x343)]('\x20\x20Project\x20ID:\x20'+_0x43cc71[_0x271c7c(0x206)]),console[_0x271c7c(0x343)](_0x271c7c(0x37f)+_0x43cc71[_0x271c7c(0x2ba)]),await this[_0x271c7c(0x2be)](_0x518d49,_0x43cc71[_0x271c7c(0x31b)],_0x1a8b27[_0x271c7c(0x31d)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0xc57567(0x331)]='workflow:delete';[a42_0xc57567(0x371)]=a42_0xc57567(0x282);async[a42_0xc57567(0x2dc)](_0x11c68f){const _0x2b112c=a42_0xc57567,{options:_0x2b9d04,args:_0x1833c6,tdx:_0x38c1fe}=_0x11c68f,_0x506b54=_0x1833c6[0x0];if(!_0x506b54)return console[_0x2b112c(0x343)](_0x2b112c(0x396)),console[_0x2b112c(0x343)](_0x2b112c(0x2c7)),0x1;_0x2b9d04['verbose']&&console[_0x2b112c(0x343)](_0x2b112c(0x29f)+_0x506b54);if(!_0x2b9d04[_0x2b112c(0x253)]){if(!isInteractive())return console['error'](a42_0x28d120[_0x2b112c(0x356)](_0x2b112c(0x39d)),_0x2b112c(0x2e5)),console[_0x2b112c(0x343)](a42_0x28d120[_0x2b112c(0x307)](_0x2b112c(0x25d))),0x1;const _0x54c57a=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x506b54+_0x2b112c(0x2f3));if(!_0x54c57a)return console[_0x2b112c(0x343)](a42_0x28d120['yellow']('Cancelled')),0x1;}const _0x47a07f=await withSpinner(_0x2b112c(0x346)+_0x506b54+'...',()=>_0x38c1fe[_0x2b112c(0x2da)][_0x2b112c(0x39b)](_0x506b54),{'verbose':_0x2b9d04[_0x2b112c(0x250)]}),_0x5ee97a=_0x47a07f[_0x2b112c(0x201)];return console[_0x2b112c(0x343)](_0x2b112c(0x312)+_0x5ee97a[_0x2b112c(0x2d3)]),console[_0x2b112c(0x343)](_0x2b112c(0x375)+_0x5ee97a[_0x2b112c(0x2ca)]),0x0;}}export function parseKeyValue(_0x377d82){const _0x37821e=a42_0xc57567,_0x1a5964=_0x377d82[_0x37821e(0x361)]('=');if(_0x1a5964===-0x1)throw new Error(_0x37821e(0x2fa)+_0x377d82+_0x37821e(0x25f));const _0x56f770=_0x377d82[_0x37821e(0x21b)](0x0,_0x1a5964),_0x4f8ec6=_0x377d82[_0x37821e(0x21b)](_0x1a5964+0x1);if(!_0x56f770)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x56f770,'value':_0x4f8ec6};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x30d);[a42_0xc57567(0x371)]=a42_0xc57567(0x262);async['execute'](_0x3e539a){const _0x3d296c=a42_0xc57567,{options:_0x35af96,args:_0x4270b7,tdx:_0x1a48da}=_0x3e539a,_0x504e14=this[_0x3d296c(0x2e6)](_0x4270b7,_0x35af96);if(!_0x504e14)return 0x1;_0x35af96[_0x3d296c(0x250)]&&console[_0x3d296c(0x343)](_0x3d296c(0x29f)+_0x504e14);const _0x3b38fe=await withSpinner(_0x3d296c(0x2a4),()=>_0x1a48da[_0x3d296c(0x2da)][_0x3d296c(0x2a5)](_0x504e14),{'verbose':_0x35af96[_0x3d296c(0x250)]}),{secrets:_0x7f6a75}=_0x3b38fe[_0x3d296c(0x201)];return console[_0x3d296c(0x343)](_0x3d296c(0x36f)+_0x7f6a75[_0x3d296c(0x22b)]+_0x3d296c(0x34f)+(_0x7f6a75['length']!==0x1?'s':'')),await handleSDKOutput(_0x7f6a75,_0x35af96),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a42_0xc57567(0x2aa);[a42_0xc57567(0x371)]='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async[a42_0xc57567(0x2dc)](_0x4a9fe8){const _0x5eec8d=a42_0xc57567,{options:_0x570e32,args:_0x408a4f,tdx:_0x4a9234}=_0x4a9fe8;let _0x42f162,_0x402d28;if(_0x408a4f['length']>=0x2)_0x42f162=_0x408a4f[0x0],_0x402d28=_0x408a4f[0x1];else{if(_0x408a4f['length']===0x1&&_0x570e32[_0x5eec8d(0x220)])_0x42f162=_0x570e32[_0x5eec8d(0x220)],_0x402d28=_0x408a4f[0x0];else return _0x408a4f[_0x5eec8d(0x22b)]===0x1?(console[_0x5eec8d(0x343)](_0x5eec8d(0x255)),console[_0x5eec8d(0x343)](_0x5eec8d(0x2e9)),0x1):(console[_0x5eec8d(0x343)](_0x5eec8d(0x222)),console[_0x5eec8d(0x343)](_0x5eec8d(0x227)),0x1);}let _0x2f1ff8,_0x32c267;try{({key:_0x2f1ff8,value:_0x32c267}=parseKeyValue(_0x402d28));}catch(_0x2cd053){return _0x2cd053 instanceof Error&&console[_0x5eec8d(0x343)](a42_0x28d120[_0x5eec8d(0x356)](_0x5eec8d(0x2c8)),_0x2cd053[_0x5eec8d(0x295)]),0x1;}_0x570e32[_0x5eec8d(0x250)]&&(console['error'](_0x5eec8d(0x29f)+_0x42f162),console[_0x5eec8d(0x343)](_0x5eec8d(0x267)+_0x2f1ff8));const _0x3fd258=await withSpinner(_0x5eec8d(0x31f),()=>_0x4a9234[_0x5eec8d(0x2da)]['setSecret'](_0x42f162,_0x2f1ff8,_0x32c267),{'verbose':_0x570e32['verbose']}),_0x11c0da=_0x3fd258[_0x5eec8d(0x201)];return console[_0x5eec8d(0x343)]('✔\x20Secret\x20\x27'+_0x11c0da['key']+_0x5eec8d(0x248)+_0x11c0da[_0x5eec8d(0x2d3)]+'\x27'),(_0x570e32[_0x5eec8d(0x1fc)]||_0x570e32[_0x5eec8d(0x39a)])&&await handleSingleObjectOutput(_0x11c0da,_0x570e32),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x299);['description']=a42_0xc57567(0x390);async[a42_0xc57567(0x2dc)](_0x40395c){const _0x306b5a=a42_0xc57567,{options:_0x1b130e,args:_0x475cd9,tdx:_0x47be3e}=_0x40395c;let _0x563da8,_0x5339f8;if(_0x475cd9['length']>=0x2)_0x563da8=_0x475cd9[0x0],_0x5339f8=_0x475cd9[0x1];else{if(_0x475cd9[_0x306b5a(0x22b)]===0x1&&_0x1b130e[_0x306b5a(0x220)])_0x563da8=_0x1b130e[_0x306b5a(0x220)],_0x5339f8=_0x475cd9[0x0];else return _0x475cd9[_0x306b5a(0x22b)]===0x1?(console[_0x306b5a(0x343)](_0x306b5a(0x255)),console[_0x306b5a(0x343)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x306b5a(0x343)]('Error:\x20Secret\x20key\x20is\x20required'),console[_0x306b5a(0x343)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x1b130e[_0x306b5a(0x250)]&&(console[_0x306b5a(0x343)]('Project:\x20'+_0x563da8),console['error'](_0x306b5a(0x267)+_0x5339f8));if(!_0x1b130e[_0x306b5a(0x253)]){if(!isInteractive())return console[_0x306b5a(0x343)](a42_0x28d120[_0x306b5a(0x356)](_0x306b5a(0x39d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x306b5a(0x343)](a42_0x28d120[_0x306b5a(0x307)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1690c4=await confirmKey(_0x306b5a(0x240)+_0x5339f8+'\x27\x20from\x20project\x20\x27'+_0x563da8+'\x27?');if(!_0x1690c4)return console[_0x306b5a(0x343)](a42_0x28d120[_0x306b5a(0x2a1)](_0x306b5a(0x2ae))),0x1;}const _0x2a9460=await withSpinner('Deleting\x20secret...',()=>_0x47be3e['workflow'][_0x306b5a(0x24a)](_0x563da8,_0x5339f8),{'verbose':_0x1b130e[_0x306b5a(0x250)]}),_0x427642=_0x2a9460[_0x306b5a(0x201)];return console['error']('✔\x20Secret\x20\x27'+_0x427642['key']+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x427642[_0x306b5a(0x2d3)]+'\x27'),(_0x1b130e[_0x306b5a(0x1fc)]||_0x1b130e[_0x306b5a(0x39a)])&&await handleSingleObjectOutput(_0x427642,_0x1b130e),0x0;}}const TIMELINE_CONFIG={'TASK_NAME_WIDTH':0x28,'ICON_WIDTH':0x2,'ICON_SPACING':0x1,'GUTTER':0x5,'MIN_TIMELINE_WIDTH':0x28,'MAX_TIMELINE_WIDTH':0x50,'LABEL_MIN_SPACING':0x2,'POLL_INTERVAL_MS':0x7d0,'MAX_POLL_TIME_MS':0x36ee80,'MAX_POLL_ITERATIONS':0x708,'MAX_TASKS_DISPLAY':0x64,'MIN_LABEL_COUNT':0x3,'MAX_LABEL_COUNT':0x6,'LABEL_WIDTH_DIVISOR':0xf};function formatElapsed(_0x293cf2){const _0x19c598=a42_0xc57567,_0x7adb8f=Math[_0x19c598(0x347)](_0x293cf2/0x3e8),_0x36d3db=Math['floor'](_0x7adb8f/0x3c),_0x1860d7=Math[_0x19c598(0x347)](_0x36d3db/0x3c),_0x30d076=Math[_0x19c598(0x347)](_0x1860d7/0x18);if(_0x30d076>0x0){const _0x1dbb59=_0x1860d7%0x18;return _0x1dbb59>0x0?_0x30d076+'d\x20'+_0x1dbb59+'h':_0x30d076+'d';}else{if(_0x1860d7>0x0){const _0x3f162a=_0x36d3db%0x3c;return _0x3f162a>0x0?_0x1860d7+'h\x20'+_0x3f162a+'m':_0x1860d7+'h';}else{if(_0x36d3db>0x0){const _0x427c4a=_0x7adb8f%0x3c;return _0x427c4a>0x0?_0x36d3db+'m\x20'+_0x427c4a+'s':_0x36d3db+'m';}else return _0x7adb8f+'s';}}}function a42_0x15e8(_0x32b26b,_0x38622b){_0x32b26b=_0x32b26b-0x1f4;const _0x4a1f13=a42_0x4a1f();let _0x15e8b6=_0x4a1f13[_0x32b26b];return _0x15e8b6;}function formatTimestamp(_0x17ee6b,_0x569a25){const _0x329e13=a42_0xc57567,_0x5c2e48=new Date(_0x17ee6b),_0x11f13b=String(_0x5c2e48[_0x329e13(0x33b)]())[_0x329e13(0x230)](0x2,'0'),_0x1f108b=String(_0x5c2e48[_0x329e13(0x337)]())[_0x329e13(0x230)](0x2,'0'),_0x49aa17=_0x11f13b+':'+_0x1f108b,_0x45178a=_0x5c2e48[_0x329e13(0x2d6)]()===_0x569a25[_0x329e13(0x2d6)]()&&_0x5c2e48['getMonth']()===_0x569a25[_0x329e13(0x29c)]()&&_0x5c2e48['getDate']()===_0x569a25['getDate']();if(_0x45178a)return _0x49aa17;else{const _0x2d3984=String(_0x5c2e48[_0x329e13(0x29c)]()+0x1)[_0x329e13(0x230)](0x2,'0'),_0x5c15f4=String(_0x5c2e48[_0x329e13(0x277)]())[_0x329e13(0x230)](0x2,'0');return _0x2d3984+'-'+_0x5c15f4+'\x20'+_0x49aa17;}}function formatDate(_0x3ffce4){const _0x12272e=a42_0xc57567,_0x3e7f73=_0x3ffce4['getFullYear'](),_0xb418cc=String(_0x3ffce4[_0x12272e(0x29c)]()+0x1)[_0x12272e(0x230)](0x2,'0'),_0x51876a=String(_0x3ffce4['getDate']())[_0x12272e(0x230)](0x2,'0');return _0x3e7f73+'-'+_0xb418cc+'-'+_0x51876a;}function getTaskStateIcon(_0x4c7064){const _0x5e9046={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x5e9046[_0x4c7064]||'⚪';}function getBarChar(_0x43bdeb){const _0x1af28a=a42_0xc57567;return _0x43bdeb===_0x1af28a(0x343)||_0x43bdeb===_0x1af28a(0x302)?'×':'─';}function getBarColor(_0x53ced5){const _0x322bf7=a42_0xc57567,_0xa1fd30={'success':a42_0x28d120[_0x322bf7(0x382)],'error':a42_0x28d120[_0x322bf7(0x356)],'group_error':a42_0x28d120[_0x322bf7(0x356)],'running':a42_0x28d120[_0x322bf7(0x1fd)],'blocked':a42_0x28d120['yellow'],'planned':a42_0x28d120[_0x322bf7(0x307)],'canceling':a42_0x28d120[_0x322bf7(0x2a1)]};return _0xa1fd30[_0x53ced5]||a42_0x28d120[_0x322bf7(0x341)];}function parseTaskName(_0x4aff2e){const _0x37ae8e=a42_0xc57567;let _0x406dfa=_0x4aff2e[_0x37ae8e(0x2fe)](/^\++/,'');const _0x5532b4=_0x406dfa[_0x37ae8e(0x294)]('+'),_0x4b5790=_0x5532b4[_0x37ae8e(0x22b)]>0x1?_0x5532b4['length']-0x2:0x0,_0x10d53b=_0x5532b4[_0x5532b4[_0x37ae8e(0x22b)]-0x1]||_0x406dfa;return{'level':_0x4b5790,'name':'+'+_0x10d53b};}function truncateTaskName(_0xbda6bb,_0x22cf0a){const _0x795a5e=a42_0xc57567,_0x48a0d4=stringWidth(_0xbda6bb);if(_0x48a0d4<=_0x22cf0a)return _0xbda6bb;let _0x1c5e81=_0xbda6bb;while(stringWidth(_0x1c5e81+'…')>_0x22cf0a&&_0x1c5e81[_0x795a5e(0x22b)]>0x0){_0x1c5e81=_0x1c5e81[_0x795a5e(0x273)](0x0,-0x1);}return _0x1c5e81+'…';}function calculateTimeScale(_0x2600fe,_0x378896){const _0x212a0c=a42_0xc57567;return{'startTime':_0x2600fe[_0x212a0c(0x37e)],'endTime':_0x2600fe['end'],'durationMs':_0x2600fe['duration'],'msPerChar':_0x2600fe[_0x212a0c(0x2f8)]/_0x378896};}function timeToPosition(_0x577238,_0x2ae3b9,_0x4a83b7){const _0x496ded=a42_0xc57567,_0x14d22d=_0x577238-_0x2ae3b9[_0x496ded(0x205)],_0x17d278=Math['floor'](_0x14d22d/_0x2ae3b9[_0x496ded(0x1fa)]);return Math[_0x496ded(0x30f)](0x0,Math['min'](_0x17d278,_0x4a83b7));}function renderTimeAxis(_0x423a88,_0x4a84ec){const _0x1fd693=a42_0xc57567,_0x3e6f41=Math[_0x1fd693(0x232)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x1fd693(0x30f)](TIMELINE_CONFIG[_0x1fd693(0x37b)],Math[_0x1fd693(0x347)](_0x4a84ec/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x2563cf=_0x423a88['durationMs']/(_0x3e6f41-0x1),_0x2a5bfb=new Date(_0x423a88[_0x1fd693(0x205)]),_0x46fa26=[];for(let _0x42a5a0=0x0;_0x42a5a0<_0x3e6f41;_0x42a5a0++){const _0x1745c9=_0x423a88[_0x1fd693(0x205)]+_0x42a5a0*_0x2563cf,_0x3fcd92=timeToPosition(_0x1745c9,_0x423a88,_0x4a84ec),_0x47777c=formatTimestamp(_0x1745c9,_0x2a5bfb);_0x46fa26[_0x1fd693(0x2c5)]({'pos':_0x3fcd92,'text':_0x47777c});}const _0x253554=new Array(_0x4a84ec)[_0x1fd693(0x261)]('\x20');let _0x5ca6ca=-0x1;for(const {pos:_0x2078f4,text:_0x553c9d}of _0x46fa26){let _0x32ee7e=Math['max'](0x0,_0x2078f4-Math['floor'](_0x553c9d[_0x1fd693(0x22b)]/0x2));_0x32ee7e<=_0x5ca6ca+TIMELINE_CONFIG[_0x1fd693(0x2af)]&&(_0x32ee7e=_0x5ca6ca+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x32ee7e+_0x553c9d[_0x1fd693(0x22b)]>_0x4a84ec&&(_0x32ee7e=_0x4a84ec-_0x553c9d[_0x1fd693(0x22b)]);if(_0x32ee7e>=0x0&&_0x32ee7e+_0x553c9d[_0x1fd693(0x22b)]<=_0x4a84ec&&_0x32ee7e>_0x5ca6ca){for(let _0xa2b5d4=0x0;_0xa2b5d4<_0x553c9d['length'];_0xa2b5d4++){_0x253554[_0x32ee7e+_0xa2b5d4]=_0x553c9d[_0xa2b5d4];}_0x5ca6ca=_0x32ee7e+_0x553c9d['length']-0x1;}}return _0x253554[_0x1fd693(0x238)]('');}function renderTaskRow(_0x201b52,_0x5277eb,_0x5385e2,_0x496ffa){const _0x2f6592=a42_0xc57567,{level:_0x34d3c4,name:_0x41336a}=parseTaskName(_0x201b52[_0x2f6592(0x331)]),_0x5da872='\x20'['repeat'](_0x34d3c4),_0x11236d=_0x201b52[_0x2f6592(0x215)]?'('+formatElapsed(_0x201b52[_0x2f6592(0x215)][_0x2f6592(0x2f8)])+')':'',_0x3e2bae=stringWidth(_0x11236d),_0x4a9ba1=_0x34d3c4*0x1,_0x400b6d=_0x496ffa-_0x4a9ba1-_0x3e2bae-0x1,_0x3b9fb1=truncateTaskName(_0x41336a,_0x400b6d),_0x3ce738=_0x5da872+_0x3b9fb1,_0x5582e1=stringWidth(_0x3ce738),_0x2bb3bf=_0x496ffa-_0x5582e1-_0x3e2bae,_0x37edfe=_0x3ce738+'\x20'[_0x2f6592(0x335)](Math[_0x2f6592(0x30f)](0x1,_0x2bb3bf))+a42_0x28d120[_0x2f6592(0x307)](_0x11236d),_0x510856=getTaskStateIcon(_0x201b52['state']),_0x58e869=new Array(_0x5385e2)['fill']('\x20');if(_0x201b52['window']){const _0xb92581=timeToPosition(_0x201b52[_0x2f6592(0x215)]['start'],_0x5277eb,_0x5385e2),_0x3dd670=timeToPosition(_0x201b52[_0x2f6592(0x215)][_0x2f6592(0x34b)],_0x5277eb,_0x5385e2),_0x27b16f=getBarChar(_0x201b52[_0x2f6592(0x21c)]),_0x1c3cb5=Math[_0x2f6592(0x30f)](_0xb92581+0x1,_0x3dd670);for(let _0x1c0e0a=_0xb92581;_0x1c0e0a<Math[_0x2f6592(0x232)](_0x1c3cb5,_0x5385e2);_0x1c0e0a++){_0x58e869[_0x1c0e0a]=_0x27b16f;}}const _0x305132=getBarColor(_0x201b52[_0x2f6592(0x21c)]),_0x215f13=_0x58e869[_0x2f6592(0x27a)](_0x1e244a=>_0x1e244a==='\x20'?'\x20':_0x305132(_0x1e244a))[_0x2f6592(0x238)]('');return _0x510856+'\x20'+_0x37edfe+'│'+_0x215f13+'│';}function calculateStats(_0x34b0f2){const _0x54ecf3=a42_0xc57567,_0x62fe07={'total':_0x34b0f2[_0x54ecf3(0x22b)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0xdc6723 of _0x34b0f2){if(_0xdc6723[_0x54ecf3(0x21c)]===_0x54ecf3(0x32b))_0x62fe07[_0x54ecf3(0x32b)]++;else{if(_0xdc6723[_0x54ecf3(0x21c)]===_0x54ecf3(0x343)||_0xdc6723[_0x54ecf3(0x21c)]==='group_error')_0x62fe07[_0x54ecf3(0x343)]++;else _0xdc6723[_0x54ecf3(0x21c)]===_0x54ecf3(0x272)?_0x62fe07[_0x54ecf3(0x272)]++:_0x62fe07[_0x54ecf3(0x29a)]++;}}return _0x62fe07;}function formatStats(_0x330136){const _0x263d6d=a42_0xc57567;return[_0x263d6d(0x344)+_0x330136['total'],'✅\x20'+_0x330136[_0x263d6d(0x32b)],'❌\x20'+_0x330136[_0x263d6d(0x343)],_0x263d6d(0x245)+_0x330136['running'],'⏳\x20'+_0x330136['pending']]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']='workflow:timeline';[a42_0xc57567(0x371)]=a42_0xc57567(0x214);async[a42_0xc57567(0x2dc)](_0x3e88d7){const _0x509f8d=a42_0xc57567,{options:_0x141796,args:_0x8f2c0e,tdx:_0x21e2f4}=_0x3e88d7;let _0x554ddf,_0x13767c,_0x4acf7c=![];if(_0x8f2c0e[0x0]){if(_0x8f2c0e[0x0]['includes']('.')){const _0x56162a=this[_0x509f8d(0x323)](_0x8f2c0e,_0x141796);if(!_0x56162a)return 0x1;_0x554ddf=_0x56162a['projectName'],_0x13767c=_0x56162a[_0x509f8d(0x31e)];}else{_0x13767c=_0x8f2c0e[0x0],_0x554ddf=_0x141796[_0x509f8d(0x220)];if(!_0x554ddf)return console['error'](a42_0x28d120[_0x509f8d(0x356)](_0x509f8d(0x2c8)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x4acf7c=!![];}}else{const _0x2c8be5=this[_0x509f8d(0x323)](_0x8f2c0e,_0x141796);if(!_0x2c8be5)return 0x1;_0x554ddf=_0x2c8be5[_0x509f8d(0x2d3)],_0x13767c=_0x2c8be5[_0x509f8d(0x31e)];}if(_0x141796[_0x509f8d(0x250)]){if(_0x554ddf&&_0x13767c)console['error'](_0x509f8d(0x2ef)+_0x554ddf+'.'+_0x13767c);else _0x554ddf&&console['error']('Filter:\x20project='+_0x554ddf);}const _0x528864=_0x141796[_0x509f8d(0x270)],_0x2c1180=_0x141796[_0x509f8d(0x1f6)];if(_0x528864){_0x2c1180&&console['error'](a42_0x28d120[_0x509f8d(0x2a1)]('Warning:'),_0x509f8d(0x2e1));const _0x4501ca=_0x141796[_0x509f8d(0x242)];return _0x4501ca?await this['pollTimeline'](_0x3e88d7,_0x528864):await this[_0x509f8d(0x2b5)](_0x3e88d7,_0x528864,_0x141796),0x0;}if(_0x2c1180){const _0xedc3ca=await withSpinner('Loading\x20session...',()=>_0x21e2f4[_0x509f8d(0x2da)]['sessions']({'projectName':_0x554ddf,'workflowName':_0x13767c,'limit':0x64}),{'verbose':_0x141796[_0x509f8d(0x250)]}),_0x397413=_0xedc3ca[_0x509f8d(0x201)]['find'](_0x518a33=>_0x518a33['id']===_0x2c1180);if(!_0x397413)return console['error'](a42_0x28d120['red'](_0x509f8d(0x2c8)),_0x509f8d(0x327)+_0x2c1180),0x1;if(!_0x397413['lastAttempt']?.['id'])return console['error'](a42_0x28d120[_0x509f8d(0x356)](_0x509f8d(0x2c8)),_0x509f8d(0x27f)+_0x2c1180+'\x20has\x20no\x20attempts'),0x1;const _0x4617a5=_0x397413['lastAttempt']['id'];_0x141796[_0x509f8d(0x250)]&&console[_0x509f8d(0x343)](_0x509f8d(0x256)+_0x4617a5+_0x509f8d(0x1f8)+_0x2c1180);const _0x303242=_0x141796[_0x509f8d(0x242)];return _0x303242?await this['pollTimeline'](_0x3e88d7,_0x4617a5):await this[_0x509f8d(0x2b5)](_0x3e88d7,_0x4617a5,_0x141796),0x0;}const _0x3a1777=await withSpinner(_0x509f8d(0x259),()=>_0x21e2f4[_0x509f8d(0x2da)][_0x509f8d(0x2d4)]({'projectName':_0x554ddf,'workflowName':_0x13767c,'limit':_0x141796[_0x509f8d(0x22d)]||0x32}),{'verbose':_0x141796[_0x509f8d(0x250)]}),_0x51456d=_0x3a1777[_0x509f8d(0x201)];if(_0x51456d[_0x509f8d(0x22b)]===0x0){if(_0x554ddf&&_0x13767c)console['error'](_0x509f8d(0x269)+_0x554ddf+'.'+_0x13767c);else _0x554ddf?console[_0x509f8d(0x343)](_0x509f8d(0x32a)+_0x554ddf):(console[_0x509f8d(0x343)](_0x509f8d(0x2f5)),console[_0x509f8d(0x343)](a42_0x28d120['dim'](_0x509f8d(0x38d))));return 0x0;}_0x51456d['sort']((_0x4b3906,_0x592228)=>{const _0x4ab3ba=_0x509f8d,_0x1b934e=_0x4b3906['sessionTime']||'',_0x10c28c=_0x592228[_0x4ab3ba(0x24f)]||'';return _0x10c28c[_0x4ab3ba(0x2f1)](_0x1b934e);});if(_0x141796['json']||_0x141796[_0x509f8d(0x39a)])return await handleSDKOutput(_0x51456d,_0x141796),0x0;let _0x3d1e49;if(_0x4acf7c){const _0x10ff7d=_0x51456d[0x0];if(!_0x10ff7d[_0x509f8d(0x2a9)]?.['id'])return console[_0x509f8d(0x343)](_0x509f8d(0x378)),0x0;_0x3d1e49=_0x10ff7d[_0x509f8d(0x2a9)]['id'],_0x141796[_0x509f8d(0x250)]&&console[_0x509f8d(0x343)](_0x509f8d(0x25c)+_0x10ff7d[_0x509f8d(0x24f)]);}else{const _0x449043=_0x51456d[_0x509f8d(0x27a)](_0xf32003=>{const _0x414d71=_0x509f8d,_0xb893af=getAttemptStatusDisplay(_0xf32003[_0x414d71(0x2a9)]);return{'title':_0xf32003[_0x414d71(0x296)]?.[_0x414d71(0x331)]+'.'+_0xf32003[_0x414d71(0x2da)]?.[_0x414d71(0x331)]+_0x414d71(0x379)+_0xf32003[_0x414d71(0x24f)]+'\x20'+_0xb893af[_0x414d71(0x24c)],'value':_0xf32003[_0x414d71(0x2a9)]?.['id']||'','description':_0xb893af[_0x414d71(0x1f5)]};}),_0x345a7b=await a42_0x4fae({'type':_0x509f8d(0x2ff),'name':_0x509f8d(0x270),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x449043[_0x509f8d(0x36b)](_0x4a446e=>_0x4a446e['value']!=='')});if(!_0x345a7b['attemptId'])return 0x0;_0x3d1e49=_0x345a7b[_0x509f8d(0x270)];}const _0x8e5725=_0x141796[_0x509f8d(0x242)];return _0x8e5725?await this[_0x509f8d(0x2cd)](_0x3e88d7,_0x3d1e49):await this['renderSingleTimeline'](_0x3e88d7,_0x3d1e49,_0x141796),0x0;}async[a42_0xc57567(0x2b5)](_0x3660e9,_0x49d0c,_0xcb2d63){const _0x31ab6a=a42_0xc57567,{tdx:_0x401bf7}=_0x3660e9;let _0x112719,_0x473061;try{[_0x112719,_0x473061]=await Promise[_0x31ab6a(0x308)]([_0x401bf7[_0x31ab6a(0x2da)]['attempt'](_0x49d0c),_0x401bf7[_0x31ab6a(0x2da)][_0x31ab6a(0x332)](_0x49d0c,![])]);}catch(_0x5ddd77){console['error'](a42_0x28d120[_0x31ab6a(0x356)](_0x31ab6a(0x2a2)));_0xcb2d63[_0x31ab6a(0x250)]&&console[_0x31ab6a(0x343)](_0x5ddd77);throw _0x5ddd77;}if(_0xcb2d63[_0x31ab6a(0x1fc)]||_0xcb2d63[_0x31ab6a(0x39a)]){const _0xd45372=this['buildTimelineData'](_0x112719,_0x473061);await handleSDKOutput([_0xd45372],_0xcb2d63);return;}const _0x564efd=_0x401bf7[_0x31ab6a(0x2cc)][_0x31ab6a(0x31d)],_0x135820=this['renderTimeline'](_0x112719,_0x473061,_0x564efd);console['log'](_0x135820);}async['pollTimeline'](_0x3283c0,_0x174071){const _0x3b1f65=a42_0xc57567,{tdx:_0x244cf4}=_0x3283c0,_0x4e68ad=TIMELINE_CONFIG[_0x3b1f65(0x2f4)],_0x4a4c86=TIMELINE_CONFIG[_0x3b1f65(0x223)];let _0x174704=0x0;while(_0x174704<_0x4a4c86){process['stdout'][_0x3b1f65(0x24d)]&&process[_0x3b1f65(0x297)][_0x3b1f65(0x268)]('\x1bc');let _0x1ee991,_0x36cf6e;try{[_0x1ee991,_0x36cf6e]=await Promise[_0x3b1f65(0x308)]([_0x244cf4[_0x3b1f65(0x2da)][_0x3b1f65(0x320)](_0x174071),_0x244cf4['workflow'][_0x3b1f65(0x332)](_0x174071,![])]);}catch(_0x3b1bb0){console['error'](a42_0x28d120[_0x3b1f65(0x356)](_0x3b1f65(0x30b)));_0x174704>0x0&&console[_0x3b1f65(0x343)](a42_0x28d120['dim'](_0x3b1f65(0x35e)+_0x174704));throw _0x3b1bb0;}const _0x38e3bd=_0x244cf4[_0x3b1f65(0x2cc)]['site'],_0x4cfd73=this[_0x3b1f65(0x263)](_0x1ee991,_0x36cf6e,_0x38e3bd);console[_0x3b1f65(0x385)](_0x4cfd73);const _0x1bfa96=_0x1ee991[_0x3b1f65(0x21e)]&&_0x36cf6e['every'](_0xa9b058=>_0xa9b058[_0x3b1f65(0x21c)]!==_0x3b1f65(0x272)&&_0xa9b058[_0x3b1f65(0x21c)]!==_0x3b1f65(0x26f));if(_0x1bfa96){console[_0x3b1f65(0x343)](a42_0x28d120[_0x3b1f65(0x382)](_0x3b1f65(0x33f)));break;}console[_0x3b1f65(0x343)](a42_0x28d120['dim'](_0x3b1f65(0x2b6)+_0x174704*0x2+_0x3b1f65(0x26a))),await new Promise(_0x401853=>setTimeout(_0x401853,_0x4e68ad)),_0x174704++;}_0x174704>=_0x4a4c86&&console['error'](a42_0x28d120[_0x3b1f65(0x2a1)](_0x3b1f65(0x367)));}['renderTimeline'](_0x5e3b8f,_0x413423,_0x89d09f){const _0x2f4df7=a42_0xc57567,_0x118eae=[],_0x3b01aa=TIMELINE_CONFIG[_0x2f4df7(0x2d0)],_0x7333b6=0x5,_0xe394f0=process[_0x2f4df7(0x297)][_0x2f4df7(0x350)]||0x78,_0x486a08=_0xe394f0-_0x3b01aa-_0x7333b6,_0x66b25d=Math[_0x2f4df7(0x30f)](TIMELINE_CONFIG[_0x2f4df7(0x365)],Math[_0x2f4df7(0x232)](_0x486a08,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x162c1e=new Date(_0x5e3b8f[_0x2f4df7(0x2ac)])[_0x2f4df7(0x2e8)](),_0x16e11e=_0x5e3b8f[_0x2f4df7(0x23f)]?new Date(_0x5e3b8f[_0x2f4df7(0x23f)])['getTime']():Date[_0x2f4df7(0x2c1)](),_0x410ed9={'start':_0x162c1e,'end':_0x16e11e,'duration':_0x16e11e-_0x162c1e},_0x4e67cc=new Map(),_0x1f06f3=[];for(const _0x485045 of _0x413423){if(_0x485045[_0x2f4df7(0x28e)]){const _0x3a2869=new Date(_0x485045[_0x2f4df7(0x28e)])['getTime'](),_0xc1eedd=_0x485045['updatedAt']?new Date(_0x485045[_0x2f4df7(0x34c)])[_0x2f4df7(0x2e8)]():Date[_0x2f4df7(0x2c1)](),_0x190fcc={'start':_0x3a2869,'end':_0xc1eedd,'duration':_0xc1eedd-_0x3a2869};_0x4e67cc[_0x2f4df7(0x25a)](_0x485045['id'],_0x190fcc),_0x1f06f3[_0x2f4df7(0x2c5)]({'name':_0x485045[_0x2f4df7(0x369)],'state':_0x485045[_0x2f4df7(0x21c)]||'unknown','window':_0x190fcc});}else _0x1f06f3['push']({'name':_0x485045[_0x2f4df7(0x369)],'state':_0x485045[_0x2f4df7(0x21c)]||_0x2f4df7(0x26f),'window':undefined});}_0x1f06f3[_0x2f4df7(0x208)]((_0x46241a,_0x5972f6)=>{const _0x565dd7=_0x2f4df7;if(!_0x46241a[_0x565dd7(0x215)])return 0x1;if(!_0x5972f6['window'])return-0x1;return _0x46241a[_0x565dd7(0x215)][_0x565dd7(0x37e)]-_0x5972f6['window'][_0x565dd7(0x37e)];});const _0x13bc23=_0x1f06f3[_0x2f4df7(0x22b)],_0x2b7fb5=_0x13bc23>TIMELINE_CONFIG[_0x2f4df7(0x210)];_0x2b7fb5&&_0x1f06f3[_0x2f4df7(0x340)](TIMELINE_CONFIG[_0x2f4df7(0x210)]);const _0x55da35=calculateTimeScale(_0x410ed9,_0x66b25d),_0x3c8994=_0x5e3b8f[_0x2f4df7(0x21e)]?_0x5e3b8f[_0x2f4df7(0x32b)]?a42_0x28d120[_0x2f4df7(0x382)](_0x2f4df7(0x32b)):a42_0x28d120['red'](_0x2f4df7(0x343)):a42_0x28d120['blue'](_0x2f4df7(0x272)),_0x36c250=_0x5e3b8f['project']?.['id'],_0x2c338a=_0x5e3b8f[_0x2f4df7(0x1f6)];let _0x3e46b3;if(_0x36c250&&_0x2c338a){const _0x2e408e=getWorkflowAttemptUrl(_0x89d09f,_0x36c250,_0x2c338a,_0x5e3b8f['id']);_0x3e46b3=hyperlink(a42_0x28d120[_0x2f4df7(0x307)](_0x5e3b8f['id']),_0x2e408e);}else _0x3e46b3=a42_0x28d120[_0x2f4df7(0x307)](_0x5e3b8f['id']);_0x118eae[_0x2f4df7(0x2c5)](_0x2f4df7(0x204)+_0x3e46b3+'\x20-\x20'+_0x3c8994+_0x2f4df7(0x379)+formatElapsed(_0x410ed9[_0x2f4df7(0x2f8)]));if(_0x1f06f3['length']>0x0){const _0x2be27f=renderTimeAxis(_0x55da35,_0x66b25d),_0x4eb712=new Date(_0x410ed9[_0x2f4df7(0x37e)]),_0x21f8c2=formatDate(_0x4eb712),_0x2f0bdd=TIMELINE_CONFIG[_0x2f4df7(0x360)]+TIMELINE_CONFIG[_0x2f4df7(0x27e)]+_0x3b01aa,_0x1da3dc=_0x21f8c2['padStart'](_0x2f0bdd),_0x2a79f6=a42_0x28d120[_0x2f4df7(0x307)](_0x1da3dc);_0x118eae[_0x2f4df7(0x2c5)](_0x2a79f6+'\x20'+_0x2be27f);for(const _0x4bdc58 of _0x1f06f3){_0x118eae['push'](renderTaskRow(_0x4bdc58,_0x55da35,_0x66b25d,_0x3b01aa));}const _0x49c635=calculateStats(_0x1f06f3);_0x118eae[_0x2f4df7(0x2c5)](formatStats(_0x49c635)),_0x2b7fb5&&_0x118eae['push'](a42_0x28d120[_0x2f4df7(0x2a1)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0x2f4df7(0x210)]+'\x20of\x20'+_0x13bc23+'\x20tasks')),_0x118eae[_0x2f4df7(0x2c5)](''),_0x118eae[_0x2f4df7(0x2c5)](a42_0x28d120[_0x2f4df7(0x307)](_0x2f4df7(0x20a))+('tdx\x20wf\x20attempt\x20'+_0x5e3b8f['id']+_0x2f4df7(0x31c))+a42_0x28d120['dim'](_0x2f4df7(0x326)));}else _0x118eae[_0x2f4df7(0x2c5)](_0x2f4df7(0x264));return _0x118eae[_0x2f4df7(0x238)]('\x0a');}[a42_0xc57567(0x203)](_0x55ef5b,_0x2e4833){const _0x52b31d=a42_0xc57567,_0x5e5654=new Date(_0x55ef5b[_0x52b31d(0x2ac)])[_0x52b31d(0x2e8)](),_0x1fcc3d=_0x55ef5b[_0x52b31d(0x23f)]?new Date(_0x55ef5b[_0x52b31d(0x23f)])[_0x52b31d(0x2e8)]():Date[_0x52b31d(0x2c1)](),_0x641b80=_0x1fcc3d-_0x5e5654,_0x449c8d=[];for(const _0x1e97e2 of _0x2e4833){if(_0x1e97e2[_0x52b31d(0x28e)]){const _0x3f1e73=new Date(_0x1e97e2['startedAt'])[_0x52b31d(0x2e8)](),_0xcddebc=_0x1e97e2[_0x52b31d(0x34c)]?new Date(_0x1e97e2[_0x52b31d(0x34c)])[_0x52b31d(0x2e8)]():Date[_0x52b31d(0x2c1)]();_0x449c8d[_0x52b31d(0x2c5)]({'name':_0x1e97e2[_0x52b31d(0x369)],'state':_0x1e97e2['state']||_0x52b31d(0x231),'window':{'start':_0x3f1e73,'end':_0xcddebc,'duration':_0xcddebc-_0x3f1e73}});}else _0x449c8d[_0x52b31d(0x2c5)]({'name':_0x1e97e2[_0x52b31d(0x369)],'state':_0x1e97e2[_0x52b31d(0x21c)]||_0x52b31d(0x26f),'window':undefined});}const _0x4d2437=calculateStats(_0x449c8d);return{'attempt':{'id':_0x55ef5b['id'],'status':_0x55ef5b['done']?_0x55ef5b[_0x52b31d(0x32b)]?_0x52b31d(0x32b):_0x52b31d(0x343):_0x52b31d(0x272),'createdAt':_0x55ef5b[_0x52b31d(0x2ac)],'finishedAt':_0x55ef5b[_0x52b31d(0x23f)],'duration_ms':_0x641b80},'tasks':_0x449c8d[_0x52b31d(0x27a)](_0x1fa5ab=>({'name':_0x1fa5ab[_0x52b31d(0x331)],'state':_0x1fa5ab[_0x52b31d(0x21c)],'startedAt':_0x1fa5ab[_0x52b31d(0x215)]?new Date(_0x1fa5ab[_0x52b31d(0x215)]['start'])[_0x52b31d(0x28c)]():null,'updatedAt':_0x1fa5ab[_0x52b31d(0x215)]?new Date(_0x1fa5ab[_0x52b31d(0x215)][_0x52b31d(0x34b)])[_0x52b31d(0x28c)]():null,'duration_ms':_0x1fa5ab[_0x52b31d(0x215)]?.[_0x52b31d(0x2f8)]||null})),'stats':_0x4d2437};}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- function a43_0xbbb7(){const _0xe32a1a=['version','11201582uEpvhl','2893995SzToEl','9878832qfgXYy','7227uLMpbJ','3681TLnATw','259868pcnEno','tdx','replace','8940024dlspaH','35340ytJkkJ','entries','3556WzaoDY','Authorization','10HDlxRJ'];a43_0xbbb7=function(){return _0xe32a1a;};return a43_0xbbb7();}(function(_0x504492,_0xda1bfa){const _0x5d8283=a43_0x8ead,_0x309636=_0x504492();while(!![]){try{const _0x272f6a=-parseInt(_0x5d8283(0xea))/0x1*(parseInt(_0x5d8283(0xe2))/0x2)+parseInt(_0x5d8283(0xe1))/0x3*(parseInt(_0x5d8283(0xe8))/0x4)+-parseInt(_0x5d8283(0xed))/0x5+-parseInt(_0x5d8283(0xe5))/0x6+parseInt(_0x5d8283(0xec))/0x7+-parseInt(_0x5d8283(0xee))/0x8+parseInt(_0x5d8283(0xe0))/0x9*(parseInt(_0x5d8283(0xe6))/0xa);if(_0x272f6a===_0xda1bfa)break;else _0x309636['push'](_0x309636['shift']());}catch(_0x1075be){_0x309636['push'](_0x309636['shift']());}}}(a43_0xbbb7,0xe208a));import{platform}from'os';import{getAPIKey}from'./config.js';function a43_0x8ead(_0x7bfec2,_0xa0ec89){_0x7bfec2=_0x7bfec2-0xe0;const _0xbbb7df=a43_0xbbb7();let _0x8eada4=_0xbbb7df[_0x7bfec2];return _0x8eada4;}import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x5eb400=a43_0x8ead,_0x26775f=getVersion(),_0x15e867=platform(),_0x17dcf3=process[_0x5eb400(0xeb)][_0x5eb400(0xe4)]('v','');return'tdx/'+_0x26775f+'\x20('+_0x15e867+';\x20node/'+_0x17dcf3+')';}export function getAuthHeaders(_0x20f4c7,_0x4e0dde){const _0x4a99b2=a43_0x8ead,_0x1f18bd=getVersion(),_0x5cc194={'User-Agent':getUserAgent(),'X-TD-Client':_0x4a99b2(0xe3),'X-TD-Client-Version':_0x1f18bd};return _0x4e0dde&&(_0x5cc194['Authorization']='TD1\x20'+_0x4e0dde),_0x5cc194;}export function toHeaderRecord(_0x1f3d07){const _0x1d3d8e=a43_0x8ead,_0x31e22b={};for(const [_0x4154cd,_0x86b6b3]of Object[_0x1d3d8e(0xe7)](_0x1f3d07)){_0x86b6b3!==undefined&&(_0x31e22b[_0x4154cd]=_0x86b6b3);}return _0x31e22b;}export function getTrinoHeaders(_0x53379a,_0x4a77ad){const _0x2a7a45=a43_0x8ead,_0x3eff81=getAuthHeaders(_0x53379a,_0x4a77ad),_0x4d56fa=toHeaderRecord(_0x3eff81);return delete _0x4d56fa[_0x2a7a45(0xe9)],_0x4a77ad&&(_0x4d56fa['X-Trino-User']=_0x4a77ad),_0x4d56fa;}export function hasAPIKey(_0x3364e9){const _0x3633c5=getAPIKey();return _0x3633c5!==undefined&&_0x3633c5['length']>0x0;}
1
+ function a43_0x1e61(_0x590877,_0x59f26a){_0x590877=_0x590877-0x160;const _0x44b142=a43_0x44b1();let _0x1e61b0=_0x44b142[_0x590877];return _0x1e61b0;}(function(_0x460718,_0x469b3c){const _0x11e9c0=a43_0x1e61,_0x3af544=_0x460718();while(!![]){try{const _0x16ee1f=-parseInt(_0x11e9c0(0x164))/0x1+-parseInt(_0x11e9c0(0x172))/0x2*(parseInt(_0x11e9c0(0x16f))/0x3)+parseInt(_0x11e9c0(0x167))/0x4*(-parseInt(_0x11e9c0(0x168))/0x5)+-parseInt(_0x11e9c0(0x163))/0x6+parseInt(_0x11e9c0(0x160))/0x7+parseInt(_0x11e9c0(0x165))/0x8*(-parseInt(_0x11e9c0(0x16e))/0x9)+parseInt(_0x11e9c0(0x16d))/0xa;if(_0x16ee1f===_0x469b3c)break;else _0x3af544['push'](_0x3af544['shift']());}catch(_0x4ce7b8){_0x3af544['push'](_0x3af544['shift']());}}}(a43_0x44b1,0x408a4));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x1b6a0d=a43_0x1e61,_0x130966=getVersion(),_0x34d256=platform(),_0x1af5f2=process[_0x1b6a0d(0x162)][_0x1b6a0d(0x16c)]('v','');return _0x1b6a0d(0x169)+_0x130966+'\x20('+_0x34d256+_0x1b6a0d(0x16a)+_0x1af5f2+')';}export function getAuthHeaders(_0x500645,_0x53af4c){const _0x4b590f=a43_0x1e61,_0x3575e7=getVersion(),_0x2800ad={'User-Agent':getUserAgent(),'X-TD-Client':_0x4b590f(0x161),'X-TD-Client-Version':_0x3575e7};return _0x53af4c&&(_0x2800ad['Authorization']=_0x4b590f(0x170)+_0x53af4c),_0x2800ad;}export function toHeaderRecord(_0x3a81c8){const _0x10cb4e=a43_0x1e61,_0x99d48a={};for(const [_0x3241cb,_0x7d0f0c]of Object[_0x10cb4e(0x166)](_0x3a81c8)){_0x7d0f0c!==undefined&&(_0x99d48a[_0x3241cb]=_0x7d0f0c);}return _0x99d48a;}function a43_0x44b1(){const _0x2b51b9=['3030210IuPloj','194459QMZhaz','88MqnpoW','entries','601736XJSdIG','10nNKzLg','tdx/',';\x20node/','Authorization','replace','16757160qHIspi','191502HvYETw','715461HJFcph','TD1\x20','X-Trino-User','2WVKhIE','430829ttcnKO','tdx','version'];a43_0x44b1=function(){return _0x2b51b9;};return a43_0x44b1();}export function getTrinoHeaders(_0x371ea0,_0xeef7c5){const _0x27222f=a43_0x1e61,_0x33e9ca=getAuthHeaders(_0x371ea0,_0xeef7c5),_0x40c3e2=toHeaderRecord(_0x33e9ca);return delete _0x40c3e2[_0x27222f(0x16b)],_0xeef7c5&&(_0x40c3e2[_0x27222f(0x171)]=_0xeef7c5),_0x40c3e2;}export function hasAPIKey(_0x4955f6){const _0x3fb07e=getAPIKey();return _0x3fb07e!==undefined&&_0x3fb07e['length']>0x0;}
@@ -1 +1 @@
1
- (function(_0xaf0cb0,_0x5b206a){const _0x5349de=a44_0x2e9c,_0x47961e=_0xaf0cb0();while(!![]){try{const _0x276e65=parseInt(_0x5349de(0x1de))/0x1*(-parseInt(_0x5349de(0x1e7))/0x2)+parseInt(_0x5349de(0x1d5))/0x3+-parseInt(_0x5349de(0x1c4))/0x4+-parseInt(_0x5349de(0x1b4))/0x5+-parseInt(_0x5349de(0x1f9))/0x6+-parseInt(_0x5349de(0x1e9))/0x7*(-parseInt(_0x5349de(0x1f7))/0x8)+parseInt(_0x5349de(0x1cf))/0x9;if(_0x276e65===_0x5b206a)break;else _0x47961e['push'](_0x47961e['shift']());}catch(_0x3a17b7){_0x47961e['push'](_0x47961e['shift']());}}}(a44_0x2307,0x8539e));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x453f75 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x5f4da9){const _0x45b353=a44_0x2e9c;return _0x5f4da9['format']===_0x45b353(0x1bb)||_0x5f4da9[_0x45b353(0x1d9)]===_0x45b353(0x1d7)||_0x5f4da9[_0x45b353(0x1d9)]===_0x45b353(0x1ea)||_0x5f4da9[_0x45b353(0x1d9)]==='table'||_0x5f4da9[_0x45b353(0x1bb)]===!![]||_0x5f4da9[_0x45b353(0x1d7)]===!![]||_0x5f4da9[_0x45b353(0x1ea)]===!![]||_0x5f4da9['table']===!![];}export function parseOutputOptions(_0x3c6f2a){const _0x44c3a2=a44_0x2e9c;return{'format':_0x3c6f2a[_0x44c3a2(0x1d9)]||_0x44c3a2(0x1b9),'output':_0x3c6f2a[_0x44c3a2(0x1f2)]||'','limit':_0x3c6f2a['limit'],'color':_0x3c6f2a[_0x44c3a2(0x1d1)],'noColor':_0x3c6f2a[_0x44c3a2(0x1f1)]};}function convertSDKResultToQueryResult(_0x725a67){const _0x43cc07=a44_0x2e9c,_0x3d75ab=[];if(_0x725a67[_0x43cc07(0x1e3)]>0x0){const _0x262840=_0x725a67[0x0];for(const [_0x1db1d0,_0x418a14]of Object[_0x43cc07(0x1e5)](_0x262840)){let _0x626ed0=_0x43cc07(0x1d2);if(typeof _0x418a14===_0x43cc07(0x1cb))_0x626ed0=Number[_0x43cc07(0x1b6)](_0x418a14)?_0x43cc07(0x1e0):_0x43cc07(0x1b8);else{if(typeof _0x418a14===_0x43cc07(0x1c1))_0x626ed0=_0x43cc07(0x1c1);else _0x418a14===null&&(_0x626ed0=_0x43cc07(0x1d2));}_0x3d75ab[_0x43cc07(0x1ce)]({'name':_0x1db1d0,'type':_0x626ed0});}}return{'queryId':_0x43cc07(0x1bc),'columns':_0x3d75ab,'data':_0x725a67,'stats':{'state':_0x43cc07(0x1ee),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x725a67[_0x43cc07(0x1e3)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}function a44_0x2e9c(_0x24cba1,_0x220588){_0x24cba1=_0x24cba1-0x1b2;const _0x230746=a44_0x2307();let _0x2e9c80=_0x230746[_0x24cba1];return _0x2e9c80;}export async function formatSDKOutput(_0x29ca7,_0x57a8f4){const _0xe9cd8a=convertSDKResultToQueryResult(_0x29ca7);return formatQueryOutput(_0xe9cd8a,_0x57a8f4);}export async function formatQueryOutput(_0x55d0dc,_0x177af9){const _0x46158f=a44_0x2e9c,{format:_0x505d23,limit:_0x52ea52,output:_0x2a6196,color:_0x436c4a,noColor:_0x2a4ddb}=_0x177af9,_0x5b8505=Boolean(_0x2a6196)&&!_0x436c4a,_0x2ccf1={'color':_0x436c4a,'noColor':_0x2a4ddb||_0x5b8505};if(_0x505d23==='table'){const _0x4ae484=shouldUseLess(_0x505d23,_0x2a6196);return formatAsTable(_0x55d0dc,_0x52ea52,_0x4ae484,_0x2ccf1);}else{if(_0x505d23===_0x46158f(0x1bb))return formatAsJSON(_0x55d0dc,_0x2ccf1);else return _0x505d23==='jsonl'?formatAsJSONL(_0x55d0dc,_0x2ccf1):formatQueryResult(_0x55d0dc,_0x505d23);}}function shouldUseLess(_0x24ad6c,_0x38b844){const _0xd709d=a44_0x2e9c;return(_0x24ad6c===_0xd709d(0x1b9)||_0x24ad6c==='list')&&process[_0xd709d(0x1e1)][_0xd709d(0x1d0)]&&!_0x38b844;}export function resolveOutputOptions(_0x5d2aa3){const _0x59e764=a44_0x2e9c,_0x1cf8e6=resolveOutputFormat(_0x5d2aa3[_0x59e764(0x1d9)],_0x5d2aa3[_0x59e764(0x1f2)],'table');let _0x322aa9=typeof _0x5d2aa3[_0x59e764(0x1b3)]===_0x59e764(0x1cb)?_0x5d2aa3['limit']:parseInt(_0x5d2aa3['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x1a133b=_0x5d2aa3[_0x59e764(0x1f2)]||'';return shouldUseLess(_0x1cf8e6,_0x1a133b)&&(_0x322aa9=Infinity),{'format':_0x1cf8e6,'output':_0x1a133b,'limit':_0x322aa9,'color':_0x5d2aa3['color'],'noColor':_0x5d2aa3['noColor']};}export function writeOutput(_0x3ef015,_0x4950ea,_0x15e561){const _0x1de718=a44_0x2e9c;return _0x4950ea?(writeFileSync(_0x4950ea,_0x3ef015),console[_0x1de718(0x1c8)](_0x1de718(0x1c2)+_0x4950ea),Promise[_0x1de718(0x1d3)]()):shouldUseLess(_0x15e561||'','')?new Promise(_0x499043=>{const _0x33a661=_0x1de718,_0x72c834=spawn('less',[_0x33a661(0x1c7)],{'stdio':[_0x33a661(0x1c6),_0x33a661(0x1db),_0x33a661(0x1db)]});let _0x4ea315=![];_0x72c834['on']('error',()=>{const _0x3419fd=_0x33a661;!_0x4ea315&&(_0x4ea315=!![],console[_0x3419fd(0x1b5)](_0x3ef015),_0x499043());}),_0x72c834['on'](_0x33a661(0x1ec),()=>{!_0x4ea315&&(_0x4ea315=!![],_0x499043());}),_0x72c834['on'](_0x33a661(0x1f3),()=>{const _0x30d399=_0x33a661;!_0x4ea315&&_0x72c834[_0x30d399(0x1e8)]&&(_0x72c834[_0x30d399(0x1e8)]['on'](_0x30d399(0x1c8),()=>{}),_0x72c834['stdin'][_0x30d399(0x1be)](_0x3ef015),_0x72c834['stdin'][_0x30d399(0x1bf)]());}),!_0x72c834[_0x33a661(0x1e8)]&&(!_0x4ea315&&(_0x4ea315=!![],console['log'](_0x3ef015),_0x499043()));}):(console[_0x1de718(0x1b5)](_0x3ef015),Promise[_0x1de718(0x1d3)]());}export async function handleSDKOutput(_0x4a6515,_0x5be94){const _0x427ae9=a44_0x2e9c,_0x1d4a83=resolveOutputOptions(_0x5be94),_0x57ce79=await formatSDKOutput(_0x4a6515,_0x1d4a83);await writeOutput(_0x57ce79,_0x1d4a83[_0x427ae9(0x1f2)]||undefined,_0x1d4a83[_0x427ae9(0x1d9)]);}export async function handleQueryOutput(_0x88ba79,_0x428718){const _0x1c629d=a44_0x2e9c,_0x4205e1=resolveOutputOptions(_0x428718),_0x3af374=await formatQueryOutput(_0x88ba79,_0x4205e1);await writeOutput(_0x3af374,_0x4205e1[_0x1c629d(0x1f2)]||undefined,_0x4205e1[_0x1c629d(0x1d9)]);}async function formatSingleObject(_0x4f1224,_0x58fcb1){const _0x19e265=a44_0x2e9c,{format:_0x3c60ea,color:_0xfe52ff,noColor:_0x5dedd6}=_0x58fcb1,_0x458580={'color':_0xfe52ff,'noColor':_0x5dedd6};if(_0x3c60ea===_0x19e265(0x1bb)){if(shouldUseColor(_0x458580))return colorizeJSON(_0x4f1224,_0x458580);return JSON['stringify'](_0x4f1224,null,0x2);}else{if(_0x3c60ea==='jsonl'){if(shouldUseColor(_0x458580))return colorizeJSONCompact(_0x4f1224,_0x458580);return JSON['stringify'](_0x4f1224);}else{if(_0x3c60ea===_0x19e265(0x1ea))return Object[_0x19e265(0x1e5)](_0x4f1224)['map'](([_0x4f6501,_0x214a28])=>_0x4f6501+'\x09'+_0x214a28)['join']('\x0a');else{const _0x3f5639=Object['entries'](_0x4f1224);if(_0x3f5639[_0x19e265(0x1e3)]===0x0)return _0x19e265(0x1ba);const _0x1ef85d=_0x4f1224[_0x19e265(0x1e4)],_0xe18e6c=_0x4f1224[_0x19e265(0x1d8)],_0x1ec86a=_0x4f1224[_0x19e265(0x1df)],_0x120634=_0x4f1224[_0x19e265(0x1b2)],_0xe25b86=_0xe18e6c?typeof _0xe18e6c===_0x19e265(0x1f0)?_0xe18e6c:JSON[_0x19e265(0x1bd)](_0xe18e6c,null,0x2):undefined,_0x3c98d2=_0x1ec86a&&Object['keys'](_0x1ec86a)[_0x19e265(0x1e3)]>0x0?JSON[_0x19e265(0x1bd)](_0x1ec86a,null,0x2):undefined,_0x2d0c39=_0x120634&&Object[_0x19e265(0x1d4)](_0x120634)[_0x19e265(0x1e3)]>0x0?JSON['stringify'](_0x120634,null,0x2):undefined,_0x897e73=_0x3f5639[_0x19e265(0x1f4)](([_0x1f6dab])=>_0x1f6dab!==_0x19e265(0x1e4)&&_0x1f6dab!==_0x19e265(0x1d8)&&_0x1f6dab!==_0x19e265(0x1df)&&_0x1f6dab!==_0x19e265(0x1b2)),_0x4d53a4=Math[_0x19e265(0x1d6)](..._0x897e73[_0x19e265(0x1c3)](([_0x4bb5b0])=>_0x4bb5b0[_0x19e265(0x1e3)])),_0x158ace=Math['max'](..._0x897e73['map'](([,_0x48af84])=>{const _0x32693b=_0x19e265;try{const _0x259865=_0x48af84===null||_0x48af84===undefined?'':typeof _0x48af84==='object'?JSON[_0x32693b(0x1bd)](_0x48af84):String(_0x48af84),_0x24ed36=_0x259865[_0x32693b(0x1e6)]('\x0a');return Math['max'](..._0x24ed36[_0x32693b(0x1c3)](_0x1cf941=>_0x1cf941[_0x32693b(0x1e3)]),0x0);}catch{return 0x0;}}),0x14),_0x1b88c3=[];_0x1b88c3[_0x19e265(0x1ce)](colorBorder('┌─'+'─'['repeat'](_0x4d53a4)+_0x19e265(0x1c9)+'─'['repeat'](_0x158ace)+'─┐',_0x458580)),_0x897e73[_0x19e265(0x1c5)](([_0x3cdce8,_0x4edecf])=>{const _0x12dfc4=_0x19e265;let _0x4126b1;try{_0x4126b1=_0x4edecf===null||_0x4edecf===undefined?'':typeof _0x4edecf===_0x12dfc4(0x1ed)?JSON[_0x12dfc4(0x1bd)](_0x4edecf):String(_0x4edecf);}catch{_0x4126b1=_0x12dfc4(0x1c0);}const _0x3484d7=_0x3cdce8[_0x12dfc4(0x1ca)](_0x4d53a4),_0x1e3e13=_0x4126b1[_0x12dfc4(0x1e6)]('\x0a');_0x1e3e13['forEach']((_0x4ec15c,_0x20a7f6)=>{const _0x3abe45=_0x12dfc4,_0x20d70c=colorBorder('│',_0x458580);_0x20a7f6===0x0?_0x1b88c3[_0x3abe45(0x1ce)](_0x20d70c+'\x20'+_0x3484d7+'\x20'+_0x20d70c+'\x20'+_0x4ec15c[_0x3abe45(0x1ca)](_0x158ace)+'\x20'+_0x20d70c):_0x1b88c3[_0x3abe45(0x1ce)](_0x20d70c+'\x20'+'\x20'[_0x3abe45(0x1cc)](_0x4d53a4)+'\x20'+_0x20d70c+'\x20'+_0x4ec15c[_0x3abe45(0x1ca)](_0x158ace)+'\x20'+_0x20d70c);});}),_0x1b88c3[_0x19e265(0x1ce)](colorBorder('└─'+'─'['repeat'](_0x4d53a4)+'─┴─'+'─'['repeat'](_0x158ace)+'─┘',_0x458580));_0xe25b86&&(_0x1b88c3[_0x19e265(0x1ce)](''),_0x1b88c3['push'](String(a44_0x453f75['yellow'][_0x19e265(0x1da)](_0x19e265(0x1eb)))),_0x1b88c3[_0x19e265(0x1ce)](_0xe25b86));_0x3c98d2&&(_0x1b88c3['push'](''),_0x1b88c3[_0x19e265(0x1ce)](String(a44_0x453f75[_0x19e265(0x1f6)][_0x19e265(0x1da)]('[params]'))),_0x1b88c3[_0x19e265(0x1ce)](_0x3c98d2));_0x2d0c39&&(_0x1b88c3['push'](''),_0x1b88c3[_0x19e265(0x1ce)](String(a44_0x453f75[_0x19e265(0x1ef)][_0x19e265(0x1da)](_0x19e265(0x1cd)))),_0x1b88c3['push'](_0x2d0c39));if(_0x1ef85d){if(_0x1ef85d['stderr']){_0x1b88c3['push'](''),_0x1b88c3[_0x19e265(0x1ce)](String(a44_0x453f75[_0x19e265(0x1f5)][_0x19e265(0x1da)]('[error]')));const _0x538197=_0x1ef85d[_0x19e265(0x1e2)]['split']('\x0a');_0x538197['forEach'](_0xb5911f=>{const _0x454f24=_0x19e265;_0xb5911f[_0x454f24(0x1f8)]()&&_0x1b88c3[_0x454f24(0x1ce)](_0xb5911f);});}if(_0x1ef85d['cmdout']){_0x1b88c3[_0x19e265(0x1ce)](''),_0x1b88c3[_0x19e265(0x1ce)](String(a44_0x453f75[_0x19e265(0x1b7)][_0x19e265(0x1da)](_0x19e265(0x1dc))));const _0x40a161=_0x1ef85d[_0x19e265(0x1dd)]['split']('\x0a');_0x40a161[_0x19e265(0x1c5)](_0x4e73b9=>{const _0x5b771e=_0x19e265;_0x4e73b9[_0x5b771e(0x1f8)]()&&_0x1b88c3[_0x5b771e(0x1ce)](_0x4e73b9);});}}return _0x1b88c3['join']('\x0a');}}}}function a44_0x2307(){const _0x277e60=['2484167mKpWck','tsv','[query]','close','object','FINISHED','magenta','string','noColor','output','spawn','filter','red','blue','8pxuKKx','trim','611472Doefdk','rule','limit','5033995okxTEf','log','isInteger','cyan','double','table','No\x20data','json','sdk-result','stringify','write','end','[Object]','boolean','Results\x20saved\x20to\x20','map','2652664dXCHmq','forEach','pipe','-FXRSn','error','─┬─','padEnd','number','repeat','[rule]','push','18975078OsBHHk','isTTY','color','varchar','resolve','keys','2142945kaOBEb','max','jsonl','query','format','bold','inherit','[logs]','cmdout','859967DjRjFY','params','bigint','stdout','stderr','length','debug','entries','split','2nKSnNX','stdin'];a44_0x2307=function(){return _0x277e60;};return a44_0x2307();}export async function handleSingleObjectOutput(_0x530ac9,_0x2eb07a){const _0x491b94=a44_0x2e9c;if(_0x2eb07a['format']===_0x491b94(0x1b9)){await handleSDKOutput([_0x530ac9],_0x2eb07a);return;}const _0x119323=resolveOutputOptions(_0x2eb07a),_0x56788c=await formatSingleObject(_0x530ac9,_0x119323);await writeOutput(_0x56788c,_0x119323[_0x491b94(0x1f2)]||undefined,_0x119323[_0x491b94(0x1d9)]);}
1
+ (function(_0x4c8bf5,_0x682fd7){const _0x29bf60=a44_0x242b,_0x4516d2=_0x4c8bf5();while(!![]){try{const _0x153508=parseInt(_0x29bf60(0x226))/0x1+parseInt(_0x29bf60(0x212))/0x2*(parseInt(_0x29bf60(0x1f1))/0x3)+-parseInt(_0x29bf60(0x234))/0x4+parseInt(_0x29bf60(0x201))/0x5*(parseInt(_0x29bf60(0x1fb))/0x6)+-parseInt(_0x29bf60(0x207))/0x7+-parseInt(_0x29bf60(0x235))/0x8*(-parseInt(_0x29bf60(0x208))/0x9)+-parseInt(_0x29bf60(0x1fa))/0xa*(parseInt(_0x29bf60(0x202))/0xb);if(_0x153508===_0x682fd7)break;else _0x4516d2['push'](_0x4516d2['shift']());}catch(_0xdbd15f){_0x4516d2['push'](_0x4516d2['shift']());}}}(a44_0x382e,0x72550));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x2d71d9 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x29a384){const _0x46b826=a44_0x242b;return _0x29a384['format']==='json'||_0x29a384[_0x46b826(0x200)]==='jsonl'||_0x29a384['format']===_0x46b826(0x1ff)||_0x29a384['format']===_0x46b826(0x1f2)||_0x29a384[_0x46b826(0x203)]===!![]||_0x29a384['jsonl']===!![]||_0x29a384[_0x46b826(0x1ff)]===!![]||_0x29a384[_0x46b826(0x1f2)]===!![];}export function parseOutputOptions(_0x333239){const _0x440c16=a44_0x242b;return{'format':_0x333239[_0x440c16(0x200)]||_0x440c16(0x1f2),'output':_0x333239[_0x440c16(0x20e)]||'','limit':_0x333239[_0x440c16(0x220)],'color':_0x333239[_0x440c16(0x227)],'noColor':_0x333239[_0x440c16(0x217)]};}function convertSDKResultToQueryResult(_0x4ff2d6){const _0x452048=a44_0x242b,_0x4be2ea=[];if(_0x4ff2d6[_0x452048(0x232)]>0x0){const _0x5de33a=_0x4ff2d6[0x0];for(const [_0x14bd10,_0x5e97b8]of Object[_0x452048(0x1f5)](_0x5de33a)){let _0x1db992=_0x452048(0x219);if(typeof _0x5e97b8===_0x452048(0x23a))_0x1db992=Number[_0x452048(0x215)](_0x5e97b8)?_0x452048(0x218):_0x452048(0x1f6);else{if(typeof _0x5e97b8===_0x452048(0x21b))_0x1db992=_0x452048(0x21b);else _0x5e97b8===null&&(_0x1db992='varchar');}_0x4be2ea[_0x452048(0x224)]({'name':_0x14bd10,'type':_0x1db992});}}return{'queryId':_0x452048(0x223),'columns':_0x4be2ea,'data':_0x4ff2d6,'stats':{'state':_0x452048(0x231),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x4ff2d6['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x5d2d45,_0x572c27){const _0x392157=convertSDKResultToQueryResult(_0x5d2d45);return formatQueryOutput(_0x392157,_0x572c27);}export async function formatQueryOutput(_0x588b91,_0x297b3c){const _0x26f1da=a44_0x242b,{format:_0x50d383,limit:_0x53865c,output:_0x4765f4,color:_0x259a9d,noColor:_0xaf3076}=_0x297b3c,_0x2f1440=Boolean(_0x4765f4)&&!_0x259a9d,_0x289342={'color':_0x259a9d,'noColor':_0xaf3076||_0x2f1440};if(_0x50d383==='table'){const _0x19fe03=shouldUseLess(_0x50d383,_0x4765f4);return formatAsTable(_0x588b91,_0x53865c,_0x19fe03,_0x289342);}else{if(_0x50d383===_0x26f1da(0x203))return formatAsJSON(_0x588b91,_0x289342);else return _0x50d383===_0x26f1da(0x20f)?formatAsJSONL(_0x588b91,_0x289342):formatQueryResult(_0x588b91,_0x50d383);}}function shouldUseLess(_0x1a7df4,_0x4a84cc){const _0x262911=a44_0x242b;return(_0x1a7df4===_0x262911(0x1f2)||_0x1a7df4===_0x262911(0x233))&&process['stdout'][_0x262911(0x1f3)]&&!_0x4a84cc;}export function resolveOutputOptions(_0x2fe0fc){const _0x57c394=a44_0x242b,_0x1ad8e4=resolveOutputFormat(_0x2fe0fc['format'],_0x2fe0fc[_0x57c394(0x20e)],'table');let _0x3f516f=typeof _0x2fe0fc[_0x57c394(0x220)]===_0x57c394(0x23a)?_0x2fe0fc['limit']:parseInt(_0x2fe0fc[_0x57c394(0x220)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x15f9f9=_0x2fe0fc[_0x57c394(0x20e)]||'';return shouldUseLess(_0x1ad8e4,_0x15f9f9)&&(_0x3f516f=Infinity),{'format':_0x1ad8e4,'output':_0x15f9f9,'limit':_0x3f516f,'color':_0x2fe0fc[_0x57c394(0x227)],'noColor':_0x2fe0fc[_0x57c394(0x217)]};}function a44_0x242b(_0x43593c,_0x5d0e73){_0x43593c=_0x43593c-0x1f1;const _0x382e8e=a44_0x382e();let _0x242bd6=_0x382e8e[_0x43593c];return _0x242bd6;}function a44_0x382e(){const _0x25b440=['query','repeat','No\x20data','FINISHED','length','list','41028gUsRLR','6339736vCqmrE','[query]','forEach','max','padEnd','number','54195hgbyHT','table','isTTY','keys','entries','double','[error]','resolve','error','50qpzHin','6FUfhiz','split','rule','cyan','tsv','format','869605pFpQNd','2480071UaZSQt','json','pipe','[rule]','end','4035101VYWXEU','9MJiyvk','map','[params]','inherit','params','Results\x20saved\x20to\x20','output','jsonl','-FXRSn','blue','98kKMlzi','[Object]','stdin','isInteger','cmdout','noColor','bigint','varchar','trim','boolean','write','bold','stderr','yellow','limit','filter','less','sdk-result','push','object','330736ozbJRu','color','debug','─┴─','red','stringify','join','[logs]'];a44_0x382e=function(){return _0x25b440;};return a44_0x382e();}export function writeOutput(_0x535a0a,_0x3fef67,_0xef08c3){const _0x5d72d5=a44_0x242b;return _0x3fef67?(writeFileSync(_0x3fef67,_0x535a0a),console[_0x5d72d5(0x1f9)](_0x5d72d5(0x20d)+_0x3fef67),Promise['resolve']()):shouldUseLess(_0xef08c3||'','')?new Promise(_0x4be4f5=>{const _0x4888e7=_0x5d72d5,_0x32fa3e=spawn(_0x4888e7(0x222),[_0x4888e7(0x210)],{'stdio':[_0x4888e7(0x204),'inherit',_0x4888e7(0x20b)]});let _0x85a139=![];_0x32fa3e['on']('error',()=>{!_0x85a139&&(_0x85a139=!![],console['log'](_0x535a0a),_0x4be4f5());}),_0x32fa3e['on']('close',()=>{!_0x85a139&&(_0x85a139=!![],_0x4be4f5());}),_0x32fa3e['on']('spawn',()=>{const _0x1cb55a=_0x4888e7;!_0x85a139&&_0x32fa3e['stdin']&&(_0x32fa3e['stdin']['on']('error',()=>{}),_0x32fa3e[_0x1cb55a(0x214)][_0x1cb55a(0x21c)](_0x535a0a),_0x32fa3e['stdin'][_0x1cb55a(0x206)]());}),!_0x32fa3e['stdin']&&(!_0x85a139&&(_0x85a139=!![],console['log'](_0x535a0a),_0x4be4f5()));}):(console['log'](_0x535a0a),Promise[_0x5d72d5(0x1f8)]());}export async function handleSDKOutput(_0x523065,_0x4a8904){const _0x47ff9c=a44_0x242b,_0x59d929=resolveOutputOptions(_0x4a8904),_0x9dcf11=await formatSDKOutput(_0x523065,_0x59d929);await writeOutput(_0x9dcf11,_0x59d929[_0x47ff9c(0x20e)]||undefined,_0x59d929['format']);}export async function handleQueryOutput(_0xfef69f,_0x1c0d4f){const _0x1d18c2=a44_0x242b,_0x156ccd=resolveOutputOptions(_0x1c0d4f),_0xd96f4d=await formatQueryOutput(_0xfef69f,_0x156ccd);await writeOutput(_0xd96f4d,_0x156ccd[_0x1d18c2(0x20e)]||undefined,_0x156ccd[_0x1d18c2(0x200)]);}async function formatSingleObject(_0x4c4761,_0x5aea04){const _0x2d1eb6=a44_0x242b,{format:_0x5d030d,color:_0x451d02,noColor:_0x459b5d}=_0x5aea04,_0x4f9722={'color':_0x451d02,'noColor':_0x459b5d};if(_0x5d030d===_0x2d1eb6(0x203)){if(shouldUseColor(_0x4f9722))return colorizeJSON(_0x4c4761,_0x4f9722);return JSON['stringify'](_0x4c4761,null,0x2);}else{if(_0x5d030d===_0x2d1eb6(0x20f)){if(shouldUseColor(_0x4f9722))return colorizeJSONCompact(_0x4c4761,_0x4f9722);return JSON['stringify'](_0x4c4761);}else{if(_0x5d030d===_0x2d1eb6(0x1ff))return Object[_0x2d1eb6(0x1f5)](_0x4c4761)['map'](([_0x476fd5,_0x5809d8])=>_0x476fd5+'\x09'+_0x5809d8)[_0x2d1eb6(0x22c)]('\x0a');else{const _0x1b9aca=Object['entries'](_0x4c4761);if(_0x1b9aca[_0x2d1eb6(0x232)]===0x0)return _0x2d1eb6(0x230);const _0x36ce69=_0x4c4761[_0x2d1eb6(0x228)],_0x4c9346=_0x4c4761['query'],_0x107540=_0x4c4761[_0x2d1eb6(0x20c)],_0x46f4e5=_0x4c4761[_0x2d1eb6(0x1fd)],_0x53e150=_0x4c9346?typeof _0x4c9346==='string'?_0x4c9346:JSON[_0x2d1eb6(0x22b)](_0x4c9346,null,0x2):undefined,_0x28b16d=_0x107540&&Object[_0x2d1eb6(0x1f4)](_0x107540)['length']>0x0?JSON[_0x2d1eb6(0x22b)](_0x107540,null,0x2):undefined,_0x3479b0=_0x46f4e5&&Object[_0x2d1eb6(0x1f4)](_0x46f4e5)[_0x2d1eb6(0x232)]>0x0?JSON[_0x2d1eb6(0x22b)](_0x46f4e5,null,0x2):undefined,_0x219bbd=_0x1b9aca[_0x2d1eb6(0x221)](([_0x5da5c1])=>_0x5da5c1!=='debug'&&_0x5da5c1!==_0x2d1eb6(0x22e)&&_0x5da5c1!=='params'&&_0x5da5c1!==_0x2d1eb6(0x1fd)),_0x528c2e=Math[_0x2d1eb6(0x238)](..._0x219bbd['map'](([_0x3dcf7b])=>_0x3dcf7b[_0x2d1eb6(0x232)])),_0x1b26e1=Math[_0x2d1eb6(0x238)](..._0x219bbd[_0x2d1eb6(0x209)](([,_0x25e6bd])=>{const _0x5a40ea=_0x2d1eb6;try{const _0x2512f8=_0x25e6bd===null||_0x25e6bd===undefined?'':typeof _0x25e6bd===_0x5a40ea(0x225)?JSON[_0x5a40ea(0x22b)](_0x25e6bd):String(_0x25e6bd),_0x56b20a=_0x2512f8[_0x5a40ea(0x1fc)]('\x0a');return Math['max'](..._0x56b20a[_0x5a40ea(0x209)](_0x199565=>_0x199565[_0x5a40ea(0x232)]),0x0);}catch{return 0x0;}}),0x14),_0x397639=[];_0x397639[_0x2d1eb6(0x224)](colorBorder('┌─'+'─'[_0x2d1eb6(0x22f)](_0x528c2e)+'─┬─'+'─'[_0x2d1eb6(0x22f)](_0x1b26e1)+'─┐',_0x4f9722)),_0x219bbd[_0x2d1eb6(0x237)](([_0x9b5489,_0x193ec9])=>{const _0x3e917d=_0x2d1eb6;let _0x476f8d;try{_0x476f8d=_0x193ec9===null||_0x193ec9===undefined?'':typeof _0x193ec9===_0x3e917d(0x225)?JSON['stringify'](_0x193ec9):String(_0x193ec9);}catch{_0x476f8d=_0x3e917d(0x213);}const _0x106861=_0x9b5489[_0x3e917d(0x239)](_0x528c2e),_0x39c839=_0x476f8d[_0x3e917d(0x1fc)]('\x0a');_0x39c839[_0x3e917d(0x237)]((_0x4cf22d,_0x17c980)=>{const _0x4243a2=_0x3e917d,_0x91b99a=colorBorder('│',_0x4f9722);_0x17c980===0x0?_0x397639[_0x4243a2(0x224)](_0x91b99a+'\x20'+_0x106861+'\x20'+_0x91b99a+'\x20'+_0x4cf22d['padEnd'](_0x1b26e1)+'\x20'+_0x91b99a):_0x397639[_0x4243a2(0x224)](_0x91b99a+'\x20'+'\x20'[_0x4243a2(0x22f)](_0x528c2e)+'\x20'+_0x91b99a+'\x20'+_0x4cf22d[_0x4243a2(0x239)](_0x1b26e1)+'\x20'+_0x91b99a);});}),_0x397639[_0x2d1eb6(0x224)](colorBorder('└─'+'─'[_0x2d1eb6(0x22f)](_0x528c2e)+_0x2d1eb6(0x229)+'─'[_0x2d1eb6(0x22f)](_0x1b26e1)+'─┘',_0x4f9722));_0x53e150&&(_0x397639['push'](''),_0x397639['push'](String(a44_0x2d71d9[_0x2d1eb6(0x21f)]['bold'](_0x2d1eb6(0x236)))),_0x397639[_0x2d1eb6(0x224)](_0x53e150));_0x28b16d&&(_0x397639['push'](''),_0x397639[_0x2d1eb6(0x224)](String(a44_0x2d71d9[_0x2d1eb6(0x211)][_0x2d1eb6(0x21d)](_0x2d1eb6(0x20a)))),_0x397639[_0x2d1eb6(0x224)](_0x28b16d));_0x3479b0&&(_0x397639['push'](''),_0x397639[_0x2d1eb6(0x224)](String(a44_0x2d71d9['magenta'][_0x2d1eb6(0x21d)](_0x2d1eb6(0x205)))),_0x397639['push'](_0x3479b0));if(_0x36ce69){if(_0x36ce69[_0x2d1eb6(0x21e)]){_0x397639[_0x2d1eb6(0x224)](''),_0x397639[_0x2d1eb6(0x224)](String(a44_0x2d71d9[_0x2d1eb6(0x22a)][_0x2d1eb6(0x21d)](_0x2d1eb6(0x1f7))));const _0x4ab5b3=_0x36ce69['stderr'][_0x2d1eb6(0x1fc)]('\x0a');_0x4ab5b3[_0x2d1eb6(0x237)](_0x230031=>{const _0x1c255a=_0x2d1eb6;_0x230031[_0x1c255a(0x21a)]()&&_0x397639[_0x1c255a(0x224)](_0x230031);});}if(_0x36ce69['cmdout']){_0x397639[_0x2d1eb6(0x224)](''),_0x397639[_0x2d1eb6(0x224)](String(a44_0x2d71d9[_0x2d1eb6(0x1fe)][_0x2d1eb6(0x21d)](_0x2d1eb6(0x22d))));const _0x16e6a5=_0x36ce69[_0x2d1eb6(0x216)][_0x2d1eb6(0x1fc)]('\x0a');_0x16e6a5[_0x2d1eb6(0x237)](_0x14a997=>{const _0x33bf8e=_0x2d1eb6;_0x14a997[_0x33bf8e(0x21a)]()&&_0x397639[_0x33bf8e(0x224)](_0x14a997);});}}return _0x397639['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0xbff3a3,_0x505b5b){const _0x598a07=a44_0x242b;if(_0x505b5b['format']==='table'){await handleSDKOutput([_0xbff3a3],_0x505b5b);return;}const _0x45d444=resolveOutputOptions(_0x505b5b),_0x503d95=await formatSingleObject(_0xbff3a3,_0x45d444);await writeOutput(_0x503d95,_0x45d444[_0x598a07(0x20e)]||undefined,_0x45d444[_0x598a07(0x200)]);}