@treasuredata/tdx 0.28.4 → 0.28.5

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 (179) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/delivery-command.js +1 -1
  18. package/dist/commands/describe.js +1 -1
  19. package/dist/commands/engage-campaign-pull-command.js +1 -1
  20. package/dist/commands/engage-campaign-push-command.js +1 -1
  21. package/dist/commands/engage-campaign-validate-command.js +1 -1
  22. package/dist/commands/engage-command.js +1 -1
  23. package/dist/commands/job-command.js +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.js +1 -1
  74. package/dist/sdk/agent/test/evaluator.js +1 -1
  75. package/dist/sdk/agent/test/executor.js +1 -1
  76. package/dist/sdk/agent/test/index.js +1 -1
  77. package/dist/sdk/agent/test/output.js +1 -1
  78. package/dist/sdk/agent/test/parser.js +1 -1
  79. package/dist/sdk/agent/tool-target-registry.js +1 -1
  80. package/dist/sdk/api.js +1 -1
  81. package/dist/sdk/client/cdp-api-client.js +1 -1
  82. package/dist/sdk/client/delivery-api-client.js +1 -1
  83. package/dist/sdk/client/endpoints.js +1 -1
  84. package/dist/sdk/client/engage-api-client.js +1 -1
  85. package/dist/sdk/client/http-client.js +1 -1
  86. package/dist/sdk/client/llm-api-client.js +1 -1
  87. package/dist/sdk/client/rate-limiter.js +1 -1
  88. package/dist/sdk/client/td-api-client.js +1 -1
  89. package/dist/sdk/client/trino-api-client.js +1 -1
  90. package/dist/sdk/client/workflow-client.js +1 -1
  91. package/dist/sdk/connection-validator.js +1 -1
  92. package/dist/sdk/connection.js +1 -1
  93. package/dist/sdk/delivery.js +1 -1
  94. package/dist/sdk/engage/campaign-pull.js +1 -1
  95. package/dist/sdk/engage/campaign-push.js +1 -1
  96. package/dist/sdk/engage/campaign-validator.js +1 -1
  97. package/dist/sdk/engage/campaign-yaml.js +1 -1
  98. package/dist/sdk/engage/types/campaign-def.js +1 -1
  99. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.js +1 -1
  103. package/dist/sdk/io/index.js +1 -1
  104. package/dist/sdk/io/node-filesystem.js +1 -1
  105. package/dist/sdk/job.js +1 -1
  106. package/dist/sdk/journey.js +1 -1
  107. package/dist/sdk/llm/chat-cache.js +1 -1
  108. package/dist/sdk/llm/index.js +1 -1
  109. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  110. package/dist/sdk/llm/model-factors.js +1 -1
  111. package/dist/sdk/personalization.js +1 -1
  112. package/dist/sdk/query/index.js +1 -1
  113. package/dist/sdk/query/sql-parser.js +1 -1
  114. package/dist/sdk/realtime.js +1 -1
  115. package/dist/sdk/schedule.js +1 -1
  116. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  117. package/dist/sdk/segment/fields-display.js +1 -1
  118. package/dist/sdk/segment/file-discovery.js +1 -1
  119. package/dist/sdk/segment/journey-utils.js +1 -1
  120. package/dist/sdk/segment/journey-validator.js +1 -1
  121. package/dist/sdk/segment/journey-yaml.js +1 -1
  122. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  123. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  124. package/dist/sdk/segment/pull-workflow.js +1 -1
  125. package/dist/sdk/segment/push-recovery.js +1 -1
  126. package/dist/sdk/segment/push-workflow.js +1 -1
  127. package/dist/sdk/segment/resolution-context.js +1 -1
  128. package/dist/sdk/segment/segment-path-parser.js +1 -1
  129. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  130. package/dist/sdk/segment/target-resolution.js +1 -1
  131. package/dist/sdk/segment/tdx-config.js +1 -1
  132. package/dist/sdk/segment/validate-files.js +1 -1
  133. package/dist/sdk/segment/yaml-validator.js +1 -1
  134. package/dist/sdk/segment.js +1 -1
  135. package/dist/sdk/types/index.js +1 -1
  136. package/dist/sdk/types/progress.js +1 -1
  137. package/dist/sdk/user.js +1 -1
  138. package/dist/sdk/util/format-detector.js +1 -1
  139. package/dist/sdk/util/formatters.js +1 -1
  140. package/dist/sdk/util/index.js +1 -1
  141. package/dist/sdk/util/tree-formatter.js +1 -1
  142. package/dist/sdk/workflow/archive-validation.js +1 -1
  143. package/dist/sdk/workflow/clone-workflow.js +1 -1
  144. package/dist/sdk/workflow/index.js +1 -1
  145. package/dist/sdk/workflow/pull-workflow.js +1 -1
  146. package/dist/sdk/workflow/push-workflow.js +1 -1
  147. package/dist/sdk/workflow/tdx-config.js +1 -1
  148. package/dist/sdk/workflow/workflow-utils.js +1 -1
  149. package/dist/test-utils/command-runner.js +1 -1
  150. package/dist/test-utils/factories.js +1 -1
  151. package/dist/test-utils/fixtures.js +1 -1
  152. package/dist/test-utils/http-mock.js +1 -1
  153. package/dist/test-utils/index.js +1 -1
  154. package/dist/utils/async.js +1 -1
  155. package/dist/utils/colors.js +1 -1
  156. package/dist/utils/diff.js +1 -1
  157. package/dist/utils/file-permissions.js +1 -1
  158. package/dist/utils/global-cache.js +1 -1
  159. package/dist/utils/json-loader.js +1 -1
  160. package/dist/utils/local-cache.js +1 -1
  161. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  162. package/dist/utils/logger/formatters/index.js +1 -1
  163. package/dist/utils/logger/handlers/console-handler.js +1 -1
  164. package/dist/utils/logger/handlers/file-handler.js +1 -1
  165. package/dist/utils/logger/handlers/index.js +1 -1
  166. package/dist/utils/logger/handlers/null-handler.js +1 -1
  167. package/dist/utils/logger/index.js +1 -1
  168. package/dist/utils/logger/logger.js +1 -1
  169. package/dist/utils/logger/types.js +1 -1
  170. package/dist/utils/option-validation.js +1 -1
  171. package/dist/utils/process.js +1 -1
  172. package/dist/utils/prompt.js +1 -1
  173. package/dist/utils/spinner.js +1 -1
  174. package/dist/utils/sse-parser.js +1 -1
  175. package/dist/utils/string-utils.js +1 -1
  176. package/dist/utils/table-ref-parser.js +1 -1
  177. package/dist/utils/tdx-logger.js +1 -1
  178. package/dist/utils/version-check.js +1 -1
  179. package/package.json +1 -1
@@ -1 +1 @@
1
- const a46_0x38b2ab=a46_0x300c;(function(_0x2b161f,_0x250016){const _0x6be64f=a46_0x300c,_0x3a5972=_0x2b161f();while(!![]){try{const _0x53246f=parseInt(_0x6be64f(0x1e2))/0x1+parseInt(_0x6be64f(0x145))/0x2*(-parseInt(_0x6be64f(0x27f))/0x3)+-parseInt(_0x6be64f(0x258))/0x4+parseInt(_0x6be64f(0x1b8))/0x5+-parseInt(_0x6be64f(0x203))/0x6+-parseInt(_0x6be64f(0x14e))/0x7*(parseInt(_0x6be64f(0x217))/0x8)+parseInt(_0x6be64f(0x1a3))/0x9;if(_0x53246f===_0x250016)break;else _0x3a5972['push'](_0x3a5972['shift']());}catch(_0x19c137){_0x3a5972['push'](_0x3a5972['shift']());}}}(a46_0x15f6,0x2e1ca));import a46_0x5b905a from'chalk';import{existsSync}from'fs';function a46_0x300c(_0x9213b2,_0x55c310){_0x9213b2=_0x9213b2-0x112;const _0x15f62b=a46_0x15f6();let _0x300c8b=_0x15f62b[_0x9213b2];return _0x300c8b;}import a46_0x985414 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';function a46_0x15f6(){const _0x2caaf2=['resolveProject','parse','name','No\x20attempts\x20found','🔄\x20','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','\x20workflow','\x0aPolling...\x20(','\x20logs','getTime','json','length','Error:\x20Invalid\x20JSON\x20in\x20--params','803425hPMMwk','startedAt','(use\x20--limit\x20to\x20see\x20more)','Listing\x20workflows...','changes','state','window','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','Select\x20a\x20session\x20to\x20view\x20timeline:','Killing\x20attempt...','getDate','Invalid\x20format:\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','fileCount','sessionTime','workflow:sessions','map','cancelRequested','projects','pollTimeline','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','logs','task','revision','end','title','Source\x20directory\x20is\x20required','Project\x20directory:\x20','\x0a✔\x20Already\x20up\x20to\x20date','Source\x20directory:\x20','Target\x20directory:\x20','project','format','parseProjectWorkflowPattern','(unknown)','updatedAt','kill','workflows','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','get','metadata','128458BXedZk','workflow:pull','isNewProject','GUTTER','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','hasChanges','output','stat','rows','✔\x20Downloaded\x20','attempt','every','start','Error:\x20','message','cyan','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','\x20modified','isTTY','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','No\x20log\x20content\x20found','Analyzing\x20project...','table','getHours','trimEnd','✔\x20Pull\x20complete','getMonth','success','\x22\x20to\x20new\x20project\x20\x22','max','\x20\x20New\x20attempt\x20ID:\x20','modified','red','1023516pzmIyu','resolve','attempt:','Workflow:\x20','summary','targetExists','Filter:\x20project=','Fetching\x20log\x20files...','values','data','Listing\x20secrets...','showWorkflowConsoleUrl','Pulling\x20project\x20','renderSessionsTimeline','replace','Session\x20not\x20found:\x20','skipValidation','blue','Usage:\x20tdx\x20wf\x20use\x20<project>','limit','44168BFNGak','No\x20attempts\x20found\x20for:\x20','error','workflow:delete','verbose','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','context','Retrying\x20attempt...','has','Setting\x20secret...','No\x20sessions\x20with\x20timing\x20information','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','\x22?\x20This\x20cannot\x20be\x20undone.','execute','sessionId','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','newProjectId','stringify','path','MAX_LABEL_COUNT','Failed\x20to\x20fetch\x20attempt\x20data','Using\x20attempt\x20','requireProject','sys','List\x20all\x20workflow\x20projects','\x20\x20Changes:\x20','Error:\x20Attempt\x20ID\x20is\x20required','Dry\x20run:\x20yes','Reason:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','deleted','List\x20workflows','run','workflow:secrets:delete','isDirectory','fileSize','Filter:\x20','buildTimelineData','sourceDir','\x20\x20Target:\x20','canceling','workflow:secrets:list','✔\x20Deleted\x20project\x20','retryAttemptName','Pushing\x20workflow\x20project...','yellow','\x20\x20tdx\x20wf\x20use\x20<project>','match','logFiles','Listing\x20workflow\x20attempts...','Project\x20filter:\x20','\x0aDry\x20run\x20-\x20nothing\x20pushed','setSecret','startsWith','all','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Pattern:\x20','Error:\x20Invalid\x20parameter\x20format:\x20','sort','prepareCloneProject','No\x20sessions\x20found\x20for:\x20','session:','\x0aPush\x20these\x20changes?','💡\x20Tip:\x20Use\x20','List\x20workflow\x20execution\x20sessions','1319320ZvidRX','Validation:\x20skipped','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','No\x20matching\x20sessions\x20found','\x20\x20Revision:\x20','\x20tasks','✔\x20Showing\x20','Error:','Params:\x20','\x20\x20Location:\x20','Attempt:\x20','getMinutes','padStart','readFile','getFullYear','Resume\x20from:\x20','navigateSessionsInteractive','Analyzing\x20changes...','Project:\x20','Project\x20name:\x20','From\x20task:\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','workflow:projects','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','index','ICON_WIDTH','Downloading\x20project\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Error:\x20Project\x20name\x20is\x20required','type','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','session','\x20task','\x20\x20Source:\x20','workflowProject','fromTask',',\x20Workflow:\x20','Deleting\x20project\x20','diff','401550vTIGPs','group_error','/attempt/','executeCloneProject','tasks','fs/promises','No\x20sessions\x20found\x20in\x20project:\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','projectId','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Error:\x20Secret\x20key\x20is\x20required','white','push','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','⚠\x20Showing\x20first\x20','workflow:download','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Tip:\x20cd\x20to\x20workflows/','Cancelled','key','fill','\x20sessions\x20','preparePushProject','yes','\x20new','\x20\x20Session\x20ID:\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','params','\x20secret','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','indexOf','log','filter','Error:\x20KEY=VALUE\x20is\x20required','Auto-selected\x20latest\x20session:\x20','total','\x20\x20Workflow:\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','localeCompare','isArray','workflow:run','targetDir','Getting\x20attempt\x20tasks...','\x0a⚠\x20Project\x20\x22','Writing\x20files...','floor','Status:\x20','attemptId','join','sourceProjectName','Select\x20a\x20task\x20to\x20view\x20logs:','Loading\x20sessions...','-\x20nothing\x20pushed','\x20-\x20','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','newProjectName','resolveProjectDir','delete','durationMs','No\x20workflows\x20found\x20in\x20project:\x20','cwd','\x20\x20Console:\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Key:\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','✔\x20Workflow\x20project\x20set\x20to:\x20','---\x20','listSecrets','\x20from\x20session\x20','finishedAt','duration','fullName','split','Loading\x20workflows...','List\x20workflow\x20attempts','applyPullProject','executePushProject','→\x20New\x20project:\x20','renderSingleTimeline','LABEL_MIN_SPACING','session_id','planned','autocomplete','follow','new','dim','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','status','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x20\x20Project\x20ID:\x20','size','projectName','\x0aError:','✔\x20Found\x20','No\x20workflows\x20found','\x20is\x20not\x20a\x20directory','\x27...','Deleting\x20secret...','toISOString','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','workflowName','min','Listing\x20workflow\x20projects...','Usage:\x20workflow:delete\x20<project-name-or-id>','clear','lastAttempt','renderTimeline','select','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','No\x20projects\x20match\x20pattern:\x20','\x20unchanged','Source\x20project:\x20','✔\x20Clone\x20complete','\x20attempt','existingProjectId','param','running','find','\x22\x20already\x20exists\x20(ID:\x20','done','columns','Warning:','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','stdout','Source:\x20','dryRun','generateSessionTimelineRows','Latest\x20session\x20has\x20no\x20attempt','2gweqVL','/sessions/','jsonl','relative','tdx.json','basename','No\x20sessions\x20found','toLowerCase','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','91yPNbDS','Session\x20time:\x20','No\x20attempts\x20found\x20in\x20project:\x20','Start\x20a\x20workflow\x20run','workflow:push','/app/workflows/','\x20(use\x20--limit\x20to\x20show\x20more)','green','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','splice','\x20deleted','Output\x20directory:\x20','...','\x20(system)','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','✔\x20Secret\x20\x27','-\x20no\x20files\x20written','icon','repeat','📋\x20','TASK_NAME_WIDTH','Parameters:\x20','workflow','\x20\x20Session\x20context\x20set\x20to:\x20','Target:\x20','Expected\x20format:\x20--param\x20key=value','unchanged','attempts','list','workflow:kill','\x20to\x20see\x20detailed\x20logs','Include\x20retried:\x20yes','MAX_TASKS_DISPLAY','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','pending','Resolving\x20project\x20\x27','workflow:timeline','\x20session','some','Listing\x20workflow\x20sessions...','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','workflow:logs','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','write','text','MAX_TIMELINE_WIDTH','sessions','retrySession','startTime','Key\x20cannot\x20be\x20empty','\x1b[1A\x1b[2K','msPerChar','utf-8','taskName','Cloning\x20to\x20','\x20\x20Files\x20extracted:\x20','tdx\x20wf\x20attempt\x20','✔\x20Pushed\x20','unknown','Force:\x20yes','Show\x20specific\x20attempt\x20details','description','Loading\x20session...','set','\x20\x20Project:\x20','New\x20project\x20name:\x20','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','round','✔\x20Project:\x20','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Show\x20tasks\x20for\x20an\x20attempt','Revision:\x20','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x0aApply\x20these\x20changes?','MAX_POLL_ITERATIONS','\x22\x20with\x20new\x20revision?','now','workflow:secrets:set','\x20of\x20','✔\x20Project\x20updated','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','substring','Starting\x20workflow\x20run...','site','createdAt','5451930ocQCoS','Attempt\x20ID:\x20','workflow:tasks','✔\x20Workflow\x20run\x20started','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','includes','keys','Downloading\x20logs...'];a46_0x15f6=function(){return _0x2caaf2;};return a46_0x15f6();}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 a46_0x143713 from'prompts';function getAttemptStatusDisplay(_0x4aa250){const _0x19fcbf=a46_0x300c;if(!_0x4aa250)return{'icon':'⏳','text':''};const {done:_0xace168,success:_0x5a5208,cancelRequested:_0x34e452}=_0x4aa250;if(!_0xace168)return _0x34e452?{'icon':'🛑','text':a46_0x5b905a['yellow'](_0x19fcbf(0x23f))}:{'icon':'🔄','text':a46_0x5b905a[_0x19fcbf(0x214)](_0x19fcbf(0x139))};if(_0x5a5208)return{'icon':'✅','text':a46_0x5b905a['green'](_0x19fcbf(0x1fd))};return{'icon':'❌','text':a46_0x5b905a['red'](_0x19fcbf(0x219))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x267581,_0xe0f50b,_0x48df1b=0x0){const _0x434506=a46_0x300c;return _0x267581[_0x48df1b]||_0xe0f50b[_0x434506(0x27a)];}[a46_0x38b2ab(0x22d)](_0x13d697,_0x15ee18,_0x51c00d=0x0){const _0x366264=a46_0x38b2ab,_0x274f11=this[_0x366264(0x1ab)](_0x13d697,_0x15ee18,_0x51c00d);if(!_0x274f11)return console['error'](a46_0x5b905a['red'](_0x366264(0x25f)),'Project\x20name\x20is\x20required'),console[_0x366264(0x219)](a46_0x5b905a['dim'](_0x366264(0x299))),null;return _0x274f11;}['parseProjectWorkflowPattern'](_0x28a95f,_0x175bcd){const _0x314f96=a46_0x38b2ab;if(_0x28a95f[0x0]){const _0x1dbd22=_0x28a95f[0x0][_0x314f96(0x2c8)]('.');if(_0x1dbd22[_0x314f96(0x1b6)]===0x1)return{'projectName':_0x1dbd22[0x0],'workflowName':undefined};else return _0x1dbd22[_0x314f96(0x1b6)]===0x2?{'projectName':_0x1dbd22[0x0],'workflowName':_0x1dbd22[0x1]}:(console['error'](a46_0x5b905a['red']('Error:'),_0x314f96(0x16f)),null);}return{'projectName':_0x175bcd[_0x314f96(0x27a)],'workflowName':undefined};}[a46_0x38b2ab(0x2b8)](_0x5ba07d,_0x5df96b,_0x2bfb57=0x0){const _0x3ddcb4=a46_0x38b2ab;if(_0x5ba07d[_0x2bfb57])return _0x5ba07d[_0x2bfb57];if(_0x5df96b[_0x3ddcb4(0x27a)]){const _0x18271e=a46_0x985414[_0x3ddcb4(0x2af)](process['cwd'](),_0x3ddcb4(0x1de),_0x5df96b[_0x3ddcb4(0x27a)]);if(existsSync(a46_0x985414[_0x3ddcb4(0x2af)](_0x18271e,_0x3ddcb4(0x149))))return _0x18271e;}return undefined;}async['showWorkflowConsoleUrl'](_0x39cfc3,_0x4091af,_0x6688eb){const _0x1b1b16=a46_0x38b2ab;try{const _0x48ca35=await _0x39cfc3[_0x1b1b16(0x164)][_0x1b1b16(0x1de)](_0x4091af,{'limit':0x1});if(_0x48ca35[_0x1b1b16(0x1b6)]>0x0){const _0x42ee25=_0x48ca35[0x0]['id'],_0x1d86f4=getWorkflowUrl(_0x6688eb,_0x42ee25);console[_0x1b1b16(0x219)](_0x1b1b16(0x2bd)+a46_0x5b905a[_0x1b1b16(0x1f1)](_0x1d86f4));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']='workflow:use';['description']=a46_0x38b2ab(0x25a);async[a46_0x38b2ab(0x224)](_0x1fa8b1){const _0x4e50f9=a46_0x38b2ab,{options:_0xd6a95f,args:_0x307c35,tdx:_0x280fb2}=_0x1fa8b1,_0x547dda=_0x307c35[0x0],_0x45aadd=_0xd6a95f[_0x4e50f9(0x12d)];if(_0x45aadd)return saveSessionContext({'workflow_project':undefined},_0xd6a95f[_0x4e50f9(0x277)]),console['log'](a46_0x5b905a['green']('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x547dda)return console[_0x4e50f9(0x219)](a46_0x5b905a['red'](_0x4e50f9(0x25f)),'Project\x20name\x20is\x20required'),console[_0x4e50f9(0x219)](a46_0x5b905a[_0x4e50f9(0x11a)](_0x4e50f9(0x215))),console[_0x4e50f9(0x219)](a46_0x5b905a[_0x4e50f9(0x11a)](_0x4e50f9(0x13f))),0x1;const _0x2c6e76=await withSpinner(_0x4e50f9(0x171)+_0x547dda+_0x4e50f9(0x125),()=>_0x280fb2[_0x4e50f9(0x164)]['resolveProjectId'](_0x547dda),{'verbose':_0xd6a95f[_0x4e50f9(0x21b)]}),{name:_0x4850e5}=_0x2c6e76['data'];return saveSessionContext({'workflow_project':_0x4850e5},_0xd6a95f['session']),console[_0x4e50f9(0x29e)](a46_0x5b905a['green'](_0x4e50f9(0x2c1)+a46_0x5b905a['cyan'](_0x4850e5))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x26e);[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x22f);async['execute'](_0x21d8d3){const _0x149990=a46_0x38b2ab,{options:_0x2af486,args:_0x50e9cd,tdx:_0xa0e999}=_0x21d8d3,_0x643111=_0x50e9cd[0x0];_0x2af486[_0x149990(0x21b)]&&_0x643111&&console['error'](_0x149990(0x24f)+_0x643111);const _0x47c0a0=await withSpinner(_0x149990(0x12b),()=>_0xa0e999[_0x149990(0x164)][_0x149990(0x1ca)](_0x643111,{'limit':_0x2af486[_0x149990(0x216)]}),{'verbose':_0x2af486[_0x149990(0x21b)]});let _0x829b47=_0x47c0a0[_0x149990(0x20c)];_0x829b47['sort']((_0x1a8a53,_0x3b977f)=>_0x1a8a53['name']['localeCompare'](_0x3b977f[_0x149990(0x1ad)]));const _0x10258a=_0x2af486[_0x149990(0x216)]||0x64,_0x22836b=_0x829b47[_0x149990(0x1b6)]>=_0x10258a?a46_0x5b905a['dim'](_0x149990(0x154)):'';console[_0x149990(0x219)](_0x149990(0x122)+_0x829b47['length']+'\x20project'+(_0x829b47[_0x149990(0x1b6)]!==0x1?'s':'')+_0x22836b);if(_0x2af486[_0x149990(0x1d9)]==='json'||_0x2af486[_0x149990(0x1d9)]===_0x149990(0x147)||_0x2af486[_0x149990(0x1d9)]===_0x149990(0x1f8))await handleSDKOutput(_0x829b47,_0x2af486);else{if(_0x829b47['length']===0x0)_0x643111?console[_0x149990(0x29e)](_0x149990(0x132)+_0x643111):console['log']('No\x20workflow\x20projects\x20found');else{const _0x346ead=_0x829b47[_0x149990(0x1c8)](_0x3a590d=>{const _0x4943ac=_0x149990,_0x26287=_0x3a590d[_0x4943ac(0x1e1)]?.[_0x4943ac(0x174)](_0x33ce70=>_0x33ce70[_0x4943ac(0x292)]===_0x4943ac(0x22e)),_0x5503f2=_0x26287?a46_0x5b905a[_0x4943ac(0x11a)](_0x4943ac(0x15b)):'';return'📁\x20'+_0x3a590d['name']+_0x5503f2;});await writeOutput(_0x346ead['join']('\x0a'),_0x2af486['output'],_0x149990(0x16a));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a46_0x38b2ab(0x1ad)]='workflow:workflows';['description']=a46_0x38b2ab(0x236);async[a46_0x38b2ab(0x224)](_0x14587e){const _0x3e25ee=a46_0x38b2ab,{options:_0xc343b,args:_0x347ca3,tdx:_0x412d46}=_0x14587e,_0x20ca60=this[_0x3e25ee(0x1ab)](_0x347ca3,_0xc343b);_0xc343b['verbose']&&_0x20ca60&&console['error'](_0x3e25ee(0x249)+_0x20ca60);const _0x5f3bd0=await withSpinner(_0x3e25ee(0x1bb),()=>_0x412d46[_0x3e25ee(0x164)]['workflows'](_0x20ca60,{'limit':_0xc343b[_0x3e25ee(0x216)]}),{'verbose':_0xc343b[_0x3e25ee(0x21b)]});let _0x7aa73a=_0x5f3bd0[_0x3e25ee(0x20c)];_0x7aa73a[_0x3e25ee(0x251)]((_0x4434e8,_0x11c10d)=>{const _0x339a2c=_0x3e25ee,_0x25a476=_0x4434e8[_0x339a2c(0x1ad)]['localeCompare'](_0x11c10d[_0x339a2c(0x1ad)]);if(_0x25a476!==0x0)return _0x25a476;return(_0x4434e8[_0x339a2c(0x1d8)]?.[_0x339a2c(0x1ad)]||'')[_0x339a2c(0x2a5)](_0x11c10d['project']?.[_0x339a2c(0x1ad)]||'');});const _0x5c43b7=_0xc343b[_0x3e25ee(0x216)]||0x64,_0x5e0099=_0x7aa73a[_0x3e25ee(0x1b6)]>=_0x5c43b7?a46_0x5b905a[_0x3e25ee(0x11a)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x3e25ee(0x219)](_0x3e25ee(0x122)+_0x7aa73a[_0x3e25ee(0x1b6)]+_0x3e25ee(0x1b1)+(_0x7aa73a['length']!==0x1?'s':'')+_0x5e0099);if(_0xc343b[_0x3e25ee(0x1d9)]===_0x3e25ee(0x1b5)||_0xc343b[_0x3e25ee(0x1d9)]===_0x3e25ee(0x147)||_0xc343b[_0x3e25ee(0x1d9)]==='table')await handleSDKOutput(_0x7aa73a,_0xc343b);else{if(_0x7aa73a[_0x3e25ee(0x1b6)]===0x0)_0x20ca60?console[_0x3e25ee(0x29e)](_0x3e25ee(0x2bb)+_0x20ca60):console['log'](_0x3e25ee(0x123));else{const _0x2169fd=_0xc343b[_0x3e25ee(0x1a1)],_0x4e474e=_0x7aa73a[_0x3e25ee(0x1c8)](_0x3b760d=>{const _0x55a9f1=_0x3e25ee,_0x17a6b2=a46_0x5b905a[_0x55a9f1(0x11a)]('#'+_0x3b760d['id']),_0x33a793=hyperlink(_0x17a6b2,getWorkflowUrl(_0x2169fd,_0x3b760d['id'])),_0x3d24f5=_0x3b760d[_0x55a9f1(0x1d8)]?.[_0x55a9f1(0x1ad)]?a46_0x5b905a[_0x55a9f1(0x11a)]('\x20('+_0x3b760d[_0x55a9f1(0x1d8)][_0x55a9f1(0x1ad)]+')'):'';return _0x55a9f1(0x161)+_0x33a793+'\x20'+_0x3b760d['name']+_0x3d24f5;});await writeOutput(_0x4e474e['join']('\x0a'),_0xc343b[_0x3e25ee(0x1e8)],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x1c7);[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x257);async[a46_0x38b2ab(0x224)](_0x5672f5){const _0x13c212=a46_0x38b2ab,{options:_0x212b51,args:_0x46fb78,tdx:_0x32d232}=_0x5672f5,_0x206bdc=this[_0x13c212(0x1da)](_0x46fb78,_0x212b51);if(!_0x206bdc)return 0x1;const {projectName:_0x1c9da6,workflowName:_0x3ef121}=_0x206bdc;if(_0x212b51[_0x13c212(0x21b)]){if(_0x1c9da6&&_0x3ef121)console['error'](_0x13c212(0x23b)+_0x1c9da6+'.'+_0x3ef121);else _0x1c9da6&&console[_0x13c212(0x219)]('Filter:\x20project='+_0x1c9da6);const _0x5c6b5d=_0x212b51[_0x13c212(0x11c)];_0x5c6b5d&&console[_0x13c212(0x219)](_0x13c212(0x2ad)+_0x5c6b5d);}let _0x3caf2e=0x28;if(process['stdout'][_0x13c212(0x1f4)]&&!_0x212b51[_0x13c212(0x1e8)]&&!_0x212b51['format']){const _0x416c85=process[_0x13c212(0x140)][_0x13c212(0x1ea)]||0x28;_0x3caf2e=Math['max'](0x14,Math['floor'](_0x416c85*0x2/0x3));}const _0x290e68=_0x212b51[_0x13c212(0x216)]||_0x3caf2e,_0x5bbe26=await withSpinner(_0x13c212(0x175),()=>_0x32d232['workflow'][_0x13c212(0x17c)]({'projectName':_0x1c9da6,'workflowName':_0x3ef121,'status':_0x212b51[_0x13c212(0x11c)],'fromTime':_0x212b51['from'],'toTime':_0x212b51['to'],'limit':_0x290e68}),{'verbose':_0x212b51[_0x13c212(0x21b)]}),_0x1acb27=_0x5bbe26['data'];_0x1acb27[_0x13c212(0x251)]((_0x1ce5e0,_0x10cf66)=>{const _0x5d9f64=_0x13c212,_0x5d2a76=_0x1ce5e0[_0x5d9f64(0x1c6)]||'',_0x3e20de=_0x10cf66['sessionTime']||'';return _0x3e20de['localeCompare'](_0x5d2a76);});_0x1acb27[_0x13c212(0x1b6)]>=_0x290e68?console[_0x13c212(0x219)](_0x13c212(0x25e)+_0x1acb27[_0x13c212(0x1b6)]+_0x13c212(0x294)+a46_0x5b905a[_0x13c212(0x11a)](_0x13c212(0x1ba))):console[_0x13c212(0x219)]('✔\x20Found\x20'+_0x1acb27['length']+_0x13c212(0x173)+(_0x1acb27[_0x13c212(0x1b6)]!==0x1?'s':''));if(_0x212b51[_0x13c212(0x1d9)]===_0x13c212(0x1b5)||_0x212b51[_0x13c212(0x1d9)]==='jsonl'||_0x212b51[_0x13c212(0x1d9)]===_0x13c212(0x1f8))await handleSDKOutput(_0x1acb27,_0x212b51);else{if(!process[_0x13c212(0x140)][_0x13c212(0x1f4)]||_0x212b51['output']){if(_0x1acb27['length']===0x0){if(_0x1c9da6&&_0x3ef121)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x1c9da6+'.'+_0x3ef121);else _0x1c9da6?console['log'](_0x13c212(0x285)+_0x1c9da6):console['log'](_0x13c212(0x14b));}else{const _0x5a7fa2=_0x212b51[_0x13c212(0x1a1)],_0x33c6c2=this[_0x13c212(0x210)](_0x1acb27,_0x5a7fa2);_0x212b51['output']?await writeOutput(_0x33c6c2,_0x212b51[_0x13c212(0x1e8)],'list'):console['log'](_0x33c6c2);}!_0x1c9da6&&(console['error'](''),console[_0x13c212(0x219)](a46_0x5b905a[_0x13c212(0x11a)](_0x13c212(0x1c4))),console[_0x13c212(0x219)](a46_0x5b905a[_0x13c212(0x11a)](_0x13c212(0x178))+'or'+a46_0x5b905a[_0x13c212(0x11a)](_0x13c212(0x245))));}else{if(_0x1acb27[_0x13c212(0x1b6)]===0x0){if(_0x1c9da6&&_0x3ef121)console[_0x13c212(0x29e)]('No\x20sessions\x20found\x20for:\x20'+_0x1c9da6+'.'+_0x3ef121);else _0x1c9da6?console['log'](_0x13c212(0x285)+_0x1c9da6):console[_0x13c212(0x29e)]('No\x20sessions\x20found');}else await this[_0x13c212(0x268)](_0x1acb27,_0x5672f5,_0x1c9da6);}}return 0x0;}[a46_0x38b2ab(0x210)](_0x168743,_0x561643){const _0x432bc1=a46_0x38b2ab,_0x1211ab=[],_0x3be263=new Map();let _0x4f79d1=Infinity,_0x1057d7=-Infinity;for(const _0x5e5de5 of _0x168743){if(_0x5e5de5[_0x432bc1(0x12e)]?.[_0x432bc1(0x1a2)]){const _0x47bcc7=new Date(_0x5e5de5[_0x432bc1(0x12e)][_0x432bc1(0x1a2)])[_0x432bc1(0x1b4)](),_0x1e2198=_0x5e5de5[_0x432bc1(0x12e)][_0x432bc1(0x2c5)]?new Date(_0x5e5de5[_0x432bc1(0x12e)][_0x432bc1(0x2c5)])[_0x432bc1(0x1b4)]():Date[_0x432bc1(0x19a)](),_0x2e423b=_0x5e5de5[_0x432bc1(0x1d8)]?.['name']||_0x432bc1(0x1db);!_0x3be263[_0x432bc1(0x21f)](_0x2e423b)&&_0x3be263[_0x432bc1(0x18d)](_0x2e423b,[]),_0x3be263[_0x432bc1(0x1e0)](_0x2e423b)[_0x432bc1(0x28b)]({'session':_0x5e5de5,'startTime':_0x47bcc7,'endTime':_0x1e2198,'duration':_0x1e2198-_0x47bcc7}),_0x4f79d1=Math[_0x432bc1(0x12a)](_0x4f79d1,_0x47bcc7),_0x1057d7=Math[_0x432bc1(0x1ff)](_0x1057d7,_0x1e2198);}}if(_0x3be263[_0x432bc1(0x11f)]===0x0)return _0x432bc1(0x221);const _0x5daa6c=process['stdout']['columns']||0x78,_0x18a4d6=0x1e,_0x2d45d7=0x32,_0x3dcd92=0x4,_0x5faacb=Math[_0x432bc1(0x12a)](_0x2d45d7,Math[_0x432bc1(0x1ff)](_0x18a4d6,Math[_0x432bc1(0x2ac)](_0x5daa6c*0.3))),_0xdc10d5=_0x5daa6c-_0x5faacb-TIMELINE_CONFIG[_0x432bc1(0x1e5)]-0x3-_0x3dcd92,_0x1d5ff7=_0x1057d7-_0x4f79d1,_0x47afac=_0x1d5ff7/_0x5faacb,_0x1a7146=renderTimeAxis({'startTime':_0x4f79d1,'endTime':_0x1057d7,'durationMs':_0x1d5ff7,'msPerChar':_0x47afac},_0x5faacb),_0x2799ad=[];for(const _0x2e5744 of _0x3be263[_0x432bc1(0x20b)]()){_0x2799ad['push'](..._0x2e5744);}_0x2799ad[_0x432bc1(0x251)]((_0x36cfd8,_0x550e6d)=>_0x550e6d['startTime']-_0x36cfd8['startTime']);const _0x498da2=new Date(_0x4f79d1),_0x31ca38=formatDate(_0x498da2),_0x36c06b=_0x3dcd92+TIMELINE_CONFIG[_0x432bc1(0x271)]+TIMELINE_CONFIG['ICON_SPACING']+_0xdc10d5,_0x38229f='\x20'[_0x432bc1(0x160)](_0x36c06b-_0x31ca38['length']),_0x361552=_0x38229f+a46_0x5b905a[_0x432bc1(0x11a)](_0x31ca38)+'\x20'+_0x1a7146;_0x1211ab[_0x432bc1(0x28b)](_0x361552);const _0x2579c3=0x16;let _0x1704f1=0x0;for(const _0x38a876 of _0x2799ad){const _0xc8ac2b=_0x38a876[_0x432bc1(0x277)][_0x432bc1(0x1d8)]?.[_0x432bc1(0x1ad)]||'?',_0x2d67fc=Math['min'](stringWidth(_0xc8ac2b),_0x2579c3);_0x1704f1=Math[_0x432bc1(0x1ff)](_0x1704f1,_0x2d67fc);}for(const _0x13f8fa of _0x2799ad){const {session:_0x159569,startTime:_0x333b,endTime:_0x91bfb8,duration:_0x3f33b1}=_0x13f8fa,_0x48b8ba=_0x159569[_0x432bc1(0x1d8)]?.['id'],_0x441813=_0x159569['id'],_0x1c0c06=_0x159569['project']?.[_0x432bc1(0x1ad)]||'?',_0x3511d8=_0x159569[_0x432bc1(0x164)]?.[_0x432bc1(0x1ad)]||'?';let _0x3990ce,_0x8c938b;if(_0x159569[_0x432bc1(0x12e)]){const _0x4931ad=_0x159569[_0x432bc1(0x12e)];!_0x4931ad[_0x432bc1(0x13c)]?(_0x3990ce=_0x4931ad[_0x432bc1(0x1c9)]?'🛑':'🔄',_0x8c938b=_0x4931ad[_0x432bc1(0x1c9)]?a46_0x5b905a['yellow']:a46_0x5b905a[_0x432bc1(0x214)]):(_0x3990ce=_0x4931ad[_0x432bc1(0x1fd)]?'✅':'❌',_0x8c938b=_0x4931ad[_0x432bc1(0x1fd)]?a46_0x5b905a['green']:a46_0x5b905a[_0x432bc1(0x202)]);}else _0x3990ce='⏳',_0x8c938b=a46_0x5b905a['dim'];const _0x252be3='#'+_0x441813,_0x44d723=_0x48b8ba?hyperlink(_0x252be3,getWorkflowSessionUrl(_0x561643,_0x48b8ba,_0x441813)):_0x252be3;let _0x462e39=_0x1c0c06;stringWidth(_0x1c0c06)>_0x2579c3&&(_0x462e39=_0x1c0c06['slice'](0x0,_0x2579c3-0x1)+'…');const _0x3aa87b=a46_0x5b905a[_0x432bc1(0x11a)](_0x462e39),_0x88004f=stringWidth(_0x462e39),_0x45c00d='\x20'[_0x432bc1(0x160)](_0x1704f1-stringWidth(_0x462e39)+0x2),_0x133bd0='('+formatElapsed(_0x3f33b1)+')',_0x53ad00=stringWidth(_0x133bd0),_0x429d4a=stringWidth(_0x252be3),_0x35dd82=_0x429d4a+0x1+_0x88004f+_0x45c00d[_0x432bc1(0x1b6)],_0x21a117=_0xdc10d5-_0x35dd82-_0x53ad00-0x1-0x8;let _0x1accbf=_0x3511d8;stringWidth(_0x1accbf)>_0x21a117&&(_0x1accbf=_0x1accbf['slice'](0x0,_0x21a117-0x1)+'…');const _0x1a63c1=_0x44d723+'\x20'+_0x3aa87b+_0x45c00d+_0x1accbf,_0x59484e=stringWidth(_0x1a63c1),_0x1729ee=_0xdc10d5-_0x59484e-_0x53ad00,_0x1a525b=_0x1a63c1+'\x20'[_0x432bc1(0x160)](Math[_0x432bc1(0x1ff)](0x1,_0x1729ee))+a46_0x5b905a[_0x432bc1(0x11a)](_0x133bd0),_0x638550=Math[_0x432bc1(0x2ac)]((_0x333b-_0x4f79d1)/_0x47afac),_0x3a3115=Math[_0x432bc1(0x2ac)]((_0x91bfb8-_0x4f79d1)/_0x47afac),_0x5b4c95=Math['max'](_0x638550+0x1,_0x3a3115),_0x366fb9=new Array(_0x5faacb)[_0x432bc1(0x293)]('\x20');for(let _0x3b8b9e=_0x638550;_0x3b8b9e<Math['min'](_0x5b4c95,_0x5faacb);_0x3b8b9e++){_0x366fb9[_0x3b8b9e]='─';}const _0x5c091a=_0x366fb9[_0x432bc1(0x1c8)](_0x15a835=>_0x15a835==='\x20'?'\x20':_0x8c938b(_0x15a835))['join']('');_0x1211ab['push'](_0x3990ce+'\x20'+_0x1a525b+'│'+_0x5c091a+'│');}return _0x1211ab[_0x432bc1(0x2af)]('\x0a');}async[a46_0x38b2ab(0x268)](_0x2ea3cc,_0x1384f7,_0x59e073){const _0x46fc65=a46_0x38b2ab,{options:_0x5a63e6,tdx:_0x36ebac}=_0x1384f7,_0x36a505=_0x5a63e6[_0x46fc65(0x1a1)],{timelineRows:_0x38fa6b,timeAxisHeader:_0x37ba21}=this[_0x46fc65(0x143)](_0x2ea3cc,_0x36a505),_0x4a6021=_0x38fa6b[_0x46fc65(0x29f)](_0x125d64=>_0x125d64[_0x46fc65(0x2ae)]);if(_0x4a6021[_0x46fc65(0x1b6)]===0x0){const _0x5e8b41=this[_0x46fc65(0x210)](_0x2ea3cc,_0x36a505);console[_0x46fc65(0x29e)](_0x5e8b41);!_0x59e073&&(console[_0x46fc65(0x219)](''),console[_0x46fc65(0x219)](a46_0x5b905a[_0x46fc65(0x11a)](_0x46fc65(0x1c4))),console[_0x46fc65(0x219)](a46_0x5b905a[_0x46fc65(0x11a)](_0x46fc65(0x178))+'or'+a46_0x5b905a[_0x46fc65(0x11a)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x37ba21&&console[_0x46fc65(0x29e)](_0x37ba21);const _0x1e92a3=_0x38fa6b[_0x46fc65(0x29f)](_0x3ebac8=>_0x3ebac8[_0x46fc65(0x2ae)])[_0x46fc65(0x1c8)](_0x226743=>({'title':_0x226743['displayLine'],'value':_0x226743['attemptId']})),_0x56f3d5=process[_0x46fc65(0x140)][_0x46fc65(0x1ea)]||0x3c,_0x535aeb=Math[_0x46fc65(0x1ff)](0x28,Math[_0x46fc65(0x2ac)](_0x56f3d5*0x2/0x3)),_0x2a265c=await a46_0x143713({'type':_0x46fc65(0x117),'name':_0x46fc65(0x2ae),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x1e92a3,'initial':-0x1,'limit':_0x535aeb,'clearFirst':!![],'fallback':{'title':_0x46fc65(0x25b),'value':null},'suggest':(_0x235ebb,_0x15a9e8)=>{const _0x5edbce=_0x46fc65;if(!_0x235ebb)return Promise[_0x5edbce(0x204)](_0x15a9e8);const _0x4c539f=_0x15a9e8[_0x5edbce(0x29f)](_0x3323a0=>{const _0x27500d=_0x5edbce,_0x207518=_0x3323a0;return _0x207518[_0x27500d(0x1d2)][_0x27500d(0x14c)]()[_0x27500d(0x1a8)](_0x235ebb[_0x27500d(0x14c)]());});return Promise['resolve'](_0x4c539f);}}),_0x282cab=()=>{const _0x529c45=_0x46fc65;process[_0x529c45(0x140)][_0x529c45(0x179)](_0x529c45(0x180)),process[_0x529c45(0x140)][_0x529c45(0x179)](_0x529c45(0x180)),process['stdout']['write'](_0x529c45(0x180));},_0x3288f4=_0x2a265c&&_0x2a265c[_0x46fc65(0x2ae)]&&_0x2a265c[_0x46fc65(0x2ae)]!==null&&_0x2a265c[_0x46fc65(0x2ae)]['trim']()!=='';if(!_0x3288f4){_0x282cab(),console['log'](a46_0x5b905a['dim'](_0x46fc65(0x291)));return;}_0x282cab();const _0x4e7427=_0x2ea3cc[_0x46fc65(0x13a)](_0x2ce1b5=>_0x2ce1b5[_0x46fc65(0x12e)]?.['id']===_0x2a265c[_0x46fc65(0x2ae)]);if(_0x4e7427){const _0x235d85=_0x4e7427[_0x46fc65(0x1d8)]?.[_0x46fc65(0x1ad)]||'?',_0x5ac9b2=_0x4e7427[_0x46fc65(0x164)]?.[_0x46fc65(0x1ad)]||'?';console[_0x46fc65(0x29e)](_0x46fc65(0x26a)+a46_0x5b905a[_0x46fc65(0x11a)](_0x235d85)+_0x46fc65(0x27c)+a46_0x5b905a[_0x46fc65(0x11a)](_0x5ac9b2));}const _0x5077ea=new WorkflowTimelineCommand();await _0x5077ea[_0x46fc65(0x224)]({'args':[],'options':{..._0x5a63e6,'attemptId':_0x2a265c['attemptId']},'tdx':_0x36ebac});}[a46_0x38b2ab(0x143)](_0x22cf25,_0x23495c){const _0x2fed7b=a46_0x38b2ab,_0x2bfb42=new Map();for(const _0x4b24ee of _0x22cf25){_0x4b24ee['id']&&_0x4b24ee[_0x2fed7b(0x12e)]?.['id']&&_0x2bfb42[_0x2fed7b(0x18d)](_0x4b24ee['id'],_0x4b24ee['lastAttempt']['id']);}const _0x2647f6=[];let _0x15e4e5='';const _0x571afb=this[_0x2fed7b(0x210)](_0x22cf25,_0x23495c),_0x497aaf=_0x571afb[_0x2fed7b(0x2c8)]('\x0a');for(const _0x3be696 of _0x497aaf){if(_0x3be696['startsWith'](_0x2fed7b(0x156))||_0x3be696[_0x2fed7b(0x246)](/^\s+\d{4}-\d{2}-\d{2}/))_0x15e4e5=_0x3be696;else{if(_0x3be696[_0x2fed7b(0x246)](/^[✅❌🔄🛑⏳]/)){const _0x7b3e3a=_0x3be696['match'](/#(\d+)/),_0x181012=_0x7b3e3a?_0x7b3e3a[0x1]:null,_0x58454c=_0x181012?_0x2bfb42[_0x2fed7b(0x1e0)](_0x181012)||null:null,_0x30e9f4=_0x22cf25['find'](_0x329219=>_0x329219['id']===_0x181012),_0x5eca9a=_0x30e9f4?.[_0x2fed7b(0x1d8)]?.[_0x2fed7b(0x1ad)]||'';_0x2647f6['push']({'displayLine':_0x3be696,'attemptId':_0x58454c,'projectName':_0x5eca9a});}}}return{'timelineRows':_0x2647f6,'timeAxisHeader':_0x15e4e5};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a46_0x38b2ab(0x1ad)]='workflow:attempts';[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x2ca);async[a46_0x38b2ab(0x224)](_0x13224f){const _0x598467=a46_0x38b2ab,{options:_0x2e400c,args:_0x4edd3b,tdx:_0x4e2543}=_0x13224f,_0x13784e=this[_0x598467(0x1da)](_0x4edd3b,_0x2e400c);if(!_0x13784e)return 0x1;const {projectName:_0x1e31bb,workflowName:_0x12bbcc}=_0x13784e,_0x4cb483=_0x2e400c['includeRetried'];if(_0x2e400c['verbose']){if(_0x1e31bb&&_0x12bbcc)console['error'](_0x598467(0x23b)+_0x1e31bb+'.'+_0x12bbcc);else _0x1e31bb&&console['error'](_0x598467(0x209)+_0x1e31bb);_0x4cb483&&console[_0x598467(0x219)](_0x598467(0x16d));}const _0x1195ae=await withSpinner(_0x598467(0x248),()=>_0x4e2543[_0x598467(0x164)][_0x598467(0x169)]({'projectName':_0x1e31bb,'workflowName':_0x12bbcc,'includeRetried':_0x4cb483,'limit':_0x2e400c[_0x598467(0x216)]}),{'verbose':_0x2e400c[_0x598467(0x21b)]}),_0xe91dba=_0x1195ae['data'],_0x59beff=_0x2e400c['limit']||0x64,_0x134791=_0xe91dba[_0x598467(0x1b6)]>=_0x59beff?a46_0x5b905a[_0x598467(0x11a)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x598467(0x219)](_0x598467(0x122)+_0xe91dba[_0x598467(0x1b6)]+_0x598467(0x136)+(_0xe91dba[_0x598467(0x1b6)]!==0x1?'s':'')+_0x134791);if(_0x2e400c['format']===_0x598467(0x1b5)||_0x2e400c[_0x598467(0x1d9)]===_0x598467(0x147)||_0x2e400c[_0x598467(0x1d9)]===_0x598467(0x1f8))await handleSDKOutput(_0xe91dba,_0x2e400c);else{if(_0xe91dba[_0x598467(0x1b6)]===0x0){if(_0x1e31bb&&_0x12bbcc)console['log'](_0x598467(0x218)+_0x1e31bb+'.'+_0x12bbcc);else _0x1e31bb?console[_0x598467(0x29e)](_0x598467(0x150)+_0x1e31bb):console[_0x598467(0x29e)](_0x598467(0x1ae));}else{const _0x3d1e3c=_0x2e400c['site'],_0x2bb1a7=_0xe91dba['map'](_0x374573=>{const _0x5e6545=_0x598467,_0x50ddbd=a46_0x5b905a[_0x5e6545(0x11a)]('#'+_0x374573['id']),_0x4c816c=_0x374573['project']?.['id'],_0x29f334=_0x374573[_0x5e6545(0x115)]||_0x374573[_0x5e6545(0x225)],_0xaa958d=_0x4c816c&&_0x29f334?hyperlink(_0x50ddbd,getWorkflowAttemptUrl(_0x3d1e3c,_0x4c816c,_0x29f334,_0x374573['id'])):_0x50ddbd,{icon:_0x548d2a,text:_0x54dbaa}=getAttemptStatusDisplay(_0x374573),_0x2ba958=(_0x374573[_0x5e6545(0x1d8)]?.['name']||'?')+'.'+(_0x374573[_0x5e6545(0x164)]?.[_0x5e6545(0x1ad)]||'?'),_0x2215bc=_0x374573[_0x5e6545(0x1c6)]?a46_0x5b905a[_0x5e6545(0x11a)](_0x374573[_0x5e6545(0x1c6)]):'';return(_0xaa958d+'\x20'+_0x548d2a+(_0x54dbaa?'\x20'+_0x54dbaa:'')+'\x20'+_0x2ba958+'\x20'+_0x2215bc)[_0x5e6545(0x1fa)]();});await writeOutput(_0x2bb1a7['join']('\x0a'),_0x2e400c[_0x598467(0x1e8)],_0x598467(0x16a));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x18a);async[a46_0x38b2ab(0x224)](_0xe099fc){const _0x275cd5=a46_0x38b2ab,{options:_0x4cb301,args:_0x43320d,tdx:_0x11484a}=_0xe099fc,_0x27ffc5=_0x43320d[0x0];if(!_0x27ffc5)return console[_0x275cd5(0x219)](_0x275cd5(0x231)),0x1;_0x4cb301[_0x275cd5(0x21b)]&&console[_0x275cd5(0x219)]('Attempt\x20ID:\x20'+_0x27ffc5);const _0x452955=await withSpinner('Getting\x20attempt\x20details...',()=>_0x11484a['workflow'][_0x275cd5(0x1ec)](_0x27ffc5),{'verbose':_0x4cb301[_0x275cd5(0x21b)]}),_0x35d74d=_0x452955[_0x275cd5(0x20c)];let _0x5da7e3;!_0x35d74d['done']?_0x5da7e3=_0x35d74d[_0x275cd5(0x1c9)]?'canceling':_0x275cd5(0x139):_0x5da7e3=_0x35d74d['success']?_0x275cd5(0x1fd):_0x275cd5(0x219);let _0xb6dd9b;if(_0x35d74d[_0x275cd5(0x1a2)]&&_0x35d74d[_0x275cd5(0x2c5)]){const _0x198837=new Date(_0x35d74d[_0x275cd5(0x1a2)])[_0x275cd5(0x1b4)](),_0x5c5ade=new Date(_0x35d74d[_0x275cd5(0x2c5)])[_0x275cd5(0x1b4)]();_0xb6dd9b=Math[_0x275cd5(0x191)]((_0x5c5ade-_0x198837)/0x3e8);}const _0x195b34={'attempt_id':_0x35d74d['id'],'status':_0x5da7e3,..._0x35d74d['index']!==undefined&&{'index':_0x35d74d[_0x275cd5(0x270)]},..._0x35d74d['project']&&{'project':_0x35d74d['project'][_0x275cd5(0x1ad)]},..._0x35d74d[_0x275cd5(0x164)]&&{'workflow':_0x35d74d[_0x275cd5(0x164)][_0x275cd5(0x1ad)]},..._0x35d74d[_0x275cd5(0x225)]&&{'session_id':_0x35d74d[_0x275cd5(0x225)]},..._0x35d74d[_0x275cd5(0x1c6)]&&{'session_time':_0x35d74d[_0x275cd5(0x1c6)]},..._0x35d74d['retryAttemptName']&&{'retry_attempt':_0x35d74d[_0x275cd5(0x242)]},..._0xb6dd9b!==undefined&&{'duration_sec':_0xb6dd9b},..._0x35d74d['createdAt']&&{'created_at':_0x35d74d['createdAt']},..._0x35d74d[_0x275cd5(0x2c5)]&&{'finished_at':_0x35d74d[_0x275cd5(0x2c5)]},...Object[_0x275cd5(0x1a9)](_0x35d74d[_0x275cd5(0x29a)])[_0x275cd5(0x1b6)]>0x0&&{'params':_0x35d74d['params']}};return await handleSingleObjectOutput(_0x195b34,_0x4cb301),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a46_0x38b2ab(0x1a5);[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x194);async[a46_0x38b2ab(0x224)](_0x1dcc9d){const _0x405791=a46_0x38b2ab,{options:_0x136cac,args:_0x363648,tdx:_0x21ca89}=_0x1dcc9d,_0x41e80f=_0x363648[0x0];if(!_0x41e80f)return console[_0x405791(0x219)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x1ff247=_0x136cac['includeSubtasks'];_0x136cac[_0x405791(0x21b)]&&(console['error']('Attempt\x20ID:\x20'+_0x41e80f),_0x1ff247&&console[_0x405791(0x219)]('Including\x20subtasks:\x20yes'));const _0x38d279=await withSpinner(_0x405791(0x2a9),()=>_0x21ca89[_0x405791(0x164)][_0x405791(0x283)](_0x41e80f,_0x1ff247||![]),{'verbose':_0x136cac[_0x405791(0x21b)]}),_0x1939ed=_0x38d279[_0x405791(0x20c)];return console[_0x405791(0x219)](_0x405791(0x122)+_0x1939ed[_0x405791(0x1b6)]+_0x405791(0x278)+(_0x1939ed['length']!==0x1?'s':'')),await handleSDKOutput(_0x1939ed,_0x136cac),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x177);[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x28f);async[a46_0x38b2ab(0x224)](_0xa999f5){const _0x359259=a46_0x38b2ab,{options:_0x25c39b,args:_0xe871e7,tdx:_0x2d417e}=_0xa999f5,_0x275670=_0xe871e7[0x0];let _0x28631f=_0xe871e7[0x1];if(!_0x275670)return console[_0x359259(0x219)](_0x359259(0x231)),0x1;_0x25c39b['verbose']&&(console[_0x359259(0x219)](_0x359259(0x1a4)+_0x275670),_0x28631f&&console[_0x359259(0x219)]('Task\x20name:\x20'+_0x28631f));const _0x1f044d=await withSpinner(_0x359259(0x20a),()=>_0x2d417e['workflow'][_0x359259(0x247)](_0x275670,_0x28631f),{'verbose':_0x25c39b[_0x359259(0x21b)]}),_0x5045e7=_0x1f044d[_0x359259(0x20c)];if(_0x5045e7[_0x359259(0x1b6)]===0x0)return console[_0x359259(0x219)](_0x359259(0x2a4)),0x0;if(!_0x28631f&&(_0x25c39b[_0x359259(0x1b5)]||_0x25c39b[_0x359259(0x1d9)]))return await handleSDKOutput(_0x5045e7,_0x25c39b),0x0;if(!_0x28631f){const _0x2fdcc8=_0x5045e7['map'](_0x404aa3=>({'title':_0x404aa3['taskName']+'\x20('+formatBytes(_0x404aa3[_0x359259(0x23a)])+')','value':_0x404aa3[_0x359259(0x183)]})),_0x24781d=await a46_0x143713({'type':_0x359259(0x130),'name':'task','message':_0x359259(0x2b1),'choices':_0x2fdcc8});if(!_0x24781d[_0x359259(0x1cf)])return console[_0x359259(0x219)]('Cancelled'),0x0;_0x28631f=_0x24781d['task'];}const _0x128412=await withSpinner(_0x359259(0x1aa),()=>_0x2d417e[_0x359259(0x164)][_0x359259(0x1ce)](_0x275670,_0x28631f),{'verbose':_0x25c39b[_0x359259(0x21b)]}),_0x4797e4=_0x128412[_0x359259(0x20c)];return _0x4797e4?console[_0x359259(0x29e)](_0x4797e4):console[_0x359259(0x219)](_0x359259(0x1f6)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a46_0x38b2ab(0x16b);['description']='Kill\x20a\x20running\x20attempt';async['execute'](_0x533849){const _0x45ff90=a46_0x38b2ab,{options:_0x5a69b3,args:_0xdd4a1b,tdx:_0x489e12}=_0x533849,_0x5d53cd=_0xdd4a1b[0x0];if(!_0x5d53cd)return console[_0x45ff90(0x219)](_0x45ff90(0x231)),0x1;const _0x4d936a=_0x5a69b3['reason'];_0x5a69b3[_0x45ff90(0x21b)]&&(console[_0x45ff90(0x219)](_0x45ff90(0x1a4)+_0x5d53cd),_0x4d936a&&console[_0x45ff90(0x219)](_0x45ff90(0x233)+_0x4d936a));if(!_0x5a69b3[_0x45ff90(0x296)]){if(!isInteractive())return console[_0x45ff90(0x219)](a46_0x5b905a[_0x45ff90(0x202)](_0x45ff90(0x121)),_0x45ff90(0x128)),console[_0x45ff90(0x219)](a46_0x5b905a[_0x45ff90(0x11a)](_0x45ff90(0x2be))),0x1;const _0x1062ec=await confirmKey(_0x45ff90(0x24e)+_0x5d53cd+'?');if(!_0x1062ec)return console[_0x45ff90(0x219)](a46_0x5b905a[_0x45ff90(0x244)](_0x45ff90(0x291))),0x1;}const _0x10e0b7=await withSpinner(_0x45ff90(0x1c1),()=>_0x489e12[_0x45ff90(0x164)][_0x45ff90(0x1dd)](_0x5d53cd,_0x4d936a),{'verbose':_0x5a69b3[_0x45ff90(0x21b)]}),_0x248973=_0x10e0b7[_0x45ff90(0x20c)];return console[_0x45ff90(0x219)]('✔\x20'+_0x248973),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']='workflow:retry';[a46_0x38b2ab(0x18b)]='Retry\x20a\x20session\x20or\x20attempt';async[a46_0x38b2ab(0x224)](_0x272b1b){const _0x1fcec6=a46_0x38b2ab,{options:_0x5e4f26,args:_0x2e1b0a,tdx:_0x57cd02}=_0x272b1b,_0x3aee40=_0x2e1b0a[0x0];if(!_0x3aee40)return console['error']('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x1fcec6(0x219)](_0x1fcec6(0x288)),0x1;let _0x14d267=![],_0x4bcde1=_0x3aee40;if(_0x3aee40['startsWith'](_0x1fcec6(0x254)))_0x14d267=!![],_0x4bcde1=_0x3aee40[_0x1fcec6(0x19f)](0x8);else{if(_0x3aee40[_0x1fcec6(0x24c)](_0x1fcec6(0x205)))_0x14d267=![],_0x4bcde1=_0x3aee40['substring'](0x8);else return console[_0x1fcec6(0x219)](_0x1fcec6(0x1cd)),console[_0x1fcec6(0x219)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x2b3074=_0x5e4f26[_0x1fcec6(0x27b)],_0x1964fa=_0x5e4f26['resumeFrom'],_0x31a4cf=_0x5e4f26[_0x1fcec6(0x29a)],_0x3a12d8=_0x5e4f26['force'];_0x5e4f26[_0x1fcec6(0x21b)]&&(console['error'](_0x1fcec6(0x166)+(_0x14d267?'session':'attempt')+'\x20'+_0x4bcde1),_0x2b3074&&console[_0x1fcec6(0x219)](_0x1fcec6(0x26c)+_0x2b3074),_0x1964fa&&console[_0x1fcec6(0x219)](_0x1fcec6(0x267)+_0x1964fa),_0x31a4cf&&console['error'](_0x1fcec6(0x260)+_0x31a4cf),_0x3a12d8&&console[_0x1fcec6(0x219)](_0x1fcec6(0x189)));let _0x489077;if(_0x31a4cf)try{if(_0x31a4cf[_0x1fcec6(0x24c)]('@')){const _0x20c808=await import(_0x1fcec6(0x284)),_0x590e1f=_0x31a4cf['substring'](0x1),_0x3c54e8=await _0x20c808[_0x1fcec6(0x265)](_0x590e1f,_0x1fcec6(0x182));_0x489077=JSON[_0x1fcec6(0x1ac)](_0x3c54e8);}else _0x489077=JSON[_0x1fcec6(0x1ac)](_0x31a4cf);}catch{return console[_0x1fcec6(0x219)](_0x1fcec6(0x1b7)),0x1;}if(!_0x5e4f26[_0x1fcec6(0x296)]){if(!isInteractive())return console[_0x1fcec6(0x219)](a46_0x5b905a[_0x1fcec6(0x202)](_0x1fcec6(0x121)),_0x1fcec6(0x128)),console[_0x1fcec6(0x219)](a46_0x5b905a['dim'](_0x1fcec6(0x2be))),0x1;const _0x1cf749=await confirmKey(_0x1fcec6(0x1df)+(_0x14d267?_0x1fcec6(0x277):_0x1fcec6(0x1ec))+'\x20'+_0x4bcde1+'?');if(!_0x1cf749)return console[_0x1fcec6(0x219)](a46_0x5b905a[_0x1fcec6(0x244)](_0x1fcec6(0x291))),0x1;}let _0x32cb51;_0x14d267?_0x32cb51=await withSpinner('Retrying\x20session...',()=>_0x57cd02[_0x1fcec6(0x164)][_0x1fcec6(0x17d)](_0x4bcde1,{'fromTask':_0x2b3074,'retryParams':_0x489077}),{'verbose':_0x5e4f26[_0x1fcec6(0x21b)]}):_0x32cb51=await withSpinner(_0x1fcec6(0x21e),()=>_0x57cd02[_0x1fcec6(0x164)]['retryAttempt'](_0x4bcde1,{'resumeFrom':_0x1964fa,'retryParams':_0x489077,'force':_0x3a12d8}),{'verbose':_0x5e4f26['verbose']});const _0x3fe0f9=_0x32cb51['data'];return console[_0x1fcec6(0x219)]('✔\x20Retry\x20started'),console[_0x1fcec6(0x219)](_0x1fcec6(0x200)+_0x3fe0f9[_0x1fcec6(0x2ae)]),console[_0x1fcec6(0x219)](_0x1fcec6(0x298)+_0x3fe0f9[_0x1fcec6(0x225)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x2a7);['description']=a46_0x38b2ab(0x151);async[a46_0x38b2ab(0x224)](_0x469104){const _0x162c74=a46_0x38b2ab,{options:_0x21d0e1,args:_0x5ee1ea,tdx:_0x46cc7a}=_0x469104;let _0x2fc3a8=_0x5ee1ea[0x0];if(!_0x2fc3a8){const _0x5e6069=this[_0x162c74(0x1ab)]([],_0x21d0e1),_0x566ca8=await withSpinner(_0x162c74(0x2c9),()=>_0x46cc7a['workflow'][_0x162c74(0x1de)](_0x5e6069,{'limit':_0x21d0e1['limit']}),{'verbose':_0x21d0e1[_0x162c74(0x21b)]}),_0x51e8d2=_0x566ca8[_0x162c74(0x20c)];if(_0x51e8d2[_0x162c74(0x1b6)]===0x0)return console[_0x162c74(0x219)](_0x162c74(0x123)),!_0x5e6069&&console[_0x162c74(0x219)](a46_0x5b905a['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x48bd24=_0x51e8d2[_0x162c74(0x1c8)](_0x210c99=>({'title':_0x210c99[_0x162c74(0x1d8)]?.[_0x162c74(0x1ad)]+'.'+_0x210c99[_0x162c74(0x1ad)],'value':_0x210c99['project']?.[_0x162c74(0x1ad)]+'.'+_0x210c99[_0x162c74(0x1ad)],'description':_0x210c99['revision']?'revision:\x20'+_0x210c99[_0x162c74(0x1d0)]:undefined})),_0x53c667=await a46_0x143713({'type':'select','name':_0x162c74(0x164),'message':'Select\x20a\x20workflow\x20to\x20run','choices':_0x48bd24});if(!_0x53c667['workflow'])return 0x1;_0x2fc3a8=_0x53c667[_0x162c74(0x164)];}if(!_0x2fc3a8['includes']('.')){const _0x12a3eb=this[_0x162c74(0x1ab)]([],_0x21d0e1);if(_0x12a3eb)_0x2fc3a8=_0x12a3eb+'.'+_0x2fc3a8;else return console['error'](a46_0x5b905a[_0x162c74(0x202)](_0x162c74(0x25f)),_0x162c74(0x176)),console[_0x162c74(0x219)](a46_0x5b905a['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x1a608b=_0x21d0e1[_0x162c74(0x138)],_0x1a7ea2=_0x21d0e1[_0x162c74(0x1c6)],_0x193ae3={};if(_0x1a608b&&Array[_0x162c74(0x2a6)](_0x1a608b))for(const _0x4dc155 of _0x1a608b){const _0x274ab2=_0x4dc155['indexOf']('=');if(_0x274ab2===-0x1)return console[_0x162c74(0x219)](_0x162c74(0x250)+_0x4dc155),console[_0x162c74(0x219)](_0x162c74(0x167)),0x1;const _0xe655a2=_0x4dc155[_0x162c74(0x19f)](0x0,_0x274ab2),_0x31c447=_0x4dc155['substring'](_0x274ab2+0x1);try{_0x193ae3[_0xe655a2]=JSON[_0x162c74(0x1ac)](_0x31c447);}catch{_0x193ae3[_0xe655a2]=_0x31c447;}}_0x21d0e1['verbose']&&(console[_0x162c74(0x219)](_0x162c74(0x206)+_0x2fc3a8),Object[_0x162c74(0x1a9)](_0x193ae3)['length']>0x0&&console['error'](_0x162c74(0x163)+JSON[_0x162c74(0x228)](_0x193ae3)),_0x1a7ea2&&console[_0x162c74(0x219)](_0x162c74(0x14f)+_0x1a7ea2));const _0x5f0a66=await withSpinner(_0x162c74(0x1a0),()=>_0x46cc7a[_0x162c74(0x164)][_0x162c74(0x237)](_0x2fc3a8,_0x193ae3,{'sessionTime':_0x1a7ea2}),{'verbose':_0x21d0e1[_0x162c74(0x21b)]}),_0x38c7be=_0x5f0a66['data'];console[_0x162c74(0x219)](_0x162c74(0x1a6)),console[_0x162c74(0x219)]('\x20\x20Attempt\x20ID:\x20'+_0x38c7be['id']),console[_0x162c74(0x219)](_0x162c74(0x298)+_0x38c7be['sessionId']),console[_0x162c74(0x219)]('\x20\x20Project:\x20'+_0x38c7be[_0x162c74(0x1d8)]?.['name']),console[_0x162c74(0x219)](_0x162c74(0x2a3)+_0x38c7be[_0x162c74(0x164)]?.[_0x162c74(0x1ad)]);if(_0x38c7be['project']?.['id']&&_0x38c7be[_0x162c74(0x225)]&&_0x38c7be['id']){const _0x19f1b8=_0x21d0e1[_0x162c74(0x1a1)],_0xb9824f=getConsoleUrl(_0x19f1b8,_0x162c74(0x153)+_0x38c7be[_0x162c74(0x1d8)]['id']+_0x162c74(0x146)+_0x38c7be['sessionId']+_0x162c74(0x281)+_0x38c7be['id']);console[_0x162c74(0x219)](_0x162c74(0x2bd)+a46_0x5b905a[_0x162c74(0x1f1)](_0xb9824f));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x28e);['description']=a46_0x38b2ab(0x1f5);async[a46_0x38b2ab(0x224)](_0xdea84c){const _0x5b6483=a46_0x38b2ab,{options:_0x16f66e,args:_0x3f0d29,tdx:_0x501975}=_0xdea84c,_0xc21b09=_0x3f0d29[0x0],_0x31228a=_0x3f0d29[0x1]||'.';if(!_0xc21b09)return console[_0x5b6483(0x219)](_0x5b6483(0x274)),console['error'](_0x5b6483(0x28c)),0x1;const _0x26ac96=_0x16f66e['revision'];_0x16f66e[_0x5b6483(0x21b)]&&(console[_0x5b6483(0x219)](_0x5b6483(0x26a)+_0xc21b09),console[_0x5b6483(0x219)](_0x5b6483(0x159)+_0x31228a),_0x26ac96&&console['error'](_0x5b6483(0x195)+_0x26ac96));const _0x2ec214=await withSpinner(_0x5b6483(0x272)+_0xc21b09+_0x5b6483(0x15a),()=>_0x501975[_0x5b6483(0x164)]['download'](_0xc21b09,_0x31228a,{'revision':_0x26ac96}),{'verbose':_0x16f66e[_0x5b6483(0x21b)]}),_0x578161=_0x2ec214[_0x5b6483(0x20c)];return console[_0x5b6483(0x219)](_0x5b6483(0x1eb)+_0x578161['projectName']),console[_0x5b6483(0x219)](_0x5b6483(0x25c)+_0x578161[_0x5b6483(0x1d0)]),console[_0x5b6483(0x219)](_0x5b6483(0x185)+_0x578161['filesExtracted']),console[_0x5b6483(0x219)](_0x5b6483(0x261)+_0x31228a+'/'+_0x578161[_0x5b6483(0x120)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a46_0x38b2ab(0x1ad)]='workflow:upload';[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x1f2);async[a46_0x38b2ab(0x224)](_0x35a5bc){const _0x32a4fc=a46_0x38b2ab,{options:_0x5aa5b5,args:_0x2f3528,tdx:_0x5ea001}=_0x35a5bc;let _0x524799='.',_0x5b4caa=_0x5aa5b5['name'];if(_0x2f3528[0x0]){const {promises:_0xecdf12}=await import('fs');try{const _0x15ffed=await _0xecdf12[_0x32a4fc(0x1e9)](_0x2f3528[0x0]);if(_0x15ffed[_0x32a4fc(0x239)]())_0x524799=_0x2f3528[0x0];else return console['error'](_0x32a4fc(0x1ef)+_0x2f3528[0x0]+_0x32a4fc(0x124)),0x1;}catch{_0x5b4caa=_0x2f3528[0x0],_0x524799='.';}}const _0x560897=_0x5aa5b5[_0x32a4fc(0x1d0)],_0x30bb25=_0x5aa5b5['skipValidation'];_0x5aa5b5[_0x32a4fc(0x21b)]&&(console['error'](_0x32a4fc(0x1d4)+_0x524799),_0x5b4caa&&console[_0x32a4fc(0x219)](_0x32a4fc(0x26b)+_0x5b4caa),_0x560897&&console['error'](_0x32a4fc(0x195)+_0x560897),_0x30bb25&&console[_0x32a4fc(0x219)](_0x32a4fc(0x259)));const _0x28d93f=await withSpinner(_0x32a4fc(0x243),()=>_0x5ea001[_0x32a4fc(0x164)]['push'](_0x524799,{'projectName':_0x5b4caa,'revision':_0x560897,'skipValidation':_0x30bb25}),{'verbose':_0x5aa5b5[_0x32a4fc(0x21b)]}),_0x1b640c=_0x28d93f[_0x32a4fc(0x20c)];return console[_0x32a4fc(0x219)](_0x32a4fc(0x187)+_0x1b640c[_0x32a4fc(0x120)]),console[_0x32a4fc(0x219)](_0x32a4fc(0x11e)+_0x1b640c[_0x32a4fc(0x287)]),console[_0x32a4fc(0x219)](_0x32a4fc(0x25c)+_0x1b640c[_0x32a4fc(0x1d0)]),await this[_0x32a4fc(0x20e)](_0x5ea001,_0x1b640c[_0x32a4fc(0x120)],_0x5aa5b5[_0x32a4fc(0x1a1)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x1e3);[a46_0x38b2ab(0x18b)]='Pull\x20workflow\x20project\x20to\x20local\x20folder';async[a46_0x38b2ab(0x224)](_0x3b6a1a){const _0x66e239=a46_0x38b2ab,{options:_0x36684c,args:_0x2536c6,tdx:_0x1d2d1b}=_0x3b6a1a,_0x467c85=_0x2536c6[0x0],_0x499feb=_0x2536c6[0x1];if(!_0x467c85)return console[_0x66e239(0x219)](a46_0x5b905a[_0x66e239(0x202)]('Error:'),'Project\x20name\x20is\x20required'),console[_0x66e239(0x219)](a46_0x5b905a[_0x66e239(0x11a)](_0x66e239(0x286))),0x1;const _0x50337d=_0x36684c[_0x66e239(0x1d0)];_0x36684c[_0x66e239(0x21b)]&&(console['error']('Project:\x20'+_0x467c85),_0x499feb&&console[_0x66e239(0x219)](_0x66e239(0x1d7)+_0x499feb),_0x50337d&&console[_0x66e239(0x219)](_0x66e239(0x195)+_0x50337d),_0x36684c[_0x66e239(0x142)]&&console['error']('Dry\x20run:\x20yes'));const _0x1dff53=await withSpinner(_0x66e239(0x20f)+_0x467c85+_0x66e239(0x15a),()=>_0x1d2d1b['workflow']['pullProject'](_0x467c85,{'targetDir':_0x499feb,'revision':_0x50337d}),{'verbose':_0x36684c[_0x66e239(0x21b)]}),_0x4fc261=_0x1dff53[_0x66e239(0x20c)];_0x4fc261[_0x66e239(0x1e4)]?console['error'](_0x66e239(0x112)+_0x4fc261['projectName']):console[_0x66e239(0x219)]('→\x20Project:\x20'+_0x4fc261[_0x66e239(0x120)]);console['error']('\x20\x20Revision:\x20'+_0x4fc261['revision']),console[_0x66e239(0x219)](_0x66e239(0x23e)+(a46_0x985414[_0x66e239(0x148)](process[_0x66e239(0x2bc)](),_0x4fc261[_0x66e239(0x2a8)])||'.')),console[_0x66e239(0x219)]('\x20\x20Changes:\x20'+a46_0x5b905a[_0x66e239(0x155)]('+'+_0x4fc261[_0x66e239(0x207)]['new']+_0x66e239(0x297))+',\x20'+(a46_0x5b905a[_0x66e239(0x244)]('~'+_0x4fc261['summary']['modified']+'\x20modified')+',\x20')+(a46_0x5b905a[_0x66e239(0x202)]('-'+_0x4fc261[_0x66e239(0x207)][_0x66e239(0x235)]+'\x20deleted')+',\x20')+(''+a46_0x5b905a['dim'](_0x4fc261[_0x66e239(0x207)][_0x66e239(0x168)]+'\x20unchanged')));for(const _0x50939b of _0x4fc261[_0x66e239(0x1bc)]){_0x50939b[_0x66e239(0x275)]===_0x66e239(0x201)&&_0x50939b[_0x66e239(0x27e)]&&(console[_0x66e239(0x219)]('\x0a'+a46_0x5b905a[_0x66e239(0x1f1)](_0x66e239(0x2c2)+_0x50939b[_0x66e239(0x229)])),console[_0x66e239(0x219)](_0x50939b[_0x66e239(0x27e)]));}if(!_0x4fc261[_0x66e239(0x1e7)])return saveSessionContext({'workflow_project':_0x4fc261['projectName']},_0x36684c['session']),console[_0x66e239(0x219)](a46_0x5b905a[_0x66e239(0x155)](_0x66e239(0x1d5))),console[_0x66e239(0x219)](a46_0x5b905a['dim']('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x4fc261[_0x66e239(0x120)])),0x0;if(_0x36684c[_0x66e239(0x142)])return console[_0x66e239(0x219)](a46_0x5b905a[_0x66e239(0x244)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x36684c[_0x66e239(0x296)]){if(!isInteractive())return console[_0x66e239(0x219)](a46_0x5b905a[_0x66e239(0x202)](_0x66e239(0x121)),_0x66e239(0x128)),console[_0x66e239(0x219)](a46_0x5b905a[_0x66e239(0x11a)](_0x66e239(0x2be))),0x1;const _0x10838d=await confirmKey(_0x66e239(0x197));if(!_0x10838d)return console[_0x66e239(0x219)](a46_0x5b905a['yellow'](_0x66e239(0x291)),_0x66e239(0x15e)),0x1;}await withSpinner(_0x66e239(0x2ab),()=>_0x1d2d1b[_0x66e239(0x164)][_0x66e239(0x2cb)](_0x4fc261,{'revision':_0x50337d}),{'verbose':_0x36684c[_0x66e239(0x21b)]}),saveSessionContext({'workflow_project':_0x4fc261['projectName']},_0x36684c[_0x66e239(0x277)]),console[_0x66e239(0x219)](a46_0x5b905a[_0x66e239(0x155)](_0x66e239(0x1fb)));const _0x42294e=a46_0x985414['relative'](process[_0x66e239(0x2bc)](),_0x4fc261[_0x66e239(0x2a8)])||'.';return console[_0x66e239(0x219)](a46_0x5b905a[_0x66e239(0x11a)](_0x66e239(0x261)+_0x42294e)),console['error'](a46_0x5b905a[_0x66e239(0x11a)](_0x66e239(0x165)+_0x4fc261[_0x66e239(0x120)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x152);[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x2b5);async[a46_0x38b2ab(0x224)](_0x5b38e4){const _0x364756=a46_0x38b2ab,{options:_0x588499,args:_0x197ac6,tdx:_0x465893}=_0x5b38e4,_0x188c08=this[_0x364756(0x2b8)](_0x197ac6,_0x588499),_0xbca01f=_0x588499[_0x364756(0x1d0)],_0xa9dc5e=_0x588499[_0x364756(0x213)];_0x588499[_0x364756(0x21b)]&&(_0x188c08&&console[_0x364756(0x219)](_0x364756(0x1d6)+_0x188c08),_0xbca01f&&console[_0x364756(0x219)](_0x364756(0x195)+_0xbca01f),_0x588499[_0x364756(0x142)]&&console[_0x364756(0x219)](_0x364756(0x232)),_0xa9dc5e&&console[_0x364756(0x219)](_0x364756(0x259)));let _0x458464;try{_0x458464=await withSpinner(_0x364756(0x269),()=>_0x465893[_0x364756(0x164)][_0x364756(0x295)]({'sourceDir':_0x188c08,'revision':_0xbca01f,'skipValidation':_0xa9dc5e}),{'verbose':_0x588499[_0x364756(0x21b)]});}catch(_0x417d16){if(_0x417d16 instanceof Error&&_0x417d16[_0x364756(0x1f0)][_0x364756(0x1a8)]('No\x20workflow\x20tdx.json\x20found'))return console[_0x364756(0x219)](a46_0x5b905a[_0x364756(0x202)](_0x364756(0x25f)),_0x364756(0x1bf)),_0x588499[_0x364756(0x27a)]?console[_0x364756(0x219)](a46_0x5b905a[_0x364756(0x11a)](_0x364756(0x290)+_0x588499['workflowProject']+_0x364756(0x226)+_0x588499['workflowProject']+'\x27')):console['error'](a46_0x5b905a[_0x364756(0x11a)](_0x364756(0x193))),0x1;throw _0x417d16;}const _0x5738c9=_0x458464[_0x364756(0x20c)];console['error'](_0x364756(0x192)+_0x5738c9[_0x364756(0x120)]),console[_0x364756(0x219)](_0x364756(0x279)+_0x5738c9[_0x364756(0x23d)]),console[_0x364756(0x219)](_0x364756(0x25c)+_0x5738c9[_0x364756(0x1d0)]),console[_0x364756(0x219)](_0x364756(0x230)+a46_0x5b905a['green']('+'+_0x5738c9[_0x364756(0x207)][_0x364756(0x119)]+_0x364756(0x297))+',\x20'+(a46_0x5b905a[_0x364756(0x244)]('~'+_0x5738c9['summary'][_0x364756(0x201)]+_0x364756(0x1f3))+',\x20')+(a46_0x5b905a['red']('-'+_0x5738c9[_0x364756(0x207)]['deleted']+_0x364756(0x158))+',\x20')+(''+a46_0x5b905a['dim'](_0x5738c9[_0x364756(0x207)][_0x364756(0x168)]+_0x364756(0x133))));for(const _0x18dd3e of _0x5738c9[_0x364756(0x1bc)]){_0x18dd3e['type']===_0x364756(0x201)&&_0x18dd3e['diff']&&(console['error']('\x0a'+a46_0x5b905a[_0x364756(0x1f1)]('---\x20'+_0x18dd3e[_0x364756(0x229)])),console['error'](_0x18dd3e['diff']));}if(!_0x5738c9[_0x364756(0x1e7)])return console['error'](a46_0x5b905a['green']('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x364756(0x20e)](_0x465893,_0x5738c9[_0x364756(0x120)],_0x588499[_0x364756(0x1a1)]),0x0;if(_0x588499[_0x364756(0x142)])return console[_0x364756(0x219)](a46_0x5b905a[_0x364756(0x244)](_0x364756(0x24a))),0x0;if(!_0x588499['yes']){if(!isInteractive())return console['error'](a46_0x5b905a[_0x364756(0x202)](_0x364756(0x121)),_0x364756(0x128)),console[_0x364756(0x219)](a46_0x5b905a[_0x364756(0x11a)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x172cd8=await confirmKey(_0x364756(0x255));if(!_0x172cd8)return console[_0x364756(0x219)](a46_0x5b905a[_0x364756(0x244)]('Cancelled'),_0x364756(0x2b3)),0x1;}const _0x5a80e5=await withSpinner('Pushing\x20project...',()=>_0x465893[_0x364756(0x164)][_0x364756(0x2cc)](_0x5738c9),{'verbose':_0x588499[_0x364756(0x21b)]}),_0x467912=_0x5a80e5[_0x364756(0x20c)];return console[_0x364756(0x219)](a46_0x5b905a['green']('✔\x20Push\x20complete')),console[_0x364756(0x219)](_0x364756(0x11e)+_0x467912['projectId']),console[_0x364756(0x219)]('\x20\x20Revision:\x20'+_0x467912['revision']),await this[_0x364756(0x20e)](_0x465893,_0x467912[_0x364756(0x120)],_0x588499[_0x364756(0x1a1)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a46_0x38b2ab(0x1ad)]='workflow:clone';[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x1a7);async[a46_0x38b2ab(0x224)](_0x2af158){const _0xb28794=a46_0x38b2ab,{options:_0x2ab5ed,args:_0x75a026,tdx:_0x17670b}=_0x2af158,_0xb99e2a=this[_0xb28794(0x2b8)](_0x75a026,_0x2ab5ed),_0x231bea=_0x2ab5ed[_0xb28794(0x1ad)],_0x51651f=_0x2ab5ed[_0xb28794(0x1d0)],_0x4871b9=_0x2ab5ed['skipValidation'];if(!_0xb99e2a)return console[_0xb28794(0x219)](a46_0x5b905a['red']('Error:'),_0xb28794(0x1d3)),console[_0xb28794(0x219)](a46_0x5b905a[_0xb28794(0x11a)](_0xb28794(0x15c))),console[_0xb28794(0x219)](a46_0x5b905a[_0xb28794(0x11a)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x231bea)return console[_0xb28794(0x219)](a46_0x5b905a[_0xb28794(0x202)](_0xb28794(0x25f)),_0xb28794(0x2b6)),console['error'](a46_0x5b905a[_0xb28794(0x11a)](_0xb28794(0x15c))),0x1;_0x2ab5ed[_0xb28794(0x21b)]&&(console[_0xb28794(0x219)](_0xb28794(0x1d6)+_0xb99e2a),console[_0xb28794(0x219)](_0xb28794(0x18f)+_0x231bea),_0x51651f&&console[_0xb28794(0x219)](_0xb28794(0x195)+_0x51651f),_0x2ab5ed[_0xb28794(0x142)]&&console[_0xb28794(0x219)](_0xb28794(0x232)),_0x4871b9&&console[_0xb28794(0x219)](_0xb28794(0x259)));const _0xd8f067=await withSpinner(_0xb28794(0x1f7),()=>_0x17670b[_0xb28794(0x164)][_0xb28794(0x252)](_0xb99e2a,_0x231bea,{'revision':_0x51651f,'skipValidation':_0x4871b9}),{'verbose':_0x2ab5ed[_0xb28794(0x21b)]}),_0xda66c=_0xd8f067[_0xb28794(0x20c)];console['error'](_0xb28794(0x141)+_0xda66c[_0xb28794(0x23d)]);_0xda66c[_0xb28794(0x2b0)]&&console[_0xb28794(0x219)](_0xb28794(0x134)+_0xda66c[_0xb28794(0x2b0)]);console[_0xb28794(0x219)](_0xb28794(0x18f)+_0xda66c[_0xb28794(0x2b7)]),console[_0xb28794(0x219)](_0xb28794(0x195)+_0xda66c[_0xb28794(0x1d0)]),console[_0xb28794(0x219)]('Files\x20to\x20upload:\x20'+_0xda66c[_0xb28794(0x1c5)]);_0xda66c['targetExists']&&(console[_0xb28794(0x219)](a46_0x5b905a[_0xb28794(0x244)](_0xb28794(0x2aa)+_0xda66c[_0xb28794(0x2b7)]+_0xb28794(0x13b)+_0xda66c[_0xb28794(0x137)]+')')),console['error'](a46_0x5b905a[_0xb28794(0x244)](_0xb28794(0x19e))));if(_0x2ab5ed['dryRun'])return console[_0xb28794(0x219)](a46_0x5b905a['yellow'](_0xb28794(0x2c0))),0x0;if(!_0x2ab5ed[_0xb28794(0x296)]){if(!isInteractive())return console[_0xb28794(0x219)](a46_0x5b905a[_0xb28794(0x202)](_0xb28794(0x121)),_0xb28794(0x128)),console[_0xb28794(0x219)](a46_0x5b905a['dim'](_0xb28794(0x2be))),0x1;const _0x558455=_0xda66c[_0xb28794(0x2b0)]||a46_0x985414[_0xb28794(0x14a)](_0xb99e2a),_0x2373f5=_0xda66c['targetExists']?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x231bea+_0xb28794(0x199):'\x0aClone\x20\x22'+_0x558455+_0xb28794(0x1fe)+_0x231bea+'\x22?',_0x44c4ec=await confirmKey(_0x2373f5);if(!_0x44c4ec)return console[_0xb28794(0x219)](a46_0x5b905a[_0xb28794(0x244)](_0xb28794(0x291))),0x1;}const _0x3bdaaa=await withSpinner(_0xda66c[_0xb28794(0x208)]?'Updating\x20'+_0x231bea+_0xb28794(0x15a):_0xb28794(0x184)+_0x231bea+_0xb28794(0x15a),()=>_0x17670b[_0xb28794(0x164)][_0xb28794(0x282)](_0xda66c),{'verbose':_0x2ab5ed['verbose']}),_0x42d3a7=_0x3bdaaa['data'];return console[_0xb28794(0x219)](a46_0x5b905a['green'](_0xda66c[_0xb28794(0x208)]?_0xb28794(0x19d):_0xb28794(0x135))),console['error'](_0xb28794(0x18e)+_0x42d3a7['newProjectName']),console[_0xb28794(0x219)]('\x20\x20Project\x20ID:\x20'+_0x42d3a7[_0xb28794(0x227)]),console[_0xb28794(0x219)]('\x20\x20Revision:\x20'+_0x42d3a7[_0xb28794(0x1d0)]),await this[_0xb28794(0x20e)](_0x17670b,_0x42d3a7[_0xb28794(0x2b7)],_0x2ab5ed['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x21a);[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x234);async[a46_0x38b2ab(0x224)](_0xa49b6c){const _0x57badf=a46_0x38b2ab,{options:_0x2aed2e,args:_0x58c0da,tdx:_0x414387}=_0xa49b6c,_0x13ed49=_0x58c0da[0x0];if(!_0x13ed49)return console[_0x57badf(0x219)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x57badf(0x219)](_0x57badf(0x12c)),0x1;_0x2aed2e[_0x57badf(0x21b)]&&console[_0x57badf(0x219)](_0x57badf(0x26a)+_0x13ed49);if(!_0x2aed2e['yes']){if(!isInteractive())return console['error'](a46_0x5b905a[_0x57badf(0x202)](_0x57badf(0x121)),_0x57badf(0x128)),console[_0x57badf(0x219)](a46_0x5b905a[_0x57badf(0x11a)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1bcd29=await confirmKey(_0x57badf(0x14d)+_0x13ed49+_0x57badf(0x223));if(!_0x1bcd29)return console[_0x57badf(0x219)](a46_0x5b905a[_0x57badf(0x244)](_0x57badf(0x291))),0x1;}const _0x3fa240=await withSpinner(_0x57badf(0x27d)+_0x13ed49+_0x57badf(0x15a),()=>_0x414387[_0x57badf(0x164)][_0x57badf(0x2b9)](_0x13ed49),{'verbose':_0x2aed2e[_0x57badf(0x21b)]}),_0x114e74=_0x3fa240[_0x57badf(0x20c)];return console[_0x57badf(0x219)](_0x57badf(0x241)+_0x114e74[_0x57badf(0x120)]),console[_0x57badf(0x219)](_0x57badf(0x11e)+_0x114e74['projectId']),0x0;}}export function parseKeyValue(_0x9ff542){const _0x1b0df5=a46_0x38b2ab,_0x577b08=_0x9ff542[_0x1b0df5(0x29d)]('=');if(_0x577b08===-0x1)throw new Error(_0x1b0df5(0x1c3)+_0x9ff542+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x2f2112=_0x9ff542[_0x1b0df5(0x19f)](0x0,_0x577b08),_0x144485=_0x9ff542['substring'](_0x577b08+0x1);if(!_0x2f2112)throw new Error(_0x1b0df5(0x17f));return{'key':_0x2f2112,'value':_0x144485};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x240);[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x21c);async[a46_0x38b2ab(0x224)](_0x3671aa){const _0x5581b0=a46_0x38b2ab,{options:_0x129d69,args:_0x45459f,tdx:_0x53633e}=_0x3671aa,_0x5bf80e=this[_0x5581b0(0x22d)](_0x45459f,_0x129d69);if(!_0x5bf80e)return 0x1;_0x129d69[_0x5581b0(0x21b)]&&console['error'](_0x5581b0(0x26a)+_0x5bf80e);const _0x59e73b=await withSpinner(_0x5581b0(0x20d),()=>_0x53633e[_0x5581b0(0x164)][_0x5581b0(0x2c3)](_0x5bf80e),{'verbose':_0x129d69[_0x5581b0(0x21b)]}),{secrets:_0xf08204}=_0x59e73b['data'];return console[_0x5581b0(0x219)]('✔\x20Found\x20'+_0xf08204[_0x5581b0(0x1b6)]+_0x5581b0(0x29b)+(_0xf08204['length']!==0x1?'s':'')),await handleSDKOutput(_0xf08204,_0x129d69),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x19b);['description']=a46_0x38b2ab(0x29c);async[a46_0x38b2ab(0x224)](_0x52ed58){const _0x13a217=a46_0x38b2ab,{options:_0x2c07d1,args:_0x53db7c,tdx:_0x44f2c1}=_0x52ed58;let _0x5dc353,_0x2979a0;if(_0x53db7c[_0x13a217(0x1b6)]>=0x2)_0x5dc353=_0x53db7c[0x0],_0x2979a0=_0x53db7c[0x1];else{if(_0x53db7c[_0x13a217(0x1b6)]===0x1&&_0x2c07d1[_0x13a217(0x27a)])_0x5dc353=_0x2c07d1[_0x13a217(0x27a)],_0x2979a0=_0x53db7c[0x0];else return _0x53db7c[_0x13a217(0x1b6)]===0x1?(console[_0x13a217(0x219)](_0x13a217(0x274)),console[_0x13a217(0x219)](_0x13a217(0x299)),0x1):(console['error'](_0x13a217(0x2a0)),console['error'](_0x13a217(0x1b0)),0x1);}let _0xdc22ab,_0x4d0af5;try{({key:_0xdc22ab,value:_0x4d0af5}=parseKeyValue(_0x2979a0));}catch(_0x1efaf5){return _0x1efaf5 instanceof Error&&console[_0x13a217(0x219)](a46_0x5b905a['red'](_0x13a217(0x25f)),_0x1efaf5[_0x13a217(0x1f0)]),0x1;}_0x2c07d1[_0x13a217(0x21b)]&&(console[_0x13a217(0x219)](_0x13a217(0x26a)+_0x5dc353),console[_0x13a217(0x219)](_0x13a217(0x2bf)+_0xdc22ab));const _0x491e5e=await withSpinner(_0x13a217(0x220),()=>_0x44f2c1['workflow'][_0x13a217(0x24b)](_0x5dc353,_0xdc22ab,_0x4d0af5),{'verbose':_0x2c07d1['verbose']}),_0x56f0d5=_0x491e5e[_0x13a217(0x20c)];return console['error'](_0x13a217(0x15d)+_0x56f0d5[_0x13a217(0x292)]+_0x13a217(0x222)+_0x56f0d5['projectName']+'\x27'),(_0x2c07d1['json']||_0x2c07d1[_0x13a217(0x147)])&&await handleSingleObjectOutput(_0x56f0d5,_0x2c07d1),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x238);[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x273);async[a46_0x38b2ab(0x224)](_0x48fbeb){const _0x307dab=a46_0x38b2ab,{options:_0x2812a9,args:_0x5501c2,tdx:_0xa5b7ff}=_0x48fbeb;let _0xaf366b,_0x30e51d;if(_0x5501c2[_0x307dab(0x1b6)]>=0x2)_0xaf366b=_0x5501c2[0x0],_0x30e51d=_0x5501c2[0x1];else{if(_0x5501c2['length']===0x1&&_0x2812a9[_0x307dab(0x27a)])_0xaf366b=_0x2812a9[_0x307dab(0x27a)],_0x30e51d=_0x5501c2[0x0];else return _0x5501c2['length']===0x1?(console[_0x307dab(0x219)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x307dab(0x299)),0x1):(console[_0x307dab(0x219)](_0x307dab(0x289)),console['error'](_0x307dab(0x11d)),0x1);}_0x2812a9[_0x307dab(0x21b)]&&(console[_0x307dab(0x219)](_0x307dab(0x26a)+_0xaf366b),console['error'](_0x307dab(0x2bf)+_0x30e51d));if(!_0x2812a9[_0x307dab(0x296)]){if(!isInteractive())return console['error'](a46_0x5b905a[_0x307dab(0x202)](_0x307dab(0x121)),_0x307dab(0x128)),console[_0x307dab(0x219)](a46_0x5b905a[_0x307dab(0x11a)](_0x307dab(0x2be))),0x1;const _0x4c5fed=await confirmKey(_0x307dab(0x276)+_0x30e51d+'\x27\x20from\x20project\x20\x27'+_0xaf366b+'\x27?');if(!_0x4c5fed)return console[_0x307dab(0x219)](a46_0x5b905a[_0x307dab(0x244)](_0x307dab(0x291))),0x1;}const _0x58130b=await withSpinner(_0x307dab(0x126),()=>_0xa5b7ff[_0x307dab(0x164)]['deleteSecret'](_0xaf366b,_0x30e51d),{'verbose':_0x2812a9['verbose']}),_0x5010d1=_0x58130b[_0x307dab(0x20c)];return console[_0x307dab(0x219)](_0x307dab(0x15d)+_0x5010d1[_0x307dab(0x292)]+_0x307dab(0x1cc)+_0x5010d1[_0x307dab(0x120)]+'\x27'),(_0x2812a9[_0x307dab(0x1b5)]||_0x2812a9[_0x307dab(0x147)])&&await handleSingleObjectOutput(_0x5010d1,_0x2812a9),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(_0x489cf9){const _0x16eea1=a46_0x38b2ab,_0x25d40f=Math[_0x16eea1(0x2ac)](_0x489cf9/0x3e8),_0x2f4624=Math[_0x16eea1(0x2ac)](_0x25d40f/0x3c),_0x6829ec=Math['floor'](_0x2f4624/0x3c),_0x3d56d2=Math[_0x16eea1(0x2ac)](_0x6829ec/0x18);if(_0x3d56d2>0x0){const _0x41b1b7=_0x6829ec%0x18;return _0x41b1b7>0x0?_0x3d56d2+'d\x20'+_0x41b1b7+'h':_0x3d56d2+'d';}else{if(_0x6829ec>0x0){const _0x476302=_0x2f4624%0x3c;return _0x476302>0x0?_0x6829ec+'h\x20'+_0x476302+'m':_0x6829ec+'h';}else{if(_0x2f4624>0x0){const _0x330ee6=_0x25d40f%0x3c;return _0x330ee6>0x0?_0x2f4624+'m\x20'+_0x330ee6+'s':_0x2f4624+'m';}else return _0x25d40f+'s';}}}function formatTimestamp(_0xf9f5d5,_0x3fa7aa){const _0x280b13=a46_0x38b2ab,_0x483b68=new Date(_0xf9f5d5),_0x381a30=String(_0x483b68[_0x280b13(0x1f9)]())[_0x280b13(0x264)](0x2,'0'),_0x47ee3c=String(_0x483b68[_0x280b13(0x263)]())[_0x280b13(0x264)](0x2,'0'),_0x5cbff6=_0x381a30+':'+_0x47ee3c,_0x51c8fa=_0x483b68['getFullYear']()===_0x3fa7aa[_0x280b13(0x266)]()&&_0x483b68['getMonth']()===_0x3fa7aa[_0x280b13(0x1fc)]()&&_0x483b68[_0x280b13(0x1c2)]()===_0x3fa7aa[_0x280b13(0x1c2)]();if(_0x51c8fa)return _0x5cbff6;else{const _0x3c455b=String(_0x483b68[_0x280b13(0x1fc)]()+0x1)[_0x280b13(0x264)](0x2,'0'),_0xb074a9=String(_0x483b68[_0x280b13(0x1c2)]())['padStart'](0x2,'0');return _0x3c455b+'-'+_0xb074a9+'\x20'+_0x5cbff6;}}function formatDate(_0x1f4af5){const _0x26658c=a46_0x38b2ab,_0x4f94ec=_0x1f4af5['getFullYear'](),_0x145dc6=String(_0x1f4af5[_0x26658c(0x1fc)]()+0x1)[_0x26658c(0x264)](0x2,'0'),_0x1f7454=String(_0x1f4af5[_0x26658c(0x1c2)]())[_0x26658c(0x264)](0x2,'0');return _0x4f94ec+'-'+_0x145dc6+'-'+_0x1f7454;}function getTaskStateIcon(_0x51ae31){const _0x147de6={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x147de6[_0x51ae31]||'⚪';}function getBarChar(_0x26f21d){const _0x292968=a46_0x38b2ab;return _0x26f21d===_0x292968(0x219)||_0x26f21d===_0x292968(0x280)?'×':'─';}function getBarColor(_0x2a8e9d){const _0x45c5aa=a46_0x38b2ab,_0x204ec3={'success':a46_0x5b905a[_0x45c5aa(0x155)],'error':a46_0x5b905a[_0x45c5aa(0x202)],'group_error':a46_0x5b905a[_0x45c5aa(0x202)],'running':a46_0x5b905a[_0x45c5aa(0x214)],'blocked':a46_0x5b905a[_0x45c5aa(0x244)],'planned':a46_0x5b905a[_0x45c5aa(0x11a)],'canceling':a46_0x5b905a[_0x45c5aa(0x244)]};return _0x204ec3[_0x2a8e9d]||a46_0x5b905a[_0x45c5aa(0x28a)];}function parseTaskName(_0x27e698){const _0x18026a=a46_0x38b2ab;let _0x42df6b=_0x27e698[_0x18026a(0x211)](/^\++/,'');const _0x2e715e=_0x42df6b[_0x18026a(0x2c8)]('+'),_0x14a20f=_0x2e715e[_0x18026a(0x1b6)]>0x1?_0x2e715e[_0x18026a(0x1b6)]-0x2:0x0,_0x19d484=_0x2e715e[_0x2e715e[_0x18026a(0x1b6)]-0x1]||_0x42df6b;return{'level':_0x14a20f,'name':'+'+_0x19d484};}function truncateTaskName(_0x2879e2,_0xcb2db3){const _0x213474=stringWidth(_0x2879e2);if(_0x213474<=_0xcb2db3)return _0x2879e2;let _0x2ac12d=_0x2879e2;while(stringWidth(_0x2ac12d+'…')>_0xcb2db3&&_0x2ac12d['length']>0x0){_0x2ac12d=_0x2ac12d['slice'](0x0,-0x1);}return _0x2ac12d+'…';}function calculateTimeScale(_0xa6ad0e,_0x4f2225){const _0x40c454=a46_0x38b2ab;return{'startTime':_0xa6ad0e[_0x40c454(0x1ee)],'endTime':_0xa6ad0e[_0x40c454(0x1d1)],'durationMs':_0xa6ad0e[_0x40c454(0x2c6)],'msPerChar':_0xa6ad0e[_0x40c454(0x2c6)]/_0x4f2225};}function timeToPosition(_0x1ed0a5,_0x2a9176,_0x47b743){const _0x4e8e9b=a46_0x38b2ab,_0x114cd7=_0x1ed0a5-_0x2a9176[_0x4e8e9b(0x17e)],_0x4be156=Math[_0x4e8e9b(0x2ac)](_0x114cd7/_0x2a9176[_0x4e8e9b(0x181)]);return Math[_0x4e8e9b(0x1ff)](0x0,Math[_0x4e8e9b(0x12a)](_0x4be156,_0x47b743));}function renderTimeAxis(_0x12150a,_0x1ce8d2){const _0x281cfe=a46_0x38b2ab,_0x2543de=Math[_0x281cfe(0x12a)](TIMELINE_CONFIG[_0x281cfe(0x22a)],Math[_0x281cfe(0x1ff)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x281cfe(0x2ac)](_0x1ce8d2/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x451c4b=_0x12150a[_0x281cfe(0x2ba)]/(_0x2543de-0x1),_0xfef750=new Date(_0x12150a[_0x281cfe(0x17e)]),_0x14b711=[];for(let _0x1ef61a=0x0;_0x1ef61a<_0x2543de;_0x1ef61a++){const _0x1f2bda=_0x12150a[_0x281cfe(0x17e)]+_0x1ef61a*_0x451c4b,_0x1b7188=timeToPosition(_0x1f2bda,_0x12150a,_0x1ce8d2),_0x103765=formatTimestamp(_0x1f2bda,_0xfef750);_0x14b711[_0x281cfe(0x28b)]({'pos':_0x1b7188,'text':_0x103765});}const _0x16eaa8=new Array(_0x1ce8d2)[_0x281cfe(0x293)]('\x20');let _0x6004cd=-0x1;for(const {pos:_0x20c349,text:_0x53e55a}of _0x14b711){let _0x2f3bb7=Math[_0x281cfe(0x1ff)](0x0,_0x20c349-Math[_0x281cfe(0x2ac)](_0x53e55a['length']/0x2));_0x2f3bb7<=_0x6004cd+TIMELINE_CONFIG[_0x281cfe(0x114)]&&(_0x2f3bb7=_0x6004cd+TIMELINE_CONFIG[_0x281cfe(0x114)]+0x1);_0x2f3bb7+_0x53e55a['length']>_0x1ce8d2&&(_0x2f3bb7=_0x1ce8d2-_0x53e55a[_0x281cfe(0x1b6)]);if(_0x2f3bb7>=0x0&&_0x2f3bb7+_0x53e55a[_0x281cfe(0x1b6)]<=_0x1ce8d2&&_0x2f3bb7>_0x6004cd){for(let _0x25cd63=0x0;_0x25cd63<_0x53e55a[_0x281cfe(0x1b6)];_0x25cd63++){_0x16eaa8[_0x2f3bb7+_0x25cd63]=_0x53e55a[_0x25cd63];}_0x6004cd=_0x2f3bb7+_0x53e55a[_0x281cfe(0x1b6)]-0x1;}}return _0x16eaa8[_0x281cfe(0x2af)]('');}function renderTaskRow(_0x707918,_0x317e29,_0x1e8f74,_0x125ea4){const _0x59e29d=a46_0x38b2ab,{level:_0x48b935,name:_0x23cc07}=parseTaskName(_0x707918[_0x59e29d(0x1ad)]),_0x28f22d='\x20'[_0x59e29d(0x160)](_0x48b935),_0x36e1e1=_0x707918['window']?'('+formatElapsed(_0x707918[_0x59e29d(0x1be)][_0x59e29d(0x2c6)])+')':'',_0x21070c=stringWidth(_0x36e1e1),_0x3e8c14=_0x48b935*0x1,_0x128351=_0x125ea4-_0x3e8c14-_0x21070c-0x1,_0xfbf862=truncateTaskName(_0x23cc07,_0x128351),_0x284a8f=_0x28f22d+_0xfbf862,_0x34a4a4=stringWidth(_0x284a8f),_0x4526eb=_0x125ea4-_0x34a4a4-_0x21070c,_0x545453=_0x284a8f+'\x20'[_0x59e29d(0x160)](Math[_0x59e29d(0x1ff)](0x1,_0x4526eb))+a46_0x5b905a[_0x59e29d(0x11a)](_0x36e1e1),_0xe19b05=getTaskStateIcon(_0x707918[_0x59e29d(0x1bd)]),_0x5704c8=new Array(_0x1e8f74)[_0x59e29d(0x293)]('\x20');if(_0x707918[_0x59e29d(0x1be)]){const _0x209372=timeToPosition(_0x707918[_0x59e29d(0x1be)][_0x59e29d(0x1ee)],_0x317e29,_0x1e8f74),_0x3fc773=timeToPosition(_0x707918[_0x59e29d(0x1be)][_0x59e29d(0x1d1)],_0x317e29,_0x1e8f74),_0x56dd5c=getBarChar(_0x707918[_0x59e29d(0x1bd)]),_0x47cda9=Math[_0x59e29d(0x1ff)](_0x209372+0x1,_0x3fc773);for(let _0x50142e=_0x209372;_0x50142e<Math[_0x59e29d(0x12a)](_0x47cda9,_0x1e8f74);_0x50142e++){_0x5704c8[_0x50142e]=_0x56dd5c;}}const _0x3f49e9=getBarColor(_0x707918[_0x59e29d(0x1bd)]),_0x52661f=_0x5704c8['map'](_0x477fd1=>_0x477fd1==='\x20'?'\x20':_0x3f49e9(_0x477fd1))['join']('');return _0xe19b05+'\x20'+_0x545453+'│'+_0x52661f+'│';}function calculateStats(_0x4d74b6){const _0x2b91fd=a46_0x38b2ab,_0x2ca943={'total':_0x4d74b6[_0x2b91fd(0x1b6)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x4f7651 of _0x4d74b6){if(_0x4f7651[_0x2b91fd(0x1bd)]==='success')_0x2ca943[_0x2b91fd(0x1fd)]++;else{if(_0x4f7651[_0x2b91fd(0x1bd)]==='error'||_0x4f7651[_0x2b91fd(0x1bd)]==='group_error')_0x2ca943[_0x2b91fd(0x219)]++;else _0x4f7651[_0x2b91fd(0x1bd)]===_0x2b91fd(0x139)?_0x2ca943[_0x2b91fd(0x139)]++:_0x2ca943['pending']++;}}return _0x2ca943;}function formatStats(_0x83cb38){const _0x42a9f7=a46_0x38b2ab;return['Total:\x20'+_0x83cb38[_0x42a9f7(0x2a2)],'✅\x20'+_0x83cb38['success'],'❌\x20'+_0x83cb38[_0x42a9f7(0x219)],_0x42a9f7(0x1af)+_0x83cb38[_0x42a9f7(0x139)],'⏳\x20'+_0x83cb38[_0x42a9f7(0x170)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a46_0x38b2ab(0x1ad)]=a46_0x38b2ab(0x172);[a46_0x38b2ab(0x18b)]=a46_0x38b2ab(0x196);async[a46_0x38b2ab(0x224)](_0x3d23de){const _0x5bfb6f=a46_0x38b2ab,{options:_0x52b669,args:_0x1eced1,tdx:_0x582ae6}=_0x3d23de;let _0x493d3e,_0x3804d,_0x2d65de=![];if(_0x1eced1[0x0]){if(_0x1eced1[0x0][_0x5bfb6f(0x1a8)]('.')){const _0x5290b5=this[_0x5bfb6f(0x1da)](_0x1eced1,_0x52b669);if(!_0x5290b5)return 0x1;_0x493d3e=_0x5290b5[_0x5bfb6f(0x120)],_0x3804d=_0x5290b5['workflowName'];}else{_0x3804d=_0x1eced1[0x0],_0x493d3e=_0x52b669[_0x5bfb6f(0x27a)];if(!_0x493d3e)return console[_0x5bfb6f(0x219)](a46_0x5b905a[_0x5bfb6f(0x202)](_0x5bfb6f(0x25f)),_0x5bfb6f(0x131)),0x1;_0x2d65de=!![];}}else{const _0x31004f=this[_0x5bfb6f(0x1da)](_0x1eced1,_0x52b669);if(!_0x31004f)return 0x1;_0x493d3e=_0x31004f['projectName'],_0x3804d=_0x31004f[_0x5bfb6f(0x129)];}if(_0x52b669[_0x5bfb6f(0x21b)]){if(_0x493d3e&&_0x3804d)console['error'](_0x5bfb6f(0x23b)+_0x493d3e+'.'+_0x3804d);else _0x493d3e&&console[_0x5bfb6f(0x219)](_0x5bfb6f(0x209)+_0x493d3e);}const _0x49ce6a=_0x52b669[_0x5bfb6f(0x2ae)],_0x4d2da9=_0x52b669['sessionId'];if(_0x49ce6a){_0x4d2da9&&console[_0x5bfb6f(0x219)](a46_0x5b905a[_0x5bfb6f(0x244)](_0x5bfb6f(0x13e)),_0x5bfb6f(0x26f));const _0x5a8a93=_0x52b669[_0x5bfb6f(0x118)];return _0x5a8a93?await this[_0x5bfb6f(0x1cb)](_0x3d23de,_0x49ce6a):await this[_0x5bfb6f(0x113)](_0x3d23de,_0x49ce6a,_0x52b669),0x0;}if(_0x4d2da9){const _0x28a541=await withSpinner(_0x5bfb6f(0x18c),()=>_0x582ae6[_0x5bfb6f(0x164)][_0x5bfb6f(0x17c)]({'projectName':_0x493d3e,'workflowName':_0x3804d,'limit':0x64}),{'verbose':_0x52b669['verbose']}),_0x418bde=_0x28a541['data'][_0x5bfb6f(0x13a)](_0x4fe204=>_0x4fe204['id']===_0x4d2da9);if(!_0x418bde)return console[_0x5bfb6f(0x219)](a46_0x5b905a[_0x5bfb6f(0x202)](_0x5bfb6f(0x25f)),_0x5bfb6f(0x212)+_0x4d2da9),0x1;if(!_0x418bde['lastAttempt']?.['id'])return console[_0x5bfb6f(0x219)](a46_0x5b905a[_0x5bfb6f(0x202)](_0x5bfb6f(0x25f)),'Session\x20'+_0x4d2da9+'\x20has\x20no\x20attempts'),0x1;const _0x46b87a=_0x418bde[_0x5bfb6f(0x12e)]['id'];_0x52b669['verbose']&&console[_0x5bfb6f(0x219)](_0x5bfb6f(0x22c)+_0x46b87a+_0x5bfb6f(0x2c4)+_0x4d2da9);const _0x87faf2=_0x52b669['follow'];return _0x87faf2?await this[_0x5bfb6f(0x1cb)](_0x3d23de,_0x46b87a):await this[_0x5bfb6f(0x113)](_0x3d23de,_0x46b87a,_0x52b669),0x0;}const _0x9e87af=await withSpinner(_0x5bfb6f(0x2b2),()=>_0x582ae6['workflow'][_0x5bfb6f(0x17c)]({'projectName':_0x493d3e,'workflowName':_0x3804d,'limit':_0x52b669['limit']||0x32}),{'verbose':_0x52b669[_0x5bfb6f(0x21b)]}),_0x51856e=_0x9e87af[_0x5bfb6f(0x20c)];if(_0x51856e[_0x5bfb6f(0x1b6)]===0x0){if(_0x493d3e&&_0x3804d)console[_0x5bfb6f(0x219)](_0x5bfb6f(0x253)+_0x493d3e+'.'+_0x3804d);else _0x493d3e?console[_0x5bfb6f(0x219)](_0x5bfb6f(0x285)+_0x493d3e):(console[_0x5bfb6f(0x219)]('No\x20workflow\x20sessions\x20found'),console[_0x5bfb6f(0x219)](a46_0x5b905a['dim'](_0x5bfb6f(0x1e6))));return 0x0;}_0x51856e[_0x5bfb6f(0x251)]((_0x3e2142,_0x3aab8a)=>{const _0x5aafb5=_0x5bfb6f,_0x4a5ef2=_0x3e2142[_0x5aafb5(0x1c6)]||'',_0x3f5c2c=_0x3aab8a[_0x5aafb5(0x1c6)]||'';return _0x3f5c2c[_0x5aafb5(0x2a5)](_0x4a5ef2);});if(_0x52b669[_0x5bfb6f(0x1b5)]||_0x52b669[_0x5bfb6f(0x147)])return await handleSDKOutput(_0x51856e,_0x52b669),0x0;let _0xe64efa;if(_0x2d65de){const _0x950d6=_0x51856e[0x0];if(!_0x950d6[_0x5bfb6f(0x12e)]?.['id'])return console[_0x5bfb6f(0x219)](_0x5bfb6f(0x144)),0x0;_0xe64efa=_0x950d6[_0x5bfb6f(0x12e)]['id'],_0x52b669[_0x5bfb6f(0x21b)]&&console[_0x5bfb6f(0x219)](_0x5bfb6f(0x2a1)+_0x950d6[_0x5bfb6f(0x1c6)]);}else{const _0x32fc93=_0x51856e[_0x5bfb6f(0x1c8)](_0x2c2b9c=>{const _0x4cb119=_0x5bfb6f,_0x562e35=getAttemptStatusDisplay(_0x2c2b9c[_0x4cb119(0x12e)]);return{'title':_0x2c2b9c[_0x4cb119(0x1d8)]?.[_0x4cb119(0x1ad)]+'.'+_0x2c2b9c[_0x4cb119(0x164)]?.[_0x4cb119(0x1ad)]+_0x4cb119(0x2b4)+_0x2c2b9c[_0x4cb119(0x1c6)]+'\x20'+_0x562e35[_0x4cb119(0x15f)],'value':_0x2c2b9c['lastAttempt']?.['id']||'','description':_0x562e35[_0x4cb119(0x17a)]};}),_0x538949=await a46_0x143713({'type':_0x5bfb6f(0x130),'name':_0x5bfb6f(0x2ae),'message':_0x5bfb6f(0x1c0),'choices':_0x32fc93['filter'](_0x198868=>_0x198868['value']!=='')});if(!_0x538949[_0x5bfb6f(0x2ae)])return 0x0;_0xe64efa=_0x538949['attemptId'];}const _0x4167e8=_0x52b669[_0x5bfb6f(0x118)];return _0x4167e8?await this[_0x5bfb6f(0x1cb)](_0x3d23de,_0xe64efa):await this[_0x5bfb6f(0x113)](_0x3d23de,_0xe64efa,_0x52b669),0x0;}async[a46_0x38b2ab(0x113)](_0x5a46ba,_0x54ae72,_0x262f1b){const _0x51e397=a46_0x38b2ab,{tdx:_0xf20cf3}=_0x5a46ba;let _0x166d86,_0x58167e;try{[_0x166d86,_0x58167e]=await Promise[_0x51e397(0x24d)]([_0xf20cf3[_0x51e397(0x164)][_0x51e397(0x1ec)](_0x54ae72),_0xf20cf3['workflow']['tasks'](_0x54ae72,![])]);}catch(_0x4ab31b){console[_0x51e397(0x219)](a46_0x5b905a[_0x51e397(0x202)](_0x51e397(0x22b)));_0x262f1b[_0x51e397(0x21b)]&&console[_0x51e397(0x219)](_0x4ab31b);throw _0x4ab31b;}if(_0x262f1b['json']||_0x262f1b[_0x51e397(0x147)]){const _0x2c6025=this[_0x51e397(0x23c)](_0x166d86,_0x58167e);await handleSDKOutput([_0x2c6025],_0x262f1b);return;}const _0x2c29dd=_0xf20cf3[_0x51e397(0x21d)][_0x51e397(0x1a1)],_0x3ebfd8=this['renderTimeline'](_0x166d86,_0x58167e,_0x2c29dd);console[_0x51e397(0x29e)](_0x3ebfd8);}async[a46_0x38b2ab(0x1cb)](_0x137191,_0x49c3fe){const _0x5d6488=a46_0x38b2ab,{tdx:_0x3adc59}=_0x137191,_0xebb3a5=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x38d8aa=TIMELINE_CONFIG[_0x5d6488(0x198)];let _0x4e6ed2=0x0;while(_0x4e6ed2<_0x38d8aa){process[_0x5d6488(0x140)][_0x5d6488(0x1f4)]&&process[_0x5d6488(0x140)][_0x5d6488(0x179)]('\x1bc');let _0x35f3c7,_0x1da39c;try{[_0x35f3c7,_0x1da39c]=await Promise[_0x5d6488(0x24d)]([_0x3adc59[_0x5d6488(0x164)][_0x5d6488(0x1ec)](_0x49c3fe),_0x3adc59['workflow'][_0x5d6488(0x283)](_0x49c3fe,![])]);}catch(_0x5f2b3f){console['error'](a46_0x5b905a['red']('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x4e6ed2>0x0&&console[_0x5d6488(0x219)](a46_0x5b905a[_0x5d6488(0x11a)](_0x5d6488(0x190)+_0x4e6ed2));throw _0x5f2b3f;}const _0x4f4826=_0x3adc59[_0x5d6488(0x21d)][_0x5d6488(0x1a1)],_0x1dc540=this['renderTimeline'](_0x35f3c7,_0x1da39c,_0x4f4826);console[_0x5d6488(0x29e)](_0x1dc540);const _0x3d4876=_0x35f3c7[_0x5d6488(0x13c)]&&_0x1da39c[_0x5d6488(0x1ed)](_0x48dc3e=>_0x48dc3e[_0x5d6488(0x1bd)]!==_0x5d6488(0x139)&&_0x48dc3e[_0x5d6488(0x1bd)]!=='planned');if(_0x3d4876){console[_0x5d6488(0x219)](a46_0x5b905a[_0x5d6488(0x155)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x5d6488(0x219)](a46_0x5b905a[_0x5d6488(0x11a)](_0x5d6488(0x1b2)+_0x4e6ed2*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x42927b=>setTimeout(_0x42927b,_0xebb3a5)),_0x4e6ed2++;}_0x4e6ed2>=_0x38d8aa&&console[_0x5d6488(0x219)](a46_0x5b905a[_0x5d6488(0x244)](_0x5d6488(0x11b)));}[a46_0x38b2ab(0x12f)](_0x37a6ae,_0x14fa41,_0x2d2a8e){const _0x3f5ed7=a46_0x38b2ab,_0x2d20a4=[],_0x3e3b87=TIMELINE_CONFIG[_0x3f5ed7(0x162)],_0x105e12=0x5,_0x13bcf3=process[_0x3f5ed7(0x140)][_0x3f5ed7(0x13d)]||0x78,_0x6bfa39=_0x13bcf3-_0x3e3b87-_0x105e12,_0x1bd73f=Math[_0x3f5ed7(0x1ff)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math['min'](_0x6bfa39,TIMELINE_CONFIG[_0x3f5ed7(0x17b)])),_0x42f055=new Date(_0x37a6ae[_0x3f5ed7(0x1a2)])[_0x3f5ed7(0x1b4)](),_0xad3f11=_0x37a6ae[_0x3f5ed7(0x2c5)]?new Date(_0x37a6ae[_0x3f5ed7(0x2c5)])[_0x3f5ed7(0x1b4)]():Date[_0x3f5ed7(0x19a)](),_0x12ee6b={'start':_0x42f055,'end':_0xad3f11,'duration':_0xad3f11-_0x42f055},_0x3a2b80=new Map(),_0x5897e9=[];for(const _0x130f42 of _0x14fa41){if(_0x130f42[_0x3f5ed7(0x1b9)]){const _0x26d20f=new Date(_0x130f42[_0x3f5ed7(0x1b9)])[_0x3f5ed7(0x1b4)](),_0xc17a43=_0x130f42['updatedAt']?new Date(_0x130f42['updatedAt'])['getTime']():Date[_0x3f5ed7(0x19a)](),_0x4325f4={'start':_0x26d20f,'end':_0xc17a43,'duration':_0xc17a43-_0x26d20f};_0x3a2b80[_0x3f5ed7(0x18d)](_0x130f42['id'],_0x4325f4),_0x5897e9[_0x3f5ed7(0x28b)]({'name':_0x130f42[_0x3f5ed7(0x2c7)],'state':_0x130f42['state']||_0x3f5ed7(0x188),'window':_0x4325f4});}else _0x5897e9[_0x3f5ed7(0x28b)]({'name':_0x130f42[_0x3f5ed7(0x2c7)],'state':_0x130f42['state']||_0x3f5ed7(0x116),'window':undefined});}_0x5897e9[_0x3f5ed7(0x251)]((_0x187d27,_0x1b3186)=>{const _0x7c99f1=_0x3f5ed7;if(!_0x187d27[_0x7c99f1(0x1be)])return 0x1;if(!_0x1b3186[_0x7c99f1(0x1be)])return-0x1;return _0x187d27[_0x7c99f1(0x1be)]['start']-_0x1b3186[_0x7c99f1(0x1be)][_0x7c99f1(0x1ee)];});const _0x4fdc05=_0x5897e9['length'],_0x14c7d4=_0x4fdc05>TIMELINE_CONFIG[_0x3f5ed7(0x16e)];_0x14c7d4&&_0x5897e9[_0x3f5ed7(0x157)](TIMELINE_CONFIG[_0x3f5ed7(0x16e)]);const _0x5861a8=calculateTimeScale(_0x12ee6b,_0x1bd73f),_0x11a4c5=_0x37a6ae[_0x3f5ed7(0x13c)]?_0x37a6ae[_0x3f5ed7(0x1fd)]?a46_0x5b905a['green']('success'):a46_0x5b905a[_0x3f5ed7(0x202)]('error'):a46_0x5b905a[_0x3f5ed7(0x214)](_0x3f5ed7(0x139)),_0x3b68f8=_0x37a6ae[_0x3f5ed7(0x1d8)]?.['id'],_0x52c827=_0x37a6ae['sessionId'];let _0x27e587;if(_0x3b68f8&&_0x52c827){const _0x16a58a=getWorkflowAttemptUrl(_0x2d2a8e,_0x3b68f8,_0x52c827,_0x37a6ae['id']);_0x27e587=hyperlink(a46_0x5b905a[_0x3f5ed7(0x11a)](_0x37a6ae['id']),_0x16a58a);}else _0x27e587=a46_0x5b905a[_0x3f5ed7(0x11a)](_0x37a6ae['id']);_0x2d20a4[_0x3f5ed7(0x28b)](_0x3f5ed7(0x262)+_0x27e587+'\x20-\x20'+_0x11a4c5+_0x3f5ed7(0x2b4)+formatElapsed(_0x12ee6b[_0x3f5ed7(0x2c6)]));if(_0x5897e9[_0x3f5ed7(0x1b6)]>0x0){const _0x589937=renderTimeAxis(_0x5861a8,_0x1bd73f),_0x3ba472=new Date(_0x12ee6b[_0x3f5ed7(0x1ee)]),_0x3e733a=formatDate(_0x3ba472),_0x253f0a=TIMELINE_CONFIG[_0x3f5ed7(0x271)]+TIMELINE_CONFIG['ICON_SPACING']+_0x3e3b87,_0x349627=_0x3e733a[_0x3f5ed7(0x264)](_0x253f0a),_0xe46f4b=a46_0x5b905a['dim'](_0x349627);_0x2d20a4[_0x3f5ed7(0x28b)](_0xe46f4b+'\x20'+_0x589937);for(const _0x1cb8ac of _0x5897e9){_0x2d20a4[_0x3f5ed7(0x28b)](renderTaskRow(_0x1cb8ac,_0x5861a8,_0x1bd73f,_0x3e3b87));}const _0x25fec5=calculateStats(_0x5897e9);_0x2d20a4[_0x3f5ed7(0x28b)](formatStats(_0x25fec5)),_0x14c7d4&&_0x2d20a4['push'](a46_0x5b905a[_0x3f5ed7(0x244)](_0x3f5ed7(0x28d)+TIMELINE_CONFIG[_0x3f5ed7(0x16e)]+_0x3f5ed7(0x19c)+_0x4fdc05+_0x3f5ed7(0x25d))),_0x2d20a4['push'](''),_0x2d20a4['push'](a46_0x5b905a[_0x3f5ed7(0x11a)](_0x3f5ed7(0x256))+(_0x3f5ed7(0x186)+_0x37a6ae['id']+_0x3f5ed7(0x1b3))+a46_0x5b905a[_0x3f5ed7(0x11a)](_0x3f5ed7(0x16c)));}else _0x2d20a4[_0x3f5ed7(0x28b)](_0x3f5ed7(0x26d));return _0x2d20a4[_0x3f5ed7(0x2af)]('\x0a');}['buildTimelineData'](_0x1dc31d,_0x422680){const _0x289862=a46_0x38b2ab,_0x35467e=new Date(_0x1dc31d[_0x289862(0x1a2)])[_0x289862(0x1b4)](),_0x3f2693=_0x1dc31d[_0x289862(0x2c5)]?new Date(_0x1dc31d['finishedAt'])[_0x289862(0x1b4)]():Date[_0x289862(0x19a)](),_0x42a7dc=_0x3f2693-_0x35467e,_0x56d7d2=[];for(const _0x2f825e of _0x422680){if(_0x2f825e['startedAt']){const _0x16cb86=new Date(_0x2f825e[_0x289862(0x1b9)])[_0x289862(0x1b4)](),_0x3a8537=_0x2f825e[_0x289862(0x1dc)]?new Date(_0x2f825e[_0x289862(0x1dc)])['getTime']():Date[_0x289862(0x19a)]();_0x56d7d2[_0x289862(0x28b)]({'name':_0x2f825e[_0x289862(0x2c7)],'state':_0x2f825e[_0x289862(0x1bd)]||_0x289862(0x188),'window':{'start':_0x16cb86,'end':_0x3a8537,'duration':_0x3a8537-_0x16cb86}});}else _0x56d7d2[_0x289862(0x28b)]({'name':_0x2f825e[_0x289862(0x2c7)],'state':_0x2f825e[_0x289862(0x1bd)]||_0x289862(0x116),'window':undefined});}const _0x5b0d80=calculateStats(_0x56d7d2);return{'attempt':{'id':_0x1dc31d['id'],'status':_0x1dc31d[_0x289862(0x13c)]?_0x1dc31d[_0x289862(0x1fd)]?_0x289862(0x1fd):_0x289862(0x219):'running','createdAt':_0x1dc31d['createdAt'],'finishedAt':_0x1dc31d[_0x289862(0x2c5)],'duration_ms':_0x42a7dc},'tasks':_0x56d7d2[_0x289862(0x1c8)](_0x3c0a41=>({'name':_0x3c0a41['name'],'state':_0x3c0a41['state'],'startedAt':_0x3c0a41['window']?new Date(_0x3c0a41[_0x289862(0x1be)][_0x289862(0x1ee)])[_0x289862(0x127)]():null,'updatedAt':_0x3c0a41[_0x289862(0x1be)]?new Date(_0x3c0a41['window'][_0x289862(0x1d1)])[_0x289862(0x127)]():null,'duration_ms':_0x3c0a41[_0x289862(0x1be)]?.['duration']||null})),'stats':_0x5b0d80};}}
1
+ const a46_0x58b19f=a46_0x2026;(function(_0x3bd8fc,_0x5bbe09){const _0x11849a=a46_0x2026,_0x53e6c5=_0x3bd8fc();while(!![]){try{const _0xfd2210=-parseInt(_0x11849a(0x12d))/0x1*(parseInt(_0x11849a(0x166))/0x2)+parseInt(_0x11849a(0x2b8))/0x3+-parseInt(_0x11849a(0x259))/0x4+parseInt(_0x11849a(0x2a1))/0x5+parseInt(_0x11849a(0x29a))/0x6*(-parseInt(_0x11849a(0x24e))/0x7)+-parseInt(_0x11849a(0x24d))/0x8*(parseInt(_0x11849a(0x246))/0x9)+-parseInt(_0x11849a(0x1bc))/0xa*(-parseInt(_0x11849a(0x14c))/0xb);if(_0xfd2210===_0x5bbe09)break;else _0x53e6c5['push'](_0x53e6c5['shift']());}catch(_0x16c121){_0x53e6c5['push'](_0x53e6c5['shift']());}}}(a46_0x3e47,0xba8a6));import a46_0x344a10 from'chalk';import{existsSync}from'fs';import a46_0xf2b69b 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 a46_0x4dadba from'prompts';function getAttemptStatusDisplay(_0x3f48f0){const _0x44cea5=a46_0x2026;if(!_0x3f48f0)return{'icon':'⏳','text':''};const {done:_0x10a1cf,success:_0x2a56d2,cancelRequested:_0x3f0d80}=_0x3f48f0;if(!_0x10a1cf)return _0x3f0d80?{'icon':'🛑','text':a46_0x344a10[_0x44cea5(0x290)](_0x44cea5(0x141))}:{'icon':'🔄','text':a46_0x344a10[_0x44cea5(0x29b)](_0x44cea5(0x272))};if(_0x2a56d2)return{'icon':'✅','text':a46_0x344a10[_0x44cea5(0x156)](_0x44cea5(0x249))};return{'icon':'❌','text':a46_0x344a10[_0x44cea5(0x11f)](_0x44cea5(0x191))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x159df1,_0x485ba2,_0x241657=0x0){const _0x16c966=a46_0x2026;return _0x159df1[_0x241657]||_0x485ba2[_0x16c966(0x1b4)];}[a46_0x58b19f(0x297)](_0x462f6b,_0x425d1b,_0x47ad40=0x0){const _0x5b6b92=a46_0x58b19f,_0x229113=this[_0x5b6b92(0x193)](_0x462f6b,_0x425d1b,_0x47ad40);if(!_0x229113)return console[_0x5b6b92(0x191)](a46_0x344a10[_0x5b6b92(0x11f)]('Error:'),_0x5b6b92(0x19e)),console['error'](a46_0x344a10[_0x5b6b92(0x17c)](_0x5b6b92(0x16e))),null;return _0x229113;}[a46_0x58b19f(0x227)](_0x15f6cf,_0x4f143c){const _0x57daa6=a46_0x58b19f;if(_0x15f6cf[0x0]){const _0x24a633=_0x15f6cf[0x0][_0x57daa6(0x1f1)]('.');if(_0x24a633[_0x57daa6(0x1ee)]===0x1)return{'projectName':_0x24a633[0x0],'workflowName':undefined};else return _0x24a633[_0x57daa6(0x1ee)]===0x2?{'projectName':_0x24a633[0x0],'workflowName':_0x24a633[0x1]}:(console[_0x57daa6(0x191)](a46_0x344a10[_0x57daa6(0x11f)](_0x57daa6(0x1ae)),_0x57daa6(0x289)),null);}return{'projectName':_0x4f143c[_0x57daa6(0x1b4)],'workflowName':undefined};}[a46_0x58b19f(0x23c)](_0x37dc9e,_0x326582,_0x1b52e5=0x0){const _0x17acce=a46_0x58b19f;if(_0x37dc9e[_0x1b52e5])return _0x37dc9e[_0x1b52e5];if(_0x326582[_0x17acce(0x1b4)]){const _0x85691=a46_0xf2b69b['join'](process[_0x17acce(0x1c0)](),_0x17acce(0x1a4),_0x326582[_0x17acce(0x1b4)]);if(existsSync(a46_0xf2b69b[_0x17acce(0x17d)](_0x85691,_0x17acce(0x23d))))return _0x85691;}return undefined;}async[a46_0x58b19f(0x209)](_0x32f608,_0x2a3e5b,_0x5537ec){const _0x7e3d53=a46_0x58b19f;try{const _0x409fd8=await _0x32f608[_0x7e3d53(0x1fe)][_0x7e3d53(0x1a4)](_0x2a3e5b,{'limit':0x1});if(_0x409fd8[_0x7e3d53(0x1ee)]>0x0){const _0x5d3b69=_0x409fd8[0x0]['id'],_0x30201b=getWorkflowUrl(_0x5537ec,_0x5d3b69);console[_0x7e3d53(0x191)](_0x7e3d53(0x16b)+a46_0x344a10[_0x7e3d53(0x29d)](_0x30201b));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']='workflow:use';['description']=a46_0x58b19f(0x189);async[a46_0x58b19f(0x185)](_0x594ca4){const _0x212e08=a46_0x58b19f,{options:_0x49d51c,args:_0x54c456,tdx:_0x10f99a}=_0x594ca4,_0x197322=_0x54c456[0x0],_0x52617f=_0x49d51c[_0x212e08(0x164)];if(_0x52617f)return saveSessionContext({'workflow_project':undefined},_0x49d51c[_0x212e08(0x13d)]),console[_0x212e08(0x1bb)](a46_0x344a10[_0x212e08(0x156)](_0x212e08(0x180))),0x0;if(!_0x197322)return console[_0x212e08(0x191)](a46_0x344a10[_0x212e08(0x11f)](_0x212e08(0x1ae)),'Project\x20name\x20is\x20required'),console[_0x212e08(0x191)](a46_0x344a10[_0x212e08(0x17c)](_0x212e08(0x208))),console['error'](a46_0x344a10['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0xb68b9e=await withSpinner(_0x212e08(0x222)+_0x197322+_0x212e08(0x288),()=>_0x10f99a['workflow'][_0x212e08(0x22f)](_0x197322),{'verbose':_0x49d51c['verbose']}),{name:_0x4cea36}=_0xb68b9e['data'];return saveSessionContext({'workflow_project':_0x4cea36},_0x49d51c[_0x212e08(0x13d)]),console[_0x212e08(0x1bb)](a46_0x344a10[_0x212e08(0x156)](_0x212e08(0x188)+a46_0x344a10[_0x212e08(0x29d)](_0x4cea36))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a46_0x58b19f(0x1d6);[a46_0x58b19f(0x1f3)]='List\x20all\x20workflow\x20projects';async[a46_0x58b19f(0x185)](_0x277e54){const _0x43153d=a46_0x58b19f,{options:_0x53a8f4,args:_0x409138,tdx:_0x105b23}=_0x277e54,_0x4e9a29=_0x409138[0x0];_0x53a8f4[_0x43153d(0x18a)]&&_0x4e9a29&&console[_0x43153d(0x191)](_0x43153d(0x1ab)+_0x4e9a29);const _0x5835a7=await withSpinner(_0x43153d(0x240),()=>_0x105b23[_0x43153d(0x1fe)][_0x43153d(0x1a6)](_0x4e9a29,{'limit':_0x53a8f4[_0x43153d(0x1d0)]}),{'verbose':_0x53a8f4[_0x43153d(0x18a)]});let _0x240461=_0x5835a7['data'];_0x240461[_0x43153d(0x2b7)]((_0x37c509,_0x5beced)=>_0x37c509[_0x43153d(0x1f9)][_0x43153d(0x14e)](_0x5beced[_0x43153d(0x1f9)]));const _0x169a43=_0x53a8f4[_0x43153d(0x1d0)]||0x64,_0x2c469e=_0x240461[_0x43153d(0x1ee)]>=_0x169a43?a46_0x344a10['dim'](_0x43153d(0x22a)):'';console['error']('✔\x20Found\x20'+_0x240461[_0x43153d(0x1ee)]+_0x43153d(0x1e9)+(_0x240461['length']!==0x1?'s':'')+_0x2c469e);if(_0x53a8f4['format']===_0x43153d(0x16a)||_0x53a8f4[_0x43153d(0x129)]===_0x43153d(0x2ba)||_0x53a8f4[_0x43153d(0x129)]===_0x43153d(0x204))await handleSDKOutput(_0x240461,_0x53a8f4);else{if(_0x240461[_0x43153d(0x1ee)]===0x0)_0x4e9a29?console['log']('No\x20projects\x20match\x20pattern:\x20'+_0x4e9a29):console['log']('No\x20workflow\x20projects\x20found');else{const _0x5aa1f6=_0x240461[_0x43153d(0x243)](_0xe7aee4=>{const _0x20d85b=_0x43153d,_0x2a81fe=_0xe7aee4['metadata']?.[_0x20d85b(0x258)](_0x574873=>_0x574873[_0x20d85b(0x1bf)]==='sys'),_0x36869c=_0x2a81fe?a46_0x344a10[_0x20d85b(0x17c)]('\x20(system)'):'';return _0x20d85b(0x299)+_0xe7aee4[_0x20d85b(0x1f9)]+_0x36869c;});await writeOutput(_0x5aa1f6[_0x43153d(0x17d)]('\x0a'),_0x53a8f4[_0x43153d(0x203)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a46_0x58b19f(0x1f9)]='workflow:workflows';[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x27a);async[a46_0x58b19f(0x185)](_0xd2d799){const _0x5c22c0=a46_0x58b19f,{options:_0x529d34,args:_0x57acb2,tdx:_0x34bb3c}=_0xd2d799,_0x30d2fe=this[_0x5c22c0(0x193)](_0x57acb2,_0x529d34);_0x529d34['verbose']&&_0x30d2fe&&console[_0x5c22c0(0x191)]('Project\x20filter:\x20'+_0x30d2fe);const _0x336bdc=await withSpinner(_0x5c22c0(0x15a),()=>_0x34bb3c[_0x5c22c0(0x1fe)][_0x5c22c0(0x1a4)](_0x30d2fe,{'limit':_0x529d34[_0x5c22c0(0x1d0)]}),{'verbose':_0x529d34[_0x5c22c0(0x18a)]});let _0x137404=_0x336bdc[_0x5c22c0(0x171)];_0x137404['sort']((_0x1571dc,_0x3a5f3b)=>{const _0x5f5d78=_0x5c22c0,_0x4ac573=_0x1571dc[_0x5f5d78(0x1f9)][_0x5f5d78(0x14e)](_0x3a5f3b[_0x5f5d78(0x1f9)]);if(_0x4ac573!==0x0)return _0x4ac573;return(_0x1571dc[_0x5f5d78(0x192)]?.[_0x5f5d78(0x1f9)]||'')['localeCompare'](_0x3a5f3b['project']?.[_0x5f5d78(0x1f9)]||'');});const _0x46fb72=_0x529d34[_0x5c22c0(0x1d0)]||0x64,_0x54624c=_0x137404[_0x5c22c0(0x1ee)]>=_0x46fb72?a46_0x344a10[_0x5c22c0(0x17c)](_0x5c22c0(0x22a)):'';console[_0x5c22c0(0x191)](_0x5c22c0(0x23a)+_0x137404[_0x5c22c0(0x1ee)]+_0x5c22c0(0x27e)+(_0x137404[_0x5c22c0(0x1ee)]!==0x1?'s':'')+_0x54624c);if(_0x529d34['format']===_0x5c22c0(0x16a)||_0x529d34['format']===_0x5c22c0(0x2ba)||_0x529d34[_0x5c22c0(0x129)]===_0x5c22c0(0x204))await handleSDKOutput(_0x137404,_0x529d34);else{if(_0x137404['length']===0x0)_0x30d2fe?console['log'](_0x5c22c0(0x238)+_0x30d2fe):console[_0x5c22c0(0x1bb)](_0x5c22c0(0x230));else{const _0x72e2b7=_0x529d34['site'],_0x50d186=_0x137404['map'](_0x4cff1c=>{const _0x3ae1aa=_0x5c22c0,_0x285b7d=a46_0x344a10[_0x3ae1aa(0x17c)]('#'+_0x4cff1c['id']),_0x2dd7ee=hyperlink(_0x285b7d,getWorkflowUrl(_0x72e2b7,_0x4cff1c['id'])),_0x49589d=_0x4cff1c[_0x3ae1aa(0x192)]?.['name']?a46_0x344a10[_0x3ae1aa(0x17c)]('\x20('+_0x4cff1c[_0x3ae1aa(0x192)]['name']+')'):'';return'📋\x20'+_0x2dd7ee+'\x20'+_0x4cff1c[_0x3ae1aa(0x1f9)]+_0x49589d;});await writeOutput(_0x50d186[_0x5c22c0(0x17d)]('\x0a'),_0x529d34[_0x5c22c0(0x203)],_0x5c22c0(0x24b));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a46_0x58b19f(0x1f9)]=a46_0x58b19f(0x118);[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x2b0);async[a46_0x58b19f(0x185)](_0x3a203e){const _0x70de05=a46_0x58b19f,{options:_0x118ec8,args:_0x350da2,tdx:_0x38752a}=_0x3a203e,_0x3f3201=this[_0x70de05(0x227)](_0x350da2,_0x118ec8);if(!_0x3f3201)return 0x1;const {projectName:_0x424738,workflowName:_0x3967f9}=_0x3f3201;if(_0x118ec8['verbose']){if(_0x424738&&_0x3967f9)console['error'](_0x70de05(0x11d)+_0x424738+'.'+_0x3967f9);else _0x424738&&console[_0x70de05(0x191)]('Filter:\x20project='+_0x424738);const _0x4f3dfc=_0x118ec8[_0x70de05(0x24f)];_0x4f3dfc&&console[_0x70de05(0x191)](_0x70de05(0x1a2)+_0x4f3dfc);}let _0x410a09=0x28;if(process[_0x70de05(0x13a)]['isTTY']&&!_0x118ec8['output']&&!_0x118ec8[_0x70de05(0x129)]){const _0x36fdd0=process[_0x70de05(0x13a)][_0x70de05(0x22b)]||0x28;_0x410a09=Math['max'](0x14,Math['floor'](_0x36fdd0*0x2/0x3));}const _0x42fecb=_0x118ec8[_0x70de05(0x1d0)]||_0x410a09,_0x2b5d4e=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x38752a[_0x70de05(0x1fe)][_0x70de05(0x28c)]({'projectName':_0x424738,'workflowName':_0x3967f9,'status':_0x118ec8[_0x70de05(0x24f)],'fromTime':_0x118ec8[_0x70de05(0x1d3)],'toTime':_0x118ec8['to'],'limit':_0x42fecb}),{'verbose':_0x118ec8['verbose']}),_0x2330e7=_0x2b5d4e['data'];_0x2330e7[_0x70de05(0x2b7)]((_0x554d98,_0x281d5d)=>{const _0x45f60e=_0x70de05,_0x3f4e80=_0x554d98[_0x45f60e(0x2a2)]||'',_0x15f457=_0x281d5d['sessionTime']||'';return _0x15f457[_0x45f60e(0x14e)](_0x3f4e80);});_0x2330e7[_0x70de05(0x1ee)]>=_0x42fecb?console[_0x70de05(0x191)](_0x70de05(0x1a9)+_0x2330e7[_0x70de05(0x1ee)]+_0x70de05(0x284)+a46_0x344a10[_0x70de05(0x17c)](_0x70de05(0x21b))):console[_0x70de05(0x191)](_0x70de05(0x23a)+_0x2330e7[_0x70de05(0x1ee)]+_0x70de05(0x15c)+(_0x2330e7[_0x70de05(0x1ee)]!==0x1?'s':''));if(_0x118ec8[_0x70de05(0x129)]==='json'||_0x118ec8[_0x70de05(0x129)]===_0x70de05(0x2ba)||_0x118ec8[_0x70de05(0x129)]==='table')await handleSDKOutput(_0x2330e7,_0x118ec8);else{if(!process[_0x70de05(0x13a)][_0x70de05(0x277)]||_0x118ec8[_0x70de05(0x203)]){if(_0x2330e7['length']===0x0){if(_0x424738&&_0x3967f9)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x424738+'.'+_0x3967f9);else _0x424738?console[_0x70de05(0x1bb)](_0x70de05(0x19d)+_0x424738):console[_0x70de05(0x1bb)](_0x70de05(0x1d7));}else{const _0x28f9cf=_0x118ec8['site'],_0x5ef10e=this[_0x70de05(0x1e7)](_0x2330e7,_0x28f9cf);_0x118ec8[_0x70de05(0x203)]?await writeOutput(_0x5ef10e,_0x118ec8[_0x70de05(0x203)],_0x70de05(0x24b)):console[_0x70de05(0x1bb)](_0x5ef10e);}!_0x424738&&(console['error'](''),console[_0x70de05(0x191)](a46_0x344a10[_0x70de05(0x17c)](_0x70de05(0x20c))),console[_0x70de05(0x191)](a46_0x344a10[_0x70de05(0x17c)](_0x70de05(0x2b3))+'or'+a46_0x344a10[_0x70de05(0x17c)](_0x70de05(0x14d))));}else{if(_0x2330e7[_0x70de05(0x1ee)]===0x0){if(_0x424738&&_0x3967f9)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x424738+'.'+_0x3967f9);else _0x424738?console['log'](_0x70de05(0x19d)+_0x424738):console['log'](_0x70de05(0x1d7));}else await this[_0x70de05(0x113)](_0x2330e7,_0x3a203e,_0x424738);}}return 0x0;}[a46_0x58b19f(0x1e7)](_0x265eb3,_0x1509b0){const _0x385c36=a46_0x58b19f,_0x5d0f55=[],_0x17899d=new Map();let _0x125a1b=Infinity,_0x18d59d=-Infinity;for(const _0x3f8c5b of _0x265eb3){if(_0x3f8c5b[_0x385c36(0x11c)]?.['createdAt']){const _0x146afb=new Date(_0x3f8c5b[_0x385c36(0x11c)][_0x385c36(0x210)])[_0x385c36(0x1e1)](),_0x30499b=_0x3f8c5b['lastAttempt'][_0x385c36(0x19c)]?new Date(_0x3f8c5b[_0x385c36(0x11c)][_0x385c36(0x19c)])[_0x385c36(0x1e1)]():Date[_0x385c36(0x200)](),_0x10f562=_0x3f8c5b['project']?.[_0x385c36(0x1f9)]||'(unknown)';!_0x17899d[_0x385c36(0x12a)](_0x10f562)&&_0x17899d[_0x385c36(0x2a8)](_0x10f562,[]),_0x17899d[_0x385c36(0x1d4)](_0x10f562)[_0x385c36(0x1c3)]({'session':_0x3f8c5b,'startTime':_0x146afb,'endTime':_0x30499b,'duration':_0x30499b-_0x146afb}),_0x125a1b=Math[_0x385c36(0x148)](_0x125a1b,_0x146afb),_0x18d59d=Math[_0x385c36(0x247)](_0x18d59d,_0x30499b);}}if(_0x17899d['size']===0x0)return _0x385c36(0x1f6);const _0x5968db=process[_0x385c36(0x13a)][_0x385c36(0x12f)]||0x78,_0x2a530d=0x1e,_0x582b05=0x32,_0xc2334f=0x4,_0x488fe4=Math[_0x385c36(0x148)](_0x582b05,Math['max'](_0x2a530d,Math[_0x385c36(0x114)](_0x5968db*0.3))),_0x46e474=_0x5968db-_0x488fe4-TIMELINE_CONFIG[_0x385c36(0x26b)]-0x3-_0xc2334f,_0x4c54d3=_0x18d59d-_0x125a1b,_0x593fc6=_0x4c54d3/_0x488fe4,_0x301c94=renderTimeAxis({'startTime':_0x125a1b,'endTime':_0x18d59d,'durationMs':_0x4c54d3,'msPerChar':_0x593fc6},_0x488fe4),_0x6f49f8=[];for(const _0x3516f5 of _0x17899d[_0x385c36(0x1ed)]()){_0x6f49f8[_0x385c36(0x1c3)](..._0x3516f5);}_0x6f49f8[_0x385c36(0x2b7)]((_0x2a9c81,_0x2f5c80)=>_0x2f5c80[_0x385c36(0x139)]-_0x2a9c81[_0x385c36(0x139)]);const _0x1e6d7a=new Date(_0x125a1b),_0x3a4e50=formatDate(_0x1e6d7a),_0x1dc105=_0xc2334f+TIMELINE_CONFIG[_0x385c36(0x165)]+TIMELINE_CONFIG[_0x385c36(0x18b)]+_0x46e474,_0x50ce86='\x20'[_0x385c36(0x1f2)](_0x1dc105-_0x3a4e50['length']),_0x2865d3=_0x50ce86+a46_0x344a10[_0x385c36(0x17c)](_0x3a4e50)+'\x20'+_0x301c94;_0x5d0f55[_0x385c36(0x1c3)](_0x2865d3);const _0x23d4e0=0x16;let _0x352001=0x0;for(const _0x27da9f of _0x6f49f8){const _0x4c8492=_0x27da9f['session'][_0x385c36(0x192)]?.[_0x385c36(0x1f9)]||'?',_0x5367b5=Math[_0x385c36(0x148)](stringWidth(_0x4c8492),_0x23d4e0);_0x352001=Math['max'](_0x352001,_0x5367b5);}for(const _0x41c561 of _0x6f49f8){const {session:_0x33f791,startTime:_0x44ede4,endTime:_0x3882fb,duration:_0x5ec848}=_0x41c561,_0x284bb6=_0x33f791['project']?.['id'],_0x3edae2=_0x33f791['id'],_0x5556aa=_0x33f791[_0x385c36(0x192)]?.[_0x385c36(0x1f9)]||'?',_0x49531b=_0x33f791[_0x385c36(0x1fe)]?.['name']||'?';let _0x259f47,_0x20db88;if(_0x33f791[_0x385c36(0x11c)]){const _0x196c6f=_0x33f791[_0x385c36(0x11c)];!_0x196c6f[_0x385c36(0x1a0)]?(_0x259f47=_0x196c6f[_0x385c36(0x24c)]?'🛑':'🔄',_0x20db88=_0x196c6f[_0x385c36(0x24c)]?a46_0x344a10[_0x385c36(0x290)]:a46_0x344a10[_0x385c36(0x29b)]):(_0x259f47=_0x196c6f[_0x385c36(0x249)]?'✅':'❌',_0x20db88=_0x196c6f['success']?a46_0x344a10[_0x385c36(0x156)]:a46_0x344a10[_0x385c36(0x11f)]);}else _0x259f47='⏳',_0x20db88=a46_0x344a10[_0x385c36(0x17c)];const _0x3a6b69='#'+_0x3edae2,_0x4b2f83=_0x284bb6?hyperlink(_0x3a6b69,getWorkflowSessionUrl(_0x1509b0,_0x284bb6,_0x3edae2)):_0x3a6b69;let _0x23d733=_0x5556aa;stringWidth(_0x5556aa)>_0x23d4e0&&(_0x23d733=_0x5556aa['slice'](0x0,_0x23d4e0-0x1)+'…');const _0x43e531=a46_0x344a10['dim'](_0x23d733),_0x164ab4=stringWidth(_0x23d733),_0xffd77a='\x20'[_0x385c36(0x1f2)](_0x352001-stringWidth(_0x23d733)+0x2),_0x1ce662='('+formatElapsed(_0x5ec848)+')',_0x4fc351=stringWidth(_0x1ce662),_0x408d7b=stringWidth(_0x3a6b69),_0x42a1da=_0x408d7b+0x1+_0x164ab4+_0xffd77a['length'],_0x26357b=_0x46e474-_0x42a1da-_0x4fc351-0x1-0x8;let _0x2e6034=_0x49531b;stringWidth(_0x2e6034)>_0x26357b&&(_0x2e6034=_0x2e6034['slice'](0x0,_0x26357b-0x1)+'…');const _0xd8634f=_0x4b2f83+'\x20'+_0x43e531+_0xffd77a+_0x2e6034,_0x2e9628=stringWidth(_0xd8634f),_0x2af970=_0x46e474-_0x2e9628-_0x4fc351,_0x418013=_0xd8634f+'\x20'['repeat'](Math['max'](0x1,_0x2af970))+a46_0x344a10[_0x385c36(0x17c)](_0x1ce662),_0x3550d3=Math['floor']((_0x44ede4-_0x125a1b)/_0x593fc6),_0x39c22a=Math[_0x385c36(0x114)]((_0x3882fb-_0x125a1b)/_0x593fc6),_0x4ec2e9=Math[_0x385c36(0x247)](_0x3550d3+0x1,_0x39c22a),_0x343aa1=new Array(_0x488fe4)[_0x385c36(0x147)]('\x20');for(let _0x260d50=_0x3550d3;_0x260d50<Math[_0x385c36(0x148)](_0x4ec2e9,_0x488fe4);_0x260d50++){_0x343aa1[_0x260d50]='─';}const _0x3c23d1=_0x343aa1[_0x385c36(0x243)](_0x1c1f55=>_0x1c1f55==='\x20'?'\x20':_0x20db88(_0x1c1f55))['join']('');_0x5d0f55['push'](_0x259f47+'\x20'+_0x418013+'│'+_0x3c23d1+'│');}return _0x5d0f55[_0x385c36(0x17d)]('\x0a');}async[a46_0x58b19f(0x113)](_0x2a36d8,_0x495973,_0x497459){const _0x18c867=a46_0x58b19f,{options:_0x28d12e,tdx:_0x26f373}=_0x495973,_0xfe6e2=_0x28d12e[_0x18c867(0x283)],{timelineRows:_0x5c22ce,timeAxisHeader:_0x74c796}=this[_0x18c867(0x25e)](_0x2a36d8,_0xfe6e2),_0xcc4073=_0x5c22ce[_0x18c867(0x197)](_0x219518=>_0x219518[_0x18c867(0x201)]);if(_0xcc4073[_0x18c867(0x1ee)]===0x0){const _0x4eb9ad=this[_0x18c867(0x1e7)](_0x2a36d8,_0xfe6e2);console['log'](_0x4eb9ad);!_0x497459&&(console['error'](''),console['error'](a46_0x344a10['dim'](_0x18c867(0x20c))),console[_0x18c867(0x191)](a46_0x344a10[_0x18c867(0x17c)](_0x18c867(0x2b3))+'or'+a46_0x344a10[_0x18c867(0x17c)](_0x18c867(0x14d))));return;}_0x74c796&&console[_0x18c867(0x1bb)](_0x74c796);const _0xb7a7c3=_0x5c22ce[_0x18c867(0x197)](_0x1fec2c=>_0x1fec2c[_0x18c867(0x201)])[_0x18c867(0x243)](_0x130b68=>({'title':_0x130b68[_0x18c867(0x25c)],'value':_0x130b68['attemptId']})),_0x4e6a3a=process[_0x18c867(0x13a)]['rows']||0x3c,_0x31c4ea=Math[_0x18c867(0x247)](0x28,Math[_0x18c867(0x114)](_0x4e6a3a*0x2/0x3)),_0xae4774=await a46_0x4dadba({'type':_0x18c867(0x1ea),'name':_0x18c867(0x201),'message':_0x18c867(0x1de),'choices':_0xb7a7c3,'initial':-0x1,'limit':_0x31c4ea,'clearFirst':!![],'fallback':{'title':_0x18c867(0x22c),'value':null},'suggest':(_0xda47bf,_0x2e82c9)=>{const _0x5d5788=_0x18c867;if(!_0xda47bf)return Promise[_0x5d5788(0x1c9)](_0x2e82c9);const _0x211d3d=_0x2e82c9[_0x5d5788(0x197)](_0x12c0d6=>{const _0x2b02cf=_0x5d5788,_0x1c66c9=_0x12c0d6;return _0x1c66c9[_0x2b02cf(0x1a3)][_0x2b02cf(0x234)]()[_0x2b02cf(0x2a7)](_0xda47bf[_0x2b02cf(0x234)]());});return Promise['resolve'](_0x211d3d);}}),_0x303622=()=>{const _0x1aa46e=_0x18c867;process[_0x1aa46e(0x13a)]['write'](_0x1aa46e(0x21e)),process[_0x1aa46e(0x13a)][_0x1aa46e(0x19a)](_0x1aa46e(0x21e)),process['stdout'][_0x1aa46e(0x19a)](_0x1aa46e(0x21e));},_0x1ca93d=_0xae4774&&_0xae4774[_0x18c867(0x201)]&&_0xae4774['attemptId']!==null&&_0xae4774[_0x18c867(0x201)][_0x18c867(0x1e2)]()!=='';if(!_0x1ca93d){_0x303622(),console[_0x18c867(0x1bb)](a46_0x344a10['dim'](_0x18c867(0x260)));return;}_0x303622();const _0x1372fc=_0x2a36d8[_0x18c867(0x196)](_0x4f4a18=>_0x4f4a18['lastAttempt']?.['id']===_0xae4774[_0x18c867(0x201)]);if(_0x1372fc){const _0x501e60=_0x1372fc['project']?.[_0x18c867(0x1f9)]||'?',_0x28aeec=_0x1372fc[_0x18c867(0x1fe)]?.[_0x18c867(0x1f9)]||'?';console[_0x18c867(0x1bb)](_0x18c867(0x207)+a46_0x344a10[_0x18c867(0x17c)](_0x501e60)+_0x18c867(0x175)+a46_0x344a10[_0x18c867(0x17c)](_0x28aeec));}const _0xb1b85=new WorkflowTimelineCommand();await _0xb1b85[_0x18c867(0x185)]({'args':[],'options':{..._0x28d12e,'attemptId':_0xae4774['attemptId']},'tdx':_0x26f373});}[a46_0x58b19f(0x25e)](_0x1e6f92,_0x21a5b1){const _0x454df5=a46_0x58b19f,_0x1b0ecb=new Map();for(const _0x4420b4 of _0x1e6f92){_0x4420b4['id']&&_0x4420b4[_0x454df5(0x11c)]?.['id']&&_0x1b0ecb['set'](_0x4420b4['id'],_0x4420b4[_0x454df5(0x11c)]['id']);}const _0x2fadfe=[];let _0x5f5566='';const _0x3d76c0=this[_0x454df5(0x1e7)](_0x1e6f92,_0x21a5b1),_0x4eeda2=_0x3d76c0[_0x454df5(0x1f1)]('\x0a');for(const _0x203d61 of _0x4eeda2){if(_0x203d61[_0x454df5(0x28e)](_0x454df5(0x116))||_0x203d61[_0x454df5(0x267)](/^\s+\d{4}-\d{2}-\d{2}/))_0x5f5566=_0x203d61;else{if(_0x203d61[_0x454df5(0x267)](/^[✅❌🔄🛑⏳]/)){const _0x1758d8=_0x203d61['match'](/#(\d+)/),_0x221997=_0x1758d8?_0x1758d8[0x1]:null,_0x291931=_0x221997?_0x1b0ecb['get'](_0x221997)||null:null,_0xf728bc=_0x1e6f92[_0x454df5(0x196)](_0x96a8a9=>_0x96a8a9['id']===_0x221997),_0x36a178=_0xf728bc?.[_0x454df5(0x192)]?.[_0x454df5(0x1f9)]||'';_0x2fadfe[_0x454df5(0x1c3)]({'displayLine':_0x203d61,'attemptId':_0x291931,'projectName':_0x36a178});}}}return{'timelineRows':_0x2fadfe,'timeAxisHeader':_0x5f5566};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a46_0x58b19f(0x1f9)]=a46_0x58b19f(0x136);[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x256);async[a46_0x58b19f(0x185)](_0x320d4f){const _0x47b8f5=a46_0x58b19f,{options:_0x1379e8,args:_0x5df650,tdx:_0x345b2d}=_0x320d4f,_0x2c1a30=this[_0x47b8f5(0x227)](_0x5df650,_0x1379e8);if(!_0x2c1a30)return 0x1;const {projectName:_0x4b143d,workflowName:_0x136dcc}=_0x2c1a30,_0x3c1876=_0x1379e8['includeRetried'];if(_0x1379e8[_0x47b8f5(0x18a)]){if(_0x4b143d&&_0x136dcc)console[_0x47b8f5(0x191)]('Filter:\x20'+_0x4b143d+'.'+_0x136dcc);else _0x4b143d&&console[_0x47b8f5(0x191)](_0x47b8f5(0x213)+_0x4b143d);_0x3c1876&&console[_0x47b8f5(0x191)](_0x47b8f5(0x111));}const _0x429662=await withSpinner(_0x47b8f5(0x20f),()=>_0x345b2d[_0x47b8f5(0x1fe)][_0x47b8f5(0x245)]({'projectName':_0x4b143d,'workflowName':_0x136dcc,'includeRetried':_0x3c1876,'limit':_0x1379e8[_0x47b8f5(0x1d0)]}),{'verbose':_0x1379e8[_0x47b8f5(0x18a)]}),_0x21f26a=_0x429662['data'],_0x424ec4=_0x1379e8['limit']||0x64,_0x169ed1=_0x21f26a['length']>=_0x424ec4?a46_0x344a10['dim'](_0x47b8f5(0x22a)):'';console['error'](_0x47b8f5(0x23a)+_0x21f26a['length']+_0x47b8f5(0x16f)+(_0x21f26a[_0x47b8f5(0x1ee)]!==0x1?'s':'')+_0x169ed1);if(_0x1379e8['format']==='json'||_0x1379e8[_0x47b8f5(0x129)]===_0x47b8f5(0x2ba)||_0x1379e8[_0x47b8f5(0x129)]==='table')await handleSDKOutput(_0x21f26a,_0x1379e8);else{if(_0x21f26a[_0x47b8f5(0x1ee)]===0x0){if(_0x4b143d&&_0x136dcc)console[_0x47b8f5(0x1bb)](_0x47b8f5(0x231)+_0x4b143d+'.'+_0x136dcc);else _0x4b143d?console['log'](_0x47b8f5(0x20d)+_0x4b143d):console['log'](_0x47b8f5(0x14f));}else{const _0x19731d=_0x1379e8[_0x47b8f5(0x283)],_0x142e4f=_0x21f26a[_0x47b8f5(0x243)](_0x51a995=>{const _0x413a66=_0x47b8f5,_0x3664b7=a46_0x344a10['dim']('#'+_0x51a995['id']),_0x10373f=_0x51a995[_0x413a66(0x192)]?.['id'],_0x5cff79=_0x51a995[_0x413a66(0x126)]||_0x51a995[_0x413a66(0x2aa)],_0x3c42ab=_0x10373f&&_0x5cff79?hyperlink(_0x3664b7,getWorkflowAttemptUrl(_0x19731d,_0x10373f,_0x5cff79,_0x51a995['id'])):_0x3664b7,{icon:_0x2b5b5b,text:_0x441f0e}=getAttemptStatusDisplay(_0x51a995),_0x5195a9=(_0x51a995['project']?.[_0x413a66(0x1f9)]||'?')+'.'+(_0x51a995[_0x413a66(0x1fe)]?.[_0x413a66(0x1f9)]||'?'),_0x16b2f4=_0x51a995[_0x413a66(0x2a2)]?a46_0x344a10[_0x413a66(0x17c)](_0x51a995['sessionTime']):'';return(_0x3c42ab+'\x20'+_0x2b5b5b+(_0x441f0e?'\x20'+_0x441f0e:'')+'\x20'+_0x5195a9+'\x20'+_0x16b2f4)[_0x413a66(0x242)]();});await writeOutput(_0x142e4f[_0x47b8f5(0x17d)]('\x0a'),_0x1379e8[_0x47b8f5(0x203)],_0x47b8f5(0x24b));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a46_0x58b19f(0x1f9)]='workflow:attempt';[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x279);async['execute'](_0x414f1f){const _0x87b022=a46_0x58b19f,{options:_0x173d80,args:_0x4b47dc,tdx:_0x42e701}=_0x414f1f,_0x5f0fe3=_0x4b47dc[0x0];if(!_0x5f0fe3)return console['error'](_0x87b022(0x285)),0x1;_0x173d80[_0x87b022(0x18a)]&&console[_0x87b022(0x191)](_0x87b022(0x1d8)+_0x5f0fe3);const _0x2a1493=await withSpinner(_0x87b022(0x1c4),()=>_0x42e701[_0x87b022(0x1fe)][_0x87b022(0x14a)](_0x5f0fe3),{'verbose':_0x173d80[_0x87b022(0x18a)]}),_0x4fc93a=_0x2a1493[_0x87b022(0x171)];let _0x4bf49e;!_0x4fc93a[_0x87b022(0x1a0)]?_0x4bf49e=_0x4fc93a[_0x87b022(0x24c)]?'canceling':_0x87b022(0x272):_0x4bf49e=_0x4fc93a[_0x87b022(0x249)]?_0x87b022(0x249):_0x87b022(0x191);let _0x1620d4;if(_0x4fc93a[_0x87b022(0x210)]&&_0x4fc93a[_0x87b022(0x19c)]){const _0x388ce3=new Date(_0x4fc93a[_0x87b022(0x210)])[_0x87b022(0x1e1)](),_0x2507dc=new Date(_0x4fc93a[_0x87b022(0x19c)])[_0x87b022(0x1e1)]();_0x1620d4=Math['round']((_0x2507dc-_0x388ce3)/0x3e8);}const _0x460f45={'attempt_id':_0x4fc93a['id'],'status':_0x4bf49e,..._0x4fc93a[_0x87b022(0x1d1)]!==undefined&&{'index':_0x4fc93a[_0x87b022(0x1d1)]},..._0x4fc93a[_0x87b022(0x192)]&&{'project':_0x4fc93a['project']['name']},..._0x4fc93a[_0x87b022(0x1fe)]&&{'workflow':_0x4fc93a['workflow'][_0x87b022(0x1f9)]},..._0x4fc93a[_0x87b022(0x2aa)]&&{'session_id':_0x4fc93a[_0x87b022(0x2aa)]},..._0x4fc93a[_0x87b022(0x2a2)]&&{'session_time':_0x4fc93a['sessionTime']},..._0x4fc93a[_0x87b022(0x248)]&&{'retry_attempt':_0x4fc93a[_0x87b022(0x248)]},..._0x1620d4!==undefined&&{'duration_sec':_0x1620d4},..._0x4fc93a[_0x87b022(0x210)]&&{'created_at':_0x4fc93a[_0x87b022(0x210)]},..._0x4fc93a[_0x87b022(0x19c)]&&{'finished_at':_0x4fc93a['finishedAt']},...Object['keys'](_0x4fc93a[_0x87b022(0x2a6)])[_0x87b022(0x1ee)]>0x0&&{'params':_0x4fc93a[_0x87b022(0x2a6)]}};return await handleSingleObjectOutput(_0x460f45,_0x173d80),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a46_0x58b19f(0x1f9)]=a46_0x58b19f(0x152);[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x215);async[a46_0x58b19f(0x185)](_0x2b9401){const _0x406601=a46_0x58b19f,{options:_0x3c511f,args:_0x511e01,tdx:_0x267389}=_0x2b9401,_0x5b3788=_0x511e01[0x0];if(!_0x5b3788)return console[_0x406601(0x191)](_0x406601(0x285)),0x1;const _0x52c40c=_0x3c511f[_0x406601(0x131)];_0x3c511f[_0x406601(0x18a)]&&(console[_0x406601(0x191)](_0x406601(0x1d8)+_0x5b3788),_0x52c40c&&console[_0x406601(0x191)](_0x406601(0x1dd)));const _0x3ebb5f=await withSpinner(_0x406601(0x276),()=>_0x267389[_0x406601(0x1fe)]['tasks'](_0x5b3788,_0x52c40c||![]),{'verbose':_0x3c511f[_0x406601(0x18a)]}),_0x3d501b=_0x3ebb5f['data'];return console[_0x406601(0x191)](_0x406601(0x23a)+_0x3d501b[_0x406601(0x1ee)]+_0x406601(0x179)+(_0x3d501b[_0x406601(0x1ee)]!==0x1?'s':'')),await handleSDKOutput(_0x3d501b,_0x3c511f),0x0;}}function a46_0x2026(_0x51188d,_0x2a25aa){_0x51188d=_0x51188d-0x111;const _0x3e4766=a46_0x3e47();let _0x20268d=_0x3e4766[_0x51188d];return _0x20268d;}export class WorkflowLogsCommand extends BaseCommand{['name']=a46_0x58b19f(0x23b);[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x20b);async['execute'](_0x308fa6){const _0x2dbe8e=a46_0x58b19f,{options:_0x30b9ba,args:_0x297686,tdx:_0x54a47c}=_0x308fa6,_0x5c4476=_0x297686[0x0];let _0x488103=_0x297686[0x1];if(!_0x5c4476)return console[_0x2dbe8e(0x191)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x30b9ba[_0x2dbe8e(0x18a)]&&(console[_0x2dbe8e(0x191)]('Attempt\x20ID:\x20'+_0x5c4476),_0x488103&&console[_0x2dbe8e(0x191)](_0x2dbe8e(0x2ab)+_0x488103));const _0x41a76c=await withSpinner('Fetching\x20log\x20files...',()=>_0x54a47c[_0x2dbe8e(0x1fe)][_0x2dbe8e(0x218)](_0x5c4476,_0x488103),{'verbose':_0x30b9ba[_0x2dbe8e(0x18a)]}),_0x10c187=_0x41a76c[_0x2dbe8e(0x171)];if(_0x10c187['length']===0x0)return console['error'](_0x2dbe8e(0x117)),0x0;if(!_0x488103&&(_0x30b9ba['json']||_0x30b9ba[_0x2dbe8e(0x129)]))return await handleSDKOutput(_0x10c187,_0x30b9ba),0x0;if(!_0x488103){const _0x1aa487=_0x10c187['map'](_0x26a9b3=>({'title':_0x26a9b3[_0x2dbe8e(0x183)]+'\x20('+formatBytes(_0x26a9b3[_0x2dbe8e(0x11e)])+')','value':_0x26a9b3[_0x2dbe8e(0x183)]})),_0x5cc58f=await a46_0x4dadba({'type':_0x2dbe8e(0x205),'name':_0x2dbe8e(0x266),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x1aa487});if(!_0x5cc58f[_0x2dbe8e(0x266)])return console['error']('Cancelled'),0x0;_0x488103=_0x5cc58f[_0x2dbe8e(0x266)];}const _0x321ae5=await withSpinner(_0x2dbe8e(0x265),()=>_0x54a47c[_0x2dbe8e(0x1fe)][_0x2dbe8e(0x15f)](_0x5c4476,_0x488103),{'verbose':_0x30b9ba[_0x2dbe8e(0x18a)]}),_0x9f985=_0x321ae5[_0x2dbe8e(0x171)];return _0x9f985?console[_0x2dbe8e(0x1bb)](_0x9f985):console[_0x2dbe8e(0x191)](_0x2dbe8e(0x22e)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a46_0x58b19f(0x1f9)]='workflow:kill';[a46_0x58b19f(0x1f3)]='Kill\x20a\x20running\x20attempt';async[a46_0x58b19f(0x185)](_0x1722d4){const _0x43cf2b=a46_0x58b19f,{options:_0x5a4af2,args:_0x3adf02,tdx:_0x2daad5}=_0x1722d4,_0x5a9138=_0x3adf02[0x0];if(!_0x5a9138)return console[_0x43cf2b(0x191)](_0x43cf2b(0x285)),0x1;const _0xc6b9b=_0x5a4af2[_0x43cf2b(0x257)];_0x5a4af2[_0x43cf2b(0x18a)]&&(console[_0x43cf2b(0x191)](_0x43cf2b(0x1d8)+_0x5a9138),_0xc6b9b&&console['error'](_0x43cf2b(0x176)+_0xc6b9b));if(!_0x5a4af2[_0x43cf2b(0x26e)]){if(!isInteractive())return console[_0x43cf2b(0x191)](a46_0x344a10[_0x43cf2b(0x11f)](_0x43cf2b(0x1b5)),_0x43cf2b(0x251)),console[_0x43cf2b(0x191)](a46_0x344a10[_0x43cf2b(0x17c)](_0x43cf2b(0x146))),0x1;const _0x596c6c=await confirmKey(_0x43cf2b(0x1b3)+_0x5a9138+'?');if(!_0x596c6c)return console[_0x43cf2b(0x191)](a46_0x344a10['yellow'](_0x43cf2b(0x260))),0x1;}const _0x2a023f=await withSpinner('Killing\x20attempt...',()=>_0x2daad5[_0x43cf2b(0x1fe)][_0x43cf2b(0x294)](_0x5a9138,_0xc6b9b),{'verbose':_0x5a4af2[_0x43cf2b(0x18a)]}),_0x538dcf=_0x2a023f[_0x43cf2b(0x171)];return console[_0x43cf2b(0x191)]('✔\x20'+_0x538dcf),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a46_0x58b19f(0x287);[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x12e);async[a46_0x58b19f(0x185)](_0xff052){const _0x4a99be=a46_0x58b19f,{options:_0x2e13f5,args:_0x2dc04d,tdx:_0x310177}=_0xff052,_0x5f28a4=_0x2dc04d[0x0];if(!_0x5f28a4)return console[_0x4a99be(0x191)](_0x4a99be(0x1cd)),console[_0x4a99be(0x191)](_0x4a99be(0x162)),0x1;let _0x23b9d1=![],_0x58a2a2=_0x5f28a4;if(_0x5f28a4[_0x4a99be(0x28e)](_0x4a99be(0x19b)))_0x23b9d1=!![],_0x58a2a2=_0x5f28a4[_0x4a99be(0x1b9)](0x8);else{if(_0x5f28a4[_0x4a99be(0x28e)]('attempt:'))_0x23b9d1=![],_0x58a2a2=_0x5f28a4[_0x4a99be(0x1b9)](0x8);else return console[_0x4a99be(0x191)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x4a99be(0x191)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x19078f=_0x2e13f5[_0x4a99be(0x155)],_0x19c99a=_0x2e13f5[_0x4a99be(0x291)],_0x3c15e7=_0x2e13f5['params'],_0x345954=_0x2e13f5['force'];_0x2e13f5[_0x4a99be(0x18a)]&&(console['error']('Target:\x20'+(_0x23b9d1?_0x4a99be(0x13d):_0x4a99be(0x14a))+'\x20'+_0x58a2a2),_0x19078f&&console[_0x4a99be(0x191)](_0x4a99be(0x253)+_0x19078f),_0x19c99a&&console[_0x4a99be(0x191)](_0x4a99be(0x124)+_0x19c99a),_0x3c15e7&&console[_0x4a99be(0x191)](_0x4a99be(0x252)+_0x3c15e7),_0x345954&&console[_0x4a99be(0x191)](_0x4a99be(0x1ac)));let _0x35bf81;if(_0x3c15e7)try{if(_0x3c15e7['startsWith']('@')){const _0x5c0873=await import('fs/promises'),_0x6d2645=_0x3c15e7[_0x4a99be(0x1b9)](0x1),_0x1d3474=await _0x5c0873[_0x4a99be(0x157)](_0x6d2645,_0x4a99be(0x220));_0x35bf81=JSON[_0x4a99be(0x270)](_0x1d3474);}else _0x35bf81=JSON['parse'](_0x3c15e7);}catch{return console[_0x4a99be(0x191)](_0x4a99be(0x18c)),0x1;}if(!_0x2e13f5['yes']){if(!isInteractive())return console['error'](a46_0x344a10[_0x4a99be(0x11f)](_0x4a99be(0x1b5)),_0x4a99be(0x251)),console['error'](a46_0x344a10[_0x4a99be(0x17c)](_0x4a99be(0x146))),0x1;const _0x154d67=await confirmKey(_0x4a99be(0x255)+(_0x23b9d1?_0x4a99be(0x13d):_0x4a99be(0x14a))+'\x20'+_0x58a2a2+'?');if(!_0x154d67)return console['error'](a46_0x344a10[_0x4a99be(0x290)]('Cancelled')),0x1;}let _0x36fc67;_0x23b9d1?_0x36fc67=await withSpinner('Retrying\x20session...',()=>_0x310177[_0x4a99be(0x1fe)][_0x4a99be(0x1fd)](_0x58a2a2,{'fromTask':_0x19078f,'retryParams':_0x35bf81}),{'verbose':_0x2e13f5[_0x4a99be(0x18a)]}):_0x36fc67=await withSpinner('Retrying\x20attempt...',()=>_0x310177[_0x4a99be(0x1fe)]['retryAttempt'](_0x58a2a2,{'resumeFrom':_0x19c99a,'retryParams':_0x35bf81,'force':_0x345954}),{'verbose':_0x2e13f5['verbose']});const _0x48ab15=_0x36fc67[_0x4a99be(0x171)];return console['error'](_0x4a99be(0x212)),console[_0x4a99be(0x191)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x48ab15[_0x4a99be(0x201)]),console['error'](_0x4a99be(0x1cb)+_0x48ab15[_0x4a99be(0x2aa)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a46_0x58b19f(0x226);[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x232);async[a46_0x58b19f(0x185)](_0x65de9d){const _0x4e4e6c=a46_0x58b19f,{options:_0x23fac2,args:_0x163e8b,tdx:_0x396872}=_0x65de9d;let _0x61f5e1=_0x163e8b[0x0];if(!_0x61f5e1){const _0x226da1=this[_0x4e4e6c(0x193)]([],_0x23fac2),_0x17f2b7=await withSpinner(_0x4e4e6c(0x28b),()=>_0x396872[_0x4e4e6c(0x1fe)][_0x4e4e6c(0x1a4)](_0x226da1,{'limit':_0x23fac2[_0x4e4e6c(0x1d0)]}),{'verbose':_0x23fac2[_0x4e4e6c(0x18a)]}),_0x14bb07=_0x17f2b7[_0x4e4e6c(0x171)];if(_0x14bb07[_0x4e4e6c(0x1ee)]===0x0)return console[_0x4e4e6c(0x191)](_0x4e4e6c(0x230)),!_0x226da1&&console['error'](a46_0x344a10[_0x4e4e6c(0x17c)](_0x4e4e6c(0x16e))),0x1;const _0x5248a4=_0x14bb07['map'](_0x494d0e=>({'title':_0x494d0e[_0x4e4e6c(0x192)]?.['name']+'.'+_0x494d0e[_0x4e4e6c(0x1f9)],'value':_0x494d0e[_0x4e4e6c(0x192)]?.[_0x4e4e6c(0x1f9)]+'.'+_0x494d0e['name'],'description':_0x494d0e[_0x4e4e6c(0x25d)]?_0x4e4e6c(0x1cc)+_0x494d0e[_0x4e4e6c(0x25d)]:undefined})),_0x1c6a12=await a46_0x4dadba({'type':_0x4e4e6c(0x205),'name':'workflow','message':_0x4e4e6c(0x150),'choices':_0x5248a4});if(!_0x1c6a12['workflow'])return 0x1;_0x61f5e1=_0x1c6a12['workflow'];}if(!_0x61f5e1[_0x4e4e6c(0x2a7)]('.')){const _0x1e3f5c=this[_0x4e4e6c(0x193)]([],_0x23fac2);if(_0x1e3f5c)_0x61f5e1=_0x1e3f5c+'.'+_0x61f5e1;else return console[_0x4e4e6c(0x191)](a46_0x344a10[_0x4e4e6c(0x11f)]('Error:'),_0x4e4e6c(0x1e3)),console[_0x4e4e6c(0x191)](a46_0x344a10[_0x4e4e6c(0x17c)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x4e6895=_0x23fac2['param'],_0x1e959a=_0x23fac2[_0x4e4e6c(0x2a2)],_0x448997={};if(_0x4e6895&&Array[_0x4e4e6c(0x1fb)](_0x4e6895))for(const _0x4d17ba of _0x4e6895){const _0x7e180c=_0x4d17ba['indexOf']('=');if(_0x7e180c===-0x1)return console[_0x4e4e6c(0x191)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x4d17ba),console['error'](_0x4e4e6c(0x263)),0x1;const _0x3784a4=_0x4d17ba[_0x4e4e6c(0x1b9)](0x0,_0x7e180c),_0x707b60=_0x4d17ba[_0x4e4e6c(0x1b9)](_0x7e180c+0x1);try{_0x448997[_0x3784a4]=JSON[_0x4e4e6c(0x270)](_0x707b60);}catch{_0x448997[_0x3784a4]=_0x707b60;}}_0x23fac2[_0x4e4e6c(0x18a)]&&(console[_0x4e4e6c(0x191)]('Workflow:\x20'+_0x61f5e1),Object[_0x4e4e6c(0x1d9)](_0x448997)['length']>0x0&&console[_0x4e4e6c(0x191)](_0x4e4e6c(0x2a5)+JSON['stringify'](_0x448997)),_0x1e959a&&console[_0x4e4e6c(0x191)](_0x4e4e6c(0x13e)+_0x1e959a));const _0x4dc858=await withSpinner(_0x4e4e6c(0x2b2),()=>_0x396872['workflow'][_0x4e4e6c(0x14b)](_0x61f5e1,_0x448997,{'sessionTime':_0x1e959a}),{'verbose':_0x23fac2['verbose']}),_0x3f2e54=_0x4dc858[_0x4e4e6c(0x171)];console[_0x4e4e6c(0x191)](_0x4e4e6c(0x144)),console[_0x4e4e6c(0x191)](_0x4e4e6c(0x119)+_0x3f2e54['id']),console[_0x4e4e6c(0x191)](_0x4e4e6c(0x1cb)+_0x3f2e54[_0x4e4e6c(0x2aa)]),console[_0x4e4e6c(0x191)](_0x4e4e6c(0x1db)+_0x3f2e54[_0x4e4e6c(0x192)]?.['name']),console[_0x4e4e6c(0x191)]('\x20\x20Workflow:\x20'+_0x3f2e54['workflow']?.[_0x4e4e6c(0x1f9)]);if(_0x3f2e54[_0x4e4e6c(0x192)]?.['id']&&_0x3f2e54[_0x4e4e6c(0x2aa)]&&_0x3f2e54['id']){const _0x58f9cd=_0x23fac2['site'],_0x103bf5=getConsoleUrl(_0x58f9cd,'/app/workflows/'+_0x3f2e54[_0x4e4e6c(0x192)]['id']+_0x4e4e6c(0x206)+_0x3f2e54[_0x4e4e6c(0x2aa)]+'/attempt/'+_0x3f2e54['id']);console['error'](_0x4e4e6c(0x16b)+a46_0x344a10[_0x4e4e6c(0x29d)](_0x103bf5));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a46_0x58b19f(0x1f9)]=a46_0x58b19f(0x237);[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x275);async[a46_0x58b19f(0x185)](_0x5d8a8d){const _0xd09e11=a46_0x58b19f,{options:_0x54d118,args:_0x5cce60,tdx:_0x25d416}=_0x5d8a8d,_0x44ea87=_0x5cce60[0x0],_0xf115db=_0x5cce60[0x1]||'.';if(!_0x44ea87)return console[_0xd09e11(0x191)]('Error:\x20Project\x20name\x20is\x20required'),console[_0xd09e11(0x191)](_0xd09e11(0x1ce)),0x1;const _0x5b1d42=_0x54d118[_0xd09e11(0x25d)];_0x54d118[_0xd09e11(0x18a)]&&(console['error'](_0xd09e11(0x207)+_0x44ea87),console[_0xd09e11(0x191)](_0xd09e11(0x1af)+_0xf115db),_0x5b1d42&&console[_0xd09e11(0x191)]('Revision:\x20'+_0x5b1d42));const _0x4d6c85=await withSpinner('Downloading\x20project\x20'+_0x44ea87+'...',()=>_0x25d416[_0xd09e11(0x1fe)][_0xd09e11(0x262)](_0x44ea87,_0xf115db,{'revision':_0x5b1d42}),{'verbose':_0x54d118[_0xd09e11(0x18a)]}),_0x3fb727=_0x4d6c85[_0xd09e11(0x171)];return console[_0xd09e11(0x191)](_0xd09e11(0x1fc)+_0x3fb727[_0xd09e11(0x134)]),console[_0xd09e11(0x191)](_0xd09e11(0x1c6)+_0x3fb727[_0xd09e11(0x25d)]),console[_0xd09e11(0x191)](_0xd09e11(0x254)+_0x3fb727[_0xd09e11(0x224)]),console[_0xd09e11(0x191)](_0xd09e11(0x18d)+_0xf115db+'/'+_0x3fb727[_0xd09e11(0x134)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a46_0x58b19f(0x1f9)]=a46_0x58b19f(0x1fa);[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x2a3);async[a46_0x58b19f(0x185)](_0x579f1a){const _0x5e83cc=a46_0x58b19f,{options:_0x31295a,args:_0xcb2207,tdx:_0x14d128}=_0x579f1a;let _0x59a3f1='.',_0xc62523=_0x31295a['name'];if(_0xcb2207[0x0]){const {promises:_0x407bf4}=await import('fs');try{const _0x44167a=await _0x407bf4[_0x5e83cc(0x11b)](_0xcb2207[0x0]);if(_0x44167a[_0x5e83cc(0x1a8)]())_0x59a3f1=_0xcb2207[0x0];else return console[_0x5e83cc(0x191)]('Error:\x20'+_0xcb2207[0x0]+_0x5e83cc(0x17b)),0x1;}catch{_0xc62523=_0xcb2207[0x0],_0x59a3f1='.';}}const _0x56b0c2=_0x31295a[_0x5e83cc(0x25d)],_0x507ee5=_0x31295a['skipValidation'];_0x31295a['verbose']&&(console[_0x5e83cc(0x191)]('Project\x20directory:\x20'+_0x59a3f1),_0xc62523&&console[_0x5e83cc(0x191)](_0x5e83cc(0x149)+_0xc62523),_0x56b0c2&&console[_0x5e83cc(0x191)](_0x5e83cc(0x236)+_0x56b0c2),_0x507ee5&&console[_0x5e83cc(0x191)](_0x5e83cc(0x16d)));const _0x2cf454=await withSpinner(_0x5e83cc(0x2ae),()=>_0x14d128[_0x5e83cc(0x1fe)][_0x5e83cc(0x1c3)](_0x59a3f1,{'projectName':_0xc62523,'revision':_0x56b0c2,'skipValidation':_0x507ee5}),{'verbose':_0x31295a[_0x5e83cc(0x18a)]}),_0x11d582=_0x2cf454[_0x5e83cc(0x171)];return console[_0x5e83cc(0x191)](_0x5e83cc(0x269)+_0x11d582[_0x5e83cc(0x134)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x11d582['projectId']),console[_0x5e83cc(0x191)](_0x5e83cc(0x1c6)+_0x11d582['revision']),await this['showWorkflowConsoleUrl'](_0x14d128,_0x11d582[_0x5e83cc(0x134)],_0x31295a[_0x5e83cc(0x283)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a46_0x58b19f(0x1f9)]=a46_0x58b19f(0x1e5);[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x217);async[a46_0x58b19f(0x185)](_0x7d79bc){const _0x38e927=a46_0x58b19f,{options:_0x4219d8,args:_0x48af58,tdx:_0x4c55e4}=_0x7d79bc,_0x11d59e=_0x48af58[0x0],_0x4e2289=_0x48af58[0x1];if(!_0x11d59e)return console[_0x38e927(0x191)](a46_0x344a10[_0x38e927(0x11f)]('Error:'),_0x38e927(0x19e)),console[_0x38e927(0x191)](a46_0x344a10['dim'](_0x38e927(0x190))),0x1;const _0x57922f=_0x4219d8[_0x38e927(0x25d)];_0x4219d8[_0x38e927(0x18a)]&&(console[_0x38e927(0x191)](_0x38e927(0x207)+_0x11d59e),_0x4e2289&&console[_0x38e927(0x191)](_0x38e927(0x184)+_0x4e2289),_0x57922f&&console[_0x38e927(0x191)](_0x38e927(0x236)+_0x57922f),_0x4219d8[_0x38e927(0x18e)]&&console[_0x38e927(0x191)]('Dry\x20run:\x20yes'));const _0x2135de=await withSpinner(_0x38e927(0x1f4)+_0x11d59e+_0x38e927(0x194),()=>_0x4c55e4[_0x38e927(0x1fe)]['pullProject'](_0x11d59e,{'targetDir':_0x4e2289,'revision':_0x57922f}),{'verbose':_0x4219d8['verbose']}),_0x3ce9a6=_0x2135de[_0x38e927(0x171)];_0x3ce9a6['isNewProject']?console[_0x38e927(0x191)](_0x38e927(0x198)+_0x3ce9a6[_0x38e927(0x134)]):console[_0x38e927(0x191)](_0x38e927(0x2bb)+_0x3ce9a6[_0x38e927(0x134)]);console['error'](_0x38e927(0x1c6)+_0x3ce9a6['revision']),console[_0x38e927(0x191)](_0x38e927(0x22d)+(a46_0xf2b69b['relative'](process[_0x38e927(0x1c0)](),_0x3ce9a6['targetDir'])||'.')),console[_0x38e927(0x191)](_0x38e927(0x135)+a46_0x344a10[_0x38e927(0x156)]('+'+_0x3ce9a6[_0x38e927(0x2af)][_0x38e927(0x1f0)]+'\x20new')+',\x20'+(a46_0x344a10[_0x38e927(0x290)]('~'+_0x3ce9a6[_0x38e927(0x2af)][_0x38e927(0x2a0)]+_0x38e927(0x142))+',\x20')+(a46_0x344a10[_0x38e927(0x11f)]('-'+_0x3ce9a6[_0x38e927(0x2af)][_0x38e927(0x121)]+_0x38e927(0x122))+',\x20')+(''+a46_0x344a10['dim'](_0x3ce9a6[_0x38e927(0x2af)][_0x38e927(0x12b)]+_0x38e927(0x1e6))));for(const _0xf00f5b of _0x3ce9a6[_0x38e927(0x2b5)]){_0xf00f5b[_0x38e927(0x29c)]==='modified'&&_0xf00f5b['diff']&&(console[_0x38e927(0x191)]('\x0a'+a46_0x344a10[_0x38e927(0x29d)]('---\x20'+_0xf00f5b[_0x38e927(0x282)])),console['error'](_0xf00f5b['diff']));}if(!_0x3ce9a6[_0x38e927(0x268)])return saveSessionContext({'workflow_project':_0x3ce9a6[_0x38e927(0x134)]},_0x4219d8[_0x38e927(0x13d)]),console[_0x38e927(0x191)](a46_0x344a10[_0x38e927(0x156)](_0x38e927(0x2a9))),console[_0x38e927(0x191)](a46_0x344a10[_0x38e927(0x17c)](_0x38e927(0x160)+_0x3ce9a6[_0x38e927(0x134)])),0x0;if(_0x4219d8[_0x38e927(0x18e)])return console[_0x38e927(0x191)](a46_0x344a10[_0x38e927(0x290)](_0x38e927(0x20e))),0x0;if(!_0x4219d8['yes']){if(!isInteractive())return console[_0x38e927(0x191)](a46_0x344a10[_0x38e927(0x11f)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x38e927(0x191)](a46_0x344a10[_0x38e927(0x17c)](_0x38e927(0x146))),0x1;const _0x4ff151=await confirmKey(_0x38e927(0x1dc));if(!_0x4ff151)return console[_0x38e927(0x191)](a46_0x344a10['yellow'](_0x38e927(0x260)),_0x38e927(0x153)),0x1;}await withSpinner(_0x38e927(0x1aa),()=>_0x4c55e4['workflow'][_0x38e927(0x1d5)](_0x3ce9a6,{'revision':_0x57922f}),{'verbose':_0x4219d8[_0x38e927(0x18a)]}),saveSessionContext({'workflow_project':_0x3ce9a6['projectName']},_0x4219d8['session']),console[_0x38e927(0x191)](a46_0x344a10[_0x38e927(0x156)]('✔\x20Pull\x20complete'));const _0x5e307b=a46_0xf2b69b[_0x38e927(0x1c2)](process['cwd'](),_0x3ce9a6[_0x38e927(0x2b6)])||'.';return console[_0x38e927(0x191)](a46_0x344a10['dim'](_0x38e927(0x18d)+_0x5e307b)),console[_0x38e927(0x191)](a46_0x344a10[_0x38e927(0x17c)](_0x38e927(0x160)+_0x3ce9a6[_0x38e927(0x134)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a46_0x58b19f(0x1f9)]=a46_0x58b19f(0x26d);[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x169);async[a46_0x58b19f(0x185)](_0x19f2fb){const _0x5707f1=a46_0x58b19f,{options:_0x172105,args:_0x31d8fe,tdx:_0x3411e7}=_0x19f2fb,_0x525013=this[_0x5707f1(0x23c)](_0x31d8fe,_0x172105),_0x2c9d49=_0x172105[_0x5707f1(0x25d)],_0x4c2375=_0x172105[_0x5707f1(0x202)];_0x172105[_0x5707f1(0x18a)]&&(_0x525013&&console[_0x5707f1(0x191)]('Source\x20directory:\x20'+_0x525013),_0x2c9d49&&console[_0x5707f1(0x191)](_0x5707f1(0x236)+_0x2c9d49),_0x172105[_0x5707f1(0x18e)]&&console[_0x5707f1(0x191)](_0x5707f1(0x167)),_0x4c2375&&console[_0x5707f1(0x191)](_0x5707f1(0x16d)));let _0x37500b;try{_0x37500b=await withSpinner(_0x5707f1(0x2a4),()=>_0x3411e7[_0x5707f1(0x1fe)][_0x5707f1(0x11a)]({'sourceDir':_0x525013,'revision':_0x2c9d49,'skipValidation':_0x4c2375}),{'verbose':_0x172105[_0x5707f1(0x18a)]});}catch(_0x393d80){if(_0x393d80 instanceof Error&&_0x393d80[_0x5707f1(0x1b6)]['includes'](_0x5707f1(0x145)))return console[_0x5707f1(0x191)](a46_0x344a10['red'](_0x5707f1(0x1ae)),_0x5707f1(0x154)),_0x172105[_0x5707f1(0x1b4)]?console[_0x5707f1(0x191)](a46_0x344a10['dim'](_0x5707f1(0x223)+_0x172105[_0x5707f1(0x1b4)]+_0x5707f1(0x13f)+_0x172105['workflowProject']+'\x27')):console[_0x5707f1(0x191)](a46_0x344a10['dim']('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x393d80;}const _0x2f04f4=_0x37500b[_0x5707f1(0x171)];console[_0x5707f1(0x191)](_0x5707f1(0x13c)+_0x2f04f4[_0x5707f1(0x134)]),console['error'](_0x5707f1(0x138)+_0x2f04f4[_0x5707f1(0x261)]),console[_0x5707f1(0x191)](_0x5707f1(0x1c6)+_0x2f04f4[_0x5707f1(0x25d)]),console[_0x5707f1(0x191)]('\x20\x20Changes:\x20'+a46_0x344a10[_0x5707f1(0x156)]('+'+_0x2f04f4['summary'][_0x5707f1(0x1f0)]+'\x20new')+',\x20'+(a46_0x344a10[_0x5707f1(0x290)]('~'+_0x2f04f4['summary'][_0x5707f1(0x2a0)]+_0x5707f1(0x142))+',\x20')+(a46_0x344a10[_0x5707f1(0x11f)]('-'+_0x2f04f4['summary'][_0x5707f1(0x121)]+_0x5707f1(0x122))+',\x20')+(''+a46_0x344a10[_0x5707f1(0x17c)](_0x2f04f4[_0x5707f1(0x2af)]['unchanged']+_0x5707f1(0x1e6))));for(const _0x28ae41 of _0x2f04f4['changes']){_0x28ae41[_0x5707f1(0x29c)]===_0x5707f1(0x2a0)&&_0x28ae41['diff']&&(console[_0x5707f1(0x191)]('\x0a'+a46_0x344a10[_0x5707f1(0x29d)](_0x5707f1(0x28f)+_0x28ae41[_0x5707f1(0x282)])),console[_0x5707f1(0x191)](_0x28ae41[_0x5707f1(0x123)]));}if(!_0x2f04f4[_0x5707f1(0x268)])return console[_0x5707f1(0x191)](a46_0x344a10[_0x5707f1(0x156)](_0x5707f1(0x19f))),await this[_0x5707f1(0x209)](_0x3411e7,_0x2f04f4['projectName'],_0x172105['site']),0x0;if(_0x172105[_0x5707f1(0x18e)])return console[_0x5707f1(0x191)](a46_0x344a10[_0x5707f1(0x290)](_0x5707f1(0x295))),0x0;if(!_0x172105[_0x5707f1(0x26e)]){if(!isInteractive())return console[_0x5707f1(0x191)](a46_0x344a10['red'](_0x5707f1(0x1b5)),_0x5707f1(0x251)),console[_0x5707f1(0x191)](a46_0x344a10[_0x5707f1(0x17c)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x426c4b=await confirmKey(_0x5707f1(0x17e));if(!_0x426c4b)return console[_0x5707f1(0x191)](a46_0x344a10[_0x5707f1(0x290)](_0x5707f1(0x260)),_0x5707f1(0x296)),0x1;}const _0x34123d=await withSpinner(_0x5707f1(0x120),()=>_0x3411e7[_0x5707f1(0x1fe)][_0x5707f1(0x27c)](_0x2f04f4),{'verbose':_0x172105[_0x5707f1(0x18a)]}),_0x4951e4=_0x34123d['data'];return console[_0x5707f1(0x191)](a46_0x344a10[_0x5707f1(0x156)](_0x5707f1(0x199))),console['error'](_0x5707f1(0x273)+_0x4951e4[_0x5707f1(0x21d)]),console[_0x5707f1(0x191)](_0x5707f1(0x1c6)+_0x4951e4[_0x5707f1(0x25d)]),await this[_0x5707f1(0x209)](_0x3411e7,_0x4951e4['projectName'],_0x172105[_0x5707f1(0x283)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']='workflow:clone';[a46_0x58b19f(0x1f3)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a46_0x58b19f(0x185)](_0x3cc16a){const _0x4e4f89=a46_0x58b19f,{options:_0xdc429,args:_0x5d27e4,tdx:_0x59bb5e}=_0x3cc16a,_0xd30225=this['resolveProjectDir'](_0x5d27e4,_0xdc429),_0x2c0cf6=_0xdc429[_0x4e4f89(0x1f9)],_0x18b2d9=_0xdc429[_0x4e4f89(0x25d)],_0x5aa26f=_0xdc429[_0x4e4f89(0x202)];if(!_0xd30225)return console[_0x4e4f89(0x191)](a46_0x344a10[_0x4e4f89(0x11f)](_0x4e4f89(0x1ae)),_0x4e4f89(0x23e)),console[_0x4e4f89(0x191)](a46_0x344a10[_0x4e4f89(0x17c)](_0x4e4f89(0x130))),console['error'](a46_0x344a10['dim'](_0x4e4f89(0x280))),0x1;if(!_0x2c0cf6)return console[_0x4e4f89(0x191)](a46_0x344a10[_0x4e4f89(0x11f)](_0x4e4f89(0x1ae)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0x4e4f89(0x191)](a46_0x344a10['dim'](_0x4e4f89(0x130))),0x1;_0xdc429[_0x4e4f89(0x18a)]&&(console[_0x4e4f89(0x191)](_0x4e4f89(0x2b4)+_0xd30225),console[_0x4e4f89(0x191)](_0x4e4f89(0x1b7)+_0x2c0cf6),_0x18b2d9&&console['error'](_0x4e4f89(0x236)+_0x18b2d9),_0xdc429[_0x4e4f89(0x18e)]&&console[_0x4e4f89(0x191)](_0x4e4f89(0x167)),_0x5aa26f&&console[_0x4e4f89(0x191)]('Validation:\x20skipped'));const _0x112944=await withSpinner('Analyzing\x20project...',()=>_0x59bb5e[_0x4e4f89(0x1fe)][_0x4e4f89(0x125)](_0xd30225,_0x2c0cf6,{'revision':_0x18b2d9,'skipValidation':_0x5aa26f}),{'verbose':_0xdc429[_0x4e4f89(0x18a)]}),_0x326156=_0x112944[_0x4e4f89(0x171)];console[_0x4e4f89(0x191)](_0x4e4f89(0x1a1)+_0x326156[_0x4e4f89(0x261)]);_0x326156[_0x4e4f89(0x174)]&&console[_0x4e4f89(0x191)](_0x4e4f89(0x195)+_0x326156[_0x4e4f89(0x174)]);console[_0x4e4f89(0x191)](_0x4e4f89(0x1b7)+_0x326156[_0x4e4f89(0x1e4)]),console[_0x4e4f89(0x191)](_0x4e4f89(0x236)+_0x326156[_0x4e4f89(0x25d)]),console[_0x4e4f89(0x191)](_0x4e4f89(0x1f5)+_0x326156['fileCount']);_0x326156['targetExists']&&(console[_0x4e4f89(0x191)](a46_0x344a10[_0x4e4f89(0x290)]('\x0a⚠\x20Project\x20\x22'+_0x326156[_0x4e4f89(0x1e4)]+_0x4e4f89(0x26c)+_0x326156[_0x4e4f89(0x21c)]+')')),console[_0x4e4f89(0x191)](a46_0x344a10[_0x4e4f89(0x290)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0xdc429[_0x4e4f89(0x18e)])return console[_0x4e4f89(0x191)](a46_0x344a10['yellow'](_0x4e4f89(0x1c1))),0x0;if(!_0xdc429[_0x4e4f89(0x26e)]){if(!isInteractive())return console[_0x4e4f89(0x191)](a46_0x344a10[_0x4e4f89(0x11f)]('\x0aError:'),_0x4e4f89(0x251)),console['error'](a46_0x344a10[_0x4e4f89(0x17c)](_0x4e4f89(0x146))),0x1;const _0x3000d0=_0x326156[_0x4e4f89(0x174)]||a46_0xf2b69b[_0x4e4f89(0x20a)](_0xd30225),_0x200487=_0x326156['targetExists']?_0x4e4f89(0x1e0)+_0x2c0cf6+_0x4e4f89(0x235):_0x4e4f89(0x1ba)+_0x3000d0+'\x22\x20to\x20new\x20project\x20\x22'+_0x2c0cf6+'\x22?',_0x4bb986=await confirmKey(_0x200487);if(!_0x4bb986)return console['error'](a46_0x344a10[_0x4e4f89(0x290)](_0x4e4f89(0x260))),0x1;}const _0x23e030=await withSpinner(_0x326156[_0x4e4f89(0x1c8)]?_0x4e4f89(0x1ef)+_0x2c0cf6+_0x4e4f89(0x194):_0x4e4f89(0x1b8)+_0x2c0cf6+_0x4e4f89(0x194),()=>_0x59bb5e[_0x4e4f89(0x1fe)]['executeCloneProject'](_0x326156),{'verbose':_0xdc429[_0x4e4f89(0x18a)]}),_0x52360e=_0x23e030[_0x4e4f89(0x171)];return console[_0x4e4f89(0x191)](a46_0x344a10[_0x4e4f89(0x156)](_0x326156['targetExists']?_0x4e4f89(0x12c):_0x4e4f89(0x17f))),console[_0x4e4f89(0x191)](_0x4e4f89(0x1db)+_0x52360e['newProjectName']),console[_0x4e4f89(0x191)](_0x4e4f89(0x273)+_0x52360e['newProjectId']),console['error'](_0x4e4f89(0x1c6)+_0x52360e['revision']),await this['showWorkflowConsoleUrl'](_0x59bb5e,_0x52360e[_0x4e4f89(0x1e4)],_0xdc429[_0x4e4f89(0x283)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']='workflow:delete';[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x1f7);async['execute'](_0x345157){const _0x544b7d=a46_0x58b19f,{options:_0x3af266,args:_0x42c356,tdx:_0x327eca}=_0x345157,_0x46d568=_0x42c356[0x0];if(!_0x46d568)return console[_0x544b7d(0x191)](_0x544b7d(0x228)),console['error'](_0x544b7d(0x298)),0x1;_0x3af266['verbose']&&console['error'](_0x544b7d(0x207)+_0x46d568);if(!_0x3af266['yes']){if(!isInteractive())return console[_0x544b7d(0x191)](a46_0x344a10[_0x544b7d(0x11f)](_0x544b7d(0x1b5)),_0x544b7d(0x251)),console[_0x544b7d(0x191)](a46_0x344a10[_0x544b7d(0x17c)](_0x544b7d(0x146))),0x1;const _0x4c7eed=await confirmKey(_0x544b7d(0x26a)+_0x46d568+_0x544b7d(0x25a));if(!_0x4c7eed)return console['error'](a46_0x344a10['yellow'](_0x544b7d(0x260))),0x1;}const _0x1b4d5d=await withSpinner('Deleting\x20project\x20'+_0x46d568+_0x544b7d(0x194),()=>_0x327eca[_0x544b7d(0x1fe)][_0x544b7d(0x2ad)](_0x46d568),{'verbose':_0x3af266[_0x544b7d(0x18a)]}),_0x24361d=_0x1b4d5d[_0x544b7d(0x171)];return console[_0x544b7d(0x191)](_0x544b7d(0x250)+_0x24361d[_0x544b7d(0x134)]),console[_0x544b7d(0x191)](_0x544b7d(0x273)+_0x24361d['projectId']),0x0;}}export function parseKeyValue(_0x3c5be8){const _0x493e2f=a46_0x58b19f,_0x15ea4a=_0x3c5be8[_0x493e2f(0x1c5)]('=');if(_0x15ea4a===-0x1)throw new Error(_0x493e2f(0x143)+_0x3c5be8+_0x493e2f(0x127));const _0x21f549=_0x3c5be8[_0x493e2f(0x1b9)](0x0,_0x15ea4a),_0x2eff7f=_0x3c5be8[_0x493e2f(0x1b9)](_0x15ea4a+0x1);if(!_0x21f549)throw new Error(_0x493e2f(0x29e));return{'key':_0x21f549,'value':_0x2eff7f};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a46_0x58b19f(0x1f9)]=a46_0x58b19f(0x1ca);[a46_0x58b19f(0x1f3)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a46_0x58b19f(0x185)](_0x2a1b4f){const _0x598388=a46_0x58b19f,{options:_0x142bc7,args:_0x260248,tdx:_0x182378}=_0x2a1b4f,_0x203b4e=this['requireProject'](_0x260248,_0x142bc7);if(!_0x203b4e)return 0x1;_0x142bc7[_0x598388(0x18a)]&&console['error']('Project:\x20'+_0x203b4e);const _0x20db2d=await withSpinner(_0x598388(0x163),()=>_0x182378[_0x598388(0x1fe)][_0x598388(0x1ad)](_0x203b4e),{'verbose':_0x142bc7['verbose']}),{secrets:_0x84e7dd}=_0x20db2d[_0x598388(0x171)];return console['error']('✔\x20Found\x20'+_0x84e7dd['length']+_0x598388(0x27d)+(_0x84e7dd['length']!==0x1?'s':'')),await handleSDKOutput(_0x84e7dd,_0x142bc7),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a46_0x58b19f(0x1f9)]=a46_0x58b19f(0x244);[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x115);async[a46_0x58b19f(0x185)](_0x144dd3){const _0x45ed16=a46_0x58b19f,{options:_0x487a51,args:_0x531c06,tdx:_0x309396}=_0x144dd3;let _0x24bc86,_0x55a8a5;if(_0x531c06[_0x45ed16(0x1ee)]>=0x2)_0x24bc86=_0x531c06[0x0],_0x55a8a5=_0x531c06[0x1];else{if(_0x531c06[_0x45ed16(0x1ee)]===0x1&&_0x487a51[_0x45ed16(0x1b4)])_0x24bc86=_0x487a51['workflowProject'],_0x55a8a5=_0x531c06[0x0];else return _0x531c06[_0x45ed16(0x1ee)]===0x1?(console[_0x45ed16(0x191)](_0x45ed16(0x274)),console[_0x45ed16(0x191)](_0x45ed16(0x16e)),0x1):(console[_0x45ed16(0x191)](_0x45ed16(0x132)),console[_0x45ed16(0x191)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE'),0x1);}let _0x5385c2,_0x35ba52;try{({key:_0x5385c2,value:_0x35ba52}=parseKeyValue(_0x55a8a5));}catch(_0x1ccb2a){return _0x1ccb2a instanceof Error&&console['error'](a46_0x344a10[_0x45ed16(0x11f)](_0x45ed16(0x1ae)),_0x1ccb2a['message']),0x1;}_0x487a51[_0x45ed16(0x18a)]&&(console[_0x45ed16(0x191)](_0x45ed16(0x207)+_0x24bc86),console[_0x45ed16(0x191)](_0x45ed16(0x229)+_0x5385c2));const _0x31d388=await withSpinner(_0x45ed16(0x1ff),()=>_0x309396[_0x45ed16(0x1fe)]['setSecret'](_0x24bc86,_0x5385c2,_0x35ba52),{'verbose':_0x487a51[_0x45ed16(0x18a)]}),_0x43104d=_0x31d388[_0x45ed16(0x171)];return console[_0x45ed16(0x191)](_0x45ed16(0x170)+_0x43104d[_0x45ed16(0x1bf)]+_0x45ed16(0x1b0)+_0x43104d[_0x45ed16(0x134)]+'\x27'),(_0x487a51['json']||_0x487a51[_0x45ed16(0x2ba)])&&await handleSingleObjectOutput(_0x43104d,_0x487a51),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a46_0x58b19f(0x1f9)]='workflow:secrets:delete';[a46_0x58b19f(0x1f3)]=a46_0x58b19f(0x18f);async[a46_0x58b19f(0x185)](_0x436d40){const _0x2df09d=a46_0x58b19f,{options:_0x5b076d,args:_0x32ae66,tdx:_0x580bfd}=_0x436d40;let _0x121726,_0x38ab16;if(_0x32ae66[_0x2df09d(0x1ee)]>=0x2)_0x121726=_0x32ae66[0x0],_0x38ab16=_0x32ae66[0x1];else{if(_0x32ae66[_0x2df09d(0x1ee)]===0x1&&_0x5b076d['workflowProject'])_0x121726=_0x5b076d[_0x2df09d(0x1b4)],_0x38ab16=_0x32ae66[0x0];else return _0x32ae66['length']===0x1?(console[_0x2df09d(0x191)](_0x2df09d(0x274)),console[_0x2df09d(0x191)](_0x2df09d(0x16e)),0x1):(console[_0x2df09d(0x191)](_0x2df09d(0x2b1)),console[_0x2df09d(0x191)](_0x2df09d(0x186)),0x1);}_0x5b076d[_0x2df09d(0x18a)]&&(console['error']('Project:\x20'+_0x121726),console[_0x2df09d(0x191)](_0x2df09d(0x229)+_0x38ab16));if(!_0x5b076d[_0x2df09d(0x26e)]){if(!isInteractive())return console[_0x2df09d(0x191)](a46_0x344a10['red'](_0x2df09d(0x1b5)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a46_0x344a10[_0x2df09d(0x17c)](_0x2df09d(0x146))),0x1;const _0x5f0eb7=await confirmKey(_0x2df09d(0x128)+_0x38ab16+_0x2df09d(0x29f)+_0x121726+'\x27?');if(!_0x5f0eb7)return console[_0x2df09d(0x191)](a46_0x344a10[_0x2df09d(0x290)](_0x2df09d(0x260))),0x1;}const _0x2a90bc=await withSpinner(_0x2df09d(0x216),()=>_0x580bfd['workflow']['deleteSecret'](_0x121726,_0x38ab16),{'verbose':_0x5b076d['verbose']}),_0x3df23c=_0x2a90bc[_0x2df09d(0x171)];return console[_0x2df09d(0x191)](_0x2df09d(0x170)+_0x3df23c[_0x2df09d(0x1bf)]+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x3df23c[_0x2df09d(0x134)]+'\x27'),(_0x5b076d[_0x2df09d(0x16a)]||_0x5b076d[_0x2df09d(0x2ba)])&&await handleSingleObjectOutput(_0x3df23c,_0x5b076d),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(_0x1d0252){const _0x54e875=a46_0x58b19f,_0x9f75d2=Math[_0x54e875(0x114)](_0x1d0252/0x3e8),_0x2826f9=Math['floor'](_0x9f75d2/0x3c),_0x7b0a9=Math[_0x54e875(0x114)](_0x2826f9/0x3c),_0x28e1e9=Math['floor'](_0x7b0a9/0x18);if(_0x28e1e9>0x0){const _0x5e1aba=_0x7b0a9%0x18;return _0x5e1aba>0x0?_0x28e1e9+'d\x20'+_0x5e1aba+'h':_0x28e1e9+'d';}else{if(_0x7b0a9>0x0){const _0x56511b=_0x2826f9%0x3c;return _0x56511b>0x0?_0x7b0a9+'h\x20'+_0x56511b+'m':_0x7b0a9+'h';}else{if(_0x2826f9>0x0){const _0x5b217d=_0x9f75d2%0x3c;return _0x5b217d>0x0?_0x2826f9+'m\x20'+_0x5b217d+'s':_0x2826f9+'m';}else return _0x9f75d2+'s';}}}function formatTimestamp(_0x5bede2,_0x30e6a0){const _0x36aaa0=a46_0x58b19f,_0x18b4db=new Date(_0x5bede2),_0x300230=String(_0x18b4db['getHours']())[_0x36aaa0(0x1da)](0x2,'0'),_0x2bf8ff=String(_0x18b4db[_0x36aaa0(0x219)]())[_0x36aaa0(0x1da)](0x2,'0'),_0x2ca395=_0x300230+':'+_0x2bf8ff,_0x6f27a3=_0x18b4db[_0x36aaa0(0x17a)]()===_0x30e6a0[_0x36aaa0(0x17a)]()&&_0x18b4db['getMonth']()===_0x30e6a0[_0x36aaa0(0x28d)]()&&_0x18b4db[_0x36aaa0(0x24a)]()===_0x30e6a0['getDate']();if(_0x6f27a3)return _0x2ca395;else{const _0x4f69c=String(_0x18b4db[_0x36aaa0(0x28d)]()+0x1)[_0x36aaa0(0x1da)](0x2,'0'),_0xff9d1e=String(_0x18b4db[_0x36aaa0(0x24a)]())[_0x36aaa0(0x1da)](0x2,'0');return _0x4f69c+'-'+_0xff9d1e+'\x20'+_0x2ca395;}}function formatDate(_0x281c95){const _0x5a38fc=a46_0x58b19f,_0x55e143=_0x281c95[_0x5a38fc(0x17a)](),_0x5be7c6=String(_0x281c95[_0x5a38fc(0x28d)]()+0x1)[_0x5a38fc(0x1da)](0x2,'0'),_0x469ae5=String(_0x281c95[_0x5a38fc(0x24a)]())[_0x5a38fc(0x1da)](0x2,'0');return _0x55e143+'-'+_0x5be7c6+'-'+_0x469ae5;}function getTaskStateIcon(_0x335243){const _0x2d2fef={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x2d2fef[_0x335243]||'⚪';}function getBarChar(_0x156218){return _0x156218==='error'||_0x156218==='group_error'?'×':'─';}function getBarColor(_0x5f004d){const _0x10a604=a46_0x58b19f,_0x41a38e={'success':a46_0x344a10[_0x10a604(0x156)],'error':a46_0x344a10['red'],'group_error':a46_0x344a10['red'],'running':a46_0x344a10[_0x10a604(0x29b)],'blocked':a46_0x344a10[_0x10a604(0x290)],'planned':a46_0x344a10[_0x10a604(0x17c)],'canceling':a46_0x344a10['yellow']};return _0x41a38e[_0x5f004d]||a46_0x344a10[_0x10a604(0x239)];}function parseTaskName(_0x4a21bb){const _0x3137b9=a46_0x58b19f;let _0x4f78ba=_0x4a21bb[_0x3137b9(0x1c7)](/^\++/,'');const _0x367280=_0x4f78ba['split']('+'),_0x2d3874=_0x367280['length']>0x1?_0x367280[_0x3137b9(0x1ee)]-0x2:0x0,_0x25eb13=_0x367280[_0x367280[_0x3137b9(0x1ee)]-0x1]||_0x4f78ba;return{'level':_0x2d3874,'name':'+'+_0x25eb13};}function truncateTaskName(_0xd50030,_0x1f1195){const _0x53ce62=a46_0x58b19f,_0x3fcfe2=stringWidth(_0xd50030);if(_0x3fcfe2<=_0x1f1195)return _0xd50030;let _0x3b74e1=_0xd50030;while(stringWidth(_0x3b74e1+'…')>_0x1f1195&&_0x3b74e1[_0x53ce62(0x1ee)]>0x0){_0x3b74e1=_0x3b74e1[_0x53ce62(0x172)](0x0,-0x1);}return _0x3b74e1+'…';}function calculateTimeScale(_0x41f1db,_0x30ac86){const _0x280058=a46_0x58b19f;return{'startTime':_0x41f1db[_0x280058(0x2bc)],'endTime':_0x41f1db[_0x280058(0x264)],'durationMs':_0x41f1db[_0x280058(0x26f)],'msPerChar':_0x41f1db[_0x280058(0x26f)]/_0x30ac86};}function timeToPosition(_0x3b594f,_0x300980,_0x11026d){const _0x3bd4b3=a46_0x58b19f,_0x4c366e=_0x3b594f-_0x300980['startTime'],_0x951763=Math[_0x3bd4b3(0x114)](_0x4c366e/_0x300980['msPerChar']);return Math[_0x3bd4b3(0x247)](0x0,Math[_0x3bd4b3(0x148)](_0x951763,_0x11026d));}function a46_0x3e47(){const _0x2a322a=['stdout','planned','✔\x20Project:\x20','session','Session\x20time:\x20','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','fullName','canceling','\x20modified','Invalid\x20format:\x20','✔\x20Workflow\x20run\x20started','No\x20workflow\x20tdx.json\x20found','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','fill','min','Project\x20name:\x20','attempt','run','1375ijiPBd','\x20\x20tdx\x20wf\x20use\x20<project>','localeCompare','No\x20attempts\x20found','Select\x20a\x20workflow\x20to\x20run','Loading\x20sessions...','workflow:tasks','-\x20no\x20files\x20written','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','fromTask','green','readFile','pending','MAX_TASKS_DISPLAY','Listing\x20workflows...','POLL_INTERVAL_MS','\x20session','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','LABEL_WIDTH_DIVISOR','logs','\x20\x20Session\x20context\x20set\x20to:\x20','pollTimeline','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Listing\x20secrets...','clear','ICON_WIDTH','2oGhNXF','Dry\x20run:\x20yes','toISOString','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','json','\x20\x20Console:\x20','renderSingleTimeline','Validation:\x20skipped','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20attempt','✔\x20Secret\x20\x27','data','slice','MAX_TIMELINE_WIDTH','sourceProjectName',',\x20Workflow:\x20','Reason:\x20','every','\x20logs','\x20task','getFullYear','\x20is\x20not\x20a\x20directory','dim','join','\x0aPush\x20these\x20changes?','✔\x20Clone\x20complete','✔\x20Workflow\x20project\x20context\x20cleared.','value','buildTimelineData','taskName','Target\x20directory:\x20','execute','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','context','✔\x20Workflow\x20project\x20set\x20to:\x20','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','verbose','ICON_SPACING','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20\x20Location:\x20','dryRun','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','error','project','resolveProject','...','Source\x20project:\x20','find','filter','→\x20New\x20project:\x20','✔\x20Push\x20complete','write','session:','finishedAt','No\x20sessions\x20found\x20in\x20project:\x20','Project\x20name\x20is\x20required','\x0a✔\x20No\x20changes\x20to\x20push','done','Source:\x20','Status:\x20','title','workflows','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','projects','renderTimeline','isDirectory','✔\x20Showing\x20','Writing\x20files...','Pattern:\x20','Force:\x20yes','listSecrets','Error:','Output\x20directory:\x20','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','splice','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','workflowProject','\x0aError:','message','New\x20project\x20name:\x20','Cloning\x20to\x20','substring','\x0aClone\x20\x22','log','331090NXCfTN','LABEL_MIN_SPACING','MIN_TIMELINE_WIDTH','key','cwd','\x0aDry\x20run\x20-\x20no\x20project\x20created','relative','push','Getting\x20attempt\x20details...','indexOf','\x20\x20Revision:\x20','replace','targetExists','resolve','workflow:secrets:list','\x20\x20Session\x20ID:\x20','revision:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Auto-selected\x20latest\x20session:\x20','limit','index','No\x20sessions\x20found\x20for:\x20','from','get','applyPullProject','workflow:projects','No\x20sessions\x20found','Attempt\x20ID:\x20','keys','padStart','\x20\x20Project:\x20','\x0aApply\x20these\x20changes?','Including\x20subtasks:\x20yes','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','\x0aUpdate\x20existing\x20project\x20\x22','getTime','trim','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','newProjectName','workflow:pull','\x20unchanged','renderSessionsTimeline','💡\x20Tip:\x20Use\x20','\x20project','autocomplete','tasks','updatedAt','values','length','Updating\x20','new','split','repeat','description','Pulling\x20project\x20','Files\x20to\x20upload:\x20','No\x20sessions\x20with\x20timing\x20information','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','startedAt','name','workflow:upload','isArray','✔\x20Downloaded\x20','retrySession','workflow','Setting\x20secret...','now','attemptId','skipValidation','output','table','select','/sessions/','Project:\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','showWorkflowConsoleUrl','basename','Show\x20logs\x20for\x20a\x20workflow\x20attempt','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','No\x20attempts\x20found\x20in\x20project:\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','Listing\x20workflow\x20attempts...','createdAt','window','✔\x20Retry\x20started','Filter:\x20project=','durationMs','Show\x20tasks\x20for\x20an\x20attempt','Deleting\x20secret...','Pull\x20workflow\x20project\x20to\x20local\x20folder','logFiles','getMinutes','state','(use\x20--limit\x20to\x20see\x20more)','existingProjectId','projectId','\x1b[1A\x1b[2K','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','utf-8','Using\x20attempt\x20','Resolving\x20project\x20\x27','Tip:\x20cd\x20to\x20workflows/','filesExtracted','\x20to\x20see\x20detailed\x20logs','workflow:run','parseProjectWorkflowPattern','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Key:\x20','\x20(use\x20--limit\x20to\x20show\x20more)','rows','No\x20matching\x20sessions\x20found','\x20\x20Target:\x20','No\x20log\x20content\x20found','resolveProjectId','No\x20workflows\x20found','No\x20attempts\x20found\x20for:\x20','Start\x20a\x20workflow\x20run','\x0a✔\x20Attempt\x20complete','toLowerCase','\x22\x20with\x20new\x20revision?','Revision:\x20','workflow:download','No\x20workflows\x20found\x20in\x20project:\x20','white','✔\x20Found\x20','workflow:logs','resolveProjectDir','tdx.json','Source\x20directory\x20is\x20required','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Listing\x20workflow\x20projects...','unknown','trimEnd','map','workflow:secrets:set','attempts','5496759JIGzUh','max','retryAttemptName','success','getDate','list','cancelRequested','8uEsMHe','147nuxvxb','status','✔\x20Deleted\x20project\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Params:\x20','From\x20task:\x20','\x20\x20Files\x20extracted:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','List\x20workflow\x20attempts','reason','some','5846908VDGpVe','\x22?\x20This\x20cannot\x20be\x20undone.','Attempt:\x20','displayLine','revision','generateSessionTimelineRows','workflowName','Cancelled','sourceDir','download','Expected\x20format:\x20--param\x20key=value','end','Downloading\x20logs...','task','match','hasChanges','✔\x20Pushed\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','GUTTER','\x22\x20already\x20exists\x20(ID:\x20','workflow:push','yes','duration','parse','🔄\x20','running','\x20\x20Project\x20ID:\x20','Error:\x20Project\x20name\x20is\x20required','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Getting\x20attempt\x20tasks...','isTTY','\x20-\x20','Show\x20specific\x20attempt\x20details','List\x20workflows','Loading\x20session...','executePushProject','\x20secret','\x20workflow','\x20has\x20no\x20attempts','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','Warning:','path','site','\x20sessions\x20','Error:\x20Attempt\x20ID\x20is\x20required','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','workflow:retry','\x27...','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','all','Loading\x20workflows...','sessions','getMonth','startsWith','---\x20','yellow','resumeFrom','workflow:timeline','No\x20workflow\x20sessions\x20found','kill','\x0aDry\x20run\x20-\x20nothing\x20pushed','-\x20nothing\x20pushed','requireProject','Usage:\x20workflow:delete\x20<project-name-or-id>','📁\x20','205968RzxXmP','blue','type','cyan','Key\x20cannot\x20be\x20empty','\x27\x20from\x20project\x20\x27','modified','52800VNQUHv','sessionTime','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Analyzing\x20changes...','Parameters:\x20','params','includes','set','\x0a✔\x20Already\x20up\x20to\x20date','sessionId','Task\x20name:\x20','icon','delete','Pushing\x20workflow\x20project...','summary','List\x20workflow\x20execution\x20sessions','Error:\x20Secret\x20key\x20is\x20required','Starting\x20workflow\x20run...','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Source\x20directory:\x20','changes','targetDir','sort','1034397JlSnFB','TASK_NAME_WIDTH','jsonl','→\x20Project:\x20','start','Include\x20retried:\x20yes','follow','navigateSessionsInteractive','floor','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','workflow:sessions','\x20\x20Attempt\x20ID:\x20','preparePushProject','stat','lastAttempt','Filter:\x20','fileSize','red','Pushing\x20project...','deleted','\x20deleted','diff','Resume\x20from:\x20','prepareCloneProject','session_id','.\x20Expected\x20format:\x20KEY=VALUE','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','format','has','unchanged','✔\x20Project\x20updated','936548mdGbOy','Retry\x20a\x20session\x20or\x20attempt','columns','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','includeSubtasks','Error:\x20KEY=VALUE\x20is\x20required','Latest\x20session\x20has\x20no\x20attempt','projectName','\x20\x20Changes:\x20','workflow:attempts','\x0aPolling...\x20(','\x20\x20Source:\x20','startTime'];a46_0x3e47=function(){return _0x2a322a;};return a46_0x3e47();}function renderTimeAxis(_0x5312a5,_0x481c3d){const _0x559ea8=a46_0x58b19f,_0x5b3796=Math['min'](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x559ea8(0x247)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x559ea8(0x114)](_0x481c3d/TIMELINE_CONFIG[_0x559ea8(0x15e)]))),_0x2fbe1e=_0x5312a5[_0x559ea8(0x214)]/(_0x5b3796-0x1),_0x4cb3a0=new Date(_0x5312a5[_0x559ea8(0x139)]),_0x4c1577=[];for(let _0x583892=0x0;_0x583892<_0x5b3796;_0x583892++){const _0x40fe6c=_0x5312a5['startTime']+_0x583892*_0x2fbe1e,_0x4dcf55=timeToPosition(_0x40fe6c,_0x5312a5,_0x481c3d),_0x3ead19=formatTimestamp(_0x40fe6c,_0x4cb3a0);_0x4c1577[_0x559ea8(0x1c3)]({'pos':_0x4dcf55,'text':_0x3ead19});}const _0x1f3f1e=new Array(_0x481c3d)[_0x559ea8(0x147)]('\x20');let _0xdd6a20=-0x1;for(const {pos:_0x38516b,text:_0x1310c8}of _0x4c1577){let _0xa0ff27=Math[_0x559ea8(0x247)](0x0,_0x38516b-Math[_0x559ea8(0x114)](_0x1310c8[_0x559ea8(0x1ee)]/0x2));_0xa0ff27<=_0xdd6a20+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0xa0ff27=_0xdd6a20+TIMELINE_CONFIG[_0x559ea8(0x1bd)]+0x1);_0xa0ff27+_0x1310c8[_0x559ea8(0x1ee)]>_0x481c3d&&(_0xa0ff27=_0x481c3d-_0x1310c8[_0x559ea8(0x1ee)]);if(_0xa0ff27>=0x0&&_0xa0ff27+_0x1310c8[_0x559ea8(0x1ee)]<=_0x481c3d&&_0xa0ff27>_0xdd6a20){for(let _0x2f8668=0x0;_0x2f8668<_0x1310c8[_0x559ea8(0x1ee)];_0x2f8668++){_0x1f3f1e[_0xa0ff27+_0x2f8668]=_0x1310c8[_0x2f8668];}_0xdd6a20=_0xa0ff27+_0x1310c8[_0x559ea8(0x1ee)]-0x1;}}return _0x1f3f1e['join']('');}function renderTaskRow(_0x5b15fe,_0x3d2062,_0x2e6929,_0x1fb575){const _0x438ed2=a46_0x58b19f,{level:_0x26e137,name:_0x62b94}=parseTaskName(_0x5b15fe[_0x438ed2(0x1f9)]),_0x3cc797='\x20'[_0x438ed2(0x1f2)](_0x26e137),_0x14a562=_0x5b15fe['window']?'('+formatElapsed(_0x5b15fe[_0x438ed2(0x211)][_0x438ed2(0x26f)])+')':'',_0x206711=stringWidth(_0x14a562),_0x54f0d0=_0x26e137*0x1,_0x1b9c6c=_0x1fb575-_0x54f0d0-_0x206711-0x1,_0x41a64d=truncateTaskName(_0x62b94,_0x1b9c6c),_0xbc4513=_0x3cc797+_0x41a64d,_0x132e8f=stringWidth(_0xbc4513),_0x270345=_0x1fb575-_0x132e8f-_0x206711,_0x3783e5=_0xbc4513+'\x20'[_0x438ed2(0x1f2)](Math[_0x438ed2(0x247)](0x1,_0x270345))+a46_0x344a10[_0x438ed2(0x17c)](_0x14a562),_0x364278=getTaskStateIcon(_0x5b15fe[_0x438ed2(0x21a)]),_0x1bf3a3=new Array(_0x2e6929)[_0x438ed2(0x147)]('\x20');if(_0x5b15fe[_0x438ed2(0x211)]){const _0x3b6be2=timeToPosition(_0x5b15fe['window']['start'],_0x3d2062,_0x2e6929),_0x26edec=timeToPosition(_0x5b15fe['window'][_0x438ed2(0x264)],_0x3d2062,_0x2e6929),_0xf5caf5=getBarChar(_0x5b15fe[_0x438ed2(0x21a)]),_0x50abd0=Math[_0x438ed2(0x247)](_0x3b6be2+0x1,_0x26edec);for(let _0x4c99f3=_0x3b6be2;_0x4c99f3<Math['min'](_0x50abd0,_0x2e6929);_0x4c99f3++){_0x1bf3a3[_0x4c99f3]=_0xf5caf5;}}const _0x38a0f3=getBarColor(_0x5b15fe['state']),_0x5d759a=_0x1bf3a3['map'](_0x8aeb5e=>_0x8aeb5e==='\x20'?'\x20':_0x38a0f3(_0x8aeb5e))[_0x438ed2(0x17d)]('');return _0x364278+'\x20'+_0x3783e5+'│'+_0x5d759a+'│';}function calculateStats(_0x1c84a){const _0x5a6863=a46_0x58b19f,_0x14bd39={'total':_0x1c84a[_0x5a6863(0x1ee)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x34fb91 of _0x1c84a){if(_0x34fb91[_0x5a6863(0x21a)]===_0x5a6863(0x249))_0x14bd39[_0x5a6863(0x249)]++;else{if(_0x34fb91['state']===_0x5a6863(0x191)||_0x34fb91[_0x5a6863(0x21a)]==='group_error')_0x14bd39[_0x5a6863(0x191)]++;else _0x34fb91['state']===_0x5a6863(0x272)?_0x14bd39[_0x5a6863(0x272)]++:_0x14bd39[_0x5a6863(0x158)]++;}}return _0x14bd39;}function formatStats(_0x3c872a){const _0x4d9d6a=a46_0x58b19f;return['Total:\x20'+_0x3c872a['total'],'✅\x20'+_0x3c872a[_0x4d9d6a(0x249)],'❌\x20'+_0x3c872a['error'],_0x4d9d6a(0x271)+_0x3c872a[_0x4d9d6a(0x272)],'⏳\x20'+_0x3c872a['pending']][_0x4d9d6a(0x17d)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a46_0x58b19f(0x1f9)]=a46_0x58b19f(0x292);['description']=a46_0x58b19f(0x286);async[a46_0x58b19f(0x185)](_0x11b18b){const _0x271ff0=a46_0x58b19f,{options:_0x34990d,args:_0x567052,tdx:_0x12524a}=_0x11b18b;let _0x1a20d7,_0x191d24,_0x404e74=![];if(_0x567052[0x0]){if(_0x567052[0x0][_0x271ff0(0x2a7)]('.')){const _0x280f76=this[_0x271ff0(0x227)](_0x567052,_0x34990d);if(!_0x280f76)return 0x1;_0x1a20d7=_0x280f76['projectName'],_0x191d24=_0x280f76[_0x271ff0(0x25f)];}else{_0x191d24=_0x567052[0x0],_0x1a20d7=_0x34990d[_0x271ff0(0x1b4)];if(!_0x1a20d7)return console[_0x271ff0(0x191)](a46_0x344a10['red'](_0x271ff0(0x1ae)),_0x271ff0(0x21f)),0x1;_0x404e74=!![];}}else{const _0x3ed3ba=this[_0x271ff0(0x227)](_0x567052,_0x34990d);if(!_0x3ed3ba)return 0x1;_0x1a20d7=_0x3ed3ba['projectName'],_0x191d24=_0x3ed3ba[_0x271ff0(0x25f)];}if(_0x34990d[_0x271ff0(0x18a)]){if(_0x1a20d7&&_0x191d24)console[_0x271ff0(0x191)](_0x271ff0(0x11d)+_0x1a20d7+'.'+_0x191d24);else _0x1a20d7&&console[_0x271ff0(0x191)](_0x271ff0(0x213)+_0x1a20d7);}const _0xe486e9=_0x34990d[_0x271ff0(0x201)],_0x1c30c3=_0x34990d[_0x271ff0(0x2aa)];if(_0xe486e9){_0x1c30c3&&console['error'](a46_0x344a10[_0x271ff0(0x290)](_0x271ff0(0x281)),_0x271ff0(0x15d));const _0x5a5285=_0x34990d[_0x271ff0(0x112)];return _0x5a5285?await this[_0x271ff0(0x161)](_0x11b18b,_0xe486e9):await this['renderSingleTimeline'](_0x11b18b,_0xe486e9,_0x34990d),0x0;}if(_0x1c30c3){const _0x48831c=await withSpinner(_0x271ff0(0x27b),()=>_0x12524a[_0x271ff0(0x1fe)]['sessions']({'projectName':_0x1a20d7,'workflowName':_0x191d24,'limit':0x64}),{'verbose':_0x34990d[_0x271ff0(0x18a)]}),_0x3c2d5e=_0x48831c[_0x271ff0(0x171)][_0x271ff0(0x196)](_0x41a454=>_0x41a454['id']===_0x1c30c3);if(!_0x3c2d5e)return console[_0x271ff0(0x191)](a46_0x344a10[_0x271ff0(0x11f)](_0x271ff0(0x1ae)),'Session\x20not\x20found:\x20'+_0x1c30c3),0x1;if(!_0x3c2d5e[_0x271ff0(0x11c)]?.['id'])return console[_0x271ff0(0x191)](a46_0x344a10['red'](_0x271ff0(0x1ae)),'Session\x20'+_0x1c30c3+_0x271ff0(0x27f)),0x1;const _0x3ae61d=_0x3c2d5e[_0x271ff0(0x11c)]['id'];_0x34990d[_0x271ff0(0x18a)]&&console[_0x271ff0(0x191)](_0x271ff0(0x221)+_0x3ae61d+'\x20from\x20session\x20'+_0x1c30c3);const _0x44bc5c=_0x34990d[_0x271ff0(0x112)];return _0x44bc5c?await this['pollTimeline'](_0x11b18b,_0x3ae61d):await this[_0x271ff0(0x16c)](_0x11b18b,_0x3ae61d,_0x34990d),0x0;}const _0x328290=await withSpinner(_0x271ff0(0x151),()=>_0x12524a[_0x271ff0(0x1fe)]['sessions']({'projectName':_0x1a20d7,'workflowName':_0x191d24,'limit':_0x34990d[_0x271ff0(0x1d0)]||0x32}),{'verbose':_0x34990d[_0x271ff0(0x18a)]}),_0x47329e=_0x328290[_0x271ff0(0x171)];if(_0x47329e[_0x271ff0(0x1ee)]===0x0){if(_0x1a20d7&&_0x191d24)console['error'](_0x271ff0(0x1d2)+_0x1a20d7+'.'+_0x191d24);else _0x1a20d7?console[_0x271ff0(0x191)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x1a20d7):(console[_0x271ff0(0x191)](_0x271ff0(0x293)),console[_0x271ff0(0x191)](a46_0x344a10[_0x271ff0(0x17c)](_0x271ff0(0x1df))));return 0x0;}_0x47329e[_0x271ff0(0x2b7)]((_0x177755,_0x142532)=>{const _0xdaaf53=_0x271ff0,_0x4ceef7=_0x177755['sessionTime']||'',_0x3202a7=_0x142532[_0xdaaf53(0x2a2)]||'';return _0x3202a7[_0xdaaf53(0x14e)](_0x4ceef7);});if(_0x34990d[_0x271ff0(0x16a)]||_0x34990d['jsonl'])return await handleSDKOutput(_0x47329e,_0x34990d),0x0;let _0x50e0c9;if(_0x404e74){const _0xce8f83=_0x47329e[0x0];if(!_0xce8f83[_0x271ff0(0x11c)]?.['id'])return console['error'](_0x271ff0(0x133)),0x0;_0x50e0c9=_0xce8f83['lastAttempt']['id'],_0x34990d['verbose']&&console['error'](_0x271ff0(0x1cf)+_0xce8f83['sessionTime']);}else{const _0x1f3486=_0x47329e[_0x271ff0(0x243)](_0x199bb9=>{const _0xd53965=_0x271ff0,_0x117ec6=getAttemptStatusDisplay(_0x199bb9['lastAttempt']);return{'title':_0x199bb9['project']?.[_0xd53965(0x1f9)]+'.'+_0x199bb9['workflow']?.[_0xd53965(0x1f9)]+_0xd53965(0x278)+_0x199bb9['sessionTime']+'\x20'+_0x117ec6[_0xd53965(0x2ac)],'value':_0x199bb9['lastAttempt']?.['id']||'','description':_0x117ec6['text']};}),_0x1c90bd=await a46_0x4dadba({'type':_0x271ff0(0x205),'name':_0x271ff0(0x201),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x1f3486['filter'](_0x41132f=>_0x41132f[_0x271ff0(0x181)]!=='')});if(!_0x1c90bd[_0x271ff0(0x201)])return 0x0;_0x50e0c9=_0x1c90bd[_0x271ff0(0x201)];}const _0x10495d=_0x34990d[_0x271ff0(0x112)];return _0x10495d?await this[_0x271ff0(0x161)](_0x11b18b,_0x50e0c9):await this[_0x271ff0(0x16c)](_0x11b18b,_0x50e0c9,_0x34990d),0x0;}async[a46_0x58b19f(0x16c)](_0x1de77f,_0x4bd857,_0x2974ce){const _0x5180fd=a46_0x58b19f,{tdx:_0x5bfd07}=_0x1de77f;let _0x20be67,_0x28a03f;try{[_0x20be67,_0x28a03f]=await Promise[_0x5180fd(0x28a)]([_0x5bfd07[_0x5180fd(0x1fe)][_0x5180fd(0x14a)](_0x4bd857),_0x5bfd07['workflow'][_0x5180fd(0x1eb)](_0x4bd857,![])]);}catch(_0x410d41){console[_0x5180fd(0x191)](a46_0x344a10[_0x5180fd(0x11f)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x2974ce[_0x5180fd(0x18a)]&&console[_0x5180fd(0x191)](_0x410d41);throw _0x410d41;}if(_0x2974ce[_0x5180fd(0x16a)]||_0x2974ce[_0x5180fd(0x2ba)]){const _0x395a5d=this[_0x5180fd(0x182)](_0x20be67,_0x28a03f);await handleSDKOutput([_0x395a5d],_0x2974ce);return;}const _0x303f95=_0x5bfd07[_0x5180fd(0x187)][_0x5180fd(0x283)],_0x54dfc3=this[_0x5180fd(0x1a7)](_0x20be67,_0x28a03f,_0x303f95);console['log'](_0x54dfc3);}async[a46_0x58b19f(0x161)](_0x37b8e5,_0x1de2d6){const _0x15ad52=a46_0x58b19f,{tdx:_0x1b82fc}=_0x37b8e5,_0x9e4b7b=TIMELINE_CONFIG[_0x15ad52(0x15b)],_0x3565f5=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x4e6e3b=0x0;while(_0x4e6e3b<_0x3565f5){process[_0x15ad52(0x13a)][_0x15ad52(0x277)]&&process[_0x15ad52(0x13a)]['write']('\x1bc');let _0x5ac7c1,_0x549eae;try{[_0x5ac7c1,_0x549eae]=await Promise['all']([_0x1b82fc[_0x15ad52(0x1fe)]['attempt'](_0x1de2d6),_0x1b82fc['workflow'][_0x15ad52(0x1eb)](_0x1de2d6,![])]);}catch(_0x1a48c4){console[_0x15ad52(0x191)](a46_0x344a10['red']('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x4e6e3b>0x0&&console[_0x15ad52(0x191)](a46_0x344a10['dim'](_0x15ad52(0x23f)+_0x4e6e3b));throw _0x1a48c4;}const _0x1df9df=_0x1b82fc[_0x15ad52(0x187)]['site'],_0x47c560=this['renderTimeline'](_0x5ac7c1,_0x549eae,_0x1df9df);console[_0x15ad52(0x1bb)](_0x47c560);const _0x40de99=_0x5ac7c1[_0x15ad52(0x1a0)]&&_0x549eae[_0x15ad52(0x177)](_0x51a64d=>_0x51a64d['state']!==_0x15ad52(0x272)&&_0x51a64d[_0x15ad52(0x21a)]!=='planned');if(_0x40de99){console[_0x15ad52(0x191)](a46_0x344a10[_0x15ad52(0x156)](_0x15ad52(0x233)));break;}console[_0x15ad52(0x191)](a46_0x344a10['dim'](_0x15ad52(0x137)+_0x4e6e3b*0x2+_0x15ad52(0x1a5))),await new Promise(_0x5a05f3=>setTimeout(_0x5a05f3,_0x9e4b7b)),_0x4e6e3b++;}_0x4e6e3b>=_0x3565f5&&console[_0x15ad52(0x191)](a46_0x344a10[_0x15ad52(0x290)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a46_0x58b19f(0x1a7)](_0x19dab3,_0x9b0784,_0x578fc2){const _0x2f218b=a46_0x58b19f,_0x2cf63b=[],_0x19d7d2=TIMELINE_CONFIG[_0x2f218b(0x2b9)],_0x43ae88=0x5,_0x38869c=process[_0x2f218b(0x13a)]['columns']||0x78,_0x5ad7a8=_0x38869c-_0x19d7d2-_0x43ae88,_0x25945a=Math[_0x2f218b(0x247)](TIMELINE_CONFIG[_0x2f218b(0x1be)],Math[_0x2f218b(0x148)](_0x5ad7a8,TIMELINE_CONFIG[_0x2f218b(0x173)])),_0x5cc971=new Date(_0x19dab3[_0x2f218b(0x210)])[_0x2f218b(0x1e1)](),_0x3221c0=_0x19dab3['finishedAt']?new Date(_0x19dab3['finishedAt'])['getTime']():Date[_0x2f218b(0x200)](),_0x525f2f={'start':_0x5cc971,'end':_0x3221c0,'duration':_0x3221c0-_0x5cc971},_0x4faf66=new Map(),_0x28d991=[];for(const _0x156e86 of _0x9b0784){if(_0x156e86[_0x2f218b(0x1f8)]){const _0x353424=new Date(_0x156e86[_0x2f218b(0x1f8)])[_0x2f218b(0x1e1)](),_0x10b0d7=_0x156e86[_0x2f218b(0x1ec)]?new Date(_0x156e86[_0x2f218b(0x1ec)])[_0x2f218b(0x1e1)]():Date[_0x2f218b(0x200)](),_0x27ed92={'start':_0x353424,'end':_0x10b0d7,'duration':_0x10b0d7-_0x353424};_0x4faf66[_0x2f218b(0x2a8)](_0x156e86['id'],_0x27ed92),_0x28d991['push']({'name':_0x156e86['fullName'],'state':_0x156e86[_0x2f218b(0x21a)]||_0x2f218b(0x241),'window':_0x27ed92});}else _0x28d991[_0x2f218b(0x1c3)]({'name':_0x156e86['fullName'],'state':_0x156e86[_0x2f218b(0x21a)]||_0x2f218b(0x13b),'window':undefined});}_0x28d991[_0x2f218b(0x2b7)]((_0x425538,_0x67695)=>{const _0x56e8f7=_0x2f218b;if(!_0x425538[_0x56e8f7(0x211)])return 0x1;if(!_0x67695[_0x56e8f7(0x211)])return-0x1;return _0x425538['window']['start']-_0x67695[_0x56e8f7(0x211)][_0x56e8f7(0x2bc)];});const _0x1b3b49=_0x28d991[_0x2f218b(0x1ee)],_0xebe4c7=_0x1b3b49>TIMELINE_CONFIG[_0x2f218b(0x159)];_0xebe4c7&&_0x28d991[_0x2f218b(0x1b2)](TIMELINE_CONFIG[_0x2f218b(0x159)]);const _0x17c6a0=calculateTimeScale(_0x525f2f,_0x25945a),_0x1bc6e7=_0x19dab3[_0x2f218b(0x1a0)]?_0x19dab3[_0x2f218b(0x249)]?a46_0x344a10[_0x2f218b(0x156)]('success'):a46_0x344a10[_0x2f218b(0x11f)](_0x2f218b(0x191)):a46_0x344a10['blue'](_0x2f218b(0x272)),_0x2ec22a=_0x19dab3['project']?.['id'],_0x35af27=_0x19dab3[_0x2f218b(0x2aa)];let _0x28ba5f;if(_0x2ec22a&&_0x35af27){const _0x5d048c=getWorkflowAttemptUrl(_0x578fc2,_0x2ec22a,_0x35af27,_0x19dab3['id']);_0x28ba5f=hyperlink(a46_0x344a10[_0x2f218b(0x17c)](_0x19dab3['id']),_0x5d048c);}else _0x28ba5f=a46_0x344a10['dim'](_0x19dab3['id']);_0x2cf63b[_0x2f218b(0x1c3)](_0x2f218b(0x25b)+_0x28ba5f+_0x2f218b(0x278)+_0x1bc6e7+'\x20-\x20'+formatElapsed(_0x525f2f[_0x2f218b(0x26f)]));if(_0x28d991['length']>0x0){const _0x1d9e8f=renderTimeAxis(_0x17c6a0,_0x25945a),_0x289582=new Date(_0x525f2f[_0x2f218b(0x2bc)]),_0x2b3676=formatDate(_0x289582),_0x102c9f=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x2f218b(0x18b)]+_0x19d7d2,_0x5c8d7a=_0x2b3676[_0x2f218b(0x1da)](_0x102c9f),_0x528c5a=a46_0x344a10[_0x2f218b(0x17c)](_0x5c8d7a);_0x2cf63b[_0x2f218b(0x1c3)](_0x528c5a+'\x20'+_0x1d9e8f);for(const _0x18bed4 of _0x28d991){_0x2cf63b[_0x2f218b(0x1c3)](renderTaskRow(_0x18bed4,_0x17c6a0,_0x25945a,_0x19d7d2));}const _0x506e86=calculateStats(_0x28d991);_0x2cf63b[_0x2f218b(0x1c3)](formatStats(_0x506e86)),_0xebe4c7&&_0x2cf63b['push'](a46_0x344a10[_0x2f218b(0x290)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+'\x20of\x20'+_0x1b3b49+'\x20tasks')),_0x2cf63b[_0x2f218b(0x1c3)](''),_0x2cf63b['push'](a46_0x344a10[_0x2f218b(0x17c)](_0x2f218b(0x1e8))+('tdx\x20wf\x20attempt\x20'+_0x19dab3['id']+_0x2f218b(0x178))+a46_0x344a10[_0x2f218b(0x17c)](_0x2f218b(0x225)));}else _0x2cf63b[_0x2f218b(0x1c3)](_0x2f218b(0x1b1));return _0x2cf63b[_0x2f218b(0x17d)]('\x0a');}[a46_0x58b19f(0x182)](_0x487d31,_0x4ef4c7){const _0x381db8=a46_0x58b19f,_0x3d2fb2=new Date(_0x487d31[_0x381db8(0x210)])[_0x381db8(0x1e1)](),_0x15d6e2=_0x487d31[_0x381db8(0x19c)]?new Date(_0x487d31[_0x381db8(0x19c)])[_0x381db8(0x1e1)]():Date[_0x381db8(0x200)](),_0x204364=_0x15d6e2-_0x3d2fb2,_0x5102c4=[];for(const _0x154ae6 of _0x4ef4c7){if(_0x154ae6[_0x381db8(0x1f8)]){const _0xeaeabf=new Date(_0x154ae6[_0x381db8(0x1f8)])[_0x381db8(0x1e1)](),_0x47d430=_0x154ae6['updatedAt']?new Date(_0x154ae6[_0x381db8(0x1ec)])['getTime']():Date[_0x381db8(0x200)]();_0x5102c4['push']({'name':_0x154ae6[_0x381db8(0x140)],'state':_0x154ae6['state']||'unknown','window':{'start':_0xeaeabf,'end':_0x47d430,'duration':_0x47d430-_0xeaeabf}});}else _0x5102c4[_0x381db8(0x1c3)]({'name':_0x154ae6['fullName'],'state':_0x154ae6[_0x381db8(0x21a)]||_0x381db8(0x13b),'window':undefined});}const _0xa5ac55=calculateStats(_0x5102c4);return{'attempt':{'id':_0x487d31['id'],'status':_0x487d31['done']?_0x487d31[_0x381db8(0x249)]?'success':_0x381db8(0x191):_0x381db8(0x272),'createdAt':_0x487d31['createdAt'],'finishedAt':_0x487d31[_0x381db8(0x19c)],'duration_ms':_0x204364},'tasks':_0x5102c4[_0x381db8(0x243)](_0x4b0da3=>({'name':_0x4b0da3[_0x381db8(0x1f9)],'state':_0x4b0da3[_0x381db8(0x21a)],'startedAt':_0x4b0da3[_0x381db8(0x211)]?new Date(_0x4b0da3[_0x381db8(0x211)][_0x381db8(0x2bc)])[_0x381db8(0x168)]():null,'updatedAt':_0x4b0da3[_0x381db8(0x211)]?new Date(_0x4b0da3[_0x381db8(0x211)]['end'])[_0x381db8(0x168)]():null,'duration_ms':_0x4b0da3[_0x381db8(0x211)]?.['duration']||null})),'stats':_0xa5ac55};}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x15fb5a,_0x4f4aa3){const _0x1e5a7d=a47_0x3a4d,_0x5c2847=_0x15fb5a();while(!![]){try{const _0x423981=parseInt(_0x1e5a7d(0x1e5))/0x1+-parseInt(_0x1e5a7d(0x1e3))/0x2*(parseInt(_0x1e5a7d(0x1e9))/0x3)+parseInt(_0x1e5a7d(0x1ef))/0x4+parseInt(_0x1e5a7d(0x1f4))/0x5*(-parseInt(_0x1e5a7d(0x1f1))/0x6)+parseInt(_0x1e5a7d(0x1f2))/0x7+-parseInt(_0x1e5a7d(0x1ed))/0x8*(-parseInt(_0x1e5a7d(0x1f6))/0x9)+-parseInt(_0x1e5a7d(0x1e7))/0xa;if(_0x423981===_0x4f4aa3)break;else _0x5c2847['push'](_0x5c2847['shift']());}catch(_0x37e9cb){_0x5c2847['push'](_0x5c2847['shift']());}}}(a47_0x317e,0x9b9c1));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 _0x1693d0=a47_0x3a4d,_0x2e682f=getVersion(),_0xbba5e=platform(),_0x4cdd56=process[_0x1693d0(0x1f0)][_0x1693d0(0x1f3)]('v','');return _0x1693d0(0x1f5)+_0x2e682f+'\x20('+_0xbba5e+_0x1693d0(0x1ec)+_0x4cdd56+')';}function a47_0x3a4d(_0x4ef3d5,_0x5531ba){_0x4ef3d5=_0x4ef3d5-0x1e3;const _0x317ebe=a47_0x317e();let _0x3a4d7e=_0x317ebe[_0x4ef3d5];return _0x3a4d7e;}export function getAuthHeaders(_0x19ecbe,_0x410ea3){const _0x33b1c6=a47_0x3a4d,_0x232dbc=getVersion(),_0x5c2488={'User-Agent':getUserAgent(),'X-TD-Client':_0x33b1c6(0x1eb),'X-TD-Client-Version':_0x232dbc};return _0x410ea3&&(_0x5c2488[_0x33b1c6(0x1e8)]=_0x33b1c6(0x1e6)+_0x410ea3),_0x5c2488;}export function toHeaderRecord(_0x1df4c1){const _0x2840d5=a47_0x3a4d,_0x21d04c={};for(const [_0x5746c6,_0x32545d]of Object[_0x2840d5(0x1e4)](_0x1df4c1)){_0x32545d!==undefined&&(_0x21d04c[_0x5746c6]=_0x32545d);}return _0x21d04c;}export function getTrinoHeaders(_0x3be850,_0x32c837){const _0xf85ff7=a47_0x3a4d,_0x4dd202=getAuthHeaders(_0x3be850,_0x32c837),_0x21a5c1=toHeaderRecord(_0x4dd202);return delete _0x21a5c1[_0xf85ff7(0x1e8)],_0x32c837&&(_0x21a5c1[_0xf85ff7(0x1ea)]=_0x32c837),_0x21a5c1;}function a47_0x317e(){const _0x1882c8=['entries','1208795EZtqNF','TD1\x20','12613730NOvdlW','Authorization','6huHuve','X-Trino-User','tdx',';\x20node/','24CTqtwY','length','2340416qKsHLL','version','22434cdYbYk','4482142NmpHar','replace','385caguXL','tdx/','2940930NahYHP','1227862bslCSf'];a47_0x317e=function(){return _0x1882c8;};return a47_0x317e();}export function hasAPIKey(_0x506498){const _0x1700a9=a47_0x3a4d,_0x4d5d07=getAPIKey();return _0x4d5d07!==undefined&&_0x4d5d07[_0x1700a9(0x1ee)]>0x0;}
1
+ (function(_0x2c8e20,_0x42c371){const _0x203e1a=a47_0x347e,_0x1468d5=_0x2c8e20();while(!![]){try{const _0x50c799=-parseInt(_0x203e1a(0x1ee))/0x1+parseInt(_0x203e1a(0x1ec))/0x2*(parseInt(_0x203e1a(0x1f6))/0x3)+parseInt(_0x203e1a(0x1f3))/0x4+-parseInt(_0x203e1a(0x1f1))/0x5*(parseInt(_0x203e1a(0x1ef))/0x6)+-parseInt(_0x203e1a(0x1f2))/0x7+-parseInt(_0x203e1a(0x1fa))/0x8*(parseInt(_0x203e1a(0x1f5))/0x9)+parseInt(_0x203e1a(0x1fb))/0xa;if(_0x50c799===_0x42c371)break;else _0x1468d5['push'](_0x1468d5['shift']());}catch(_0x9aa157){_0x1468d5['push'](_0x1468d5['shift']());}}}(a47_0x4951,0xcb380));function a47_0x347e(_0x5b9bf4,_0xdc5ded){_0x5b9bf4=_0x5b9bf4-0x1eb;const _0x495118=a47_0x4951();let _0x347ebe=_0x495118[_0x5b9bf4];return _0x347ebe;}import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';function a47_0x4951(){const _0x264231=['replace','length','X-Trino-User','8uSauzv','19863710YNdgZE',';\x20node/','entries','2819840wIMMic','version','1087020LVuumg','1731432WPqPxq','TD1\x20','5tQQceh','1189566wromse','359804JOzAUC','Authorization','9974952VNseDx','3qIpXIM'];a47_0x4951=function(){return _0x264231;};return a47_0x4951();}export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x13b76c=a47_0x347e,_0x341907=getVersion(),_0x29e407=platform(),_0x3bd134=process[_0x13b76c(0x1ed)][_0x13b76c(0x1f7)]('v','');return'tdx/'+_0x341907+'\x20('+_0x29e407+_0x13b76c(0x1fc)+_0x3bd134+')';}export function getAuthHeaders(_0x2415c3,_0x2e6ef5){const _0x1ee5e1=a47_0x347e,_0x52d004=getVersion(),_0x47cf41={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x52d004};return _0x2e6ef5&&(_0x47cf41[_0x1ee5e1(0x1f4)]=_0x1ee5e1(0x1f0)+_0x2e6ef5),_0x47cf41;}export function toHeaderRecord(_0x851d9e){const _0x14e653=a47_0x347e,_0x422b36={};for(const [_0xfb0596,_0x4a8c58]of Object[_0x14e653(0x1eb)](_0x851d9e)){_0x4a8c58!==undefined&&(_0x422b36[_0xfb0596]=_0x4a8c58);}return _0x422b36;}export function getTrinoHeaders(_0x2cc7bb,_0xcc4119){const _0x42825a=a47_0x347e,_0x141ea7=getAuthHeaders(_0x2cc7bb,_0xcc4119),_0x2d9f84=toHeaderRecord(_0x141ea7);return delete _0x2d9f84[_0x42825a(0x1f4)],_0xcc4119&&(_0x2d9f84[_0x42825a(0x1f9)]=_0xcc4119),_0x2d9f84;}export function hasAPIKey(_0x1797b4){const _0x2fb6e8=a47_0x347e,_0x4988f6=getAPIKey();return _0x4988f6!==undefined&&_0x4988f6[_0x2fb6e8(0x1f8)]>0x0;}
@@ -1 +1 @@
1
- (function(_0x267476,_0x2a183d){const _0x4322f0=a48_0x3012,_0x4dfe9e=_0x267476();while(!![]){try{const _0x36a8f1=-parseInt(_0x4322f0(0x170))/0x1*(parseInt(_0x4322f0(0x172))/0x2)+parseInt(_0x4322f0(0x191))/0x3+-parseInt(_0x4322f0(0x176))/0x4+-parseInt(_0x4322f0(0x180))/0x5+parseInt(_0x4322f0(0x192))/0x6+parseInt(_0x4322f0(0x188))/0x7+-parseInt(_0x4322f0(0x1a8))/0x8;if(_0x36a8f1===_0x2a183d)break;else _0x4dfe9e['push'](_0x4dfe9e['shift']());}catch(_0x1e3247){_0x4dfe9e['push'](_0x4dfe9e['shift']());}}}(a48_0x3353,0xbbd1b));import{writeFileSync}from'fs';function a48_0x3012(_0x1a4396,_0x1a9114){_0x1a4396=_0x1a4396-0x165;const _0x33534c=a48_0x3353();let _0x3012bc=_0x33534c[_0x1a4396];return _0x3012bc;}import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';function a48_0x3353(){const _0x16f308=['split','forEach','debug','4992288UhcIkN','output','isInteger','bold','rule','map','color','FINISHED','[params]','[error]','2533525FAwyex','─┴─','max','stderr','close','limit','bigint','number','8202089yDkoAk','stdin','yellow','log','-FXRSn','padEnd','less','resolve','join','3838758yFVuLC','6907650zkpweg','No\x20data','push','tsv','end','sdk-result','[logs]','keys','cmdout','red','table','magenta','stringify','[rule]','double','repeat','params','blue','pipe','json','error','noColor','6627752ohqYfS','filter','trim','Results\x20saved\x20to\x20','format','inherit','isTTY','length','jsonl','spawn','boolean','query','entries','395sEmWVV','varchar','1266mCMTjM'];a48_0x3353=function(){return _0x16f308;};return a48_0x3353();}import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a48_0x32c3a3 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x1d6426){const _0x4b3327=a48_0x3012;return _0x1d6426[_0x4b3327(0x167)]===_0x4b3327(0x1a5)||_0x1d6426[_0x4b3327(0x167)]===_0x4b3327(0x16b)||_0x1d6426[_0x4b3327(0x167)]===_0x4b3327(0x195)||_0x1d6426[_0x4b3327(0x167)]===_0x4b3327(0x19c)||_0x1d6426[_0x4b3327(0x1a5)]===!![]||_0x1d6426['jsonl']===!![]||_0x1d6426['tsv']===!![]||_0x1d6426['table']===!![];}export function parseOutputOptions(_0x2759d2){const _0x48b625=a48_0x3012;return{'format':_0x2759d2[_0x48b625(0x167)]||_0x48b625(0x19c),'output':_0x2759d2[_0x48b625(0x177)]||'','limit':_0x2759d2[_0x48b625(0x185)],'color':_0x2759d2['color'],'noColor':_0x2759d2['noColor']};}function convertSDKResultToQueryResult(_0x21d70c){const _0x55e389=a48_0x3012,_0x5ee511=[];if(_0x21d70c[_0x55e389(0x16a)]>0x0){const _0xa6f8fe=_0x21d70c[0x0];for(const [_0x2cee46,_0x1baa7a]of Object['entries'](_0xa6f8fe)){let _0x1a98e4=_0x55e389(0x171);if(typeof _0x1baa7a===_0x55e389(0x187))_0x1a98e4=Number[_0x55e389(0x178)](_0x1baa7a)?_0x55e389(0x186):_0x55e389(0x1a0);else{if(typeof _0x1baa7a===_0x55e389(0x16d))_0x1a98e4='boolean';else _0x1baa7a===null&&(_0x1a98e4='varchar');}_0x5ee511[_0x55e389(0x194)]({'name':_0x2cee46,'type':_0x1a98e4});}}return{'queryId':_0x55e389(0x197),'columns':_0x5ee511,'data':_0x21d70c,'stats':{'state':_0x55e389(0x17d),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x21d70c[_0x55e389(0x16a)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x454060,_0x3013b1){const _0x2ab286=convertSDKResultToQueryResult(_0x454060);return formatQueryOutput(_0x2ab286,_0x3013b1);}export async function formatQueryOutput(_0x34d62d,_0x598124){const _0x4bd51b=a48_0x3012,{format:_0x33f91b,limit:_0x5d9bf9,output:_0x441c06,color:_0x56babb,noColor:_0x202eef}=_0x598124,_0x22f5eb=Boolean(_0x441c06)&&!_0x56babb,_0x431f8a={'color':_0x56babb,'noColor':_0x202eef||_0x22f5eb};if(_0x33f91b===_0x4bd51b(0x19c)){const _0x5ac11e=shouldUseLess(_0x33f91b,_0x441c06);return formatAsTable(_0x34d62d,_0x5d9bf9,_0x5ac11e,_0x431f8a);}else{if(_0x33f91b===_0x4bd51b(0x1a5))return formatAsJSON(_0x34d62d,_0x431f8a);else return _0x33f91b===_0x4bd51b(0x16b)?formatAsJSONL(_0x34d62d,_0x431f8a):formatQueryResult(_0x34d62d,_0x33f91b);}}function shouldUseLess(_0x139260,_0x5635d4){const _0x5dadee=a48_0x3012;return(_0x139260==='table'||_0x139260==='list')&&process['stdout'][_0x5dadee(0x169)]&&!_0x5635d4;}export function resolveOutputOptions(_0x13c004){const _0x28e832=a48_0x3012,_0x35a297=resolveOutputFormat(_0x13c004[_0x28e832(0x167)],_0x13c004[_0x28e832(0x177)],'table');let _0x1de244=typeof _0x13c004[_0x28e832(0x185)]===_0x28e832(0x187)?_0x13c004['limit']:parseInt(_0x13c004['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x378950=_0x13c004[_0x28e832(0x177)]||'';return shouldUseLess(_0x35a297,_0x378950)&&(_0x1de244=Infinity),{'format':_0x35a297,'output':_0x378950,'limit':_0x1de244,'color':_0x13c004[_0x28e832(0x17c)],'noColor':_0x13c004[_0x28e832(0x1a7)]};}export function writeOutput(_0xada613,_0xa12da7,_0x58a8ea){const _0x3ac295=a48_0x3012;return _0xa12da7?(writeFileSync(_0xa12da7,_0xada613),console[_0x3ac295(0x1a6)](_0x3ac295(0x166)+_0xa12da7),Promise[_0x3ac295(0x18f)]()):shouldUseLess(_0x58a8ea||'','')?new Promise(_0x383ee6=>{const _0x545480=_0x3ac295,_0x38c2f3=spawn(_0x545480(0x18e),[_0x545480(0x18c)],{'stdio':[_0x545480(0x1a4),_0x545480(0x168),'inherit']});let _0x29f872=![];_0x38c2f3['on'](_0x545480(0x1a6),()=>{const _0x1f47e3=_0x545480;!_0x29f872&&(_0x29f872=!![],console[_0x1f47e3(0x18b)](_0xada613),_0x383ee6());}),_0x38c2f3['on'](_0x545480(0x184),()=>{!_0x29f872&&(_0x29f872=!![],_0x383ee6());}),_0x38c2f3['on'](_0x545480(0x16c),()=>{const _0x53e215=_0x545480;!_0x29f872&&_0x38c2f3['stdin']&&(_0x38c2f3[_0x53e215(0x189)]['on'](_0x53e215(0x1a6),()=>{}),_0x38c2f3[_0x53e215(0x189)]['write'](_0xada613),_0x38c2f3[_0x53e215(0x189)][_0x53e215(0x196)]());}),!_0x38c2f3[_0x545480(0x189)]&&(!_0x29f872&&(_0x29f872=!![],console['log'](_0xada613),_0x383ee6()));}):(console[_0x3ac295(0x18b)](_0xada613),Promise[_0x3ac295(0x18f)]());}export async function handleSDKOutput(_0x3a619e,_0x352b23){const _0x54cfaa=a48_0x3012,_0x4fa105=resolveOutputOptions(_0x352b23),_0x59ae46=await formatSDKOutput(_0x3a619e,_0x4fa105);await writeOutput(_0x59ae46,_0x4fa105[_0x54cfaa(0x177)]||undefined,_0x4fa105[_0x54cfaa(0x167)]);}export async function handleQueryOutput(_0x289bf7,_0x2cd4b9){const _0x2df46b=a48_0x3012,_0x5941f6=resolveOutputOptions(_0x2cd4b9),_0x1b2d11=await formatQueryOutput(_0x289bf7,_0x5941f6);await writeOutput(_0x1b2d11,_0x5941f6[_0x2df46b(0x177)]||undefined,_0x5941f6[_0x2df46b(0x167)]);}async function formatSingleObject(_0x5bb71f,_0x70fbc7){const _0xf17be5=a48_0x3012,{format:_0x2fb190,color:_0x277df0,noColor:_0x22e36e}=_0x70fbc7,_0x4793f6={'color':_0x277df0,'noColor':_0x22e36e};if(_0x2fb190===_0xf17be5(0x1a5)){if(shouldUseColor(_0x4793f6))return colorizeJSON(_0x5bb71f,_0x4793f6);return JSON[_0xf17be5(0x19e)](_0x5bb71f,null,0x2);}else{if(_0x2fb190===_0xf17be5(0x16b)){if(shouldUseColor(_0x4793f6))return colorizeJSONCompact(_0x5bb71f,_0x4793f6);return JSON[_0xf17be5(0x19e)](_0x5bb71f);}else{if(_0x2fb190===_0xf17be5(0x195))return Object[_0xf17be5(0x16f)](_0x5bb71f)[_0xf17be5(0x17b)](([_0x321145,_0xcca80c])=>_0x321145+'\x09'+_0xcca80c)[_0xf17be5(0x190)]('\x0a');else{const _0x5a09af=Object['entries'](_0x5bb71f);if(_0x5a09af[_0xf17be5(0x16a)]===0x0)return _0xf17be5(0x193);const _0x4f18dc=_0x5bb71f[_0xf17be5(0x175)],_0x4aeeb1=_0x5bb71f[_0xf17be5(0x16e)],_0x4cef4a=_0x5bb71f[_0xf17be5(0x1a2)],_0x150ee2=_0x5bb71f[_0xf17be5(0x17a)],_0x4c1649=_0x4aeeb1?typeof _0x4aeeb1==='string'?_0x4aeeb1:JSON[_0xf17be5(0x19e)](_0x4aeeb1,null,0x2):undefined,_0x40a555=_0x4cef4a&&Object[_0xf17be5(0x199)](_0x4cef4a)[_0xf17be5(0x16a)]>0x0?JSON['stringify'](_0x4cef4a,null,0x2):undefined,_0x3ce4c6=_0x150ee2&&Object[_0xf17be5(0x199)](_0x150ee2)[_0xf17be5(0x16a)]>0x0?JSON[_0xf17be5(0x19e)](_0x150ee2,null,0x2):undefined,_0x1c56f6=_0x5a09af[_0xf17be5(0x1a9)](([_0x1318ba])=>_0x1318ba!==_0xf17be5(0x175)&&_0x1318ba!==_0xf17be5(0x16e)&&_0x1318ba!==_0xf17be5(0x1a2)&&_0x1318ba!==_0xf17be5(0x17a)),_0x59d59b=Math[_0xf17be5(0x182)](..._0x1c56f6[_0xf17be5(0x17b)](([_0x3c54ee])=>_0x3c54ee[_0xf17be5(0x16a)])),_0x1e3421=Math[_0xf17be5(0x182)](..._0x1c56f6[_0xf17be5(0x17b)](([,_0x13f22e])=>{const _0x53d865=_0xf17be5;try{const _0xbb0e2e=_0x13f22e===null||_0x13f22e===undefined?'':typeof _0x13f22e==='object'?JSON[_0x53d865(0x19e)](_0x13f22e):String(_0x13f22e),_0xbe8e7c=_0xbb0e2e[_0x53d865(0x173)]('\x0a');return Math[_0x53d865(0x182)](..._0xbe8e7c['map'](_0x3cf0b2=>_0x3cf0b2[_0x53d865(0x16a)]),0x0);}catch{return 0x0;}}),0x14),_0x151dca=[];_0x151dca[_0xf17be5(0x194)](colorBorder('┌─'+'─'['repeat'](_0x59d59b)+'─┬─'+'─'[_0xf17be5(0x1a1)](_0x1e3421)+'─┐',_0x4793f6)),_0x1c56f6['forEach'](([_0x12edad,_0x33060b])=>{const _0x2d6116=_0xf17be5;let _0x21df85;try{_0x21df85=_0x33060b===null||_0x33060b===undefined?'':typeof _0x33060b==='object'?JSON[_0x2d6116(0x19e)](_0x33060b):String(_0x33060b);}catch{_0x21df85='[Object]';}const _0x554f50=_0x12edad[_0x2d6116(0x18d)](_0x59d59b),_0x4fb923=_0x21df85[_0x2d6116(0x173)]('\x0a');_0x4fb923[_0x2d6116(0x174)]((_0x10efc7,_0x1ab813)=>{const _0x5434fa=_0x2d6116,_0x164f37=colorBorder('│',_0x4793f6);_0x1ab813===0x0?_0x151dca[_0x5434fa(0x194)](_0x164f37+'\x20'+_0x554f50+'\x20'+_0x164f37+'\x20'+_0x10efc7[_0x5434fa(0x18d)](_0x1e3421)+'\x20'+_0x164f37):_0x151dca[_0x5434fa(0x194)](_0x164f37+'\x20'+'\x20'[_0x5434fa(0x1a1)](_0x59d59b)+'\x20'+_0x164f37+'\x20'+_0x10efc7[_0x5434fa(0x18d)](_0x1e3421)+'\x20'+_0x164f37);});}),_0x151dca['push'](colorBorder('└─'+'─'[_0xf17be5(0x1a1)](_0x59d59b)+_0xf17be5(0x181)+'─'[_0xf17be5(0x1a1)](_0x1e3421)+'─┘',_0x4793f6));_0x4c1649&&(_0x151dca[_0xf17be5(0x194)](''),_0x151dca[_0xf17be5(0x194)](String(a48_0x32c3a3[_0xf17be5(0x18a)][_0xf17be5(0x179)]('[query]'))),_0x151dca['push'](_0x4c1649));_0x40a555&&(_0x151dca[_0xf17be5(0x194)](''),_0x151dca[_0xf17be5(0x194)](String(a48_0x32c3a3[_0xf17be5(0x1a3)]['bold'](_0xf17be5(0x17e)))),_0x151dca[_0xf17be5(0x194)](_0x40a555));_0x3ce4c6&&(_0x151dca[_0xf17be5(0x194)](''),_0x151dca[_0xf17be5(0x194)](String(a48_0x32c3a3[_0xf17be5(0x19d)][_0xf17be5(0x179)](_0xf17be5(0x19f)))),_0x151dca[_0xf17be5(0x194)](_0x3ce4c6));if(_0x4f18dc){if(_0x4f18dc['stderr']){_0x151dca['push'](''),_0x151dca['push'](String(a48_0x32c3a3[_0xf17be5(0x19b)][_0xf17be5(0x179)](_0xf17be5(0x17f))));const _0x4d8100=_0x4f18dc[_0xf17be5(0x183)][_0xf17be5(0x173)]('\x0a');_0x4d8100[_0xf17be5(0x174)](_0x213cc0=>{const _0x508584=_0xf17be5;_0x213cc0[_0x508584(0x165)]()&&_0x151dca[_0x508584(0x194)](_0x213cc0);});}if(_0x4f18dc[_0xf17be5(0x19a)]){_0x151dca[_0xf17be5(0x194)](''),_0x151dca[_0xf17be5(0x194)](String(a48_0x32c3a3['cyan'][_0xf17be5(0x179)](_0xf17be5(0x198))));const _0x48ff40=_0x4f18dc['cmdout'][_0xf17be5(0x173)]('\x0a');_0x48ff40[_0xf17be5(0x174)](_0x404730=>{const _0x3ab8b7=_0xf17be5;_0x404730[_0x3ab8b7(0x165)]()&&_0x151dca[_0x3ab8b7(0x194)](_0x404730);});}}return _0x151dca['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x21ead1,_0x309919){const _0x596c95=a48_0x3012;if(_0x309919[_0x596c95(0x167)]===_0x596c95(0x19c)){await handleSDKOutput([_0x21ead1],_0x309919);return;}const _0x3161b3=resolveOutputOptions(_0x309919),_0x29024d=await formatSingleObject(_0x21ead1,_0x3161b3);await writeOutput(_0x29024d,_0x3161b3[_0x596c95(0x177)]||undefined,_0x3161b3[_0x596c95(0x167)]);}
1
+ (function(_0x120f48,_0x375651){const _0x30f605=a48_0xad07,_0x5af396=_0x120f48();while(!![]){try{const _0x4fc040=parseInt(_0x30f605(0xe4))/0x1*(-parseInt(_0x30f605(0xed))/0x2)+parseInt(_0x30f605(0xeb))/0x3*(-parseInt(_0x30f605(0xca))/0x4)+parseInt(_0x30f605(0xcf))/0x5+parseInt(_0x30f605(0xf8))/0x6*(parseInt(_0x30f605(0xef))/0x7)+-parseInt(_0x30f605(0xfc))/0x8+-parseInt(_0x30f605(0xe6))/0x9+parseInt(_0x30f605(0xcb))/0xa;if(_0x4fc040===_0x375651)break;else _0x5af396['push'](_0x5af396['shift']());}catch(_0x6b858a){_0x5af396['push'](_0x5af396['shift']());}}}(a48_0xe459,0x6804d));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 a48_0x4bec27 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x5d53da){const _0x36101b=a48_0xad07;return _0x5d53da['format']==='json'||_0x5d53da[_0x36101b(0xf6)]==='jsonl'||_0x5d53da[_0x36101b(0xf6)]==='tsv'||_0x5d53da[_0x36101b(0xf6)]===_0x36101b(0xc5)||_0x5d53da[_0x36101b(0xe0)]===!![]||_0x5d53da['jsonl']===!![]||_0x5d53da[_0x36101b(0xce)]===!![]||_0x5d53da[_0x36101b(0xc5)]===!![];}export function parseOutputOptions(_0x10eedc){const _0x583562=a48_0xad07;return{'format':_0x10eedc[_0x583562(0xf6)]||_0x583562(0xc5),'output':_0x10eedc['output']||'','limit':_0x10eedc[_0x583562(0x102)],'color':_0x10eedc[_0x583562(0xc9)],'noColor':_0x10eedc[_0x583562(0xc6)]};}function convertSDKResultToQueryResult(_0x54d742){const _0x253338=a48_0xad07,_0x16f664=[];if(_0x54d742['length']>0x0){const _0x3b87ee=_0x54d742[0x0];for(const [_0x3c68ae,_0x2ee0ff]of Object[_0x253338(0xfa)](_0x3b87ee)){let _0x4de7d7=_0x253338(0x100);if(typeof _0x2ee0ff===_0x253338(0xee))_0x4de7d7=Number[_0x253338(0xd4)](_0x2ee0ff)?_0x253338(0xfb):_0x253338(0xf3);else{if(typeof _0x2ee0ff===_0x253338(0xc4))_0x4de7d7='boolean';else _0x2ee0ff===null&&(_0x4de7d7=_0x253338(0x100));}_0x16f664[_0x253338(0xf1)]({'name':_0x3c68ae,'type':_0x4de7d7});}}return{'queryId':_0x253338(0xe3),'columns':_0x16f664,'data':_0x54d742,'stats':{'state':_0x253338(0x107),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x54d742[_0x253338(0xd9)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x496fb7,_0x2a4651){const _0x1511f2=convertSDKResultToQueryResult(_0x496fb7);return formatQueryOutput(_0x1511f2,_0x2a4651);}export async function formatQueryOutput(_0x59e9eb,_0x258cec){const _0x4ea661=a48_0xad07,{format:_0x39915b,limit:_0x2eea74,output:_0x21a16d,color:_0x46c0f9,noColor:_0x5706c1}=_0x258cec,_0x347c66=Boolean(_0x21a16d)&&!_0x46c0f9,_0x18b6c1={'color':_0x46c0f9,'noColor':_0x5706c1||_0x347c66};if(_0x39915b===_0x4ea661(0xc5)){const _0x3ac1e7=shouldUseLess(_0x39915b,_0x21a16d);return formatAsTable(_0x59e9eb,_0x2eea74,_0x3ac1e7,_0x18b6c1);}else{if(_0x39915b===_0x4ea661(0xe0))return formatAsJSON(_0x59e9eb,_0x18b6c1);else return _0x39915b==='jsonl'?formatAsJSONL(_0x59e9eb,_0x18b6c1):formatQueryResult(_0x59e9eb,_0x39915b);}}function shouldUseLess(_0x29128f,_0x38b7df){const _0x2be552=a48_0xad07;return(_0x29128f===_0x2be552(0xc5)||_0x29128f===_0x2be552(0xf2))&&process['stdout'][_0x2be552(0xdd)]&&!_0x38b7df;}export function resolveOutputOptions(_0x3d9008){const _0x5128a1=a48_0xad07,_0x2b789a=resolveOutputFormat(_0x3d9008['format'],_0x3d9008[_0x5128a1(0xf4)],_0x5128a1(0xc5));let _0x24dd5d=typeof _0x3d9008[_0x5128a1(0x102)]===_0x5128a1(0xee)?_0x3d9008[_0x5128a1(0x102)]:parseInt(_0x3d9008[_0x5128a1(0x102)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x146e8f=_0x3d9008[_0x5128a1(0xf4)]||'';return shouldUseLess(_0x2b789a,_0x146e8f)&&(_0x24dd5d=Infinity),{'format':_0x2b789a,'output':_0x146e8f,'limit':_0x24dd5d,'color':_0x3d9008[_0x5128a1(0xc9)],'noColor':_0x3d9008[_0x5128a1(0xc6)]};}export function writeOutput(_0x1576d8,_0x3e9191,_0x134769){const _0x56d008=a48_0xad07;return _0x3e9191?(writeFileSync(_0x3e9191,_0x1576d8),console[_0x56d008(0xd1)](_0x56d008(0xd0)+_0x3e9191),Promise[_0x56d008(0xcc)]()):shouldUseLess(_0x134769||'','')?new Promise(_0x2fc78d=>{const _0x2b2e8e=_0x56d008,_0x46a839=spawn(_0x2b2e8e(0x105),['-FXRSn'],{'stdio':[_0x2b2e8e(0xc7),_0x2b2e8e(0xde),_0x2b2e8e(0xde)]});let _0x1a93c8=![];_0x46a839['on'](_0x2b2e8e(0xd1),()=>{const _0x476dcd=_0x2b2e8e;!_0x1a93c8&&(_0x1a93c8=!![],console[_0x476dcd(0xc8)](_0x1576d8),_0x2fc78d());}),_0x46a839['on']('close',()=>{!_0x1a93c8&&(_0x1a93c8=!![],_0x2fc78d());}),_0x46a839['on'](_0x2b2e8e(0xea),()=>{const _0x29f015=_0x2b2e8e;!_0x1a93c8&&_0x46a839['stdin']&&(_0x46a839[_0x29f015(0x106)]['on'](_0x29f015(0xd1),()=>{}),_0x46a839[_0x29f015(0x106)][_0x29f015(0xfd)](_0x1576d8),_0x46a839['stdin'][_0x29f015(0x109)]());}),!_0x46a839[_0x2b2e8e(0x106)]&&(!_0x1a93c8&&(_0x1a93c8=!![],console[_0x2b2e8e(0xc8)](_0x1576d8),_0x2fc78d()));}):(console[_0x56d008(0xc8)](_0x1576d8),Promise['resolve']());}function a48_0xad07(_0x2cd523,_0x4cf37e){_0x2cd523=_0x2cd523-0xc3;const _0xe4591b=a48_0xe459();let _0xad070d=_0xe4591b[_0x2cd523];return _0xad070d;}export async function handleSDKOutput(_0x5dda4d,_0x19d294){const _0x5349f6=a48_0xad07,_0x18586e=resolveOutputOptions(_0x19d294),_0x3ba2fd=await formatSDKOutput(_0x5dda4d,_0x18586e);await writeOutput(_0x3ba2fd,_0x18586e['output']||undefined,_0x18586e[_0x5349f6(0xf6)]);}function a48_0xe459(){const _0x5539cd=['3tqiLXM','red','1121832pPWaCb','split','padEnd','[rule]','spawn','69hclILb','yellow','531398TOnVDt','number','1185779oskCYz','blue','push','list','double','output','magenta','format','[logs]','12fahQAI','query','entries','bigint','243544KCEMnx','write','rule','stderr','varchar','trim','limit','forEach','[error]','less','stdin','FINISHED','jsonl','end','stringify','[query]','boolean','table','noColor','pipe','log','color','98844tdkOMb','12444970fxkyBS','resolve','join','tsv','1816555MpCBIW','Results\x20saved\x20to\x20','error','cmdout','─┬─','isInteger','repeat','cyan','max','debug','length','map','string','[Object]','isTTY','inherit','bold','json','object','keys','sdk-result'];a48_0xe459=function(){return _0x5539cd;};return a48_0xe459();}export async function handleQueryOutput(_0x1a33b4,_0x2a64cf){const _0xac453a=a48_0xad07,_0x5039fa=resolveOutputOptions(_0x2a64cf),_0x1936ae=await formatQueryOutput(_0x1a33b4,_0x5039fa);await writeOutput(_0x1936ae,_0x5039fa['output']||undefined,_0x5039fa[_0xac453a(0xf6)]);}async function formatSingleObject(_0x524f15,_0x3bb877){const _0x5e85fe=a48_0xad07,{format:_0x5e90c2,color:_0x49f30f,noColor:_0x4a2aa6}=_0x3bb877,_0x2d220d={'color':_0x49f30f,'noColor':_0x4a2aa6};if(_0x5e90c2===_0x5e85fe(0xe0)){if(shouldUseColor(_0x2d220d))return colorizeJSON(_0x524f15,_0x2d220d);return JSON[_0x5e85fe(0x10a)](_0x524f15,null,0x2);}else{if(_0x5e90c2===_0x5e85fe(0x108)){if(shouldUseColor(_0x2d220d))return colorizeJSONCompact(_0x524f15,_0x2d220d);return JSON[_0x5e85fe(0x10a)](_0x524f15);}else{if(_0x5e90c2==='tsv')return Object[_0x5e85fe(0xfa)](_0x524f15)[_0x5e85fe(0xda)](([_0x395c16,_0x108e94])=>_0x395c16+'\x09'+_0x108e94)[_0x5e85fe(0xcd)]('\x0a');else{const _0x1768aa=Object[_0x5e85fe(0xfa)](_0x524f15);if(_0x1768aa['length']===0x0)return'No\x20data';const _0x5431a7=_0x524f15[_0x5e85fe(0xd8)],_0x3fda58=_0x524f15[_0x5e85fe(0xf9)],_0x1dc0a8=_0x524f15['params'],_0x4d640a=_0x524f15[_0x5e85fe(0xfe)],_0x25fe6b=_0x3fda58?typeof _0x3fda58===_0x5e85fe(0xdb)?_0x3fda58:JSON['stringify'](_0x3fda58,null,0x2):undefined,_0x41ddbf=_0x1dc0a8&&Object[_0x5e85fe(0xe2)](_0x1dc0a8)['length']>0x0?JSON[_0x5e85fe(0x10a)](_0x1dc0a8,null,0x2):undefined,_0x12201d=_0x4d640a&&Object[_0x5e85fe(0xe2)](_0x4d640a)[_0x5e85fe(0xd9)]>0x0?JSON[_0x5e85fe(0x10a)](_0x4d640a,null,0x2):undefined,_0x7b3786=_0x1768aa['filter'](([_0x35428b])=>_0x35428b!==_0x5e85fe(0xd8)&&_0x35428b!==_0x5e85fe(0xf9)&&_0x35428b!=='params'&&_0x35428b!=='rule'),_0xc2b833=Math[_0x5e85fe(0xd7)](..._0x7b3786[_0x5e85fe(0xda)](([_0x553dea])=>_0x553dea[_0x5e85fe(0xd9)])),_0x6b04cf=Math[_0x5e85fe(0xd7)](..._0x7b3786['map'](([,_0x2185a8])=>{const _0x235b62=_0x5e85fe;try{const _0x542b01=_0x2185a8===null||_0x2185a8===undefined?'':typeof _0x2185a8==='object'?JSON[_0x235b62(0x10a)](_0x2185a8):String(_0x2185a8),_0x10be2e=_0x542b01[_0x235b62(0xe7)]('\x0a');return Math[_0x235b62(0xd7)](..._0x10be2e[_0x235b62(0xda)](_0x26074d=>_0x26074d[_0x235b62(0xd9)]),0x0);}catch{return 0x0;}}),0x14),_0x20a40c=[];_0x20a40c['push'](colorBorder('┌─'+'─'[_0x5e85fe(0xd5)](_0xc2b833)+_0x5e85fe(0xd3)+'─'[_0x5e85fe(0xd5)](_0x6b04cf)+'─┐',_0x2d220d)),_0x7b3786[_0x5e85fe(0x103)](([_0x30bdea,_0x1b3fa7])=>{const _0x1b7efe=_0x5e85fe;let _0x577177;try{_0x577177=_0x1b3fa7===null||_0x1b3fa7===undefined?'':typeof _0x1b3fa7===_0x1b7efe(0xe1)?JSON[_0x1b7efe(0x10a)](_0x1b3fa7):String(_0x1b3fa7);}catch{_0x577177=_0x1b7efe(0xdc);}const _0x728d3=_0x30bdea[_0x1b7efe(0xe8)](_0xc2b833),_0x7fcf6f=_0x577177[_0x1b7efe(0xe7)]('\x0a');_0x7fcf6f[_0x1b7efe(0x103)]((_0x303c1b,_0x49a8d5)=>{const _0x34159e=_0x1b7efe,_0x367532=colorBorder('│',_0x2d220d);_0x49a8d5===0x0?_0x20a40c[_0x34159e(0xf1)](_0x367532+'\x20'+_0x728d3+'\x20'+_0x367532+'\x20'+_0x303c1b[_0x34159e(0xe8)](_0x6b04cf)+'\x20'+_0x367532):_0x20a40c['push'](_0x367532+'\x20'+'\x20'[_0x34159e(0xd5)](_0xc2b833)+'\x20'+_0x367532+'\x20'+_0x303c1b[_0x34159e(0xe8)](_0x6b04cf)+'\x20'+_0x367532);});}),_0x20a40c['push'](colorBorder('└─'+'─'['repeat'](_0xc2b833)+'─┴─'+'─'['repeat'](_0x6b04cf)+'─┘',_0x2d220d));_0x25fe6b&&(_0x20a40c['push'](''),_0x20a40c['push'](String(a48_0x4bec27[_0x5e85fe(0xec)][_0x5e85fe(0xdf)](_0x5e85fe(0xc3)))),_0x20a40c[_0x5e85fe(0xf1)](_0x25fe6b));_0x41ddbf&&(_0x20a40c['push'](''),_0x20a40c[_0x5e85fe(0xf1)](String(a48_0x4bec27[_0x5e85fe(0xf0)]['bold']('[params]'))),_0x20a40c[_0x5e85fe(0xf1)](_0x41ddbf));_0x12201d&&(_0x20a40c[_0x5e85fe(0xf1)](''),_0x20a40c[_0x5e85fe(0xf1)](String(a48_0x4bec27[_0x5e85fe(0xf5)][_0x5e85fe(0xdf)](_0x5e85fe(0xe9)))),_0x20a40c[_0x5e85fe(0xf1)](_0x12201d));if(_0x5431a7){if(_0x5431a7[_0x5e85fe(0xff)]){_0x20a40c[_0x5e85fe(0xf1)](''),_0x20a40c['push'](String(a48_0x4bec27[_0x5e85fe(0xe5)][_0x5e85fe(0xdf)](_0x5e85fe(0x104))));const _0xfcacba=_0x5431a7[_0x5e85fe(0xff)]['split']('\x0a');_0xfcacba[_0x5e85fe(0x103)](_0x5133e9=>{const _0x47f820=_0x5e85fe;_0x5133e9[_0x47f820(0x101)]()&&_0x20a40c[_0x47f820(0xf1)](_0x5133e9);});}if(_0x5431a7[_0x5e85fe(0xd2)]){_0x20a40c['push'](''),_0x20a40c['push'](String(a48_0x4bec27[_0x5e85fe(0xd6)][_0x5e85fe(0xdf)](_0x5e85fe(0xf7))));const _0x10ff15=_0x5431a7['cmdout'][_0x5e85fe(0xe7)]('\x0a');_0x10ff15['forEach'](_0x4a602f=>{const _0x7deb7a=_0x5e85fe;_0x4a602f[_0x7deb7a(0x101)]()&&_0x20a40c['push'](_0x4a602f);});}}return _0x20a40c[_0x5e85fe(0xcd)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x48556f,_0x29ebc3){const _0x378338=a48_0xad07;if(_0x29ebc3[_0x378338(0xf6)]==='table'){await handleSDKOutput([_0x48556f],_0x29ebc3);return;}const _0xc3ec14=resolveOutputOptions(_0x29ebc3),_0x4718e2=await formatSingleObject(_0x48556f,_0xc3ec14);await writeOutput(_0x4718e2,_0xc3ec14[_0x378338(0xf4)]||undefined,_0xc3ec14[_0x378338(0xf6)]);}