@treasuredata/tdx 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/client/cdp-client.js +1 -1
  4. package/dist/client/http-client.js +1 -1
  5. package/dist/client/llm-client.js +1 -1
  6. package/dist/client/rate-limiter.js +1 -1
  7. package/dist/client/td-client.js +1 -1
  8. package/dist/client/trino-client.js +1 -1
  9. package/dist/client/workflow-client.js +1 -1
  10. package/dist/commands/activations.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/context-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/job-command.js +1 -1
  19. package/dist/commands/llm-command.js +1 -1
  20. package/dist/commands/llm-proxy.js +1 -1
  21. package/dist/commands/parent-segment-command.js +1 -1
  22. package/dist/commands/profiles-command.js +1 -1
  23. package/dist/commands/query-command.js +1 -1
  24. package/dist/commands/segment-command.js +1 -1
  25. package/dist/commands/segment-create-command.js +1 -1
  26. package/dist/commands/segment-fields-command.js +1 -1
  27. package/dist/commands/segment-pwd-command.js +1 -1
  28. package/dist/commands/segment-update-command.js +1 -1
  29. package/dist/commands/segment-use-command.js +1 -1
  30. package/dist/commands/segments.js +1 -1
  31. package/dist/commands/show.js +1 -1
  32. package/dist/commands/tables.js +1 -1
  33. package/dist/commands/use-command.js +1 -1
  34. package/dist/commands/workflow-command.js +1 -1
  35. package/dist/core/auth.js +1 -1
  36. package/dist/core/config.js +1 -1
  37. package/dist/core/global-context.js +1 -1
  38. package/dist/core/profile.js +1 -1
  39. package/dist/core/project-config.js +1 -1
  40. package/dist/core/session.js +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/proxy/anthropic-adapter.d.ts +19 -3
  43. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  44. package/dist/proxy/anthropic-adapter.js +1 -1
  45. package/dist/proxy/anthropic-adapter.js.map +1 -1
  46. package/dist/proxy/server.d.ts.map +1 -1
  47. package/dist/proxy/server.js +1 -1
  48. package/dist/proxy/server.js.map +1 -1
  49. package/dist/proxy/session-cache.js +1 -1
  50. package/dist/sdk/api.js +1 -1
  51. package/dist/sdk/database.js +1 -1
  52. package/dist/sdk/errors.js +1 -1
  53. package/dist/sdk/index.js +1 -1
  54. package/dist/sdk/job.js +1 -1
  55. package/dist/sdk/llm.js +1 -1
  56. package/dist/sdk/query.js +1 -1
  57. package/dist/sdk/segment.js +1 -1
  58. package/dist/sdk/table.js +1 -1
  59. package/dist/sdk/workflow.js +1 -1
  60. package/dist/types/endpoints.js +1 -1
  61. package/dist/types/index.js +1 -1
  62. package/dist/utils/agent-ref-parser.js +1 -1
  63. package/dist/utils/chat-cache.js +1 -1
  64. package/dist/utils/colors.js +1 -1
  65. package/dist/utils/command-output.js +1 -1
  66. package/dist/utils/constants.js +1 -1
  67. package/dist/utils/file-permissions.js +1 -1
  68. package/dist/utils/format-detector.js +1 -1
  69. package/dist/utils/formatters.js +1 -1
  70. package/dist/utils/json-loader.js +1 -1
  71. package/dist/utils/model-aliases.js +1 -1
  72. package/dist/utils/option-validation.js +1 -1
  73. package/dist/utils/port.js +1 -1
  74. package/dist/utils/process.js +1 -1
  75. package/dist/utils/prompt.js +1 -1
  76. package/dist/utils/segment-path-parser.js +1 -1
  77. package/dist/utils/segment-ref-parser.js +1 -1
  78. package/dist/utils/spinner.js +1 -1
  79. package/dist/utils/sql-parser.js +1 -1
  80. package/dist/utils/sse-parser.js +1 -1
  81. package/dist/utils/string-utils.js +1 -1
  82. package/dist/utils/table-ref-parser.js +1 -1
  83. package/dist/utils/tdx-logger.js +1 -1
  84. package/dist/utils/tree-formatter.js +1 -1
  85. package/dist/utils/version-check.js +1 -1
  86. package/dist/utils/workflow-utils.js +1 -1
  87. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  {
2
- "gitRevision": "713653c",
3
- "buildTime": "2025-11-21 23:31:51+0000"
2
+ "gitRevision": "4483756",
3
+ "buildTime": "2025-11-22 01:00:42+0000"
4
4
  }
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x3b11c6=a0_0x2b7a;(function(_0x163cbc,_0x1b508f){const _0x1dabb2=a0_0x2b7a,_0x3c371a=_0x163cbc();while(!![]){try{const _0x532ced=parseInt(_0x1dabb2(0x21d))/0x1*(-parseInt(_0x1dabb2(0x20e))/0x2)+-parseInt(_0x1dabb2(0x25e))/0x3*(parseInt(_0x1dabb2(0x273))/0x4)+-parseInt(_0x1dabb2(0x2b4))/0x5*(-parseInt(_0x1dabb2(0x2dd))/0x6)+-parseInt(_0x1dabb2(0x20b))/0x7+-parseInt(_0x1dabb2(0x236))/0x8*(parseInt(_0x1dabb2(0x1bf))/0x9)+parseInt(_0x1dabb2(0x271))/0xa+parseInt(_0x1dabb2(0x1e6))/0xb*(parseInt(_0x1dabb2(0x289))/0xc);if(_0x532ced===_0x1b508f)break;else _0x3c371a['push'](_0x3c371a['shift']());}catch(_0x2338b8){_0x3c371a['push'](_0x3c371a['shift']());}}}(a0_0x58f0,0x43573));import{Command}from'commander';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{TDX}from'./sdk/index.js';import{GlobalContext}from'./core/global-context.js';import{LogLevel}from'./utils/tdx-logger.js';import{QueryCommand}from'./commands/query-command.js';import{ChatCommand}from'./commands/chat-command.js';import{ApiCommand}from'./commands/api-command.js';import{DatabasesCommand}from'./commands/databases.js';import{TablesCommand}from'./commands/tables.js';import{SegmentsCommand}from'./commands/segments.js';import{ActivationsCommand}from'./commands/activations.js';function a0_0x58f0(){const _0x1ed3f1=['1226949VavyZa','--database\x20<name>','apiKey','-y,\x20--yes','Database\x20to\x20use\x20(overrides\x20context)','--port\x20<number>','Start\x20time\x20filter\x20(ISO\x208601\x20format)','Workflow\x20(Digdag)\x20management\x20commands','Show\x20logs\x20for\x20a\x20specific\x20task','Show\x20tasks\x20for\x20an\x20attempt','Make\x20segment\x20invisible\x20(default:\x20visible)','--rule-file\x20<file>','length','--new','--trace','Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)','repeat','optionTerm','--no-color','2016860wtPLmR','then','4dCdeaK','after','Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)','action','show\x20<segment_name>','-r,\x20--recursive','--json','run','Master\x20database\x20name','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','List\x20recursively\x20(show\x20full\x20hierarchy\x20tree)','List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)','preAction','Preview\x20operation\x20without\x20executing','-d,\x20--database\x20<database>','--kind\x20<type>','pwd','-d,\x20--database\x20<name>','--in\x20<name>','Kill\x20a\x20job','--folder\x20<name>','End\x20time\x20filter\x20(ISO\x208601\x20format)','10625772RMtQth','INFO','--reason\x20<text>','--agent\x20<name>','TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02;\x20aliases:\x20us,\x20jp,\x20aws)','Read\x20query\x20from\x20file','--from-task\x20<task>','Attributes\x20as\x20JSON\x20string','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration\x20(use\x20global\x20--debug/--trace\x20for\x20logging)','use\x20<path>','registeredArguments','--name\x20<text>','Add\x20attributes\x20from\x20JSON\x20file','List\x20available\x20LLM\x20models','commandUsage','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','argv','--starter-message\x20<text>',',\x20version\x20','Folder\x20name\x20for\x20organization','../package.json','Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','retry\x20<session-id|attempt-id>','information_schema','--temperature\x20<n>','stderr','--jsonl','job','Delete\x20an\x20agent','Add\x20behaviors\x20as\x20JSON\x20string','--offset\x20<number>','Include\x20subtasks\x20in\x20the\x20output','map','Agent\x20name','Updated\x20schedule\x20option','kill\x20<attempt-id>','jobs','workflows\x20[project]','--database\x20<db>','padWidth','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','profiles','Create\x20child\x20segment\x20(use\x20parent_name/child_name)','337900EplHke','debug','--version','--name\x20<new_name>','--tsv','--behaviors\x20<json>','0.7','Project\x20description','Temperature\x20(0.0-2.0,\x20default:\x200.7)','proxy','sql\x20<segment_name>','jsonl','subcommandTerm','update\x20<segment_name>','HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)','Segment\x20description','Clear\x20session\x20context','log','allowUnknownOption','utf-8','LLM\x20project\x20to\x20use\x20(overrides\x20context)','Customer\x20group\x20from\x20JSON\x20file','Set\x20operation\x20timeout\x20in\x20seconds','Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)','api\x20[endpoint]','describe\x20<segment_name>','commandDescription','Create\x20segment\x20folder','Parent\x20segment\x20(audience)\x20management','agent','isTTY','push\x20[project-name-or-dir]','LLM\x20project\x20management','commands','--resume-from\x20<task>','Revision\x20name\x20(default:\x20timestamp)','-H,\x20--header\x20<header>','--session\x20<id>','Specific\x20revision\x20to\x20download\x20(default:\x20latest)','--output\x20<file>','segment','36opmvfE','--project\x20<name>','buildTime','Submit\x20a\x20job','join','fields\x20<parent_name>','--revision\x20<revision>','port','alias','Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)','Usage:\x20','--skip-validation','Attributes\x20from\x20JSON\x20file','history\x20[chat-id]','Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)','json','Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)','--name\x20<name>','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','update\x20<name>','Show\x20job\x20details','logLevel','Customer\x20group\x20as\x20JSON\x20string','submit\x20[query]','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Port\x20to\x20run\x20the\x20proxy\x20server\x20on','List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)','--format\x20<format>','--limit\x20<rows>','--add-attributes-file\x20<file>','Parent\x20segment\x20to\x20use\x20(overrides\x20context)','--site\x20<site>','Parent\x20segment\x20description','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','required','--profile\x20<name>','--status\x20<status>','context','729BfSSWl','--table\x20<table>','show\x20<job-id>','Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)','Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)','Parent\x20folder\x20name\x20for\x20nested\x20folders','Filtering\x20rule\x20from\x20JSON\x20file','opts','LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','--behaviors-file\x20<file>','build-info.json','Filtering\x20rule\x20as\x20JSON\x20string','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','Model\x20type\x20(default:\x20claude-4.5-sonnet)','project','Timezone\x20(e.g.,\x20America/Los_Angeles)','Create\x20a\x20new\x20agent\x20in\x20current\x20project','--parent-folder\x20<name>','Override\x20project\x20name','List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)','Save\x20output\x20to\x20file','List\x20jobs','option','command','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','--schedule-type\x20<type>','--model\x20<name>','--from\x20<timestamp>','TRACE','Add\x20attributes\x20as\x20JSON\x20string','--schedule-option\x20<value>','Updated\x20timezone','API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','--dry-run','List\x20folders\x20and\x20segments\x20at\x20path\x20or\x20in\x20current\x20context','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy\x20(use\x20--\x20to\x20pass\x20options\x20to\x20Claude\x20Code)','--customer-group-file\x20<file>','--max-tool-iterations\x20<n>','addHelpText','11OONAke','Database\x20name\x20(default:\x20information_schema)','format','Starter\x20message','options','List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)','includes','\x0aExamples:\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/list\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/show/mydb\x0a\x20\x20$\x20tdx\x20api\x20-X\x20POST\x20--data\x20\x27{\x22query\x22:\x22SELECT\x201\x22}\x27\x20/v3/job/issue/hive/mydb\x0a\x20\x20$\x20tdx\x20api\x20/entities/parent_segments\x20--type\x20cdp\x0a\x20\x20$\x20tdx\x20api\x20/api/workflows\x20--type\x20workflow\x0a','filter','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','Show\x20current\x20resolved\x20context\x20(use\x20--debug\x20to\x20show\x20sources)','Alias\x20for\x20--database\x20(natural\x20language\x20style)','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','catch','create\x20<name>','argumentDescription','DEBUG','push','Update\x20an\x20existing\x20agent','tdx\x20','Updated\x20filtering\x20rule\x20from\x20JSON\x20file','result\x20<job-id>','Arguments:','activations\x20<segment_name>','Job\x20management\x20commands','--force','trace','Enable\x20trace\x20logging\x20(ultra-verbose,\x20all\x20internal\x20operations)','Model\x20name\x20(default:\x20claude-4.5-sonnet)','trino','Updated\x20filtering\x20rule\x20as\x20JSON\x20string','--add-behaviors-file\x20<file>','llm','--rule\x20<json>','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)','exit','configureHelp','968947DgUcii','LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)','Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)','44588oYxVJu','hook','Segment\x20folder\x20management','Agent\x20reference\x20(project-name/agent-name)','Skip\x20confirmation\x20prompts','--attributes\x20<json>','--prompt\x20<text>','kill\x20<job-id>','Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)','-f,\x20--file\x20<path>','delete\x20<name>','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','claude-4.5-sonnet','attempt\x20<attempt-id>','-v,\x20--verbose','23jyEfYq','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','tsv','--llm-project\x20<name>','--description\x20<text>','Commands:','4000','optionDescription','Updated\x20description','databases\x20[pattern]','folder','parse','-X,\x20--method\x20<method>','gitRevision','tasks\x20<attempt-id>','Show\x20current\x20segment/folder\x20context','Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)','use\x20<project-name>','--add-attributes\x20<json>','Read\x20SQL\x20query\x20from\x20file','description','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage','--in\x20<database>','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','Run\x20Trino\x20query\x20with\x20streaming\x20results','15472IKMXtP','--type\x20<api_type>','.dev','Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','Starting\x20offset\x20for\x20logs\x20(default:\x200)','Move\x20to\x20folder','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','sessions\x20[project]','--timeout\x20<seconds>','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','projects\x20[pattern]','Describe\x20table\x20schema','Reason\x20for\x20killing\x20the\x20attempt','--to\x20<timestamp>','--timezone\x20<tz>','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','--max-depth\x20<depth>','name','summary','--customer-group\x20<json>','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)','Update\x20parent\x20segment\x20(audience)','--system-prompt\x20<text>','desc','GET','database','Create\x20a\x20new\x20LLM\x20project','use\x20[resource]\x20[value]','segments\x20[path]','version','Delete\x20an\x20LLM\x20project','Create\x20parent\x20segment\x20(audience)','chat\x20[message...]','Enable\x20verbose\x20logging','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','create\x20<parent_name>\x20<folder_name>','replace','--no-count-population','tables\x20[pattern]','show\x20[table]'];a0_0x58f0=function(){return _0x1ed3f1;};return a0_0x58f0();}import{ShowCommand}from'./commands/show.js';import{DescribeCommand}from'./commands/describe.js';import{SegmentDescribeCommand,SegmentShowCommand,SegmentFolderListCommand,SegmentFolderShowCommand,SegmentSQLCommand,SegmentFolderCreateCommand}from'./commands/segment-command.js';import{SegmentFieldsCommand}from'./commands/segment-fields-command.js';import{ParentSegmentCreateCommand,ParentSegmentUpdateCommand}from'./commands/parent-segment-command.js';import{SegmentCreateCommand}from'./commands/segment-create-command.js';import{SegmentUpdateCommand}from'./commands/segment-update-command.js';import{SegmentUseCommand}from'./commands/segment-use-command.js';import{SegmentPwdCommand}from'./commands/segment-pwd-command.js';import{WorkflowProjectsCommand,WorkflowWorkflowsCommand,WorkflowSessionsCommand,WorkflowAttemptsCommand,WorkflowAttemptCommand,WorkflowTasksCommand,WorkflowLogsCommand,WorkflowKillCommand,WorkflowRetryCommand,WorkflowDownloadCommand,WorkflowPushCommand,WorkflowDeleteCommand}from'./commands/workflow-command.js';import{JobListCommand,JobShowCommand,JobKillCommand,JobSubmitCommand,JobResultCommand}from'./commands/job-command.js';import{LLMModelsCommand,LLMProjectsCommand,LLMAgentsCommand,LLMAgentShowCommand,LLMAgentCreateCommand,LLMAgentUpdateCommand,LLMAgentDeleteCommand,LLMHistoryCommand,LLMUseCommand,LLMProjectCreateCommand,LLMProjectDeleteCommand}from'./commands/llm-command.js';import{LLMProxyCommand}from'./commands/llm-proxy.js';import{ClaudeCommand}from'./commands/claude-command.js';import{ContextCommand}from'./commands/context-command.js';import{UseCommand}from'./commands/use-command.js';import{ProfilesCommand}from'./commands/profiles-command.js';import{checkForUpdate,displayUpdateNotification}from'./utils/version-check.js';const __filename=fileURLToPath(import.meta['url']),__dirname=dirname(__filename),packageJson=JSON[a0_0x3b11c6(0x228)](readFileSync(join(__dirname,a0_0x3b11c6(0x29d)),a0_0x3b11c6(0x2c7)));let buildInfo={};try{buildInfo=JSON[a0_0x3b11c6(0x228)](readFileSync(join(__dirname,a0_0x3b11c6(0x1c9)),a0_0x3b11c6(0x2c7)));}catch{}if(process[a0_0x3b11c6(0x299)][a0_0x3b11c6(0x1ec)](a0_0x3b11c6(0x2b6))){let versionOutput=a0_0x3b11c6(0x1f9)+packageJson['version'];buildInfo[a0_0x3b11c6(0x22a)]&&(versionOutput+='\x20('+buildInfo[a0_0x3b11c6(0x22a)]+')'),buildInfo[a0_0x3b11c6(0x2df)]&&(versionOutput+='\x20-\x20built\x20'+buildInfo['buildTime']),console[a0_0x3b11c6(0x2c5)](versionOutput),process[a0_0x3b11c6(0x209)](0x0);}const program=new Command();let description='AI-native\x20CLI\x20for\x20Treasure\x20Data';buildInfo['gitRevision']?description+=a0_0x3b11c6(0x29b)+packageJson[a0_0x3b11c6(0x253)]+'\x20('+buildInfo[a0_0x3b11c6(0x22a)]+')':description+=a0_0x3b11c6(0x29b)+packageJson[a0_0x3b11c6(0x253)];program[a0_0x3b11c6(0x247)]('tdx')[a0_0x3b11c6(0x231)](description),program['option'](a0_0x3b11c6(0x2fc),a0_0x3b11c6(0x28d),'us01')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2f8),'Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)')['option'](a0_0x3b11c6(0x279),a0_0x3b11c6(0x1ef))['option'](a0_0x3b11c6(0x2a3),a0_0x3b11c6(0x2b1))['option'](a0_0x3b11c6(0x2b8),'Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2db),a0_0x3b11c6(0x1d3))[a0_0x3b11c6(0x1d5)]('--limit\x20<number>','Maximum\x20number\x20of\x20items\x20to\x20return\x20(default\x20varies\x20by\x20command)')['option']('--color',a0_0x3b11c6(0x216),![])[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x270),a0_0x3b11c6(0x22d),![])[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x21c),a0_0x3b11c6(0x257),![])[a0_0x3b11c6(0x1d5)]('--debug','Enable\x20debug\x20logging\x20(shows\x20HTTP\x20requests/responses)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x26c),a0_0x3b11c6(0x201))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x23e),a0_0x3b11c6(0x2ca),'30')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1e0),a0_0x3b11c6(0x280),![])[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x261),a0_0x3b11c6(0x212),![])[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2d9),a0_0x3b11c6(0x2eb))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1bc),'Profile\x20to\x20use\x20(overrides\x20active\x20profile)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x284),a0_0x3b11c6(0x262))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x285),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x3b11c6(0x1d5)]('--parent-segment\x20<name>',a0_0x3b11c6(0x2fb))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x220),a0_0x3b11c6(0x2c8)),program[a0_0x3b11c6(0x20a)]({'formatHelp':(_0x28d2e4,_0xceed2f)=>{const _0x341b31=a0_0x3b11c6,_0xa6d49c=_0xceed2f[_0x341b31(0x2b0)](_0x28d2e4,_0xceed2f),_0x374fda=0x2,_0x52432d=0x2;function _0x1928f9(_0x3c53bc){return!!_0x3c53bc['hidden'];}function _0x172447(_0x3da56c,_0x345c23){if(_0x345c23){const _0x3583e8=''+_0x3da56c['padEnd'](_0xa6d49c+_0x52432d)+_0x345c23;return _0x3583e8;}return _0x3da56c;}function _0x351c82(_0x45c162){const _0x2d2b39=_0x341b31;return _0x45c162[_0x2d2b39(0x2e1)]('\x0a')[_0x2d2b39(0x25a)](/^/gm,'\x20'[_0x2d2b39(0x26e)](_0x374fda));}const _0x10d0d6=[];_0x10d0d6[_0x341b31(0x1f7)](_0x341b31(0x2e7)+_0xceed2f[_0x341b31(0x297)](_0x28d2e4));const _0xa9c25c=_0xceed2f[_0x341b31(0x2ce)](_0x28d2e4);_0xa9c25c&&(_0x10d0d6[_0x341b31(0x1f7)](''),_0x10d0d6['push'](_0xa9c25c));const _0x3cb02d=_0x28d2e4[_0x341b31(0x2d5)][_0x341b31(0x1ee)](_0xeecc4a=>!_0x1928f9(_0xeecc4a));if(_0x3cb02d['length']>0x0){const _0x1d6365=_0x3cb02d[_0x341b31(0x2a9)](_0x47d2cf=>{const _0x4f1ae3=_0x341b31,_0x112f3b=_0xceed2f[_0x4f1ae3(0x2c0)](_0x47d2cf),_0x4bf475=_0xceed2f['subcommandDescription'](_0x47d2cf);return _0x172447(_0x112f3b,_0x4bf475);});_0x10d0d6[_0x341b31(0x1f7)](''),_0x10d0d6[_0x341b31(0x1f7)](_0x341b31(0x222)),_0x10d0d6[_0x341b31(0x1f7)](_0x351c82(_0x1d6365));}const _0x5b8f50=_0x28d2e4[_0x341b31(0x1ea)][_0x341b31(0x1ee)](_0x3d7efd=>!_0x1928f9(_0x3d7efd));if(_0x5b8f50['length']>0x0){const _0x226a21=_0x5b8f50[_0x341b31(0x2a9)](_0x3568cd=>{const _0x5ab3a1=_0x341b31,_0x48db86=_0xceed2f[_0x5ab3a1(0x26f)](_0x3568cd),_0x1484c4=_0xceed2f[_0x5ab3a1(0x224)](_0x3568cd);return _0x172447(_0x48db86,_0x1484c4);});_0x10d0d6[_0x341b31(0x1f7)](''),_0x10d0d6[_0x341b31(0x1f7)]('Options:'),_0x10d0d6[_0x341b31(0x1f7)](_0x351c82(_0x226a21));}const _0x51b966=(_0x28d2e4[_0x341b31(0x293)]||[])[_0x341b31(0x1ee)](_0xbca2d1=>!_0x1928f9(_0xbca2d1));if(_0x51b966[_0x341b31(0x26a)]>0x0){const _0x3989a7=_0x51b966[_0x341b31(0x2a9)](_0x529bc7=>{const _0x18c390=_0x341b31,_0x35c9a8=_0xceed2f['argumentTerm'](_0x529bc7),_0x1ffb2=_0xceed2f[_0x18c390(0x1f5)](_0x529bc7);return _0x172447(_0x35c9a8,_0x1ffb2);});_0x10d0d6[_0x341b31(0x1f7)](''),_0x10d0d6[_0x341b31(0x1f7)](_0x341b31(0x1fc)),_0x10d0d6[_0x341b31(0x1f7)](_0x351c82(_0x3989a7));}return _0x10d0d6['join']('\x0a');},'subcommandTerm':_0x2cab55=>{const _0x31251e=a0_0x3b11c6,_0x41e47a=(_0x2cab55['registeredArguments']||[])[_0x31251e(0x2a9)](_0x3cabda=>_0x3cabda[_0x31251e(0x1bb)]?'<'+_0x3cabda[_0x31251e(0x247)]()+'>':'['+_0x3cabda[_0x31251e(0x247)]()+']')[_0x31251e(0x2e1)]('\x20'),_0x41c2d4=_0x2cab55['aliases'](),_0x1ee6a8=_0x41c2d4['length']>0x0?_0x2cab55[_0x31251e(0x247)]()+',\x20'+_0x41c2d4[_0x31251e(0x2e1)](',\x20'):_0x2cab55[_0x31251e(0x247)]();return _0x41e47a?_0x1ee6a8+'\x20'+_0x41e47a:_0x1ee6a8;}}),program[a0_0x3b11c6(0x20f)](a0_0x3b11c6(0x27f),_0xf2b210=>{const _0x7b0d6c=a0_0x3b11c6,_0x3276d1=_0xf2b210['opts']();if(!_0x3276d1['format']){if(_0x3276d1[_0x7b0d6c(0x2ec)])_0x3276d1[_0x7b0d6c(0x1e8)]=_0x7b0d6c(0x2ec);else{if(_0x3276d1[_0x7b0d6c(0x2bf)])_0x3276d1[_0x7b0d6c(0x1e8)]=_0x7b0d6c(0x2bf);else _0x3276d1[_0x7b0d6c(0x21f)]&&(_0x3276d1[_0x7b0d6c(0x1e8)]=_0x7b0d6c(0x21f));}}_0x3276d1['in']&&!_0x3276d1[_0x7b0d6c(0x24f)]&&(_0x3276d1[_0x7b0d6c(0x24f)]=_0x3276d1['in']);if(_0x3276d1[_0x7b0d6c(0x200)])_0x3276d1['logLevel']=LogLevel[_0x7b0d6c(0x1db)];else{if(_0x3276d1[_0x7b0d6c(0x2b5)])_0x3276d1[_0x7b0d6c(0x2f2)]=LogLevel[_0x7b0d6c(0x1f6)];else _0x3276d1['logLevel']===undefined&&(_0x3276d1['logLevel']=LogLevel[_0x7b0d6c(0x28a)]);}});function createTDXInstance(_0x3d86f9){const _0x449d9f=a0_0x3b11c6,_0x272ff4=new GlobalContext(_0x3d86f9);_0x272ff4['injectIntoOptions'](_0x3d86f9);const _0x28ff78={'site':_0x272ff4['site'],'apiKey':_0x272ff4[_0x449d9f(0x260)],'logLevel':_0x272ff4['logLevel']};return new TDX(_0x28ff78);}program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x226))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1f2))['action'](async(_0x17868d,_0xfc620)=>{const _0x31a740=a0_0x3b11c6,_0x41dc60=new DatabasesCommand(),_0xd42fe4=program[_0x31a740(0x1c6)](),_0x5d16ad=createTDXInstance(_0xd42fe4),_0x2c811a=await _0x41dc60[_0x31a740(0x27a)]({'options':{..._0xd42fe4,..._0xfc620},'args':_0x17868d?[_0x17868d]:[],'tdx':_0x5d16ad});process[_0x31a740(0x209)](_0x2c811a);}),program['command'](a0_0x3b11c6(0x256))['description']('Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)')['option']('--agent\x20<ref>',a0_0x3b11c6(0x211))[a0_0x3b11c6(0x1d5)]('--model\x20<name>',a0_0x3b11c6(0x202))[a0_0x3b11c6(0x1d5)]('--temperature\x20<n>',a0_0x3b11c6(0x2bc))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x26b),'Start\x20a\x20new\x20chat\x20session')[a0_0x3b11c6(0x276)](async(_0x119a00,_0x1a6f8b)=>{const _0x149a60=a0_0x3b11c6,_0x3c4399=new ChatCommand(),_0xd0d119=program[_0x149a60(0x1c6)](),_0x5e9fef=createTDXInstance(_0xd0d119),_0x1afd69=await _0x3c4399[_0x149a60(0x27a)]({'options':{..._0xd0d119,..._0x1a6f8b},'args':_0x119a00,'tdx':_0x5e9fef});process[_0x149a60(0x209)](_0x1afd69);});const apiCmd=program['command'](a0_0x3b11c6(0x2cc))[a0_0x3b11c6(0x248)](a0_0x3b11c6(0x234))[a0_0x3b11c6(0x1e5)](a0_0x3b11c6(0x274),a0_0x3b11c6(0x1ed))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x229),a0_0x3b11c6(0x2c2),a0_0x3b11c6(0x24e))['option']('--data\x20<data>','Request\x20body\x20as\x20JSON\x20string')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x217),'Read\x20request\x20body\x20from\x20file')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2d8),a0_0x3b11c6(0x26d),(_0x374135,_0x3fba5c)=>{return _0x3fba5c?[..._0x3fba5c,_0x374135]:[_0x374135];})['option'](a0_0x3b11c6(0x237),a0_0x3b11c6(0x1df),'td')[a0_0x3b11c6(0x276)](async(_0x3b271b,_0x4dcf5d)=>{const _0x41fc2d=a0_0x3b11c6;if(!_0x3b271b){apiCmd['help']();return;}const _0x3a6305=new ApiCommand(),_0x35beba=program[_0x41fc2d(0x1c6)](),_0x54305e=createTDXInstance(_0x35beba),_0x108dc5=await _0x3a6305[_0x41fc2d(0x27a)]({'options':{..._0x35beba,..._0x4dcf5d},'args':[_0x3b271b],'tdx':_0x54305e});process['exit'](_0x108dc5);});program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x25c))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1d2))[a0_0x3b11c6(0x1d5)]('-d,\x20--database\x20<database>',a0_0x3b11c6(0x208))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x233),a0_0x3b11c6(0x1f1))[a0_0x3b11c6(0x276)](async(_0x17b268,_0x2c6353)=>{const _0x4fbf28=a0_0x3b11c6,_0x516495=new TablesCommand(),_0x10ba1c=program[_0x4fbf28(0x1c6)](),_0x4328aa=createTDXInstance(_0x10ba1c);_0x2c6353['in']&&(_0x2c6353[_0x4fbf28(0x24f)]=_0x2c6353['in']);const _0x393bab=await _0x516495['run']({'options':{..._0x10ba1c,..._0x2c6353},'args':_0x17b268?[_0x17b268]:[],'tdx':_0x4328aa});process[_0x4fbf28(0x209)](_0x393bab);}),program['command'](a0_0x3b11c6(0x25d))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x20d))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x281),'Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x233),a0_0x3b11c6(0x1f1))[a0_0x3b11c6(0x276)](async(_0x25092d,_0x560dbe)=>{const _0x5823b9=a0_0x3b11c6,_0x2e9e94=new ShowCommand(),_0x37e6dc=program[_0x5823b9(0x1c6)](),_0x784c2c=createTDXInstance(_0x37e6dc);_0x560dbe['in']&&(_0x560dbe[_0x5823b9(0x24f)]=_0x560dbe['in']);const _0x2d875a=await _0x2e9e94[_0x5823b9(0x27a)]({'options':{..._0x37e6dc,..._0x560dbe},'args':_0x25092d?[_0x25092d]:[],'tdx':_0x784c2c});process['exit'](_0x2d875a);}),program[a0_0x3b11c6(0x1d6)]('describe\x20[table]')[a0_0x3b11c6(0x2e5)](a0_0x3b11c6(0x24d))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x241))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x281),a0_0x3b11c6(0x23c))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x233),a0_0x3b11c6(0x1f1))[a0_0x3b11c6(0x276)](async(_0x2c29a2,_0x3d2c75)=>{const _0x1a5b75=a0_0x3b11c6,_0x1d3c98=new DescribeCommand(),_0x17ac0b=program[_0x1a5b75(0x1c6)](),_0x4203fc=createTDXInstance(_0x17ac0b);_0x3d2c75['in']&&(_0x3d2c75[_0x1a5b75(0x24f)]=_0x3d2c75['in']);const _0x1df558=await _0x1d3c98[_0x1a5b75(0x27a)]({'options':{..._0x17ac0b,..._0x3d2c75},'args':_0x2c29a2?[_0x2c29a2]:[],'tdx':_0x4203fc});process[_0x1a5b75(0x209)](_0x1df558);}),program['command']('query\x20[sql]')['description'](a0_0x3b11c6(0x235))['option']('-d,\x20--database\x20<database>','Database\x20to\x20query\x20(default:\x20information_schema)')[a0_0x3b11c6(0x1d5)]('--in\x20<database>',a0_0x3b11c6(0x1f1))['option']('--catalog\x20<catalog>','Trino\x20catalog\x20(default:\x20td)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x217),a0_0x3b11c6(0x230))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2f9),a0_0x3b11c6(0x23f),'40')['action'](async(_0x3f198e,_0x2106bd)=>{const _0x2c731d=a0_0x3b11c6,_0x1c3542=new QueryCommand(),_0x38b8fd=program[_0x2c731d(0x1c6)](),_0x1d6949=createTDXInstance(_0x38b8fd);_0x2106bd['in']&&(_0x2106bd['database']=_0x2106bd['in']);const _0x2ff084=await _0x1c3542['run']({'options':{..._0x38b8fd,..._0x2106bd},'args':_0x3f198e?[_0x3f198e]:[],'tdx':_0x1d6949});process['exit'](_0x2ff084);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x252))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1e1))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x278),a0_0x3b11c6(0x27d))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x246),'Maximum\x20recursion\x20depth\x20(default:\x2010)','10')[a0_0x3b11c6(0x276)](async(_0x54de36,_0x559397)=>{const _0x3a494e=a0_0x3b11c6,_0x204c9d=new SegmentsCommand(),_0x4b8300=program[_0x3a494e(0x1c6)](),_0x104604=createTDXInstance(_0x4b8300),_0x314136=await _0x204c9d['run']({'options':{..._0x4b8300,..._0x559397},'args':_0x54de36?[_0x54de36]:[],'tdx':_0x104604});process['exit'](_0x314136);});const segmentCmd=program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2dc))[a0_0x3b11c6(0x231)]('CDP\x20segment\x20management\x20commands');segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x292))[a0_0x3b11c6(0x231)]('Set\x20current\x20segment/folder\x20context\x20for\x20navigation')[a0_0x3b11c6(0x276)](async(_0x36840c,_0x24a259)=>{const _0x1d8524=a0_0x3b11c6,_0xc1b68=new SegmentUseCommand(),_0x50be35=program[_0x1d8524(0x1c6)](),_0x37b958=createTDXInstance(_0x50be35),_0x1df390=await _0xc1b68[_0x1d8524(0x27a)]({'options':{..._0x50be35,..._0x24a259},'args':[_0x36840c],'tdx':_0x37b958});process[_0x1d8524(0x209)](_0x1df390);}),segmentCmd['command'](a0_0x3b11c6(0x283))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x22c))[a0_0x3b11c6(0x276)](async _0x162796=>{const _0x16585a=a0_0x3b11c6,_0x1a0a99=new SegmentPwdCommand(),_0x231ca0=program['opts'](),_0x27798e=createTDXInstance(_0x231ca0),_0x34f323=await _0x1a0a99[_0x16585a(0x27a)]({'options':{..._0x231ca0,..._0x162796},'args':[],'tdx':_0x27798e});process[_0x16585a(0x209)](_0x34f323);}),segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2cd))['alias']('desc')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1d7))[a0_0x3b11c6(0x276)](async(_0x5bd2e7,_0x20d84d)=>{const _0x525ebb=a0_0x3b11c6,_0x3fb69f=new SegmentDescribeCommand(),_0x6568c6=program['opts'](),_0x859308=createTDXInstance(_0x6568c6),_0x9c4df6=await _0x3fb69f[_0x525ebb(0x27a)]({'options':{..._0x6568c6,..._0x20d84d},'args':[_0x5bd2e7],'tdx':_0x859308});process[_0x525ebb(0x209)](_0x9c4df6);}),segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x277))['description'](a0_0x3b11c6(0x2f5))[a0_0x3b11c6(0x276)](async(_0x5b96e2,_0x46c65b)=>{const _0x4d78ac=a0_0x3b11c6,_0x3650d1=new SegmentShowCommand(),_0xed9024=program[_0x4d78ac(0x1c6)](),_0x37c968=createTDXInstance(_0xed9024),_0x5a31fa=await _0x3650d1[_0x4d78ac(0x27a)]({'options':{..._0xed9024,..._0x46c65b},'args':[_0x5b96e2],'tdx':_0x37c968});process[_0x4d78ac(0x209)](_0x5a31fa);}),segmentCmd['command']('folders\x20<parent_name>')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x219))[a0_0x3b11c6(0x276)](async(_0x2006bc,_0x37e5fb)=>{const _0xd9997e=a0_0x3b11c6,_0x1eb5b=new SegmentFolderListCommand(),_0x42e5a7=program[_0xd9997e(0x1c6)](),_0x4939b3=createTDXInstance(_0x42e5a7),_0x5e23fa=await _0x1eb5b['run']({'options':{..._0x42e5a7,..._0x37e5fb},'args':[_0x2006bc],'tdx':_0x4939b3});process[_0xd9997e(0x209)](_0x5e23fa);});const folderCmd=segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x227))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x210));folderCmd['command']('show\x20<folder_ref>')[a0_0x3b11c6(0x231)]('Show\x20folder\x20details\x20(use\x20parent_name/folder_name)')['action'](async(_0x5d6393,_0x5cca2a)=>{const _0x1879b0=a0_0x3b11c6,_0x250814=new SegmentFolderShowCommand(),_0xcd7811=program[_0x1879b0(0x1c6)](),_0x2cb61b=createTDXInstance(_0xcd7811),_0x1ef1fe=await _0x250814['run']({'options':{..._0xcd7811,..._0x5cca2a},'args':[_0x5d6393],'tdx':_0x2cb61b});process[_0x1879b0(0x209)](_0x1ef1fe);}),segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2be))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2cb))[a0_0x3b11c6(0x276)](async(_0x10a941,_0xa00d7f)=>{const _0x4644a9=a0_0x3b11c6,_0x237c60=new SegmentSQLCommand(),_0x425dad=program[_0x4644a9(0x1c6)](),_0x2a2c37=createTDXInstance(_0x425dad),_0x39c5ab=await _0x237c60['run']({'options':{..._0x425dad,..._0xa00d7f},'args':[_0x10a941],'tdx':_0x2a2c37});process[_0x4644a9(0x209)](_0x39c5ab);}),segmentCmd['command'](a0_0x3b11c6(0x2e2))['description']('List\x20available\x20fields\x20for\x20segmentation')[a0_0x3b11c6(0x276)](async(_0x40a798,_0x55a2f2)=>{const _0x7b6bd3=a0_0x3b11c6,_0x211925=new SegmentFieldsCommand(),_0x154957=program['opts'](),_0x4455cc=createTDXInstance(_0x154957),_0x5a453a=await _0x211925[_0x7b6bd3(0x27a)]({'options':{..._0x154957,..._0x55a2f2},'args':[_0x40a798],'tdx':_0x4455cc});process['exit'](_0x5a453a);}),segmentCmd[a0_0x3b11c6(0x1d6)]('create\x20<segment_name>')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2b3))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x221),a0_0x3b11c6(0x2c3))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x207),a0_0x3b11c6(0x1ca))[a0_0x3b11c6(0x1d5)]('--rule-file\x20<file>',a0_0x3b11c6(0x1c5))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x287),a0_0x3b11c6(0x29c))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x282),a0_0x3b11c6(0x232))[a0_0x3b11c6(0x1d5)]('--invisible',a0_0x3b11c6(0x268))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x25b),'Skip\x20population\x20counting')[a0_0x3b11c6(0x276)](async(_0x5c418f,_0x42c726)=>{const _0x5d2443=a0_0x3b11c6,_0x4eb66f=new SegmentCreateCommand(),_0x41efae=program[_0x5d2443(0x1c6)](),_0x48a190=createTDXInstance(_0x41efae),_0x4ee0fa=await _0x4eb66f['run']({'options':{..._0x41efae,..._0x42c726},'args':[_0x5c418f],'tdx':_0x48a190});process['exit'](_0x4ee0fa);}),segmentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2c1))[a0_0x3b11c6(0x231)]('Update\x20child\x20segment\x20(use\x20parent_name/child_name)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2b7),'New\x20segment\x20name')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x221),a0_0x3b11c6(0x225))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x207),a0_0x3b11c6(0x204))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x269),a0_0x3b11c6(0x1fa))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x287),a0_0x3b11c6(0x23b))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x282),a0_0x3b11c6(0x232))[a0_0x3b11c6(0x276)](async(_0x47bc40,_0x167910)=>{const _0x444fff=a0_0x3b11c6,_0x1322e7=new SegmentUpdateCommand(),_0x87c6bd=program[_0x444fff(0x1c6)](),_0x2b4861=createTDXInstance(_0x87c6bd),_0x4dd5d9=await _0x1322e7['run']({'options':{..._0x87c6bd,..._0x167910},'args':[_0x47bc40],'tdx':_0x2b4861});process['exit'](_0x4dd5d9);});const parentCmd=segmentCmd[a0_0x3b11c6(0x1d6)]('parent')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2d0));parentCmd['command'](a0_0x3b11c6(0x1f4))['description'](a0_0x3b11c6(0x255))['requiredOption'](a0_0x3b11c6(0x2af),a0_0x3b11c6(0x27b))['requiredOption'](a0_0x3b11c6(0x1c0),'Master\x20table\x20name')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x221),a0_0x3b11c6(0x2fd))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1d8),a0_0x3b11c6(0x239))[a0_0x3b11c6(0x1d5)]('--schedule-option\x20<value>',a0_0x3b11c6(0x1c2))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x244),a0_0x3b11c6(0x1ce))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x213),a0_0x3b11c6(0x290))[a0_0x3b11c6(0x1d5)]('--attributes-file\x20<file>',a0_0x3b11c6(0x2e9))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2b9),'Behaviors\x20as\x20JSON\x20string')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1c8),'Behaviors\x20from\x20JSON\x20file')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x249),a0_0x3b11c6(0x2f3))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1e3),a0_0x3b11c6(0x2c9))[a0_0x3b11c6(0x276)](async(_0x15d968,_0x4acb11)=>{const _0x524926=a0_0x3b11c6,_0x47f977=new ParentSegmentCreateCommand(),_0x599a70=program[_0x524926(0x1c6)](),_0x61fb26=createTDXInstance(_0x599a70),_0x345963=await _0x47f977['run']({'options':{..._0x599a70,..._0x4acb11},'args':[_0x15d968],'tdx':_0x61fb26});process[_0x524926(0x209)](_0x345963);}),parentCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2f0))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x24b))[a0_0x3b11c6(0x1d5)]('--description\x20<text>',a0_0x3b11c6(0x225))['option'](a0_0x3b11c6(0x1d8),a0_0x3b11c6(0x29e))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1dd),a0_0x3b11c6(0x2ab))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x244),a0_0x3b11c6(0x1de))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x22f),a0_0x3b11c6(0x1dc))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2fa),a0_0x3b11c6(0x295))['option']('--add-behaviors\x20<json>',a0_0x3b11c6(0x2a6))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x205),'Add\x20behaviors\x20from\x20JSON\x20file')[a0_0x3b11c6(0x276)](async(_0x21f231,_0x29c182)=>{const _0x330ea5=a0_0x3b11c6,_0x2771ec=new ParentSegmentUpdateCommand(),_0x325eb7=program[_0x330ea5(0x1c6)](),_0x350f79=createTDXInstance(_0x325eb7),_0x1d5d87=await _0x2771ec[_0x330ea5(0x27a)]({'options':{..._0x325eb7,..._0x29c182},'args':[_0x21f231],'tdx':_0x350f79});process[_0x330ea5(0x209)](_0x1d5d87);}),folderCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x259))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2cf))['option'](a0_0x3b11c6(0x221),'Folder\x20description')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1d0),a0_0x3b11c6(0x1c4))[a0_0x3b11c6(0x276)](async(_0x157205,_0x58aeea,_0x4ef299)=>{const _0x16acc7=a0_0x3b11c6,_0x46cf16=new SegmentFolderCreateCommand(),_0x2d87a9=program[_0x16acc7(0x1c6)](),_0x483a4f=createTDXInstance(_0x2d87a9),_0x4def0f=await _0x46cf16[_0x16acc7(0x27a)]({'options':{..._0x2d87a9,..._0x4ef299},'args':[_0x157205,_0x58aeea],'tdx':_0x483a4f});process[_0x16acc7(0x209)](_0x4def0f);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x1fd))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x21e))[a0_0x3b11c6(0x276)](async(_0x307dee,_0x101706)=>{const _0x3f4681=a0_0x3b11c6,_0x4302a1=new ActivationsCommand(),_0x566ee5=program[_0x3f4681(0x1c6)](),_0xaf4c56=createTDXInstance(_0x566ee5),_0x388303=await _0x4302a1['run']({'options':{..._0x566ee5,..._0x101706},'args':[_0x307dee],'tdx':_0xaf4c56});process[_0x3f4681(0x209)](_0x388303);});const workflowCmd=program['command']('workflow')[a0_0x3b11c6(0x2e5)]('wf')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x265));workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x240))[a0_0x3b11c6(0x231)]('List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)')[a0_0x3b11c6(0x276)](async(_0x2c22e4,_0x58e788)=>{const _0x5e0937=a0_0x3b11c6,_0x349231=new WorkflowProjectsCommand(),_0x186c7c=program[_0x5e0937(0x1c6)](),_0x580a62=createTDXInstance(_0x186c7c),_0x2724a9=await _0x349231[_0x5e0937(0x27a)]({'options':{..._0x186c7c,..._0x58e788},'args':_0x2c22e4?[_0x2c22e4]:[],'tdx':_0x580a62});process[_0x5e0937(0x209)](_0x2724a9);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2ae))['alias']('ls')[a0_0x3b11c6(0x231)]('List\x20workflows\x20(optionally\x20filtered\x20by\x20project)')[a0_0x3b11c6(0x276)](async(_0x47f75f,_0x4d627f)=>{const _0x500aad=a0_0x3b11c6,_0xf4e447=new WorkflowWorkflowsCommand(),_0x56f018=program[_0x500aad(0x1c6)](),_0x693c4d=createTDXInstance(_0x56f018),_0xbedb38=await _0xf4e447[_0x500aad(0x27a)]({'options':{..._0x56f018,..._0x4d627f},'args':_0x47f75f?[_0x47f75f]:[],'tdx':_0x693c4d});process[_0x500aad(0x209)](_0xbedb38);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x23d))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x27c))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1bd),a0_0x3b11c6(0x275))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1da),a0_0x3b11c6(0x264))['option'](a0_0x3b11c6(0x243),a0_0x3b11c6(0x288))[a0_0x3b11c6(0x276)](async(_0x20b4ef,_0x4cf0db)=>{const _0x158695=a0_0x3b11c6,_0x1045c7=new WorkflowSessionsCommand(),_0x24b73a=program[_0x158695(0x1c6)](),_0x8df03=createTDXInstance(_0x24b73a),_0xf8a5f2=await _0x1045c7[_0x158695(0x27a)]({'options':{..._0x24b73a,..._0x4cf0db},'args':_0x20b4ef?[_0x20b4ef]:[],'tdx':_0x8df03});process[_0x158695(0x209)](_0xf8a5f2);}),workflowCmd[a0_0x3b11c6(0x1d6)]('attempts\x20[project]')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1eb))['option']('--include-retried','Include\x20retried\x20attempts')['action'](async(_0x168b42,_0x2b918e)=>{const _0x29646a=a0_0x3b11c6,_0x1cd5ac=new WorkflowAttemptsCommand(),_0x3da4cc=program[_0x29646a(0x1c6)](),_0x4f394f=createTDXInstance(_0x3da4cc),_0x58480c=await _0x1cd5ac[_0x29646a(0x27a)]({'options':{..._0x3da4cc,..._0x2b918e},'args':_0x168b42?[_0x168b42]:[],'tdx':_0x4f394f});process[_0x29646a(0x209)](_0x58480c);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x21b))[a0_0x3b11c6(0x231)]('Show\x20specific\x20attempt\x20details')[a0_0x3b11c6(0x276)](async(_0x392d66,_0x2407dd)=>{const _0xc2a36e=a0_0x3b11c6,_0x4b0db2=new WorkflowAttemptCommand(),_0x3bce1b=program[_0xc2a36e(0x1c6)](),_0x177a24=createTDXInstance(_0x3bce1b),_0x21c65d=await _0x4b0db2[_0xc2a36e(0x27a)]({'options':{..._0x3bce1b,..._0x2407dd},'args':[_0x392d66],'tdx':_0x177a24});process['exit'](_0x21c65d);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x22b))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x267))['option']('--include-subtasks',a0_0x3b11c6(0x2a8))[a0_0x3b11c6(0x276)](async(_0x2a4a06,_0x2ac164)=>{const _0x5d676b=a0_0x3b11c6,_0x33f380=new WorkflowTasksCommand(),_0x308119=program[_0x5d676b(0x1c6)](),_0x235127=createTDXInstance(_0x308119),_0x30fdff=await _0x33f380[_0x5d676b(0x27a)]({'options':{..._0x308119,..._0x2ac164},'args':[_0x2a4a06],'tdx':_0x235127});process['exit'](_0x30fdff);}),workflowCmd[a0_0x3b11c6(0x1d6)]('logs\x20<attempt-id>\x20<task-name>')['description'](a0_0x3b11c6(0x266))['option'](a0_0x3b11c6(0x2a7),a0_0x3b11c6(0x23a),_0x148007=>parseInt(_0x148007,0xa),0x0)[a0_0x3b11c6(0x276)](async(_0x213f4f,_0x277962,_0x5bd58f)=>{const _0x2bfb2b=a0_0x3b11c6,_0x3ffd6e=new WorkflowLogsCommand(),_0x4f100f=program[_0x2bfb2b(0x1c6)](),_0x146b24=createTDXInstance(_0x4f100f),_0x1bd1c3=await _0x3ffd6e[_0x2bfb2b(0x27a)]({'options':{..._0x4f100f,..._0x5bd58f},'args':[_0x213f4f,_0x277962],'tdx':_0x146b24});process[_0x2bfb2b(0x209)](_0x1bd1c3);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2ac))['description']('Kill\x20a\x20running\x20attempt')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x28b),a0_0x3b11c6(0x242))['action'](async(_0x33a760,_0x2a0c2f)=>{const _0x449188=a0_0x3b11c6,_0x5780ab=new WorkflowKillCommand(),_0x5cbc18=program['opts'](),_0x12dff6=createTDXInstance(_0x5cbc18),_0x10c619=await _0x5780ab[_0x449188(0x27a)]({'options':{..._0x5cbc18,..._0x2a0c2f},'args':[_0x33a760],'tdx':_0x12dff6});process[_0x449188(0x209)](_0x10c619);}),workflowCmd['command'](a0_0x3b11c6(0x29f))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1cb))['option'](a0_0x3b11c6(0x28f),a0_0x3b11c6(0x245))['option'](a0_0x3b11c6(0x2d6),a0_0x3b11c6(0x2ed))[a0_0x3b11c6(0x1d5)]('--params\x20<json>',a0_0x3b11c6(0x24a))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1ff),a0_0x3b11c6(0x1c3))[a0_0x3b11c6(0x276)](async(_0x1956c1,_0x3088b2)=>{const _0x261257=a0_0x3b11c6,_0x2b5805=new WorkflowRetryCommand(),_0x2bdfaa=program[_0x261257(0x1c6)](),_0x362793=createTDXInstance(_0x2bdfaa),_0x431c4e=await _0x2b5805[_0x261257(0x27a)]({'options':{..._0x2bdfaa,..._0x3088b2},'args':[_0x1956c1],'tdx':_0x362793});process[_0x261257(0x209)](_0x431c4e);}),workflowCmd[a0_0x3b11c6(0x1d6)]('download\x20<project-name>\x20[output-dir]')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x298))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2e3),a0_0x3b11c6(0x2da))[a0_0x3b11c6(0x276)](async(_0x2bc4b0,_0x148479,_0x243b40)=>{const _0x160dad=a0_0x3b11c6,_0x582713=new WorkflowDownloadCommand(),_0x4fbe8b=program['opts'](),_0x4d0865=createTDXInstance(_0x4fbe8b),_0x51f7d6=await _0x582713[_0x160dad(0x27a)]({'options':{..._0x4fbe8b,..._0x243b40},'args':[_0x2bc4b0,_0x148479||'.'],'tdx':_0x4d0865});process[_0x160dad(0x209)](_0x51f7d6);}),workflowCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2d3))[a0_0x3b11c6(0x231)]('Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2ee),a0_0x3b11c6(0x1d1))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2e3),a0_0x3b11c6(0x2d7))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2e8),'Skip\x20validation\x20of\x20.dig\x20files')['action'](async(_0x1edaac,_0x172fb0)=>{const _0x5039f9=a0_0x3b11c6,_0x2e6829=new WorkflowPushCommand(),_0x19cd04=program['opts'](),_0x111e0d=createTDXInstance(_0x19cd04),_0x3b41b1=await _0x2e6829[_0x5039f9(0x27a)]({'options':{..._0x19cd04,..._0x172fb0},'args':_0x1edaac?[_0x1edaac]:[],'tdx':_0x111e0d});process[_0x5039f9(0x209)](_0x3b41b1);}),workflowCmd['command']('delete\x20<project-name-or-id>')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x258))[a0_0x3b11c6(0x276)](async(_0x43aaa8,_0xcdb7b2)=>{const _0x12320e=a0_0x3b11c6,_0x55c5ec=new WorkflowDeleteCommand(),_0x3f1a8d=program[_0x12320e(0x1c6)](),_0x48bb0c=createTDXInstance(_0x3f1a8d),_0x3aa686=await _0x55c5ec['run']({'options':{..._0x3f1a8d,..._0xcdb7b2},'args':[_0x43aaa8],'tdx':_0x48bb0c});process['exit'](_0x3aa686);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2ad))['description'](a0_0x3b11c6(0x1d4))['option'](a0_0x3b11c6(0x1bd),a0_0x3b11c6(0x2fe))['action'](async _0x479c1c=>{const _0x1769d4=a0_0x3b11c6,_0x242c24=new JobListCommand(),_0x505d12=program[_0x1769d4(0x1c6)](),_0x1812fd=createTDXInstance(_0x505d12),_0xfafe70=await _0x242c24[_0x1769d4(0x27a)]({'options':{..._0x505d12,..._0x479c1c},'args':[],'tdx':_0x1812fd});process[_0x1769d4(0x209)](_0xfafe70);});const jobCmd=program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2a4))['description'](a0_0x3b11c6(0x1fe));jobCmd['command'](a0_0x3b11c6(0x1c1))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2f1))[a0_0x3b11c6(0x276)](async(_0x53a102,_0x32869f)=>{const _0x564810=a0_0x3b11c6,_0x201f1e=new JobShowCommand(),_0x52aa1a=program[_0x564810(0x1c6)](),_0x3de2f7=createTDXInstance(_0x52aa1a),_0x5edb21=await _0x201f1e[_0x564810(0x27a)]({'options':{..._0x52aa1a,..._0x32869f},'args':[_0x53a102],'tdx':_0x3de2f7});process[_0x564810(0x209)](_0x5edb21);}),jobCmd['command'](a0_0x3b11c6(0x215))['description'](a0_0x3b11c6(0x286))[a0_0x3b11c6(0x276)](async(_0x3e2830,_0x3db2e3)=>{const _0x488382=a0_0x3b11c6,_0x369410=new JobKillCommand(),_0xbba052=program[_0x488382(0x1c6)](),_0x4e5a11=createTDXInstance(_0xbba052),_0x5d654b=await _0x369410[_0x488382(0x27a)]({'options':{..._0xbba052,..._0x3db2e3},'args':[_0x3e2830],'tdx':_0x4e5a11});process['exit'](_0x5d654b);}),jobCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2f4))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2e0))[a0_0x3b11c6(0x1d5)]('--job-type\x20<type>','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)',a0_0x3b11c6(0x203))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x217),a0_0x3b11c6(0x28e))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x25f),a0_0x3b11c6(0x1e7),a0_0x3b11c6(0x2a0))[a0_0x3b11c6(0x276)](async(_0xd60514,_0x22be80)=>{const _0x31f8ef=a0_0x3b11c6,_0x4c40b4=new JobSubmitCommand(),_0x43d49a=program[_0x31f8ef(0x1c6)](),_0x1ff00d=createTDXInstance(_0x43d49a),_0x36ec18=await _0x4c40b4[_0x31f8ef(0x27a)]({'options':{..._0x43d49a,..._0x22be80},'args':_0xd60514?[_0xd60514]:[],'tdx':_0x1ff00d});process[_0x31f8ef(0x209)](_0x36ec18);}),jobCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x1fb))[a0_0x3b11c6(0x231)]('Get\x20job\x20results')[a0_0x3b11c6(0x276)](async(_0x32eb57,_0x26dd09)=>{const _0x179db6=a0_0x3b11c6,_0x5d3c55=new JobResultCommand(),_0xaebf28=program[_0x179db6(0x1c6)](),_0x8c8ab3=createTDXInstance(_0xaebf28),_0xa54083=await _0x5d3c55[_0x179db6(0x27a)]({'options':{..._0xaebf28,..._0x26dd09},'args':[_0x32eb57],'tdx':_0x8c8ab3});process['exit'](_0xa54083);});const llmCmd=program['command'](a0_0x3b11c6(0x206))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x20c));llmCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x22e))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2ef))[a0_0x3b11c6(0x276)](async(_0x286a8f,_0x1ce44a)=>{const _0x492118=a0_0x3b11c6,_0x3af85c=new LLMUseCommand(),_0xe24483=program[_0x492118(0x1c6)](),_0x34429b=createTDXInstance(_0xe24483),_0x3a6479=await _0x3af85c[_0x492118(0x27a)]({'options':{..._0xe24483,..._0x1ce44a},'args':[_0x286a8f],'tdx':_0x34429b});process[_0x492118(0x209)](_0x3a6479);}),llmCmd['command']('models')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x296))[a0_0x3b11c6(0x276)](async _0x217b83=>{const _0x155885=a0_0x3b11c6,_0x47206e=new LLMModelsCommand(),_0x59e56c=program['opts'](),_0x402746=createTDXInstance(_0x59e56c),_0x784bc4=await _0x47206e[_0x155885(0x27a)]({'options':{..._0x59e56c,..._0x217b83},'args':[],'tdx':_0x402746});process[_0x155885(0x209)](_0x784bc4);}),llmCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x240))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2f7))[a0_0x3b11c6(0x276)](async(_0x28afbe,_0x4258f9)=>{const _0x171eef=a0_0x3b11c6,_0x34d11d=new LLMProjectsCommand(),_0x4ba5d4=program['opts'](),_0x52a433=createTDXInstance(_0x4ba5d4),_0x584b77=await _0x34d11d[_0x171eef(0x27a)]({'options':{..._0x4ba5d4,..._0x4258f9},'args':_0x28afbe?[_0x28afbe]:[],'tdx':_0x52a433});process[_0x171eef(0x209)](_0x584b77);});function a0_0x2b7a(_0x1b67b9,_0x1ae7d4){const _0x58f008=a0_0x58f0();return a0_0x2b7a=function(_0x2b7a79,_0x184c1c){_0x2b7a79=_0x2b7a79-0x1bb;let _0x50c7cc=_0x58f008[_0x2b7a79];return _0x50c7cc;},a0_0x2b7a(_0x1b67b9,_0x1ae7d4);}const projectCmd=llmCmd['command'](a0_0x3b11c6(0x1cd))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2d4));projectCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x1f4))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x250))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x221),a0_0x3b11c6(0x2bb))['action'](async(_0x18e5f4,_0x4ab70c)=>{const _0xe8d7d8=a0_0x3b11c6,_0x5c468d=new LLMProjectCreateCommand(),_0x36d2b1=program[_0xe8d7d8(0x1c6)](),_0x9533d2=createTDXInstance(_0x36d2b1),_0x14a4b1=await _0x5c468d[_0xe8d7d8(0x27a)]({'options':{..._0x36d2b1,..._0x4ab70c},'args':[_0x18e5f4],'tdx':_0x9533d2});process['exit'](_0x14a4b1);}),projectCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x218))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x254))['action'](async(_0x2bdb9b,_0x3f3bae)=>{const _0x129b66=a0_0x3b11c6,_0x3d66c1=new LLMProjectDeleteCommand(),_0x247df4=program[_0x129b66(0x1c6)](),_0x6ca4a4=createTDXInstance(_0x247df4),_0x3f0490=await _0x3d66c1[_0x129b66(0x27a)]({'options':{..._0x247df4,..._0x3f3bae},'args':[_0x2bdb9b],'tdx':_0x6ca4a4});process['exit'](_0x3f0490);}),llmCmd[a0_0x3b11c6(0x1d6)]('agents\x20[pattern]')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x27e))[a0_0x3b11c6(0x276)](async(_0x407a57,_0x1183d4)=>{const _0x57f7fe=a0_0x3b11c6,_0x24fc87=new LLMAgentsCommand(),_0x1014db=program[_0x57f7fe(0x1c6)](),_0x26e26a=createTDXInstance(_0x1014db),_0x4f904a=await _0x24fc87[_0x57f7fe(0x27a)]({'options':{..._0x1014db,..._0x1183d4},'args':_0x407a57?[_0x407a57]:[],'tdx':_0x26e26a});process['exit'](_0x4f904a);});const agentCmd=llmCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2d1))['description']('LLM\x20agent\x20management');agentCmd[a0_0x3b11c6(0x1d6)]('show\x20<agent-name>')['description']('Show\x20agent\x20details')[a0_0x3b11c6(0x276)](async(_0x5dea41,_0x5b5e37)=>{const _0x114550=a0_0x3b11c6,_0x2015fd=new LLMAgentShowCommand(),_0x1151d7=program[_0x114550(0x1c6)](),_0x2e4e1a=createTDXInstance(_0x1151d7),_0x3bea95=await _0x2015fd[_0x114550(0x27a)]({'options':{..._0x1151d7,..._0x5b5e37},'args':[_0x5dea41],'tdx':_0x2e4e1a});process[_0x114550(0x209)](_0x3bea95);}),agentCmd['command'](a0_0x3b11c6(0x1f4))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1cf))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x24c),'System\x20prompt/instructions\x20(default:\x20empty)')[a0_0x3b11c6(0x1d5)]('--model\x20<name>',a0_0x3b11c6(0x1cc),a0_0x3b11c6(0x21a))[a0_0x3b11c6(0x1d5)]('--starter-message\x20<text>',a0_0x3b11c6(0x1e9))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1e4),'Maximum\x20tool\x20iterations\x20(default:\x204)','4')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2a1),'Temperature\x20(0.0-2.0,\x20default:\x200.7)',a0_0x3b11c6(0x2ba))[a0_0x3b11c6(0x276)](async(_0x14f718,_0x1a3087)=>{const _0x57edd7=a0_0x3b11c6,_0x1fd0b4=new LLMAgentCreateCommand(),_0x31337d=program['opts'](),_0x32d575=createTDXInstance(_0x31337d),_0x6ce230=await _0x1fd0b4['run']({'options':{..._0x31337d,..._0x1a3087},'args':[_0x14f718],'tdx':_0x32d575});process[_0x57edd7(0x209)](_0x6ce230);}),agentCmd[a0_0x3b11c6(0x1d6)]('update\x20<agent-name>')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1f8))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x294),a0_0x3b11c6(0x2aa))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x214),'Agent\x20prompt/instructions')['option'](a0_0x3b11c6(0x221),'Agent\x20description')[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x29a),a0_0x3b11c6(0x1e9))['action'](async(_0x196bc5,_0xed6a63)=>{const _0x24bb4b=a0_0x3b11c6,_0x3d4e5f=new LLMAgentUpdateCommand(),_0x27fe3e=program['opts'](),_0x4531fc=createTDXInstance(_0x27fe3e),_0x81bfaa=await _0x3d4e5f[_0x24bb4b(0x27a)]({'options':{..._0x27fe3e,..._0xed6a63},'args':[_0x196bc5],'tdx':_0x4531fc});process[_0x24bb4b(0x209)](_0x81bfaa);}),agentCmd[a0_0x3b11c6(0x1d6)]('delete\x20<agent-name>')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2a5))[a0_0x3b11c6(0x276)](async(_0x36a264,_0x25c904)=>{const _0x539353=a0_0x3b11c6,_0x415308=new LLMAgentDeleteCommand(),_0x53713b=program[_0x539353(0x1c6)](),_0x1d0905=createTDXInstance(_0x53713b),_0x94cf69=await _0x415308[_0x539353(0x27a)]({'options':{..._0x53713b,..._0x25c904},'args':[_0x36a264],'tdx':_0x1d0905});process[_0x539353(0x209)](_0x94cf69);}),llmCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2ea))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x2e6))[a0_0x3b11c6(0x1d5)]('--last','Show\x20history\x20of\x20the\x20most\x20recent\x20chat\x20session')[a0_0x3b11c6(0x276)](async(_0x4705af,_0x5bcb12)=>{const _0x4697d2=a0_0x3b11c6,_0x24ed02=new LLMHistoryCommand(),_0x38082b=program[_0x4697d2(0x1c6)](),_0x31a9f7=createTDXInstance(_0x38082b),_0x54de38=await _0x24ed02[_0x4697d2(0x27a)]({'options':{..._0x38082b,..._0x5bcb12},'args':_0x4705af?[_0x4705af]:[],'tdx':_0x31a9f7});process[_0x4697d2(0x209)](_0x54de38);}),llmCmd[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2bd))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x291))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x263),a0_0x3b11c6(0x2f6),a0_0x3b11c6(0x223))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x2de),a0_0x3b11c6(0x1c7))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x28c),'Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)')['action'](async _0x520e16=>{const _0x585998=a0_0x3b11c6,_0x11ffdd=new LLMProxyCommand(),_0x27787c=program['opts'](),_0x219b3b=createTDXInstance(_0x27787c),_0x5261ff={..._0x520e16,'port':_0x520e16[_0x585998(0x2e4)]?parseInt(_0x520e16[_0x585998(0x2e4)],0xa):undefined},_0x4ec02a=await _0x11ffdd[_0x585998(0x27a)]({'options':{..._0x27787c,..._0x5261ff},'args':[],'tdx':_0x219b3b});process[_0x585998(0x209)](_0x4ec02a);}),program[a0_0x3b11c6(0x1d6)]('claude\x20[args...]')[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1e2))[a0_0x3b11c6(0x1d5)](a0_0x3b11c6(0x1d9),'Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','sonnet')[a0_0x3b11c6(0x2c6)]()['allowExcessArguments'](!![])[a0_0x3b11c6(0x276)](async(_0xec1292,_0x1bf87c)=>{const _0x3545e1=a0_0x3b11c6,_0x54a876=new ClaudeCommand(),_0x34fa66=program[_0x3545e1(0x1c6)](),_0x4c11b2=createTDXInstance(_0x34fa66),_0xa48fa6=Array['isArray'](_0xec1292)?_0xec1292:[],_0x4559ca=await _0x54a876[_0x3545e1(0x27a)]({'options':{..._0x34fa66,..._0x1bf87c},'args':_0xa48fa6,'tdx':_0x4c11b2});process[_0x3545e1(0x209)](_0x4559ca);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x1be))[a0_0x3b11c6(0x231)](a0_0x3b11c6(0x1f0))[a0_0x3b11c6(0x1d5)]('--clear',a0_0x3b11c6(0x2c4))['action'](async _0x584502=>{const _0x21ded3=new ContextCommand(),_0x26af6a=program['opts'](),_0xaa9cf5=await _0x21ded3['run']({'options':{..._0x26af6a,..._0x584502},'args':[],'tdx':null});process['exit'](_0xaa9cf5);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x251))[a0_0x3b11c6(0x231)]('Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)')['action'](async(_0x39e3cb,_0x3151a7,_0x2ea543)=>{const _0x3c091a=a0_0x3b11c6,_0x318d58=new UseCommand(),_0x2c528a=program[_0x3c091a(0x1c6)](),_0x1c5a36=[];if(_0x39e3cb)_0x1c5a36['push'](_0x39e3cb);if(_0x3151a7)_0x1c5a36['push'](_0x3151a7);const _0x2347b5=await _0x318d58[_0x3c091a(0x27a)]({'options':{..._0x2c528a,..._0x2ea543},'args':_0x1c5a36,'tdx':null});process[_0x3c091a(0x209)](_0x2347b5);}),program[a0_0x3b11c6(0x1d6)](a0_0x3b11c6(0x2b2))[a0_0x3b11c6(0x231)]('List\x20all\x20available\x20profiles')['action'](async _0x1422d1=>{const _0x9cb758=a0_0x3b11c6,_0x34f283=new ProfilesCommand(),_0x2bff9d=program['opts'](),_0x5dca2f=await _0x34f283['run']({'options':{..._0x2bff9d,..._0x1422d1},'args':[],'tdx':null});process[_0x9cb758(0x209)](_0x5dca2f);}),program[a0_0x3b11c6(0x228)](process[a0_0x3b11c6(0x299)]);!process[a0_0x3b11c6(0x299)]['slice'](0x2)[a0_0x3b11c6(0x26a)]&&program['outputHelp']();const currentVersion=packageJson[a0_0x3b11c6(0x253)];process[a0_0x3b11c6(0x2a2)][a0_0x3b11c6(0x2d2)]&&process['argv'][a0_0x3b11c6(0x26a)]>0x2&&!currentVersion['includes'](a0_0x3b11c6(0x238))&&checkForUpdate(currentVersion)[a0_0x3b11c6(0x272)](_0x500bde=>{_0x500bde&&displayUpdateNotification(_0x500bde);})[a0_0x3b11c6(0x1f3)](()=>{});
2
+ function a0_0xc07a(_0x2033a5,_0x17578e){const _0x278895=a0_0x2788();return a0_0xc07a=function(_0xc07afc,_0xaaf4ed){_0xc07afc=_0xc07afc-0xb9;let _0x4e8226=_0x278895[_0xc07afc];return _0x4e8226;},a0_0xc07a(_0x2033a5,_0x17578e);}const a0_0x379b23=a0_0xc07a;(function(_0x30eaca,_0x3d6704){const _0x20cc15=a0_0xc07a,_0x5b4472=_0x30eaca();while(!![]){try{const _0x54a971=-parseInt(_0x20cc15(0x1dc))/0x1+-parseInt(_0x20cc15(0x1bc))/0x2*(parseInt(_0x20cc15(0x1a9))/0x3)+-parseInt(_0x20cc15(0x11f))/0x4+parseInt(_0x20cc15(0x1b7))/0x5*(parseInt(_0x20cc15(0x1f0))/0x6)+parseInt(_0x20cc15(0x180))/0x7+parseInt(_0x20cc15(0x14a))/0x8*(parseInt(_0x20cc15(0x12b))/0x9)+parseInt(_0x20cc15(0x186))/0xa*(parseInt(_0x20cc15(0x1b8))/0xb);if(_0x54a971===_0x3d6704)break;else _0x5b4472['push'](_0x5b4472['shift']());}catch(_0x2c8a70){_0x5b4472['push'](_0x5b4472['shift']());}}}(a0_0x2788,0x93771));import{Command}from'commander';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{TDX}from'./sdk/index.js';import{GlobalContext}from'./core/global-context.js';import{LogLevel}from'./utils/tdx-logger.js';import{QueryCommand}from'./commands/query-command.js';import{ChatCommand}from'./commands/chat-command.js';import{ApiCommand}from'./commands/api-command.js';import{DatabasesCommand}from'./commands/databases.js';import{TablesCommand}from'./commands/tables.js';import{SegmentsCommand}from'./commands/segments.js';import{ActivationsCommand}from'./commands/activations.js';import{ShowCommand}from'./commands/show.js';import{DescribeCommand}from'./commands/describe.js';import{SegmentDescribeCommand,SegmentShowCommand,SegmentFolderListCommand,SegmentFolderShowCommand,SegmentSQLCommand,SegmentFolderCreateCommand}from'./commands/segment-command.js';import{SegmentFieldsCommand}from'./commands/segment-fields-command.js';import{ParentSegmentCreateCommand,ParentSegmentUpdateCommand}from'./commands/parent-segment-command.js';import{SegmentCreateCommand}from'./commands/segment-create-command.js';import{SegmentUpdateCommand}from'./commands/segment-update-command.js';import{SegmentUseCommand}from'./commands/segment-use-command.js';import{SegmentPwdCommand}from'./commands/segment-pwd-command.js';import{WorkflowProjectsCommand,WorkflowWorkflowsCommand,WorkflowSessionsCommand,WorkflowAttemptsCommand,WorkflowAttemptCommand,WorkflowTasksCommand,WorkflowLogsCommand,WorkflowKillCommand,WorkflowRetryCommand,WorkflowDownloadCommand,WorkflowPushCommand,WorkflowDeleteCommand}from'./commands/workflow-command.js';import{JobListCommand,JobShowCommand,JobKillCommand,JobSubmitCommand,JobResultCommand}from'./commands/job-command.js';import{LLMModelsCommand,LLMProjectsCommand,LLMAgentsCommand,LLMAgentShowCommand,LLMAgentCreateCommand,LLMAgentUpdateCommand,LLMAgentDeleteCommand,LLMHistoryCommand,LLMUseCommand,LLMProjectCreateCommand,LLMProjectDeleteCommand}from'./commands/llm-command.js';function a0_0x2788(){const _0x1713dc=['isArray','Create\x20a\x20new\x20agent\x20in\x20current\x20project','List\x20folders\x20and\x20segments\x20at\x20path\x20or\x20in\x20current\x20context','Update\x20child\x20segment\x20(use\x20parent_name/child_name)','Updated\x20filtering\x20rule\x20from\x20JSON\x20file','summary','show\x20<folder_ref>','--version','configureHelp','Starter\x20message','sql\x20<segment_name>','CDP\x20segment\x20management\x20commands','Override\x20project\x20name','submit\x20[query]','Show\x20job\x20details','--tsv','Parent\x20folder\x20name\x20for\x20nested\x20folders','15726GsQCpR','show\x20<job-id>','Segment\x20description','--max-depth\x20<depth>','Trino\x20catalog\x20(default:\x20td)','retry\x20<session-id|attempt-id>','Include\x20subtasks\x20in\x20the\x20output','Updated\x20timezone','Model\x20type\x20(default:\x20claude-4.5-sonnet)','api\x20[endpoint]','then','allowUnknownOption','--new','after','--attributes\x20<json>','List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)','opts','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','argv','--parent-segment\x20<name>','history\x20[chat-id]','Options:','Show\x20current\x20segment/folder\x20context','Usage:\x20','Temperature\x20(0.0-2.0,\x20default:\x200.7)','-H,\x20--header\x20<header>','--format\x20<format>','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy\x20(use\x20--\x20to\x20pass\x20options\x20to\x20Claude\x20Code)','action','json','.dev','-y,\x20--yes','Reason\x20for\x20killing\x20the\x20attempt','delete\x20<name>','Kill\x20a\x20running\x20attempt','information_schema','injectIntoOptions','argumentDescription','Start\x20a\x20new\x20chat\x20session','Describe\x20table\x20schema','--json','--type\x20<api_type>','download\x20<project-name>\x20[output-dir]','--folder\x20<name>','logs\x20<attempt-id>\x20<task-name>','tsv','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','description','gitRevision','logLevel','Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','-v,\x20--verbose','debug','LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','Behaviors\x20as\x20JSON\x20string','LLM\x20project\x20to\x20use\x20(overrides\x20context)','Set\x20operation\x20timeout\x20in\x20seconds','--timeout\x20<seconds>','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','Start\x20time\x20filter\x20(ISO\x208601\x20format)','--behaviors-file\x20<file>','parse','-r,\x20--recursive','projects\x20[pattern]','alias','exit','site','0.7','requiredOption','--port\x20<number>','--force','agents\x20[pattern]','includes','List\x20available\x20fields\x20for\x20segmentation','preAction','Enable\x20debug\x20logging\x20(shows\x20HTTP\x20requests/responses)','--session\x20<id>','Maximum\x20recursion\x20depth\x20(default:\x2010)','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)','llm','kill\x20<attempt-id>','--output\x20<file>','--customer-group\x20<json>','--no-color','parent','List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)','utf-8','Database\x20to\x20query\x20(default:\x20information_schema)','pwd','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Parent\x20segment\x20(audience)\x20management','Agent\x20prompt/instructions','subcommandDescription','Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)','../package.json','jsonl','--rule\x20<json>','update\x20<segment_name>','Starting\x20offset\x20for\x20logs\x20(default:\x200)','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','sessions\x20[project]','optionDescription','INFO','--name\x20<new_name>','--trace','Submit\x20a\x20job','describe\x20<segment_name>','--limit\x20<rows>','sonnet','--starter-message\x20<text>','TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02;\x20aliases:\x20us,\x20jp,\x20aws)','--rule-file\x20<file>','1620240idSfAi','--add-attributes\x20<json>','Profile\x20to\x20use\x20(overrides\x20active\x20profile)','LLM\x20agent\x20management','-f,\x20--file\x20<path>','us01','Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)','Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','filter','\x0aExamples:\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/list\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/show/mydb\x0a\x20\x20$\x20tdx\x20api\x20-X\x20POST\x20--data\x20\x27{\x22query\x22:\x22SELECT\x201\x22}\x27\x20/v3/job/issue/hive/mydb\x0a\x20\x20$\x20tdx\x20api\x20/entities/parent_segments\x20--type\x20cdp\x0a\x20\x20$\x20tdx\x20api\x20/api/workflows\x20--type\x20workflow\x0a','Show\x20folder\x20details\x20(use\x20parent_name/folder_name)','983448CcKFNd','database','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Clear\x20session\x20context','attempts\x20[project]','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','GET','Create\x20a\x20new\x20LLM\x20project','-d,\x20--database\x20<database>','delete\x20<project-name-or-id>','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','--add-attributes-file\x20<file>','Updated\x20schedule\x20option','Kill\x20a\x20job','optionTerm','--agent\x20<ref>','option','url','push','--database\x20<db>','List\x20available\x20LLM\x20models','slice','--temperature\x20<n>','run','jobs','--description\x20<text>','--skip-validation','Run\x20Trino\x20query\x20with\x20streaming\x20results','port','--agent\x20<name>','Add\x20attributes\x20as\x20JSON\x20string','16eJsEGF','--revision\x20<revision>','create\x20<segment_name>','--to\x20<timestamp>','List\x20jobs','Maximum\x20number\x20of\x20items\x20to\x20return\x20(default\x20varies\x20by\x20command)','Show\x20agent\x20details','LLM\x20project\x20management','End\x20time\x20filter\x20(ISO\x208601\x20format)','Database\x20name\x20(default:\x20information_schema)','segment','Revision\x20name\x20(default:\x20timestamp)','--last','--include-subtasks','Filtering\x20rule\x20as\x20JSON\x20string','Specific\x20revision\x20to\x20download\x20(default:\x20latest)','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage','Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)','addHelpText','repeat','join','--dry-run','--parent-folder\x20<name>','command','--catalog\x20<catalog>','--color','models','apiKey','length','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','--data\x20<data>',',\x20version\x20','Add\x20behaviors\x20from\x20JSON\x20file','workflow','--from\x20<timestamp>','create\x20<parent_name>\x20<folder_name>','subcommandTerm','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','workflows\x20[project]','--schedule-type\x20<type>','databases\x20[pattern]','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','List\x20recursively\x20(show\x20full\x20hierarchy\x20tree)','allowExcessArguments','--offset\x20<number>','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','claude\x20[args...]','Include\x20retried\x20attempts','stderr','tdx','map','Maximum\x20tool\x20iterations\x20(default:\x204)','kill\x20<job-id>','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration\x20(use\x20global\x20--debug/--trace\x20for\x20logging)','4883809Fdjxlu','--model\x20<name>','result\x20<job-id>','Update\x20parent\x20segment\x20(audience)','commandDescription','desc','10bvgDVw','--project\x20<name>','--prompt\x20<text>','Skip\x20population\x20counting','padWidth','commands','describe\x20[table]','Master\x20table\x20name','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','Show\x20logs\x20for\x20a\x20specific\x20task','Updated\x20filtering\x20rule\x20as\x20JSON\x20string','version','--no-count-population','format','Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)','show\x20[table]','--add-behaviors-file\x20<file>','4000','create\x20<name>','Parent\x20segment\x20to\x20use\x20(overrides\x20context)','use\x20<project-name>','Enable\x20trace\x20logging\x20(ultra-verbose,\x20all\x20internal\x20operations)','Enable\x20verbose\x20logging','Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','--kind\x20<type>','Attributes\x20as\x20JSON\x20string','Workflow\x20(Digdag)\x20management\x20commands','--in\x20<name>','--schedule-option\x20<value>','--invisible','--from-task\x20<task>','Folder\x20description','Behaviors\x20from\x20JSON\x20file','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','query\x20[sql]','33657XKQcil','Agent\x20name','registeredArguments','show\x20<agent-name>','Filtering\x20rule\x20from\x20JSON\x20file','tdx\x20','--jsonl','--clear','--name\x20<text>','tasks\x20<attempt-id>','claude-4.5-sonnet','update\x20<name>','Read\x20SQL\x20query\x20from\x20file','Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','1010ukNNID','13076877KnXgXC','--in\x20<database>','Segment\x20folder\x20management','job','182FPrmYE','-X,\x20--method\x20<method>','isTTY','push\x20[project-name-or-dir]','--status\x20<status>','List\x20all\x20available\x20profiles','Show\x20tasks\x20for\x20an\x20attempt','Alias\x20for\x20--database\x20(natural\x20language\x20style)','Commands:','Customer\x20group\x20as\x20JSON\x20string','attempt\x20<attempt-id>','log','folders\x20<parent_name>','commandUsage','Create\x20parent\x20segment\x20(audience)','trino','--table\x20<table>','--customer-group-file\x20<file>','name','hook','--timezone\x20<tz>','Make\x20segment\x20invisible\x20(default:\x20visible)','New\x20segment\x20name','argumentTerm','fields\x20<parent_name>','System\x20prompt/instructions\x20(default:\x20empty)','Updated\x20description','help','padEnd','Get\x20job\x20results','AI-native\x20CLI\x20for\x20Treasure\x20Data','update\x20<agent-name>','604474zQVJUI','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)'];a0_0x2788=function(){return _0x1713dc;};return a0_0x2788();}import{LLMProxyCommand}from'./commands/llm-proxy.js';import{ClaudeCommand}from'./commands/claude-command.js';import{ContextCommand}from'./commands/context-command.js';import{UseCommand}from'./commands/use-command.js';import{ProfilesCommand}from'./commands/profiles-command.js';import{checkForUpdate,displayUpdateNotification}from'./utils/version-check.js';const __filename=fileURLToPath(import.meta[a0_0x379b23(0x13c)]),__dirname=dirname(__filename),packageJson=JSON[a0_0x379b23(0xea)](readFileSync(join(__dirname,a0_0x379b23(0x10b)),a0_0x379b23(0x103)));let buildInfo={};try{buildInfo=JSON['parse'](readFileSync(join(__dirname,'build-info.json'),a0_0x379b23(0x103)));}catch{}if(process[a0_0x379b23(0xbf)][a0_0x379b23(0xf5)](a0_0x379b23(0x1e6))){let versionOutput=a0_0x379b23(0x1ae)+packageJson['version'];buildInfo[a0_0x379b23(0xdd)]&&(versionOutput+='\x20('+buildInfo[a0_0x379b23(0xdd)]+')'),buildInfo['buildTime']&&(versionOutput+='\x20-\x20built\x20'+buildInfo['buildTime']),console[a0_0x379b23(0x1c7)](versionOutput),process[a0_0x379b23(0xee)](0x0);}const program=new Command();let description=a0_0x379b23(0x1da);buildInfo['gitRevision']?description+=a0_0x379b23(0x169)+packageJson['version']+'\x20('+buildInfo[a0_0x379b23(0xdd)]+')':description+=a0_0x379b23(0x169)+packageJson['version'];program[a0_0x379b23(0x1ce)](a0_0x379b23(0x17b))[a0_0x379b23(0xdc)](description),program[a0_0x379b23(0x13b)]('--site\x20<site>',a0_0x379b23(0x11d),a0_0x379b23(0x124))['option'](a0_0x379b23(0xc7),'Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)')[a0_0x379b23(0x13b)](a0_0x379b23(0xd5),a0_0x379b23(0x173))[a0_0x379b23(0x13b)](a0_0x379b23(0x1af),a0_0x379b23(0xe7))[a0_0x379b23(0x13b)](a0_0x379b23(0x1ee),a0_0x379b23(0x194))[a0_0x379b23(0x13b)](a0_0x379b23(0xfe),'Save\x20output\x20to\x20file')[a0_0x379b23(0x13b)]('--limit\x20<number>',a0_0x379b23(0x14f))[a0_0x379b23(0x13b)](a0_0x379b23(0x163),'Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)',![])[a0_0x379b23(0x13b)](a0_0x379b23(0x100),a0_0x379b23(0x125),![])['option'](a0_0x379b23(0xe0),a0_0x379b23(0x19c),![])['option']('--debug',a0_0x379b23(0xf8))[a0_0x379b23(0x13b)](a0_0x379b23(0x117),a0_0x379b23(0x19b))[a0_0x379b23(0x13b)](a0_0x379b23(0xe6),a0_0x379b23(0xe5),'30')[a0_0x379b23(0x13b)](a0_0x379b23(0x15f),'Preview\x20operation\x20without\x20executing',![])[a0_0x379b23(0x13b)](a0_0x379b23(0xcc),'Skip\x20confirmation\x20prompts',![])[a0_0x379b23(0x13b)](a0_0x379b23(0xf9),'Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)')[a0_0x379b23(0x13b)]('--profile\x20<name>',a0_0x379b23(0x121))[a0_0x379b23(0x13b)]('-d,\x20--database\x20<name>','Database\x20to\x20use\x20(overrides\x20context)')[a0_0x379b23(0x13b)](a0_0x379b23(0x1a1),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x379b23(0x13b)](a0_0x379b23(0xc0),a0_0x379b23(0x199))[a0_0x379b23(0x13b)]('--llm-project\x20<name>',a0_0x379b23(0xe4)),program[a0_0x379b23(0x1e7)]({'formatHelp':(_0x184d5d,_0x33da96)=>{const _0x552c14=a0_0x379b23,_0x54bc7d=_0x33da96[_0x552c14(0x18a)](_0x184d5d,_0x33da96),_0x15fa6b=0x2,_0x56b198=0x2;function _0x565c74(_0x47726c){return!!_0x47726c['hidden'];}function _0x4d128b(_0x54d21f,_0x13711e){const _0x580b51=_0x552c14;if(_0x13711e){const _0x3b1fc5=''+_0x54d21f[_0x580b51(0x1d8)](_0x54bc7d+_0x56b198)+_0x13711e;return _0x3b1fc5;}return _0x54d21f;}function _0x19c4fa(_0x36ae65){const _0x521dbb=_0x552c14;return _0x36ae65[_0x521dbb(0x15e)]('\x0a')['replace'](/^/gm,'\x20'[_0x521dbb(0x15d)](_0x15fa6b));}const _0x48b8f6=[];_0x48b8f6[_0x552c14(0x13d)](_0x552c14(0xc4)+_0x33da96[_0x552c14(0x1c9)](_0x184d5d));const _0x4128d1=_0x33da96[_0x552c14(0x184)](_0x184d5d);_0x4128d1&&(_0x48b8f6['push'](''),_0x48b8f6[_0x552c14(0x13d)](_0x4128d1));const _0x2d2b46=_0x184d5d[_0x552c14(0x18b)]['filter'](_0x551aed=>!_0x565c74(_0x551aed));if(_0x2d2b46[_0x552c14(0x166)]>0x0){const _0x240c3a=_0x2d2b46[_0x552c14(0x17c)](_0x3b0c1e=>{const _0x276123=_0x552c14,_0x1c70b0=_0x33da96[_0x276123(0x16e)](_0x3b0c1e),_0x356196=_0x33da96[_0x276123(0x109)](_0x3b0c1e);return _0x4d128b(_0x1c70b0,_0x356196);});_0x48b8f6[_0x552c14(0x13d)](''),_0x48b8f6['push'](_0x552c14(0x1c4)),_0x48b8f6[_0x552c14(0x13d)](_0x19c4fa(_0x240c3a));}const _0xc2fe35=_0x184d5d['options'][_0x552c14(0x128)](_0x4691a7=>!_0x565c74(_0x4691a7));if(_0xc2fe35['length']>0x0){const _0x2a963c=_0xc2fe35[_0x552c14(0x17c)](_0x34cc16=>{const _0x237418=_0x552c14,_0x5e72f1=_0x33da96[_0x237418(0x139)](_0x34cc16),_0x4d0246=_0x33da96[_0x237418(0x114)](_0x34cc16);return _0x4d128b(_0x5e72f1,_0x4d0246);});_0x48b8f6[_0x552c14(0x13d)](''),_0x48b8f6[_0x552c14(0x13d)](_0x552c14(0xc2)),_0x48b8f6[_0x552c14(0x13d)](_0x19c4fa(_0x2a963c));}const _0x3b4163=(_0x184d5d[_0x552c14(0x1ab)]||[])[_0x552c14(0x128)](_0x842bac=>!_0x565c74(_0x842bac));if(_0x3b4163[_0x552c14(0x166)]>0x0){const _0x2feaf7=_0x3b4163[_0x552c14(0x17c)](_0x5f4732=>{const _0x55adc3=_0x552c14,_0x3d4894=_0x33da96[_0x55adc3(0x1d3)](_0x5f4732),_0x246466=_0x33da96[_0x55adc3(0xd2)](_0x5f4732);return _0x4d128b(_0x3d4894,_0x246466);});_0x48b8f6[_0x552c14(0x13d)](''),_0x48b8f6[_0x552c14(0x13d)]('Arguments:'),_0x48b8f6['push'](_0x19c4fa(_0x2feaf7));}return _0x48b8f6[_0x552c14(0x15e)]('\x0a');},'subcommandTerm':_0x12ca47=>{const _0x4b0368=a0_0x379b23,_0x2bed5c=(_0x12ca47[_0x4b0368(0x1ab)]||[])[_0x4b0368(0x17c)](_0x2f7601=>_0x2f7601['required']?'<'+_0x2f7601[_0x4b0368(0x1ce)]()+'>':'['+_0x2f7601['name']()+']')[_0x4b0368(0x15e)]('\x20'),_0x164669=_0x12ca47['aliases'](),_0x27c75f=_0x164669[_0x4b0368(0x166)]>0x0?_0x12ca47[_0x4b0368(0x1ce)]()+',\x20'+_0x164669[_0x4b0368(0x15e)](',\x20'):_0x12ca47[_0x4b0368(0x1ce)]();return _0x2bed5c?_0x27c75f+'\x20'+_0x2bed5c:_0x27c75f;}}),program[a0_0x379b23(0x1cf)](a0_0x379b23(0xf7),_0x5d2f28=>{const _0x1080c5=a0_0x379b23,_0x4a86c2=_0x5d2f28[_0x1080c5(0xbd)]();if(!_0x4a86c2['format']){if(_0x4a86c2[_0x1080c5(0xca)])_0x4a86c2[_0x1080c5(0x193)]=_0x1080c5(0xca);else{if(_0x4a86c2['jsonl'])_0x4a86c2[_0x1080c5(0x193)]=_0x1080c5(0x10c);else _0x4a86c2[_0x1080c5(0xda)]&&(_0x4a86c2[_0x1080c5(0x193)]=_0x1080c5(0xda));}}_0x4a86c2['in']&&!_0x4a86c2['database']&&(_0x4a86c2[_0x1080c5(0x12c)]=_0x4a86c2['in']);if(_0x4a86c2['trace'])_0x4a86c2['logLevel']=LogLevel['TRACE'];else{if(_0x4a86c2[_0x1080c5(0xe1)])_0x4a86c2['logLevel']=LogLevel['DEBUG'];else _0x4a86c2['logLevel']===undefined&&(_0x4a86c2['logLevel']=LogLevel[_0x1080c5(0x115)]);}});function createTDXInstance(_0x432570){const _0x3288c3=a0_0x379b23,_0x29a276=new GlobalContext(_0x432570);_0x29a276[_0x3288c3(0xd1)](_0x432570);const _0x2ab87a={'site':_0x29a276[_0x3288c3(0xef)],'apiKey':_0x29a276[_0x3288c3(0x165)],'logLevel':_0x29a276[_0x3288c3(0xde)]};return new TDX(_0x2ab87a);}program[a0_0x379b23(0x161)](a0_0x379b23(0x172))[a0_0x379b23(0xdc)](a0_0x379b23(0x135))[a0_0x379b23(0xc9)](async(_0x126758,_0x199cc3)=>{const _0x3c29bc=a0_0x379b23,_0x5274f8=new DatabasesCommand(),_0x49a221=program[_0x3c29bc(0xbd)](),_0x14d334=createTDXInstance(_0x49a221),_0x529704=await _0x5274f8[_0x3c29bc(0x142)]({'options':{..._0x49a221,..._0x199cc3},'args':_0x126758?[_0x126758]:[],'tdx':_0x14d334});process[_0x3c29bc(0xee)](_0x529704);}),program[a0_0x379b23(0x161)]('chat\x20[message...]')[a0_0x379b23(0xdc)](a0_0x379b23(0xfb))[a0_0x379b23(0x13b)](a0_0x379b23(0x13a),'Agent\x20reference\x20(project-name/agent-name)')[a0_0x379b23(0x13b)](a0_0x379b23(0x181),'Model\x20name\x20(default:\x20claude-4.5-sonnet)')[a0_0x379b23(0x13b)](a0_0x379b23(0x141),'Temperature\x20(0.0-2.0,\x20default:\x200.7)')[a0_0x379b23(0x13b)](a0_0x379b23(0xb9),a0_0x379b23(0xd3))[a0_0x379b23(0xc9)](async(_0x595c23,_0x429248)=>{const _0x3d466d=a0_0x379b23,_0x1dd3b5=new ChatCommand(),_0x58ded2=program[_0x3d466d(0xbd)](),_0x16f0a3=createTDXInstance(_0x58ded2),_0x49cb64=await _0x1dd3b5[_0x3d466d(0x142)]({'options':{..._0x58ded2,..._0x429248},'args':_0x595c23,'tdx':_0x16f0a3});process['exit'](_0x49cb64);});const apiCmd=program[a0_0x379b23(0x161)](a0_0x379b23(0x1f9))[a0_0x379b23(0x1e4)](a0_0x379b23(0x130))[a0_0x379b23(0x15c)](a0_0x379b23(0xba),a0_0x379b23(0x129))[a0_0x379b23(0x13b)](a0_0x379b23(0x1bd),a0_0x379b23(0x1de),a0_0x379b23(0x131))[a0_0x379b23(0x13b)](a0_0x379b23(0x168),'Request\x20body\x20as\x20JSON\x20string')[a0_0x379b23(0x13b)](a0_0x379b23(0x123),'Read\x20request\x20body\x20from\x20file')[a0_0x379b23(0x13b)](a0_0x379b23(0xc6),a0_0x379b23(0x15b),(_0x277aeb,_0x792fba)=>{return _0x792fba?[..._0x792fba,_0x277aeb]:[_0x277aeb];})['option'](a0_0x379b23(0xd6),'API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','td')[a0_0x379b23(0xc9)](async(_0x142587,_0x29b217)=>{const _0xc89499=a0_0x379b23;if(!_0x142587){apiCmd[_0xc89499(0x1d7)]();return;}const _0x184ad3=new ApiCommand(),_0x352393=program[_0xc89499(0xbd)](),_0x480e6b=createTDXInstance(_0x352393),_0x55c1cb=await _0x184ad3[_0xc89499(0x142)]({'options':{..._0x352393,..._0x29b217},'args':[_0x142587],'tdx':_0x480e6b});process[_0xc89499(0xee)](_0x55c1cb);});program[a0_0x379b23(0x161)]('tables\x20[pattern]')['description'](a0_0x379b23(0x102))['option'](a0_0x379b23(0x133),'Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)')[a0_0x379b23(0x13b)](a0_0x379b23(0x1b9),a0_0x379b23(0x1c3))[a0_0x379b23(0xc9)](async(_0x2d27ed,_0x3d264d)=>{const _0x18ba42=a0_0x379b23,_0x337a5d=new TablesCommand(),_0x4b1388=program[_0x18ba42(0xbd)](),_0x35d7f1=createTDXInstance(_0x4b1388);_0x3d264d['in']&&(_0x3d264d['database']=_0x3d264d['in']);const _0x3d1c6d=await _0x337a5d[_0x18ba42(0x142)]({'options':{..._0x4b1388,..._0x3d264d},'args':_0x2d27ed?[_0x2d27ed]:[],'tdx':_0x35d7f1});process[_0x18ba42(0xee)](_0x3d1c6d);}),program[a0_0x379b23(0x161)](a0_0x379b23(0x195))['description']('Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)')['option']('-d,\x20--database\x20<database>',a0_0x379b23(0xbe))[a0_0x379b23(0x13b)]('--in\x20<database>',a0_0x379b23(0x1c3))[a0_0x379b23(0xc9)](async(_0x45ea36,_0x481f45)=>{const _0x453c6b=a0_0x379b23,_0x167ea9=new ShowCommand(),_0x6bc555=program[_0x453c6b(0xbd)](),_0x56bf03=createTDXInstance(_0x6bc555);_0x481f45['in']&&(_0x481f45[_0x453c6b(0x12c)]=_0x481f45['in']);const _0x2f0f8f=await _0x167ea9[_0x453c6b(0x142)]({'options':{..._0x6bc555,..._0x481f45},'args':_0x45ea36?[_0x45ea36]:[],'tdx':_0x56bf03});process[_0x453c6b(0xee)](_0x2f0f8f);}),program[a0_0x379b23(0x161)](a0_0x379b23(0x18c))['alias'](a0_0x379b23(0x185))['description'](a0_0x379b23(0xd4))[a0_0x379b23(0x13b)](a0_0x379b23(0x133),a0_0x379b23(0xbe))['option'](a0_0x379b23(0x1b9),a0_0x379b23(0x1c3))[a0_0x379b23(0xc9)](async(_0x401a40,_0xd4f81f)=>{const _0x1e0dd8=a0_0x379b23,_0x3f15eb=new DescribeCommand(),_0x3cc169=program[_0x1e0dd8(0xbd)](),_0x45b651=createTDXInstance(_0x3cc169);_0xd4f81f['in']&&(_0xd4f81f[_0x1e0dd8(0x12c)]=_0xd4f81f['in']);const _0x487438=await _0x3f15eb[_0x1e0dd8(0x142)]({'options':{..._0x3cc169,..._0xd4f81f},'args':_0x401a40?[_0x401a40]:[],'tdx':_0x45b651});process[_0x1e0dd8(0xee)](_0x487438);}),program[a0_0x379b23(0x161)](a0_0x379b23(0x1a8))[a0_0x379b23(0xdc)](a0_0x379b23(0x146))[a0_0x379b23(0x13b)](a0_0x379b23(0x133),a0_0x379b23(0x104))[a0_0x379b23(0x13b)]('--in\x20<database>',a0_0x379b23(0x1c3))['option'](a0_0x379b23(0x162),a0_0x379b23(0x1f4))[a0_0x379b23(0x13b)](a0_0x379b23(0x123),a0_0x379b23(0x1b5))[a0_0x379b23(0x13b)](a0_0x379b23(0x11a),a0_0x379b23(0x112),'40')[a0_0x379b23(0xc9)](async(_0x1cea7c,_0xb2817f)=>{const _0x4d1816=a0_0x379b23,_0x541c13=new QueryCommand(),_0x438090=program[_0x4d1816(0xbd)](),_0x54112e=createTDXInstance(_0x438090);_0xb2817f['in']&&(_0xb2817f['database']=_0xb2817f['in']);const _0x4f089c=await _0x541c13[_0x4d1816(0x142)]({'options':{..._0x438090,..._0xb2817f},'args':_0x1cea7c?[_0x1cea7c]:[],'tdx':_0x54112e});process[_0x4d1816(0xee)](_0x4f089c);}),program[a0_0x379b23(0x161)]('segments\x20[path]')[a0_0x379b23(0xdc)](a0_0x379b23(0x1e1))[a0_0x379b23(0x13b)](a0_0x379b23(0xeb),a0_0x379b23(0x174))[a0_0x379b23(0x13b)](a0_0x379b23(0x1f3),a0_0x379b23(0xfa),'10')[a0_0x379b23(0xc9)](async(_0x4bdc2e,_0x11facd)=>{const _0x3dc9e4=a0_0x379b23,_0x5242a8=new SegmentsCommand(),_0x5e4802=program[_0x3dc9e4(0xbd)](),_0xa20648=createTDXInstance(_0x5e4802),_0x1d5755=await _0x5242a8[_0x3dc9e4(0x142)]({'options':{..._0x5e4802,..._0x11facd},'args':_0x4bdc2e?[_0x4bdc2e]:[],'tdx':_0xa20648});process[_0x3dc9e4(0xee)](_0x1d5755);});const segmentCmd=program[a0_0x379b23(0x161)](a0_0x379b23(0x154))[a0_0x379b23(0xdc)](a0_0x379b23(0x1ea));segmentCmd['command']('use\x20<path>')[a0_0x379b23(0xdc)]('Set\x20current\x20segment/folder\x20context\x20for\x20navigation')[a0_0x379b23(0xc9)](async(_0x2e64f6,_0x6d2fc7)=>{const _0x3cda78=a0_0x379b23,_0x51e45b=new SegmentUseCommand(),_0x556a8e=program[_0x3cda78(0xbd)](),_0x34cefc=createTDXInstance(_0x556a8e),_0x3e690b=await _0x51e45b[_0x3cda78(0x142)]({'options':{..._0x556a8e,..._0x6d2fc7},'args':[_0x2e64f6],'tdx':_0x34cefc});process[_0x3cda78(0xee)](_0x3e690b);}),segmentCmd['command'](a0_0x379b23(0x105))[a0_0x379b23(0xdc)](a0_0x379b23(0xc3))[a0_0x379b23(0xc9)](async _0x437502=>{const _0x43adc6=a0_0x379b23,_0x581f13=new SegmentPwdCommand(),_0x4f2dad=program[_0x43adc6(0xbd)](),_0x2be582=createTDXInstance(_0x4f2dad),_0x4acb42=await _0x581f13[_0x43adc6(0x142)]({'options':{..._0x4f2dad,..._0x437502},'args':[],'tdx':_0x2be582});process[_0x43adc6(0xee)](_0x4acb42);}),segmentCmd[a0_0x379b23(0x161)](a0_0x379b23(0x119))[a0_0x379b23(0xed)](a0_0x379b23(0x185))[a0_0x379b23(0xdc)](a0_0x379b23(0x16f))[a0_0x379b23(0xc9)](async(_0x163684,_0x4cafb7)=>{const _0x52cd75=a0_0x379b23,_0x440578=new SegmentDescribeCommand(),_0x1485ca=program[_0x52cd75(0xbd)](),_0x15e57a=createTDXInstance(_0x1485ca),_0x125408=await _0x440578[_0x52cd75(0x142)]({'options':{..._0x1485ca,..._0x4cafb7},'args':[_0x163684],'tdx':_0x15e57a});process[_0x52cd75(0xee)](_0x125408);}),segmentCmd['command']('show\x20<segment_name>')[a0_0x379b23(0xdc)](a0_0x379b23(0xdb))[a0_0x379b23(0xc9)](async(_0x5d40c7,_0xbe0429)=>{const _0x2297a0=a0_0x379b23,_0x2f2713=new SegmentShowCommand(),_0x31e0a9=program[_0x2297a0(0xbd)](),_0xff4333=createTDXInstance(_0x31e0a9),_0x3303b0=await _0x2f2713[_0x2297a0(0x142)]({'options':{..._0x31e0a9,..._0xbe0429},'args':[_0x5d40c7],'tdx':_0xff4333});process[_0x2297a0(0xee)](_0x3303b0);}),segmentCmd[a0_0x379b23(0x161)](a0_0x379b23(0x1c8))[a0_0x379b23(0xdc)](a0_0x379b23(0x18e))[a0_0x379b23(0xc9)](async(_0x12a9b4,_0x11b751)=>{const _0x4db5de=a0_0x379b23,_0x57fea5=new SegmentFolderListCommand(),_0x5c024c=program[_0x4db5de(0xbd)](),_0x52bef0=createTDXInstance(_0x5c024c),_0x1cb91f=await _0x57fea5[_0x4db5de(0x142)]({'options':{..._0x5c024c,..._0x11b751},'args':[_0x12a9b4],'tdx':_0x52bef0});process['exit'](_0x1cb91f);});const folderCmd=segmentCmd[a0_0x379b23(0x161)]('folder')[a0_0x379b23(0xdc)](a0_0x379b23(0x1ba));folderCmd[a0_0x379b23(0x161)](a0_0x379b23(0x1e5))['description'](a0_0x379b23(0x12a))[a0_0x379b23(0xc9)](async(_0x3e8ccc,_0x33c751)=>{const _0x45c582=a0_0x379b23,_0x38c958=new SegmentFolderShowCommand(),_0x465deb=program[_0x45c582(0xbd)](),_0xfaa6af=createTDXInstance(_0x465deb),_0x4fa575=await _0x38c958[_0x45c582(0x142)]({'options':{..._0x465deb,..._0x33c751},'args':[_0x3e8ccc],'tdx':_0xfaa6af});process[_0x45c582(0xee)](_0x4fa575);}),segmentCmd[a0_0x379b23(0x161)](a0_0x379b23(0x1e9))[a0_0x379b23(0xdc)]('Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)')['action'](async(_0x584d4f,_0x5cf423)=>{const _0x33414f=a0_0x379b23,_0x483c7c=new SegmentSQLCommand(),_0x54e742=program[_0x33414f(0xbd)](),_0x6a9266=createTDXInstance(_0x54e742),_0x26290d=await _0x483c7c[_0x33414f(0x142)]({'options':{..._0x54e742,..._0x5cf423},'args':[_0x584d4f],'tdx':_0x6a9266});process[_0x33414f(0xee)](_0x26290d);}),segmentCmd['command'](a0_0x379b23(0x1d4))[a0_0x379b23(0xdc)](a0_0x379b23(0xf6))[a0_0x379b23(0xc9)](async(_0x2f50bd,_0x5800b5)=>{const _0x2a9d65=a0_0x379b23,_0x51f99b=new SegmentFieldsCommand(),_0x167def=program['opts'](),_0x3bc036=createTDXInstance(_0x167def),_0x1e4c77=await _0x51f99b[_0x2a9d65(0x142)]({'options':{..._0x167def,..._0x5800b5},'args':[_0x2f50bd],'tdx':_0x3bc036});process[_0x2a9d65(0xee)](_0x1e4c77);}),segmentCmd[a0_0x379b23(0x161)](a0_0x379b23(0x14c))[a0_0x379b23(0xdc)]('Create\x20child\x20segment\x20(use\x20parent_name/child_name)')[a0_0x379b23(0x13b)](a0_0x379b23(0x144),a0_0x379b23(0x1f2))['option'](a0_0x379b23(0x10d),a0_0x379b23(0x158))['option'](a0_0x379b23(0x11e),a0_0x379b23(0x1ad))[a0_0x379b23(0x13b)](a0_0x379b23(0xd8),'Folder\x20name\x20for\x20organization')[a0_0x379b23(0x13b)](a0_0x379b23(0x19e),'Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage')[a0_0x379b23(0x13b)](a0_0x379b23(0x1a3),a0_0x379b23(0x1d1))[a0_0x379b23(0x13b)](a0_0x379b23(0x192),a0_0x379b23(0x189))[a0_0x379b23(0xc9)](async(_0x116e45,_0xe83520)=>{const _0x345da8=a0_0x379b23,_0x51f4ac=new SegmentCreateCommand(),_0x26b15f=program[_0x345da8(0xbd)](),_0xa6bb6b=createTDXInstance(_0x26b15f),_0xebcdfd=await _0x51f4ac[_0x345da8(0x142)]({'options':{..._0x26b15f,..._0xe83520},'args':[_0x116e45],'tdx':_0xa6bb6b});process[_0x345da8(0xee)](_0xebcdfd);}),segmentCmd['command'](a0_0x379b23(0x10e))['description'](a0_0x379b23(0x1e2))[a0_0x379b23(0x13b)](a0_0x379b23(0x116),a0_0x379b23(0x1d2))['option'](a0_0x379b23(0x144),a0_0x379b23(0x1d6))[a0_0x379b23(0x13b)](a0_0x379b23(0x10d),a0_0x379b23(0x190))[a0_0x379b23(0x13b)](a0_0x379b23(0x11e),a0_0x379b23(0x1e3))[a0_0x379b23(0x13b)](a0_0x379b23(0xd8),'Move\x20to\x20folder')[a0_0x379b23(0x13b)](a0_0x379b23(0x19e),a0_0x379b23(0x15a))[a0_0x379b23(0xc9)](async(_0x3cfc09,_0x208279)=>{const _0x1fd250=a0_0x379b23,_0x220182=new SegmentUpdateCommand(),_0x5e62c5=program['opts'](),_0x2735d0=createTDXInstance(_0x5e62c5),_0x2b1bc9=await _0x220182[_0x1fd250(0x142)]({'options':{..._0x5e62c5,..._0x208279},'args':[_0x3cfc09],'tdx':_0x2735d0});process[_0x1fd250(0xee)](_0x2b1bc9);});const parentCmd=segmentCmd[a0_0x379b23(0x161)](a0_0x379b23(0x101))[a0_0x379b23(0xdc)](a0_0x379b23(0x107));parentCmd[a0_0x379b23(0x161)]('create\x20<name>')[a0_0x379b23(0xdc)](a0_0x379b23(0x1ca))[a0_0x379b23(0xf1)](a0_0x379b23(0x13e),'Master\x20database\x20name')[a0_0x379b23(0xf1)](a0_0x379b23(0x1cc),a0_0x379b23(0x18d))[a0_0x379b23(0x13b)]('--description\x20<text>','Parent\x20segment\x20description')[a0_0x379b23(0x13b)]('--schedule-type\x20<type>',a0_0x379b23(0xdf))[a0_0x379b23(0x13b)](a0_0x379b23(0x1a2),'Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)')[a0_0x379b23(0x13b)](a0_0x379b23(0x1d0),'Timezone\x20(e.g.,\x20America/Los_Angeles)')[a0_0x379b23(0x13b)](a0_0x379b23(0xbb),a0_0x379b23(0x19f))[a0_0x379b23(0x13b)]('--attributes-file\x20<file>','Attributes\x20from\x20JSON\x20file')['option']('--behaviors\x20<json>',a0_0x379b23(0xe3))['option'](a0_0x379b23(0xe9),a0_0x379b23(0x1a6))[a0_0x379b23(0x13b)](a0_0x379b23(0xff),a0_0x379b23(0x1c5))[a0_0x379b23(0x13b)](a0_0x379b23(0x1cd),'Customer\x20group\x20from\x20JSON\x20file')[a0_0x379b23(0xc9)](async(_0x313fd0,_0x2e9625)=>{const _0x2079a1=a0_0x379b23,_0x377a0c=new ParentSegmentCreateCommand(),_0x18cce1=program[_0x2079a1(0xbd)](),_0x28e6dc=createTDXInstance(_0x18cce1),_0x9b9afc=await _0x377a0c[_0x2079a1(0x142)]({'options':{..._0x18cce1,..._0x2e9625},'args':[_0x313fd0],'tdx':_0x28e6dc});process[_0x2079a1(0xee)](_0x9b9afc);}),parentCmd[a0_0x379b23(0x161)](a0_0x379b23(0x1b4))['description'](a0_0x379b23(0x183))[a0_0x379b23(0x13b)](a0_0x379b23(0x144),'Updated\x20description')[a0_0x379b23(0x13b)](a0_0x379b23(0x171),a0_0x379b23(0x19d))[a0_0x379b23(0x13b)](a0_0x379b23(0x1a2),a0_0x379b23(0x137))[a0_0x379b23(0x13b)](a0_0x379b23(0x1d0),a0_0x379b23(0x1f7))[a0_0x379b23(0x13b)](a0_0x379b23(0x120),a0_0x379b23(0x149))[a0_0x379b23(0x13b)](a0_0x379b23(0x136),'Add\x20attributes\x20from\x20JSON\x20file')[a0_0x379b23(0x13b)]('--add-behaviors\x20<json>','Add\x20behaviors\x20as\x20JSON\x20string')[a0_0x379b23(0x13b)](a0_0x379b23(0x196),a0_0x379b23(0x16a))[a0_0x379b23(0xc9)](async(_0x50ab4a,_0x1dfc7f)=>{const _0x9ca54b=new ParentSegmentUpdateCommand(),_0x1e9d4f=program['opts'](),_0x37250c=createTDXInstance(_0x1e9d4f),_0x278634=await _0x9ca54b['run']({'options':{..._0x1e9d4f,..._0x1dfc7f},'args':[_0x50ab4a],'tdx':_0x37250c});process['exit'](_0x278634);}),folderCmd[a0_0x379b23(0x161)](a0_0x379b23(0x16d))['description']('Create\x20segment\x20folder')[a0_0x379b23(0x13b)]('--description\x20<text>',a0_0x379b23(0x1a5))[a0_0x379b23(0x13b)](a0_0x379b23(0x160),a0_0x379b23(0x1ef))['action'](async(_0xe62774,_0x5763b6,_0x12544f)=>{const _0x150642=a0_0x379b23,_0x30900=new SegmentFolderCreateCommand(),_0x1cea53=program[_0x150642(0xbd)](),_0x1fedff=createTDXInstance(_0x1cea53),_0x1369c6=await _0x30900[_0x150642(0x142)]({'options':{..._0x1cea53,..._0x12544f},'args':[_0xe62774,_0x5763b6],'tdx':_0x1fedff});process[_0x150642(0xee)](_0x1369c6);}),program[a0_0x379b23(0x161)]('activations\x20<segment_name>')[a0_0x379b23(0xdc)](a0_0x379b23(0x111))['action'](async(_0x1dd2d9,_0x30398e)=>{const _0x5503ca=a0_0x379b23,_0x15d836=new ActivationsCommand(),_0x193130=program[_0x5503ca(0xbd)](),_0x189e53=createTDXInstance(_0x193130),_0xb5357=await _0x15d836[_0x5503ca(0x142)]({'options':{..._0x193130,..._0x30398e},'args':[_0x1dd2d9],'tdx':_0x189e53});process['exit'](_0xb5357);});const workflowCmd=program[a0_0x379b23(0x161)](a0_0x379b23(0x16b))['alias']('wf')[a0_0x379b23(0xdc)](a0_0x379b23(0x1a0));workflowCmd[a0_0x379b23(0x161)](a0_0x379b23(0xec))['description'](a0_0x379b23(0x127))[a0_0x379b23(0xc9)](async(_0x31ebdc,_0x5146a0)=>{const _0xff0dc2=a0_0x379b23,_0x118a67=new WorkflowProjectsCommand(),_0x38eb72=program[_0xff0dc2(0xbd)](),_0x5e2956=createTDXInstance(_0x38eb72),_0xa2f19a=await _0x118a67[_0xff0dc2(0x142)]({'options':{..._0x38eb72,..._0x5146a0},'args':_0x31ebdc?[_0x31ebdc]:[],'tdx':_0x5e2956});process['exit'](_0xa2f19a);}),workflowCmd[a0_0x379b23(0x161)](a0_0x379b23(0x170))[a0_0x379b23(0xed)]('ls')[a0_0x379b23(0xdc)]('List\x20workflows\x20(optionally\x20filtered\x20by\x20project)')[a0_0x379b23(0xc9)](async(_0x38eeb0,_0xc493e3)=>{const _0x53fdf7=a0_0x379b23,_0x21dd6d=new WorkflowWorkflowsCommand(),_0x5407de=program['opts'](),_0x4033b4=createTDXInstance(_0x5407de),_0x1c862b=await _0x21dd6d[_0x53fdf7(0x142)]({'options':{..._0x5407de,..._0xc493e3},'args':_0x38eeb0?[_0x38eeb0]:[],'tdx':_0x4033b4});process[_0x53fdf7(0xee)](_0x1c862b);}),workflowCmd[a0_0x379b23(0x161)](a0_0x379b23(0x113))[a0_0x379b23(0xdc)](a0_0x379b23(0x1dd))[a0_0x379b23(0x13b)](a0_0x379b23(0x1c0),'Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)')[a0_0x379b23(0x13b)](a0_0x379b23(0x16c),a0_0x379b23(0xe8))[a0_0x379b23(0x13b)](a0_0x379b23(0x14d),a0_0x379b23(0x152))['action'](async(_0x15325c,_0x1b1fe9)=>{const _0xedf752=a0_0x379b23,_0x231107=new WorkflowSessionsCommand(),_0x210c85=program[_0xedf752(0xbd)](),_0x568b3c=createTDXInstance(_0x210c85),_0x58314f=await _0x231107[_0xedf752(0x142)]({'options':{..._0x210c85,..._0x1b1fe9},'args':_0x15325c?[_0x15325c]:[],'tdx':_0x568b3c});process['exit'](_0x58314f);}),workflowCmd['command'](a0_0x379b23(0x12f))[a0_0x379b23(0xdc)]('List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)')[a0_0x379b23(0x13b)]('--include-retried',a0_0x379b23(0x179))[a0_0x379b23(0xc9)](async(_0x2be7ef,_0x49b61b)=>{const _0x2090e1=a0_0x379b23,_0x46b060=new WorkflowAttemptsCommand(),_0x3721f3=program[_0x2090e1(0xbd)](),_0x3bf34e=createTDXInstance(_0x3721f3),_0x38333e=await _0x46b060[_0x2090e1(0x142)]({'options':{..._0x3721f3,..._0x49b61b},'args':_0x2be7ef?[_0x2be7ef]:[],'tdx':_0x3bf34e});process[_0x2090e1(0xee)](_0x38333e);}),workflowCmd[a0_0x379b23(0x161)](a0_0x379b23(0x1c6))['description']('Show\x20specific\x20attempt\x20details')['action'](async(_0x323af3,_0x4f7016)=>{const _0x3efb39=a0_0x379b23,_0x499e9c=new WorkflowAttemptCommand(),_0x23c681=program[_0x3efb39(0xbd)](),_0x10c1f8=createTDXInstance(_0x23c681),_0xa07f51=await _0x499e9c[_0x3efb39(0x142)]({'options':{..._0x23c681,..._0x4f7016},'args':[_0x323af3],'tdx':_0x10c1f8});process['exit'](_0xa07f51);}),workflowCmd[a0_0x379b23(0x161)](a0_0x379b23(0x1b2))[a0_0x379b23(0xdc)](a0_0x379b23(0x1c2))[a0_0x379b23(0x13b)](a0_0x379b23(0x157),a0_0x379b23(0x1f6))[a0_0x379b23(0xc9)](async(_0x4d55aa,_0x16424a)=>{const _0x334fcf=a0_0x379b23,_0x51517e=new WorkflowTasksCommand(),_0x4f746d=program[_0x334fcf(0xbd)](),_0x19db34=createTDXInstance(_0x4f746d),_0x505e1f=await _0x51517e['run']({'options':{..._0x4f746d,..._0x16424a},'args':[_0x4d55aa],'tdx':_0x19db34});process[_0x334fcf(0xee)](_0x505e1f);}),workflowCmd[a0_0x379b23(0x161)](a0_0x379b23(0xd9))['description'](a0_0x379b23(0x18f))['option'](a0_0x379b23(0x176),a0_0x379b23(0x10f),_0x15795d=>parseInt(_0x15795d,0xa),0x0)['action'](async(_0x4ed4e5,_0x36e214,_0x1714ee)=>{const _0x326c2f=a0_0x379b23,_0xc5c21c=new WorkflowLogsCommand(),_0x4d8323=program['opts'](),_0x1540f5=createTDXInstance(_0x4d8323),_0x516490=await _0xc5c21c[_0x326c2f(0x142)]({'options':{..._0x4d8323,..._0x1714ee},'args':[_0x4ed4e5,_0x36e214],'tdx':_0x1540f5});process[_0x326c2f(0xee)](_0x516490);}),workflowCmd[a0_0x379b23(0x161)](a0_0x379b23(0xfd))[a0_0x379b23(0xdc)](a0_0x379b23(0xcf))[a0_0x379b23(0x13b)]('--reason\x20<text>',a0_0x379b23(0xcd))[a0_0x379b23(0xc9)](async(_0x433ca4,_0x41ef3a)=>{const _0x537966=a0_0x379b23,_0x387883=new WorkflowKillCommand(),_0x44d2ce=program[_0x537966(0xbd)](),_0x526057=createTDXInstance(_0x44d2ce),_0x2ddaf4=await _0x387883['run']({'options':{..._0x44d2ce,..._0x41ef3a},'args':[_0x433ca4],'tdx':_0x526057});process[_0x537966(0xee)](_0x2ddaf4);}),workflowCmd[a0_0x379b23(0x161)](a0_0x379b23(0x1f5))[a0_0x379b23(0xdc)](a0_0x379b23(0x1a7))[a0_0x379b23(0x13b)](a0_0x379b23(0x1a4),a0_0x379b23(0x167))['option']('--resume-from\x20<task>',a0_0x379b23(0x10a))[a0_0x379b23(0x13b)]('--params\x20<json>','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)')['option'](a0_0x379b23(0xf3),'Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)')['action'](async(_0x1029bf,_0x335192)=>{const _0x3d13eb=a0_0x379b23,_0xfd9ec5=new WorkflowRetryCommand(),_0x1d6818=program[_0x3d13eb(0xbd)](),_0x2fc00e=createTDXInstance(_0x1d6818),_0x1d6d16=await _0xfd9ec5[_0x3d13eb(0x142)]({'options':{..._0x1d6818,..._0x335192},'args':[_0x1029bf],'tdx':_0x2fc00e});process['exit'](_0x1d6d16);}),workflowCmd[a0_0x379b23(0x161)](a0_0x379b23(0xd7))[a0_0x379b23(0xdc)](a0_0x379b23(0x12d))['option'](a0_0x379b23(0x14b),a0_0x379b23(0x159))[a0_0x379b23(0xc9)](async(_0x567c6a,_0x564a78,_0x3e51b9)=>{const _0x4c6f87=a0_0x379b23,_0x6dc839=new WorkflowDownloadCommand(),_0x37df10=program[_0x4c6f87(0xbd)](),_0x27087d=createTDXInstance(_0x37df10),_0xbb1b0b=await _0x6dc839[_0x4c6f87(0x142)]({'options':{..._0x37df10,..._0x3e51b9},'args':[_0x567c6a,_0x564a78||'.'],'tdx':_0x27087d});process[_0x4c6f87(0xee)](_0xbb1b0b);}),workflowCmd[a0_0x379b23(0x161)](a0_0x379b23(0x1bf))[a0_0x379b23(0xdc)]('Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)')[a0_0x379b23(0x13b)]('--name\x20<name>',a0_0x379b23(0x1eb))[a0_0x379b23(0x13b)](a0_0x379b23(0x14b),a0_0x379b23(0x155))[a0_0x379b23(0x13b)](a0_0x379b23(0x145),'Skip\x20validation\x20of\x20.dig\x20files')[a0_0x379b23(0xc9)](async(_0x23264c,_0x5365a3)=>{const _0x24988c=a0_0x379b23,_0x5a7987=new WorkflowPushCommand(),_0x488cfe=program['opts'](),_0x56922f=createTDXInstance(_0x488cfe),_0x51b9c8=await _0x5a7987['run']({'options':{..._0x488cfe,..._0x5365a3},'args':_0x23264c?[_0x23264c]:[],'tdx':_0x56922f});process[_0x24988c(0xee)](_0x51b9c8);}),workflowCmd[a0_0x379b23(0x161)](a0_0x379b23(0x134))['description'](a0_0x379b23(0x106))['action'](async(_0x570b1,_0x42eaac)=>{const _0x138e89=a0_0x379b23,_0x14aeb2=new WorkflowDeleteCommand(),_0x2f9098=program[_0x138e89(0xbd)](),_0x369803=createTDXInstance(_0x2f9098),_0x1b5ee4=await _0x14aeb2[_0x138e89(0x142)]({'options':{..._0x2f9098,..._0x42eaac},'args':[_0x570b1],'tdx':_0x369803});process[_0x138e89(0xee)](_0x1b5ee4);}),program[a0_0x379b23(0x161)](a0_0x379b23(0x143))['description'](a0_0x379b23(0x14e))['option'](a0_0x379b23(0x1c0),a0_0x379b23(0x177))[a0_0x379b23(0xc9)](async _0x5d371e=>{const _0x5cec09=a0_0x379b23,_0xc37b55=new JobListCommand(),_0x2d7666=program[_0x5cec09(0xbd)](),_0x5f4a9e=createTDXInstance(_0x2d7666),_0x3b2480=await _0xc37b55[_0x5cec09(0x142)]({'options':{..._0x2d7666,..._0x5d371e},'args':[],'tdx':_0x5f4a9e});process['exit'](_0x3b2480);});const jobCmd=program[a0_0x379b23(0x161)](a0_0x379b23(0x1bb))['description']('Job\x20management\x20commands');jobCmd['command'](a0_0x379b23(0x1f1))[a0_0x379b23(0xdc)](a0_0x379b23(0x1ed))[a0_0x379b23(0xc9)](async(_0x51bdcc,_0x4b6924)=>{const _0x269cb1=a0_0x379b23,_0x3f7869=new JobShowCommand(),_0x56000c=program['opts'](),_0x188952=createTDXInstance(_0x56000c),_0x571550=await _0x3f7869[_0x269cb1(0x142)]({'options':{..._0x56000c,..._0x4b6924},'args':[_0x51bdcc],'tdx':_0x188952});process[_0x269cb1(0xee)](_0x571550);}),jobCmd[a0_0x379b23(0x161)](a0_0x379b23(0x17e))[a0_0x379b23(0xdc)](a0_0x379b23(0x138))[a0_0x379b23(0xc9)](async(_0x5d5465,_0x25b4de)=>{const _0xdd746f=a0_0x379b23,_0x2e67d7=new JobKillCommand(),_0x4cae58=program[_0xdd746f(0xbd)](),_0x59ac69=createTDXInstance(_0x4cae58),_0x519e0e=await _0x2e67d7[_0xdd746f(0x142)]({'options':{..._0x4cae58,..._0x25b4de},'args':[_0x5d5465],'tdx':_0x59ac69});process[_0xdd746f(0xee)](_0x519e0e);}),jobCmd[a0_0x379b23(0x161)](a0_0x379b23(0x1ec))[a0_0x379b23(0xdc)](a0_0x379b23(0x118))[a0_0x379b23(0x13b)]('--job-type\x20<type>','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)',a0_0x379b23(0x1cb))['option'](a0_0x379b23(0x123),'Read\x20query\x20from\x20file')[a0_0x379b23(0x13b)]('--database\x20<name>',a0_0x379b23(0x153),a0_0x379b23(0xd0))[a0_0x379b23(0xc9)](async(_0x5f3a68,_0x30882f)=>{const _0x28af80=a0_0x379b23,_0x111218=new JobSubmitCommand(),_0x12248e=program[_0x28af80(0xbd)](),_0xaf3ff5=createTDXInstance(_0x12248e),_0x4b6e01=await _0x111218[_0x28af80(0x142)]({'options':{..._0x12248e,..._0x30882f},'args':_0x5f3a68?[_0x5f3a68]:[],'tdx':_0xaf3ff5});process[_0x28af80(0xee)](_0x4b6e01);}),jobCmd[a0_0x379b23(0x161)](a0_0x379b23(0x182))[a0_0x379b23(0xdc)](a0_0x379b23(0x1d9))[a0_0x379b23(0xc9)](async(_0x1417b7,_0x547685)=>{const _0x258316=a0_0x379b23,_0x475fc1=new JobResultCommand(),_0x1d88df=program['opts'](),_0x827221=createTDXInstance(_0x1d88df),_0x45e9ea=await _0x475fc1[_0x258316(0x142)]({'options':{..._0x1d88df,..._0x547685},'args':[_0x1417b7],'tdx':_0x827221});process['exit'](_0x45e9ea);});const llmCmd=program['command'](a0_0x379b23(0xfc))[a0_0x379b23(0xdc)]('LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)');llmCmd[a0_0x379b23(0x161)](a0_0x379b23(0x19a))[a0_0x379b23(0xdc)](a0_0x379b23(0x110))[a0_0x379b23(0xc9)](async(_0x5b4452,_0x16a583)=>{const _0x21a942=a0_0x379b23,_0x1aef3b=new LLMUseCommand(),_0x524f03=program[_0x21a942(0xbd)](),_0x2a59b4=createTDXInstance(_0x524f03),_0x43ade5=await _0x1aef3b['run']({'options':{..._0x524f03,..._0x16a583},'args':[_0x5b4452],'tdx':_0x2a59b4});process['exit'](_0x43ade5);}),llmCmd[a0_0x379b23(0x161)](a0_0x379b23(0x164))[a0_0x379b23(0xdc)](a0_0x379b23(0x13f))[a0_0x379b23(0xc9)](async _0x3095cb=>{const _0x4f6c68=a0_0x379b23,_0x253085=new LLMModelsCommand(),_0x21c1eb=program[_0x4f6c68(0xbd)](),_0x484dd4=createTDXInstance(_0x21c1eb),_0x1e26a0=await _0x253085['run']({'options':{..._0x21c1eb,..._0x3095cb},'args':[],'tdx':_0x484dd4});process[_0x4f6c68(0xee)](_0x1e26a0);}),llmCmd['command'](a0_0x379b23(0xec))[a0_0x379b23(0xdc)]('List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)')[a0_0x379b23(0xc9)](async(_0x2ae5d8,_0x29bed0)=>{const _0x1bfaf6=a0_0x379b23,_0x53b66c=new LLMProjectsCommand(),_0xaf0511=program[_0x1bfaf6(0xbd)](),_0x55fe79=createTDXInstance(_0xaf0511),_0x252cbd=await _0x53b66c['run']({'options':{..._0xaf0511,..._0x29bed0},'args':_0x2ae5d8?[_0x2ae5d8]:[],'tdx':_0x55fe79});process[_0x1bfaf6(0xee)](_0x252cbd);});const projectCmd=llmCmd[a0_0x379b23(0x161)]('project')[a0_0x379b23(0xdc)](a0_0x379b23(0x151));projectCmd[a0_0x379b23(0x161)](a0_0x379b23(0x198))['description'](a0_0x379b23(0x132))[a0_0x379b23(0x13b)](a0_0x379b23(0x144),'Project\x20description')[a0_0x379b23(0xc9)](async(_0x298dfe,_0x21e7b9)=>{const _0x3391b3=a0_0x379b23,_0x109d74=new LLMProjectCreateCommand(),_0x5e04ce=program[_0x3391b3(0xbd)](),_0xcbb5ec=createTDXInstance(_0x5e04ce),_0x4cb089=await _0x109d74[_0x3391b3(0x142)]({'options':{..._0x5e04ce,..._0x21e7b9},'args':[_0x298dfe],'tdx':_0xcbb5ec});process[_0x3391b3(0xee)](_0x4cb089);}),projectCmd[a0_0x379b23(0x161)](a0_0x379b23(0xce))[a0_0x379b23(0xdc)]('Delete\x20an\x20LLM\x20project')[a0_0x379b23(0xc9)](async(_0x37d7ea,_0x2ec162)=>{const _0x9d94b4=a0_0x379b23,_0x286661=new LLMProjectDeleteCommand(),_0x1a126c=program[_0x9d94b4(0xbd)](),_0x10da1c=createTDXInstance(_0x1a126c),_0x55077e=await _0x286661['run']({'options':{..._0x1a126c,..._0x2ec162},'args':[_0x37d7ea],'tdx':_0x10da1c});process[_0x9d94b4(0xee)](_0x55077e);}),llmCmd[a0_0x379b23(0x161)](a0_0x379b23(0xf4))['description'](a0_0x379b23(0xbc))[a0_0x379b23(0xc9)](async(_0x16cddf,_0x470ca5)=>{const _0x177b55=a0_0x379b23,_0x3664af=new LLMAgentsCommand(),_0x154cd1=program[_0x177b55(0xbd)](),_0x1e2deb=createTDXInstance(_0x154cd1),_0x569b8d=await _0x3664af[_0x177b55(0x142)]({'options':{..._0x154cd1,..._0x470ca5},'args':_0x16cddf?[_0x16cddf]:[],'tdx':_0x1e2deb});process[_0x177b55(0xee)](_0x569b8d);});const agentCmd=llmCmd['command']('agent')['description'](a0_0x379b23(0x122));agentCmd[a0_0x379b23(0x161)](a0_0x379b23(0x1ac))['description'](a0_0x379b23(0x150))[a0_0x379b23(0xc9)](async(_0x1eac41,_0x317382)=>{const _0x8b4f10=a0_0x379b23,_0x5c0715=new LLMAgentShowCommand(),_0x3cda33=program['opts'](),_0xab8eb3=createTDXInstance(_0x3cda33),_0xd65b72=await _0x5c0715[_0x8b4f10(0x142)]({'options':{..._0x3cda33,..._0x317382},'args':[_0x1eac41],'tdx':_0xab8eb3});process[_0x8b4f10(0xee)](_0xd65b72);}),agentCmd['command'](a0_0x379b23(0x198))['description'](a0_0x379b23(0x1e0))[a0_0x379b23(0x13b)]('--system-prompt\x20<text>',a0_0x379b23(0x1d5))[a0_0x379b23(0x13b)](a0_0x379b23(0x181),a0_0x379b23(0x1f8),a0_0x379b23(0x1b3))[a0_0x379b23(0x13b)]('--starter-message\x20<text>',a0_0x379b23(0x1e8))[a0_0x379b23(0x13b)]('--max-tool-iterations\x20<n>',a0_0x379b23(0x17d),'4')[a0_0x379b23(0x13b)](a0_0x379b23(0x141),a0_0x379b23(0xc5),a0_0x379b23(0xf0))[a0_0x379b23(0xc9)](async(_0x4dac78,_0x228e61)=>{const _0x5e36de=a0_0x379b23,_0x574e5d=new LLMAgentCreateCommand(),_0x4a766e=program['opts'](),_0x26a798=createTDXInstance(_0x4a766e),_0x48d10d=await _0x574e5d[_0x5e36de(0x142)]({'options':{..._0x4a766e,..._0x228e61},'args':[_0x4dac78],'tdx':_0x26a798});process['exit'](_0x48d10d);}),agentCmd[a0_0x379b23(0x161)](a0_0x379b23(0x1db))[a0_0x379b23(0xdc)]('Update\x20an\x20existing\x20agent')[a0_0x379b23(0x13b)](a0_0x379b23(0x1b1),a0_0x379b23(0x1aa))[a0_0x379b23(0x13b)](a0_0x379b23(0x188),a0_0x379b23(0x108))[a0_0x379b23(0x13b)]('--description\x20<text>','Agent\x20description')[a0_0x379b23(0x13b)](a0_0x379b23(0x11c),a0_0x379b23(0x1e8))[a0_0x379b23(0xc9)](async(_0x27d560,_0x56a6cc)=>{const _0x1e69cd=a0_0x379b23,_0xfb97b3=new LLMAgentUpdateCommand(),_0x1af932=program[_0x1e69cd(0xbd)](),_0x822fbd=createTDXInstance(_0x1af932),_0x68b8eb=await _0xfb97b3[_0x1e69cd(0x142)]({'options':{..._0x1af932,..._0x56a6cc},'args':[_0x27d560],'tdx':_0x822fbd});process[_0x1e69cd(0xee)](_0x68b8eb);}),agentCmd[a0_0x379b23(0x161)]('delete\x20<agent-name>')[a0_0x379b23(0xdc)]('Delete\x20an\x20agent')[a0_0x379b23(0xc9)](async(_0x1a4054,_0x4ff14d)=>{const _0x1581d6=a0_0x379b23,_0x497625=new LLMAgentDeleteCommand(),_0x356c46=program[_0x1581d6(0xbd)](),_0x5c3b75=createTDXInstance(_0x356c46),_0x2a2b66=await _0x497625[_0x1581d6(0x142)]({'options':{..._0x356c46,..._0x4ff14d},'args':[_0x1a4054],'tdx':_0x5c3b75});process[_0x1581d6(0xee)](_0x2a2b66);}),llmCmd['command'](a0_0x379b23(0xc1))[a0_0x379b23(0xdc)]('Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)')[a0_0x379b23(0x13b)](a0_0x379b23(0x156),'Show\x20history\x20of\x20the\x20most\x20recent\x20chat\x20session')[a0_0x379b23(0xc9)](async(_0x42286d,_0x5042eb)=>{const _0x3d810b=a0_0x379b23,_0x465963=new LLMHistoryCommand(),_0x26e0a5=program[_0x3d810b(0xbd)](),_0x29ac4b=createTDXInstance(_0x26e0a5),_0x53594d=await _0x465963[_0x3d810b(0x142)]({'options':{..._0x26e0a5,..._0x5042eb},'args':_0x42286d?[_0x42286d]:[],'tdx':_0x29ac4b});process[_0x3d810b(0xee)](_0x53594d);}),llmCmd[a0_0x379b23(0x161)]('proxy')[a0_0x379b23(0xdc)](a0_0x379b23(0x17f))[a0_0x379b23(0x13b)](a0_0x379b23(0xf2),'Port\x20to\x20run\x20the\x20proxy\x20server\x20on',a0_0x379b23(0x197))[a0_0x379b23(0x13b)](a0_0x379b23(0x187),a0_0x379b23(0xe2))[a0_0x379b23(0x13b)](a0_0x379b23(0x148),a0_0x379b23(0x1b6))['action'](async _0x56da8b=>{const _0x2a3ae2=a0_0x379b23,_0x5daab0=new LLMProxyCommand(),_0x3dbfa3=program[_0x2a3ae2(0xbd)](),_0x558ffd=createTDXInstance(_0x3dbfa3),_0x29e9df={..._0x56da8b,'port':_0x56da8b[_0x2a3ae2(0x147)]?parseInt(_0x56da8b['port'],0xa):undefined},_0x19ebe3=await _0x5daab0[_0x2a3ae2(0x142)]({'options':{..._0x3dbfa3,..._0x29e9df},'args':[],'tdx':_0x558ffd});process[_0x2a3ae2(0xee)](_0x19ebe3);}),program[a0_0x379b23(0x161)](a0_0x379b23(0x178))[a0_0x379b23(0xdc)](a0_0x379b23(0xc8))['option']('--model\x20<name>',a0_0x379b23(0x126),a0_0x379b23(0x11b))[a0_0x379b23(0x1fb)]()[a0_0x379b23(0x175)](!![])[a0_0x379b23(0xc9)](async(_0x130346,_0x4c0bcf)=>{const _0x4d7e6c=a0_0x379b23,_0x309ed9=new ClaudeCommand(),_0x439249=program[_0x4d7e6c(0xbd)](),_0x1111ee=createTDXInstance(_0x439249),_0x164dd1=Array[_0x4d7e6c(0x1df)](_0x130346)?_0x130346:[],_0x276459=await _0x309ed9['run']({'options':{..._0x439249,..._0x4c0bcf},'args':_0x164dd1,'tdx':_0x1111ee});process[_0x4d7e6c(0xee)](_0x276459);}),program[a0_0x379b23(0x161)]('context')[a0_0x379b23(0xdc)]('Show\x20current\x20resolved\x20context\x20(use\x20--debug\x20to\x20show\x20sources)')[a0_0x379b23(0x13b)](a0_0x379b23(0x1b0),a0_0x379b23(0x12e))['action'](async _0x590161=>{const _0x401cb4=a0_0x379b23,_0x79647c=new ContextCommand(),_0x4af760=program[_0x401cb4(0xbd)](),_0x4689ea=await _0x79647c['run']({'options':{..._0x4af760,..._0x590161},'args':[],'tdx':null});process['exit'](_0x4689ea);}),program[a0_0x379b23(0x161)]('use\x20[resource]\x20[value]')[a0_0x379b23(0xdc)]('Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)')['action'](async(_0x5302af,_0x17ae61,_0x1f8b07)=>{const _0x18751f=a0_0x379b23,_0x51c7fd=new UseCommand(),_0x242a43=program[_0x18751f(0xbd)](),_0x49394b=[];if(_0x5302af)_0x49394b[_0x18751f(0x13d)](_0x5302af);if(_0x17ae61)_0x49394b[_0x18751f(0x13d)](_0x17ae61);const _0x3bc197=await _0x51c7fd[_0x18751f(0x142)]({'options':{..._0x242a43,..._0x1f8b07},'args':_0x49394b,'tdx':null});process[_0x18751f(0xee)](_0x3bc197);}),program[a0_0x379b23(0x161)]('profiles')['description'](a0_0x379b23(0x1c1))[a0_0x379b23(0xc9)](async _0x44024d=>{const _0x1e52ec=a0_0x379b23,_0x37a1a=new ProfilesCommand(),_0x329366=program[_0x1e52ec(0xbd)](),_0x273caa=await _0x37a1a[_0x1e52ec(0x142)]({'options':{..._0x329366,..._0x44024d},'args':[],'tdx':null});process['exit'](_0x273caa);}),program['parse'](process[a0_0x379b23(0xbf)]);!process['argv'][a0_0x379b23(0x140)](0x2)[a0_0x379b23(0x166)]&&program['outputHelp']();const currentVersion=packageJson[a0_0x379b23(0x191)];process[a0_0x379b23(0x17a)][a0_0x379b23(0x1be)]&&process['argv'][a0_0x379b23(0x166)]>0x2&&!currentVersion[a0_0x379b23(0xf5)](a0_0x379b23(0xcb))&&checkForUpdate(currentVersion)[a0_0x379b23(0x1fa)](_0x5a8f62=>{_0x5a8f62&&displayUpdateNotification(_0x5a8f62);})['catch'](()=>{});
@@ -1 +1 @@
1
- const a1_0x1435cc=a1_0x582f;(function(_0x541504,_0x1cb0b7){const _0x33ef5=a1_0x582f,_0x2dc059=_0x541504();while(!![]){try{const _0x4e9187=parseInt(_0x33ef5(0xec))/0x1+parseInt(_0x33ef5(0xd1))/0x2*(-parseInt(_0x33ef5(0xcf))/0x3)+parseInt(_0x33ef5(0xca))/0x4*(-parseInt(_0x33ef5(0xce))/0x5)+-parseInt(_0x33ef5(0xcb))/0x6+-parseInt(_0x33ef5(0xf1))/0x7*(parseInt(_0x33ef5(0xcc))/0x8)+parseInt(_0x33ef5(0xf7))/0x9*(-parseInt(_0x33ef5(0xf5))/0xa)+parseInt(_0x33ef5(0xc5))/0xb;if(_0x4e9187===_0x1cb0b7)break;else _0x2dc059['push'](_0x2dc059['shift']());}catch(_0x5d75a4){_0x2dc059['push'](_0x2dc059['shift']());}}}(a1_0x599c,0xaf3cd));function a1_0x599c(){const _0x753752=['audienceId','getParentSegmentSQL','/entities/folders/','updatedAt','name','apiKey','updateSegment','getSegmentFolder','application/vnd.treasuredata.v1+json','PUT','/segments/','parentFolderId','/entities/parent_segments','getParentSegment','listParentSegments','/folders','getParentSegmentFull','/syndications','site','listSegmentFolders','/segments/query','1417201EhDZhX','GET','request','query','data','287IQHjqr','createParentSegment','listSegments','isArray','10AveLqS','rule','6044967chUAto','createSegmentFolder','/segments','getSegmentSQL','38384203TbuajH','/audiences','httpClient','POST','/entities/parent_segments/','4UYScRk','8293596wBZLFT','70696sChSWs','updateParentSegment','4144145RvGjlh','108903NfpdCb','authHeaders','52vsXJYa','createSegment','/audiences/','sql','application/json','getSegment'];a1_0x599c=function(){return _0x753752;};return a1_0x599c();}function a1_0x582f(_0x4b6c9c,_0x3a0890){const _0x599cb2=a1_0x599c();return a1_0x582f=function(_0x582fac,_0x469a02){_0x582fac=_0x582fac-0xc5;let _0x1efc7d=_0x599cb2[_0x582fac];return _0x1efc7d;},a1_0x582f(_0x4b6c9c,_0x3a0890);}import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class CDPClient{[a1_0x1435cc(0xc7)];[a1_0x1435cc(0xd0)];constructor(_0x131f91,_0x3136b0){const _0x4f6aa6=a1_0x1435cc,_0x7f36f2=getEndpoint(_0x131f91[_0x4f6aa6(0xe9)],'cdp');this[_0x4f6aa6(0xd0)]=toHeaderRecord(getAuthHeaders(_0x131f91[_0x4f6aa6(0xe9)],_0x131f91[_0x4f6aa6(0xdc)])),this['httpClient']=new HTTPClient(_0x7f36f2,{...this[_0x4f6aa6(0xd0)],'Accept':_0x4f6aa6(0xdf),'Content-Type':_0x4f6aa6(0xd5)},_0x3136b0);}async[a1_0x1435cc(0xe5)](){const _0x3372ea=a1_0x1435cc,_0x455f8e=_0x3372ea(0xe3),_0x3e62e0=await this[_0x3372ea(0xc7)][_0x3372ea(0xee)](_0x3372ea(0xed),_0x455f8e);return Array[_0x3372ea(0xf4)](_0x3e62e0)?_0x3e62e0:_0x3e62e0['data'];}async[a1_0x1435cc(0xe4)](_0x24fd08){const _0x5ae948=a1_0x1435cc,_0x4f0039=_0x5ae948(0xc9)+_0x24fd08,_0x478899=await this[_0x5ae948(0xc7)][_0x5ae948(0xee)](_0x5ae948(0xed),_0x4f0039);return _0x5ae948(0xf0)in _0x478899?_0x478899['data']:_0x478899;}async[a1_0x1435cc(0xf3)](_0x302c62){const _0x17abfc=a1_0x1435cc,_0x1cb433=_0x17abfc(0xd3)+_0x302c62+_0x17abfc(0xf9),_0x4c4984=await this[_0x17abfc(0xc7)][_0x17abfc(0xee)](_0x17abfc(0xed),_0x1cb433);return Array[_0x17abfc(0xf4)](_0x4c4984)?_0x4c4984:_0x4c4984['data'];}async[a1_0x1435cc(0xd6)](_0x38ec31,_0x356896){const _0x568774=a1_0x1435cc,_0xfe7808=_0x568774(0xd3)+_0x38ec31+_0x568774(0xe1)+_0x356896,_0x10b70f=await this[_0x568774(0xc7)]['request'](_0x568774(0xed),_0xfe7808);return _0x568774(0xf0)in _0x10b70f?_0x10b70f[_0x568774(0xf0)]:_0x10b70f;}async[a1_0x1435cc(0xea)](_0x115568){const _0x30dcbe=a1_0x1435cc,_0x1de829=_0x30dcbe(0xd3)+_0x115568+_0x30dcbe(0xe6),_0x4f3e45=await this['httpClient'][_0x30dcbe(0xee)]('GET',_0x1de829);return Array['isArray'](_0x4f3e45)?_0x4f3e45:_0x4f3e45[_0x30dcbe(0xf0)];}async[a1_0x1435cc(0xde)](_0x3e88f4){const _0x7e435e=a1_0x1435cc,_0x4ad139=_0x7e435e(0xd9)+_0x3e88f4,_0xdc0350=await this[_0x7e435e(0xc7)][_0x7e435e(0xee)](_0x7e435e(0xed),_0x4ad139);return _0x7e435e(0xf0)in _0xdc0350?_0xdc0350[_0x7e435e(0xf0)]:_0xdc0350;}async['listActivations'](_0x29a9eb,_0x8c05f1){const _0x4c505e=a1_0x1435cc,_0x56fbf8=_0x4c505e(0xd3)+_0x29a9eb+_0x4c505e(0xe1)+_0x8c05f1+_0x4c505e(0xe8),_0x4f13e0=await this[_0x4c505e(0xc7)][_0x4c505e(0xee)]('GET',_0x56fbf8);return Array[_0x4c505e(0xf4)](_0x4f13e0)?_0x4f13e0:_0x4f13e0['data'];}async[a1_0x1435cc(0xd8)](_0xe4bb14){const _0xd66f98=a1_0x1435cc,_0x8ee97b=_0xd66f98(0xd3)+_0xe4bb14+'/segments/query',_0x32f822=await this[_0xd66f98(0xc7)][_0xd66f98(0xee)](_0xd66f98(0xc8),_0x8ee97b,{'body':{'format':'sql'}});return _0x32f822[_0xd66f98(0xd4)]||_0x32f822[_0xd66f98(0xef)]||'';}async[a1_0x1435cc(0xfa)](_0x2e0ab9,_0x129070){const _0x3ab8e4=a1_0x1435cc,_0x377059=await this[_0x3ab8e4(0xd6)](_0x2e0ab9,_0x129070),_0x236497={'format':_0x3ab8e4(0xd4)};_0x3ab8e4(0xf6)in _0x377059&&_0x377059[_0x3ab8e4(0xf6)]&&(_0x236497[_0x3ab8e4(0xf6)]=_0x377059['rule']);const _0x3aef6b=_0x3ab8e4(0xd3)+_0x2e0ab9+_0x3ab8e4(0xeb),_0x313c1c=await this[_0x3ab8e4(0xc7)][_0x3ab8e4(0xee)](_0x3ab8e4(0xc8),_0x3aef6b,{'body':_0x236497});return _0x313c1c[_0x3ab8e4(0xd4)]||_0x313c1c[_0x3ab8e4(0xef)]||'';}async[a1_0x1435cc(0xf2)](_0x1a51d6){const _0x28ef8a=a1_0x1435cc,_0x301903=_0x28ef8a(0xc6),_0x566826=await this[_0x28ef8a(0xc7)][_0x28ef8a(0xee)](_0x28ef8a(0xc8),_0x301903,{'body':_0x1a51d6,'headers':{'Content-Type':_0x28ef8a(0xdf)}});return _0x566826;}async[a1_0x1435cc(0xcd)](_0x26c0e0,_0x38fe90){const _0xeb08ef=a1_0x1435cc,_0x5460ed=_0xeb08ef(0xd3)+_0x26c0e0,_0x34075b=await this[_0xeb08ef(0xc7)][_0xeb08ef(0xee)](_0xeb08ef(0xe0),_0x5460ed,{'body':_0x38fe90,'headers':{'Content-Type':'application/vnd.treasuredata.v1+json'}});return _0x34075b;}async[a1_0x1435cc(0xe7)](_0x4f81b7){const _0x1453ee=a1_0x1435cc,_0x2b005e=_0x1453ee(0xd3)+_0x4f81b7,_0x47bf75=await this[_0x1453ee(0xc7)][_0x1453ee(0xee)]('GET',_0x2b005e,{'headers':{'Accept':_0x1453ee(0xdf)}});return _0x47bf75;}async[a1_0x1435cc(0xd2)](_0x1840e6,_0x56ed43){const _0x462649=a1_0x1435cc,_0x329271=_0x462649(0xd3)+_0x1840e6+_0x462649(0xf9),_0x288140=await this[_0x462649(0xc7)][_0x462649(0xee)](_0x462649(0xc8),_0x329271,{'body':_0x56ed43});return _0x288140;}async[a1_0x1435cc(0xdd)](_0x44ab09,_0x5b165c,_0x1bdfd5){const _0x4db11e=a1_0x1435cc,_0x2850fc=_0x4db11e(0xd3)+_0x44ab09+_0x4db11e(0xe1)+_0x5b165c,_0x4f3883=await this[_0x4db11e(0xc7)][_0x4db11e(0xee)](_0x4db11e(0xe0),_0x2850fc,{'body':_0x1bdfd5});return _0x4f3883;}async[a1_0x1435cc(0xf8)](_0xd5e5fd,_0x313151){const _0x1b8c4c=a1_0x1435cc,_0x1c280f=_0x1b8c4c(0xd3)+_0xd5e5fd+_0x1b8c4c(0xe6),_0x3b3ee8=await this[_0x1b8c4c(0xc7)]['request'](_0x1b8c4c(0xc8),_0x1c280f,{'body':_0x313151});if(_0x1b8c4c(0xf0)in _0x3b3ee8&&_0x3b3ee8[_0x1b8c4c(0xf0)]){const _0x44da9c=_0x3b3ee8['data'];return{'id':_0x44da9c['id'],'name':_0x44da9c[_0x1b8c4c(0xdb)],'description':_0x44da9c['description'],'audienceId':_0x44da9c[_0x1b8c4c(0xd7)]||String(_0xd5e5fd),'parentFolderId':_0x44da9c[_0x1b8c4c(0xe2)],'createdAt':_0x44da9c['createdAt'],'updatedAt':_0x44da9c[_0x1b8c4c(0xda)]};}return _0x3b3ee8;}}
1
+ const a1_0x461023=a1_0x2c7e;function a1_0x76ac(){const _0x224c51=['site','/entities/parent_segments','updateSegment','cdp','apiKey','270174KlBSUV','createSegmentFolder','/audiences/','query','1329408CxSslX','getSegment','rule','362485wUTfog','/segments/query','application/vnd.treasuredata.v1+json','request','1942036lsoVYN','sql','/folders','GET','isArray','/segments','data','/entities/parent_segments/','259dLpVDq','getParentSegmentSQL','getParentSegmentFull','/audiences','POST','3fXSiMa','651415mkUsmw','16498350leWqIJ','/entities/folders/','parentFolderId','/segments/','getSegmentFolder','/syndications','listActivations','updatedAt','listSegments','listParentSegments','listSegmentFolders','27368aFCHpK','createParentSegment','httpClient','authHeaders','getParentSegment'];a1_0x76ac=function(){return _0x224c51;};return a1_0x76ac();}(function(_0x32931e,_0x2de625){const _0x3c0e55=a1_0x2c7e,_0x395e4b=_0x32931e();while(!![]){try{const _0x2cf102=-parseInt(_0x3c0e55(0x1f0))/0x1+-parseInt(_0x3c0e55(0x1ed))/0x2+-parseInt(_0x3c0e55(0x1d2))/0x3*(parseInt(_0x3c0e55(0x1f4))/0x4)+parseInt(_0x3c0e55(0x1d3))/0x5+parseInt(_0x3c0e55(0x1e9))/0x6+-parseInt(_0x3c0e55(0x1fc))/0x7*(parseInt(_0x3c0e55(0x1df))/0x8)+parseInt(_0x3c0e55(0x1d4))/0x9;if(_0x2cf102===_0x2de625)break;else _0x395e4b['push'](_0x395e4b['shift']());}catch(_0x2233a1){_0x395e4b['push'](_0x395e4b['shift']());}}}(a1_0x76ac,0x5a223));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';function a1_0x2c7e(_0x3bd2f9,_0x1d21ae){const _0x76acc7=a1_0x76ac();return a1_0x2c7e=function(_0x2c7e75,_0x380357){_0x2c7e75=_0x2c7e75-0x1d1;let _0x3326da=_0x76acc7[_0x2c7e75];return _0x3326da;},a1_0x2c7e(_0x3bd2f9,_0x1d21ae);}import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class CDPClient{[a1_0x461023(0x1e1)];[a1_0x461023(0x1e2)];constructor(_0xdbea4f,_0x28a7a7){const _0x358640=a1_0x461023,_0x248697=getEndpoint(_0xdbea4f[_0x358640(0x1e4)],_0x358640(0x1e7));this[_0x358640(0x1e2)]=toHeaderRecord(getAuthHeaders(_0xdbea4f['site'],_0xdbea4f[_0x358640(0x1e8)])),this[_0x358640(0x1e1)]=new HTTPClient(_0x248697,{...this['authHeaders'],'Accept':_0x358640(0x1f2),'Content-Type':'application/json'},_0x28a7a7);}async[a1_0x461023(0x1dd)](){const _0x41a00f=a1_0x461023,_0x3944b0=_0x41a00f(0x1e5),_0x36b888=await this['httpClient']['request'](_0x41a00f(0x1f7),_0x3944b0);return Array[_0x41a00f(0x1f8)](_0x36b888)?_0x36b888:_0x36b888['data'];}async[a1_0x461023(0x1e3)](_0x1f2d83){const _0x4e07ba=a1_0x461023,_0x39679f=_0x4e07ba(0x1fb)+_0x1f2d83,_0x276e0b=await this[_0x4e07ba(0x1e1)][_0x4e07ba(0x1f3)](_0x4e07ba(0x1f7),_0x39679f);return _0x4e07ba(0x1fa)in _0x276e0b?_0x276e0b[_0x4e07ba(0x1fa)]:_0x276e0b;}async[a1_0x461023(0x1dc)](_0x24cec0){const _0x22c065=a1_0x461023,_0x101529='/audiences/'+_0x24cec0+_0x22c065(0x1f9),_0x23a2da=await this[_0x22c065(0x1e1)]['request'](_0x22c065(0x1f7),_0x101529);return Array[_0x22c065(0x1f8)](_0x23a2da)?_0x23a2da:_0x23a2da[_0x22c065(0x1fa)];}async[a1_0x461023(0x1ee)](_0x3770f6,_0x3b8412){const _0x147489=a1_0x461023,_0x3a1135=_0x147489(0x1eb)+_0x3770f6+'/segments/'+_0x3b8412,_0x500f38=await this[_0x147489(0x1e1)]['request'](_0x147489(0x1f7),_0x3a1135);return'data'in _0x500f38?_0x500f38[_0x147489(0x1fa)]:_0x500f38;}async[a1_0x461023(0x1de)](_0x56eb7c){const _0x234930=a1_0x461023,_0x5c506f=_0x234930(0x1eb)+_0x56eb7c+_0x234930(0x1f6),_0x2c0b69=await this[_0x234930(0x1e1)][_0x234930(0x1f3)](_0x234930(0x1f7),_0x5c506f);return Array[_0x234930(0x1f8)](_0x2c0b69)?_0x2c0b69:_0x2c0b69[_0x234930(0x1fa)];}async[a1_0x461023(0x1d8)](_0x1fe219){const _0x5194da=a1_0x461023,_0x49a5fd=_0x5194da(0x1d5)+_0x1fe219,_0x1fd75a=await this[_0x5194da(0x1e1)][_0x5194da(0x1f3)](_0x5194da(0x1f7),_0x49a5fd);return _0x5194da(0x1fa)in _0x1fd75a?_0x1fd75a['data']:_0x1fd75a;}async[a1_0x461023(0x1da)](_0x41205a,_0x1faddd){const _0x585ff7=a1_0x461023,_0x55095e=_0x585ff7(0x1eb)+_0x41205a+_0x585ff7(0x1d7)+_0x1faddd+_0x585ff7(0x1d9),_0x4c57d4=await this[_0x585ff7(0x1e1)][_0x585ff7(0x1f3)](_0x585ff7(0x1f7),_0x55095e);return Array[_0x585ff7(0x1f8)](_0x4c57d4)?_0x4c57d4:_0x4c57d4[_0x585ff7(0x1fa)];}async[a1_0x461023(0x1fd)](_0x3c3a1e){const _0x14cb4d=a1_0x461023,_0xe2faaf=_0x14cb4d(0x1eb)+_0x3c3a1e+_0x14cb4d(0x1f1),_0x3b7103=await this[_0x14cb4d(0x1e1)][_0x14cb4d(0x1f3)](_0x14cb4d(0x1d1),_0xe2faaf,{'body':{'format':_0x14cb4d(0x1f5)}});return _0x3b7103[_0x14cb4d(0x1f5)]||_0x3b7103[_0x14cb4d(0x1ec)]||'';}async['getSegmentSQL'](_0x25fb8c,_0xc9f2f0){const _0x54d84b=a1_0x461023,_0x41e649=await this[_0x54d84b(0x1ee)](_0x25fb8c,_0xc9f2f0),_0x3ab0b7={'format':_0x54d84b(0x1f5)};_0x54d84b(0x1ef)in _0x41e649&&_0x41e649['rule']&&(_0x3ab0b7[_0x54d84b(0x1ef)]=_0x41e649[_0x54d84b(0x1ef)]);const _0x3c830b=_0x54d84b(0x1eb)+_0x25fb8c+_0x54d84b(0x1f1),_0x55e867=await this[_0x54d84b(0x1e1)][_0x54d84b(0x1f3)](_0x54d84b(0x1d1),_0x3c830b,{'body':_0x3ab0b7});return _0x55e867[_0x54d84b(0x1f5)]||_0x55e867[_0x54d84b(0x1ec)]||'';}async[a1_0x461023(0x1e0)](_0x452d41){const _0x14ee71=a1_0x461023,_0x5173f9=_0x14ee71(0x1ff),_0x46ff0b=await this[_0x14ee71(0x1e1)][_0x14ee71(0x1f3)](_0x14ee71(0x1d1),_0x5173f9,{'body':_0x452d41,'headers':{'Content-Type':'application/vnd.treasuredata.v1+json'}});return _0x46ff0b;}async['updateParentSegment'](_0x5f8ad8,_0xdf4b2d){const _0x2196f0=a1_0x461023,_0x4899dd=_0x2196f0(0x1eb)+_0x5f8ad8,_0x28b751=await this['httpClient']['request']('PUT',_0x4899dd,{'body':_0xdf4b2d,'headers':{'Content-Type':'application/vnd.treasuredata.v1+json'}});return _0x28b751;}async[a1_0x461023(0x1fe)](_0x24d663){const _0x4ee127=a1_0x461023,_0x4df2b7=_0x4ee127(0x1eb)+_0x24d663,_0x1c8b1d=await this[_0x4ee127(0x1e1)][_0x4ee127(0x1f3)]('GET',_0x4df2b7,{'headers':{'Accept':_0x4ee127(0x1f2)}});return _0x1c8b1d;}async['createSegment'](_0x4040b1,_0x578148){const _0x497a60=a1_0x461023,_0x44f593=_0x497a60(0x1eb)+_0x4040b1+_0x497a60(0x1f9),_0x526a23=await this[_0x497a60(0x1e1)]['request'](_0x497a60(0x1d1),_0x44f593,{'body':_0x578148});return _0x526a23;}async[a1_0x461023(0x1e6)](_0x1a9aa6,_0x262716,_0x286de7){const _0x3a1f39=a1_0x461023,_0x47ba5d=_0x3a1f39(0x1eb)+_0x1a9aa6+'/segments/'+_0x262716,_0x359c75=await this[_0x3a1f39(0x1e1)][_0x3a1f39(0x1f3)]('PUT',_0x47ba5d,{'body':_0x286de7});return _0x359c75;}async[a1_0x461023(0x1ea)](_0x473911,_0x36be04){const _0x11471b=a1_0x461023,_0x1202fa='/audiences/'+_0x473911+_0x11471b(0x1f6),_0x410e96=await this[_0x11471b(0x1e1)][_0x11471b(0x1f3)]('POST',_0x1202fa,{'body':_0x36be04});if(_0x11471b(0x1fa)in _0x410e96&&_0x410e96['data']){const _0x5e891d=_0x410e96[_0x11471b(0x1fa)];return{'id':_0x5e891d['id'],'name':_0x5e891d['name'],'description':_0x5e891d['description'],'audienceId':_0x5e891d['audienceId']||String(_0x473911),'parentFolderId':_0x5e891d[_0x11471b(0x1d6)],'createdAt':_0x5e891d['createdAt'],'updatedAt':_0x5e891d[_0x11471b(0x1db)]};}return _0x410e96;}}
@@ -1 +1 @@
1
- const a2_0x193129=a2_0x514b;(function(_0x2bb6d6,_0x169270){const _0x22ee1a=a2_0x514b,_0x443d5c=_0x2bb6d6();while(!![]){try{const _0x501bc2=-parseInt(_0x22ee1a(0xfc))/0x1+-parseInt(_0x22ee1a(0xd9))/0x2*(-parseInt(_0x22ee1a(0xeb))/0x3)+parseInt(_0x22ee1a(0x10d))/0x4+-parseInt(_0x22ee1a(0x112))/0x5+-parseInt(_0x22ee1a(0x108))/0x6*(-parseInt(_0x22ee1a(0x100))/0x7)+-parseInt(_0x22ee1a(0xe7))/0x8*(-parseInt(_0x22ee1a(0xe6))/0x9)+parseInt(_0x22ee1a(0xed))/0xa*(-parseInt(_0x22ee1a(0xfe))/0xb);if(_0x501bc2===_0x169270)break;else _0x443d5c['push'](_0x443d5c['shift']());}catch(_0x3fb5b1){_0x443d5c['push'](_0x443d5c['shift']());}}}(a2_0x26e0,0x844c9));import{ErrorCode,SDKError}from'../sdk/errors.js';import a2_0x14cdfd from'json-bigint';function a2_0x26e0(){const _0x555fb9=['arraybuffer','code','name',']:\x20','pow','498WbUfWr','arrayBuffer','\x20failed:\x20',']\x20Request\x20to\x20','status','4196720atsuAZ','headers','HTTP_REQUEST_FAILURE','combineSignals','aborted','781845vILQeg','\x0a\x20\x20URL:\x20','safeParseJSON','retryConfig','instance','forEach','stringify','defaultHeaders','parseProblemDetails','problemDetails','text','trace','addEventListener','type','round','application/json','signal','about:blank','Request\x20cancelled\x20by\x20user','INTERNAL','ms...','string','\x0a\x20\x20Details:\x20','debug','Error','6vYGRMB','object','retrying\x20in\x20','RATE_LIMITED','PERMISSION_DENIED','warn',']\x20Request\x20failed\x20with\x20HTTP\x20','Retry-After','Request:\x20','baseUrl','logger','min','[Retry\x20','18UKLnMY','3556984OaZnVG','requestSSE','parse','baseDelay','499935ofKtof','sleep','20WwqjOV','from','title','An\x20error\x20occurred','maxDelay','statusText','HTTP\x20','detail','Response\x20[','Content-Type','random','abort','get','AbortError','request','928894cvYwps','json','5546706oKybfB','message','16639oeIglF',']\x20Request\x20failed\x20with\x20','body'];a2_0x26e0=function(){return _0x555fb9;};return a2_0x26e0();}const DEFAULT_RETRY_CONFIG={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1f40};function a2_0x514b(_0x35e2f,_0x2a08b8){const _0x26e08e=a2_0x26e0();return a2_0x514b=function(_0x514b15,_0x34c69c){_0x514b15=_0x514b15-0xd0;let _0x686da0=_0x26e08e[_0x514b15];return _0x686da0;},a2_0x514b(_0x35e2f,_0x2a08b8);}function isRetryableError(_0x9c03cd){return _0x9c03cd>=0x1f4||_0x9c03cd===0x1ad;}function getRetryDelay(_0x2ad49d,_0x303cb7){const _0x393193=a2_0x514b,_0x2b6672=Math[_0x393193(0xe4)](_0x303cb7[_0x393193(0xea)]*Math[_0x393193(0x107)](0x2,_0x2ad49d),_0x303cb7[_0x393193(0xf1)]);return Math[_0x393193(0xf7)]()*_0x2b6672;}function statusCodeToErrorCode(_0xd43af1){const _0x23463a=a2_0x514b;if(_0xd43af1===0x191)return ErrorCode['UNAUTHENTICATED'];else{if(_0xd43af1===0x193)return ErrorCode[_0x23463a(0xdd)];else{if(_0xd43af1===0x194)return ErrorCode['NOT_FOUND'];else{if(_0xd43af1===0x1ad)return ErrorCode[_0x23463a(0xdc)];else return _0xd43af1>=0x1f4?ErrorCode['UNAVAILABLE']:ErrorCode['INVALID_ARGUMENT'];}}}}export class HTTPClientError extends Error{['status'];[a2_0x193129(0x11b)];[a2_0x193129(0x104)];constructor(_0x2a0141,_0x407828,_0x3fe4a9){const _0x471496=a2_0x193129,_0x21588e=statusCodeToErrorCode(_0x407828);super('['+_0x21588e+']\x20'+_0x2a0141),this[_0x471496(0x10c)]=_0x407828,this['problemDetails']=_0x3fe4a9,this[_0x471496(0x105)]='HTTPClientError',this[_0x471496(0x104)]=_0x21588e;}}export class HTTPClient{[a2_0x193129(0x115)];[a2_0x193129(0xe2)];[a2_0x193129(0x119)];[a2_0x193129(0xe3)];constructor(_0x412c25,_0x210e3e,_0x1e9f97,_0x261bc8){const _0x155d23=a2_0x193129;this['baseUrl']=_0x412c25,this[_0x155d23(0x119)]=_0x210e3e,this[_0x155d23(0x115)]={...DEFAULT_RETRY_CONFIG,..._0x261bc8},this[_0x155d23(0xe3)]=_0x1e9f97;}async[a2_0x193129(0xfb)](_0x2d1374,_0x438aea,_0x56c37a={}){const _0x4e5851=a2_0x193129,{headers:headers={},body:_0x59a32c,timeout:timeout=0x7530,retries:retries=this[_0x4e5851(0x115)]['maxRetries'],signal:_0x166341,includeHeaders:includeHeaders=![],responseType:responseType=_0x4e5851(0xfd)}=_0x56c37a,_0x3ab68b=''+this['baseUrl']+_0x438aea;this[_0x4e5851(0xe3)]['info'](_0x4e5851(0xe1)+_0x2d1374+'\x20'+_0x3ab68b);const _0x198bc1={...this[_0x4e5851(0x119)],...headers};if(_0x59a32c&&!_0x198bc1[_0x4e5851(0xf6)]){if(_0x59a32c instanceof Buffer){}else _0x198bc1['Content-Type']=_0x4e5851(0x121);}let _0x34adc6;_0x59a32c&&(_0x59a32c instanceof Buffer?_0x34adc6=_0x59a32c:_0x34adc6=typeof _0x59a32c===_0x4e5851(0xd5)?_0x59a32c:JSON[_0x4e5851(0x118)](_0x59a32c));let _0x968207=null;for(let _0x568872=0x0;_0x568872<=retries;_0x568872++){try{const _0x36a6ce=new AbortController(),_0x25a019=setTimeout(()=>_0x36a6ce[_0x4e5851(0xf8)](),timeout);if(_0x166341){if(_0x166341[_0x4e5851(0x111)])throw new Error(_0x4e5851(0xd2));_0x166341['addEventListener'](_0x4e5851(0xf8),()=>_0x36a6ce[_0x4e5851(0xf8)](),{'once':!![]});}const _0x1804ea=await fetch(_0x3ab68b,{'method':_0x2d1374,'headers':_0x198bc1,'body':_0x34adc6,'signal':_0x36a6ce['signal']});clearTimeout(_0x25a019);if(_0x568872<retries&&isRetryableError(_0x1804ea[_0x4e5851(0x10c)])){const _0x2890ae=_0x1804ea[_0x4e5851(0x10e)][_0x4e5851(0xf9)](_0x4e5851(0xe0)),_0x201154=_0x2890ae?parseInt(_0x2890ae,0xa)*0x3e8:getRetryDelay(_0x568872,this[_0x4e5851(0x115)]);console[_0x4e5851(0xde)](_0x4e5851(0xe5)+(_0x568872+0x1)+'/'+retries+_0x4e5851(0x101)+_0x1804ea['status']+',\x20'+(_0x4e5851(0xdb)+Math[_0x4e5851(0x120)](_0x201154)+_0x4e5851(0xd4))),await this['sleep'](_0x201154);continue;}if(!_0x1804ea['ok']){const _0x532925=await this['safeParseJSON'](_0x1804ea),_0x4c81c8=this[_0x4e5851(0x11a)](_0x532925,_0x1804ea[_0x4e5851(0x10c)]);let _0x13874f;if(_0x1804ea['status']===0x191)_0x13874f=_0x4e5851(0xf3)+_0x1804ea['status']+':\x20'+_0x1804ea[_0x4e5851(0xf2)]+'\x0a\x20\x20URL:\x20'+_0x3ab68b;else{if(_0x4c81c8?.[_0x4e5851(0xf4)])_0x13874f=_0x4c81c8['detail'];else{if(_0x532925){const _0x56e3cb=JSON['stringify'](_0x532925);_0x13874f=_0x4e5851(0xf3)+_0x1804ea['status']+':\x20'+_0x1804ea[_0x4e5851(0xf2)]+_0x4e5851(0xd6)+_0x56e3cb;}else _0x13874f=_0x4e5851(0xf3)+_0x1804ea[_0x4e5851(0x10c)]+':\x20'+_0x1804ea[_0x4e5851(0xf2)];}}throw new HTTPClientError(_0x13874f,_0x1804ea[_0x4e5851(0x10c)],_0x4c81c8);}let _0x2888b3;if(responseType===_0x4e5851(0x103)){const _0x30460c=await _0x1804ea[_0x4e5851(0x109)]();_0x2888b3=Buffer[_0x4e5851(0xee)](_0x30460c);}else responseType===_0x4e5851(0x11c)?_0x2888b3=await _0x1804ea[_0x4e5851(0x11c)]():_0x2888b3=await this[_0x4e5851(0x114)](_0x1804ea);this[_0x4e5851(0xe3)][_0x4e5851(0xd7)](_0x4e5851(0xf5)+_0x1804ea[_0x4e5851(0x10c)]+_0x4e5851(0x106)+_0x2d1374+'\x20'+_0x438aea),this[_0x4e5851(0xe3)][_0x4e5851(0x11d)](JSON['stringify'](_0x2888b3,null,0x2));if(includeHeaders){const _0x439e0a={};return _0x1804ea['headers'][_0x4e5851(0x117)]((_0x540dfa,_0x3df761)=>{_0x439e0a[_0x3df761]=_0x540dfa;}),{'data':_0x2888b3,'status':_0x1804ea[_0x4e5851(0x10c)],'headers':_0x439e0a};}return _0x2888b3;}catch(_0x498804){_0x968207=_0x498804 instanceof Error?_0x498804:new Error(String(_0x498804));if(_0x498804 instanceof HTTPClientError&&!isRetryableError(_0x498804[_0x4e5851(0x10c)]))throw _0x498804;if(_0x568872>=retries)throw _0x968207;const _0x42eec8=getRetryDelay(_0x568872,this[_0x4e5851(0x115)]);let _0x401b4e;_0x968207 instanceof HTTPClientError?_0x401b4e='[Retry\x20'+(_0x568872+0x1)+'/'+retries+_0x4e5851(0xdf)+_0x968207[_0x4e5851(0x10c)]+':\x20'+_0x968207[_0x4e5851(0xff)]+',\x20'+(_0x4e5851(0xdb)+Math['round'](_0x42eec8)+'ms...'):_0x401b4e=_0x4e5851(0xe5)+(_0x568872+0x1)+'/'+retries+_0x4e5851(0x10b)+_0x3ab68b+'\x20failed:\x20'+_0x968207['message']+',\x20'+(_0x4e5851(0xdb)+Math['round'](_0x42eec8)+_0x4e5851(0xd4)),console[_0x4e5851(0xde)](_0x401b4e),await this[_0x4e5851(0xec)](_0x42eec8);}}if(_0x968207&&!(_0x968207 instanceof HTTPClientError))throw new SDKError(ErrorCode[_0x4e5851(0x10f)],'Request\x20to\x20'+_0x3ab68b+_0x4e5851(0x10a)+_0x968207[_0x4e5851(0xff)],_0x968207);throw _0x968207||new SDKError(ErrorCode[_0x4e5851(0xd3)],'Request\x20failed\x20after\x20retries');}async[a2_0x193129(0x114)](_0x2e9d77){const _0x47fc97=a2_0x193129,_0x5bb077=await _0x2e9d77[_0x47fc97(0x11c)]();if(!_0x5bb077)return null;try{const _0x4214c3=a2_0x14cdfd({'storeAsString':!![]});return _0x4214c3[_0x47fc97(0xe9)](_0x5bb077);}catch{return{'body':_0x5bb077};}}[a2_0x193129(0x11a)](_0x5590b9,_0x29a776){const _0x5a6d3c=a2_0x193129;if(!_0x5590b9||typeof _0x5590b9!==_0x5a6d3c(0xda))return undefined;const _0x18f067=_0x5590b9;if(_0x18f067[_0x5a6d3c(0x11f)]||_0x18f067[_0x5a6d3c(0xef)]||_0x18f067['detail'])return{'type':_0x18f067[_0x5a6d3c(0x11f)]||_0x5a6d3c(0xd1),'title':_0x18f067[_0x5a6d3c(0xef)]||_0x5a6d3c(0xd8),'status':_0x18f067[_0x5a6d3c(0x10c)]||_0x29a776,'detail':_0x18f067[_0x5a6d3c(0xf4)]||_0x5a6d3c(0xf0),'instance':_0x18f067[_0x5a6d3c(0x116)]||'',..._0x18f067};return undefined;}[a2_0x193129(0xec)](_0x50e076){return new Promise(_0x5970d9=>setTimeout(_0x5970d9,_0x50e076));}async[a2_0x193129(0xe8)](_0x6949b,_0x2917de,_0x26d3ee={}){const _0x258d0c=a2_0x193129,{headers:headers={},body:_0x42b2aa,timeout:timeout=0x7530,signal:_0x3100b2}=_0x26d3ee,_0x563571=''+this[_0x258d0c(0xe2)]+_0x2917de,_0x29e108={...this[_0x258d0c(0x119)],...headers},_0x10832e=new AbortController(),_0x491e69=setTimeout(()=>_0x10832e['abort'](),timeout),_0x1144c0=_0x3100b2?[_0x10832e[_0x258d0c(0xd0)],_0x3100b2]:[_0x10832e[_0x258d0c(0xd0)]],_0x47a683=this[_0x258d0c(0x110)](_0x1144c0);try{const _0x491558={'method':_0x6949b,'headers':_0x29e108,'signal':_0x47a683};if(_0x42b2aa){if(typeof _0x42b2aa===_0x258d0c(0xd5))_0x491558[_0x258d0c(0x102)]=_0x42b2aa;else _0x42b2aa instanceof Buffer?_0x491558[_0x258d0c(0x102)]=_0x42b2aa:_0x491558[_0x258d0c(0x102)]=JSON[_0x258d0c(0x118)](_0x42b2aa);}const _0x56e0e1=await fetch(_0x563571,_0x491558);clearTimeout(_0x491e69);if(!_0x56e0e1['ok']){const _0xcd73ba=await this['safeParseJSON'](_0x56e0e1),_0x52daf5=this[_0x258d0c(0x11a)](_0xcd73ba,_0x56e0e1['status']);let _0x4d2e90;if(_0x56e0e1[_0x258d0c(0x10c)]===0x191)_0x4d2e90=_0x258d0c(0xf3)+_0x56e0e1[_0x258d0c(0x10c)]+':\x20'+_0x56e0e1['statusText']+_0x258d0c(0x113)+_0x563571;else{if(_0x52daf5?.[_0x258d0c(0xf4)])_0x4d2e90=_0x52daf5[_0x258d0c(0xf4)];else{if(_0xcd73ba){const _0x181179=JSON[_0x258d0c(0x118)](_0xcd73ba);_0x4d2e90=_0x258d0c(0xf3)+_0x56e0e1[_0x258d0c(0x10c)]+':\x20'+_0x56e0e1['statusText']+_0x258d0c(0xd6)+_0x181179;}else _0x4d2e90=_0x258d0c(0xf3)+_0x56e0e1[_0x258d0c(0x10c)]+':\x20'+_0x56e0e1['statusText'];}}throw new HTTPClientError(_0x4d2e90,_0x56e0e1[_0x258d0c(0x10c)],_0x52daf5);}return _0x56e0e1;}catch(_0x111588){clearTimeout(_0x491e69);if(_0x111588 instanceof HTTPClientError)throw _0x111588;if(_0x111588[_0x258d0c(0x105)]===_0x258d0c(0xfa))throw new Error(_0x258d0c(0xd2));throw _0x111588;}}['combineSignals'](_0x421de0){const _0x58fde1=a2_0x193129,_0x4a1a0=new AbortController();for(const _0x33ae84 of _0x421de0){if(_0x33ae84['aborted'])return _0x4a1a0[_0x58fde1(0xf8)](),_0x4a1a0[_0x58fde1(0xd0)];_0x33ae84[_0x58fde1(0x11e)](_0x58fde1(0xf8),()=>_0x4a1a0[_0x58fde1(0xf8)](),{'once':!![]});}return _0x4a1a0['signal'];}}
1
+ const a2_0x49c076=a2_0xd6ac;(function(_0x10c57e,_0x41ff0e){const _0x150854=a2_0xd6ac,_0x15d6d8=_0x10c57e();while(!![]){try{const _0x83b24e=-parseInt(_0x150854(0x1f1))/0x1+parseInt(_0x150854(0x1f2))/0x2*(parseInt(_0x150854(0x20e))/0x3)+parseInt(_0x150854(0x1e7))/0x4*(-parseInt(_0x150854(0x1ec))/0x5)+-parseInt(_0x150854(0x20c))/0x6*(-parseInt(_0x150854(0x207))/0x7)+-parseInt(_0x150854(0x205))/0x8+-parseInt(_0x150854(0x226))/0x9+-parseInt(_0x150854(0x1f7))/0xa*(-parseInt(_0x150854(0x21f))/0xb);if(_0x83b24e===_0x41ff0e)break;else _0x15d6d8['push'](_0x15d6d8['shift']());}catch(_0x5a829c){_0x15d6d8['push'](_0x15d6d8['shift']());}}}(a2_0x86aa,0xea41d));import{ErrorCode,SDKError}from'../sdk/errors.js';import a2_0x10005b from'json-bigint';const DEFAULT_RETRY_CONFIG={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1f40};function isRetryableError(_0x51e670){return _0x51e670>=0x1f4||_0x51e670===0x1ad;}function a2_0x86aa(){const _0x5eb2c3=['detail','abort','body','string','ms...','Response\x20[','parse','instance','safeParseJSON','107128uejCzy','addEventListener','headers','title','logger','235ViJDEE','NOT_FOUND','trace','get','HTTPClientError','206571traUTs','117214UOBciX','retrying\x20in\x20','\x0a\x20\x20Details:\x20','text','RATE_LIMITED','3675430HAomrh','\x20failed:\x20','arrayBuffer','statusText','random','Request\x20cancelled\x20by\x20user','aborted','sleep','AbortError','baseDelay','name','parseProblemDetails','min','An\x20error\x20occurred','13876912uvSDzv','code','7geTlLD',']\x20Request\x20failed\x20with\x20HTTP\x20','\x0a\x20\x20URL:\x20','combineSignals','message','6655164KnljnV','from','24EAOWRX','UNAVAILABLE','requestSSE','debug','defaultHeaders','maxDelay','UNAUTHENTICATED','arraybuffer','baseUrl','forEach','status','HTTP_REQUEST_FAILURE','type','application/json','Request\x20failed\x20after\x20retries','stringify','round','110owTLzT','retryConfig','problemDetails',']\x20Request\x20failed\x20with\x20','Request:\x20','info','[Retry\x20','9846216VCuZJs',']:\x20','HTTP\x20','Retry-After','about:blank','INTERNAL','PERMISSION_DENIED','signal'];a2_0x86aa=function(){return _0x5eb2c3;};return a2_0x86aa();}function a2_0xd6ac(_0x9998cc,_0x222887){const _0x86aacd=a2_0x86aa();return a2_0xd6ac=function(_0xd6aca8,_0x2bf340){_0xd6aca8=_0xd6aca8-0x1d9;let _0x1e8ab7=_0x86aacd[_0xd6aca8];return _0x1e8ab7;},a2_0xd6ac(_0x9998cc,_0x222887);}function getRetryDelay(_0x19bec6,_0x5825ba){const _0x54c27a=a2_0xd6ac,_0x412348=Math[_0x54c27a(0x203)](_0x5825ba[_0x54c27a(0x200)]*Math['pow'](0x2,_0x19bec6),_0x5825ba[_0x54c27a(0x213)]);return Math[_0x54c27a(0x1fb)]()*_0x412348;}function statusCodeToErrorCode(_0x1c5c24){const _0x62e65=a2_0xd6ac;if(_0x1c5c24===0x191)return ErrorCode[_0x62e65(0x214)];else{if(_0x1c5c24===0x193)return ErrorCode[_0x62e65(0x1dc)];else{if(_0x1c5c24===0x194)return ErrorCode[_0x62e65(0x1ed)];else{if(_0x1c5c24===0x1ad)return ErrorCode[_0x62e65(0x1f6)];else return _0x1c5c24>=0x1f4?ErrorCode[_0x62e65(0x20f)]:ErrorCode['INVALID_ARGUMENT'];}}}}export class HTTPClientError extends Error{['status'];[a2_0x49c076(0x221)];[a2_0x49c076(0x206)];constructor(_0x17eb4b,_0x3c67c7,_0x173a04){const _0x164b35=a2_0x49c076,_0x8c043c=statusCodeToErrorCode(_0x3c67c7);super('['+_0x8c043c+']\x20'+_0x17eb4b),this[_0x164b35(0x218)]=_0x3c67c7,this[_0x164b35(0x221)]=_0x173a04,this['name']=_0x164b35(0x1f0),this[_0x164b35(0x206)]=_0x8c043c;}}export class HTTPClient{[a2_0x49c076(0x220)];[a2_0x49c076(0x216)];[a2_0x49c076(0x212)];[a2_0x49c076(0x1eb)];constructor(_0x266384,_0x3e8cbb,_0x2a94b8,_0x133232){const _0x4e9762=a2_0x49c076;this['baseUrl']=_0x266384,this[_0x4e9762(0x212)]=_0x3e8cbb,this[_0x4e9762(0x220)]={...DEFAULT_RETRY_CONFIG,..._0x133232},this[_0x4e9762(0x1eb)]=_0x2a94b8;}async['request'](_0x2aca80,_0x1f812c,_0x48e27e={}){const _0x41b209=a2_0x49c076,{headers:headers={},body:_0x1d52ba,timeout:timeout=0x7530,retries:retries=this[_0x41b209(0x220)]['maxRetries'],signal:_0x2d92bf,includeHeaders:includeHeaders=![],responseType:responseType='json'}=_0x48e27e,_0x1db3e8=''+this[_0x41b209(0x216)]+_0x1f812c;this[_0x41b209(0x1eb)][_0x41b209(0x224)](_0x41b209(0x223)+_0x2aca80+'\x20'+_0x1db3e8);const _0x4d9b1b={...this['defaultHeaders'],...headers};if(_0x1d52ba&&!_0x4d9b1b['Content-Type']){if(_0x1d52ba instanceof Buffer){}else _0x4d9b1b['Content-Type']=_0x41b209(0x21b);}let _0x1a4fbf;_0x1d52ba&&(_0x1d52ba instanceof Buffer?_0x1a4fbf=_0x1d52ba:_0x1a4fbf=typeof _0x1d52ba===_0x41b209(0x1e1)?_0x1d52ba:JSON[_0x41b209(0x21d)](_0x1d52ba));let _0x554d7b=null;for(let _0x4a1698=0x0;_0x4a1698<=retries;_0x4a1698++){try{const _0x2f5ada=new AbortController(),_0x265ddf=setTimeout(()=>_0x2f5ada[_0x41b209(0x1df)](),timeout);if(_0x2d92bf){if(_0x2d92bf['aborted'])throw new Error(_0x41b209(0x1fc));_0x2d92bf[_0x41b209(0x1e8)](_0x41b209(0x1df),()=>_0x2f5ada['abort'](),{'once':!![]});}const _0xbcd813=await fetch(_0x1db3e8,{'method':_0x2aca80,'headers':_0x4d9b1b,'body':_0x1a4fbf,'signal':_0x2f5ada[_0x41b209(0x1dd)]});clearTimeout(_0x265ddf);if(_0x4a1698<retries&&isRetryableError(_0xbcd813[_0x41b209(0x218)])){const _0x1b8aef=_0xbcd813['headers'][_0x41b209(0x1ef)](_0x41b209(0x1d9)),_0x436603=_0x1b8aef?parseInt(_0x1b8aef,0xa)*0x3e8:getRetryDelay(_0x4a1698,this['retryConfig']);console['warn'](_0x41b209(0x225)+(_0x4a1698+0x1)+'/'+retries+_0x41b209(0x222)+_0xbcd813[_0x41b209(0x218)]+',\x20'+('retrying\x20in\x20'+Math[_0x41b209(0x21e)](_0x436603)+_0x41b209(0x1e2))),await this[_0x41b209(0x1fe)](_0x436603);continue;}if(!_0xbcd813['ok']){const _0x5527fc=await this[_0x41b209(0x1e6)](_0xbcd813),_0x436c27=this[_0x41b209(0x202)](_0x5527fc,_0xbcd813['status']);let _0x19ea89;if(_0xbcd813[_0x41b209(0x218)]===0x191)_0x19ea89=_0x41b209(0x228)+_0xbcd813[_0x41b209(0x218)]+':\x20'+_0xbcd813[_0x41b209(0x1fa)]+_0x41b209(0x209)+_0x1db3e8;else{if(_0x436c27?.['detail'])_0x19ea89=_0x436c27['detail'];else{if(_0x5527fc){const _0x522dfc=JSON[_0x41b209(0x21d)](_0x5527fc);_0x19ea89='HTTP\x20'+_0xbcd813[_0x41b209(0x218)]+':\x20'+_0xbcd813[_0x41b209(0x1fa)]+'\x0a\x20\x20Details:\x20'+_0x522dfc;}else _0x19ea89=_0x41b209(0x228)+_0xbcd813[_0x41b209(0x218)]+':\x20'+_0xbcd813[_0x41b209(0x1fa)];}}throw new HTTPClientError(_0x19ea89,_0xbcd813[_0x41b209(0x218)],_0x436c27);}let _0x3cfe3d;if(responseType===_0x41b209(0x215)){const _0x44ef10=await _0xbcd813[_0x41b209(0x1f9)]();_0x3cfe3d=Buffer[_0x41b209(0x20d)](_0x44ef10);}else responseType===_0x41b209(0x1f5)?_0x3cfe3d=await _0xbcd813[_0x41b209(0x1f5)]():_0x3cfe3d=await this['safeParseJSON'](_0xbcd813);this[_0x41b209(0x1eb)][_0x41b209(0x211)](_0x41b209(0x1e3)+_0xbcd813[_0x41b209(0x218)]+_0x41b209(0x227)+_0x2aca80+'\x20'+_0x1f812c),this[_0x41b209(0x1eb)][_0x41b209(0x1ee)](JSON[_0x41b209(0x21d)](_0x3cfe3d,null,0x2));if(includeHeaders){const _0xbc7b36={};return _0xbcd813[_0x41b209(0x1e9)][_0x41b209(0x217)]((_0x111172,_0x244f97)=>{_0xbc7b36[_0x244f97]=_0x111172;}),{'data':_0x3cfe3d,'status':_0xbcd813[_0x41b209(0x218)],'headers':_0xbc7b36};}return _0x3cfe3d;}catch(_0x53aeff){_0x554d7b=_0x53aeff instanceof Error?_0x53aeff:new Error(String(_0x53aeff));if(_0x53aeff instanceof HTTPClientError&&!isRetryableError(_0x53aeff[_0x41b209(0x218)]))throw _0x53aeff;if(_0x4a1698>=retries)throw _0x554d7b;const _0x14241e=getRetryDelay(_0x4a1698,this['retryConfig']);let _0xaf5e61;_0x554d7b instanceof HTTPClientError?_0xaf5e61=_0x41b209(0x225)+(_0x4a1698+0x1)+'/'+retries+_0x41b209(0x208)+_0x554d7b[_0x41b209(0x218)]+':\x20'+_0x554d7b['message']+',\x20'+(_0x41b209(0x1f3)+Math['round'](_0x14241e)+_0x41b209(0x1e2)):_0xaf5e61=_0x41b209(0x225)+(_0x4a1698+0x1)+'/'+retries+']\x20Request\x20to\x20'+_0x1db3e8+_0x41b209(0x1f8)+_0x554d7b[_0x41b209(0x20b)]+',\x20'+(_0x41b209(0x1f3)+Math['round'](_0x14241e)+_0x41b209(0x1e2)),console['warn'](_0xaf5e61),await this['sleep'](_0x14241e);}}if(_0x554d7b&&!(_0x554d7b instanceof HTTPClientError))throw new SDKError(ErrorCode[_0x41b209(0x219)],'Request\x20to\x20'+_0x1db3e8+'\x20failed:\x20'+_0x554d7b[_0x41b209(0x20b)],_0x554d7b);throw _0x554d7b||new SDKError(ErrorCode[_0x41b209(0x1db)],_0x41b209(0x21c));}async['safeParseJSON'](_0x259312){const _0x263b27=a2_0x49c076,_0x295d5b=await _0x259312['text']();if(!_0x295d5b)return null;try{const _0x51233e=a2_0x10005b({'storeAsString':!![]});return _0x51233e[_0x263b27(0x1e4)](_0x295d5b);}catch{return{'body':_0x295d5b};}}[a2_0x49c076(0x202)](_0x158716,_0x43f3b6){const _0x18f0ec=a2_0x49c076;if(!_0x158716||typeof _0x158716!=='object')return undefined;const _0x937b23=_0x158716;if(_0x937b23['type']||_0x937b23['title']||_0x937b23[_0x18f0ec(0x1de)])return{'type':_0x937b23[_0x18f0ec(0x21a)]||_0x18f0ec(0x1da),'title':_0x937b23[_0x18f0ec(0x1ea)]||'Error','status':_0x937b23['status']||_0x43f3b6,'detail':_0x937b23[_0x18f0ec(0x1de)]||_0x18f0ec(0x204),'instance':_0x937b23[_0x18f0ec(0x1e5)]||'',..._0x937b23};return undefined;}[a2_0x49c076(0x1fe)](_0x1fe125){return new Promise(_0x2fc907=>setTimeout(_0x2fc907,_0x1fe125));}async[a2_0x49c076(0x210)](_0x5827e3,_0x46e0e7,_0x57e3d9={}){const _0x710b6b=a2_0x49c076,{headers:headers={},body:_0x1cede8,timeout:timeout=0x7530,signal:_0x3034c2}=_0x57e3d9,_0x315794=''+this[_0x710b6b(0x216)]+_0x46e0e7,_0x1e7b5b={...this[_0x710b6b(0x212)],...headers},_0x487e41=new AbortController(),_0x2c367d=setTimeout(()=>_0x487e41[_0x710b6b(0x1df)](),timeout),_0xca7d22=_0x3034c2?[_0x487e41['signal'],_0x3034c2]:[_0x487e41['signal']],_0xa279b7=this[_0x710b6b(0x20a)](_0xca7d22);try{const _0x16b3a4={'method':_0x5827e3,'headers':_0x1e7b5b,'signal':_0xa279b7};if(_0x1cede8){if(typeof _0x1cede8===_0x710b6b(0x1e1))_0x16b3a4[_0x710b6b(0x1e0)]=_0x1cede8;else _0x1cede8 instanceof Buffer?_0x16b3a4[_0x710b6b(0x1e0)]=_0x1cede8:_0x16b3a4[_0x710b6b(0x1e0)]=JSON[_0x710b6b(0x21d)](_0x1cede8);}const _0x3d0b53=await fetch(_0x315794,_0x16b3a4);clearTimeout(_0x2c367d);if(!_0x3d0b53['ok']){const _0x953582=await this[_0x710b6b(0x1e6)](_0x3d0b53),_0x33a026=this[_0x710b6b(0x202)](_0x953582,_0x3d0b53[_0x710b6b(0x218)]);let _0x265ba5;if(_0x3d0b53[_0x710b6b(0x218)]===0x191)_0x265ba5=_0x710b6b(0x228)+_0x3d0b53[_0x710b6b(0x218)]+':\x20'+_0x3d0b53['statusText']+_0x710b6b(0x209)+_0x315794;else{if(_0x33a026?.[_0x710b6b(0x1de)])_0x265ba5=_0x33a026[_0x710b6b(0x1de)];else{if(_0x953582){const _0xd6f183=JSON[_0x710b6b(0x21d)](_0x953582);_0x265ba5=_0x710b6b(0x228)+_0x3d0b53['status']+':\x20'+_0x3d0b53[_0x710b6b(0x1fa)]+_0x710b6b(0x1f4)+_0xd6f183;}else _0x265ba5=_0x710b6b(0x228)+_0x3d0b53['status']+':\x20'+_0x3d0b53[_0x710b6b(0x1fa)];}}throw new HTTPClientError(_0x265ba5,_0x3d0b53[_0x710b6b(0x218)],_0x33a026);}return _0x3d0b53;}catch(_0x2f7b76){clearTimeout(_0x2c367d);if(_0x2f7b76 instanceof HTTPClientError)throw _0x2f7b76;if(_0x2f7b76[_0x710b6b(0x201)]===_0x710b6b(0x1ff))throw new Error(_0x710b6b(0x1fc));throw _0x2f7b76;}}[a2_0x49c076(0x20a)](_0x294bf7){const _0x35039c=a2_0x49c076,_0x42f9e3=new AbortController();for(const _0xeeb41 of _0x294bf7){if(_0xeeb41[_0x35039c(0x1fd)])return _0x42f9e3[_0x35039c(0x1df)](),_0x42f9e3[_0x35039c(0x1dd)];_0xeeb41[_0x35039c(0x1e8)](_0x35039c(0x1df),()=>_0x42f9e3['abort'](),{'once':!![]});}return _0x42f9e3[_0x35039c(0x1dd)];}}
@@ -1 +1 @@
1
- const a3_0x2ef9cc=a3_0x1caf;(function(_0x570d7b,_0x3b2f8b){const _0x54c4a0=a3_0x1caf,_0x116d3e=_0x570d7b();while(!![]){try{const _0x3ba0d7=-parseInt(_0x54c4a0(0x145))/0x1+-parseInt(_0x54c4a0(0x160))/0x2*(-parseInt(_0x54c4a0(0x137))/0x3)+parseInt(_0x54c4a0(0x148))/0x4*(parseInt(_0x54c4a0(0x14e))/0x5)+-parseInt(_0x54c4a0(0x163))/0x6+parseInt(_0x54c4a0(0x13f))/0x7*(parseInt(_0x54c4a0(0x14c))/0x8)+-parseInt(_0x54c4a0(0x12d))/0x9*(-parseInt(_0x54c4a0(0x161))/0xa)+-parseInt(_0x54c4a0(0x12b))/0xb;if(_0x3ba0d7===_0x3b2f8b)break;else _0x116d3e['push'](_0x116d3e['shift']());}catch(_0x104665){_0x116d3e['push'](_0x116d3e['shift']());}}}(a3_0x20a5,0xa5583));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';function a3_0x1caf(_0x85806c,_0x19550e){const _0x20a51b=a3_0x20a5();return a3_0x1caf=function(_0x1caf41,_0x3bd055){_0x1caf41=_0x1caf41-0x11b;let _0x153a6d=_0x20a51b[_0x1caf41];return _0x153a6d;},a3_0x1caf(_0x85806c,_0x19550e);}import{parseSSEStream}from'../utils/sse-parser.js';import{ErrorCode,SDKError}from'../sdk/errors.js';function a3_0x20a5(){const _0x599444=['LLM_CHAT_CREATION_FAILURE','links','prompt','Failed\x20to\x20create\x20chat\x20after\x20','projectId','/api/projects?page[limit]=','site','DELETE','application/vnd.api+json','startsWith','/api/agents','updateAgent','sort','733756VEbcEe','30SacEbM','deleteProject','6019512XMqQpT','next','warn','createAgent','temperature','ms...','modelType','startChat','listAgents','/api/chats/','description','Message\x20cannot\x20be\x20empty\x20or\x20whitespace\x20only','baseUrl','getAgent','LLM_EMPTY_MESSAGE','[Retry\x20','agents','request','starterMessage','5036042EsJUeG','push','2937195KzgIps','projects','text/event-stream','/api/projects/','name','httpClient','LLM_STREAM_ERROR',']\x20Chat\x20creation\x20returned\x20empty\x20ID,\x20retrying\x20in\x20','GET','listProjects','6bNRsYY','POST','trim','Failed\x20to\x20continue\x20chat\x20(chatId:\x20','page[limit]','llm','systemPrompt','continueChat','98ybGTGR','data','PATCH','Failed\x20to\x20create\x20chat:\x20unexpected\x20error','/api/users/current_settings','application/json','1227465TrWCAh','/api/agents/','/history','130148QnhSbE','chats','getChatInfo','getUserSettings','368184bMRDUK','maxToolIterations','155hnbwou','/continue','authHeaders',',\x20message\x20length:\x20','/api/chats?'];a3_0x20a5=function(){return _0x599444;};return a3_0x20a5();}export class LLMClient{[a3_0x2ef9cc(0x132)];[a3_0x2ef9cc(0x124)];[a3_0x2ef9cc(0x150)];constructor(_0x4a5873,_0x5a7a19){const _0x551178=a3_0x2ef9cc;this['baseUrl']=getEndpoint(_0x4a5873[_0x551178(0x159)],_0x551178(0x13c)),this[_0x551178(0x150)]=toHeaderRecord(getAuthHeaders(_0x4a5873[_0x551178(0x159)],_0x4a5873['apiKey'])),this[_0x551178(0x132)]=new HTTPClient(this[_0x551178(0x124)],this[_0x551178(0x150)],_0x5a7a19);}async[a3_0x2ef9cc(0x14b)](){const _0x5e3bdf=a3_0x2ef9cc;return await this[_0x5e3bdf(0x132)][_0x5e3bdf(0x129)]('GET',_0x5e3bdf(0x143));}async['createProject'](_0x196846){const _0xe8bb7e=a3_0x2ef9cc,_0xd947fc={'data':{'type':_0xe8bb7e(0x12e),'attributes':{'name':_0x196846['name'],..._0x196846['description']&&{'description':_0x196846['description']}}}},_0x36d975=await this[_0xe8bb7e(0x132)][_0xe8bb7e(0x129)](_0xe8bb7e(0x138),'/api/projects',{'headers':{'Content-Type':_0xe8bb7e(0x15b),'Accept':_0xe8bb7e(0x15b)},'body':_0xd947fc});return _0x36d975[_0xe8bb7e(0x140)];}async[a3_0x2ef9cc(0x162)](_0x31b8a3){const _0x241a68=a3_0x2ef9cc,_0x1b0fb0=_0x241a68(0x130)+encodeURIComponent(_0x31b8a3);await this[_0x241a68(0x132)][_0x241a68(0x129)](_0x241a68(0x15a),_0x1b0fb0);}async[a3_0x2ef9cc(0x136)](_0x11e9ea=0x32){const _0x2dd438=a3_0x2ef9cc,_0x101f61=[];let _0x4d411d=_0x2dd438(0x158)+_0x11e9ea;while(_0x4d411d){const _0x717391=await this['httpClient'][_0x2dd438(0x129)](_0x2dd438(0x135),_0x4d411d);_0x717391[_0x2dd438(0x140)]&&_0x101f61[_0x2dd438(0x12c)](..._0x717391['data']);_0x4d411d=_0x717391[_0x2dd438(0x154)]?.[_0x2dd438(0x164)];if(_0x4d411d&&_0x4d411d[_0x2dd438(0x15c)]('http')){const _0x4f1439=new URL(_0x4d411d);_0x4d411d=_0x4f1439['pathname']+_0x4f1439['search'];}}return _0x101f61;}async[a3_0x2ef9cc(0x120)](_0x147f01){const _0x5e2e96=a3_0x2ef9cc;let _0x286825=_0x5e2e96(0x15d);_0x147f01&&(_0x286825+='?filter[project_id]='+encodeURIComponent(_0x147f01));const _0x48f060=await this[_0x5e2e96(0x132)][_0x5e2e96(0x129)](_0x5e2e96(0x135),_0x286825);return _0x48f060[_0x5e2e96(0x140)]||[];}async[a3_0x2ef9cc(0x125)](_0x575083){const _0x3dc4c9=a3_0x2ef9cc,_0x2595a8=_0x3dc4c9(0x146)+encodeURIComponent(_0x575083),_0x535372=await this[_0x3dc4c9(0x132)]['request']('GET',_0x2595a8);return _0x535372[_0x3dc4c9(0x140)];}async[a3_0x2ef9cc(0x11b)](_0x52c62c){const _0x1468a5=a3_0x2ef9cc,_0x1de5e3={'name':_0x52c62c[_0x1468a5(0x131)],'projectId':_0x52c62c[_0x1468a5(0x157)],'modelType':_0x52c62c[_0x1468a5(0x11e)],'maxToolIterations':_0x52c62c[_0x1468a5(0x14d)]??0x4,'temperature':_0x52c62c[_0x1468a5(0x11c)]??0.7};_0x52c62c[_0x1468a5(0x13d)]!==undefined&&(_0x1de5e3[_0x1468a5(0x13d)]=_0x52c62c[_0x1468a5(0x13d)]);_0x52c62c[_0x1468a5(0x12a)]&&(_0x1de5e3[_0x1468a5(0x12a)]=_0x52c62c[_0x1468a5(0x12a)]);const _0x53ffe3={'data':{'type':_0x1468a5(0x128),'attributes':_0x1de5e3}},_0xdd113e=await this[_0x1468a5(0x132)][_0x1468a5(0x129)](_0x1468a5(0x138),_0x1468a5(0x15d),{'headers':{'Content-Type':_0x1468a5(0x15b),'Accept':'application/vnd.api+json'},'body':_0x53ffe3});return _0xdd113e[_0x1468a5(0x140)];}async[a3_0x2ef9cc(0x15e)](_0x24064f,_0x490204){const _0x271c92=a3_0x2ef9cc,_0x2a72b1={'data':{'type':'agents','id':_0x24064f,'attributes':{..._0x490204[_0x271c92(0x131)]&&{'name':_0x490204[_0x271c92(0x131)]},..._0x490204['description']&&{'description':_0x490204[_0x271c92(0x122)]},..._0x490204[_0x271c92(0x155)]&&{'prompt':_0x490204[_0x271c92(0x155)]},..._0x490204[_0x271c92(0x12a)]&&{'starter_message':_0x490204['starterMessage']}}}},_0x3df730=_0x271c92(0x146)+encodeURIComponent(_0x24064f),_0xeeac47=await this[_0x271c92(0x132)][_0x271c92(0x129)](_0x271c92(0x141),_0x3df730,{'body':_0x2a72b1});return _0xeeac47[_0x271c92(0x140)];}async['deleteAgent'](_0x231e50){const _0x1dbedf=a3_0x2ef9cc,_0x33a13f='/api/agents/'+encodeURIComponent(_0x231e50);await this[_0x1dbedf(0x132)]['request'](_0x1dbedf(0x15a),_0x33a13f);}async['listChats'](_0x36a4e8=0x32){const _0x16ad89=a3_0x2ef9cc,_0x3b7bf5=new URLSearchParams();_0x3b7bf5['append'](_0x16ad89(0x13b),String(_0x36a4e8)),_0x3b7bf5['append'](_0x16ad89(0x15f),'-last_conversation_at');const _0x5ec63c=_0x16ad89(0x152)+_0x3b7bf5['toString'](),_0x87a74e=await this['httpClient'][_0x16ad89(0x129)](_0x16ad89(0x135),_0x5ec63c);return _0x87a74e[_0x16ad89(0x140)]||[];}async[a3_0x2ef9cc(0x14a)](_0x38be51){const _0x1160b5=a3_0x2ef9cc,_0x54b263=_0x1160b5(0x121)+encodeURIComponent(_0x38be51),_0x2e37b9=await this[_0x1160b5(0x132)][_0x1160b5(0x129)](_0x1160b5(0x135),_0x54b263);return _0x2e37b9['data'];}async['getChatHistory'](_0x15fade){const _0x45aae0=a3_0x2ef9cc,_0x4af76d=_0x45aae0(0x121)+encodeURIComponent(_0x15fade)+_0x45aae0(0x147);return await this[_0x45aae0(0x132)][_0x45aae0(0x129)]('GET',_0x4af76d);}async[a3_0x2ef9cc(0x11f)](_0x32e0d0){const _0x337a22=a3_0x2ef9cc,_0xb60be8={'data':{'type':_0x337a22(0x149),'attributes':{'agentId':_0x32e0d0['agentId']}}},_0xafecd0=0x3,_0x2a6cd2=[0x3e8,0x7d0,0xfa0];for(let _0x20c71c=0x0;_0x20c71c<=_0xafecd0;_0x20c71c++){const _0x5bc3e1=await this[_0x337a22(0x132)][_0x337a22(0x129)](_0x337a22(0x138),'/api/chats',{'headers':{'Content-Type':_0x337a22(0x15b),'Accept':_0x337a22(0x15b)},'body':_0xb60be8});if(_0x5bc3e1[_0x337a22(0x140)]&&_0x5bc3e1['data']['id'])return _0x5bc3e1[_0x337a22(0x140)];if(_0x20c71c>=_0xafecd0)throw new SDKError(ErrorCode[_0x337a22(0x153)],_0x337a22(0x156)+(_0xafecd0+0x1)+'\x20attempts:\x20API\x20returned\x20empty\x20chat\x20ID');const _0x4433ae=_0x2a6cd2[_0x20c71c];console[_0x337a22(0x165)](_0x337a22(0x127)+(_0x20c71c+0x1)+'/'+_0xafecd0+_0x337a22(0x134)+_0x4433ae+_0x337a22(0x11d)),await new Promise(_0x43350e=>setTimeout(_0x43350e,_0x4433ae));}throw new SDKError(ErrorCode['LLM_CHAT_CREATION_FAILURE'],_0x337a22(0x142));}async*[a3_0x2ef9cc(0x13e)](_0x1eb93e,_0x38930b,_0x2f0c3c){const _0x2d5716=a3_0x2ef9cc,_0x1975b8=_0x38930b[_0x2d5716(0x139)]();if(!_0x1975b8)throw new SDKError(ErrorCode[_0x2d5716(0x126)],_0x2d5716(0x123),undefined,{'helpText':'Please\x20provide\x20a\x20non-empty\x20message\x20to\x20continue\x20the\x20chat.'});const _0x2f2418=_0x2d5716(0x121)+encodeURIComponent(_0x1eb93e)+_0x2d5716(0x14f),_0x324bec={'input':_0x38930b};try{const _0x134e3a=await this[_0x2d5716(0x132)]['requestSSE']('POST',_0x2f2418,{'headers':{'Content-Type':_0x2d5716(0x144),'Accept':_0x2d5716(0x12f)},'body':_0x324bec,'signal':_0x2f0c3c});yield*parseSSEStream(_0x134e3a);}catch(_0x517b6a){throw new SDKError(ErrorCode[_0x2d5716(0x133)],_0x2d5716(0x13a)+_0x1eb93e+_0x2d5716(0x151)+_0x38930b['length']+')',_0x517b6a);}}}
1
+ const a3_0x5af1ee=a3_0x53c5;function a3_0x53c5(_0x3ed61d,_0x84b26e){const _0x497e94=a3_0x497e();return a3_0x53c5=function(_0x53c547,_0xf8603e){_0x53c547=_0x53c547-0xde;let _0x3b76dd=_0x497e94[_0x53c547];return _0x3b76dd;},a3_0x53c5(_0x3ed61d,_0x84b26e);}(function(_0x299df7,_0x2afa65){const _0x41078=a3_0x53c5,_0x4da5ed=_0x299df7();while(!![]){try{const _0x5bc179=parseInt(_0x41078(0x105))/0x1+parseInt(_0x41078(0x117))/0x2+-parseInt(_0x41078(0xe2))/0x3*(-parseInt(_0x41078(0x127))/0x4)+parseInt(_0x41078(0x121))/0x5+-parseInt(_0x41078(0xee))/0x6+parseInt(_0x41078(0x112))/0x7*(-parseInt(_0x41078(0x11d))/0x8)+-parseInt(_0x41078(0xe8))/0x9;if(_0x5bc179===_0x2afa65)break;else _0x4da5ed['push'](_0x4da5ed['shift']());}catch(_0x546f95){_0x4da5ed['push'](_0x4da5ed['shift']());}}}(a3_0x497e,0xc9383));function a3_0x497e(){const _0x1ff8e4=['Message\x20cannot\x20be\x20empty\x20or\x20whitespace\x20only','36ofDLMy','GET','application/json','/api/chats/','description','DELETE','9078642iNJYGt','LLM_STREAM_ERROR','/api/chats?','data','append','startChat','3771996qGtJYy','apiKey','?filter[project_id]=','Please\x20provide\x20a\x20non-empty\x20message\x20to\x20continue\x20the\x20chat.','push','modelType','LLM_CHAT_CREATION_FAILURE','/history','getUserSettings','projectId','Failed\x20to\x20create\x20chat\x20after\x20','updateAgent','POST','getChatInfo','baseUrl','listChats',',\x20message\x20length:\x20','pathname','chats','prompt','sort','\x20attempts:\x20API\x20returned\x20empty\x20chat\x20ID','startsWith','1622552fcgNSI','next','getChatHistory','-last_conversation_at','/continue','authHeaders','http','links','application/vnd.api+json','temperature','/api/users/current_settings','length','listAgents','266mSdYyl','starterMessage','systemPrompt','continueChat','Failed\x20to\x20continue\x20chat\x20(chatId:\x20','1042392KctNDm','createProject','/api/agents/','getAgent','httpClient','/api/projects/','307352hMBXkL','requestSSE','site','createAgent','4514205DIytzN','/api/projects','/api/projects?page[limit]=','llm','request','agentId','291644uahZAJ','/api/agents','PATCH','maxToolIterations'];a3_0x497e=function(){return _0x1ff8e4;};return a3_0x497e();}import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';import{parseSSEStream}from'../utils/sse-parser.js';import{ErrorCode,SDKError}from'../sdk/errors.js';export class LLMClient{[a3_0x5af1ee(0x11b)];[a3_0x5af1ee(0xfc)];[a3_0x5af1ee(0x10a)];constructor(_0x748349,_0x546253){const _0x341075=a3_0x5af1ee;this[_0x341075(0xfc)]=getEndpoint(_0x748349['site'],_0x341075(0x124)),this[_0x341075(0x10a)]=toHeaderRecord(getAuthHeaders(_0x748349[_0x341075(0x11f)],_0x748349[_0x341075(0xef)])),this['httpClient']=new HTTPClient(this[_0x341075(0xfc)],this[_0x341075(0x10a)],_0x546253);}async[a3_0x5af1ee(0xf6)](){const _0x41bf56=a3_0x5af1ee;return await this[_0x41bf56(0x11b)][_0x41bf56(0x125)](_0x41bf56(0xe3),_0x41bf56(0x10f));}async[a3_0x5af1ee(0x118)](_0x4c9458){const _0x169705=a3_0x5af1ee,_0x1d7db7={'data':{'type':'projects','attributes':{'name':_0x4c9458['name'],..._0x4c9458[_0x169705(0xe6)]&&{'description':_0x4c9458['description']}}}},_0x264d4c=await this[_0x169705(0x11b)][_0x169705(0x125)](_0x169705(0xfa),_0x169705(0x122),{'headers':{'Content-Type':_0x169705(0x10d),'Accept':_0x169705(0x10d)},'body':_0x1d7db7});return _0x264d4c['data'];}async['deleteProject'](_0x5727e9){const _0x149d3b=a3_0x5af1ee,_0x4b014b=_0x149d3b(0x11c)+encodeURIComponent(_0x5727e9);await this[_0x149d3b(0x11b)][_0x149d3b(0x125)](_0x149d3b(0xe7),_0x4b014b);}async['listProjects'](_0xc30e9e=0x32){const _0x39005f=a3_0x5af1ee,_0x458381=[];let _0x190326=_0x39005f(0x123)+_0xc30e9e;while(_0x190326){const _0x4f3d55=await this[_0x39005f(0x11b)]['request'](_0x39005f(0xe3),_0x190326);_0x4f3d55[_0x39005f(0xeb)]&&_0x458381[_0x39005f(0xf2)](..._0x4f3d55['data']);_0x190326=_0x4f3d55[_0x39005f(0x10c)]?.[_0x39005f(0x106)];if(_0x190326&&_0x190326[_0x39005f(0x104)](_0x39005f(0x10b))){const _0x346905=new URL(_0x190326);_0x190326=_0x346905[_0x39005f(0xff)]+_0x346905['search'];}}return _0x458381;}async[a3_0x5af1ee(0x111)](_0x1da813){const _0x21547a=a3_0x5af1ee;let _0x40f11c='/api/agents';_0x1da813&&(_0x40f11c+=_0x21547a(0xf0)+encodeURIComponent(_0x1da813));const _0x1463f3=await this[_0x21547a(0x11b)]['request'](_0x21547a(0xe3),_0x40f11c);return _0x1463f3['data']||[];}async[a3_0x5af1ee(0x11a)](_0x182761){const _0x35b25b=a3_0x5af1ee,_0x5635a3=_0x35b25b(0x119)+encodeURIComponent(_0x182761),_0x40b6a0=await this['httpClient']['request'](_0x35b25b(0xe3),_0x5635a3);return _0x40b6a0[_0x35b25b(0xeb)];}async[a3_0x5af1ee(0x120)](_0x407cfc){const _0x4224f5=a3_0x5af1ee,_0x22b1fc={'name':_0x407cfc['name'],'projectId':_0x407cfc[_0x4224f5(0xf7)],'modelType':_0x407cfc[_0x4224f5(0xf3)],'maxToolIterations':_0x407cfc[_0x4224f5(0xe0)]??0x4,'temperature':_0x407cfc[_0x4224f5(0x10e)]??0.7};_0x407cfc[_0x4224f5(0x114)]!==undefined&&(_0x22b1fc[_0x4224f5(0x114)]=_0x407cfc['systemPrompt']);_0x407cfc[_0x4224f5(0x113)]&&(_0x22b1fc[_0x4224f5(0x113)]=_0x407cfc[_0x4224f5(0x113)]);const _0x2123ee={'data':{'type':'agents','attributes':_0x22b1fc}},_0x19ae61=await this[_0x4224f5(0x11b)][_0x4224f5(0x125)](_0x4224f5(0xfa),_0x4224f5(0xde),{'headers':{'Content-Type':_0x4224f5(0x10d),'Accept':_0x4224f5(0x10d)},'body':_0x2123ee});return _0x19ae61['data'];}async[a3_0x5af1ee(0xf9)](_0x480dd2,_0x4c0302){const _0x516189=a3_0x5af1ee,_0x2de0a7={'data':{'type':'agents','id':_0x480dd2,'attributes':{..._0x4c0302['name']&&{'name':_0x4c0302['name']},..._0x4c0302[_0x516189(0xe6)]&&{'description':_0x4c0302[_0x516189(0xe6)]},..._0x4c0302[_0x516189(0x101)]&&{'prompt':_0x4c0302[_0x516189(0x101)]},..._0x4c0302[_0x516189(0x113)]&&{'starter_message':_0x4c0302[_0x516189(0x113)]}}}},_0x227ea6=_0x516189(0x119)+encodeURIComponent(_0x480dd2),_0x1e8c66=await this[_0x516189(0x11b)][_0x516189(0x125)](_0x516189(0xdf),_0x227ea6,{'body':_0x2de0a7});return _0x1e8c66[_0x516189(0xeb)];}async['deleteAgent'](_0x5aca44){const _0x49a2b9=a3_0x5af1ee,_0x167f0c=_0x49a2b9(0x119)+encodeURIComponent(_0x5aca44);await this[_0x49a2b9(0x11b)][_0x49a2b9(0x125)](_0x49a2b9(0xe7),_0x167f0c);}async[a3_0x5af1ee(0xfd)](_0x1c3410=0x32){const _0x129679=a3_0x5af1ee,_0x3f5a49=new URLSearchParams();_0x3f5a49[_0x129679(0xec)]('page[limit]',String(_0x1c3410)),_0x3f5a49['append'](_0x129679(0x102),_0x129679(0x108));const _0x4112b4=_0x129679(0xea)+_0x3f5a49['toString'](),_0x26bb4c=await this[_0x129679(0x11b)][_0x129679(0x125)](_0x129679(0xe3),_0x4112b4);return _0x26bb4c['data']||[];}async[a3_0x5af1ee(0xfb)](_0x518b68){const _0x26a122=a3_0x5af1ee,_0x143e70=_0x26a122(0xe5)+encodeURIComponent(_0x518b68),_0x2e83e1=await this[_0x26a122(0x11b)][_0x26a122(0x125)](_0x26a122(0xe3),_0x143e70);return _0x2e83e1['data'];}async[a3_0x5af1ee(0x107)](_0x16b288){const _0x3fcef7=a3_0x5af1ee,_0x298684='/api/chats/'+encodeURIComponent(_0x16b288)+_0x3fcef7(0xf5);return await this['httpClient'][_0x3fcef7(0x125)](_0x3fcef7(0xe3),_0x298684);}async[a3_0x5af1ee(0xed)](_0x200b15){const _0x499e25=a3_0x5af1ee,_0x31bf34={'data':{'type':_0x499e25(0x100),'attributes':{'agentId':_0x200b15[_0x499e25(0x126)]}}},_0x3ec1ca=0x3,_0x4d1b64=[0x3e8,0x7d0,0xfa0];for(let _0x4dd6b3=0x0;_0x4dd6b3<=_0x3ec1ca;_0x4dd6b3++){const _0x5f5c1e=await this[_0x499e25(0x11b)][_0x499e25(0x125)]('POST','/api/chats',{'headers':{'Content-Type':_0x499e25(0x10d),'Accept':'application/vnd.api+json'},'body':_0x31bf34});if(_0x5f5c1e[_0x499e25(0xeb)]&&_0x5f5c1e[_0x499e25(0xeb)]['id'])return _0x5f5c1e[_0x499e25(0xeb)];if(_0x4dd6b3>=_0x3ec1ca)throw new SDKError(ErrorCode[_0x499e25(0xf4)],_0x499e25(0xf8)+(_0x3ec1ca+0x1)+_0x499e25(0x103));const _0x48c8d4=_0x4d1b64[_0x4dd6b3];console['warn']('[Retry\x20'+(_0x4dd6b3+0x1)+'/'+_0x3ec1ca+']\x20Chat\x20creation\x20returned\x20empty\x20ID,\x20retrying\x20in\x20'+_0x48c8d4+'ms...'),await new Promise(_0x436143=>setTimeout(_0x436143,_0x48c8d4));}throw new SDKError(ErrorCode[_0x499e25(0xf4)],'Failed\x20to\x20create\x20chat:\x20unexpected\x20error');}async*[a3_0x5af1ee(0x115)](_0x9f86db,_0x359093,_0x206067){const _0x1bb76f=a3_0x5af1ee,_0x492722=_0x359093['trim']();if(!_0x492722)throw new SDKError(ErrorCode['LLM_EMPTY_MESSAGE'],_0x1bb76f(0xe1),undefined,{'helpText':_0x1bb76f(0xf1)});const _0x1c4ffc=_0x1bb76f(0xe5)+encodeURIComponent(_0x9f86db)+_0x1bb76f(0x109),_0x1f63f8={'input':_0x359093};try{const _0xbcaace=await this[_0x1bb76f(0x11b)][_0x1bb76f(0x11e)](_0x1bb76f(0xfa),_0x1c4ffc,{'headers':{'Content-Type':_0x1bb76f(0xe4),'Accept':'text/event-stream'},'body':_0x1f63f8,'signal':_0x206067});yield*parseSSEStream(_0xbcaace);}catch(_0x14554f){throw new SDKError(ErrorCode[_0x1bb76f(0xe9)],_0x1bb76f(0x116)+_0x9f86db+_0x1bb76f(0xfe)+_0x359093[_0x1bb76f(0x110)]+')',_0x14554f);}}}
@@ -1 +1 @@
1
- function a4_0x5d90(_0x14ebd7,_0x5cb789){const _0x910651=a4_0x9106();return a4_0x5d90=function(_0x5d902d,_0x1ae7dd){_0x5d902d=_0x5d902d-0xa0;let _0x3f28cc=_0x910651[_0x5d902d];return _0x3f28cc;},a4_0x5d90(_0x14ebd7,_0x5cb789);}function a4_0x9106(){const _0x22ce83=['3850650kBAVhW','acquire','21pOqBzP','1028229HqvQOL','min','1843818gMEcxm','maxTokens','12SsCfEe','528530MXaPNv','620256Ifsgsc','tokens','maxRequests','floor','refill','max','175781sOnLss','233352COkJvD','refillRate','ceil','now','tryAcquire','getAvailableTokens','lastRefill'];a4_0x9106=function(){return _0x22ce83;};return a4_0x9106();}const a4_0x10a813=a4_0x5d90;(function(_0x2ddf0d,_0x314dd4){const _0x3a7550=a4_0x5d90,_0x1a8dab=_0x2ddf0d();while(!![]){try{const _0xdd58b0=parseInt(_0x3a7550(0xaa))/0x1+parseInt(_0x3a7550(0xa4))/0x2+-parseInt(_0x3a7550(0xb5))/0x3+parseInt(_0x3a7550(0xa2))/0x4*(parseInt(_0x3a7550(0xa3))/0x5)+parseInt(_0x3a7550(0xa0))/0x6+parseInt(_0x3a7550(0xb4))/0x7*(-parseInt(_0x3a7550(0xab))/0x8)+-parseInt(_0x3a7550(0xb2))/0x9;if(_0xdd58b0===_0x314dd4)break;else _0x1a8dab['push'](_0x1a8dab['shift']());}catch(_0x374e5f){_0x1a8dab['push'](_0x1a8dab['shift']());}}}(a4_0x9106,0x3d946));export class RateLimiter{[a4_0x10a813(0xa5)];[a4_0x10a813(0xb1)];[a4_0x10a813(0xa1)];[a4_0x10a813(0xac)];constructor(_0x32a48f){const _0x118753=a4_0x10a813;this[_0x118753(0xa1)]=_0x32a48f[_0x118753(0xa6)],this[_0x118753(0xa5)]=_0x32a48f['maxRequests'],this[_0x118753(0xb1)]=Date['now'](),this[_0x118753(0xac)]=_0x32a48f['maxRequests']/_0x32a48f['windowMs'];}async[a4_0x10a813(0xb3)](){const _0x2d82e0=a4_0x10a813;while(!![]){this['refill']();if(this['tokens']>=0x1){this[_0x2d82e0(0xa5)]-=0x1;return;}const _0x3c1c66=Math[_0x2d82e0(0xa9)](0x1,Math[_0x2d82e0(0xad)](0x1/this[_0x2d82e0(0xac)]));await this['sleep'](_0x3c1c66);}}[a4_0x10a813(0xaf)](){const _0x3f717d=a4_0x10a813;this[_0x3f717d(0xa8)]();if(this[_0x3f717d(0xa5)]>=0x1)return this[_0x3f717d(0xa5)]-=0x1,!![];return![];}[a4_0x10a813(0xa8)](){const _0x1de787=a4_0x10a813,_0x1e42ac=Date[_0x1de787(0xae)](),_0x2119e6=_0x1e42ac-this[_0x1de787(0xb1)];if(_0x2119e6>0x0){const _0x1209c3=_0x2119e6*this[_0x1de787(0xac)];this[_0x1de787(0xa5)]=Math[_0x1de787(0xb6)](this['maxTokens'],this['tokens']+_0x1209c3),this[_0x1de787(0xb1)]=_0x1e42ac;}}[a4_0x10a813(0xb0)](){const _0x20e618=a4_0x10a813;return this[_0x20e618(0xa8)](),Math[_0x20e618(0xa7)](this['tokens']);}['reset'](){const _0x356d75=a4_0x10a813;this[_0x356d75(0xa5)]=this[_0x356d75(0xa1)],this['lastRefill']=Date['now']();}['sleep'](_0x5bc335){return new Promise(_0x3ef467=>setTimeout(_0x3ef467,_0x5bc335));}}export const defaultRateLimiter=new RateLimiter({'maxRequests':0x64,'windowMs':0xea60});
1
+ const a4_0x257077=a4_0x19a7;(function(_0x2bfbf4,_0x445eb1){const _0x34a3e3=a4_0x19a7,_0x379bd6=_0x2bfbf4();while(!![]){try{const _0x470797=-parseInt(_0x34a3e3(0x1c3))/0x1*(-parseInt(_0x34a3e3(0x1c1))/0x2)+parseInt(_0x34a3e3(0x1cc))/0x3*(-parseInt(_0x34a3e3(0x1b7))/0x4)+-parseInt(_0x34a3e3(0x1c8))/0x5*(parseInt(_0x34a3e3(0x1cd))/0x6)+-parseInt(_0x34a3e3(0x1b8))/0x7+-parseInt(_0x34a3e3(0x1b5))/0x8+-parseInt(_0x34a3e3(0x1ca))/0x9+parseInt(_0x34a3e3(0x1c6))/0xa;if(_0x470797===_0x445eb1)break;else _0x379bd6['push'](_0x379bd6['shift']());}catch(_0x17ccb9){_0x379bd6['push'](_0x379bd6['shift']());}}}(a4_0x1804,0xd29f6));export class RateLimiter{[a4_0x257077(0x1be)];[a4_0x257077(0x1c2)];[a4_0x257077(0x1cb)];[a4_0x257077(0x1ce)];constructor(_0x4a3293){const _0x482844=a4_0x257077;this[_0x482844(0x1cb)]=_0x4a3293[_0x482844(0x1ba)],this[_0x482844(0x1be)]=_0x4a3293[_0x482844(0x1ba)],this[_0x482844(0x1c2)]=Date['now'](),this[_0x482844(0x1ce)]=_0x4a3293['maxRequests']/_0x4a3293['windowMs'];}async[a4_0x257077(0x1bf)](){const _0x23480d=a4_0x257077;while(!![]){this['refill']();if(this[_0x23480d(0x1be)]>=0x1){this[_0x23480d(0x1be)]-=0x1;return;}const _0x2f11f2=Math[_0x23480d(0x1c4)](0x1,Math[_0x23480d(0x1bc)](0x1/this[_0x23480d(0x1ce)]));await this[_0x23480d(0x1c7)](_0x2f11f2);}}[a4_0x257077(0x1c5)](){const _0x4373d8=a4_0x257077;this['refill']();if(this['tokens']>=0x1)return this[_0x4373d8(0x1be)]-=0x1,!![];return![];}['refill'](){const _0x5b6e39=a4_0x257077,_0x461faa=Date[_0x5b6e39(0x1b9)](),_0x1720a6=_0x461faa-this['lastRefill'];if(_0x1720a6>0x0){const _0x36acf7=_0x1720a6*this[_0x5b6e39(0x1ce)];this[_0x5b6e39(0x1be)]=Math[_0x5b6e39(0x1bd)](this[_0x5b6e39(0x1cb)],this[_0x5b6e39(0x1be)]+_0x36acf7),this[_0x5b6e39(0x1c2)]=_0x461faa;}}[a4_0x257077(0x1c9)](){const _0x2c1cc3=a4_0x257077;return this[_0x2c1cc3(0x1bb)](),Math[_0x2c1cc3(0x1b6)](this['tokens']);}[a4_0x257077(0x1c0)](){const _0x360660=a4_0x257077;this[_0x360660(0x1be)]=this[_0x360660(0x1cb)],this[_0x360660(0x1c2)]=Date[_0x360660(0x1b9)]();}[a4_0x257077(0x1c7)](_0x403b18){return new Promise(_0x49d5ea=>setTimeout(_0x49d5ea,_0x403b18));}}function a4_0x19a7(_0x4e342d,_0x2983e5){const _0x18046a=a4_0x1804();return a4_0x19a7=function(_0x19a7fd,_0x2e74c1){_0x19a7fd=_0x19a7fd-0x1b5;let _0x413553=_0x18046a[_0x19a7fd];return _0x413553;},a4_0x19a7(_0x4e342d,_0x2983e5);}export const defaultRateLimiter=new RateLimiter({'maxRequests':0x64,'windowMs':0xea60});function a4_0x1804(){const _0x17b43c=['maxTokens','18AiJmNK','6Hjhdcj','refillRate','8571968LNZEng','floor','622684UTMzbr','3889732KVtEOK','now','maxRequests','refill','ceil','min','tokens','acquire','reset','2czyKqg','lastRefill','288023KtYQvV','max','tryAcquire','38668300FlbMNJ','sleep','444630dVEKMn','getAvailableTokens','5778171MJKGHH'];a4_0x1804=function(){return _0x17b43c;};return a4_0x1804();}
@@ -1 +1 @@
1
- const a5_0x3e5b4=a5_0x2864;function a5_0x2864(_0x3720a1,_0x5c43d5){const _0x408dea=a5_0x408d();return a5_0x2864=function(_0x28641c,_0x359c75){_0x28641c=_0x28641c-0x1f0;let _0xc255cc=_0x408dea[_0x28641c];return _0xc255cc;},a5_0x2864(_0x3720a1,_0x5c43d5);}(function(_0x32d18a,_0xd3d763){const _0x8ffadf=a5_0x2864,_0x15293b=_0x32d18a();while(!![]){try{const _0x113421=parseInt(_0x8ffadf(0x220))/0x1*(-parseInt(_0x8ffadf(0x225))/0x2)+-parseInt(_0x8ffadf(0x223))/0x3+-parseInt(_0x8ffadf(0x208))/0x4+-parseInt(_0x8ffadf(0x224))/0x5+parseInt(_0x8ffadf(0x20f))/0x6+parseInt(_0x8ffadf(0x215))/0x7*(parseInt(_0x8ffadf(0x21f))/0x8)+-parseInt(_0x8ffadf(0x1f5))/0x9*(-parseInt(_0x8ffadf(0x20d))/0xa);if(_0x113421===_0xd3d763)break;else _0x15293b['push'](_0x15293b['shift']());}catch(_0x5d60d0){_0x15293b['push'](_0x15293b['shift']());}}}(a5_0x408d,0xe0f04));import{HTTPClient}from'./http-client.js';function a5_0x408d(){const _0x1e38cc=['/v3/database/show/','3779886lqVqJB','site','application/json','tables','jobs','deleteTable','182SXFAkC','httpClient','/v3/job/list','/v3/database/create/','message','filter','text','/v3/job/list?','authHeaders','status','465128tSUwTe','32FqsTnv','request','parse','4409514qmbmOF','4520610VNttHB','17306rSvcAi','submitPrestoJob','cancelJob','/v3/table/delete/','warn','/v3/database/list','/v3/job/result/','GET','append','from','/v3/job/issue/hive/','1539AocEty','toString','createDatabase','push','listJobs','/v3/job/show/','/v3/table/show/','?header=true','length','apiKey','databases','/v3/job/kill/','/v3/job/issue/presto/','getJobResult','createTable','/v3/table/list/','trim','listTables','/v3/database/delete/','4004936YMRizk','forEach','split','Failed\x20to\x20parse\x20NDJSON\x20line\x20','POST','142210TNjlSP'];a5_0x408d=function(){return _0x1e38cc;};return a5_0x408d();}import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class TDClient{[a5_0x3e5b4(0x216)];['authHeaders'];constructor(_0x56acdd,_0x1deb67){const _0x55608e=a5_0x3e5b4,_0x155c4c=getEndpoint(_0x56acdd[_0x55608e(0x210)],'td');this['authHeaders']=toHeaderRecord(getAuthHeaders(_0x56acdd['site'],_0x56acdd[_0x55608e(0x1fe)])),this[_0x55608e(0x216)]=new HTTPClient(_0x155c4c,this[_0x55608e(0x21d)],_0x1deb67);}async['listDatabases'](){const _0x3767ef=a5_0x3e5b4,_0x271b6f=await this[_0x3767ef(0x216)]['request']('GET',_0x3767ef(0x22a));return _0x271b6f[_0x3767ef(0x1ff)];}async['showDatabase'](_0x5e4f8e){const _0x4fa6ba=a5_0x3e5b4,_0x7fd84=await this[_0x4fa6ba(0x216)]['request'](_0x4fa6ba(0x1f1),_0x4fa6ba(0x20e)+encodeURIComponent(_0x5e4f8e));return _0x7fd84;}async[a5_0x3e5b4(0x1f7)](_0x9dc254){const _0x473b49=a5_0x3e5b4;await this['httpClient'][_0x473b49(0x221)]('POST',_0x473b49(0x218)+encodeURIComponent(_0x9dc254));}async['deleteDatabase'](_0x9f72da){const _0x53c046=a5_0x3e5b4;await this['httpClient'][_0x53c046(0x221)](_0x53c046(0x20c),_0x53c046(0x207)+encodeURIComponent(_0x9f72da));}async[a5_0x3e5b4(0x206)](_0x5ab202){const _0x180720=a5_0x3e5b4,_0x3bd78c=await this['httpClient']['request'](_0x180720(0x1f1),_0x180720(0x204)+encodeURIComponent(_0x5ab202));return _0x3bd78c[_0x180720(0x212)];}async['showTable'](_0x392ca3,_0x37ee58){const _0x3f7162=a5_0x3e5b4,_0x17cc38=await this[_0x3f7162(0x216)][_0x3f7162(0x221)](_0x3f7162(0x1f1),_0x3f7162(0x1fb)+encodeURIComponent(_0x392ca3)+'/'+encodeURIComponent(_0x37ee58));return _0x17cc38;}async[a5_0x3e5b4(0x203)](_0x309aa6,_0x52bc93){const _0x41b93d=a5_0x3e5b4;await this[_0x41b93d(0x216)][_0x41b93d(0x221)](_0x41b93d(0x20c),'/v3/table/create/'+encodeURIComponent(_0x309aa6)+'/'+encodeURIComponent(_0x52bc93));}async[a5_0x3e5b4(0x214)](_0x4bd251,_0x2c48a6){const _0x1fae4e=a5_0x3e5b4;await this[_0x1fae4e(0x216)]['request'](_0x1fae4e(0x20c),_0x1fae4e(0x228)+encodeURIComponent(_0x4bd251)+'/'+encodeURIComponent(_0x2c48a6));}async['submitHiveJob'](_0x3c7168,_0x442910){const _0x493a6c=a5_0x3e5b4,_0x767d49=await this[_0x493a6c(0x216)][_0x493a6c(0x221)](_0x493a6c(0x20c),_0x493a6c(0x1f4)+encodeURIComponent(_0x3c7168),{'body':{'query':_0x442910}});return _0x767d49;}async[a5_0x3e5b4(0x226)](_0x3c8152,_0x50f378){const _0x2179c8=a5_0x3e5b4,_0x59a060=await this[_0x2179c8(0x216)][_0x2179c8(0x221)](_0x2179c8(0x20c),_0x2179c8(0x201)+encodeURIComponent(_0x3c8152),{'body':{'query':_0x50f378}});return _0x59a060;}async[a5_0x3e5b4(0x1f9)](_0x3b7544){const _0x47b939=a5_0x3e5b4,_0xc04f61=new URLSearchParams();if(_0x3b7544?.[_0x47b939(0x1f3)]!==undefined)_0xc04f61[_0x47b939(0x1f2)](_0x47b939(0x1f3),_0x3b7544[_0x47b939(0x1f3)][_0x47b939(0x1f6)]());if(_0x3b7544?.['to']!==undefined)_0xc04f61[_0x47b939(0x1f2)]('to',_0x3b7544['to'][_0x47b939(0x1f6)]());if(_0x3b7544?.[_0x47b939(0x21e)])_0xc04f61['append']('status',_0x3b7544[_0x47b939(0x21e)]);const _0x3e99ba=_0xc04f61['toString'](),_0x307f0e=_0x3e99ba?_0x47b939(0x21c)+_0x3e99ba:_0x47b939(0x217),_0xb8a7f=await this[_0x47b939(0x216)][_0x47b939(0x221)](_0x47b939(0x1f1),_0x307f0e);return _0xb8a7f[_0x47b939(0x213)];}async['showJob'](_0x53fb1b){const _0x2d3f2b=a5_0x3e5b4,_0x518f39=await this[_0x2d3f2b(0x216)][_0x2d3f2b(0x221)](_0x2d3f2b(0x1f1),_0x2d3f2b(0x1fa)+encodeURIComponent(_0x53fb1b));return _0x518f39;}async[a5_0x3e5b4(0x227)](_0x579126){const _0x1b7a49=a5_0x3e5b4;await this[_0x1b7a49(0x216)][_0x1b7a49(0x221)]('POST',_0x1b7a49(0x200)+encodeURIComponent(_0x579126));}async[a5_0x3e5b4(0x202)](_0x2ca3c0){const _0x5488df=a5_0x3e5b4,_0x28a47f=await this['httpClient'][_0x5488df(0x221)]('GET',_0x5488df(0x1f0)+encodeURIComponent(_0x2ca3c0)+_0x5488df(0x1fc),{'headers':{'Accept':_0x5488df(0x211)},'responseType':_0x5488df(0x21b)});if(typeof _0x28a47f==='string'){const _0x31b6ce=_0x28a47f[_0x5488df(0x20a)]('\x0a')[_0x5488df(0x21a)](_0x3979a1=>_0x3979a1['trim']());if(_0x31b6ce[_0x5488df(0x1fd)]===0x0)return[];let _0x97a15e;try{_0x97a15e=JSON[_0x5488df(0x222)](_0x31b6ce[0x0]);}catch(_0x136997){return console['warn']('Failed\x20to\x20parse\x20column\x20names:\x20'+(_0x136997 instanceof Error?_0x136997[_0x5488df(0x219)]:String(_0x136997))),[];}const _0x37ce2f=[];for(let _0x3d1d7f=0x1;_0x3d1d7f<_0x31b6ce[_0x5488df(0x1fd)];_0x3d1d7f++){const _0x1b4de1=_0x31b6ce[_0x3d1d7f][_0x5488df(0x205)]();if(!_0x1b4de1)continue;try{const _0x495224=JSON['parse'](_0x1b4de1),_0x2c5008={};_0x97a15e[_0x5488df(0x209)]((_0x4f1baf,_0x552625)=>{_0x2c5008[_0x4f1baf]=_0x495224[_0x552625];}),_0x37ce2f[_0x5488df(0x1f8)](_0x2c5008);}catch(_0x1594ca){console[_0x5488df(0x229)](_0x5488df(0x20b)+(_0x3d1d7f+0x1)+':\x20'+(_0x1594ca instanceof Error?_0x1594ca[_0x5488df(0x219)]:String(_0x1594ca)));}}return _0x37ce2f;}return[];}}export function createTDClient(_0x475759,_0x165264){return new TDClient(_0x475759,_0x165264);}
1
+ const a5_0x21ef89=a5_0x43c1;function a5_0x2eaa(){const _0x5de913=['5579600uMCtNC','databases','authHeaders','jobs','showTable','createTable','/v3/job/issue/presto/','20xOFBmZ','/v3/database/list','status','push','Failed\x20to\x20parse\x20NDJSON\x20line\x20','295848ZWSNMI','string','site','217948kqBGCy','24pnDkdp','/v3/table/create/','toString','filter','application/json','/v3/database/show/','listDatabases','POST','showDatabase','589790MIWhdg','38706SvoYfo','apiKey','trim','submitHiveJob','/v3/job/issue/hive/','/v3/job/result/','tables','1540332LPDxKE','315tZWTTZ','GET','request','489OrseXa','split','submitPrestoJob','/v3/job/list','forEach','22lRLQdR','httpClient','/v3/job/show/','length','/v3/table/show/','warn','/v3/job/kill/','showJob','text','message','append','46tusJJZ','from','createDatabase','deleteDatabase','/v3/table/delete/','/v3/job/list?','deleteTable'];a5_0x2eaa=function(){return _0x5de913;};return a5_0x2eaa();}(function(_0x468a44,_0x4a3497){const _0x1831af=a5_0x43c1,_0x5ac7a7=_0x468a44();while(!![]){try{const _0xbd08bf=-parseInt(_0x1831af(0xb4))/0x1+-parseInt(_0x1831af(0x9e))/0x2*(-parseInt(_0x1831af(0xca))/0x3)+parseInt(_0x1831af(0xb5))/0x4*(-parseInt(_0x1831af(0xbe))/0x5)+parseInt(_0x1831af(0xbf))/0x6*(parseInt(_0x1831af(0xc7))/0x7)+parseInt(_0x1831af(0xa5))/0x8+parseInt(_0x1831af(0xb1))/0x9*(parseInt(_0x1831af(0xac))/0xa)+parseInt(_0x1831af(0xcf))/0xb*(parseInt(_0x1831af(0xc6))/0xc);if(_0xbd08bf===_0x4a3497)break;else _0x5ac7a7['push'](_0x5ac7a7['shift']());}catch(_0x1a4d24){_0x5ac7a7['push'](_0x5ac7a7['shift']());}}}(a5_0x2eaa,0x5eca8));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class TDClient{['httpClient'];[a5_0x21ef89(0xa7)];constructor(_0x21932a,_0x5a6e83){const _0x51f5b2=a5_0x21ef89,_0x1defb9=getEndpoint(_0x21932a[_0x51f5b2(0xb3)],'td');this[_0x51f5b2(0xa7)]=toHeaderRecord(getAuthHeaders(_0x21932a[_0x51f5b2(0xb3)],_0x21932a[_0x51f5b2(0xc0)])),this[_0x51f5b2(0xd0)]=new HTTPClient(_0x1defb9,this[_0x51f5b2(0xa7)],_0x5a6e83);}async[a5_0x21ef89(0xbb)](){const _0x133231=a5_0x21ef89,_0x580b9b=await this[_0x133231(0xd0)]['request'](_0x133231(0xc8),_0x133231(0xad));return _0x580b9b[_0x133231(0xa6)];}async[a5_0x21ef89(0xbd)](_0x1fea3b){const _0x22117b=a5_0x21ef89,_0x452832=await this[_0x22117b(0xd0)][_0x22117b(0xc9)]('GET',_0x22117b(0xba)+encodeURIComponent(_0x1fea3b));return _0x452832;}async[a5_0x21ef89(0xa0)](_0x177068){const _0x31fa7f=a5_0x21ef89;await this[_0x31fa7f(0xd0)][_0x31fa7f(0xc9)](_0x31fa7f(0xbc),'/v3/database/create/'+encodeURIComponent(_0x177068));}async[a5_0x21ef89(0xa1)](_0x486972){const _0x411bd7=a5_0x21ef89;await this['httpClient'][_0x411bd7(0xc9)](_0x411bd7(0xbc),'/v3/database/delete/'+encodeURIComponent(_0x486972));}async['listTables'](_0xa1222){const _0x58fd70=a5_0x21ef89,_0x53730d=await this[_0x58fd70(0xd0)][_0x58fd70(0xc9)]('GET','/v3/table/list/'+encodeURIComponent(_0xa1222));return _0x53730d[_0x58fd70(0xc5)];}async[a5_0x21ef89(0xa9)](_0x2d21aa,_0x394112){const _0x5f086e=a5_0x21ef89,_0x158db4=await this[_0x5f086e(0xd0)]['request'](_0x5f086e(0xc8),_0x5f086e(0xd3)+encodeURIComponent(_0x2d21aa)+'/'+encodeURIComponent(_0x394112));return _0x158db4;}async[a5_0x21ef89(0xaa)](_0x377df2,_0x239d93){const _0x596ef8=a5_0x21ef89;await this[_0x596ef8(0xd0)][_0x596ef8(0xc9)](_0x596ef8(0xbc),_0x596ef8(0xb6)+encodeURIComponent(_0x377df2)+'/'+encodeURIComponent(_0x239d93));}async[a5_0x21ef89(0xa4)](_0x3ba96e,_0x72c45d){const _0x511e45=a5_0x21ef89;await this['httpClient'][_0x511e45(0xc9)](_0x511e45(0xbc),_0x511e45(0xa2)+encodeURIComponent(_0x3ba96e)+'/'+encodeURIComponent(_0x72c45d));}async[a5_0x21ef89(0xc2)](_0x4116e7,_0x4a5b97){const _0x13a2f=a5_0x21ef89,_0x1dfb53=await this[_0x13a2f(0xd0)]['request'](_0x13a2f(0xbc),_0x13a2f(0xc3)+encodeURIComponent(_0x4116e7),{'body':{'query':_0x4a5b97}});return _0x1dfb53;}async[a5_0x21ef89(0xcc)](_0x2c1ab5,_0x260dd9){const _0x150831=a5_0x21ef89,_0x4254a8=await this[_0x150831(0xd0)][_0x150831(0xc9)](_0x150831(0xbc),_0x150831(0xab)+encodeURIComponent(_0x2c1ab5),{'body':{'query':_0x260dd9}});return _0x4254a8;}async['listJobs'](_0x172a4b){const _0x1e943c=a5_0x21ef89,_0x6cde58=new URLSearchParams();if(_0x172a4b?.['from']!==undefined)_0x6cde58[_0x1e943c(0x9d)](_0x1e943c(0x9f),_0x172a4b[_0x1e943c(0x9f)][_0x1e943c(0xb7)]());if(_0x172a4b?.['to']!==undefined)_0x6cde58[_0x1e943c(0x9d)]('to',_0x172a4b['to'][_0x1e943c(0xb7)]());if(_0x172a4b?.['status'])_0x6cde58[_0x1e943c(0x9d)](_0x1e943c(0xae),_0x172a4b[_0x1e943c(0xae)]);const _0x23f0ef=_0x6cde58[_0x1e943c(0xb7)](),_0x409f5a=_0x23f0ef?_0x1e943c(0xa3)+_0x23f0ef:_0x1e943c(0xcd),_0x21a744=await this[_0x1e943c(0xd0)]['request']('GET',_0x409f5a);return _0x21a744[_0x1e943c(0xa8)];}async[a5_0x21ef89(0xd6)](_0x20b9ac){const _0x125d24=a5_0x21ef89,_0x135183=await this[_0x125d24(0xd0)]['request']('GET',_0x125d24(0xd1)+encodeURIComponent(_0x20b9ac));return _0x135183;}async['cancelJob'](_0x134241){const _0x537c1c=a5_0x21ef89;await this['httpClient'][_0x537c1c(0xc9)](_0x537c1c(0xbc),_0x537c1c(0xd5)+encodeURIComponent(_0x134241));}async['getJobResult'](_0x5a160a){const _0x253c5c=a5_0x21ef89,_0x1f64d8=await this['httpClient']['request'](_0x253c5c(0xc8),_0x253c5c(0xc4)+encodeURIComponent(_0x5a160a)+'?header=true',{'headers':{'Accept':_0x253c5c(0xb9)},'responseType':_0x253c5c(0x9b)});if(typeof _0x1f64d8===_0x253c5c(0xb2)){const _0x171e92=_0x1f64d8[_0x253c5c(0xcb)]('\x0a')[_0x253c5c(0xb8)](_0x5bf832=>_0x5bf832[_0x253c5c(0xc1)]());if(_0x171e92['length']===0x0)return[];let _0x2b13fb;try{_0x2b13fb=JSON['parse'](_0x171e92[0x0]);}catch(_0x337f0e){return console[_0x253c5c(0xd4)]('Failed\x20to\x20parse\x20column\x20names:\x20'+(_0x337f0e instanceof Error?_0x337f0e[_0x253c5c(0x9c)]:String(_0x337f0e))),[];}const _0xa75939=[];for(let _0x103073=0x1;_0x103073<_0x171e92[_0x253c5c(0xd2)];_0x103073++){const _0x15b16d=_0x171e92[_0x103073][_0x253c5c(0xc1)]();if(!_0x15b16d)continue;try{const _0x56cfd9=JSON['parse'](_0x15b16d),_0x4f3d15={};_0x2b13fb[_0x253c5c(0xce)]((_0x385db2,_0x319d93)=>{_0x4f3d15[_0x385db2]=_0x56cfd9[_0x319d93];}),_0xa75939[_0x253c5c(0xaf)](_0x4f3d15);}catch(_0x5ce4a7){console[_0x253c5c(0xd4)](_0x253c5c(0xb0)+(_0x103073+0x1)+':\x20'+(_0x5ce4a7 instanceof Error?_0x5ce4a7[_0x253c5c(0x9c)]:String(_0x5ce4a7)));}}return _0xa75939;}return[];}}function a5_0x43c1(_0x30f84c,_0x57323a){const _0x2eaaea=a5_0x2eaa();return a5_0x43c1=function(_0x43c1df,_0x11f508){_0x43c1df=_0x43c1df-0x9b;let _0x2b80e5=_0x2eaaea[_0x43c1df];return _0x2b80e5;},a5_0x43c1(_0x30f84c,_0x57323a);}export function createTDClient(_0x407c8e,_0x332297){return new TDClient(_0x407c8e,_0x332297);}