@treasuredata/tdx 0.9.7 → 0.9.8

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 (120) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/client/cdp-api-client.js +1 -1
  6. package/dist/client/engage-api-client.js +1 -1
  7. package/dist/client/http-client.js +1 -1
  8. package/dist/client/llm-api-client.js +1 -1
  9. package/dist/client/rate-limiter.js +1 -1
  10. package/dist/client/td-api-client.js +1 -1
  11. package/dist/client/trino-api-client.js +1 -1
  12. package/dist/client/workflow-client.js +1 -1
  13. package/dist/commands/activations.js +1 -1
  14. package/dist/commands/agent-command.js +1 -1
  15. package/dist/commands/api-command.js +1 -1
  16. package/dist/commands/auth-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/claude-command.js +1 -1
  19. package/dist/commands/claude-statusline-command.js +1 -1
  20. package/dist/commands/claude-usage-command.js +1 -1
  21. package/dist/commands/command.js +1 -1
  22. package/dist/commands/connection-command.js +1 -1
  23. package/dist/commands/context-command.js +1 -1
  24. package/dist/commands/databases.js +1 -1
  25. package/dist/commands/describe.js +1 -1
  26. package/dist/commands/engage-command.js +1 -1
  27. package/dist/commands/job-command.js +1 -1
  28. package/dist/commands/journey-command.js +1 -1
  29. package/dist/commands/llm-command.js +1 -1
  30. package/dist/commands/llm-proxy.js +1 -1
  31. package/dist/commands/parent-segment-command.js +1 -1
  32. package/dist/commands/profiles-command.js +1 -1
  33. package/dist/commands/query-command.js +1 -1
  34. package/dist/commands/segment-command.js +1 -1
  35. package/dist/commands/segment-create-command.js +1 -1
  36. package/dist/commands/segment-fields-command.js +1 -1
  37. package/dist/commands/segment-pull-command.js +1 -1
  38. package/dist/commands/segment-push-command.js +1 -1
  39. package/dist/commands/segment-update-command.js +1 -1
  40. package/dist/commands/segment-use-command.js +1 -1
  41. package/dist/commands/segments.js +1 -1
  42. package/dist/commands/show.js +1 -1
  43. package/dist/commands/tables.js +1 -1
  44. package/dist/commands/use-command.js +1 -1
  45. package/dist/commands/user-command.js +1 -1
  46. package/dist/commands/workflow-command.js +1 -1
  47. package/dist/core/auth.js +1 -1
  48. package/dist/core/config.js +1 -1
  49. package/dist/core/connection-cache.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/index.js +1 -1
  58. package/dist/proxy/anthropic-adapter.js +1 -1
  59. package/dist/proxy/claude-usage-tracker.js +1 -1
  60. package/dist/proxy/context-signature.js +1 -1
  61. package/dist/proxy/conversation-utils.js +1 -1
  62. package/dist/proxy/server.js +1 -1
  63. package/dist/proxy/session-cache.js +1 -1
  64. package/dist/sdk/agent/agent-yaml.js +1 -1
  65. package/dist/sdk/api.js +1 -1
  66. package/dist/sdk/connection-validator.js +1 -1
  67. package/dist/sdk/connection.js +1 -1
  68. package/dist/sdk/engage.js +1 -1
  69. package/dist/sdk/errors.js +1 -1
  70. package/dist/sdk/index.js +1 -1
  71. package/dist/sdk/job.js +1 -1
  72. package/dist/sdk/journey.js +1 -1
  73. package/dist/sdk/llm.js +1 -1
  74. package/dist/sdk/query.js +1 -1
  75. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  76. package/dist/sdk/segment/journey-yaml.d.ts +36 -7
  77. package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
  78. package/dist/sdk/segment/journey-yaml.js +1 -1
  79. package/dist/sdk/segment/journey-yaml.js.map +1 -1
  80. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  81. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  82. package/dist/sdk/segment.js +1 -1
  83. package/dist/sdk/user.js +1 -1
  84. package/dist/sdk/workflow.js +1 -1
  85. package/dist/types/endpoints.js +1 -1
  86. package/dist/types/index.js +1 -1
  87. package/dist/utils/agent-config.js +1 -1
  88. package/dist/utils/agent-ref-parser.js +1 -1
  89. package/dist/utils/async.js +1 -1
  90. package/dist/utils/chat-cache.js +1 -1
  91. package/dist/utils/colors.js +1 -1
  92. package/dist/utils/command-output.js +1 -1
  93. package/dist/utils/constants.js +1 -1
  94. package/dist/utils/diff.js +1 -1
  95. package/dist/utils/fields-display.js +1 -1
  96. package/dist/utils/file-permissions.js +1 -1
  97. package/dist/utils/format-detector.js +1 -1
  98. package/dist/utils/formatters.js +1 -1
  99. package/dist/utils/journey-utils.js +1 -1
  100. package/dist/utils/json-loader.js +1 -1
  101. package/dist/utils/llm-backup-utils.js +1 -1
  102. package/dist/utils/model-aliases.js +1 -1
  103. package/dist/utils/model-factors.js +1 -1
  104. package/dist/utils/option-validation.js +1 -1
  105. package/dist/utils/port.js +1 -1
  106. package/dist/utils/process.js +1 -1
  107. package/dist/utils/prompt.js +1 -1
  108. package/dist/utils/segment-path-parser.js +1 -1
  109. package/dist/utils/segment-ref-parser.js +1 -1
  110. package/dist/utils/spinner.js +1 -1
  111. package/dist/utils/sql-parser.js +1 -1
  112. package/dist/utils/sse-parser.js +1 -1
  113. package/dist/utils/string-utils.js +1 -1
  114. package/dist/utils/table-ref-parser.js +1 -1
  115. package/dist/utils/tdx-config.js +1 -1
  116. package/dist/utils/tdx-logger.js +1 -1
  117. package/dist/utils/tree-formatter.js +1 -1
  118. package/dist/utils/version-check.js +1 -1
  119. package/dist/utils/workflow-utils.js +1 -1
  120. package/package.json +1 -1
@@ -1 +1 @@
1
- function a39_0x5ecc(){const _0x587ce1=['Error:\x20','(not\x20set)','test','segment','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','Resolving\x20parent\x20segment\x20\x27','log','Listing\x20folders,\x20segments,\x20and\x20journeys...',']\x20matching\x20\x27','folderId','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','message','465zkrQBX','\x20folder','\x20journey','No\x20items\x20match\x20pattern:\x20','resolvePathToResource','Folder/pattern\x20arg:\x20','sort','data','parentId','format','all','replace','600mRdOcC','2093454wlGGMG','20surldw','/e/','✔\x20Found\x20','(empty)','Resolving\x20path\x20\x27','Parent\x20segment\x20context:\x20','101857cLegBF','filter','966513fAuPEi','78474rJYJDN','Parent\x20ID:\x20','\x27...','description',',\x20and\x20','jsonl','segments','json','map','4OagaxK','site','folder','execute','listWithPattern','journeyBundleName','dim','localeCompare','Folder\x20ID:\x20','1105100UHpmpF','Site:\x20','Recursive\x20mode:\x20enabled','\x20top-level\x20items','3458120eXpfIS','error','Set\x20a\x20parent\x20segment\x20context\x20first:','recursive','includes','638lOKHzn','134472YWqAic','Building\x20hierarchy\x20tree...','journey','\x5c$&','listJourneysFromParentSegment','name','listUnified','listRecursive','\x20\x20Cause:\x20','Error:\x20No\x20parent\x20segment\x20context\x20set.','/j/da','✔\x20Built\x20tree\x20with\x20','\x20segment','cause','length','/app/ps/','verbose','web'];a39_0x5ecc=function(){return _0x587ce1;};return a39_0x5ecc();}const a39_0x164ca3=a39_0x1742;(function(_0x5e2139,_0x4dc17e){const _0x20d8e1=a39_0x1742,_0x1d0d10=_0x5e2139();while(!![]){try{const _0x2837e1=parseInt(_0x20d8e1(0x16c))/0x1+parseInt(_0x20d8e1(0x163))/0x2*(-parseInt(_0x20d8e1(0x159))/0x3)+-parseInt(_0x20d8e1(0x170))/0x4+parseInt(_0x20d8e1(0x194))/0x5*(parseInt(_0x20d8e1(0x15a))/0x6)+-parseInt(_0x20d8e1(0x157))/0x7*(-parseInt(_0x20d8e1(0x14f))/0x8)+-parseInt(_0x20d8e1(0x150))/0x9*(parseInt(_0x20d8e1(0x151))/0xa)+parseInt(_0x20d8e1(0x175))/0xb*(-parseInt(_0x20d8e1(0x176))/0xc);if(_0x2837e1===_0x4dc17e)break;else _0x1d0d10['push'](_0x1d0d10['shift']());}catch(_0x2573b1){_0x1d0d10['push'](_0x1d0d10['shift']());}}}(a39_0x5ecc,0xc0904));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{getConsoleNextUrl}from'../types/endpoints.js';function a39_0x1742(_0x41afa,_0x307c32){_0x41afa=_0x41afa-0x14d;const _0x5eccd4=a39_0x5ecc();let _0x17427f=_0x5eccd4[_0x41afa];return _0x17427f;}import a39_0x51825a from'chalk';export class SegmentsCommand extends BaseCommand{[a39_0x164ca3(0x17b)]=a39_0x164ca3(0x160);[a39_0x164ca3(0x15d)]='List\x20folders\x20and\x20child\x20segments';async[a39_0x164ca3(0x166)](_0x4b3979){const _0x2de97d=a39_0x164ca3,{options:_0xa1c79a,args:_0x40ff4b}=_0x4b3979,_0x44921e=_0xa1c79a[_0x2de97d(0x173)],_0x54f6f9=_0x40ff4b[0x0];try{const _0xdd8844=_0xa1c79a['parentSegment'];_0xa1c79a[_0x2de97d(0x186)]&&(console[_0x2de97d(0x171)](_0x2de97d(0x16d)+_0xa1c79a[_0x2de97d(0x164)]),console['error'](_0x2de97d(0x156)+(_0xdd8844||_0x2de97d(0x189))),_0x54f6f9&&console[_0x2de97d(0x171)](_0x2de97d(0x199)+_0x54f6f9),_0x44921e&&console[_0x2de97d(0x171)](_0x2de97d(0x16e)));if(!_0xdd8844)return console[_0x2de97d(0x171)](_0x2de97d(0x17f)),console[_0x2de97d(0x171)](''),console['error'](_0x2de97d(0x172)),console[_0x2de97d(0x171)](_0x2de97d(0x192)),console[_0x2de97d(0x171)](_0x2de97d(0x18c)),console[_0x2de97d(0x171)](''),console[_0x2de97d(0x171)]('Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.'),0x1;const _0x25345f=_0x54f6f9&&(_0x54f6f9[_0x2de97d(0x174)]('*')||_0x54f6f9[_0x2de97d(0x174)]('?'));if(_0x25345f)return await this['listWithPattern'](_0x4b3979,_0xdd8844,_0x54f6f9);const _0x1efaad=_0x54f6f9?_0xdd8844+'/'+_0x54f6f9:_0xdd8844;return _0x44921e?await this[_0x2de97d(0x17d)](_0x4b3979,_0x1efaad):await this[_0x2de97d(0x17c)](_0x4b3979,_0x1efaad);}catch(_0x5ecdd3){if(_0x5ecdd3 instanceof SDKError)return console['error'](_0x2de97d(0x188)+_0x5ecdd3[_0x2de97d(0x193)]),_0x5ecdd3[_0x2de97d(0x183)]&&console[_0x2de97d(0x171)](_0x2de97d(0x17e)+_0x5ecdd3[_0x2de97d(0x183)]),0x1;throw _0x5ecdd3;}}async[a39_0x164ca3(0x167)](_0x42fce9,_0x47a113,_0x4810bb){const _0x253ff1=a39_0x164ca3,{options:_0x4917c1,tdx:_0x9d1a53}=_0x42fce9,_0x12a713=_0x4917c1[_0x253ff1(0x187)],_0x46c31c=await withSpinner(_0x253ff1(0x18d)+_0x47a113+_0x253ff1(0x15c),()=>_0x9d1a53[_0x253ff1(0x18b)][_0x253ff1(0x198)](_0x47a113),{'verbose':_0x4917c1[_0x253ff1(0x186)]}),_0x3f34c6=_0x46c31c[_0x253ff1(0x19b)],_0x20ea04=await withSpinner(_0x253ff1(0x18f),()=>Promise[_0x253ff1(0x14d)]([_0x9d1a53[_0x253ff1(0x18b)][_0x253ff1(0x17c)](_0x3f34c6[_0x253ff1(0x19c)],_0x3f34c6['folderId']),_0x9d1a53[_0x253ff1(0x178)][_0x253ff1(0x17a)](_0x3f34c6['parentId'])]),{'verbose':_0x4917c1[_0x253ff1(0x186)]}),[_0x457ac8,_0x22eaca]=_0x20ea04['data'],{folders:_0x5a6441,segments:_0x2dde98}=_0x457ac8,_0x122384=_0x4810bb['replace'](/[.+^${}()|[\]\\]/g,_0x253ff1(0x179))[_0x253ff1(0x14e)](/\*/g,'.*')[_0x253ff1(0x14e)](/\?/g,'.'),_0x4747c3=new RegExp('^'+_0x122384+'$','i'),_0x208f78=_0x5a6441[_0x253ff1(0x158)](_0x1fc8ae=>_0x4747c3[_0x253ff1(0x18a)](_0x1fc8ae[_0x253ff1(0x17b)])),_0x5b6080=_0x2dde98[_0x253ff1(0x158)](_0x2899e3=>_0x4747c3[_0x253ff1(0x18a)](_0x2899e3[_0x253ff1(0x17b)])),_0x2f8ffc=_0x22eaca[_0x253ff1(0x158)](_0x4eb089=>_0x4747c3[_0x253ff1(0x18a)](_0x4eb089[_0x253ff1(0x168)])),_0x465c38=_0x208f78[_0x253ff1(0x184)]+_0x5b6080[_0x253ff1(0x184)]+_0x2f8ffc[_0x253ff1(0x184)];console['error'](_0x253ff1(0x153)+_0x208f78[_0x253ff1(0x184)]+_0x253ff1(0x195)+(_0x208f78[_0x253ff1(0x184)]!==0x1?'s':'')+',\x20'+_0x5b6080['length']+_0x253ff1(0x182)+(_0x5b6080[_0x253ff1(0x184)]!==0x1?'s':'')+_0x253ff1(0x15e)+_0x2f8ffc[_0x253ff1(0x184)]+_0x253ff1(0x196)+(_0x2f8ffc[_0x253ff1(0x184)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x4810bb+'\x27');const _0x219735=_0xaf331e=>{const _0x3755fa=_0x253ff1;return getConsoleNextUrl(_0x4917c1[_0x3755fa(0x164)],_0x3755fa(0x185)+_0x3f34c6[_0x3755fa(0x19c)]+'/e/'+_0xaf331e);},_0x19b928=_0x4917c1[_0x253ff1(0x19d)]===_0x253ff1(0x161)||_0x4917c1[_0x253ff1(0x19d)]===_0x253ff1(0x15f);if(_0x19b928){const _0x485d1d=[..._0x208f78[_0x253ff1(0x162)](_0x109adf=>({..._0x109adf,'type':_0x253ff1(0x165)})),..._0x5b6080[_0x253ff1(0x162)](_0x94065f=>({..._0x94065f,'type':_0x253ff1(0x18b),'url':_0x219735(_0x94065f['id'])})),..._0x2f8ffc[_0x253ff1(0x162)](_0x288696=>({..._0x288696,'name':_0x288696[_0x253ff1(0x168)],'type':_0x253ff1(0x178)}))][_0x253ff1(0x19a)]((_0x48065c,_0x13c8a2)=>_0x48065c[_0x253ff1(0x17b)]['localeCompare'](_0x13c8a2[_0x253ff1(0x17b)]));await handleSDKOutput(_0x485d1d,_0x4917c1);}else{if(_0x465c38===0x0)console[_0x253ff1(0x18e)](_0x253ff1(0x197)+_0x4810bb);else{console[_0x253ff1(0x18e)](a39_0x51825a[_0x253ff1(0x169)]('['+_0x47a113+_0x253ff1(0x190)+_0x4810bb+'\x27'));const _0x11dc98=formatFlatList(_0x208f78,_0x5b6080,{'showMetadata':!![],'showUrl':_0x12a713,'getSegmentUrl':_0x219735},_0x2f8ffc);console[_0x253ff1(0x18e)](_0x11dc98);}}return 0x0;}async[a39_0x164ca3(0x17c)](_0x25e6cf,_0x25176c){const _0x3c1aa6=a39_0x164ca3,{options:_0xdada31,tdx:_0x4c3936}=_0x25e6cf,_0x2b388b=_0xdada31[_0x3c1aa6(0x187)],_0x1d0b39=await withSpinner(_0x3c1aa6(0x155)+_0x25176c+_0x3c1aa6(0x15c),()=>_0x4c3936[_0x3c1aa6(0x18b)]['resolvePathToResource'](_0x25176c),{'verbose':_0xdada31[_0x3c1aa6(0x186)]}),_0x5da35f=_0x1d0b39['data'];_0xdada31[_0x3c1aa6(0x186)]&&(console[_0x3c1aa6(0x171)](_0x3c1aa6(0x15b)+_0x5da35f[_0x3c1aa6(0x19c)]),_0x5da35f[_0x3c1aa6(0x191)]&&console['error'](_0x3c1aa6(0x16b)+_0x5da35f['folderId']));const _0x2108d1=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>Promise[_0x3c1aa6(0x14d)]([_0x4c3936[_0x3c1aa6(0x18b)][_0x3c1aa6(0x17c)](_0x5da35f[_0x3c1aa6(0x19c)],_0x5da35f[_0x3c1aa6(0x191)]),_0x4c3936[_0x3c1aa6(0x178)][_0x3c1aa6(0x17a)](_0x5da35f[_0x3c1aa6(0x19c)])]),{'verbose':_0xdada31['verbose']}),[_0x425ea3,_0x42eab7]=_0x2108d1[_0x3c1aa6(0x19b)],{folders:_0x5edc46,segments:_0x30425a}=_0x425ea3,_0x1e1b1d=_0x5edc46['length']+_0x30425a[_0x3c1aa6(0x184)]+_0x42eab7[_0x3c1aa6(0x184)];console['error']('✔\x20Found\x20'+_0x5edc46[_0x3c1aa6(0x184)]+_0x3c1aa6(0x195)+(_0x5edc46[_0x3c1aa6(0x184)]!==0x1?'s':'')+',\x20'+_0x30425a[_0x3c1aa6(0x184)]+'\x20segment'+(_0x30425a['length']!==0x1?'s':'')+_0x3c1aa6(0x15e)+_0x42eab7[_0x3c1aa6(0x184)]+_0x3c1aa6(0x196)+(_0x42eab7[_0x3c1aa6(0x184)]!==0x1?'s':''));const _0x56d034=_0x286004=>{const _0x56eac1=_0x3c1aa6;return getConsoleNextUrl(_0xdada31[_0x56eac1(0x164)],_0x56eac1(0x185)+_0x5da35f[_0x56eac1(0x19c)]+_0x56eac1(0x152)+_0x286004);},_0x139afa=_0x32c658=>{const _0x4d1165=_0x3c1aa6;return getConsoleNextUrl(_0xdada31['site'],_0x4d1165(0x185)+_0x5da35f[_0x4d1165(0x19c)]+_0x4d1165(0x152)+_0x32c658+_0x4d1165(0x180));},_0x1ddaf1=_0xdada31['format']===_0x3c1aa6(0x161)||_0xdada31[_0x3c1aa6(0x19d)]==='jsonl';if(_0x1ddaf1){const _0x50f157=[..._0x5edc46[_0x3c1aa6(0x162)](_0x4bb131=>({..._0x4bb131,'type':_0x3c1aa6(0x165)})),..._0x30425a[_0x3c1aa6(0x162)](_0x51f0a3=>({..._0x51f0a3,'type':_0x3c1aa6(0x18b),'url':_0x56d034(_0x51f0a3['id'])})),..._0x42eab7[_0x3c1aa6(0x162)](_0x16911d=>({..._0x16911d,'name':_0x16911d['journeyBundleName'],'type':_0x3c1aa6(0x178),'url':_0x139afa(_0x16911d['id'])}))][_0x3c1aa6(0x19a)]((_0x4938ae,_0x15efae)=>_0x4938ae[_0x3c1aa6(0x17b)][_0x3c1aa6(0x16a)](_0x15efae[_0x3c1aa6(0x17b)]));await handleSDKOutput(_0x50f157,_0xdada31);}else{if(_0x1e1b1d===0x0)console[_0x3c1aa6(0x18e)](a39_0x51825a[_0x3c1aa6(0x169)]('['+_0x25176c+']')),console[_0x3c1aa6(0x18e)](_0x3c1aa6(0x154));else{console[_0x3c1aa6(0x18e)](a39_0x51825a['dim']('['+_0x25176c+']'));const _0x4abda9=formatFlatList(_0x5edc46,_0x30425a,{'showMetadata':!![],'showUrl':_0x2b388b,'getSegmentUrl':_0x56d034,'getJourneyUrl':_0x139afa},_0x42eab7);console['log'](_0x4abda9);}}return 0x0;}async[a39_0x164ca3(0x17d)](_0x1955e4,_0x2f4002){const _0x4d817d=a39_0x164ca3,{options:_0x4b9ad3,tdx:_0x204502}=_0x1955e4,_0x365f40=_0x4b9ad3[_0x4d817d(0x187)],_0x9e1111=await withSpinner('Resolving\x20path\x20\x27'+_0x2f4002+_0x4d817d(0x15c),()=>_0x204502[_0x4d817d(0x18b)]['resolvePathToResource'](_0x2f4002),{'verbose':_0x4b9ad3[_0x4d817d(0x186)]}),_0x2ac3c9=_0x9e1111[_0x4d817d(0x19b)];_0x4b9ad3['verbose']&&(console[_0x4d817d(0x171)](_0x4d817d(0x15b)+_0x2ac3c9[_0x4d817d(0x19c)]),_0x2ac3c9[_0x4d817d(0x191)]&&console[_0x4d817d(0x171)]('Folder\x20ID:\x20'+_0x2ac3c9[_0x4d817d(0x191)]));const _0x32b316=_0x4b9ad3['maxDepth']||0xa,_0x8e67fd=await withSpinner(_0x4d817d(0x177),()=>_0x204502[_0x4d817d(0x18b)][_0x4d817d(0x17d)](_0x2ac3c9[_0x4d817d(0x19c)],_0x2ac3c9[_0x4d817d(0x191)],0x0,_0x32b316),{'verbose':_0x4b9ad3['verbose']}),_0x4204e4=_0x8e67fd[_0x4d817d(0x19b)];console['error'](_0x4d817d(0x181)+_0x4204e4[_0x4d817d(0x184)]+_0x4d817d(0x16f));const _0x270fd2=_0x3ddb9f=>{const _0xbd62f6=_0x4d817d;return getConsoleNextUrl(_0x4b9ad3['site'],'/app/ps/'+_0x2ac3c9[_0xbd62f6(0x19c)]+'/e/'+_0x3ddb9f);};if(_0x4b9ad3[_0x4d817d(0x19d)]==='json'||_0x4b9ad3[_0x4d817d(0x19d)]==='jsonl')await handleSDKOutput(_0x4204e4,_0x4b9ad3);else{console[_0x4d817d(0x18e)](a39_0x51825a[_0x4d817d(0x169)]('['+_0x2f4002+']'));const _0x2001bc=formatTree(_0x4204e4,{'showMetadata':!![],'showUrl':_0x365f40,'getSegmentUrl':_0x270fd2});console[_0x4d817d(0x18e)](_0x2001bc);}return 0x0;}}
1
+ const a39_0x53fa8b=a39_0x4e69;(function(_0x256d9c,_0x3d4496){const _0x32bb89=a39_0x4e69,_0x5bf877=_0x256d9c();while(!![]){try{const _0x48f8c2=parseInt(_0x32bb89(0x15a))/0x1*(parseInt(_0x32bb89(0x17e))/0x2)+-parseInt(_0x32bb89(0x15b))/0x3*(-parseInt(_0x32bb89(0x172))/0x4)+parseInt(_0x32bb89(0x18f))/0x5+parseInt(_0x32bb89(0x18a))/0x6+parseInt(_0x32bb89(0x177))/0x7+parseInt(_0x32bb89(0x180))/0x8*(-parseInt(_0x32bb89(0x149))/0x9)+-parseInt(_0x32bb89(0x157))/0xa;if(_0x48f8c2===_0x3d4496)break;else _0x5bf877['push'](_0x5bf877['shift']());}catch(_0x12af9b){_0x5bf877['push'](_0x5bf877['shift']());}}}(a39_0x2fd3,0xef3c7));import{BaseCommand}from'./command.js';function a39_0x2fd3(){const _0x56ac2b=['test','Folder\x20ID:\x20','/app/ps/','Resolving\x20path\x20\x27','verbose','18873540MbaJlv','segment','name','21288HHwsab','12KjWWlW','Folder/pattern\x20arg:\x20','parentId','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','\x20\x20Cause:\x20','List\x20folders\x20and\x20child\x20segments','sort','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22',']\x20matching\x20\x27','folderId','recursive','Site:\x20','jsonl','journeyBundleName','site','length','maxDepth','Listing\x20folders,\x20segments,\x20and\x20journeys...','web','data','✔\x20Built\x20tree\x20with\x20','\x5c$&','json','1437208krLEDv','listRecursive','log','Resolving\x20parent\x20segment\x20\x27','/e/','8318387ELNRAB','resolvePathToResource','Error:\x20','listUnified','filter','(not\x20set)','parentSegment','94HHGwCH','Parent\x20ID:\x20','15196960EHAMQb','segments','cause','\x20folder','error','\x20segment','map','message','listJourneysFromParentSegment','format','3786888YOdqWG','✔\x20Found\x20','dim','folder','\x20matching\x20\x27','2548260ViItMB','Building\x20hierarchy\x20tree...','replace','description','all','Error:\x20No\x20parent\x20segment\x20context\x20set.','/j/da','9rPjjHV','\x20top-level\x20items','journey','listWithPattern','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','localeCompare','\x20journey',',\x20and\x20','\x27...'];a39_0x2fd3=function(){return _0x56ac2b;};return a39_0x2fd3();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a39_0x4e69(_0x2fbbc4,_0x209544){_0x2fbbc4=_0x2fbbc4-0x147;const _0x2fd376=a39_0x2fd3();let _0x4e6981=_0x2fd376[_0x2fbbc4];return _0x4e6981;}import{getConsoleNextUrl}from'../types/endpoints.js';import a39_0xc83a89 from'chalk';export class SegmentsCommand extends BaseCommand{[a39_0x53fa8b(0x159)]=a39_0x53fa8b(0x181);[a39_0x53fa8b(0x192)]=a39_0x53fa8b(0x160);async['execute'](_0x57d704){const _0x4b0782=a39_0x53fa8b,{options:_0x1814e6,args:_0x185bcc}=_0x57d704,_0x984a49=_0x1814e6[_0x4b0782(0x165)],_0x45fe6e=_0x185bcc[0x0];try{const _0x514adf=_0x1814e6[_0x4b0782(0x17d)];_0x1814e6[_0x4b0782(0x156)]&&(console['error'](_0x4b0782(0x166)+_0x1814e6[_0x4b0782(0x169)]),console[_0x4b0782(0x184)]('Parent\x20segment\x20context:\x20'+(_0x514adf||_0x4b0782(0x17c))),_0x45fe6e&&console[_0x4b0782(0x184)](_0x4b0782(0x15c)+_0x45fe6e),_0x984a49&&console['error']('Recursive\x20mode:\x20enabled'));if(!_0x514adf)return console[_0x4b0782(0x184)](_0x4b0782(0x147)),console[_0x4b0782(0x184)](''),console[_0x4b0782(0x184)]('Set\x20a\x20parent\x20segment\x20context\x20first:'),console[_0x4b0782(0x184)](_0x4b0782(0x162)),console[_0x4b0782(0x184)](_0x4b0782(0x14d)),console['error'](''),console[_0x4b0782(0x184)](_0x4b0782(0x15e)),0x1;const _0x461404=_0x45fe6e&&(_0x45fe6e['includes']('*')||_0x45fe6e['includes']('?'));if(_0x461404)return await this[_0x4b0782(0x14c)](_0x57d704,_0x514adf,_0x45fe6e);const _0x391a76=_0x45fe6e?_0x514adf+'/'+_0x45fe6e:_0x514adf;return _0x984a49?await this[_0x4b0782(0x173)](_0x57d704,_0x391a76):await this['listUnified'](_0x57d704,_0x391a76);}catch(_0x357baa){if(_0x357baa instanceof SDKError)return console['error'](_0x4b0782(0x179)+_0x357baa[_0x4b0782(0x187)]),_0x357baa[_0x4b0782(0x182)]&&console['error'](_0x4b0782(0x15f)+_0x357baa[_0x4b0782(0x182)]),0x1;throw _0x357baa;}}async[a39_0x53fa8b(0x14c)](_0x353c6f,_0xe72d54,_0x4e0f7d){const _0x3a33d2=a39_0x53fa8b,{options:_0x58746a,tdx:_0x4cf140}=_0x353c6f,_0x530a9d=_0x58746a[_0x3a33d2(0x16d)],_0x481bec=await withSpinner(_0x3a33d2(0x175)+_0xe72d54+'\x27...',()=>_0x4cf140[_0x3a33d2(0x158)][_0x3a33d2(0x178)](_0xe72d54),{'verbose':_0x58746a[_0x3a33d2(0x156)]}),_0x108d84=_0x481bec[_0x3a33d2(0x16e)],_0x106e51=await withSpinner(_0x3a33d2(0x16c),()=>Promise[_0x3a33d2(0x193)]([_0x4cf140[_0x3a33d2(0x158)][_0x3a33d2(0x17a)](_0x108d84[_0x3a33d2(0x15d)],_0x108d84[_0x3a33d2(0x164)]),_0x4cf140[_0x3a33d2(0x14b)]['listJourneysFromParentSegment'](_0x108d84[_0x3a33d2(0x15d)])]),{'verbose':_0x58746a['verbose']}),[_0x431270,_0x5de8c6]=_0x106e51[_0x3a33d2(0x16e)],{folders:_0x4c16bb,segments:_0x4b0791}=_0x431270,_0x39723e=_0x4e0f7d[_0x3a33d2(0x191)](/[.+^${}()|[\]\\]/g,_0x3a33d2(0x170))['replace'](/\*/g,'.*')[_0x3a33d2(0x191)](/\?/g,'.'),_0x4f9e59=new RegExp('^'+_0x39723e+'$','i'),_0x23d3a2=_0x4c16bb[_0x3a33d2(0x17b)](_0x666709=>_0x4f9e59[_0x3a33d2(0x152)](_0x666709[_0x3a33d2(0x159)])),_0x96b134=_0x4b0791[_0x3a33d2(0x17b)](_0x4633aa=>_0x4f9e59[_0x3a33d2(0x152)](_0x4633aa[_0x3a33d2(0x159)])),_0x432a1b=_0x5de8c6[_0x3a33d2(0x17b)](_0x3f63fb=>_0x4f9e59[_0x3a33d2(0x152)](_0x3f63fb['journeyBundleName'])),_0x28c4ad=_0x23d3a2[_0x3a33d2(0x16a)]+_0x96b134[_0x3a33d2(0x16a)]+_0x432a1b[_0x3a33d2(0x16a)];console[_0x3a33d2(0x184)](_0x3a33d2(0x18b)+_0x23d3a2[_0x3a33d2(0x16a)]+_0x3a33d2(0x183)+(_0x23d3a2[_0x3a33d2(0x16a)]!==0x1?'s':'')+',\x20'+_0x96b134[_0x3a33d2(0x16a)]+_0x3a33d2(0x185)+(_0x96b134[_0x3a33d2(0x16a)]!==0x1?'s':'')+_0x3a33d2(0x150)+_0x432a1b[_0x3a33d2(0x16a)]+_0x3a33d2(0x14f)+(_0x432a1b['length']!==0x1?'s':'')+_0x3a33d2(0x18e)+_0x4e0f7d+'\x27');const _0x409973=_0x156b6b=>{const _0x517c34=_0x3a33d2;return getConsoleNextUrl(_0x58746a[_0x517c34(0x169)],_0x517c34(0x154)+_0x108d84[_0x517c34(0x15d)]+'/e/'+_0x156b6b);},_0x5bca8c=_0x58746a[_0x3a33d2(0x189)]===_0x3a33d2(0x171)||_0x58746a[_0x3a33d2(0x189)]==='jsonl';if(_0x5bca8c){const _0x2f65e2=[..._0x23d3a2[_0x3a33d2(0x186)](_0x320217=>({..._0x320217,'type':_0x3a33d2(0x18d)})),..._0x96b134[_0x3a33d2(0x186)](_0x25c8f8=>({..._0x25c8f8,'type':_0x3a33d2(0x158),'url':_0x409973(_0x25c8f8['id'])})),..._0x432a1b['map'](_0x2645d8=>({..._0x2645d8,'name':_0x2645d8[_0x3a33d2(0x168)],'type':_0x3a33d2(0x14b)}))]['sort']((_0x127640,_0xc2bc00)=>_0x127640[_0x3a33d2(0x159)][_0x3a33d2(0x14e)](_0xc2bc00['name']));await handleSDKOutput(_0x2f65e2,_0x58746a);}else{if(_0x28c4ad===0x0)console[_0x3a33d2(0x174)]('No\x20items\x20match\x20pattern:\x20'+_0x4e0f7d);else{console[_0x3a33d2(0x174)](a39_0xc83a89[_0x3a33d2(0x18c)]('['+_0xe72d54+_0x3a33d2(0x163)+_0x4e0f7d+'\x27'));const _0x2afa27=formatFlatList(_0x23d3a2,_0x96b134,{'showMetadata':!![],'showUrl':_0x530a9d,'getSegmentUrl':_0x409973},_0x432a1b);console['log'](_0x2afa27);}}return 0x0;}async[a39_0x53fa8b(0x17a)](_0x52b47a,_0x5c857a){const _0x545121=a39_0x53fa8b,{options:_0x1e6d64,tdx:_0x344d8c}=_0x52b47a,_0x5406db=_0x1e6d64[_0x545121(0x16d)],_0x26cf6a=await withSpinner(_0x545121(0x155)+_0x5c857a+_0x545121(0x151),()=>_0x344d8c[_0x545121(0x158)][_0x545121(0x178)](_0x5c857a),{'verbose':_0x1e6d64['verbose']}),_0x5baa10=_0x26cf6a[_0x545121(0x16e)];_0x1e6d64['verbose']&&(console[_0x545121(0x184)](_0x545121(0x17f)+_0x5baa10[_0x545121(0x15d)]),_0x5baa10[_0x545121(0x164)]&&console[_0x545121(0x184)](_0x545121(0x153)+_0x5baa10[_0x545121(0x164)]));const _0x2de2be=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>Promise[_0x545121(0x193)]([_0x344d8c['segment'][_0x545121(0x17a)](_0x5baa10[_0x545121(0x15d)],_0x5baa10['folderId']),_0x344d8c[_0x545121(0x14b)][_0x545121(0x188)](_0x5baa10['parentId'])]),{'verbose':_0x1e6d64[_0x545121(0x156)]}),[_0x385717,_0x4c1b66]=_0x2de2be[_0x545121(0x16e)],{folders:_0x420397,segments:_0x92c755}=_0x385717,_0xca1e65=_0x420397[_0x545121(0x16a)]+_0x92c755['length']+_0x4c1b66['length'];console[_0x545121(0x184)]('✔\x20Found\x20'+_0x420397['length']+_0x545121(0x183)+(_0x420397[_0x545121(0x16a)]!==0x1?'s':'')+',\x20'+_0x92c755['length']+_0x545121(0x185)+(_0x92c755[_0x545121(0x16a)]!==0x1?'s':'')+',\x20and\x20'+_0x4c1b66[_0x545121(0x16a)]+'\x20journey'+(_0x4c1b66['length']!==0x1?'s':''));const _0x4aa8d8=_0x1b15d0=>{const _0x5478f2=_0x545121;return getConsoleNextUrl(_0x1e6d64[_0x5478f2(0x169)],_0x5478f2(0x154)+_0x5baa10[_0x5478f2(0x15d)]+_0x5478f2(0x176)+_0x1b15d0);},_0x1b87b2=_0x2dd37a=>{const _0x229907=_0x545121;return getConsoleNextUrl(_0x1e6d64[_0x229907(0x169)],_0x229907(0x154)+_0x5baa10[_0x229907(0x15d)]+'/e/'+_0x2dd37a+_0x229907(0x148));},_0x24fddd=_0x1e6d64['format']==='json'||_0x1e6d64['format']===_0x545121(0x167);if(_0x24fddd){const _0x316dfb=[..._0x420397['map'](_0x1b7409=>({..._0x1b7409,'type':_0x545121(0x18d)})),..._0x92c755[_0x545121(0x186)](_0x385ed2=>({..._0x385ed2,'type':_0x545121(0x158),'url':_0x4aa8d8(_0x385ed2['id'])})),..._0x4c1b66['map'](_0x18223b=>({..._0x18223b,'name':_0x18223b[_0x545121(0x168)],'type':_0x545121(0x14b),'url':_0x1b87b2(_0x18223b['id'])}))][_0x545121(0x161)]((_0x2db6e2,_0x24dde8)=>_0x2db6e2[_0x545121(0x159)]['localeCompare'](_0x24dde8[_0x545121(0x159)]));await handleSDKOutput(_0x316dfb,_0x1e6d64);}else{if(_0xca1e65===0x0)console[_0x545121(0x174)](a39_0xc83a89[_0x545121(0x18c)]('['+_0x5c857a+']')),console['log']('(empty)');else{console[_0x545121(0x174)](a39_0xc83a89['dim']('['+_0x5c857a+']'));const _0x7b37ac=formatFlatList(_0x420397,_0x92c755,{'showMetadata':!![],'showUrl':_0x5406db,'getSegmentUrl':_0x4aa8d8,'getJourneyUrl':_0x1b87b2},_0x4c1b66);console[_0x545121(0x174)](_0x7b37ac);}}return 0x0;}async[a39_0x53fa8b(0x173)](_0x155d04,_0x1ac6a1){const _0x2e213e=a39_0x53fa8b,{options:_0x40a042,tdx:_0x5874ca}=_0x155d04,_0x41a118=_0x40a042['web'],_0x4b7638=await withSpinner(_0x2e213e(0x155)+_0x1ac6a1+_0x2e213e(0x151),()=>_0x5874ca[_0x2e213e(0x158)][_0x2e213e(0x178)](_0x1ac6a1),{'verbose':_0x40a042[_0x2e213e(0x156)]}),_0x627271=_0x4b7638[_0x2e213e(0x16e)];_0x40a042[_0x2e213e(0x156)]&&(console['error'](_0x2e213e(0x17f)+_0x627271['parentId']),_0x627271[_0x2e213e(0x164)]&&console[_0x2e213e(0x184)](_0x2e213e(0x153)+_0x627271['folderId']));const _0x597bff=_0x40a042[_0x2e213e(0x16b)]||0xa,_0x268e41=await withSpinner(_0x2e213e(0x190),()=>_0x5874ca[_0x2e213e(0x158)][_0x2e213e(0x173)](_0x627271[_0x2e213e(0x15d)],_0x627271[_0x2e213e(0x164)],0x0,_0x597bff),{'verbose':_0x40a042[_0x2e213e(0x156)]}),_0x137d53=_0x268e41[_0x2e213e(0x16e)];console[_0x2e213e(0x184)](_0x2e213e(0x16f)+_0x137d53[_0x2e213e(0x16a)]+_0x2e213e(0x14a));const _0x15ec94=_0x3cf842=>{const _0x3f3f99=_0x2e213e;return getConsoleNextUrl(_0x40a042['site'],_0x3f3f99(0x154)+_0x627271[_0x3f3f99(0x15d)]+_0x3f3f99(0x176)+_0x3cf842);};if(_0x40a042['format']===_0x2e213e(0x171)||_0x40a042['format']==='jsonl')await handleSDKOutput(_0x137d53,_0x40a042);else{console[_0x2e213e(0x174)](a39_0xc83a89[_0x2e213e(0x18c)]('['+_0x1ac6a1+']'));const _0x39dcb9=formatTree(_0x137d53,{'showMetadata':!![],'showUrl':_0x41a118,'getSegmentUrl':_0x15ec94});console[_0x2e213e(0x174)](_0x39dcb9);}return 0x0;}}
@@ -1 +1 @@
1
- const a40_0x169ea8=a40_0x3286;(function(_0xe1ef71,_0x3dbc5d){const _0x3defef=a40_0x3286,_0x4451c3=_0xe1ef71();while(!![]){try{const _0x5bfee8=-parseInt(_0x3defef(0x14d))/0x1*(parseInt(_0x3defef(0x13d))/0x2)+-parseInt(_0x3defef(0x148))/0x3*(parseInt(_0x3defef(0x162))/0x4)+-parseInt(_0x3defef(0x15e))/0x5*(-parseInt(_0x3defef(0x15b))/0x6)+parseInt(_0x3defef(0x156))/0x7+-parseInt(_0x3defef(0x145))/0x8+parseInt(_0x3defef(0x13f))/0x9*(-parseInt(_0x3defef(0x147))/0xa)+parseInt(_0x3defef(0x146))/0xb;if(_0x5bfee8===_0x3dbc5d)break;else _0x4451c3['push'](_0x4451c3['shift']());}catch(_0x34af65){_0x4451c3['push'](_0x4451c3['shift']());}}}(a40_0x1a51,0x93ce7));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a40_0x3286(_0x5585cb,_0x12f13e){_0x5585cb=_0x5585cb-0x138;const _0x1a5170=a40_0x1a51();let _0x328647=_0x1a5170[_0x5585cb];return _0x328647;}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a40_0x1a51(){const _0x1be10e=['execute','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','✔\x20Retrieved\x20','limit','5076169cULdcB','cause','\x20from\x20','verbose','Error:\x20','1302HyvFoq','message','show','9690XfLbXG','...','length','Catalog:\x20','60FQaTgj','database','Querying\x20','Usage:\x20tdx\x20show\x20<database.table>','args','Show\x20table\x20contents','error','2TdfWmI','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','432fJOQUt','Site:\x20','data','Limit:\x20','catalog','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','7254248Oedqka','17769554ybPteU','34420xUqbfK','12396hFnXsU','\x20\x20Cause:\x20','\x20row','validate','showTable','1021735KwonSj','site','query','Table:\x20'];a40_0x1a51=function(){return _0x1be10e;};return a40_0x1a51();}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{['name']=a40_0x169ea8(0x15d);['description']=a40_0x169ea8(0x13b);async[a40_0x169ea8(0x151)](_0x1ef351){const _0x31eb60=a40_0x169ea8;return this[_0x31eb60(0x14c)](_0x1ef351);}async[a40_0x169ea8(0x14c)](_0x382af4){const _0x83883c=a40_0x169ea8,{options:_0x3b8274,args:_0x23be2a,tdx:_0x1fc9c9}=_0x382af4;let _0x442828;try{_0x442828=parseTableReference(_0x23be2a[0x0]);const _0xf69de=_0x3b8274[_0x83883c(0x163)];!_0x442828['database']&&_0xf69de&&(_0x442828[_0x83883c(0x163)]=_0xf69de);const _0x36af9e=validateTableDescribeReference(_0x442828);if(_0x36af9e)return console['error'](_0x83883c(0x15a)+_0x36af9e),console['error'](_0x83883c(0x139)),console[_0x83883c(0x13c)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x2b18bd){return console['error']('Error:\x20'+_0x2b18bd[_0x83883c(0x15c)]),console[_0x83883c(0x13c)](_0x83883c(0x139)),console[_0x83883c(0x13c)](_0x83883c(0x144)),console['error'](_0x83883c(0x152)),0x1;}const _0x150136=_0x442828[_0x83883c(0x143)],_0x5a3c82=_0x442828['database'],_0x10232f=_0x442828['table'],_0x56431b=resolveLimit(_0x3b8274[_0x83883c(0x155)],DEFAULT_DISPLAY_LIMIT);try{_0x3b8274[_0x83883c(0x159)]&&(console[_0x83883c(0x13c)](_0x83883c(0x140)+_0x3b8274[_0x83883c(0x14e)]),_0x150136&&console[_0x83883c(0x13c)](_0x83883c(0x161)+_0x150136),console[_0x83883c(0x13c)]('Database:\x20'+_0x5a3c82),console['error'](_0x83883c(0x150)+_0x10232f),console['error'](_0x83883c(0x142)+_0x56431b));const _0x307299=_0x150136?_0x150136+'.'+_0x5a3c82+'.'+_0x10232f:_0x5a3c82+'.'+_0x10232f,_0x5b5f7b=await withSpinner(_0x83883c(0x138)+_0x307299+_0x83883c(0x15f),()=>_0x1fc9c9[_0x83883c(0x14f)][_0x83883c(0x14c)](_0x5a3c82,_0x10232f,_0x56431b,_0x150136),{'verbose':_0x3b8274[_0x83883c(0x159)]}),_0xbd9016=_0x5b5f7b[_0x83883c(0x141)],_0x10668c=_0xbd9016[_0x83883c(0x141)];return _0x10668c[_0x83883c(0x160)]===0x0?console[_0x83883c(0x13c)](_0x83883c(0x153)):console['error'](_0x83883c(0x154)+_0x10668c[_0x83883c(0x160)]+_0x83883c(0x14a)+(_0x10668c[_0x83883c(0x160)]!==0x1?'s':'')+_0x83883c(0x158)+_0x307299),await handleSDKOutput(_0x10668c,_0x3b8274),0x0;}catch(_0x556d39){if(_0x556d39 instanceof SDKError)return console[_0x83883c(0x13c)](_0x83883c(0x15a)+_0x556d39[_0x83883c(0x15c)]),_0x556d39[_0x83883c(0x157)]&&console[_0x83883c(0x13c)](_0x83883c(0x149)+_0x556d39['cause']),0x1;throw _0x556d39;}}[a40_0x169ea8(0x14b)](_0x4bea25){const _0x3a4d7b=a40_0x169ea8;if(_0x4bea25[_0x3a4d7b(0x13a)]['length']===0x0)return'Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';if(_0x4bea25[_0x3a4d7b(0x13a)][_0x3a4d7b(0x160)]>0x1)return _0x3a4d7b(0x13e);return undefined;}}
1
+ const a40_0x1ffe54=a40_0x41fc;(function(_0x3ff6f4,_0x1a24f5){const _0x354ed6=a40_0x41fc,_0x520101=_0x3ff6f4();while(!![]){try{const _0x3c8d63=parseInt(_0x354ed6(0x1ad))/0x1+parseInt(_0x354ed6(0x19a))/0x2*(parseInt(_0x354ed6(0x1b6))/0x3)+-parseInt(_0x354ed6(0x1b7))/0x4*(parseInt(_0x354ed6(0x1a8))/0x5)+parseInt(_0x354ed6(0x1ba))/0x6*(parseInt(_0x354ed6(0x1c0))/0x7)+-parseInt(_0x354ed6(0x1aa))/0x8+-parseInt(_0x354ed6(0x199))/0x9*(-parseInt(_0x354ed6(0x198))/0xa)+parseInt(_0x354ed6(0x1a2))/0xb*(-parseInt(_0x354ed6(0x1ac))/0xc);if(_0x3c8d63===_0x1a24f5)break;else _0x520101['push'](_0x520101['shift']());}catch(_0x5704cc){_0x520101['push'](_0x520101['shift']());}}}(a40_0x14f4,0x2421c));function a40_0x41fc(_0x51ec57,_0x3f4386){_0x51ec57=_0x51ec57-0x196;const _0x14f4c7=a40_0x14f4();let _0x41fcce=_0x14f4c7[_0x51ec57];return _0x41fcce;}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a40_0x14f4(){const _0x36055a=['6369ORUSEG','show','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Querying\x20','description','Table:\x20','73220fIuaRW','Database:\x20','2263040NjmVwl','limit','4164tCLFBZ','164405FDcXTE','Catalog:\x20','showTable','\x20\x20Cause:\x20','Site:\x20','message','Error:\x20','table','catalog','27849DofNzR','44keasqx','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Show\x20table\x20contents','6TzFtsJ','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','✔\x20Retrieved\x20','cause','data','database','1695344Uactvw','\x20from\x20','length','args','validate','\x20row','37610kbkFis','369QFKbQo','50humWyE','error','Usage:\x20tdx\x20show\x20<database.table>','...','Limit:\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','verbose','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'];a40_0x14f4=function(){return _0x36055a;};return a40_0x14f4();}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{['name']=a40_0x1ffe54(0x1a3);[a40_0x1ffe54(0x1a6)]=a40_0x1ffe54(0x1b9);async['execute'](_0xfa6654){const _0x33fdb8=a40_0x1ffe54;return this[_0x33fdb8(0x1af)](_0xfa6654);}async[a40_0x1ffe54(0x1af)](_0x1d42bc){const _0x4be7ab=a40_0x1ffe54,{options:_0x22fde4,args:_0x4a12d9,tdx:_0x16e0ed}=_0x1d42bc;let _0x2dee9e;try{_0x2dee9e=parseTableReference(_0x4a12d9[0x0]);const _0x2a0c97=_0x22fde4[_0x4be7ab(0x1bf)];!_0x2dee9e[_0x4be7ab(0x1bf)]&&_0x2a0c97&&(_0x2dee9e[_0x4be7ab(0x1bf)]=_0x2a0c97);const _0x50cbbb=validateTableDescribeReference(_0x2dee9e);if(_0x50cbbb)return console['error'](_0x4be7ab(0x1b3)+_0x50cbbb),console['error'](_0x4be7ab(0x19c)),console['error'](_0x4be7ab(0x1a1)),console[_0x4be7ab(0x19b)](_0x4be7ab(0x1b8)),0x1;}catch(_0x391213){return console[_0x4be7ab(0x19b)](_0x4be7ab(0x1b3)+_0x391213[_0x4be7ab(0x1b2)]),console[_0x4be7ab(0x19b)](_0x4be7ab(0x19c)),console[_0x4be7ab(0x19b)](_0x4be7ab(0x1a1)),console[_0x4be7ab(0x19b)](_0x4be7ab(0x1b8)),0x1;}const _0x496129=_0x2dee9e[_0x4be7ab(0x1b5)],_0x3c788c=_0x2dee9e['database'],_0x470a05=_0x2dee9e[_0x4be7ab(0x1b4)],_0x4a6e9=resolveLimit(_0x22fde4[_0x4be7ab(0x1ab)],DEFAULT_DISPLAY_LIMIT);try{_0x22fde4[_0x4be7ab(0x1a0)]&&(console['error'](_0x4be7ab(0x1b1)+_0x22fde4['site']),_0x496129&&console[_0x4be7ab(0x19b)](_0x4be7ab(0x1ae)+_0x496129),console[_0x4be7ab(0x19b)](_0x4be7ab(0x1a9)+_0x3c788c),console[_0x4be7ab(0x19b)](_0x4be7ab(0x1a7)+_0x470a05),console[_0x4be7ab(0x19b)](_0x4be7ab(0x19e)+_0x4a6e9));const _0xc312da=_0x496129?_0x496129+'.'+_0x3c788c+'.'+_0x470a05:_0x3c788c+'.'+_0x470a05,_0x15826e=await withSpinner(_0x4be7ab(0x1a5)+_0xc312da+_0x4be7ab(0x19d),()=>_0x16e0ed['query'][_0x4be7ab(0x1af)](_0x3c788c,_0x470a05,_0x4a6e9,_0x496129),{'verbose':_0x22fde4[_0x4be7ab(0x1a0)]}),_0x2c3c04=_0x15826e[_0x4be7ab(0x1be)],_0x21d14f=_0x2c3c04[_0x4be7ab(0x1be)];return _0x21d14f[_0x4be7ab(0x1c2)]===0x0?console['error'](_0x4be7ab(0x19f)):console[_0x4be7ab(0x19b)](_0x4be7ab(0x1bc)+_0x21d14f[_0x4be7ab(0x1c2)]+_0x4be7ab(0x197)+(_0x21d14f[_0x4be7ab(0x1c2)]!==0x1?'s':'')+_0x4be7ab(0x1c1)+_0xc312da),await handleSDKOutput(_0x21d14f,_0x22fde4),0x0;}catch(_0x166ffa){if(_0x166ffa instanceof SDKError)return console[_0x4be7ab(0x19b)](_0x4be7ab(0x1b3)+_0x166ffa[_0x4be7ab(0x1b2)]),_0x166ffa[_0x4be7ab(0x1bd)]&&console[_0x4be7ab(0x19b)](_0x4be7ab(0x1b0)+_0x166ffa['cause']),0x1;throw _0x166ffa;}}[a40_0x1ffe54(0x196)](_0xbe421b){const _0x52e1b3=a40_0x1ffe54;if(_0xbe421b['args']['length']===0x0)return _0x52e1b3(0x1bb);if(_0xbe421b[_0x52e1b3(0x1c3)]['length']>0x1)return _0x52e1b3(0x1a4);return undefined;}}
@@ -1 +1 @@
1
- const a41_0x44fada=a41_0xbb70;(function(_0x72e119,_0x212032){const _0xde0817=a41_0xbb70,_0xe8471b=_0x72e119();while(!![]){try{const _0x1c7f8a=-parseInt(_0xde0817(0x189))/0x1*(-parseInt(_0xde0817(0x184))/0x2)+-parseInt(_0xde0817(0x18d))/0x3+parseInt(_0xde0817(0x1a6))/0x4*(-parseInt(_0xde0817(0x195))/0x5)+parseInt(_0xde0817(0x188))/0x6*(-parseInt(_0xde0817(0x190))/0x7)+parseInt(_0xde0817(0x17f))/0x8+parseInt(_0xde0817(0x1a7))/0x9*(parseInt(_0xde0817(0x1ac))/0xa)+-parseInt(_0xde0817(0x19f))/0xb*(-parseInt(_0xde0817(0x183))/0xc);if(_0x1c7f8a===_0x212032)break;else _0xe8471b['push'](_0xe8471b['shift']());}catch(_0x348214){_0xe8471b['push'](_0xe8471b['shift']());}}}(a41_0x30a0,0x20a45));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a41_0xbb70(_0x4d404d,_0x52c1da){_0x4d404d=_0x4d404d-0x17e;const _0x30a026=a41_0x30a0();let _0xbb706e=_0x30a026[_0x4d404d];return _0xbb706e;}import{parseTableReference}from'../utils/table-ref-parser.js';function a41_0x30a0(){const _0xe810ff=['226872IpvNgg','query','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','7tYBdlt','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','Database:\x20','length','includes','5pivuxm','error','cause','\x20\x20Cause:\x20','Note:\x20\x27','database','execute','✔\x20Found\x20','table','\x27\x20is\x20ambiguous.','12716HPJVcs','Site:\x20','Listing\x20tables...','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','limit','data','site','396692ugmvgl','553041HwJfLj','Error:\x20','message','Error:\x20Pattern\x20\x27','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','10CFvPrG','.*\x22','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','1803520tyoekF','description','tables','\x20table','1056rBiSbb','4ePItAJ','Or\x20use\x20--in\x20flag:','Table\x20pattern:\x20','List\x20tables\x20in\x20a\x20database','1064682RWYGdv','48664pkupPX','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'];a41_0x30a0=function(){return _0xe810ff;};return a41_0x30a0();}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{['name']=a41_0x44fada(0x181);[a41_0x44fada(0x180)]=a41_0x44fada(0x187);async[a41_0x44fada(0x19b)](_0x3c1dba){const _0x403015=a41_0x44fada,{options:_0x1713bd,args:_0x2c841d,tdx:_0x5dc996}=_0x3c1dba;let _0x256ea9;if(_0x2c841d[_0x403015(0x193)]===0x0)_0x256ea9={'database':undefined,'table':undefined,'original':''};else{if(_0x2c841d['length']===0x1)try{_0x256ea9=parseTableReference(_0x2c841d[0x0]);if(_0x256ea9[_0x403015(0x19d)]&&!_0x256ea9[_0x403015(0x19a)]&&!_0x256ea9[_0x403015(0x19d)][_0x403015(0x194)]('*')&&!_0x256ea9[_0x403015(0x19d)]['includes']('?'))return console[_0x403015(0x196)](_0x403015(0x1aa)+_0x2c841d[0x0]+_0x403015(0x19e)),console[_0x403015(0x196)](_0x403015(0x191)+_0x256ea9[_0x403015(0x19d)]+'\x27?'),console[_0x403015(0x196)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x256ea9[_0x403015(0x19d)]+_0x403015(0x1ad)),console[_0x403015(0x196)](_0x403015(0x18b)+_0x256ea9[_0x403015(0x19d)]),console[_0x403015(0x196)](_0x403015(0x1ab)+_0x256ea9[_0x403015(0x19d)]),console[_0x403015(0x196)](''),console[_0x403015(0x196)](_0x403015(0x199)+_0x2c841d[0x0]+_0x403015(0x18a)+_0x256ea9['table']+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x1dcede){return console[_0x403015(0x196)](_0x403015(0x1a8)+_0x1dcede['message']),0x1;}else return console['error']('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console['error'](_0x403015(0x18f)),console[_0x403015(0x196)](_0x403015(0x18c)),console[_0x403015(0x196)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x403015(0x196)](_0x403015(0x17e)),console[_0x403015(0x196)](_0x403015(0x185)),console[_0x403015(0x196)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x4a7e2b=_0x1713bd[_0x403015(0x19a)];!_0x256ea9['database']&&_0x4a7e2b&&(_0x256ea9['database']=_0x4a7e2b);try{const _0x53ffe5=_0x32cf69=>_0x32cf69&&(_0x32cf69[_0x403015(0x194)]('*')||_0x32cf69[_0x403015(0x194)]('?')),_0x5ee79b=_0x53ffe5(_0x256ea9['database']);_0x1713bd['verbose']&&(console[_0x403015(0x196)](_0x403015(0x1a0)+_0x1713bd[_0x403015(0x1a5)]),_0x256ea9['database']?_0x5ee79b?console[_0x403015(0x196)]('Database\x20pattern:\x20'+_0x256ea9['database']):console[_0x403015(0x196)](_0x403015(0x192)+_0x256ea9['database']):console['error']('Database:\x20all'),_0x256ea9['table']&&console[_0x403015(0x196)](_0x403015(0x186)+_0x256ea9['table']));const _0x29c53d=_0x256ea9[_0x403015(0x19a)]&&!_0x5ee79b?_0x256ea9['database']:undefined,_0x3125ba=_0x5ee79b?_0x256ea9[_0x403015(0x19a)]:undefined,_0x480106=_0x256ea9['table'],_0x36f393=resolveLimit(_0x1713bd[_0x403015(0x1a3)],DEFAULT_LISTING_LIMIT),_0x9f52be=await withSpinner(_0x403015(0x1a1),()=>_0x5dc996[_0x403015(0x18e)]['listTables'](_0x29c53d,_0x480106,_0x3125ba,_0x36f393),{'verbose':_0x1713bd['verbose']}),_0x1481ae=_0x9f52be[_0x403015(0x1a4)];if(_0x1481ae[_0x403015(0x193)]===0x0&&_0x256ea9['database']&&!_0x5ee79b)return console[_0x403015(0x196)]('✖\x20No\x20tables\x20found'),console['error']('Database\x20\x27'+_0x256ea9['database']+_0x403015(0x1a2)),0x1;return console[_0x403015(0x196)](_0x403015(0x19c)+_0x1481ae['length']+_0x403015(0x182)+(_0x1481ae['length']!==0x1?'s':'')),await handleSDKOutput(_0x1481ae,{..._0x1713bd,'limit':_0x36f393}),0x0;}catch(_0x2e0ec7){if(_0x2e0ec7 instanceof SDKError)return console[_0x403015(0x196)](_0x403015(0x1a8)+_0x2e0ec7[_0x403015(0x1a9)]),_0x2e0ec7['cause']&&console[_0x403015(0x196)](_0x403015(0x198)+_0x2e0ec7[_0x403015(0x197)]),0x1;throw _0x2e0ec7;}}['validate'](_0x472444){return undefined;}}
1
+ const a41_0x16fc83=a41_0x1579;(function(_0x286e63,_0x46cfb8){const _0x4b8017=a41_0x1579,_0x579b56=_0x286e63();while(!![]){try{const _0x5c5ad9=parseInt(_0x4b8017(0xb8))/0x1+-parseInt(_0x4b8017(0xcb))/0x2+-parseInt(_0x4b8017(0xbb))/0x3+-parseInt(_0x4b8017(0xca))/0x4+parseInt(_0x4b8017(0xc5))/0x5*(-parseInt(_0x4b8017(0xd4))/0x6)+-parseInt(_0x4b8017(0xb4))/0x7*(parseInt(_0x4b8017(0xc8))/0x8)+parseInt(_0x4b8017(0xbf))/0x9;if(_0x5c5ad9===_0x46cfb8)break;else _0x579b56['push'](_0x579b56['shift']());}catch(_0x10b995){_0x579b56['push'](_0x579b56['shift']());}}}(a41_0x379e,0x2fc04));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';function a41_0x1579(_0x7f8420,_0x1052b1){_0x7f8420=_0x7f8420-0xa7;const _0x379e79=a41_0x379e();let _0x157951=_0x379e79[_0x7f8420];return _0x157951;}function a41_0x379e(){const _0x4a6355=['\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','message','Database\x20\x27','verbose','2232EAeqnA','tables','limit','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','site','Site:\x20','execute','Or\x20use\x20--in\x20flag:','data','\x20\x20Cause:\x20','Error:\x20Pattern\x20\x27','includes','.*\x22','7749FtIGKH','Error:\x20','Database\x20pattern:\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','327144wXKBXZ','error','List\x20tables\x20in\x20a\x20database','604299QBwFNa','✔\x20Found\x20','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','\x20\x20Use:\x20tdx\x20tables\x20\x22','4898655KBKFrm','✖\x20No\x20tables\x20found','cause','table','length','name','650InetWI','Database:\x20all','Listing\x20tables...','360dUfXme','query','415652nwDqbN','544660igUibF','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x20table','Table\x20pattern:\x20','database'];a41_0x379e=function(){return _0x4a6355;};return a41_0x379e();}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a41_0x16fc83(0xc4)]=a41_0x16fc83(0xd5);['description']=a41_0x16fc83(0xba);async[a41_0x16fc83(0xad)](_0x4965b2){const _0x2ba173=a41_0x16fc83,{options:_0x566776,args:_0x2467a9,tdx:_0x1aeeb0}=_0x4965b2;let _0x5196a6;if(_0x2467a9[_0x2ba173(0xc3)]===0x0)_0x5196a6={'database':undefined,'table':undefined,'original':''};else{if(_0x2467a9['length']===0x1)try{_0x5196a6=parseTableReference(_0x2467a9[0x0]);if(_0x5196a6['table']&&!_0x5196a6[_0x2ba173(0xcf)]&&!_0x5196a6[_0x2ba173(0xc2)][_0x2ba173(0xb2)]('*')&&!_0x5196a6[_0x2ba173(0xc2)]['includes']('?'))return console[_0x2ba173(0xb9)](_0x2ba173(0xb1)+_0x2467a9[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x2ba173(0xb9)](_0x2ba173(0xb7)+_0x5196a6[_0x2ba173(0xc2)]+'\x27?'),console[_0x2ba173(0xb9)](_0x2ba173(0xbe)+_0x5196a6[_0x2ba173(0xc2)]+_0x2ba173(0xb3)),console[_0x2ba173(0xb9)](_0x2ba173(0xa8)+_0x5196a6[_0x2ba173(0xc2)]),console[_0x2ba173(0xb9)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x5196a6[_0x2ba173(0xc2)]),console[_0x2ba173(0xb9)](''),console[_0x2ba173(0xb9)]('Note:\x20\x27'+_0x2467a9[0x0]+_0x2ba173(0xaa)+_0x5196a6[_0x2ba173(0xc2)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x11b7ca){return console[_0x2ba173(0xb9)](_0x2ba173(0xb5)+_0x11b7ca['message']),0x1;}else return console[_0x2ba173(0xb9)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console['error'](_0x2ba173(0xd0)),console[_0x2ba173(0xb9)](_0x2ba173(0xa9)),console[_0x2ba173(0xb9)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console['error'](_0x2ba173(0xcc)),console[_0x2ba173(0xb9)](_0x2ba173(0xae)),console[_0x2ba173(0xb9)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x308617=_0x566776[_0x2ba173(0xcf)];!_0x5196a6['database']&&_0x308617&&(_0x5196a6[_0x2ba173(0xcf)]=_0x308617);try{const _0x41b362=_0x130abb=>_0x130abb&&(_0x130abb[_0x2ba173(0xb2)]('*')||_0x130abb[_0x2ba173(0xb2)]('?')),_0x3f2905=_0x41b362(_0x5196a6[_0x2ba173(0xcf)]);_0x566776[_0x2ba173(0xd3)]&&(console['error'](_0x2ba173(0xac)+_0x566776[_0x2ba173(0xab)]),_0x5196a6[_0x2ba173(0xcf)]?_0x3f2905?console[_0x2ba173(0xb9)](_0x2ba173(0xb6)+_0x5196a6[_0x2ba173(0xcf)]):console[_0x2ba173(0xb9)]('Database:\x20'+_0x5196a6[_0x2ba173(0xcf)]):console['error'](_0x2ba173(0xc6)),_0x5196a6[_0x2ba173(0xc2)]&&console[_0x2ba173(0xb9)](_0x2ba173(0xce)+_0x5196a6[_0x2ba173(0xc2)]));const _0x5e44ef=_0x5196a6['database']&&!_0x3f2905?_0x5196a6[_0x2ba173(0xcf)]:undefined,_0x4aa89a=_0x3f2905?_0x5196a6['database']:undefined,_0x35a42b=_0x5196a6['table'],_0x1a77e6=resolveLimit(_0x566776[_0x2ba173(0xa7)],DEFAULT_LISTING_LIMIT),_0x21b0c6=await withSpinner(_0x2ba173(0xc7),()=>_0x1aeeb0[_0x2ba173(0xc9)]['listTables'](_0x5e44ef,_0x35a42b,_0x4aa89a,_0x1a77e6),{'verbose':_0x566776['verbose']}),_0x34f68f=_0x21b0c6[_0x2ba173(0xaf)];if(_0x34f68f[_0x2ba173(0xc3)]===0x0&&_0x5196a6[_0x2ba173(0xcf)]&&!_0x3f2905)return console[_0x2ba173(0xb9)](_0x2ba173(0xc0)),console['error'](_0x2ba173(0xd2)+_0x5196a6[_0x2ba173(0xcf)]+_0x2ba173(0xbd)),0x1;return console[_0x2ba173(0xb9)](_0x2ba173(0xbc)+_0x34f68f['length']+_0x2ba173(0xcd)+(_0x34f68f[_0x2ba173(0xc3)]!==0x1?'s':'')),await handleSDKOutput(_0x34f68f,{..._0x566776,'limit':_0x1a77e6}),0x0;}catch(_0x105b4c){if(_0x105b4c instanceof SDKError)return console[_0x2ba173(0xb9)](_0x2ba173(0xb5)+_0x105b4c[_0x2ba173(0xd1)]),_0x105b4c['cause']&&console[_0x2ba173(0xb9)](_0x2ba173(0xb0)+_0x105b4c[_0x2ba173(0xc1)]),0x1;throw _0x105b4c;}}['validate'](_0x10228d){return undefined;}}
@@ -1 +1 @@
1
- const a42_0x4b1e76=a42_0x1584;(function(_0x430c88,_0x528117){const _0x2ac4df=a42_0x1584,_0x18e5b5=_0x430c88();while(!![]){try{const _0x2d716c=parseInt(_0x2ac4df(0xc7))/0x1*(parseInt(_0x2ac4df(0xcd))/0x2)+-parseInt(_0x2ac4df(0xc8))/0x3+parseInt(_0x2ac4df(0xce))/0x4+parseInt(_0x2ac4df(0xc1))/0x5*(-parseInt(_0x2ac4df(0xbe))/0x6)+parseInt(_0x2ac4df(0xca))/0x7+-parseInt(_0x2ac4df(0xa7))/0x8+-parseInt(_0x2ac4df(0xaa))/0x9*(parseInt(_0x2ac4df(0xba))/0xa);if(_0x2d716c===_0x528117)break;else _0x18e5b5['push'](_0x18e5b5['shift']());}catch(_0x1bd0cc){_0x18e5b5['push'](_0x18e5b5['shift']());}}}(a42_0x4308,0xa4968));import{BaseCommand}from'./command.js';function a42_0x4308(){const _0x2955f9=['execute','Session\x20agent\x20set\x20to:\x20','cleared','session','5348504XKLpDk','\x27\x20does\x20not\x20exist','Session\x20context\x20','9rlHNzw','green','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','parent_segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Session\x20profile\x20set\x20to:\x20','engage_workspace','Error:\x20','Error:\x20Profile\x20\x27','log','profile','clear','llm_agent','error','includes','Invalid\x20resource:\x20','1501370SERkZG','message','toString','use','1824puXxxW','(session:\x20','description','13175cMEqhh','Session\x20database\x20set\x20to:\x20','Session\x20llm_project\x20set\x20to:\x20','displayWithSources','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','join','70PTulTP','901191kEUeRb','agent','8149827CQmJHt','llm_project','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','4656isuLMC','5068272apuLTf','database','dim','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','name','debug','Session\x20engage_workspace\x20set\x20to:\x20','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','display','validate','length','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','Set\x20session-level\x20context'];a42_0x4308=function(){return _0x2955f9;};return a42_0x4308();}import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists}from'../core/profile.js';function a42_0x1584(_0x383eb7,_0x334664){_0x383eb7=_0x383eb7-0x9c;const _0x4308c5=a42_0x4308();let _0x158411=_0x4308c5[_0x383eb7];return _0x158411;}import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../utils/agent-ref-parser.js';import a42_0x429805 from'chalk';export class UseCommand extends BaseCommand{[a42_0x4b1e76(0xd2)]=a42_0x4b1e76(0xbd);[a42_0x4b1e76(0xc0)]=a42_0x4b1e76(0xa2);[a42_0x4b1e76(0x9f)](_0x338898){const _0x29628c=a42_0x4b1e76,{args:_0x30e00e}=_0x338898;if(_0x30e00e[_0x29628c(0xa0)]===0x0)return undefined;if(_0x30e00e[_0x29628c(0xa0)]===0x1)return _0x29628c(0x9d)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a'+_0x29628c(0xae)+'\x0aResources:\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'+_0x29628c(0xc5);const _0x2180f4=_0x30e00e[0x0],_0x10b4d9=[_0x29628c(0xcf),_0x29628c(0xad),'llm_project',_0x29628c(0xc9),_0x29628c(0xb4),_0x29628c(0xb0)];if(!_0x10b4d9[_0x29628c(0xb8)](_0x2180f4))return _0x29628c(0xb9)+_0x2180f4+'.\x20Must\x20be\x20one\x20of:\x20'+_0x10b4d9[_0x29628c(0xc6)](',\x20');return undefined;}async[a42_0x4b1e76(0xa3)](_0x5c10a1){const _0x1721c1=a42_0x4b1e76,{args:_0x2cd918,options:_0x5d8323}=_0x5c10a1,_0x32cde9=_0x5d8323[_0x1721c1(0xd3)],_0x265ad5=_0x5d8323[_0x1721c1(0xb5)];cleanExpiredSessions();try{if(_0x265ad5){clearSessionContext(_0x5d8323['session']);const _0x3e4207=_0x5d8323[_0x1721c1(0xa6)]||getCurrentSessionPID()[_0x1721c1(0xbc)]();return console['log'](_0x1721c1(0xa9)+a42_0x429805[_0x1721c1(0xab)](_0x1721c1(0xa5))+'\x20'+a42_0x429805[_0x1721c1(0xd0)](_0x1721c1(0xbf)+_0x3e4207+')')),0x0;}if(_0x2cd918['length']===0x0){const _0x1b7749=new GlobalContext(_0x5d8323);return _0x32cde9?_0x1b7749[_0x1721c1(0xc4)]():_0x1b7749[_0x1721c1(0x9e)](),console[_0x1721c1(0xb3)](a42_0x429805['dim'](_0x1721c1(0xac))),console[_0x1721c1(0xb3)](a42_0x429805[_0x1721c1(0xd0)](_0x1721c1(0xa1))),0x0;}const _0x11d510=_0x2cd918[0x0],_0x387071=_0x2cd918[0x1];if(_0x11d510==='profile'){if(!profileExists(_0x387071))return console[_0x1721c1(0xb7)](_0x1721c1(0xb2)+_0x387071+_0x1721c1(0xa8)),console['error'](_0x1721c1(0xcc)),0x1;const _0x332dd5=_0x5d8323[_0x1721c1(0xa6)]||getCurrentSessionPID()[_0x1721c1(0xbc)]();return saveSessionContext({'profile':_0x387071},_0x5d8323['session']),console['log'](_0x1721c1(0xaf)+a42_0x429805['green'](_0x387071)+'\x20'+a42_0x429805[_0x1721c1(0xd0)](_0x1721c1(0xbf)+_0x332dd5+')')),console[_0x1721c1(0xb3)](a42_0x429805[_0x1721c1(0xd0)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides')),0x0;}const _0x10d3f6={},_0x469000=_0x5d8323[_0x1721c1(0xa6)]||getCurrentSessionPID()[_0x1721c1(0xbc)]();switch(_0x11d510){case _0x1721c1(0xcf):_0x10d3f6['database']=_0x387071,console['log'](_0x1721c1(0xc2)+a42_0x429805[_0x1721c1(0xab)](_0x387071)+'\x20'+a42_0x429805['dim'](_0x1721c1(0xbf)+_0x469000+')'));break;case _0x1721c1(0xad):_0x10d3f6[_0x1721c1(0xad)]=_0x387071,console[_0x1721c1(0xb3)]('Session\x20parent_segment\x20set\x20to:\x20'+a42_0x429805[_0x1721c1(0xab)](_0x387071)+'\x20'+a42_0x429805[_0x1721c1(0xd0)](_0x1721c1(0xbf)+_0x469000+')'));break;case _0x1721c1(0xcb):_0x10d3f6[_0x1721c1(0xcb)]=_0x387071,console[_0x1721c1(0xb3)](_0x1721c1(0xc3)+a42_0x429805[_0x1721c1(0xab)](_0x387071)+'\x20'+a42_0x429805[_0x1721c1(0xd0)](_0x1721c1(0xbf)+_0x469000+')'));break;case _0x1721c1(0xc9):{const {projectName:_0x7b5ff7,agentName:_0x430ddd}=parseAgentRef(_0x387071);_0x430ddd?(_0x10d3f6[_0x1721c1(0xcb)]=_0x7b5ff7,_0x10d3f6[_0x1721c1(0xb6)]=_0x430ddd,console['log'](_0x1721c1(0xc3)+a42_0x429805[_0x1721c1(0xab)](_0x7b5ff7)+'\x20'+a42_0x429805[_0x1721c1(0xd0)]('(session:\x20'+_0x469000+')')),console['log'](_0x1721c1(0xa4)+a42_0x429805[_0x1721c1(0xab)](_0x430ddd)+'\x20'+a42_0x429805[_0x1721c1(0xd0)](_0x1721c1(0xbf)+_0x469000+')'))):(_0x10d3f6['llm_agent']=_0x387071,console['log'](_0x1721c1(0xa4)+a42_0x429805[_0x1721c1(0xab)](_0x387071)+'\x20'+a42_0x429805[_0x1721c1(0xd0)](_0x1721c1(0xbf)+_0x469000+')')));break;}case _0x1721c1(0xb0):_0x10d3f6[_0x1721c1(0xb0)]=_0x387071,console[_0x1721c1(0xb3)](_0x1721c1(0x9c)+a42_0x429805[_0x1721c1(0xab)](_0x387071)+'\x20'+a42_0x429805['dim']('(session:\x20'+_0x469000+')'));break;}return saveSessionContext(_0x10d3f6,_0x5d8323['session']),console[_0x1721c1(0xb3)](a42_0x429805[_0x1721c1(0xd0)](_0x1721c1(0xd1))),0x0;}catch(_0x151de6){return _0x151de6 instanceof Error&&console[_0x1721c1(0xb7)](_0x1721c1(0xb1)+_0x151de6[_0x1721c1(0xbb)]),0x1;}}}
1
+ const a42_0x3ce89a=a42_0x25ea;(function(_0x2a8ba8,_0xece194){const _0x35e192=a42_0x25ea,_0x10c518=_0x2a8ba8();while(!![]){try{const _0x29f753=parseInt(_0x35e192(0x8c))/0x1+parseInt(_0x35e192(0x7f))/0x2+parseInt(_0x35e192(0x89))/0x3+parseInt(_0x35e192(0x8a))/0x4+-parseInt(_0x35e192(0x86))/0x5*(parseInt(_0x35e192(0x65))/0x6)+parseInt(_0x35e192(0x85))/0x7*(-parseInt(_0x35e192(0x79))/0x8)+parseInt(_0x35e192(0x78))/0x9*(parseInt(_0x35e192(0x81))/0xa);if(_0x29f753===_0xece194)break;else _0x10c518['push'](_0x10c518['shift']());}catch(_0x59ff52){_0x10c518['push'](_0x10c518['shift']());}}}(a42_0x587b,0x35535));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';function a42_0x587b(){const _0x1d8f27=['Resources:\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','Invalid\x20resource:\x20','debug','profile','Set\x20session-level\x20context','error','validate','llm_project','green','296415IsopMO','130936FdbhRd','description','dim','log','database','displayWithSources','82464VxOsaK','clear','50TLOpGL','Session\x20database\x20set\x20to:\x20','Session\x20profile\x20set\x20to:\x20','Session\x20agent\x20set\x20to:\x20','182JnQvOo','465Gjvuus','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','agent','867486BdDUXf','377688WpHxOy','parent_segment','229498jxpPCc','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','cleared','llm_agent','length','engage_workspace','\x0aResources:\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Session\x20llm_project\x20set\x20to:\x20','11292pDYJSn','use','display','(session:\x20','.\x20Must\x20be\x20one\x20of:\x20','Session\x20parent_segment\x20set\x20to:\x20','name','toString','session','\x27\x20does\x20not\x20exist'];a42_0x587b=function(){return _0x1d8f27;};return a42_0x587b();}function a42_0x25ea(_0x14a696,_0x135e5a){_0x14a696=_0x14a696-0x65;const _0x587bf9=a42_0x587b();let _0x25ea99=_0x587bf9[_0x14a696];return _0x25ea99;}import{profileExists}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../utils/agent-ref-parser.js';import a42_0x28bf2e from'chalk';export class UseCommand extends BaseCommand{[a42_0x3ce89a(0x6b)]=a42_0x3ce89a(0x66);[a42_0x3ce89a(0x7a)]=a42_0x3ce89a(0x73);[a42_0x3ce89a(0x75)](_0x2007f0){const _0x4c0612=a42_0x3ce89a,{args:_0x28e928}=_0x2007f0;if(_0x28e928[_0x4c0612(0x91)]===0x0)return undefined;if(_0x28e928[_0x4c0612(0x91)]===0x1)return _0x4c0612(0x8e)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+_0x4c0612(0x93)+_0x4c0612(0x8d);const _0x3c65e1=_0x28e928[0x0],_0x353b04=[_0x4c0612(0x7d),_0x4c0612(0x8b),_0x4c0612(0x76),_0x4c0612(0x88),'profile',_0x4c0612(0x92)];if(!_0x353b04['includes'](_0x3c65e1))return _0x4c0612(0x70)+_0x3c65e1+_0x4c0612(0x69)+_0x353b04['join'](',\x20');return undefined;}async['execute'](_0x3bfde5){const _0x36e366=a42_0x3ce89a,{args:_0x40728b,options:_0x30d9b5}=_0x3bfde5,_0x574d24=_0x30d9b5[_0x36e366(0x71)],_0x1f5ff6=_0x30d9b5[_0x36e366(0x80)];cleanExpiredSessions();try{if(_0x1f5ff6){clearSessionContext(_0x30d9b5[_0x36e366(0x6d)]);const _0x4297a5=_0x30d9b5[_0x36e366(0x6d)]||getCurrentSessionPID()['toString']();return console[_0x36e366(0x7c)]('Session\x20context\x20'+a42_0x28bf2e[_0x36e366(0x77)](_0x36e366(0x8f))+'\x20'+a42_0x28bf2e[_0x36e366(0x7b)]('(session:\x20'+_0x4297a5+')')),0x0;}if(_0x40728b['length']===0x0){const _0x3950f2=new GlobalContext(_0x30d9b5);return _0x574d24?_0x3950f2[_0x36e366(0x7e)]():_0x3950f2[_0x36e366(0x67)](),console['log'](a42_0x28bf2e[_0x36e366(0x7b)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console[_0x36e366(0x7c)](a42_0x28bf2e[_0x36e366(0x7b)](_0x36e366(0x6f))),0x0;}const _0x5a2aa9=_0x40728b[0x0],_0x5cf776=_0x40728b[0x1];if(_0x5a2aa9===_0x36e366(0x72)){if(!profileExists(_0x5cf776))return console[_0x36e366(0x74)]('Error:\x20Profile\x20\x27'+_0x5cf776+_0x36e366(0x6e)),console['error'](_0x36e366(0x87)),0x1;const _0x283d63=_0x30d9b5[_0x36e366(0x6d)]||getCurrentSessionPID()[_0x36e366(0x6c)]();return saveSessionContext({'profile':_0x5cf776},_0x30d9b5['session']),console[_0x36e366(0x7c)](_0x36e366(0x83)+a42_0x28bf2e[_0x36e366(0x77)](_0x5cf776)+'\x20'+a42_0x28bf2e[_0x36e366(0x7b)]('(session:\x20'+_0x283d63+')')),console[_0x36e366(0x7c)](a42_0x28bf2e[_0x36e366(0x7b)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides')),0x0;}const _0x53e3e9={},_0x394bab=_0x30d9b5['session']||getCurrentSessionPID()[_0x36e366(0x6c)]();switch(_0x5a2aa9){case _0x36e366(0x7d):_0x53e3e9['database']=_0x5cf776,console[_0x36e366(0x7c)](_0x36e366(0x82)+a42_0x28bf2e['green'](_0x5cf776)+'\x20'+a42_0x28bf2e[_0x36e366(0x7b)](_0x36e366(0x68)+_0x394bab+')'));break;case _0x36e366(0x8b):_0x53e3e9['parent_segment']=_0x5cf776,console[_0x36e366(0x7c)](_0x36e366(0x6a)+a42_0x28bf2e[_0x36e366(0x77)](_0x5cf776)+'\x20'+a42_0x28bf2e[_0x36e366(0x7b)]('(session:\x20'+_0x394bab+')'));break;case _0x36e366(0x76):_0x53e3e9[_0x36e366(0x76)]=_0x5cf776,console[_0x36e366(0x7c)]('Session\x20llm_project\x20set\x20to:\x20'+a42_0x28bf2e['green'](_0x5cf776)+'\x20'+a42_0x28bf2e[_0x36e366(0x7b)]('(session:\x20'+_0x394bab+')'));break;case _0x36e366(0x88):{const {projectName:_0x2c8a12,agentName:_0xce4d5b}=parseAgentRef(_0x5cf776);_0xce4d5b?(_0x53e3e9[_0x36e366(0x76)]=_0x2c8a12,_0x53e3e9[_0x36e366(0x90)]=_0xce4d5b,console[_0x36e366(0x7c)](_0x36e366(0x95)+a42_0x28bf2e['green'](_0x2c8a12)+'\x20'+a42_0x28bf2e[_0x36e366(0x7b)]('(session:\x20'+_0x394bab+')')),console[_0x36e366(0x7c)](_0x36e366(0x84)+a42_0x28bf2e['green'](_0xce4d5b)+'\x20'+a42_0x28bf2e['dim']('(session:\x20'+_0x394bab+')'))):(_0x53e3e9[_0x36e366(0x90)]=_0x5cf776,console[_0x36e366(0x7c)]('Session\x20agent\x20set\x20to:\x20'+a42_0x28bf2e[_0x36e366(0x77)](_0x5cf776)+'\x20'+a42_0x28bf2e['dim'](_0x36e366(0x68)+_0x394bab+')')));break;}case _0x36e366(0x92):_0x53e3e9[_0x36e366(0x92)]=_0x5cf776,console['log']('Session\x20engage_workspace\x20set\x20to:\x20'+a42_0x28bf2e[_0x36e366(0x77)](_0x5cf776)+'\x20'+a42_0x28bf2e['dim'](_0x36e366(0x68)+_0x394bab+')'));break;}return saveSessionContext(_0x53e3e9,_0x30d9b5[_0x36e366(0x6d)]),console['log'](a42_0x28bf2e['dim'](_0x36e366(0x94))),0x0;}catch(_0x89cb93){return _0x89cb93 instanceof Error&&console[_0x36e366(0x74)]('Error:\x20'+_0x89cb93['message']),0x1;}}}
@@ -1 +1 @@
1
- function a43_0x2bb8(){const _0x2a9839=['length','user','description','7MBNiDf','Error:\x20','verbose','1581584xnoFUS','name','302246esWgJT','cause','\x20user','execute','\x20\x20Cause:\x20','data','1732444hQILkv','6obbjsO','22563540TktOuz','Show\x20current\x20user\x20information','message','list','✔\x20Found\x20','error','Listing\x20users...','228118tVZoww','user\x20list','List\x20all\x20users\x20in\x20the\x20account','2154365iwmWap','5703588xNJJNR'];a43_0x2bb8=function(){return _0x2a9839;};return a43_0x2bb8();}const a43_0x21b9ee=a43_0x42a3;(function(_0x3c12d4,_0x63c830){const _0x472349=a43_0x42a3,_0x383eef=_0x3c12d4();while(!![]){try{const _0x96ae46=-parseInt(_0x472349(0x1fb))/0x1+-parseInt(_0x472349(0x1ec))/0x2*(-parseInt(_0x472349(0x1f3))/0x3)+-parseInt(_0x472349(0x1f2))/0x4+-parseInt(_0x472349(0x1e2))/0x5+-parseInt(_0x472349(0x1e3))/0x6+parseInt(_0x472349(0x1e7))/0x7*(-parseInt(_0x472349(0x1ea))/0x8)+parseInt(_0x472349(0x1f4))/0x9;if(_0x96ae46===_0x63c830)break;else _0x383eef['push'](_0x383eef['shift']());}catch(_0x59bd58){_0x383eef['push'](_0x383eef['shift']());}}}(a43_0x2bb8,0x8ae4c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';function a43_0x42a3(_0x568a10,_0x3be3cf){_0x568a10=_0x568a10-0x1e1;const _0x2bb8ec=a43_0x2bb8();let _0x42a3db=_0x2bb8ec[_0x568a10];return _0x42a3db;}import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a43_0x21b9ee(0x1eb)]=a43_0x21b9ee(0x1e5);[a43_0x21b9ee(0x1e6)]=a43_0x21b9ee(0x1f5);async[a43_0x21b9ee(0x1ef)](_0x6b75f2){const _0x2dceb1=a43_0x21b9ee,{options:_0x2203e7,tdx:_0x125ddb}=_0x6b75f2;try{const _0x3b2c98=await withSpinner('Fetching\x20user\x20info...',()=>_0x125ddb[_0x2dceb1(0x1e5)]['getCurrent'](),{'verbose':_0x2203e7[_0x2dceb1(0x1e9)]}),_0x46f9f4=_0x3b2c98[_0x2dceb1(0x1f1)];return await handleSingleObjectOutput(_0x46f9f4,_0x2203e7),0x0;}catch(_0x1fa4c1){if(_0x1fa4c1 instanceof SDKError)return console[_0x2dceb1(0x1f9)]('Error:\x20'+_0x1fa4c1[_0x2dceb1(0x1f6)]),_0x1fa4c1['cause']&&console[_0x2dceb1(0x1f9)]('\x20\x20Cause:\x20'+_0x1fa4c1[_0x2dceb1(0x1ed)]),0x1;throw _0x1fa4c1;}}}export class UserListCommand extends BaseCommand{[a43_0x21b9ee(0x1eb)]=a43_0x21b9ee(0x1fc);[a43_0x21b9ee(0x1e6)]=a43_0x21b9ee(0x1e1);async[a43_0x21b9ee(0x1ef)](_0x12735c){const _0x67751a=a43_0x21b9ee,{options:_0x388084,tdx:_0x86f310}=_0x12735c;try{const _0x3261dc=await withSpinner(_0x67751a(0x1fa),()=>_0x86f310['user'][_0x67751a(0x1f7)](),{'verbose':_0x388084['verbose']}),_0xb43f6e=_0x3261dc[_0x67751a(0x1f1)];return console[_0x67751a(0x1f9)](_0x67751a(0x1f8)+_0xb43f6e[_0x67751a(0x1e4)]+_0x67751a(0x1ee)+(_0xb43f6e[_0x67751a(0x1e4)]!==0x1?'s':'')),await handleSDKOutput(_0xb43f6e,_0x388084),0x0;}catch(_0xbd7ee1){if(_0xbd7ee1 instanceof SDKError)return console['error'](_0x67751a(0x1e8)+_0xbd7ee1[_0x67751a(0x1f6)]),_0xbd7ee1[_0x67751a(0x1ed)]&&console[_0x67751a(0x1f9)](_0x67751a(0x1f0)+_0xbd7ee1[_0x67751a(0x1ed)]),0x1;throw _0xbd7ee1;}}}
1
+ const a43_0x2be610=a43_0xf680;function a43_0xf680(_0x31e569,_0x3326a0){_0x31e569=_0x31e569-0xca;const _0x55b41f=a43_0x55b4();let _0xf680f5=_0x55b41f[_0x31e569];return _0xf680f5;}(function(_0x5e0f94,_0x6ecafb){const _0xb3bb45=a43_0xf680,_0x17788b=_0x5e0f94();while(!![]){try{const _0x470054=-parseInt(_0xb3bb45(0xdb))/0x1+-parseInt(_0xb3bb45(0xcc))/0x2+-parseInt(_0xb3bb45(0xcd))/0x3+-parseInt(_0xb3bb45(0xde))/0x4+-parseInt(_0xb3bb45(0xdd))/0x5*(-parseInt(_0xb3bb45(0xd3))/0x6)+parseInt(_0xb3bb45(0xe4))/0x7+parseInt(_0xb3bb45(0xe3))/0x8;if(_0x470054===_0x6ecafb)break;else _0x17788b['push'](_0x17788b['shift']());}catch(_0x5e2251){_0x17788b['push'](_0x17788b['shift']());}}}(a43_0x55b4,0x91c7c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a43_0x55b4(){const _0x1697f1=['error','user','\x20\x20Cause:\x20','getCurrent','364199WlNCsY','length','16820NmiOlH','3637656MmVNhj','verbose','Fetching\x20user\x20info...','execute','user\x20list','18448032HUgWnS','1678110eQoETP','✔\x20Found\x20','\x20user','1671832ZWJhPe','2474223waIojq','description','data','name','list','cause','1758enbElT','Show\x20current\x20user\x20information','Listing\x20users...','Error:\x20'];a43_0x55b4=function(){return _0x1697f1;};return a43_0x55b4();}import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a43_0x2be610(0xd0)]=a43_0x2be610(0xd8);[a43_0x2be610(0xce)]=a43_0x2be610(0xd4);async['execute'](_0x73fd51){const _0x43bd8e=a43_0x2be610,{options:_0x373a34,tdx:_0x5b7f8b}=_0x73fd51;try{const _0x267352=await withSpinner(_0x43bd8e(0xe0),()=>_0x5b7f8b[_0x43bd8e(0xd8)][_0x43bd8e(0xda)](),{'verbose':_0x373a34[_0x43bd8e(0xdf)]}),_0x24c2bd=_0x267352[_0x43bd8e(0xcf)];return await handleSingleObjectOutput(_0x24c2bd,_0x373a34),0x0;}catch(_0x2847c4){if(_0x2847c4 instanceof SDKError)return console[_0x43bd8e(0xd7)]('Error:\x20'+_0x2847c4['message']),_0x2847c4[_0x43bd8e(0xd2)]&&console[_0x43bd8e(0xd7)](_0x43bd8e(0xd9)+_0x2847c4['cause']),0x1;throw _0x2847c4;}}}export class UserListCommand extends BaseCommand{[a43_0x2be610(0xd0)]=a43_0x2be610(0xe2);[a43_0x2be610(0xce)]='List\x20all\x20users\x20in\x20the\x20account';async[a43_0x2be610(0xe1)](_0x7b073d){const _0x5b044f=a43_0x2be610,{options:_0x3c7e1a,tdx:_0x26625}=_0x7b073d;try{const _0xfaaf60=await withSpinner(_0x5b044f(0xd5),()=>_0x26625[_0x5b044f(0xd8)][_0x5b044f(0xd1)](),{'verbose':_0x3c7e1a[_0x5b044f(0xdf)]}),_0x33d4b9=_0xfaaf60[_0x5b044f(0xcf)];return console['error'](_0x5b044f(0xca)+_0x33d4b9[_0x5b044f(0xdc)]+_0x5b044f(0xcb)+(_0x33d4b9[_0x5b044f(0xdc)]!==0x1?'s':'')),await handleSDKOutput(_0x33d4b9,_0x3c7e1a),0x0;}catch(_0x1a7940){if(_0x1a7940 instanceof SDKError)return console[_0x5b044f(0xd7)](_0x5b044f(0xd6)+_0x1a7940['message']),_0x1a7940[_0x5b044f(0xd2)]&&console[_0x5b044f(0xd7)](_0x5b044f(0xd9)+_0x1a7940['cause']),0x1;throw _0x1a7940;}}}
@@ -1 +1 @@
1
- const a44_0x2ab1ae=a44_0x3516;(function(_0x1fc2ec,_0x690f93){const _0x2624c0=a44_0x3516,_0x56788a=_0x1fc2ec();while(!![]){try{const _0x4162a4=-parseInt(_0x2624c0(0x174))/0x1*(parseInt(_0x2624c0(0x166))/0x2)+parseInt(_0x2624c0(0x13a))/0x3+-parseInt(_0x2624c0(0x18b))/0x4+parseInt(_0x2624c0(0x175))/0x5+parseInt(_0x2624c0(0x193))/0x6+parseInt(_0x2624c0(0x17d))/0x7+-parseInt(_0x2624c0(0x179))/0x8*(parseInt(_0x2624c0(0x15d))/0x9);if(_0x4162a4===_0x690f93)break;else _0x56788a['push'](_0x56788a['shift']());}catch(_0x14d475){_0x56788a['push'](_0x56788a['shift']());}}}(a44_0x4ac8,0x30878));import{BaseCommand}from'./command.js';function a44_0x3516(_0x1b7ca6,_0x118802){_0x1b7ca6=_0x1b7ca6-0x11c;const _0x4ac853=a44_0x4ac8();let _0x3516fd=_0x4ac853[_0x1b7ca6];return _0x3516fd;}function a44_0x4ac8(){const _0x24a2b4=['Including\x20subtasks:\x20yes','workflow:kill','No\x20log\x20content\x20found','Downloading\x20logs...','Listing\x20workflow\x20sessions...','Project\x20filter:\x20','projects','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','✔\x20Downloaded\x20','✔\x20Found\x20','Pattern:\x20','List\x20workflow\x20execution\x20sessions','filesExtracted','Downloading\x20project\x20','from','\x22?\x20This\x20cannot\x20be\x20undone.','Getting\x20attempt\x20details...','running','\x20\x20Attempt\x20ID:\x20','yes','\x20\x20Project:\x20','Parameters:\x20','execute','workflow:push','startsWith','Error:\x20Workflow\x20identifier\x20is\x20required','finishedAt','fromTask','Retrying\x20session...','workflow:tasks','data','retrySession','length','sessionId','467988AavrpG','workflow:run','format','workflow:download','session:','Error:\x20Invalid\x20parameter\x20format:\x20','Deleting\x20project\x20','parse','logs','status','Validation:\x20skipped','Usage:\x20workflow:delete\x20<project-name-or-id>','attempt','Cancelled','description','List\x20workflows','Reason:\x20','attempts','\x20\x20Cause:\x20','Filter:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','✔\x20Deleted\x20project\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','error','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','push','revision','...','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','\x20\x20Revision:\x20','workflow:workflows','workflow','utf-8','fs/promises','Error:\x20Attempt\x20ID\x20is\x20required','791415DTVsiz','From\x20task:\x20','\x20\x20Location:\x20','success','Attempt\x20ID:\x20','\x20\x20New\x20attempt\x20ID:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','workflow:retry','659508QFrPKS','projectName','\x20attempt','Session\x20time:\x20','params','getTime','Error:\x20Project\x20name\x20is\x20required','name','sessionTime','Getting\x20attempt\x20tasks...','List\x20all\x20workflow\x20projects','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','isArray','\x20project','1SvVxvC','284435VKdbCM','Output\x20directory:\x20','includeRetried','Project:\x20','8gkPbkn','Include\x20retried:\x20yes','workflow:projects','taskName','2465960NWcJqz','\x20task','Starting\x20workflow\x20run...','Retrying\x20attempt...','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','Filter:\x20project=','reason','workflow:attempt','resumeFrom','force','createdAt','projectId','includeSubtasks','project','955624apPWDH','session','Listing\x20workflows...','Error:\x20','Pushing\x20workflow\x20project...','\x20session','param','✔\x20Workflow\x20run\x20started','1741248iArzYA','limit','Expected\x20format:\x20--param\x20key=value','retryAttemptName','cause','\x20\x20Project\x20ID:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','skipValidation','round','workflow:logs','canceling','kill','done','\x20\x20Files\x20extracted:\x20','Project\x20name:\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Force:\x20yes','Select\x20a\x20task\x20to\x20view\x20logs:','Revision:\x20','Retry\x20a\x20session\x20or\x20attempt','\x20\x20Session\x20ID:\x20','task','message','select','split','\x20is\x20not\x20a\x20directory','✔\x20Pushed\x20','index','keys','Killing\x20attempt...','workflow:sessions','Resume\x20from:\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Fetching\x20log\x20files...','workflow:attempts','sessions','workflow:delete','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','readFile','Listing\x20workflow\x20attempts...','delete','verbose','List\x20workflow\x20attempts','Task\x20name:\x20','Show\x20tasks\x20for\x20an\x20attempt','tasks','Project\x20directory:\x20','substring','retryAttempt','attempt:','Show\x20specific\x20attempt\x20details'];a44_0x4ac8=function(){return _0x24a2b4;};return a44_0x4ac8();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';import a44_0xeea67 from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a44_0x2ab1ae(0x16d)]=a44_0x2ab1ae(0x17b);['description']=a44_0x2ab1ae(0x170);async[a44_0x2ab1ae(0x12e)](_0x30f97c){const _0x310ff6=a44_0x2ab1ae,{options:_0x1d0be8,args:_0x3638df,tdx:_0x1b0d2a}=_0x30f97c,_0x562c24=_0x3638df[0x0];try{_0x1d0be8[_0x310ff6(0x1bc)]&&_0x562c24&&console['error'](_0x310ff6(0x122)+_0x562c24);const _0x490e8d=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x1b0d2a[_0x310ff6(0x159)][_0x310ff6(0x11e)](_0x562c24,{'limit':_0x1d0be8[_0x310ff6(0x194)]}),{'verbose':_0x1d0be8[_0x310ff6(0x1bc)]}),_0xa3a4e3=_0x490e8d['data'];return console[_0x310ff6(0x151)]('✔\x20Found\x20'+_0xa3a4e3[_0x310ff6(0x138)]+_0x310ff6(0x173)+(_0xa3a4e3[_0x310ff6(0x138)]!==0x1?'s':'')),await handleSDKOutput(_0xa3a4e3,_0x1d0be8),0x0;}catch(_0x259721){if(_0x259721 instanceof SDKError)return console['error']('Error:\x20'+_0x259721[_0x310ff6(0x1a9)]),_0x259721[_0x310ff6(0x197)]&&console[_0x310ff6(0x151)](_0x310ff6(0x14c)+_0x259721[_0x310ff6(0x197)]),0x1;throw _0x259721;}}}export class WorkflowWorkflowsCommand extends BaseCommand{['name']=a44_0x2ab1ae(0x158);[a44_0x2ab1ae(0x148)]=a44_0x2ab1ae(0x149);async[a44_0x2ab1ae(0x12e)](_0x25468f){const _0x28b7cf=a44_0x2ab1ae,{options:_0x1b990c,args:_0x1daa6e,tdx:_0x423551}=_0x25468f,_0x30d7f6=_0x1daa6e[0x0];try{_0x1b990c['verbose']&&_0x30d7f6&&console[_0x28b7cf(0x151)](_0x28b7cf(0x11d)+_0x30d7f6);const _0x5b5138=await withSpinner(_0x28b7cf(0x18d),()=>_0x423551[_0x28b7cf(0x159)]['workflows'](_0x30d7f6,{'limit':_0x1b990c[_0x28b7cf(0x194)]}),{'verbose':_0x1b990c['verbose']}),_0x1e85e9=_0x5b5138['data'];return console[_0x28b7cf(0x151)](_0x28b7cf(0x121)+_0x1e85e9[_0x28b7cf(0x138)]+'\x20workflow'+(_0x1e85e9[_0x28b7cf(0x138)]!==0x1?'s':'')),await handleSDKOutput(_0x1e85e9,_0x1b990c),0x0;}catch(_0x5b42dd){if(_0x5b42dd instanceof SDKError)return console[_0x28b7cf(0x151)](_0x28b7cf(0x18e)+_0x5b42dd[_0x28b7cf(0x1a9)]),_0x5b42dd[_0x28b7cf(0x197)]&&console[_0x28b7cf(0x151)](_0x28b7cf(0x14c)+_0x5b42dd['cause']),0x1;throw _0x5b42dd;}}}export class WorkflowSessionsCommand extends BaseCommand{[a44_0x2ab1ae(0x16d)]=a44_0x2ab1ae(0x1b1);['description']=a44_0x2ab1ae(0x123);async['execute'](_0x484eb3){const _0x14a3a7=a44_0x2ab1ae,{options:_0x57b6de,args:_0x2b3195,tdx:_0x7fdc8a}=_0x484eb3;let _0x8806a3,_0x10ff5a;if(_0x2b3195[0x0]){const _0xe450e5=_0x2b3195[0x0][_0x14a3a7(0x1ab)]('.');if(_0xe450e5['length']===0x1)_0x8806a3=_0xe450e5[0x0];else{if(_0xe450e5[_0x14a3a7(0x138)]===0x2)[_0x8806a3,_0x10ff5a]=_0xe450e5;else return console[_0x14a3a7(0x151)](_0x14a3a7(0x1b3)),0x1;}}try{if(_0x57b6de[_0x14a3a7(0x1bc)]){if(_0x8806a3&&_0x10ff5a)console[_0x14a3a7(0x151)](_0x14a3a7(0x14d)+_0x8806a3+'.'+_0x10ff5a);else _0x8806a3&&console[_0x14a3a7(0x151)](_0x14a3a7(0x182)+_0x8806a3);const _0x46920e=_0x57b6de[_0x14a3a7(0x143)];_0x46920e&&console[_0x14a3a7(0x151)]('Status:\x20'+_0x46920e);}const _0x491444=await withSpinner(_0x14a3a7(0x11c),()=>_0x7fdc8a[_0x14a3a7(0x159)][_0x14a3a7(0x1b6)]({'projectName':_0x8806a3,'workflowName':_0x10ff5a,'status':_0x57b6de['status'],'fromTime':_0x57b6de[_0x14a3a7(0x126)],'toTime':_0x57b6de['to'],'limit':_0x57b6de['limit']}),{'verbose':_0x57b6de[_0x14a3a7(0x1bc)]}),_0x33e6da=_0x491444[_0x14a3a7(0x136)];return console[_0x14a3a7(0x151)](_0x14a3a7(0x121)+_0x33e6da[_0x14a3a7(0x138)]+_0x14a3a7(0x190)+(_0x33e6da[_0x14a3a7(0x138)]!==0x1?'s':'')),await handleSDKOutput(_0x33e6da,_0x57b6de),0x0;}catch(_0x4ae915){if(_0x4ae915 instanceof SDKError)return console[_0x14a3a7(0x151)]('Error:\x20'+_0x4ae915['message']),_0x4ae915['cause']&&console[_0x14a3a7(0x151)](_0x14a3a7(0x14c)+_0x4ae915['cause']),0x1;throw _0x4ae915;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a44_0x2ab1ae(0x16d)]=a44_0x2ab1ae(0x1b5);[a44_0x2ab1ae(0x148)]=a44_0x2ab1ae(0x1bd);async[a44_0x2ab1ae(0x12e)](_0x37c91a){const _0x195303=a44_0x2ab1ae,{options:_0x5704fd,args:_0x3abfe7,tdx:_0x24c051}=_0x37c91a;let _0x3ab56e,_0x36b276;if(_0x3abfe7[0x0]){const _0x50e9f7=_0x3abfe7[0x0][_0x195303(0x1ab)]('.');if(_0x50e9f7[_0x195303(0x138)]===0x1)_0x3ab56e=_0x50e9f7[0x0];else{if(_0x50e9f7[_0x195303(0x138)]===0x2)[_0x3ab56e,_0x36b276]=_0x50e9f7;else return console[_0x195303(0x151)](_0x195303(0x1b3)),0x1;}}try{const _0x236054=_0x5704fd[_0x195303(0x177)];if(_0x5704fd[_0x195303(0x1bc)]){if(_0x3ab56e&&_0x36b276)console[_0x195303(0x151)](_0x195303(0x14d)+_0x3ab56e+'.'+_0x36b276);else _0x3ab56e&&console[_0x195303(0x151)](_0x195303(0x182)+_0x3ab56e);_0x236054&&console[_0x195303(0x151)](_0x195303(0x17a));}const _0x42131a=await withSpinner(_0x195303(0x1ba),()=>_0x24c051[_0x195303(0x159)][_0x195303(0x14b)]({'projectName':_0x3ab56e,'workflowName':_0x36b276,'includeRetried':_0x236054,'limit':_0x5704fd[_0x195303(0x194)]}),{'verbose':_0x5704fd[_0x195303(0x1bc)]}),_0x3dd4db=_0x42131a[_0x195303(0x136)];return console[_0x195303(0x151)](_0x195303(0x121)+_0x3dd4db[_0x195303(0x138)]+_0x195303(0x168)+(_0x3dd4db[_0x195303(0x138)]!==0x1?'s':'')),await handleSDKOutput(_0x3dd4db,_0x5704fd),0x0;}catch(_0x3a17d5){if(_0x3a17d5 instanceof SDKError)return console[_0x195303(0x151)](_0x195303(0x18e)+_0x3a17d5[_0x195303(0x1a9)]),_0x3a17d5['cause']&&console[_0x195303(0x151)](_0x195303(0x14c)+_0x3a17d5[_0x195303(0x197)]),0x1;throw _0x3a17d5;}}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a44_0x2ab1ae(0x184);[a44_0x2ab1ae(0x148)]=a44_0x2ab1ae(0x1c5);async['execute'](_0xc6bb9f){const _0x8e0426=a44_0x2ab1ae,{options:_0x1e67a9,args:_0x272994,tdx:_0x4a0245}=_0xc6bb9f,_0x5b3456=_0x272994[0x0];if(!_0x5b3456)return console['error'](_0x8e0426(0x15c)),0x1;try{_0x1e67a9[_0x8e0426(0x1bc)]&&console[_0x8e0426(0x151)](_0x8e0426(0x161)+_0x5b3456);const _0x129e16=await withSpinner(_0x8e0426(0x128),()=>_0x4a0245[_0x8e0426(0x159)][_0x8e0426(0x146)](_0x5b3456),{'verbose':_0x1e67a9[_0x8e0426(0x1bc)]}),_0x237c22=_0x129e16['data'];let _0x1a7369;!_0x237c22[_0x8e0426(0x19f)]?_0x1a7369=_0x237c22['cancelRequested']?_0x8e0426(0x19d):_0x8e0426(0x129):_0x1a7369=_0x237c22[_0x8e0426(0x160)]?'success':_0x8e0426(0x151);let _0x89b54c;if(_0x237c22[_0x8e0426(0x187)]&&_0x237c22[_0x8e0426(0x132)]){const _0x4306ad=new Date(_0x237c22[_0x8e0426(0x187)])[_0x8e0426(0x16b)](),_0x12f78f=new Date(_0x237c22['finishedAt'])[_0x8e0426(0x16b)]();_0x89b54c=Math[_0x8e0426(0x19b)]((_0x12f78f-_0x4306ad)/0x3e8);}const _0x5270b6={'attempt_id':_0x237c22['id'],'status':_0x1a7369,..._0x237c22[_0x8e0426(0x1ae)]!==undefined&&{'index':_0x237c22[_0x8e0426(0x1ae)]},..._0x237c22[_0x8e0426(0x18a)]&&{'project':_0x237c22[_0x8e0426(0x18a)][_0x8e0426(0x16d)]},..._0x237c22[_0x8e0426(0x159)]&&{'workflow':_0x237c22[_0x8e0426(0x159)][_0x8e0426(0x16d)]},..._0x237c22[_0x8e0426(0x139)]&&{'session_id':_0x237c22[_0x8e0426(0x139)]},..._0x237c22[_0x8e0426(0x16e)]&&{'session_time':_0x237c22['sessionTime']},..._0x237c22[_0x8e0426(0x196)]&&{'retry_attempt':_0x237c22[_0x8e0426(0x196)]},..._0x89b54c!==undefined&&{'duration_sec':_0x89b54c},..._0x237c22['createdAt']&&{'created_at':_0x237c22[_0x8e0426(0x187)]},..._0x237c22[_0x8e0426(0x132)]&&{'finished_at':_0x237c22['finishedAt']},...Object[_0x8e0426(0x1af)](_0x237c22[_0x8e0426(0x16a)])[_0x8e0426(0x138)]>0x0&&{'params':_0x237c22[_0x8e0426(0x16a)]}};return await handleSingleObjectOutput(_0x5270b6,_0x1e67a9),0x0;}catch(_0x3da21d){if(_0x3da21d instanceof SDKError)return console[_0x8e0426(0x151)]('Error:\x20'+_0x3da21d[_0x8e0426(0x1a9)]),_0x3da21d[_0x8e0426(0x197)]&&console['error'](_0x8e0426(0x14c)+_0x3da21d[_0x8e0426(0x197)]),0x1;throw _0x3da21d;}}}export class WorkflowTasksCommand extends BaseCommand{[a44_0x2ab1ae(0x16d)]=a44_0x2ab1ae(0x135);[a44_0x2ab1ae(0x148)]=a44_0x2ab1ae(0x1bf);async[a44_0x2ab1ae(0x12e)](_0x3dec6d){const _0x540137=a44_0x2ab1ae,{options:_0x12b8c7,args:_0x4e5223,tdx:_0x38e412}=_0x3dec6d,_0x5a0d41=_0x4e5223[0x0];if(!_0x5a0d41)return console['error'](_0x540137(0x15c)),0x1;try{const _0x4f3c32=_0x12b8c7[_0x540137(0x189)];_0x12b8c7[_0x540137(0x1bc)]&&(console[_0x540137(0x151)](_0x540137(0x161)+_0x5a0d41),_0x4f3c32&&console[_0x540137(0x151)](_0x540137(0x1c6)));const _0x1473ba=await withSpinner(_0x540137(0x16f),()=>_0x38e412[_0x540137(0x159)][_0x540137(0x1c0)](_0x5a0d41,_0x4f3c32||![]),{'verbose':_0x12b8c7['verbose']}),_0x5b14c3=_0x1473ba[_0x540137(0x136)];return console[_0x540137(0x151)](_0x540137(0x121)+_0x5b14c3['length']+_0x540137(0x17e)+(_0x5b14c3['length']!==0x1?'s':'')),await handleSDKOutput(_0x5b14c3,_0x12b8c7),0x0;}catch(_0x4738b8){if(_0x4738b8 instanceof SDKError)return console[_0x540137(0x151)](_0x540137(0x18e)+_0x4738b8['message']),_0x4738b8[_0x540137(0x197)]&&console['error'](_0x540137(0x14c)+_0x4738b8[_0x540137(0x197)]),0x1;throw _0x4738b8;}}}export class WorkflowLogsCommand extends BaseCommand{['name']=a44_0x2ab1ae(0x19c);['description']=a44_0x2ab1ae(0x199);async[a44_0x2ab1ae(0x12e)](_0x4b653f){const _0x4ecce8=a44_0x2ab1ae,{options:_0x16c200,args:_0x460246,tdx:_0x3aade7}=_0x4b653f,_0x150c39=_0x460246[0x0];let _0x414784=_0x460246[0x1];if(!_0x150c39)return console[_0x4ecce8(0x151)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x16c200[_0x4ecce8(0x1bc)]&&(console['error'](_0x4ecce8(0x161)+_0x150c39),_0x414784&&console[_0x4ecce8(0x151)](_0x4ecce8(0x1be)+_0x414784));const _0x3bd020=await withSpinner(_0x4ecce8(0x1b4),()=>_0x3aade7[_0x4ecce8(0x159)]['logFiles'](_0x150c39,_0x414784),{'verbose':_0x16c200['verbose']}),_0x81c0b6=_0x3bd020['data'];if(_0x81c0b6['length']===0x0)return console['error'](_0x4ecce8(0x1a2)),0x0;if(!_0x414784&&(_0x16c200['json']||_0x16c200[_0x4ecce8(0x13c)]))return await handleSDKOutput(_0x81c0b6,_0x16c200),0x0;if(!_0x414784){const _0x57f6fd=_0x81c0b6['map'](_0x3fadae=>({'title':_0x3fadae['taskName']+'\x20('+formatBytes(_0x3fadae['fileSize'])+')','value':_0x3fadae[_0x4ecce8(0x17c)]})),_0x34d446=await a44_0xeea67({'type':_0x4ecce8(0x1aa),'name':'task','message':_0x4ecce8(0x1a4),'choices':_0x57f6fd});if(!_0x34d446[_0x4ecce8(0x1a8)])return console[_0x4ecce8(0x151)](_0x4ecce8(0x147)),0x0;_0x414784=_0x34d446['task'];}const _0x4417fe=await withSpinner(_0x4ecce8(0x1c9),()=>_0x3aade7[_0x4ecce8(0x159)][_0x4ecce8(0x142)](_0x150c39,_0x414784),{'verbose':_0x16c200['verbose']}),_0x5026cb=_0x4417fe[_0x4ecce8(0x136)];return _0x5026cb?console['log'](_0x5026cb):console['error'](_0x4ecce8(0x1c8)),0x0;}catch(_0x189dbd){if(_0x189dbd instanceof SDKError)return console['error']('Error:\x20'+_0x189dbd[_0x4ecce8(0x1a9)]),_0x189dbd[_0x4ecce8(0x197)]&&console[_0x4ecce8(0x151)](_0x4ecce8(0x14c)+_0x189dbd[_0x4ecce8(0x197)]),0x1;throw _0x189dbd;}}}export class WorkflowKillCommand extends BaseCommand{[a44_0x2ab1ae(0x16d)]=a44_0x2ab1ae(0x1c7);[a44_0x2ab1ae(0x148)]='Kill\x20a\x20running\x20attempt';async[a44_0x2ab1ae(0x12e)](_0x39e9be){const _0x19f669=a44_0x2ab1ae,{options:_0x4844b9,args:_0x5891db,tdx:_0x59de16}=_0x39e9be,_0x56c1f3=_0x5891db[0x0];if(!_0x56c1f3)return console[_0x19f669(0x151)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x671e2d=_0x4844b9[_0x19f669(0x183)];_0x4844b9[_0x19f669(0x1bc)]&&(console[_0x19f669(0x151)](_0x19f669(0x161)+_0x56c1f3),_0x671e2d&&console[_0x19f669(0x151)](_0x19f669(0x14a)+_0x671e2d));if(!_0x4844b9[_0x19f669(0x12b)]){const _0x422d68=await confirm(_0x19f669(0x163)+_0x56c1f3+'?');if(!_0x422d68)return console[_0x19f669(0x151)](_0x19f669(0x147)),0x0;}const _0x3564c6=await withSpinner(_0x19f669(0x1b0),()=>_0x59de16[_0x19f669(0x159)][_0x19f669(0x19e)](_0x56c1f3,_0x671e2d),{'verbose':_0x4844b9[_0x19f669(0x1bc)]}),_0x22eb25=_0x3564c6[_0x19f669(0x136)];return console[_0x19f669(0x151)]('✔\x20'+_0x22eb25),0x0;}catch(_0x39ffc2){if(_0x39ffc2 instanceof SDKError)return console[_0x19f669(0x151)](_0x19f669(0x18e)+_0x39ffc2[_0x19f669(0x1a9)]),_0x39ffc2[_0x19f669(0x197)]&&console['error'](_0x19f669(0x14c)+_0x39ffc2[_0x19f669(0x197)]),0x1;throw _0x39ffc2;}}}export class WorkflowRetryCommand extends BaseCommand{['name']=a44_0x2ab1ae(0x165);['description']=a44_0x2ab1ae(0x1a6);async[a44_0x2ab1ae(0x12e)](_0x3bb769){const _0x46c804=a44_0x2ab1ae,{options:_0x194f65,args:_0x1d05ef,tdx:_0x316aaa}=_0x3bb769,_0x31d4df=_0x1d05ef[0x0];if(!_0x31d4df)return console['error'](_0x46c804(0x14e)),console[_0x46c804(0x151)](_0x46c804(0x164)),0x1;let _0x3a766f=![],_0x39a2d6=_0x31d4df;if(_0x31d4df[_0x46c804(0x130)](_0x46c804(0x13e)))_0x3a766f=!![],_0x39a2d6=_0x31d4df[_0x46c804(0x1c2)](0x8);else{if(_0x31d4df[_0x46c804(0x130)](_0x46c804(0x1c4)))_0x3a766f=![],_0x39a2d6=_0x31d4df[_0x46c804(0x1c2)](0x8);else return console[_0x46c804(0x151)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x46c804(0x151)](_0x46c804(0x164)),0x1;}try{const _0x52e10c=_0x194f65[_0x46c804(0x133)],_0x5affdb=_0x194f65[_0x46c804(0x185)],_0xeeb183=_0x194f65[_0x46c804(0x16a)],_0x2316dc=_0x194f65[_0x46c804(0x186)];_0x194f65[_0x46c804(0x1bc)]&&(console[_0x46c804(0x151)]('Target:\x20'+(_0x3a766f?_0x46c804(0x18c):_0x46c804(0x146))+'\x20'+_0x39a2d6),_0x52e10c&&console[_0x46c804(0x151)](_0x46c804(0x15e)+_0x52e10c),_0x5affdb&&console[_0x46c804(0x151)](_0x46c804(0x1b2)+_0x5affdb),_0xeeb183&&console[_0x46c804(0x151)]('Params:\x20'+_0xeeb183),_0x2316dc&&console[_0x46c804(0x151)](_0x46c804(0x1a3)));let _0xc48a8b;if(_0xeeb183)try{if(_0xeeb183['startsWith']('@')){const _0x40048e=await import(_0x46c804(0x15b)),_0x5a9a8d=_0xeeb183[_0x46c804(0x1c2)](0x1),_0x1a70dd=await _0x40048e[_0x46c804(0x1b9)](_0x5a9a8d,_0x46c804(0x15a));_0xc48a8b=JSON[_0x46c804(0x141)](_0x1a70dd);}else _0xc48a8b=JSON['parse'](_0xeeb183);}catch{return console[_0x46c804(0x151)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x194f65['yes']){const _0x12a0ad=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x3a766f?_0x46c804(0x18c):'attempt')+'\x20'+_0x39a2d6+'?');if(!_0x12a0ad)return console[_0x46c804(0x151)](_0x46c804(0x147)),0x0;}let _0x4fb2a4;_0x3a766f?_0x4fb2a4=await withSpinner(_0x46c804(0x134),()=>_0x316aaa[_0x46c804(0x159)][_0x46c804(0x137)](_0x39a2d6,{'fromTask':_0x52e10c,'retryParams':_0xc48a8b}),{'verbose':_0x194f65[_0x46c804(0x1bc)]}):_0x4fb2a4=await withSpinner(_0x46c804(0x180),()=>_0x316aaa[_0x46c804(0x159)][_0x46c804(0x1c3)](_0x39a2d6,{'resumeFrom':_0x5affdb,'retryParams':_0xc48a8b,'force':_0x2316dc}),{'verbose':_0x194f65[_0x46c804(0x1bc)]});const _0xbc70c3=_0x4fb2a4['data'];return console[_0x46c804(0x151)]('✔\x20Retry\x20started'),console[_0x46c804(0x151)](_0x46c804(0x162)+_0xbc70c3['attemptId']),console[_0x46c804(0x151)](_0x46c804(0x1a7)+_0xbc70c3[_0x46c804(0x139)]),0x0;}catch(_0x4ea67d){if(_0x4ea67d instanceof SDKError)return console[_0x46c804(0x151)](_0x46c804(0x18e)+_0x4ea67d[_0x46c804(0x1a9)]),_0x4ea67d['cause']&&console[_0x46c804(0x151)]('\x20\x20Cause:\x20'+_0x4ea67d['cause']),0x1;throw _0x4ea67d;}}}export class WorkflowRunCommand extends BaseCommand{[a44_0x2ab1ae(0x16d)]=a44_0x2ab1ae(0x13b);[a44_0x2ab1ae(0x148)]='Start\x20a\x20workflow\x20run';async['execute'](_0x346990){const _0x508c4f=a44_0x2ab1ae,{options:_0x37a518,args:_0x11d33a,tdx:_0x31255b}=_0x346990,_0x1bf92a=_0x11d33a[0x0];if(!_0x1bf92a)return console[_0x508c4f(0x151)](_0x508c4f(0x131)),console['error'](_0x508c4f(0x152)),0x1;const _0x557e0e=_0x37a518[_0x508c4f(0x191)],_0xa0af02=_0x37a518[_0x508c4f(0x16e)],_0x5ad862={};if(_0x557e0e&&Array[_0x508c4f(0x172)](_0x557e0e))for(const _0x14d6a8 of _0x557e0e){const _0x2e08b8=_0x14d6a8['indexOf']('=');if(_0x2e08b8===-0x1)return console['error'](_0x508c4f(0x13f)+_0x14d6a8),console[_0x508c4f(0x151)](_0x508c4f(0x195)),0x1;const _0x598da0=_0x14d6a8[_0x508c4f(0x1c2)](0x0,_0x2e08b8),_0x143708=_0x14d6a8['substring'](_0x2e08b8+0x1);try{_0x5ad862[_0x598da0]=JSON[_0x508c4f(0x141)](_0x143708);}catch{_0x5ad862[_0x598da0]=_0x143708;}}_0x37a518[_0x508c4f(0x1bc)]&&(console['error']('Workflow:\x20'+_0x1bf92a),Object[_0x508c4f(0x1af)](_0x5ad862)[_0x508c4f(0x138)]>0x0&&console[_0x508c4f(0x151)](_0x508c4f(0x12d)+JSON['stringify'](_0x5ad862)),_0xa0af02&&console[_0x508c4f(0x151)](_0x508c4f(0x169)+_0xa0af02));const _0x4d80bf=await withSpinner(_0x508c4f(0x17f),()=>_0x31255b[_0x508c4f(0x159)]['run'](_0x1bf92a,_0x5ad862,{'sessionTime':_0xa0af02}),{'verbose':_0x37a518['verbose']}),_0x561e92=_0x4d80bf['data'];return console['error'](_0x508c4f(0x192)),console[_0x508c4f(0x151)](_0x508c4f(0x12a)+_0x561e92['id']),console[_0x508c4f(0x151)](_0x508c4f(0x1a7)+_0x561e92[_0x508c4f(0x139)]),console[_0x508c4f(0x151)](_0x508c4f(0x12c)+_0x561e92[_0x508c4f(0x18a)]?.['name']),console[_0x508c4f(0x151)]('\x20\x20Workflow:\x20'+_0x561e92[_0x508c4f(0x159)]?.[_0x508c4f(0x16d)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a44_0x2ab1ae(0x16d)]=a44_0x2ab1ae(0x13d);['description']=a44_0x2ab1ae(0x1b8);async['execute'](_0x509cf0){const _0x5d3bcb=a44_0x2ab1ae,{options:_0x4ffad1,args:_0x448938,tdx:_0x2c9d97}=_0x509cf0,_0x1078e3=_0x448938[0x0],_0x37a246=_0x448938[0x1]||'.';if(!_0x1078e3)return console['error'](_0x5d3bcb(0x16c)),console[_0x5d3bcb(0x151)](_0x5d3bcb(0x11f)),0x1;const _0x11c3dd=_0x4ffad1[_0x5d3bcb(0x154)];_0x4ffad1['verbose']&&(console['error'](_0x5d3bcb(0x178)+_0x1078e3),console[_0x5d3bcb(0x151)](_0x5d3bcb(0x176)+_0x37a246),_0x11c3dd&&console[_0x5d3bcb(0x151)](_0x5d3bcb(0x1a5)+_0x11c3dd));const _0x3ded45=await withSpinner(_0x5d3bcb(0x125)+_0x1078e3+_0x5d3bcb(0x155),()=>_0x2c9d97[_0x5d3bcb(0x159)]['download'](_0x1078e3,_0x37a246,{'revision':_0x11c3dd}),{'verbose':_0x4ffad1[_0x5d3bcb(0x1bc)]}),_0x4d2afd=_0x3ded45[_0x5d3bcb(0x136)];return console[_0x5d3bcb(0x151)](_0x5d3bcb(0x120)+_0x4d2afd[_0x5d3bcb(0x167)]),console['error'](_0x5d3bcb(0x157)+_0x4d2afd[_0x5d3bcb(0x154)]),console[_0x5d3bcb(0x151)](_0x5d3bcb(0x1a0)+_0x4d2afd[_0x5d3bcb(0x124)]),console[_0x5d3bcb(0x151)](_0x5d3bcb(0x15f)+_0x37a246+'/'+_0x4d2afd[_0x5d3bcb(0x167)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']=a44_0x2ab1ae(0x12f);[a44_0x2ab1ae(0x148)]=a44_0x2ab1ae(0x181);async[a44_0x2ab1ae(0x12e)](_0x42475c){const _0x1346a4=a44_0x2ab1ae,{options:_0x5c442c,args:_0x194676,tdx:_0x7e397e}=_0x42475c;let _0x1d5a0d='.',_0x316e6e=_0x5c442c[_0x1346a4(0x16d)];if(_0x194676[0x0]){const {promises:_0x13b6cd}=await import('fs');try{const _0x263067=await _0x13b6cd['stat'](_0x194676[0x0]);if(_0x263067['isDirectory']())_0x1d5a0d=_0x194676[0x0];else return console[_0x1346a4(0x151)]('Error:\x20'+_0x194676[0x0]+_0x1346a4(0x1ac)),0x1;}catch{_0x316e6e=_0x194676[0x0],_0x1d5a0d='.';}}const _0x11dbf6=_0x5c442c[_0x1346a4(0x154)],_0x236e8d=_0x5c442c[_0x1346a4(0x19a)];_0x5c442c[_0x1346a4(0x1bc)]&&(console[_0x1346a4(0x151)](_0x1346a4(0x1c1)+_0x1d5a0d),_0x316e6e&&console['error'](_0x1346a4(0x1a1)+_0x316e6e),_0x11dbf6&&console['error'](_0x1346a4(0x1a5)+_0x11dbf6),_0x236e8d&&console[_0x1346a4(0x151)](_0x1346a4(0x144)));const _0x390bfd=await withSpinner(_0x1346a4(0x18f),()=>_0x7e397e[_0x1346a4(0x159)][_0x1346a4(0x153)](_0x1d5a0d,{'projectName':_0x316e6e,'revision':_0x11dbf6,'skipValidation':_0x236e8d}),{'verbose':_0x5c442c[_0x1346a4(0x1bc)]}),_0x4669fb=_0x390bfd['data'];return console[_0x1346a4(0x151)](_0x1346a4(0x1ad)+_0x4669fb[_0x1346a4(0x167)]),console['error'](_0x1346a4(0x198)+_0x4669fb[_0x1346a4(0x188)]),console[_0x1346a4(0x151)]('\x20\x20Revision:\x20'+_0x4669fb[_0x1346a4(0x154)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a44_0x2ab1ae(0x16d)]=a44_0x2ab1ae(0x1b7);[a44_0x2ab1ae(0x148)]=a44_0x2ab1ae(0x150);async[a44_0x2ab1ae(0x12e)](_0x5dc34a){const _0x2e487d=a44_0x2ab1ae,{options:_0x48f66d,args:_0x15edaf,tdx:_0x5764fd}=_0x5dc34a,_0x321922=_0x15edaf[0x0];if(!_0x321922)return console[_0x2e487d(0x151)](_0x2e487d(0x171)),console[_0x2e487d(0x151)](_0x2e487d(0x145)),0x1;_0x48f66d[_0x2e487d(0x1bc)]&&console[_0x2e487d(0x151)]('Project:\x20'+_0x321922);if(!_0x48f66d['yes']){const _0x7021b6=await confirm(_0x2e487d(0x156)+_0x321922+_0x2e487d(0x127));if(!_0x7021b6)return console[_0x2e487d(0x151)](_0x2e487d(0x147)),0x0;}const _0x79b57e=await withSpinner(_0x2e487d(0x140)+_0x321922+_0x2e487d(0x155),()=>_0x5764fd[_0x2e487d(0x159)][_0x2e487d(0x1bb)](_0x321922),{'verbose':_0x48f66d[_0x2e487d(0x1bc)]}),_0x41ce5c=_0x79b57e[_0x2e487d(0x136)];return console[_0x2e487d(0x151)](_0x2e487d(0x14f)+_0x41ce5c[_0x2e487d(0x167)]),console[_0x2e487d(0x151)](_0x2e487d(0x198)+_0x41ce5c[_0x2e487d(0x188)]),0x0;}}
1
+ const a44_0x420978=a44_0x3380;(function(_0x436ee7,_0xcc96ac){const _0x4fbeb1=a44_0x3380,_0x3aa054=_0x436ee7();while(!![]){try{const _0x3b7a09=parseInt(_0x4fbeb1(0x181))/0x1*(parseInt(_0x4fbeb1(0x147))/0x2)+-parseInt(_0x4fbeb1(0x162))/0x3+-parseInt(_0x4fbeb1(0x1a8))/0x4*(parseInt(_0x4fbeb1(0x159))/0x5)+-parseInt(_0x4fbeb1(0x167))/0x6*(-parseInt(_0x4fbeb1(0x18d))/0x7)+parseInt(_0x4fbeb1(0x1d0))/0x8+parseInt(_0x4fbeb1(0x1a4))/0x9*(parseInt(_0x4fbeb1(0x1d6))/0xa)+-parseInt(_0x4fbeb1(0x138))/0xb;if(_0x3b7a09===_0xcc96ac)break;else _0x3aa054['push'](_0x3aa054['shift']());}catch(_0x5e272b){_0x3aa054['push'](_0x3aa054['shift']());}}}(a44_0x58de,0x23a6e));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';function a44_0x3380(_0x18f1c0,_0x53c563){_0x18f1c0=_0x18f1c0-0x12f;const _0x58de1e=a44_0x58de();let _0x338095=_0x58de1e[_0x18f1c0];return _0x338095;}import a44_0xaa63bf from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a44_0x420978(0x19b)]=a44_0x420978(0x14c);[a44_0x420978(0x13f)]=a44_0x420978(0x194);async['execute'](_0x3a81c4){const _0x288280=a44_0x420978,{options:_0x3f53f5,args:_0x3b93f5,tdx:_0x2eda88}=_0x3a81c4,_0x415913=_0x3b93f5[0x0];try{_0x3f53f5[_0x288280(0x179)]&&_0x415913&&console[_0x288280(0x1bb)](_0x288280(0x156)+_0x415913);const _0xfc46e9=await withSpinner(_0x288280(0x184),()=>_0x2eda88[_0x288280(0x1d4)]['projects'](_0x415913,{'limit':_0x3f53f5['limit']}),{'verbose':_0x3f53f5[_0x288280(0x179)]}),_0x428148=_0xfc46e9['data'];return console['error'](_0x288280(0x19f)+_0x428148[_0x288280(0x153)]+_0x288280(0x12f)+(_0x428148[_0x288280(0x153)]!==0x1?'s':'')),await handleSDKOutput(_0x428148,_0x3f53f5),0x0;}catch(_0x54ecac){if(_0x54ecac instanceof SDKError)return console[_0x288280(0x1bb)](_0x288280(0x139)+_0x54ecac[_0x288280(0x132)]),_0x54ecac[_0x288280(0x1c8)]&&console['error'](_0x288280(0x1dd)+_0x54ecac[_0x288280(0x1c8)]),0x1;throw _0x54ecac;}}}function a44_0x58de(){const _0x3f929a=['kill','name','includeSubtasks','Getting\x20attempt\x20tasks...','workflow:tasks','✔\x20Found\x20','format','Filter:\x20','fs/promises','success','32715bHRLir','log','workflows','\x20\x20Session\x20ID:\x20','692Vlqsrq','Resume\x20from:\x20','✔\x20Downloaded\x20','Fetching\x20log\x20files...','Session\x20time:\x20','finishedAt','Status:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Workflow:\x20','Filter:\x20project=','Revision:\x20','List\x20workflow\x20attempts','Retrying\x20attempt...','workflow:sessions','Show\x20specific\x20attempt\x20details','filesExtracted','cancelRequested','startsWith','From\x20task:\x20','error','sessionTime','attempts','Params:\x20','Including\x20subtasks:\x20yes','getTime','keys','Output\x20directory:\x20','skipValidation','projectId','project','split','Error:\x20Invalid\x20parameter\x20format:\x20','cause','\x20\x20Revision:\x20','attemptId','revision','run','Retrying\x20session...','workflow:logs','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','234112ivMfHV','projectName','done','taskName','workflow','workflow:attempts','130WePvVx','Project:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','substring','Select\x20a\x20task\x20to\x20view\x20logs:','Getting\x20attempt\x20details...','workflow:kill','\x20\x20Cause:\x20','\x20project','isDirectory','Show\x20tasks\x20for\x20an\x20attempt','message','utf-8','session','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Reason:\x20','status','1514546cVWVuj','Error:\x20','Listing\x20workflow\x20sessions...','resumeFrom','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','retryAttempt','reason','description','Target:\x20','List\x20workflow\x20execution\x20sessions','map','Project\x20filter:\x20','canceling','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Cancelled','2CzuegM','retryAttemptName','workflow:delete','download','fileSize','workflow:projects','execute','Start\x20a\x20workflow\x20run','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','params','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20\x20Project\x20ID:\x20','length','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','...','Pattern:\x20','limit','Downloading\x20project\x20','3985CLdznP','\x20session','✔\x20Retry\x20started','workflow:workflows','✔\x20Pushed\x20','Task\x20name:\x20','\x20attempt','Listing\x20workflow\x20attempts...','Parameters:\x20','98433Xazleh','\x20is\x20not\x20a\x20directory','retrySession','attempt','Killing\x20attempt...','660LatTrq','Error:\x20Attempt\x20ID\x20is\x20required','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Retry\x20a\x20session\x20or\x20attempt','No\x20log\x20files\x20found\x20for\x20this\x20attempt','tasks','\x20workflow','sessionId','sessions','indexOf','createdAt','✔\x20Workflow\x20run\x20started','includeRetried','\x20\x20Workflow:\x20','index','yes','logs','Project\x20name:\x20','verbose','Validation:\x20skipped','Expected\x20format:\x20--param\x20key=value','parse','\x20\x20Project:\x20','stat','workflow:retry','workflow:download','142159mxTkdW','json','Attempt\x20ID:\x20','Listing\x20workflow\x20projects...','select','force','\x20\x20Location:\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','param','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','round','task','15001SkqTfA','logFiles','data','Include\x20retried:\x20yes','Force:\x20yes','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Downloading\x20logs...','List\x20all\x20workflow\x20projects','Error:\x20Project\x20name\x20is\x20required','\x20\x20New\x20attempt\x20ID:\x20','readFile','from','Error:\x20Invalid\x20JSON\x20in\x20--params'];a44_0x58de=function(){return _0x3f929a;};return a44_0x58de();}export class WorkflowWorkflowsCommand extends BaseCommand{['name']=a44_0x420978(0x15c);['description']='List\x20workflows';async[a44_0x420978(0x14d)](_0x4968bb){const _0x51829b=a44_0x420978,{options:_0x3f4228,args:_0x4de953,tdx:_0x40ced1}=_0x4968bb,_0x355950=_0x4de953[0x0];try{_0x3f4228[_0x51829b(0x179)]&&_0x355950&&console[_0x51829b(0x1bb)](_0x51829b(0x143)+_0x355950);const _0x416a99=await withSpinner('Listing\x20workflows...',()=>_0x40ced1[_0x51829b(0x1d4)][_0x51829b(0x1a6)](_0x355950,{'limit':_0x3f4228[_0x51829b(0x157)]}),{'verbose':_0x3f4228[_0x51829b(0x179)]}),_0xa99b3d=_0x416a99[_0x51829b(0x18f)];return console[_0x51829b(0x1bb)](_0x51829b(0x19f)+_0xa99b3d[_0x51829b(0x153)]+_0x51829b(0x16d)+(_0xa99b3d[_0x51829b(0x153)]!==0x1?'s':'')),await handleSDKOutput(_0xa99b3d,_0x3f4228),0x0;}catch(_0x56d1f0){if(_0x56d1f0 instanceof SDKError)return console[_0x51829b(0x1bb)](_0x51829b(0x139)+_0x56d1f0['message']),_0x56d1f0[_0x51829b(0x1c8)]&&console['error'](_0x51829b(0x1dd)+_0x56d1f0[_0x51829b(0x1c8)]),0x1;throw _0x56d1f0;}}}export class WorkflowSessionsCommand extends BaseCommand{[a44_0x420978(0x19b)]=a44_0x420978(0x1b5);[a44_0x420978(0x13f)]=a44_0x420978(0x141);async[a44_0x420978(0x14d)](_0x13db09){const _0x3ee065=a44_0x420978,{options:_0x45e656,args:_0x46e6c7,tdx:_0x1ed711}=_0x13db09;let _0x3a1528,_0x255211;if(_0x46e6c7[0x0]){const _0x3b233d=_0x46e6c7[0x0][_0x3ee065(0x1c6)]('.');if(_0x3b233d[_0x3ee065(0x153)]===0x1)_0x3a1528=_0x3b233d[0x0];else{if(_0x3b233d[_0x3ee065(0x153)]===0x2)[_0x3a1528,_0x255211]=_0x3b233d;else return console[_0x3ee065(0x1bb)](_0x3ee065(0x145)),0x1;}}try{if(_0x45e656[_0x3ee065(0x179)]){if(_0x3a1528&&_0x255211)console[_0x3ee065(0x1bb)](_0x3ee065(0x1a1)+_0x3a1528+'.'+_0x255211);else _0x3a1528&&console[_0x3ee065(0x1bb)](_0x3ee065(0x1b1)+_0x3a1528);const _0x33eb01=_0x45e656['status'];_0x33eb01&&console[_0x3ee065(0x1bb)](_0x3ee065(0x1ae)+_0x33eb01);}const _0x217693=await withSpinner(_0x3ee065(0x13a),()=>_0x1ed711[_0x3ee065(0x1d4)][_0x3ee065(0x16f)]({'projectName':_0x3a1528,'workflowName':_0x255211,'status':_0x45e656[_0x3ee065(0x137)],'fromTime':_0x45e656[_0x3ee065(0x198)],'toTime':_0x45e656['to'],'limit':_0x45e656[_0x3ee065(0x157)]}),{'verbose':_0x45e656['verbose']}),_0x25f482=_0x217693[_0x3ee065(0x18f)];return console[_0x3ee065(0x1bb)]('✔\x20Found\x20'+_0x25f482[_0x3ee065(0x153)]+_0x3ee065(0x15a)+(_0x25f482['length']!==0x1?'s':'')),await handleSDKOutput(_0x25f482,_0x45e656),0x0;}catch(_0x18b2e0){if(_0x18b2e0 instanceof SDKError)return console[_0x3ee065(0x1bb)](_0x3ee065(0x139)+_0x18b2e0['message']),_0x18b2e0[_0x3ee065(0x1c8)]&&console[_0x3ee065(0x1bb)](_0x3ee065(0x1dd)+_0x18b2e0[_0x3ee065(0x1c8)]),0x1;throw _0x18b2e0;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a44_0x420978(0x19b)]=a44_0x420978(0x1d5);[a44_0x420978(0x13f)]=a44_0x420978(0x1b3);async[a44_0x420978(0x14d)](_0x2255c9){const _0x3e31b0=a44_0x420978,{options:_0x3a1f9c,args:_0x5dc258,tdx:_0x58066f}=_0x2255c9;let _0x3d7115,_0x291d7f;if(_0x5dc258[0x0]){const _0x5c1c19=_0x5dc258[0x0][_0x3e31b0(0x1c6)]('.');if(_0x5c1c19[_0x3e31b0(0x153)]===0x1)_0x3d7115=_0x5c1c19[0x0];else{if(_0x5c1c19[_0x3e31b0(0x153)]===0x2)[_0x3d7115,_0x291d7f]=_0x5c1c19;else return console[_0x3e31b0(0x1bb)](_0x3e31b0(0x145)),0x1;}}try{const _0x49f9a6=_0x3a1f9c[_0x3e31b0(0x173)];if(_0x3a1f9c[_0x3e31b0(0x179)]){if(_0x3d7115&&_0x291d7f)console['error'](_0x3e31b0(0x1a1)+_0x3d7115+'.'+_0x291d7f);else _0x3d7115&&console[_0x3e31b0(0x1bb)](_0x3e31b0(0x1b1)+_0x3d7115);_0x49f9a6&&console[_0x3e31b0(0x1bb)](_0x3e31b0(0x190));}const _0x16fe55=await withSpinner(_0x3e31b0(0x160),()=>_0x58066f['workflow'][_0x3e31b0(0x1bd)]({'projectName':_0x3d7115,'workflowName':_0x291d7f,'includeRetried':_0x49f9a6,'limit':_0x3a1f9c['limit']}),{'verbose':_0x3a1f9c['verbose']}),_0x125bd0=_0x16fe55['data'];return console[_0x3e31b0(0x1bb)](_0x3e31b0(0x19f)+_0x125bd0[_0x3e31b0(0x153)]+_0x3e31b0(0x15f)+(_0x125bd0[_0x3e31b0(0x153)]!==0x1?'s':'')),await handleSDKOutput(_0x125bd0,_0x3a1f9c),0x0;}catch(_0x2f6964){if(_0x2f6964 instanceof SDKError)return console[_0x3e31b0(0x1bb)](_0x3e31b0(0x139)+_0x2f6964['message']),_0x2f6964[_0x3e31b0(0x1c8)]&&console[_0x3e31b0(0x1bb)](_0x3e31b0(0x1dd)+_0x2f6964['cause']),0x1;throw _0x2f6964;}}}export class WorkflowAttemptCommand extends BaseCommand{[a44_0x420978(0x19b)]='workflow:attempt';[a44_0x420978(0x13f)]=a44_0x420978(0x1b6);async[a44_0x420978(0x14d)](_0x28075e){const _0x54e125=a44_0x420978,{options:_0x2b4b8c,args:_0x56d4e2,tdx:_0x462ebf}=_0x28075e,_0x420926=_0x56d4e2[0x0];if(!_0x420926)return console['error'](_0x54e125(0x168)),0x1;try{_0x2b4b8c[_0x54e125(0x179)]&&console[_0x54e125(0x1bb)]('Attempt\x20ID:\x20'+_0x420926);const _0x2a14da=await withSpinner(_0x54e125(0x1db),()=>_0x462ebf[_0x54e125(0x1d4)]['attempt'](_0x420926),{'verbose':_0x2b4b8c[_0x54e125(0x179)]}),_0x588fc7=_0x2a14da[_0x54e125(0x18f)];let _0x35c5cb;!_0x588fc7[_0x54e125(0x1d2)]?_0x35c5cb=_0x588fc7[_0x54e125(0x1b8)]?_0x54e125(0x144):'running':_0x35c5cb=_0x588fc7[_0x54e125(0x1a3)]?_0x54e125(0x1a3):_0x54e125(0x1bb);let _0x22a59d;if(_0x588fc7[_0x54e125(0x171)]&&_0x588fc7[_0x54e125(0x1ad)]){const _0x62d31c=new Date(_0x588fc7['createdAt'])[_0x54e125(0x1c0)](),_0x2a9405=new Date(_0x588fc7[_0x54e125(0x1ad)])[_0x54e125(0x1c0)]();_0x22a59d=Math[_0x54e125(0x18b)]((_0x2a9405-_0x62d31c)/0x3e8);}const _0x1e67d8={'attempt_id':_0x588fc7['id'],'status':_0x35c5cb,..._0x588fc7[_0x54e125(0x175)]!==undefined&&{'index':_0x588fc7['index']},..._0x588fc7[_0x54e125(0x1c5)]&&{'project':_0x588fc7['project'][_0x54e125(0x19b)]},..._0x588fc7[_0x54e125(0x1d4)]&&{'workflow':_0x588fc7[_0x54e125(0x1d4)][_0x54e125(0x19b)]},..._0x588fc7[_0x54e125(0x16e)]&&{'session_id':_0x588fc7[_0x54e125(0x16e)]},..._0x588fc7['sessionTime']&&{'session_time':_0x588fc7['sessionTime']},..._0x588fc7[_0x54e125(0x148)]&&{'retry_attempt':_0x588fc7[_0x54e125(0x148)]},..._0x22a59d!==undefined&&{'duration_sec':_0x22a59d},..._0x588fc7[_0x54e125(0x171)]&&{'created_at':_0x588fc7[_0x54e125(0x171)]},..._0x588fc7[_0x54e125(0x1ad)]&&{'finished_at':_0x588fc7[_0x54e125(0x1ad)]},...Object[_0x54e125(0x1c1)](_0x588fc7['params'])[_0x54e125(0x153)]>0x0&&{'params':_0x588fc7[_0x54e125(0x150)]}};return await handleSingleObjectOutput(_0x1e67d8,_0x2b4b8c),0x0;}catch(_0x59c5a4){if(_0x59c5a4 instanceof SDKError)return console['error'](_0x54e125(0x139)+_0x59c5a4[_0x54e125(0x132)]),_0x59c5a4['cause']&&console['error'](_0x54e125(0x1dd)+_0x59c5a4['cause']),0x1;throw _0x59c5a4;}}}export class WorkflowTasksCommand extends BaseCommand{[a44_0x420978(0x19b)]=a44_0x420978(0x19e);[a44_0x420978(0x13f)]=a44_0x420978(0x131);async[a44_0x420978(0x14d)](_0x1e5d28){const _0x18dc82=a44_0x420978,{options:_0x560939,args:_0x404da9,tdx:_0x4847ed}=_0x1e5d28,_0x21d5c9=_0x404da9[0x0];if(!_0x21d5c9)return console[_0x18dc82(0x1bb)](_0x18dc82(0x168)),0x1;try{const _0x592753=_0x560939[_0x18dc82(0x19c)];_0x560939[_0x18dc82(0x179)]&&(console[_0x18dc82(0x1bb)](_0x18dc82(0x183)+_0x21d5c9),_0x592753&&console['error'](_0x18dc82(0x1bf)));const _0x4befa2=await withSpinner(_0x18dc82(0x19d),()=>_0x4847ed['workflow'][_0x18dc82(0x16c)](_0x21d5c9,_0x592753||![]),{'verbose':_0x560939['verbose']}),_0x698963=_0x4befa2['data'];return console['error']('✔\x20Found\x20'+_0x698963['length']+'\x20task'+(_0x698963['length']!==0x1?'s':'')),await handleSDKOutput(_0x698963,_0x560939),0x0;}catch(_0xe4428b){if(_0xe4428b instanceof SDKError)return console[_0x18dc82(0x1bb)](_0x18dc82(0x139)+_0xe4428b[_0x18dc82(0x132)]),_0xe4428b['cause']&&console[_0x18dc82(0x1bb)](_0x18dc82(0x1dd)+_0xe4428b['cause']),0x1;throw _0xe4428b;}}}export class WorkflowLogsCommand extends BaseCommand{[a44_0x420978(0x19b)]=a44_0x420978(0x1ce);[a44_0x420978(0x13f)]='Show\x20logs\x20for\x20a\x20workflow\x20attempt';async['execute'](_0x1e6aa2){const _0xe8597d=a44_0x420978,{options:_0x204332,args:_0x4a02ed,tdx:_0x211a9b}=_0x1e6aa2,_0x5bb89c=_0x4a02ed[0x0];let _0x5e92e4=_0x4a02ed[0x1];if(!_0x5bb89c)return console[_0xe8597d(0x1bb)](_0xe8597d(0x168)),0x1;try{_0x204332[_0xe8597d(0x179)]&&(console[_0xe8597d(0x1bb)](_0xe8597d(0x183)+_0x5bb89c),_0x5e92e4&&console[_0xe8597d(0x1bb)](_0xe8597d(0x15e)+_0x5e92e4));const _0x2bed93=await withSpinner(_0xe8597d(0x1ab),()=>_0x211a9b['workflow'][_0xe8597d(0x18e)](_0x5bb89c,_0x5e92e4),{'verbose':_0x204332[_0xe8597d(0x179)]}),_0x3ae453=_0x2bed93[_0xe8597d(0x18f)];if(_0x3ae453[_0xe8597d(0x153)]===0x0)return console['error'](_0xe8597d(0x16b)),0x0;if(!_0x5e92e4&&(_0x204332[_0xe8597d(0x182)]||_0x204332[_0xe8597d(0x1a0)]))return await handleSDKOutput(_0x3ae453,_0x204332),0x0;if(!_0x5e92e4){const _0x11a7fb=_0x3ae453[_0xe8597d(0x142)](_0x32770d=>({'title':_0x32770d['taskName']+'\x20('+formatBytes(_0x32770d[_0xe8597d(0x14b)])+')','value':_0x32770d[_0xe8597d(0x1d3)]})),_0x1e3554=await a44_0xaa63bf({'type':_0xe8597d(0x185),'name':_0xe8597d(0x18c),'message':_0xe8597d(0x1da),'choices':_0x11a7fb});if(!_0x1e3554[_0xe8597d(0x18c)])return console['error']('Cancelled'),0x0;_0x5e92e4=_0x1e3554[_0xe8597d(0x18c)];}const _0x25a624=await withSpinner(_0xe8597d(0x193),()=>_0x211a9b[_0xe8597d(0x1d4)][_0xe8597d(0x177)](_0x5bb89c,_0x5e92e4),{'verbose':_0x204332[_0xe8597d(0x179)]}),_0x8e30f2=_0x25a624[_0xe8597d(0x18f)];return _0x8e30f2?console[_0xe8597d(0x1a5)](_0x8e30f2):console['error']('No\x20log\x20content\x20found'),0x0;}catch(_0x34d964){if(_0x34d964 instanceof SDKError)return console[_0xe8597d(0x1bb)](_0xe8597d(0x139)+_0x34d964['message']),_0x34d964[_0xe8597d(0x1c8)]&&console[_0xe8597d(0x1bb)](_0xe8597d(0x1dd)+_0x34d964[_0xe8597d(0x1c8)]),0x1;throw _0x34d964;}}}export class WorkflowKillCommand extends BaseCommand{['name']=a44_0x420978(0x1dc);['description']='Kill\x20a\x20running\x20attempt';async[a44_0x420978(0x14d)](_0x3d6be8){const _0x2a4ac7=a44_0x420978,{options:_0x4a4739,args:_0x2fd175,tdx:_0x19c179}=_0x3d6be8,_0xc303d1=_0x2fd175[0x0];if(!_0xc303d1)return console['error'](_0x2a4ac7(0x168)),0x1;try{const _0x3cba6f=_0x4a4739[_0x2a4ac7(0x13e)];_0x4a4739[_0x2a4ac7(0x179)]&&(console[_0x2a4ac7(0x1bb)](_0x2a4ac7(0x183)+_0xc303d1),_0x3cba6f&&console[_0x2a4ac7(0x1bb)](_0x2a4ac7(0x136)+_0x3cba6f));if(!_0x4a4739[_0x2a4ac7(0x176)]){const _0x5103a7=await confirm(_0x2a4ac7(0x1cf)+_0xc303d1+'?');if(!_0x5103a7)return console[_0x2a4ac7(0x1bb)](_0x2a4ac7(0x146)),0x0;}const _0x26079f=await withSpinner(_0x2a4ac7(0x166),()=>_0x19c179[_0x2a4ac7(0x1d4)][_0x2a4ac7(0x19a)](_0xc303d1,_0x3cba6f),{'verbose':_0x4a4739['verbose']}),_0x43fd5d=_0x26079f[_0x2a4ac7(0x18f)];return console[_0x2a4ac7(0x1bb)]('✔\x20'+_0x43fd5d),0x0;}catch(_0x299e81){if(_0x299e81 instanceof SDKError)return console[_0x2a4ac7(0x1bb)]('Error:\x20'+_0x299e81[_0x2a4ac7(0x132)]),_0x299e81[_0x2a4ac7(0x1c8)]&&console[_0x2a4ac7(0x1bb)](_0x2a4ac7(0x1dd)+_0x299e81[_0x2a4ac7(0x1c8)]),0x1;throw _0x299e81;}}}export class WorkflowRetryCommand extends BaseCommand{[a44_0x420978(0x19b)]=a44_0x420978(0x17f);[a44_0x420978(0x13f)]=a44_0x420978(0x16a);async[a44_0x420978(0x14d)](_0x2ed65e){const _0x5b44f4=a44_0x420978,{options:_0x455e79,args:_0x3a1a7a,tdx:_0x8f5c54}=_0x2ed65e,_0x11e4bb=_0x3a1a7a[0x0];if(!_0x11e4bb)return console[_0x5b44f4(0x1bb)](_0x5b44f4(0x18a)),console[_0x5b44f4(0x1bb)](_0x5b44f4(0x14f)),0x1;let _0x2a5bf4=![],_0x33c36f=_0x11e4bb;if(_0x11e4bb[_0x5b44f4(0x1b9)]('session:'))_0x2a5bf4=!![],_0x33c36f=_0x11e4bb[_0x5b44f4(0x1d9)](0x8);else{if(_0x11e4bb[_0x5b44f4(0x1b9)]('attempt:'))_0x2a5bf4=![],_0x33c36f=_0x11e4bb[_0x5b44f4(0x1d9)](0x8);else return console[_0x5b44f4(0x1bb)](_0x5b44f4(0x1af)),console[_0x5b44f4(0x1bb)](_0x5b44f4(0x14f)),0x1;}try{const _0x370226=_0x455e79['fromTask'],_0x4bc10d=_0x455e79[_0x5b44f4(0x13b)],_0x34cb64=_0x455e79[_0x5b44f4(0x150)],_0x4c7559=_0x455e79[_0x5b44f4(0x186)];_0x455e79[_0x5b44f4(0x179)]&&(console[_0x5b44f4(0x1bb)](_0x5b44f4(0x140)+(_0x2a5bf4?_0x5b44f4(0x134):_0x5b44f4(0x165))+'\x20'+_0x33c36f),_0x370226&&console['error'](_0x5b44f4(0x1ba)+_0x370226),_0x4bc10d&&console[_0x5b44f4(0x1bb)](_0x5b44f4(0x1a9)+_0x4bc10d),_0x34cb64&&console['error'](_0x5b44f4(0x1be)+_0x34cb64),_0x4c7559&&console['error'](_0x5b44f4(0x191)));let _0x40df87;if(_0x34cb64)try{if(_0x34cb64[_0x5b44f4(0x1b9)]('@')){const _0x1e9c12=await import(_0x5b44f4(0x1a2)),_0x2c44e7=_0x34cb64[_0x5b44f4(0x1d9)](0x1),_0x1d984e=await _0x1e9c12[_0x5b44f4(0x197)](_0x2c44e7,_0x5b44f4(0x133));_0x40df87=JSON[_0x5b44f4(0x17c)](_0x1d984e);}else _0x40df87=JSON['parse'](_0x34cb64);}catch{return console[_0x5b44f4(0x1bb)](_0x5b44f4(0x199)),0x1;}if(!_0x455e79[_0x5b44f4(0x176)]){const _0x2e800e=await confirm(_0x5b44f4(0x192)+(_0x2a5bf4?_0x5b44f4(0x134):_0x5b44f4(0x165))+'\x20'+_0x33c36f+'?');if(!_0x2e800e)return console[_0x5b44f4(0x1bb)](_0x5b44f4(0x146)),0x0;}let _0x166ed8;_0x2a5bf4?_0x166ed8=await withSpinner(_0x5b44f4(0x1cd),()=>_0x8f5c54['workflow'][_0x5b44f4(0x164)](_0x33c36f,{'fromTask':_0x370226,'retryParams':_0x40df87}),{'verbose':_0x455e79[_0x5b44f4(0x179)]}):_0x166ed8=await withSpinner(_0x5b44f4(0x1b4),()=>_0x8f5c54[_0x5b44f4(0x1d4)][_0x5b44f4(0x13d)](_0x33c36f,{'resumeFrom':_0x4bc10d,'retryParams':_0x40df87,'force':_0x4c7559}),{'verbose':_0x455e79['verbose']});const _0x44e0af=_0x166ed8[_0x5b44f4(0x18f)];return console[_0x5b44f4(0x1bb)](_0x5b44f4(0x15b)),console[_0x5b44f4(0x1bb)](_0x5b44f4(0x196)+_0x44e0af[_0x5b44f4(0x1ca)]),console[_0x5b44f4(0x1bb)](_0x5b44f4(0x1a7)+_0x44e0af[_0x5b44f4(0x16e)]),0x0;}catch(_0x5f3f87){if(_0x5f3f87 instanceof SDKError)return console['error'](_0x5b44f4(0x139)+_0x5f3f87[_0x5b44f4(0x132)]),_0x5f3f87[_0x5b44f4(0x1c8)]&&console['error'](_0x5b44f4(0x1dd)+_0x5f3f87[_0x5b44f4(0x1c8)]),0x1;throw _0x5f3f87;}}}export class WorkflowRunCommand extends BaseCommand{[a44_0x420978(0x19b)]='workflow:run';[a44_0x420978(0x13f)]=a44_0x420978(0x14e);async['execute'](_0x54637f){const _0xbc7d81=a44_0x420978,{options:_0x204299,args:_0x18192f,tdx:_0x568d66}=_0x54637f,_0x5764a4=_0x18192f[0x0];if(!_0x5764a4)return console[_0xbc7d81(0x1bb)]('Error:\x20Workflow\x20identifier\x20is\x20required'),console[_0xbc7d81(0x1bb)](_0xbc7d81(0x13c)),0x1;const _0x44779e=_0x204299[_0xbc7d81(0x189)],_0x3ce8bb=_0x204299[_0xbc7d81(0x1bc)],_0x45d622={};if(_0x44779e&&Array['isArray'](_0x44779e))for(const _0x5ae0b7 of _0x44779e){const _0x223b36=_0x5ae0b7[_0xbc7d81(0x170)]('=');if(_0x223b36===-0x1)return console[_0xbc7d81(0x1bb)](_0xbc7d81(0x1c7)+_0x5ae0b7),console['error'](_0xbc7d81(0x17b)),0x1;const _0x1bf525=_0x5ae0b7[_0xbc7d81(0x1d9)](0x0,_0x223b36),_0x488a66=_0x5ae0b7[_0xbc7d81(0x1d9)](_0x223b36+0x1);try{_0x45d622[_0x1bf525]=JSON['parse'](_0x488a66);}catch{_0x45d622[_0x1bf525]=_0x488a66;}}_0x204299[_0xbc7d81(0x179)]&&(console[_0xbc7d81(0x1bb)](_0xbc7d81(0x1b0)+_0x5764a4),Object[_0xbc7d81(0x1c1)](_0x45d622)[_0xbc7d81(0x153)]>0x0&&console[_0xbc7d81(0x1bb)](_0xbc7d81(0x161)+JSON['stringify'](_0x45d622)),_0x3ce8bb&&console[_0xbc7d81(0x1bb)](_0xbc7d81(0x1ac)+_0x3ce8bb));const _0x23fcd2=await withSpinner('Starting\x20workflow\x20run...',()=>_0x568d66[_0xbc7d81(0x1d4)][_0xbc7d81(0x1cc)](_0x5764a4,_0x45d622,{'sessionTime':_0x3ce8bb}),{'verbose':_0x204299[_0xbc7d81(0x179)]}),_0xe86a14=_0x23fcd2['data'];return console[_0xbc7d81(0x1bb)](_0xbc7d81(0x172)),console[_0xbc7d81(0x1bb)]('\x20\x20Attempt\x20ID:\x20'+_0xe86a14['id']),console['error'](_0xbc7d81(0x1a7)+_0xe86a14[_0xbc7d81(0x16e)]),console[_0xbc7d81(0x1bb)](_0xbc7d81(0x17d)+_0xe86a14['project']?.[_0xbc7d81(0x19b)]),console[_0xbc7d81(0x1bb)](_0xbc7d81(0x174)+_0xe86a14[_0xbc7d81(0x1d4)]?.[_0xbc7d81(0x19b)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a44_0x420978(0x180);[a44_0x420978(0x13f)]=a44_0x420978(0x151);async[a44_0x420978(0x14d)](_0x436c94){const _0x5c7811=a44_0x420978,{options:_0x2aa518,args:_0x29e581,tdx:_0x561a35}=_0x436c94,_0x417d26=_0x29e581[0x0],_0x1a7226=_0x29e581[0x1]||'.';if(!_0x417d26)return console[_0x5c7811(0x1bb)](_0x5c7811(0x195)),console[_0x5c7811(0x1bb)](_0x5c7811(0x1d8)),0x1;const _0x385b4c=_0x2aa518['revision'];_0x2aa518[_0x5c7811(0x179)]&&(console[_0x5c7811(0x1bb)](_0x5c7811(0x1d7)+_0x417d26),console['error'](_0x5c7811(0x1c2)+_0x1a7226),_0x385b4c&&console['error'](_0x5c7811(0x1b2)+_0x385b4c));const _0x41f797=await withSpinner(_0x5c7811(0x158)+_0x417d26+_0x5c7811(0x155),()=>_0x561a35[_0x5c7811(0x1d4)][_0x5c7811(0x14a)](_0x417d26,_0x1a7226,{'revision':_0x385b4c}),{'verbose':_0x2aa518[_0x5c7811(0x179)]}),_0x56f341=_0x41f797[_0x5c7811(0x18f)];return console[_0x5c7811(0x1bb)](_0x5c7811(0x1aa)+_0x56f341[_0x5c7811(0x1d1)]),console[_0x5c7811(0x1bb)](_0x5c7811(0x1c9)+_0x56f341['revision']),console[_0x5c7811(0x1bb)]('\x20\x20Files\x20extracted:\x20'+_0x56f341[_0x5c7811(0x1b7)]),console[_0x5c7811(0x1bb)](_0x5c7811(0x187)+_0x1a7226+'/'+_0x56f341[_0x5c7811(0x1d1)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a44_0x420978(0x19b)]='workflow:push';['description']='Push\x20workflow\x20project\x20to\x20Treasure\x20Data';async[a44_0x420978(0x14d)](_0x588dc4){const _0x4e1266=a44_0x420978,{options:_0x4bc32d,args:_0x4311af,tdx:_0x374bc6}=_0x588dc4;let _0x550af5='.',_0x534360=_0x4bc32d[_0x4e1266(0x19b)];if(_0x4311af[0x0]){const {promises:_0x472409}=await import('fs');try{const _0x467293=await _0x472409[_0x4e1266(0x17e)](_0x4311af[0x0]);if(_0x467293[_0x4e1266(0x130)]())_0x550af5=_0x4311af[0x0];else return console[_0x4e1266(0x1bb)]('Error:\x20'+_0x4311af[0x0]+_0x4e1266(0x163)),0x1;}catch{_0x534360=_0x4311af[0x0],_0x550af5='.';}}const _0x170866=_0x4bc32d[_0x4e1266(0x1cb)],_0x1a4a6a=_0x4bc32d[_0x4e1266(0x1c3)];_0x4bc32d['verbose']&&(console['error']('Project\x20directory:\x20'+_0x550af5),_0x534360&&console[_0x4e1266(0x1bb)](_0x4e1266(0x178)+_0x534360),_0x170866&&console[_0x4e1266(0x1bb)](_0x4e1266(0x1b2)+_0x170866),_0x1a4a6a&&console[_0x4e1266(0x1bb)](_0x4e1266(0x17a)));const _0x1e21cd=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x374bc6[_0x4e1266(0x1d4)]['push'](_0x550af5,{'projectName':_0x534360,'revision':_0x170866,'skipValidation':_0x1a4a6a}),{'verbose':_0x4bc32d[_0x4e1266(0x179)]}),_0x43f635=_0x1e21cd[_0x4e1266(0x18f)];return console[_0x4e1266(0x1bb)](_0x4e1266(0x15d)+_0x43f635[_0x4e1266(0x1d1)]),console[_0x4e1266(0x1bb)](_0x4e1266(0x152)+_0x43f635[_0x4e1266(0x1c4)]),console[_0x4e1266(0x1bb)]('\x20\x20Revision:\x20'+_0x43f635[_0x4e1266(0x1cb)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a44_0x420978(0x19b)]=a44_0x420978(0x149);['description']=a44_0x420978(0x169);async['execute'](_0x34aca9){const _0x28d8c8=a44_0x420978,{options:_0x3fddb0,args:_0x43dcb2,tdx:_0x3af4e6}=_0x34aca9,_0x4adb57=_0x43dcb2[0x0];if(!_0x4adb57)return console[_0x28d8c8(0x1bb)](_0x28d8c8(0x135)),console[_0x28d8c8(0x1bb)](_0x28d8c8(0x188)),0x1;_0x3fddb0['verbose']&&console[_0x28d8c8(0x1bb)]('Project:\x20'+_0x4adb57);if(!_0x3fddb0[_0x28d8c8(0x176)]){const _0x4ff7f4=await confirm(_0x28d8c8(0x154)+_0x4adb57+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x4ff7f4)return console['error'](_0x28d8c8(0x146)),0x0;}const _0xa193eb=await withSpinner('Deleting\x20project\x20'+_0x4adb57+_0x28d8c8(0x155),()=>_0x3af4e6[_0x28d8c8(0x1d4)]['delete'](_0x4adb57),{'verbose':_0x3fddb0[_0x28d8c8(0x179)]}),_0x52ce0f=_0xa193eb[_0x28d8c8(0x18f)];return console['error']('✔\x20Deleted\x20project\x20'+_0x52ce0f[_0x28d8c8(0x1d1)]),console[_0x28d8c8(0x1bb)](_0x28d8c8(0x152)+_0x52ce0f['projectId']),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2a839f,_0x38e3ef){const _0x239d7b=a45_0x27de,_0x292497=_0x2a839f();while(!![]){try{const _0x338bb4=-parseInt(_0x239d7b(0xc6))/0x1+-parseInt(_0x239d7b(0xc0))/0x2*(-parseInt(_0x239d7b(0xc1))/0x3)+parseInt(_0x239d7b(0xb7))/0x4+-parseInt(_0x239d7b(0xc7))/0x5*(parseInt(_0x239d7b(0xb8))/0x6)+-parseInt(_0x239d7b(0xc2))/0x7+-parseInt(_0x239d7b(0xc3))/0x8*(parseInt(_0x239d7b(0xbb))/0x9)+parseInt(_0x239d7b(0xb5))/0xa*(parseInt(_0x239d7b(0xbc))/0xb);if(_0x338bb4===_0x38e3ef)break;else _0x292497['push'](_0x292497['shift']());}catch(_0x102c23){_0x292497['push'](_0x292497['shift']());}}}(a45_0x17b2,0x6620f));function a45_0x17b2(){const _0x4929b4=['entries','832204dqEJKC','24WLIZew','replace','version','5918949xSsRAD','352mQqlFL','0.0.0','parse','Authorization','6neoUtV','836409mLDRJC','3287788PRODaT','8DEVTWN','utf-8','../../package.json','521200dHZBST','903635dTSHAg','tdx','545410MqCJHs'];a45_0x17b2=function(){return _0x4929b4;};return a45_0x17b2();}import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x3b0326=a45_0x27de;try{const _0x1faff4=fileURLToPath(import.meta.url),_0x589ac8=dirname(_0x1faff4),_0x3a7b64=join(_0x589ac8,_0x3b0326(0xc5)),_0x517b6f=JSON[_0x3b0326(0xbe)](readFileSync(_0x3a7b64,_0x3b0326(0xc4)));return _0x517b6f['version'];}catch{return _0x3b0326(0xbd);}}export function getUserAgent(){const _0x206b92=a45_0x27de,_0x406ae0=getVersion(),_0xf9ccc7=platform(),_0x3e3f68=process[_0x206b92(0xba)][_0x206b92(0xb9)]('v','');return'tdx/'+_0x406ae0+'\x20('+_0xf9ccc7+';\x20node/'+_0x3e3f68+')';}export function getAuthHeaders(_0x70552b,_0x21eb73){const _0x136f53=a45_0x27de,_0x16ae2c=getVersion(),_0x4e3309={'User-Agent':getUserAgent(),'X-TD-Client':_0x136f53(0xc8),'X-TD-Client-Version':_0x16ae2c};return _0x21eb73&&(_0x4e3309['Authorization']='TD1\x20'+_0x21eb73),_0x4e3309;}export function toHeaderRecord(_0x283069){const _0x3170f0=a45_0x27de,_0x4cbea4={};for(const [_0x113038,_0x384c77]of Object[_0x3170f0(0xb6)](_0x283069)){_0x384c77!==undefined&&(_0x4cbea4[_0x113038]=_0x384c77);}return _0x4cbea4;}export function getTrinoHeaders(_0x16b55d,_0x28df50){const _0x12d46a=a45_0x27de,_0x587279=getAuthHeaders(_0x16b55d,_0x28df50),_0xc4e70=toHeaderRecord(_0x587279);return delete _0xc4e70[_0x12d46a(0xbf)],_0x28df50&&(_0xc4e70['X-Trino-User']=_0x28df50),_0xc4e70;}function a45_0x27de(_0x330506,_0x5b933a){_0x330506=_0x330506-0xb5;const _0x17b2d6=a45_0x17b2();let _0x27def5=_0x17b2d6[_0x330506];return _0x27def5;}export function hasAPIKey(_0x41219c){const _0x1fb709=getAPIKey(_0x41219c);return _0x1fb709!==undefined&&_0x1fb709['length']>0x0;}
1
+ (function(_0x4931f1,_0x25407a){const _0x410425=a45_0x10ac,_0x579526=_0x4931f1();while(!![]){try{const _0x3a0dc2=-parseInt(_0x410425(0x72))/0x1+parseInt(_0x410425(0x75))/0x2*(parseInt(_0x410425(0x6d))/0x3)+-parseInt(_0x410425(0x67))/0x4*(-parseInt(_0x410425(0x7c))/0x5)+-parseInt(_0x410425(0x74))/0x6*(parseInt(_0x410425(0x6c))/0x7)+parseInt(_0x410425(0x73))/0x8+parseInt(_0x410425(0x78))/0x9+parseInt(_0x410425(0x6b))/0xa;if(_0x3a0dc2===_0x25407a)break;else _0x579526['push'](_0x579526['shift']());}catch(_0x4dea02){_0x579526['push'](_0x579526['shift']());}}}(a45_0x5215,0x827fa));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';function a45_0x10ac(_0x26acbd,_0x409212){_0x26acbd=_0x26acbd-0x67;const _0x521575=a45_0x5215();let _0x10ac6f=_0x521575[_0x26acbd];return _0x10ac6f;}import{dirname,join}from'path';import{getAPIKey}from'./config.js';function a45_0x5215(){const _0x3b35b1=['21xhtRMb','length','replace','0.0.0','tdx/','1063731OVXPAR','495760njRyKD','8508FzFkUu','300302DdQnPf','Authorization','parse','2358531YxcGfY','../../package.json','tdx','version','25yhqSbM','105148ChJmSL',';\x20node/','entries','TD1\x20','10176860FTFOCK','4571NPqzQE'];a45_0x5215=function(){return _0x3b35b1;};return a45_0x5215();}export function getVersion(){const _0x186cc1=a45_0x10ac;try{const _0x3e023e=fileURLToPath(import.meta.url),_0x4352ab=dirname(_0x3e023e),_0x2dc75c=join(_0x4352ab,_0x186cc1(0x79)),_0x10c28e=JSON[_0x186cc1(0x77)](readFileSync(_0x2dc75c,'utf-8'));return _0x10c28e['version'];}catch{return _0x186cc1(0x70);}}export function getUserAgent(){const _0x3803b2=a45_0x10ac,_0x26e606=getVersion(),_0xbb05d9=platform(),_0x336bad=process[_0x3803b2(0x7b)][_0x3803b2(0x6f)]('v','');return _0x3803b2(0x71)+_0x26e606+'\x20('+_0xbb05d9+_0x3803b2(0x68)+_0x336bad+')';}export function getAuthHeaders(_0x142681,_0x54ee29){const _0x1a0310=a45_0x10ac,_0xa95032=getVersion(),_0x3cda51={'User-Agent':getUserAgent(),'X-TD-Client':_0x1a0310(0x7a),'X-TD-Client-Version':_0xa95032};return _0x54ee29&&(_0x3cda51['Authorization']=_0x1a0310(0x6a)+_0x54ee29),_0x3cda51;}export function toHeaderRecord(_0x325084){const _0x5c256b=a45_0x10ac,_0x25e4ae={};for(const [_0xa3ed10,_0x4b8c06]of Object[_0x5c256b(0x69)](_0x325084)){_0x4b8c06!==undefined&&(_0x25e4ae[_0xa3ed10]=_0x4b8c06);}return _0x25e4ae;}export function getTrinoHeaders(_0x2b275b,_0x4f486c){const _0x2a7159=a45_0x10ac,_0x13781a=getAuthHeaders(_0x2b275b,_0x4f486c),_0x29a3a6=toHeaderRecord(_0x13781a);return delete _0x29a3a6[_0x2a7159(0x76)],_0x4f486c&&(_0x29a3a6['X-Trino-User']=_0x4f486c),_0x29a3a6;}export function hasAPIKey(_0x1bd5f7){const _0x57f136=a45_0x10ac,_0x4b20a7=getAPIKey(_0x1bd5f7);return _0x4b20a7!==undefined&&_0x4b20a7[_0x57f136(0x6e)]>0x0;}
@@ -1 +1 @@
1
- (function(_0x2a4c93,_0x19bc72){const _0x472cbd=a46_0x5cf5,_0x4f88b0=_0x2a4c93();while(!![]){try{const _0xd2bd86=-parseInt(_0x472cbd(0x1bb))/0x1*(-parseInt(_0x472cbd(0x18c))/0x2)+parseInt(_0x472cbd(0x1b5))/0x3+-parseInt(_0x472cbd(0x187))/0x4*(parseInt(_0x472cbd(0x1ad))/0x5)+-parseInt(_0x472cbd(0x179))/0x6*(parseInt(_0x472cbd(0x197))/0x7)+parseInt(_0x472cbd(0x199))/0x8+parseInt(_0x472cbd(0x1a0))/0x9+parseInt(_0x472cbd(0x1a4))/0xa;if(_0xd2bd86===_0x19bc72)break;else _0x4f88b0['push'](_0x4f88b0['shift']());}catch(_0x27143d){_0x4f88b0['push'](_0x4f88b0['shift']());}}}(a46_0x4ac6,0xb430d));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync,unlinkSync}from'fs';import*as a46_0x321104 from'node:fs';import*as a46_0x1e6474 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';import{getKeychainAPIKey,saveKeychainAPIKey,isKeychainAvailable}from'./keychain.js';import{getCachedCredential,setCachedCredential}from'./credential-cache.js';import a46_0x35519b from'chalk';export function getConfigDir(){const _0x3d5a77=a46_0x5cf5;return process[_0x3d5a77(0x193)][_0x3d5a77(0x196)]||join(homedir(),_0x3d5a77(0x1a8),_0x3d5a77(0x1bd));}function a46_0x5cf5(_0x9c15c3,_0xf0e446){_0x9c15c3=_0x9c15c3-0x177;const _0x4ac68c=a46_0x4ac6();let _0x5cf571=_0x4ac68c[_0x9c15c3];return _0x5cf571;}export function getConfigFile(){return join(getConfigDir(),'.env');}export function getConfigFilePath(_0x3f378){const _0x247388=a46_0x5cf5,_0x1186b2=getConfigDir();return _0x3f378?a46_0x1e6474[_0x247388(0x19b)](_0x1186b2,_0x247388(0x1bc)+_0x3f378):getConfigFile();}export function getCacheDir(){const _0x8cfea8=a46_0x5cf5;return process[_0x8cfea8(0x193)][_0x8cfea8(0x198)]||join(homedir(),_0x8cfea8(0x1ae),_0x8cfea8(0x1bd));}export function getLLMProjectCacheFile(_0x137afb){const _0x2b15ef=a46_0x5cf5,_0x36593f=_0x137afb?_0x2b15ef(0x1a7)+_0x137afb:_0x2b15ef(0x1c4);return join(getCacheDir(),_0x36593f);}export function readCachedLLMProject(_0x2ef94c){const _0x1bde23=a46_0x5cf5;try{const _0x2bf43f=getLLMProjectCacheFile(_0x2ef94c);if(!existsSync(_0x2bf43f))return null;const _0x402733=readFileSync(_0x2bf43f,_0x1bde23(0x1aa))[_0x1bde23(0x1c2)]();try{const _0x309c75=JSON[_0x1bde23(0x19f)](_0x402733);if(_0x309c75&&typeof _0x309c75['id']===_0x1bde23(0x1b6)&&typeof _0x309c75['name']===_0x1bde23(0x1b6))return _0x309c75;}catch{}return null;}catch{return null;}}export function writeCachedLLMProject(_0x33218d,_0x4ac3da,_0x247386){try{const _0x29842a=getCacheDir(),_0x39a9aa=getLLMProjectCacheFile(_0x247386);!existsSync(_0x29842a)&&mkdirSync(_0x29842a,{'recursive':!![]});const _0x15979f={'name':_0x33218d,'id':_0x4ac3da};writeFileSync(_0x39a9aa,JSON['stringify'](_0x15979f),'utf-8');}catch{}}export function getLLMAgentCacheFile(_0x2c25fe){const _0x1345b8=a46_0x5cf5,_0x516e30=_0x2c25fe?_0x1345b8(0x19d)+_0x2c25fe:_0x1345b8(0x1ca);return join(getCacheDir(),_0x516e30);}export function readCachedLLMAgent(_0x268567){const _0x5d02d9=a46_0x5cf5;try{const _0x239bde=getLLMAgentCacheFile(_0x268567);if(!existsSync(_0x239bde))return null;const _0x1d71e7=readFileSync(_0x239bde,_0x5d02d9(0x1aa))['trim']();try{const _0x1bfea9=JSON[_0x5d02d9(0x19f)](_0x1d71e7);if(_0x1bfea9&&typeof _0x1bfea9['id']==='string'&&typeof _0x1bfea9[_0x5d02d9(0x184)]===_0x5d02d9(0x1b6)&&typeof _0x1bfea9[_0x5d02d9(0x1c7)]===_0x5d02d9(0x1b6))return _0x1bfea9;}catch{}return null;}catch{return null;}}export function writeCachedLLMAgent(_0x5ab531,_0xbc4ad2,_0x5f6d41,_0xbbb95e){const _0x14d79e=a46_0x5cf5;try{const _0x6a414d=getCacheDir(),_0x2db06b=getLLMAgentCacheFile(_0xbbb95e);!existsSync(_0x6a414d)&&mkdirSync(_0x6a414d,{'recursive':!![]});const _0x5a9411={'name':_0x5ab531,'id':_0xbc4ad2,'projectId':_0x5f6d41};writeFileSync(_0x2db06b,JSON[_0x14d79e(0x183)](_0x5a9411),_0x14d79e(0x1aa));}catch{}}export function clearCachedLLMAgent(_0x306952){try{const _0x1cb98b=getLLMAgentCacheFile(_0x306952);existsSync(_0x1cb98b)&&unlinkSync(_0x1cb98b);}catch{}}export function getAccountInfoCacheFile(_0x45f74e){const _0x33622f=a46_0x5cf5,_0x22ee6f=_0x45f74e?'account_info.'+_0x45f74e+_0x33622f(0x18d):_0x33622f(0x1b7);return join(getCacheDir(),_0x22ee6f);}export function readCachedAccountInfo(_0x4cea12){const _0x1e7cff=a46_0x5cf5;try{const _0xc64c3c=getAccountInfoCacheFile(_0x4cea12);if(!existsSync(_0xc64c3c))return null;const _0x641220=readFileSync(_0xc64c3c,_0x1e7cff(0x1aa))[_0x1e7cff(0x1c2)](),_0x315a37=JSON['parse'](_0x641220);if(_0x315a37&&typeof _0x315a37['site']===_0x1e7cff(0x1b6)&&typeof _0x315a37[_0x1e7cff(0x19c)]===_0x1e7cff(0x1c9))return _0x315a37;return null;}catch{return null;}}export function writeCachedAccountInfo(_0x276dad,_0x352078,_0x328eae){const _0x34b703=a46_0x5cf5;try{const _0x4f5eff=getCacheDir(),_0x335b6a=getAccountInfoCacheFile(_0x328eae);!existsSync(_0x4f5eff)&&mkdirSync(_0x4f5eff,{'recursive':!![]});const _0x142dd1={'site':_0x276dad,'accountId':_0x352078,'cachedAt':new Date()[_0x34b703(0x1b8)]()};writeFileSync(_0x335b6a,JSON[_0x34b703(0x183)](_0x142dd1),_0x34b703(0x1aa));}catch{}}export function parseEnvFile(_0x355eee){const _0x353899=a46_0x5cf5,_0x54e2af={};for(const _0x68138a of _0x355eee[_0x353899(0x1c3)]('\x0a')){const _0x484c26=_0x68138a[_0x353899(0x1c2)]();if(!_0x484c26||_0x484c26[_0x353899(0x18f)]('#'))continue;const _0x5ea039=_0x484c26[_0x353899(0x194)](/^([^=]+)=(.*)$/);if(_0x5ea039){const _0x3e6b02=_0x5ea039[0x1][_0x353899(0x1c2)]();let _0x5c3b9b=_0x5ea039[0x2][_0x353899(0x1c2)]();(_0x5c3b9b['startsWith']('\x22')&&_0x5c3b9b[_0x353899(0x189)]('\x22')||_0x5c3b9b[_0x353899(0x18f)]('\x27')&&_0x5c3b9b[_0x353899(0x189)]('\x27'))&&(_0x5c3b9b=_0x5c3b9b[_0x353899(0x1b0)](0x1,-0x1)),_0x54e2af[_0x3e6b02]=_0x5c3b9b;}}return _0x54e2af;}export function readUserConfig(){const _0x537ec7=a46_0x5cf5,_0x1c83cb=getConfigFile();if(!existsSync(_0x1c83cb))return{};try{const _0x451b11=readFileSync(_0x1c83cb,_0x537ec7(0x1aa));return parseEnvFile(_0x451b11);}catch(_0x5da043){return console['warn'](_0x537ec7(0x192)+_0x1c83cb+':',_0x5da043),{};}}export function resolveSite(_0x35bba3){const _0xf3669b=a46_0x5cf5,_0x2b1738=['us01',_0xf3669b(0x1a3),'eu01',_0xf3669b(0x1a9),'ap03',_0xf3669b(0x18b),_0xf3669b(0x1af),_0xf3669b(0x177),_0xf3669b(0x180),_0xf3669b(0x1bf)];if(_0x2b1738[_0xf3669b(0x17e)](_0x35bba3))return _0x35bba3;if(_0x35bba3 in SITE_ALIASES)return SITE_ALIASES[_0x35bba3];return console['warn'](_0xf3669b(0x17b)+_0x35bba3+_0xf3669b(0x1c6)),'us01';}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}function a46_0x4ac6(){const _0x1ae610=['some','⚠\x20Cleaned\x20up\x20API\x20keys\x20from\x20legacy\x20.env\x20file','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','env','match','replace','TDX_CONFIG_DIR','119IbEqBU','TDX_CACHE_DIR','9105560WNvOQI','eu01','join','accountId','llm_default_agent.','profiles','parse','427347fqQhiO','.env','toUpperCase','jp01','7438040mjEaOM','TD_API_KEY\x20env\x20var\x20(deprecated)','\x20\x20For\x20profile-specific\x20keys,\x20use\x20TDX_API_KEY_<PROFILE>\x20(e.g.,\x20','llm_default_project.','.config','ap02','utf-8','TD_API_KEY','keychain','5VMncuS','.cache','dev-eu01','slice','existsSync','TD_API_KEY_','yellow','profile','1891068SCdMoc','string','account_info.json','toISOString','TDX_API_KEY\x20env\x20var','apiKey','33SShGna','.env.','tdx','readFileSync','stg-ap03','legacy\x20.env\x20file','map','trim','split','llm_default_project','keychain\x20(profile:\x20','\x27,\x20defaulting\x20to\x20us01','projectId','TDX_API_KEY_<PROFILE>','number','llm_default_agent','stg-us01','TDX_API_KEY','365268IaslBL','source','Warning:\x20Unknown\x20site\x20\x27','entries','legacy\x20.env\x20file\x20(profile:\x20','includes','us01','stg-jp01','⚠\x20Failed\x20to\x20migrate\x20API\x20key\x20to\x20keychain:\x20','isDeprecated','stringify','name','ap03','Warning:\x20Using\x20TD_API_KEY\x20is\x20deprecated.\x20Please\x20use\x20TDX_API_KEY\x20instead.\x0a','3164696fjgNxd','Warning:\x20Failed\x20to\x20load\x20','endsWith','warn','dev-us01','262NkcpoH','.json','TDX_API_KEY_','startsWith'];a46_0x4ac6=function(){return _0x1ae610;};return a46_0x4ac6();}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x1007bb,_0x1279d3){const _0x262ed7=a46_0x5cf5,_0x41f053=_0x1279d3||getActiveProfileName();if(_0x41f053){const _0x167ad0=_0x262ed7(0x18e)+normalizeProfileForEnvVar(_0x41f053);if(process[_0x262ed7(0x193)][_0x167ad0])return process['env'][_0x167ad0];}if(process[_0x262ed7(0x193)][_0x262ed7(0x178)])return process['env'][_0x262ed7(0x178)];if(process[_0x262ed7(0x193)][_0x262ed7(0x1ab)])return process[_0x262ed7(0x193)]['TD_API_KEY'];const _0x35788e=_0x1007bb[_0x262ed7(0x1a2)]()[_0x262ed7(0x195)](/-/g,'_'),_0x38e1a8=_0x262ed7(0x1b2)+_0x35788e;if(_0x41f053){const _0x10970c=loadProfileEnv(_0x41f053);if(_0x10970c){if(_0x10970c[_0x38e1a8])return _0x10970c[_0x38e1a8];if(_0x10970c[_0x262ed7(0x1ab)])return _0x10970c[_0x262ed7(0x1ab)];}}const _0x1899eb=loadUserConfigOnce();if(_0x1899eb[_0x38e1a8])return _0x1899eb[_0x38e1a8];if(_0x1899eb['TD_API_KEY'])return _0x1899eb['TD_API_KEY'];return undefined;}export function normalizeProfileForEnvVar(_0x168c96){const _0x954f02=a46_0x5cf5;return _0x168c96[_0x954f02(0x1a2)]()['replace'](/[^A-Z0-9]/g,'_');}export async function resolveAPIKeyAsync(_0x56514c,_0x51d597){const _0x447ae3=a46_0x5cf5,_0x58a4eb=_0x51d597||getActiveProfileName()||undefined;if(_0x58a4eb){const _0x2e2871=_0x447ae3(0x18e)+normalizeProfileForEnvVar(_0x58a4eb);if(process[_0x447ae3(0x193)][_0x2e2871])return{'apiKey':process[_0x447ae3(0x193)][_0x2e2871],'source':_0x2e2871+'\x20env\x20var','isDeprecated':![]};const _0x26a3ac=getCachedCredential(_0x56514c,_0x58a4eb);if(_0x26a3ac)return{'apiKey':_0x26a3ac,'source':_0x447ae3(0x1c5)+_0x58a4eb+')','isDeprecated':![]};const _0x1afefa=await getKeychainAPIKey(_0x58a4eb);if(_0x1afefa)return setCachedCredential(_0x1afefa,_0x56514c,_0x58a4eb),{'apiKey':_0x1afefa,'source':_0x447ae3(0x1c5)+_0x58a4eb+')','isDeprecated':![]};}if(process[_0x447ae3(0x193)][_0x447ae3(0x178)])return{'apiKey':process['env'][_0x447ae3(0x178)],'source':_0x447ae3(0x1b9),'isDeprecated':![]};if(!_0x58a4eb){const _0x4436ab=getCachedCredential(_0x56514c,undefined);if(_0x4436ab)return{'apiKey':_0x4436ab,'source':_0x447ae3(0x1ac),'isDeprecated':![]};const _0x28e192=await getKeychainAPIKey(undefined);if(_0x28e192)return setCachedCredential(_0x28e192,_0x56514c,undefined),{'apiKey':_0x28e192,'source':_0x447ae3(0x1ac),'isDeprecated':![]};}if(process[_0x447ae3(0x193)][_0x447ae3(0x1ab)])return{'apiKey':process[_0x447ae3(0x193)][_0x447ae3(0x1ab)],'source':_0x447ae3(0x1a5),'isDeprecated':!![]};const _0xeba120=getLegacyEnvAPIKey(_0x56514c,_0x58a4eb);if(_0xeba120){const _0x1b8cd3=await isKeychainAvailable();if(_0x1b8cd3)try{await saveKeychainAPIKey(_0xeba120,_0x58a4eb),setCachedCredential(_0xeba120,_0x56514c,_0x58a4eb);const _0xc4085b=getConfigFilePath(_0x58a4eb);cleanupLegacyEnvFile(_0xc4085b)&&console[_0x447ae3(0x18a)](a46_0x35519b[_0x447ae3(0x1b3)]('⚠\x20Migrated\x20API\x20key\x20from\x20.env\x20to\x20secure\x20keychain\x20storage'));}catch(_0x296e24){console['warn'](a46_0x35519b[_0x447ae3(0x1b3)](_0x447ae3(0x181)+_0x296e24));}const _0x594bbf=_0x58a4eb?_0x447ae3(0x17d)+_0x58a4eb+')':_0x447ae3(0x1c0);return{'apiKey':_0xeba120,'source':_0x594bbf,'isDeprecated':!![]};}return null;}export async function getAPIKeyAsync(_0x17a37c,_0x116d6c,_0x5b097e=!![]){const _0x3e78ec=a46_0x5cf5,_0x532034=await resolveAPIKeyAsync(_0x17a37c,_0x116d6c);if(!_0x532034)return undefined;if(_0x5b097e&&_0x532034[_0x3e78ec(0x182)]&&_0x532034[_0x3e78ec(0x17a)][_0x3e78ec(0x17e)]('TD_API_KEY')){const _0x3f8161=_0x116d6c||getActiveProfileName()||undefined,_0x2b1e87=_0x3f8161?'TDX_API_KEY_'+normalizeProfileForEnvVar(_0x3f8161):_0x3e78ec(0x1c8);console['warn'](a46_0x35519b['yellow'](_0x3e78ec(0x186)+(_0x3e78ec(0x1a6)+_0x2b1e87+').')));}return _0x532034[_0x3e78ec(0x1ba)];}function getLegacyEnvAPIKey(_0x443819,_0x4360d6){const _0x240406=a46_0x5cf5,_0x5974df=_0x443819['toUpperCase']()['replace'](/-/g,'_'),_0x3a0fe6='TD_API_KEY_'+_0x5974df;if(_0x4360d6){const _0xda49f6=loadProfileEnv(_0x4360d6);if(_0xda49f6){if(_0xda49f6[_0x3a0fe6])return _0xda49f6[_0x3a0fe6];if(_0xda49f6['TD_API_KEY'])return _0xda49f6[_0x240406(0x1ab)];}}const _0x16b3ed=loadUserConfigOnce();if(_0x16b3ed[_0x3a0fe6])return _0x16b3ed[_0x3a0fe6];if(_0x16b3ed[_0x240406(0x1ab)])return _0x16b3ed['TD_API_KEY'];return undefined;}function cleanupLegacyEnvFile(_0x19d60d){const _0x2fb4b3=a46_0x5cf5;if(!existsSync(_0x19d60d))return![];try{const _0x411c13=readFileSync(_0x19d60d,_0x2fb4b3(0x1aa)),_0x3f2209=_0x411c13['split']('\x0a'),_0x4ced75=_0x3f2209['filter'](_0x367652=>{const _0x403f30=_0x2fb4b3,_0x5ea60c=_0x367652[_0x403f30(0x1c2)]();if(!_0x5ea60c||_0x5ea60c[_0x403f30(0x18f)]('#'))return!![];const [_0x338a9b]=_0x5ea60c[_0x403f30(0x1c3)]('=');return!_0x338a9b[_0x403f30(0x18f)]('TD_API_KEY');}),_0x4588ac=_0x4ced75[_0x2fb4b3(0x190)](_0xbfe7c=>{const _0x23c002=_0x2fb4b3,_0x167716=_0xbfe7c[_0x23c002(0x1c2)]();return _0x167716&&!_0x167716['startsWith']('#');});if(!_0x4588ac)return unlinkSync(_0x19d60d),!![];return writeFileSync(_0x19d60d,_0x4ced75['join']('\x0a'),{'mode':0x180}),!![];}catch{return![];}}function loadProfileEnv(_0x5231ce){const _0x5f4fb1=a46_0x5cf5,_0x5dbdd5=a46_0x1e6474[_0x5f4fb1(0x19b)](getConfigDir(),_0x5f4fb1(0x1bc)+_0x5231ce);if(a46_0x321104[_0x5f4fb1(0x1b1)](_0x5dbdd5)){validateSecureFilePermissions(_0x5dbdd5);try{const _0x34b8f0=a46_0x321104[_0x5f4fb1(0x1be)](_0x5dbdd5,_0x5f4fb1(0x1aa));return parseEnvFile(_0x34b8f0);}catch(_0x461d0d){console[_0x5f4fb1(0x18a)](_0x5f4fb1(0x188)+_0x5dbdd5+':\x20'+_0x461d0d);}}const _0x46a339=a46_0x1e6474['join'](getConfigDir(),_0x5f4fb1(0x19e),_0x5231ce,_0x5f4fb1(0x1a1));if(a46_0x321104['existsSync'](_0x46a339)){validateSecureFilePermissions(_0x46a339);try{const _0x583ea9=a46_0x321104[_0x5f4fb1(0x1be)](_0x46a339,_0x5f4fb1(0x1aa));return parseEnvFile(_0x583ea9);}catch(_0x30849e){return console[_0x5f4fb1(0x18a)](_0x5f4fb1(0x188)+_0x46a339+':\x20'+_0x30849e),null;}}return null;}function getActiveProfileName(){const _0x2229d9=a46_0x5cf5,_0x28a787=a46_0x1e6474[_0x2229d9(0x19b)](getConfigDir(),'tdx.json');if(!a46_0x321104[_0x2229d9(0x1b1)](_0x28a787))return null;try{const _0x2f7b1d=a46_0x321104[_0x2229d9(0x1be)](_0x28a787,'utf-8'),_0x2d0bec=JSON[_0x2229d9(0x19f)](_0x2f7b1d);return _0x2d0bec[_0x2229d9(0x1b4)]||null;}catch{return null;}}export function saveAPIKey(_0x1372a2,_0x44b077,_0x1303a7){const _0x40ee12=a46_0x5cf5,_0x3291f0=getConfigDir(),_0x14f903=getConfigFilePath(_0x1303a7);!existsSync(_0x3291f0)&&mkdirSync(_0x3291f0,{'recursive':!![],'mode':0x1c0});let _0xcf04ad={};if(existsSync(_0x14f903))try{const _0x157755=readFileSync(_0x14f903,_0x40ee12(0x1aa));_0xcf04ad=parseEnvFile(_0x157755);}catch(_0x36011c){console['warn']('Warning:\x20Failed\x20to\x20read\x20'+_0x14f903+':',_0x36011c);}const _0x2dd336=_0x1372a2[_0x40ee12(0x1a2)]()[_0x40ee12(0x195)](/-/g,'_');_0xcf04ad[_0x40ee12(0x1b2)+_0x2dd336]=_0x44b077;const _0x3d6a29=Object[_0x40ee12(0x17c)](_0xcf04ad)[_0x40ee12(0x1c1)](([_0x54701b,_0x58c698])=>_0x54701b+'='+_0x58c698);writeFileSync(_0x14f903,_0x3d6a29['join']('\x0a')+'\x0a',{'mode':0x180});}export async function saveAPIKeyAsync(_0x49df56,_0x496603,_0x1e0387){const _0x22c142=a46_0x5cf5;await saveKeychainAPIKey(_0x49df56,_0x1e0387),setCachedCredential(_0x49df56,_0x496603,_0x1e0387);const _0x3a51b8=getConfigFilePath(_0x1e0387);cleanupLegacyEnvFile(_0x3a51b8)&&console[_0x22c142(0x18a)](a46_0x35519b[_0x22c142(0x1b3)](_0x22c142(0x191)));}export function loadConfig(){const _0x402814=a46_0x5cf5,_0x4ce591={'apiKeys':{},'defaultSite':'us01'},_0x26b94f=[_0x402814(0x17f),_0x402814(0x1a3),_0x402814(0x19a),_0x402814(0x1a9),_0x402814(0x185),'dev-us01',_0x402814(0x1af),'stg-us01',_0x402814(0x180),'stg-ap03'];for(const _0x10734b of _0x26b94f){const _0x48ecf3=getAPIKey(_0x10734b);_0x48ecf3&&(_0x4ce591['apiKeys'][_0x10734b]=_0x48ecf3);}return _0x4ce591;}
1
+ (function(_0x903339,_0x167dab){const _0x134b79=a46_0x1a39,_0x4cce8f=_0x903339();while(!![]){try{const _0x1e2d68=-parseInt(_0x134b79(0xdf))/0x1*(-parseInt(_0x134b79(0xc7))/0x2)+-parseInt(_0x134b79(0xce))/0x3+parseInt(_0x134b79(0xfd))/0x4*(-parseInt(_0x134b79(0xe4))/0x5)+-parseInt(_0x134b79(0xe8))/0x6+parseInt(_0x134b79(0xf2))/0x7*(parseInt(_0x134b79(0xe6))/0x8)+-parseInt(_0x134b79(0x10c))/0x9*(-parseInt(_0x134b79(0xd2))/0xa)+-parseInt(_0x134b79(0xe7))/0xb;if(_0x1e2d68===_0x167dab)break;else _0x4cce8f['push'](_0x4cce8f['shift']());}catch(_0x392f6e){_0x4cce8f['push'](_0x4cce8f['shift']());}}}(a46_0x3f81,0xbbadd));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync,unlinkSync}from'fs';import*as a46_0x37d773 from'node:fs';import*as a46_0x584d87 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';import{getKeychainAPIKey,saveKeychainAPIKey,isKeychainAvailable}from'./keychain.js';import{getCachedCredential,setCachedCredential}from'./credential-cache.js';import a46_0x3111ca from'chalk';export function getConfigDir(){const _0x10d218=a46_0x1a39;return process[_0x10d218(0x104)][_0x10d218(0xea)]||join(homedir(),_0x10d218(0xe0),_0x10d218(0xf3));}export function getConfigFile(){const _0x13010a=a46_0x1a39;return join(getConfigDir(),_0x13010a(0xe3));}export function getConfigFilePath(_0x17deea){const _0x131534=a46_0x1a39,_0x2f1b81=getConfigDir();return _0x17deea?a46_0x584d87[_0x131534(0xc2)](_0x2f1b81,_0x131534(0xf7)+_0x17deea):getConfigFile();}export function getCacheDir(){const _0x1cadf5=a46_0x1a39;return process[_0x1cadf5(0x104)][_0x1cadf5(0xde)]||join(homedir(),_0x1cadf5(0xdd),_0x1cadf5(0xf3));}function a46_0x1a39(_0x4c0219,_0x5d206c){_0x4c0219=_0x4c0219-0xbf;const _0x3f81ba=a46_0x3f81();let _0x1a3943=_0x3f81ba[_0x4c0219];return _0x1a3943;}export function getLLMProjectCacheFile(_0x57ffc2){const _0x3e7d6a=a46_0x1a39,_0x53cabd=_0x57ffc2?_0x3e7d6a(0xeb)+_0x57ffc2:'llm_default_project';return join(getCacheDir(),_0x53cabd);}export function readCachedLLMProject(_0x362d81){const _0x5c7510=a46_0x1a39;try{const _0x3ef308=getLLMProjectCacheFile(_0x362d81);if(!existsSync(_0x3ef308))return null;const _0x3dcc1d=readFileSync(_0x3ef308,_0x5c7510(0xec))['trim']();try{const _0x565a1d=JSON[_0x5c7510(0xd8)](_0x3dcc1d);if(_0x565a1d&&typeof _0x565a1d['id']==='string'&&typeof _0x565a1d[_0x5c7510(0xbf)]===_0x5c7510(0x100))return _0x565a1d;}catch{}return null;}catch{return null;}}export function writeCachedLLMProject(_0x6b1151,_0x348e11,_0x2e9a64){const _0x19de0=a46_0x1a39;try{const _0x5df532=getCacheDir(),_0x4d1c2e=getLLMProjectCacheFile(_0x2e9a64);!existsSync(_0x5df532)&&mkdirSync(_0x5df532,{'recursive':!![]});const _0x5b404a={'name':_0x6b1151,'id':_0x348e11};writeFileSync(_0x4d1c2e,JSON[_0x19de0(0xc0)](_0x5b404a),_0x19de0(0xec));}catch{}}export function getLLMAgentCacheFile(_0x53347a){const _0x568779=a46_0x1a39,_0x5ce78e=_0x53347a?_0x568779(0xc8)+_0x53347a:'llm_default_agent';return join(getCacheDir(),_0x5ce78e);}export function readCachedLLMAgent(_0x12cee1){const _0xafc3b9=a46_0x1a39;try{const _0x3930d6=getLLMAgentCacheFile(_0x12cee1);if(!existsSync(_0x3930d6))return null;const _0x40b9a6=readFileSync(_0x3930d6,_0xafc3b9(0xec))[_0xafc3b9(0x106)]();try{const _0x42875d=JSON[_0xafc3b9(0xd8)](_0x40b9a6);if(_0x42875d&&typeof _0x42875d['id']===_0xafc3b9(0x100)&&typeof _0x42875d[_0xafc3b9(0xbf)]===_0xafc3b9(0x100)&&typeof _0x42875d['projectId']===_0xafc3b9(0x100))return _0x42875d;}catch{}return null;}catch{return null;}}export function writeCachedLLMAgent(_0x56f568,_0x1d397f,_0x194672,_0x286a27){const _0x5dfac5=a46_0x1a39;try{const _0x5a9bca=getCacheDir(),_0x5a56be=getLLMAgentCacheFile(_0x286a27);!existsSync(_0x5a9bca)&&mkdirSync(_0x5a9bca,{'recursive':!![]});const _0x367ed7={'name':_0x56f568,'id':_0x1d397f,'projectId':_0x194672};writeFileSync(_0x5a56be,JSON[_0x5dfac5(0xc0)](_0x367ed7),'utf-8');}catch{}}export function clearCachedLLMAgent(_0x3455a5){try{const _0x166a33=getLLMAgentCacheFile(_0x3455a5);existsSync(_0x166a33)&&unlinkSync(_0x166a33);}catch{}}export function getAccountInfoCacheFile(_0x204ff6){const _0x25083b=a46_0x1a39,_0x1335e7=_0x204ff6?_0x25083b(0xcb)+_0x204ff6+'.json':_0x25083b(0xfc);return join(getCacheDir(),_0x1335e7);}export function readCachedAccountInfo(_0x1842a2){const _0x5a713d=a46_0x1a39;try{const _0x22e16b=getAccountInfoCacheFile(_0x1842a2);if(!existsSync(_0x22e16b))return null;const _0x4ef6e2=readFileSync(_0x22e16b,_0x5a713d(0xec))[_0x5a713d(0x106)](),_0x174bb7=JSON[_0x5a713d(0xd8)](_0x4ef6e2);if(_0x174bb7&&typeof _0x174bb7['site']===_0x5a713d(0x100)&&typeof _0x174bb7[_0x5a713d(0xf0)]===_0x5a713d(0xdb))return _0x174bb7;return null;}catch{return null;}}export function writeCachedAccountInfo(_0xc0bc84,_0x4c286a,_0x220c6a){const _0x582a84=a46_0x1a39;try{const _0x12d366=getCacheDir(),_0x964248=getAccountInfoCacheFile(_0x220c6a);!existsSync(_0x12d366)&&mkdirSync(_0x12d366,{'recursive':!![]});const _0x50d2bf={'site':_0xc0bc84,'accountId':_0x4c286a,'cachedAt':new Date()[_0x582a84(0xd3)]()};writeFileSync(_0x964248,JSON['stringify'](_0x50d2bf),'utf-8');}catch{}}export function parseEnvFile(_0x592711){const _0x532594=a46_0x1a39,_0x47eaba={};for(const _0x15a5d4 of _0x592711[_0x532594(0xf6)]('\x0a')){const _0x37dfbd=_0x15a5d4[_0x532594(0x106)]();if(!_0x37dfbd||_0x37dfbd[_0x532594(0xfb)]('#'))continue;const _0x35a225=_0x37dfbd[_0x532594(0xf1)](/^([^=]+)=(.*)$/);if(_0x35a225){const _0x330f29=_0x35a225[0x1][_0x532594(0x106)]();let _0x57f46a=_0x35a225[0x2]['trim']();(_0x57f46a[_0x532594(0xfb)]('\x22')&&_0x57f46a[_0x532594(0x105)]('\x22')||_0x57f46a[_0x532594(0xfb)]('\x27')&&_0x57f46a[_0x532594(0x105)]('\x27'))&&(_0x57f46a=_0x57f46a[_0x532594(0xcd)](0x1,-0x1)),_0x47eaba[_0x330f29]=_0x57f46a;}}return _0x47eaba;}export function readUserConfig(){const _0x4edc5d=a46_0x1a39,_0xc00d5f=getConfigFile();if(!existsSync(_0xc00d5f))return{};try{const _0x182be5=readFileSync(_0xc00d5f,'utf-8');return parseEnvFile(_0x182be5);}catch(_0x69d59c){return console[_0x4edc5d(0x107)](_0x4edc5d(0xef)+_0xc00d5f+':',_0x69d59c),{};}}export function resolveSite(_0x1a5f41){const _0x3898a3=a46_0x1a39,_0x244e25=[_0x3898a3(0xd9),_0x3898a3(0xf4),'eu01',_0x3898a3(0xd1),_0x3898a3(0xf9),'dev-us01','dev-eu01',_0x3898a3(0x10f),_0x3898a3(0xc9),_0x3898a3(0xfa)];if(_0x244e25[_0x3898a3(0xdc)](_0x1a5f41))return _0x1a5f41;if(_0x1a5f41 in SITE_ALIASES)return SITE_ALIASES[_0x1a5f41];return console[_0x3898a3(0x107)](_0x3898a3(0x108)+_0x1a5f41+'\x27,\x20defaulting\x20to\x20us01'),_0x3898a3(0xd9);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}function a46_0x3f81(){const _0x4683c9=['stg-jp01','\x20env\x20var','account_info.','tdx.json','slice','1128075DWRFUw','existsSync','Warning:\x20Failed\x20to\x20load\x20','ap02','170QACaUO','toISOString','replace','TDX_API_KEY_','entries','TD_API_KEY','parse','us01','Warning:\x20Failed\x20to\x20read\x20','number','includes','.cache','TDX_CACHE_DIR','1051MyShZD','.config','TDX_API_KEY','readFileSync','.env','151105WbQJWv','TD_API_KEY_','6712sAvGrF','1073501RyluTU','5076024FNDHCf','toUpperCase','TDX_CONFIG_DIR','llm_default_project.','utf-8','legacy\x20.env\x20file\x20(profile:\x20','⚠\x20Migrated\x20API\x20key\x20from\x20.env\x20to\x20secure\x20keychain\x20storage','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','accountId','match','3983KJFXtE','tdx','jp01','dev-eu01','split','.env.','apiKey','ap03','stg-ap03','startsWith','account_info.json','68GsSqKr','yellow','TDX_API_KEY\x20env\x20var','string','TDX_API_KEY_<PROFILE>','⚠\x20Failed\x20to\x20migrate\x20API\x20key\x20to\x20keychain:\x20','legacy\x20.env\x20file','env','endsWith','trim','warn','Warning:\x20Unknown\x20site\x20\x27','profile','keychain','⚠\x20Cleaned\x20up\x20API\x20keys\x20from\x20legacy\x20.env\x20file','811035YpvGek','keychain\x20(profile:\x20','\x20\x20For\x20profile-specific\x20keys,\x20use\x20TDX_API_KEY_<PROFILE>\x20(e.g.,\x20','stg-us01','name','stringify','apiKeys','join','TD_API_KEY\x20env\x20var\x20(deprecated)','filter','eu01','some','1128ADgVdF','llm_default_agent.'];a46_0x3f81=function(){return _0x4683c9;};return a46_0x3f81();}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x5ca396,_0x1dd942){const _0xd70ad2=a46_0x1a39,_0x161f36=_0x1dd942||getActiveProfileName();if(_0x161f36){const _0x5b5380=_0xd70ad2(0xd5)+normalizeProfileForEnvVar(_0x161f36);if(process[_0xd70ad2(0x104)][_0x5b5380])return process[_0xd70ad2(0x104)][_0x5b5380];}if(process['env']['TDX_API_KEY'])return process['env'][_0xd70ad2(0xe1)];if(process[_0xd70ad2(0x104)]['TD_API_KEY'])return process[_0xd70ad2(0x104)]['TD_API_KEY'];const _0x5e6015=_0x5ca396[_0xd70ad2(0xe9)]()[_0xd70ad2(0xd4)](/-/g,'_'),_0x170352=_0xd70ad2(0xe5)+_0x5e6015;if(_0x161f36){const _0x18c6ba=loadProfileEnv(_0x161f36);if(_0x18c6ba){if(_0x18c6ba[_0x170352])return _0x18c6ba[_0x170352];if(_0x18c6ba['TD_API_KEY'])return _0x18c6ba[_0xd70ad2(0xd7)];}}const _0x372d6e=loadUserConfigOnce();if(_0x372d6e[_0x170352])return _0x372d6e[_0x170352];if(_0x372d6e['TD_API_KEY'])return _0x372d6e[_0xd70ad2(0xd7)];return undefined;}export function normalizeProfileForEnvVar(_0x51c5cd){const _0x1f79c4=a46_0x1a39;return _0x51c5cd[_0x1f79c4(0xe9)]()[_0x1f79c4(0xd4)](/[^A-Z0-9]/g,'_');}export async function resolveAPIKeyAsync(_0x15aedc,_0x4d4862){const _0x7eb041=a46_0x1a39,_0x28a21e=_0x4d4862||getActiveProfileName()||undefined;if(_0x28a21e){const _0x41726a='TDX_API_KEY_'+normalizeProfileForEnvVar(_0x28a21e);if(process[_0x7eb041(0x104)][_0x41726a])return{'apiKey':process[_0x7eb041(0x104)][_0x41726a],'source':_0x41726a+_0x7eb041(0xca),'isDeprecated':![]};const _0x4dc74c=getCachedCredential(_0x15aedc,_0x28a21e);if(_0x4dc74c)return{'apiKey':_0x4dc74c,'source':_0x7eb041(0x10d)+_0x28a21e+')','isDeprecated':![]};const _0xb6098f=await getKeychainAPIKey(_0x28a21e);if(_0xb6098f)return setCachedCredential(_0xb6098f,_0x15aedc,_0x28a21e),{'apiKey':_0xb6098f,'source':_0x7eb041(0x10d)+_0x28a21e+')','isDeprecated':![]};}if(process[_0x7eb041(0x104)][_0x7eb041(0xe1)])return{'apiKey':process[_0x7eb041(0x104)][_0x7eb041(0xe1)],'source':_0x7eb041(0xff),'isDeprecated':![]};if(!_0x28a21e){const _0x3976b4=getCachedCredential(_0x15aedc,undefined);if(_0x3976b4)return{'apiKey':_0x3976b4,'source':_0x7eb041(0x10a),'isDeprecated':![]};const _0x4a43bf=await getKeychainAPIKey(undefined);if(_0x4a43bf)return setCachedCredential(_0x4a43bf,_0x15aedc,undefined),{'apiKey':_0x4a43bf,'source':_0x7eb041(0x10a),'isDeprecated':![]};}if(process[_0x7eb041(0x104)][_0x7eb041(0xd7)])return{'apiKey':process[_0x7eb041(0x104)][_0x7eb041(0xd7)],'source':_0x7eb041(0xc3),'isDeprecated':!![]};const _0x4f761a=getLegacyEnvAPIKey(_0x15aedc,_0x28a21e);if(_0x4f761a){const _0x478791=await isKeychainAvailable();if(_0x478791)try{await saveKeychainAPIKey(_0x4f761a,_0x28a21e),setCachedCredential(_0x4f761a,_0x15aedc,_0x28a21e);const _0x21bde0=getConfigFilePath(_0x28a21e);cleanupLegacyEnvFile(_0x21bde0)&&console[_0x7eb041(0x107)](a46_0x3111ca[_0x7eb041(0xfe)](_0x7eb041(0xee)));}catch(_0x2c4230){console[_0x7eb041(0x107)](a46_0x3111ca[_0x7eb041(0xfe)](_0x7eb041(0x102)+_0x2c4230));}const _0x12f902=_0x28a21e?_0x7eb041(0xed)+_0x28a21e+')':_0x7eb041(0x103);return{'apiKey':_0x4f761a,'source':_0x12f902,'isDeprecated':!![]};}return null;}export async function getAPIKeyAsync(_0x17040a,_0x4557ca,_0x593b2a=!![]){const _0x50579a=a46_0x1a39,_0x4e17bf=await resolveAPIKeyAsync(_0x17040a,_0x4557ca);if(!_0x4e17bf)return undefined;if(_0x593b2a&&_0x4e17bf['isDeprecated']&&_0x4e17bf['source']['includes'](_0x50579a(0xd7))){const _0x2da098=_0x4557ca||getActiveProfileName()||undefined,_0xf1f622=_0x2da098?_0x50579a(0xd5)+normalizeProfileForEnvVar(_0x2da098):_0x50579a(0x101);console['warn'](a46_0x3111ca[_0x50579a(0xfe)]('Warning:\x20Using\x20TD_API_KEY\x20is\x20deprecated.\x20Please\x20use\x20TDX_API_KEY\x20instead.\x0a'+(_0x50579a(0x10e)+_0xf1f622+').')));}return _0x4e17bf[_0x50579a(0xf8)];}function getLegacyEnvAPIKey(_0x18b4cf,_0x1c98b9){const _0x544d18=a46_0x1a39,_0x2847de=_0x18b4cf['toUpperCase']()[_0x544d18(0xd4)](/-/g,'_'),_0x564eb5=_0x544d18(0xe5)+_0x2847de;if(_0x1c98b9){const _0x2680a2=loadProfileEnv(_0x1c98b9);if(_0x2680a2){if(_0x2680a2[_0x564eb5])return _0x2680a2[_0x564eb5];if(_0x2680a2['TD_API_KEY'])return _0x2680a2[_0x544d18(0xd7)];}}const _0x62b082=loadUserConfigOnce();if(_0x62b082[_0x564eb5])return _0x62b082[_0x564eb5];if(_0x62b082[_0x544d18(0xd7)])return _0x62b082[_0x544d18(0xd7)];return undefined;}function cleanupLegacyEnvFile(_0xcebabd){const _0x36ae34=a46_0x1a39;if(!existsSync(_0xcebabd))return![];try{const _0x432297=readFileSync(_0xcebabd,_0x36ae34(0xec)),_0x515b19=_0x432297[_0x36ae34(0xf6)]('\x0a'),_0x284bca=_0x515b19[_0x36ae34(0xc4)](_0x5b3327=>{const _0x39f4f9=_0x36ae34,_0x4c2724=_0x5b3327[_0x39f4f9(0x106)]();if(!_0x4c2724||_0x4c2724[_0x39f4f9(0xfb)]('#'))return!![];const [_0x111ef5]=_0x4c2724[_0x39f4f9(0xf6)]('=');return!_0x111ef5['startsWith'](_0x39f4f9(0xd7));}),_0x4843e2=_0x284bca[_0x36ae34(0xc6)](_0x28fcd7=>{const _0x5aed93=_0x36ae34,_0x22aec1=_0x28fcd7[_0x5aed93(0x106)]();return _0x22aec1&&!_0x22aec1[_0x5aed93(0xfb)]('#');});if(!_0x4843e2)return unlinkSync(_0xcebabd),!![];return writeFileSync(_0xcebabd,_0x284bca[_0x36ae34(0xc2)]('\x0a'),{'mode':0x180}),!![];}catch{return![];}}function loadProfileEnv(_0x28e125){const _0x13c82a=a46_0x1a39,_0x24a31e=a46_0x584d87[_0x13c82a(0xc2)](getConfigDir(),_0x13c82a(0xf7)+_0x28e125);if(a46_0x37d773[_0x13c82a(0xcf)](_0x24a31e)){validateSecureFilePermissions(_0x24a31e);try{const _0x87351f=a46_0x37d773[_0x13c82a(0xe2)](_0x24a31e,_0x13c82a(0xec));return parseEnvFile(_0x87351f);}catch(_0x59556e){console[_0x13c82a(0x107)](_0x13c82a(0xd0)+_0x24a31e+':\x20'+_0x59556e);}}const _0x528a9c=a46_0x584d87['join'](getConfigDir(),'profiles',_0x28e125,'.env');if(a46_0x37d773[_0x13c82a(0xcf)](_0x528a9c)){validateSecureFilePermissions(_0x528a9c);try{const _0x50b4ad=a46_0x37d773[_0x13c82a(0xe2)](_0x528a9c,_0x13c82a(0xec));return parseEnvFile(_0x50b4ad);}catch(_0x3053a4){return console['warn'](_0x13c82a(0xd0)+_0x528a9c+':\x20'+_0x3053a4),null;}}return null;}function getActiveProfileName(){const _0x3b1734=a46_0x1a39,_0x54556e=a46_0x584d87[_0x3b1734(0xc2)](getConfigDir(),_0x3b1734(0xcc));if(!a46_0x37d773[_0x3b1734(0xcf)](_0x54556e))return null;try{const _0x353531=a46_0x37d773['readFileSync'](_0x54556e,_0x3b1734(0xec)),_0x484dd3=JSON[_0x3b1734(0xd8)](_0x353531);return _0x484dd3[_0x3b1734(0x109)]||null;}catch{return null;}}export function saveAPIKey(_0x2d52d7,_0x5ede16,_0xb1fff){const _0x2d9752=a46_0x1a39,_0x1d58a2=getConfigDir(),_0x486c85=getConfigFilePath(_0xb1fff);!existsSync(_0x1d58a2)&&mkdirSync(_0x1d58a2,{'recursive':!![],'mode':0x1c0});let _0x96ec0c={};if(existsSync(_0x486c85))try{const _0x8af149=readFileSync(_0x486c85,_0x2d9752(0xec));_0x96ec0c=parseEnvFile(_0x8af149);}catch(_0x5ad7cc){console[_0x2d9752(0x107)](_0x2d9752(0xda)+_0x486c85+':',_0x5ad7cc);}const _0x17820b=_0x2d52d7['toUpperCase']()[_0x2d9752(0xd4)](/-/g,'_');_0x96ec0c[_0x2d9752(0xe5)+_0x17820b]=_0x5ede16;const _0x19867f=Object[_0x2d9752(0xd6)](_0x96ec0c)['map'](([_0xf1fd5a,_0x29d3f5])=>_0xf1fd5a+'='+_0x29d3f5);writeFileSync(_0x486c85,_0x19867f['join']('\x0a')+'\x0a',{'mode':0x180});}export async function saveAPIKeyAsync(_0x49f232,_0x57014f,_0x50550a){const _0x319e57=a46_0x1a39;await saveKeychainAPIKey(_0x49f232,_0x50550a),setCachedCredential(_0x49f232,_0x57014f,_0x50550a);const _0x4ee2d4=getConfigFilePath(_0x50550a);cleanupLegacyEnvFile(_0x4ee2d4)&&console[_0x319e57(0x107)](a46_0x3111ca[_0x319e57(0xfe)](_0x319e57(0x10b)));}export function loadConfig(){const _0x22e100=a46_0x1a39,_0x290cf3={'apiKeys':{},'defaultSite':'us01'},_0x23ce64=[_0x22e100(0xd9),_0x22e100(0xf4),_0x22e100(0xc5),'ap02',_0x22e100(0xf9),'dev-us01',_0x22e100(0xf5),_0x22e100(0x10f),'stg-jp01',_0x22e100(0xfa)];for(const _0xeb023 of _0x23ce64){const _0x177af2=getAPIKey(_0xeb023);_0x177af2&&(_0x290cf3[_0x22e100(0xc1)][_0xeb023]=_0x177af2);}return _0x290cf3;}
@@ -1 +1 @@
1
- (function(_0x555d5d,_0x113ba9){const _0x16fba6=a47_0x1d0c,_0x42eee9=_0x555d5d();while(!![]){try{const _0x38b19f=parseInt(_0x16fba6(0x1cf))/0x1+parseInt(_0x16fba6(0x1d5))/0x2+parseInt(_0x16fba6(0x1d7))/0x3+parseInt(_0x16fba6(0x1ce))/0x4+-parseInt(_0x16fba6(0x1d0))/0x5+parseInt(_0x16fba6(0x1d8))/0x6+-parseInt(_0x16fba6(0x1d3))/0x7;if(_0x38b19f===_0x113ba9)break;else _0x42eee9['push'](_0x42eee9['shift']());}catch(_0x1d5492){_0x42eee9['push'](_0x42eee9['shift']());}}}(a47_0x3d84,0xb145c));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join}from'path';import{getCacheDir}from'./config.js';function getCacheFilePath(_0x3e9d31){const _0x48ff0e=a47_0x1d0c,_0x3e407b=_0x3e9d31||'default';return join(getCacheDir(),_0x48ff0e(0x1d6)+_0x3e407b+_0x48ff0e(0x1d1));}function a47_0x1d0c(_0x2ee19f,_0x4cc1eb){_0x2ee19f=_0x2ee19f-0x1cd;const _0x3d8427=a47_0x3d84();let _0x1d0cdc=_0x3d8427[_0x2ee19f];return _0x1d0cdc;}export function loadCachedConnections(_0x5b13f5){const _0x8596da=getCacheFilePath(_0x5b13f5);if(!existsSync(_0x8596da))return null;try{const _0x540232=readFileSync(_0x8596da,'utf-8'),_0x73431d=JSON['parse'](_0x540232);return _0x73431d['connections'];}catch{return null;}}function a47_0x3d84(){const _0x2332ee=['stringify','2936024HJoNnF','179143GWNqsJ','5022690xnjJmX','.json','utf-8','14209993Bqrevm','now','2774918YmckNJ','connections-','2717895JDoKvW','3324432PKipMn'];a47_0x3d84=function(){return _0x2332ee;};return a47_0x3d84();}export function saveCachedConnections(_0x53cb63,_0x176678){const _0x16dedf=a47_0x1d0c,_0x333351=getCacheDir();!existsSync(_0x333351)&&mkdirSync(_0x333351,{'recursive':!![]});const _0xcb80d=getCacheFilePath(_0x53cb63),_0x243359={'connections':_0x176678,'cachedAt':Date[_0x16dedf(0x1d4)]()};writeFileSync(_0xcb80d,JSON[_0x16dedf(0x1cd)](_0x243359,null,0x2),_0x16dedf(0x1d2));}export function clearConnectionCache(_0x3fa2b6){const _0x10e599=getCacheFilePath(_0x3fa2b6);if(existsSync(_0x10e599))try{unlinkSync(_0x10e599);}catch{}}
1
+ (function(_0xdf601,_0x359f62){const _0x169fb1=a47_0x2f5f,_0x294bcd=_0xdf601();while(!![]){try{const _0x4915b0=parseInt(_0x169fb1(0x1c6))/0x1+parseInt(_0x169fb1(0x1c8))/0x2*(-parseInt(_0x169fb1(0x1c1))/0x3)+-parseInt(_0x169fb1(0x1cb))/0x4+-parseInt(_0x169fb1(0x1c9))/0x5+parseInt(_0x169fb1(0x1c7))/0x6+-parseInt(_0x169fb1(0x1ce))/0x7+parseInt(_0x169fb1(0x1cd))/0x8;if(_0x4915b0===_0x359f62)break;else _0x294bcd['push'](_0x294bcd['shift']());}catch(_0xf35d9f){_0x294bcd['push'](_0x294bcd['shift']());}}}(a47_0x5628,0x2b61a));function a47_0x5628(){const _0x518aa3=['parse','12UCdLUu','stringify','default','connections-','utf-8','39447pZzAtO','1422240jsxguU','52594aKKWCi','1648745ZgBeZq','.json','449476jzqTGq','now','5236344iydlJC','1442238myWLQT','connections'];a47_0x5628=function(){return _0x518aa3;};return a47_0x5628();}import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join}from'path';import{getCacheDir}from'./config.js';function getCacheFilePath(_0x234c36){const _0x1a834a=a47_0x2f5f,_0x479610=_0x234c36||_0x1a834a(0x1c3);return join(getCacheDir(),_0x1a834a(0x1c4)+_0x479610+_0x1a834a(0x1ca));}function a47_0x2f5f(_0x288ba1,_0x2057f4){_0x288ba1=_0x288ba1-0x1bf;const _0x5628f4=a47_0x5628();let _0x2f5f20=_0x5628f4[_0x288ba1];return _0x2f5f20;}export function loadCachedConnections(_0x388fe0){const _0x1124fe=a47_0x2f5f,_0x35a7e9=getCacheFilePath(_0x388fe0);if(!existsSync(_0x35a7e9))return null;try{const _0x473614=readFileSync(_0x35a7e9,_0x1124fe(0x1c5)),_0x5ada23=JSON[_0x1124fe(0x1c0)](_0x473614);return _0x5ada23[_0x1124fe(0x1bf)];}catch{return null;}}export function saveCachedConnections(_0x472292,_0x1049a1){const _0x3e60fa=a47_0x2f5f,_0x43561d=getCacheDir();!existsSync(_0x43561d)&&mkdirSync(_0x43561d,{'recursive':!![]});const _0x5a8495=getCacheFilePath(_0x472292),_0x369402={'connections':_0x1049a1,'cachedAt':Date[_0x3e60fa(0x1cc)]()};writeFileSync(_0x5a8495,JSON[_0x3e60fa(0x1c2)](_0x369402,null,0x2),_0x3e60fa(0x1c5));}export function clearConnectionCache(_0x132a81){const _0x127ba6=getCacheFilePath(_0x132a81);if(existsSync(_0x127ba6))try{unlinkSync(_0x127ba6);}catch{}}
@@ -1 +1 @@
1
- (function(_0x8ccb09,_0x32a1d3){const _0x31e116=a48_0x3297,_0x46ecae=_0x8ccb09();while(!![]){try{const _0x54bf83=parseInt(_0x31e116(0x7e))/0x1*(parseInt(_0x31e116(0x73))/0x2)+-parseInt(_0x31e116(0x74))/0x3*(-parseInt(_0x31e116(0x7f))/0x4)+parseInt(_0x31e116(0x71))/0x5*(-parseInt(_0x31e116(0x79))/0x6)+parseInt(_0x31e116(0x77))/0x7+-parseInt(_0x31e116(0x75))/0x8+parseInt(_0x31e116(0x76))/0x9*(parseInt(_0x31e116(0x7d))/0xa)+-parseInt(_0x31e116(0x7c))/0xb*(parseInt(_0x31e116(0x7b))/0xc);if(_0x54bf83===_0x32a1d3)break;else _0x46ecae['push'](_0x46ecae['shift']());}catch(_0xff30cd){_0x46ecae['push'](_0x46ecae['shift']());}}}(a48_0x2c1d,0x1a569));const cache=new Map(),CACHE_TTL_MS=0x5*0x3c*0x3e8;function getCacheKey(_0xe1cd9a,_0x5dbdc7){const _0x433d72=a48_0x3297,_0x45233f=_0xe1cd9a||_0x433d72(0x80),_0x14b5a2=_0x5dbdc7||'__default_profile__';return _0x45233f+':'+_0x14b5a2;}export function getCachedCredential(_0x20238d,_0x25486d){const _0x34a9d3=a48_0x3297,_0x3e24a9=getCacheKey(_0x20238d,_0x25486d),_0x47577a=cache['get'](_0x3e24a9);if(!_0x47577a)return null;if(Date[_0x34a9d3(0x70)]()-_0x47577a[_0x34a9d3(0x7a)]>CACHE_TTL_MS)return cache['delete'](_0x3e24a9),null;return _0x47577a['apiKey'];}function a48_0x2c1d(){const _0x47fc6c=['30foZYVF','loadedAt','12VgHxEV','2272501oKYQMO','27250vRRmIs','75269uguQZB','28VRNRCW','__default_site__','now','16495xUtTng','clear','4rAGOKp','309lXMVCs','864008RptCYz','639XviAMt','659638BfpKfX','set'];a48_0x2c1d=function(){return _0x47fc6c;};return a48_0x2c1d();}function a48_0x3297(_0x3302a8,_0xe27591){_0x3302a8=_0x3302a8-0x70;const _0x2c1db8=a48_0x2c1d();let _0x3297e3=_0x2c1db8[_0x3302a8];return _0x3297e3;}export function setCachedCredential(_0x2c8860,_0x5bd66c,_0x423af5){const _0x198119=a48_0x3297,_0x2da88a=getCacheKey(_0x5bd66c,_0x423af5);cache[_0x198119(0x78)](_0x2da88a,{'apiKey':_0x2c8860,'loadedAt':Date[_0x198119(0x70)]()});}export function clearCredentialCache(){const _0x259ab0=a48_0x3297;cache[_0x259ab0(0x72)]();}export function clearCachedCredential(_0x1abc23,_0x27a1c6){const _0x604758=getCacheKey(_0x1abc23,_0x27a1c6);cache['delete'](_0x604758);}
1
+ (function(_0x289304,_0x5c3839){const _0x52949d=a48_0x1e8c,_0x56700a=_0x289304();while(!![]){try{const _0x154899=parseInt(_0x52949d(0xc5))/0x1*(-parseInt(_0x52949d(0xc7))/0x2)+-parseInt(_0x52949d(0xcf))/0x3*(parseInt(_0x52949d(0xc2))/0x4)+parseInt(_0x52949d(0xc8))/0x5+-parseInt(_0x52949d(0xce))/0x6*(-parseInt(_0x52949d(0xcb))/0x7)+-parseInt(_0x52949d(0xcd))/0x8*(parseInt(_0x52949d(0xbe))/0x9)+parseInt(_0x52949d(0xc0))/0xa*(parseInt(_0x52949d(0xc4))/0xb)+parseInt(_0x52949d(0xc9))/0xc*(-parseInt(_0x52949d(0xbf))/0xd);if(_0x154899===_0x5c3839)break;else _0x56700a['push'](_0x56700a['shift']());}catch(_0x3b50f3){_0x56700a['push'](_0x56700a['shift']());}}}(a48_0x5bd0,0x53b6d));const cache=new Map(),CACHE_TTL_MS=0x5*0x3c*0x3e8;function getCacheKey(_0x22cab9,_0x5527bf){const _0x58eb2b=a48_0x1e8c,_0x1c7759=_0x22cab9||_0x58eb2b(0xc6),_0x13d217=_0x5527bf||_0x58eb2b(0xca);return _0x1c7759+':'+_0x13d217;}function a48_0x1e8c(_0x5bb2af,_0x5bd2c9){_0x5bb2af=_0x5bb2af-0xbc;const _0x5bd003=a48_0x5bd0();let _0x1e8cd=_0x5bd003[_0x5bb2af];return _0x1e8cd;}export function getCachedCredential(_0x1e8f02,_0xca9eaf){const _0x246f76=a48_0x1e8c,_0x3e99b7=getCacheKey(_0x1e8f02,_0xca9eaf),_0x1a3a6c=cache[_0x246f76(0xbd)](_0x3e99b7);if(!_0x1a3a6c)return null;if(Date[_0x246f76(0xcc)]()-_0x1a3a6c['loadedAt']>CACHE_TTL_MS)return cache[_0x246f76(0xbc)](_0x3e99b7),null;return _0x1a3a6c['apiKey'];}function a48_0x5bd0(){const _0x563147=['288oIiMes','30YAFLGJ','6mMqJIH','delete','get','108765iWhVxt','90350ysKpFP','5872310uMpzSQ','clear','358572MRlecy','set','11agvpIu','1ojNLrw','__default_site__','418534CimMgk','1369875Oeocdr','588khyLZC','__default_profile__','904190UAQWRW','now'];a48_0x5bd0=function(){return _0x563147;};return a48_0x5bd0();}export function setCachedCredential(_0x2fbd55,_0x46f763,_0x596a02){const _0xba8a47=a48_0x1e8c,_0xf72e9b=getCacheKey(_0x46f763,_0x596a02);cache[_0xba8a47(0xc3)](_0xf72e9b,{'apiKey':_0x2fbd55,'loadedAt':Date['now']()});}export function clearCredentialCache(){const _0x479522=a48_0x1e8c;cache[_0x479522(0xc1)]();}export function clearCachedCredential(_0x3898a5,_0xb02d1a){const _0x12b693=a48_0x1e8c,_0x85b20a=getCacheKey(_0x3898a5,_0xb02d1a);cache[_0x12b693(0xbc)](_0x85b20a);}