@treasuredata/tdx 0.1.16 → 0.1.17

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 (85) hide show
  1. package/README.md +10 -0
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client/cdp-client.js +1 -1
  5. package/dist/client/http-client.js +1 -1
  6. package/dist/client/llm-client.js +1 -1
  7. package/dist/client/rate-limiter.js +1 -1
  8. package/dist/client/td-client.js +1 -1
  9. package/dist/client/trino-client.js +1 -1
  10. package/dist/client/workflow-client.js +1 -1
  11. package/dist/commands/activations.js +1 -1
  12. package/dist/commands/api-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-command.js.map +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/context-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/job-command.js +1 -1
  21. package/dist/commands/llm-command.js +1 -1
  22. package/dist/commands/llm-proxy.js +1 -1
  23. package/dist/commands/parent-segment-command.js +1 -1
  24. package/dist/commands/profiles-command.js +1 -1
  25. package/dist/commands/query-command.js +1 -1
  26. package/dist/commands/segment-command.js +1 -1
  27. package/dist/commands/segment-create-command.js +1 -1
  28. package/dist/commands/segment-fields-command.js +1 -1
  29. package/dist/commands/segment-pwd-command.js +1 -1
  30. package/dist/commands/segment-update-command.js +1 -1
  31. package/dist/commands/segment-use-command.js +1 -1
  32. package/dist/commands/segments.js +1 -1
  33. package/dist/commands/show.js +1 -1
  34. package/dist/commands/tables.js +1 -1
  35. package/dist/commands/use-command.js +1 -1
  36. package/dist/commands/workflow-command.js +1 -1
  37. package/dist/core/auth.js +1 -1
  38. package/dist/core/config.js +1 -1
  39. package/dist/core/global-context.js +1 -1
  40. package/dist/core/profile.js +1 -1
  41. package/dist/core/project-config.js +1 -1
  42. package/dist/core/session.js +1 -1
  43. package/dist/index.js +1 -1
  44. package/dist/proxy/anthropic-adapter.d.ts +20 -2
  45. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  46. package/dist/proxy/anthropic-adapter.js +1 -1
  47. package/dist/proxy/anthropic-adapter.js.map +1 -1
  48. package/dist/proxy/server.d.ts.map +1 -1
  49. package/dist/proxy/server.js +1 -1
  50. package/dist/proxy/server.js.map +1 -1
  51. package/dist/sdk/api.js +1 -1
  52. package/dist/sdk/database.js +1 -1
  53. package/dist/sdk/errors.js +1 -1
  54. package/dist/sdk/index.js +1 -1
  55. package/dist/sdk/job.js +1 -1
  56. package/dist/sdk/llm.js +1 -1
  57. package/dist/sdk/query.js +1 -1
  58. package/dist/sdk/segment.js +1 -1
  59. package/dist/sdk/table.js +1 -1
  60. package/dist/sdk/workflow.js +1 -1
  61. package/dist/types/endpoints.js +1 -1
  62. package/dist/types/index.js +1 -1
  63. package/dist/utils/agent-ref-parser.js +1 -1
  64. package/dist/utils/chat-cache.js +1 -1
  65. package/dist/utils/colors.js +1 -1
  66. package/dist/utils/command-output.js +1 -1
  67. package/dist/utils/file-permissions.js +1 -1
  68. package/dist/utils/format-detector.js +1 -1
  69. package/dist/utils/formatters.js +1 -1
  70. package/dist/utils/json-loader.js +1 -1
  71. package/dist/utils/model-aliases.js +1 -1
  72. package/dist/utils/option-validation.js +1 -1
  73. package/dist/utils/port.js +1 -1
  74. package/dist/utils/process.js +1 -1
  75. package/dist/utils/prompt.js +1 -1
  76. package/dist/utils/segment-path-parser.js +1 -1
  77. package/dist/utils/segment-ref-parser.js +1 -1
  78. package/dist/utils/spinner.js +1 -1
  79. package/dist/utils/sql-parser.js +1 -1
  80. package/dist/utils/sse-parser.js +1 -1
  81. package/dist/utils/string-utils.js +1 -1
  82. package/dist/utils/table-ref-parser.js +1 -1
  83. package/dist/utils/tree-formatter.js +1 -1
  84. package/dist/utils/workflow-utils.js +1 -1
  85. package/package.json +1 -1
@@ -1 +1 @@
1
- const a49_0x100cb7=a49_0x3020;(function(_0x401043,_0x31dd16){const _0x5f4093=a49_0x3020,_0x550a03=_0x401043();while(!![]){try{const _0x246236=-parseInt(_0x5f4093(0x133))/0x1*(-parseInt(_0x5f4093(0x14b))/0x2)+-parseInt(_0x5f4093(0x17a))/0x3*(-parseInt(_0x5f4093(0x150))/0x4)+-parseInt(_0x5f4093(0x176))/0x5*(parseInt(_0x5f4093(0x173))/0x6)+-parseInt(_0x5f4093(0x16d))/0x7+-parseInt(_0x5f4093(0x15b))/0x8+-parseInt(_0x5f4093(0x136))/0x9*(-parseInt(_0x5f4093(0x167))/0xa)+parseInt(_0x5f4093(0x180))/0xb;if(_0x246236===_0x31dd16)break;else _0x550a03['push'](_0x550a03['shift']());}catch(_0x240883){_0x550a03['push'](_0x550a03['shift']());}}}(a49_0x4363,0x99bc9));function a49_0x3020(_0x409e4b,_0x36e5b5){const _0x4363aa=a49_0x4363();return a49_0x3020=function(_0x3020fd,_0x121672){_0x3020fd=_0x3020fd-0x131;let _0x406216=_0x4363aa[_0x3020fd];return _0x406216;},a49_0x3020(_0x409e4b,_0x36e5b5);}function a49_0x4363(){const _0xd163ff=['listSegmentFolders','rootFolderId','segments','listFields',')\x20exceeded','updateParent','\x27\x20not\x20found\x20in\x20','description','updateSegmentById','662260USirGr','type','listParentSegments','createSegmentFolder','listRecursive','getParentFull','6544713eOvWyV','createParentSegment','join','resolveParentId','client','push','121848QtUcYr','find','isAbsolute','290kxTKDj','listActivations','NOT_FOUND','resolveParentIdOrName','280863lihaGk','resolveSegmentId','detectResourceType','listFolders','Child\x20segment\x20not\x20found:\x20','parentFolderId','9679758AuhVGo','Segment\x20\x27','parentTableName','getSegmentFolder','Resource\x20\x27','getSegmentSQL','some','listSegments','schema','updateParentSegment','length','getSegment','2oTlqrr','behaviors','Folder\x20not\x20found:\x20','99RHLIOV','listUnified','filter','Folder\x20\x27','\x27\x20not\x20found\x20in\x20path','detectResourceTypeInFolder','getParentSegmentFull','name','traversePath','catch','resolveFolderId','\x27\x20not\x20found','parent\x20segment','isArray','all','ambiguous','createSegment','test','updateSegment','INVALID_ARGUMENT','createdAt','301998ECflrT','getFolder','segmentFolderId','Path\x20must\x20be\x20absolute\x20(cannot\x20start\x20with\x20.\x20or\x20..)','behavior','44PpgQFH','updatedAt','parentDatabaseName','parentColumn','getParentSegmentSQL','Maximum\x20recursion\x20depth\x20(','getParentSegment','segment','attributes','folder','attribute','1582120RpEjaV','then','createFolder'];a49_0x4363=function(){return _0xd163ff;};return a49_0x4363();}import{SDKError,ErrorCode}from'./errors.js';export class SegmentAPI{[a49_0x100cb7(0x171)];constructor(_0x34c6e9){const _0x91fef1=a49_0x100cb7;this[_0x91fef1(0x171)]=_0x34c6e9;}async['listParents'](){const _0x855a36=a49_0x100cb7;return await this[_0x855a36(0x171)][_0x855a36(0x169)]();}async['getParent'](_0x3fe5e5){const _0x286f33=a49_0x100cb7;return await this['client'][_0x286f33(0x156)](_0x3fe5e5);}async['listSegments'](_0x52bc17){const _0x144805=a49_0x100cb7;return await this[_0x144805(0x171)]['listSegments'](_0x52bc17);}async['getSegment'](_0x5850e7,_0x1f00ea){const _0x5de584=a49_0x100cb7;return await this[_0x5de584(0x171)][_0x5de584(0x132)](_0x5850e7,_0x1f00ea);}async[a49_0x100cb7(0x17d)](_0x131b04){const _0xe66439=a49_0x100cb7;return await this['client'][_0xe66439(0x15e)](_0x131b04);}async[a49_0x100cb7(0x14c)](_0x41579a){const _0x2e3b3f=a49_0x100cb7;return await this['client'][_0x2e3b3f(0x183)](_0x41579a);}async[a49_0x100cb7(0x177)](_0xdb2782,_0x2b7908){const _0x635154=a49_0x100cb7;return await this[_0x635154(0x171)][_0x635154(0x177)](_0xdb2782,_0x2b7908);}async['getParentSQL'](_0x6e734){const _0x130a6b=a49_0x100cb7;return await this['client'][_0x130a6b(0x154)](_0x6e734);}async[a49_0x100cb7(0x185)](_0x3a676e,_0x4629be){const _0x1c772a=a49_0x100cb7;return await this[_0x1c772a(0x171)]['getSegmentSQL'](_0x3a676e,_0x4629be);}async[a49_0x100cb7(0x170)](_0x5502cf){const _0x2840fd=a49_0x100cb7,_0x33ac77=await this['listParents'](),_0x1af58d=_0x33ac77[_0x2840fd(0x174)](_0x31bd=>_0x31bd[_0x2840fd(0x158)]['name']===_0x5502cf);if(!_0x1af58d)throw new SDKError(ErrorCode[_0x2840fd(0x178)],'Parent\x20segment\x20not\x20found:\x20'+_0x5502cf);return _0x1af58d['id'];}async['resolveSegmentId'](_0x3ddb47,_0x264d85){const _0x827cb0=a49_0x100cb7,_0x1f2b8d=await this[_0x827cb0(0x187)](_0x3ddb47),_0x1a883c=_0x1f2b8d[_0x827cb0(0x174)](_0x3f3e03=>_0x3f3e03[_0x827cb0(0x13d)]===_0x264d85);if(!_0x1a883c)throw new SDKError(ErrorCode['NOT_FOUND'],_0x827cb0(0x17e)+_0x264d85+'\x20in\x20parent\x20'+_0x3ddb47);return _0x1a883c['id'];}async['resolveFolderId'](_0x4914c6,_0x21605c){const _0x135d40=a49_0x100cb7,_0x451b63=await this[_0x135d40(0x17d)](_0x4914c6),_0x47f812=_0x451b63[_0x135d40(0x174)](_0x1ad7b5=>_0x1ad7b5['name']===_0x21605c);if(!_0x47f812)throw new SDKError(ErrorCode[_0x135d40(0x178)],_0x135d40(0x135)+_0x21605c+'\x20in\x20parent\x20'+_0x4914c6);return _0x47f812['id'];}async[a49_0x100cb7(0x161)](_0x2d8602){const _0x4b299a=a49_0x100cb7,_0x50dea5=await this[_0x4b299a(0x179)](_0x2d8602),_0x21e932=await this[_0x4b299a(0x171)][_0x4b299a(0x13c)](_0x50dea5),_0x41cc8b=[];if(_0x21e932['attributes']&&Array['isArray'](_0x21e932[_0x4b299a(0x158)]))for(const _0x5754ee of _0x21e932['attributes']){const _0x1c1c99=_0x5754ee;_0x1c1c99['name']&&_0x1c1c99['type']&&_0x41cc8b[_0x4b299a(0x172)]({'name':_0x1c1c99[_0x4b299a(0x13d)],'type':_0x1c1c99[_0x4b299a(0x168)],'source':_0x4b299a(0x15a),'parentDatabaseName':_0x1c1c99[_0x4b299a(0x152)],'parentTableName':_0x1c1c99[_0x4b299a(0x182)],'parentColumn':_0x1c1c99[_0x4b299a(0x153)]});}if(_0x21e932[_0x4b299a(0x134)]&&Array[_0x4b299a(0x143)](_0x21e932['behaviors']))for(const _0x4b0a14 of _0x21e932[_0x4b299a(0x134)]){const _0x53ef33=_0x4b0a14,_0x35ad09=_0x53ef33[_0x4b299a(0x13d)];if(_0x35ad09&&_0x53ef33[_0x4b299a(0x188)]&&Array['isArray'](_0x53ef33['schema']))for(const _0x263e4a of _0x53ef33[_0x4b299a(0x188)]){_0x263e4a[_0x4b299a(0x13d)]&&_0x263e4a[_0x4b299a(0x168)]&&_0x41cc8b[_0x4b299a(0x172)]({'name':_0x35ad09+'.'+_0x263e4a[_0x4b299a(0x13d)],'type':_0x263e4a['type'],'source':_0x4b299a(0x14f),'behaviorName':_0x35ad09,'parentDatabaseName':_0x53ef33[_0x4b299a(0x152)],'parentTableName':_0x53ef33['parentTableName'],'parentColumn':_0x263e4a[_0x4b299a(0x153)]});}}return _0x41cc8b;}async['createParent'](_0x29a8fb){const _0xbea210=a49_0x100cb7;return await this[_0xbea210(0x171)][_0xbea210(0x16e)](_0x29a8fb);}async[a49_0x100cb7(0x163)](_0x527318,_0x5984d2){const _0x4de4ac=a49_0x100cb7,_0x3b57a9=await this[_0x4de4ac(0x179)](_0x527318);return await this[_0x4de4ac(0x171)][_0x4de4ac(0x189)](_0x3b57a9,_0x5984d2);}async[a49_0x100cb7(0x16c)](_0x364a5e){const _0x372dc5=a49_0x100cb7,_0x113b50=await this[_0x372dc5(0x179)](_0x364a5e);return await this[_0x372dc5(0x171)][_0x372dc5(0x13c)](_0x113b50);}async[a49_0x100cb7(0x146)](_0x21117d,_0x491db9){const _0x3be43f=a49_0x100cb7;return await this[_0x3be43f(0x171)][_0x3be43f(0x146)](_0x21117d,_0x491db9);}async[a49_0x100cb7(0x166)](_0x2564a4,_0x318291,_0x198356){const _0x3a3457=a49_0x100cb7;return await this[_0x3a3457(0x171)][_0x3a3457(0x148)](_0x2564a4,_0x318291,_0x198356);}async[a49_0x100cb7(0x15d)](_0x298500,_0x4bbb46){const _0x2f3fcf=a49_0x100cb7,_0x3799e5=await this[_0x2f3fcf(0x179)](_0x298500);return await this['client'][_0x2f3fcf(0x16a)](_0x3799e5,_0x4bbb46);}async[a49_0x100cb7(0x179)](_0x28fba3){const _0xa8a59=a49_0x100cb7;if(/^\d+$/[_0xa8a59(0x147)](_0x28fba3))return _0x28fba3;return await this[_0xa8a59(0x170)](_0x28fba3);}async[a49_0x100cb7(0x17c)](_0x423c7f,_0x54ba98){const _0x29050d=a49_0x100cb7,[_0x2836fa,_0x5c00cb]=await Promise['all']([this[_0x29050d(0x140)](_0x423c7f,_0x54ba98)['then'](()=>!![])[_0x29050d(0x13f)](()=>![]),this[_0x29050d(0x17b)](_0x423c7f,_0x54ba98)[_0x29050d(0x15c)](()=>!![])[_0x29050d(0x13f)](()=>![])]);if(_0x2836fa&&_0x5c00cb)return _0x29050d(0x145);else{if(_0x2836fa)return _0x29050d(0x159);else{if(_0x5c00cb)return _0x29050d(0x157);}}throw new SDKError(ErrorCode['NOT_FOUND'],'Resource\x20\x27'+_0x54ba98+'\x27\x20not\x20found\x20in\x20parent\x20segment');}async[a49_0x100cb7(0x13b)](_0x492865,_0x28cb2d,_0x1c8a23){const _0x75bc19=a49_0x100cb7,[_0x12eb82,_0x290bb4]=await Promise[_0x75bc19(0x144)]([this[_0x75bc19(0x17d)](_0x492865),this[_0x75bc19(0x187)](_0x492865)]),_0x53340d=_0x1c8a23?_0x12eb82[_0x75bc19(0x138)](_0x3751bd=>_0x3751bd[_0x75bc19(0x17f)]===_0x1c8a23):_0x12eb82[_0x75bc19(0x138)](_0x2ec6ce=>!_0x2ec6ce[_0x75bc19(0x17f)]),_0x458f91=_0x1c8a23?_0x290bb4[_0x75bc19(0x138)](_0x5c9a65=>_0x5c9a65['segmentFolderId']===_0x1c8a23):_0x290bb4[_0x75bc19(0x138)](_0x503f68=>!_0x503f68[_0x75bc19(0x14d)]),_0x7e22ac=_0x53340d[_0x75bc19(0x186)](_0x5a4b57=>_0x5a4b57['name']===_0x28cb2d),_0x3d80f4=_0x458f91['some'](_0x276239=>_0x276239[_0x75bc19(0x13d)]===_0x28cb2d);if(_0x7e22ac&&_0x3d80f4)return'ambiguous';else{if(_0x7e22ac)return _0x75bc19(0x159);else{if(_0x3d80f4)return _0x75bc19(0x157);}}throw new SDKError(ErrorCode[_0x75bc19(0x178)],_0x75bc19(0x184)+_0x28cb2d+_0x75bc19(0x164)+(_0x1c8a23?'folder':_0x75bc19(0x142)));}async['traversePath'](_0x45fa41){const _0x379f2d=a49_0x100cb7;if(_0x45fa41[_0x379f2d(0x131)]===0x0)throw new SDKError(ErrorCode[_0x379f2d(0x149)],'Path\x20cannot\x20be\x20empty');const _0x507a65=_0x45fa41[0x0],_0x165641=await this[_0x379f2d(0x170)](_0x507a65);if(_0x45fa41[_0x379f2d(0x131)]===0x1)return{'parentId':_0x165641,'parentName':_0x507a65,'type':'parent','fullPath':_0x507a65};const _0x568bb7=await this['getParentFull'](_0x165641),_0x20ab26=_0x568bb7['rootFolderId'],_0x6d1eb1=[];let _0x1dbaa5=_0x20ab26;for(let _0x4e1b2d=0x1;_0x4e1b2d<_0x45fa41[_0x379f2d(0x131)]-0x1;_0x4e1b2d++){const _0x55e728=_0x45fa41[_0x4e1b2d],_0x298342=await this['listFolders'](_0x165641),_0x315a69=_0x1dbaa5?_0x298342[_0x379f2d(0x174)](_0x5576a6=>_0x5576a6[_0x379f2d(0x13d)]===_0x55e728&&_0x5576a6[_0x379f2d(0x17f)]===_0x1dbaa5):_0x298342['find'](_0x2c43c2=>_0x2c43c2[_0x379f2d(0x13d)]===_0x55e728&&!_0x2c43c2[_0x379f2d(0x17f)]);if(!_0x315a69)throw new SDKError(ErrorCode[_0x379f2d(0x178)],_0x379f2d(0x139)+_0x55e728+_0x379f2d(0x13a));_0x6d1eb1[_0x379f2d(0x172)](_0x55e728),_0x1dbaa5=_0x315a69['id'];}const _0x1b46f1=_0x45fa41[_0x45fa41[_0x379f2d(0x131)]-0x1],_0x37b4a2=await this['detectResourceTypeInFolder'](_0x165641,_0x1b46f1,_0x1dbaa5);if(_0x37b4a2===_0x379f2d(0x145))return{'parentId':_0x165641,'parentName':_0x507a65,'folderId':_0x1dbaa5,'folderPath':_0x6d1eb1[_0x379f2d(0x131)]>0x0?_0x6d1eb1:undefined,'type':'folder','fullPath':_0x45fa41['join']('/')};else{if(_0x37b4a2===_0x379f2d(0x159)){const _0x173775=await this[_0x379f2d(0x17d)](_0x165641),_0xf960b8=_0x1dbaa5?_0x173775[_0x379f2d(0x174)](_0x18ac07=>_0x18ac07[_0x379f2d(0x13d)]===_0x1b46f1&&_0x18ac07[_0x379f2d(0x17f)]===_0x1dbaa5):_0x173775[_0x379f2d(0x174)](_0x36f653=>_0x36f653[_0x379f2d(0x13d)]===_0x1b46f1&&!_0x36f653[_0x379f2d(0x17f)]);if(!_0xf960b8)throw new SDKError(ErrorCode[_0x379f2d(0x178)],_0x379f2d(0x139)+_0x1b46f1+_0x379f2d(0x141));return _0x6d1eb1[_0x379f2d(0x172)](_0x1b46f1),{'parentId':_0x165641,'parentName':_0x507a65,'folderId':_0xf960b8['id'],'folderPath':_0x6d1eb1,'type':_0x379f2d(0x159),'fullPath':_0x45fa41[_0x379f2d(0x16f)]('/')};}else{const _0x27c0ba=await this[_0x379f2d(0x187)](_0x165641),_0x2340d5=_0x1dbaa5?_0x27c0ba['find'](_0x2e1d29=>_0x2e1d29[_0x379f2d(0x13d)]===_0x1b46f1&&_0x2e1d29[_0x379f2d(0x14d)]===_0x1dbaa5):_0x27c0ba[_0x379f2d(0x174)](_0x359030=>_0x359030[_0x379f2d(0x13d)]===_0x1b46f1&&!_0x359030[_0x379f2d(0x14d)]);if(!_0x2340d5)throw new SDKError(ErrorCode[_0x379f2d(0x178)],_0x379f2d(0x181)+_0x1b46f1+'\x27\x20not\x20found');return{'parentId':_0x165641,'parentName':_0x507a65,'folderId':_0x1dbaa5,'folderPath':_0x6d1eb1['length']>0x0?_0x6d1eb1:undefined,'segmentId':_0x2340d5['id'],'segmentName':_0x1b46f1,'type':_0x379f2d(0x157),'fullPath':_0x45fa41[_0x379f2d(0x16f)]('/')};}}}async['resolvePathToResource'](_0x591e08){const _0x51b716=a49_0x100cb7,{parsePath:_0x3b3342}=await import('../utils/segment-path-parser.js'),_0x14d1a5=_0x3b3342(_0x591e08);if(!_0x14d1a5[_0x51b716(0x175)])throw new SDKError(ErrorCode[_0x51b716(0x149)],_0x51b716(0x14e));return await this[_0x51b716(0x13e)](_0x14d1a5[_0x51b716(0x160)]);}async[a49_0x100cb7(0x137)](_0x3b72d5,_0x4bf9ec){const _0x1577a3=a49_0x100cb7,[_0x4486cd,_0x32a718]=await Promise[_0x1577a3(0x144)]([this['listFolders'](_0x3b72d5),this[_0x1577a3(0x187)](_0x3b72d5)]);if(_0x4bf9ec){const _0x2c66dd=_0x4486cd[_0x1577a3(0x138)](_0x557994=>_0x557994['parentFolderId']===_0x4bf9ec),_0x5e6e84=_0x32a718[_0x1577a3(0x138)](_0x250998=>_0x250998['segmentFolderId']===_0x4bf9ec);return{'folders':_0x2c66dd,'segments':_0x5e6e84};}const _0x3f3c40=await this['getParentFull'](_0x3b72d5),_0x3e9138=_0x3f3c40[_0x1577a3(0x15f)];if(_0x3e9138){const _0x28f55d=_0x4486cd[_0x1577a3(0x138)](_0x3d65c9=>_0x3d65c9[_0x1577a3(0x17f)]===_0x3e9138),_0x5a66a5=_0x32a718['filter'](_0x5552f1=>_0x5552f1[_0x1577a3(0x14d)]===_0x3e9138);return{'folders':_0x28f55d,'segments':_0x5a66a5};}const _0x181a9f=_0x4486cd[_0x1577a3(0x138)](_0x1fc61f=>!_0x1fc61f[_0x1577a3(0x17f)]),_0x4d6202=_0x32a718[_0x1577a3(0x138)](_0x387d78=>!_0x387d78[_0x1577a3(0x14d)]);return{'folders':_0x181a9f,'segments':_0x4d6202};}async[a49_0x100cb7(0x16b)](_0x12218,_0x401542,_0x1481e0=0x0,_0x20366e=0xa){const _0x773c84=a49_0x100cb7;if(_0x1481e0>=_0x20366e)throw new SDKError(ErrorCode[_0x773c84(0x149)],_0x773c84(0x155)+_0x20366e+_0x773c84(0x162));const {folders:_0x654721,segments:_0x3d5d12}=await this['listUnified'](_0x12218,_0x401542),_0x41df05=[];for(const _0x5dfdee of _0x654721){const _0x189cca=await this[_0x773c84(0x16b)](_0x12218,_0x5dfdee['id'],_0x1481e0+0x1,_0x20366e);_0x41df05[_0x773c84(0x172)]({'type':_0x773c84(0x159),'id':_0x5dfdee['id'],'name':_0x5dfdee[_0x773c84(0x13d)],'children':_0x189cca[_0x773c84(0x131)]>0x0?_0x189cca:undefined,'metadata':{'description':_0x5dfdee['description']||undefined,'folderCount':_0x189cca['filter'](_0x15cb6d=>_0x15cb6d[_0x773c84(0x168)]===_0x773c84(0x159))['length'],'segmentCount':_0x189cca[_0x773c84(0x138)](_0x138e26=>_0x138e26['type']===_0x773c84(0x157))[_0x773c84(0x131)],'createdAt':_0x5dfdee[_0x773c84(0x14a)],'updatedAt':_0x5dfdee[_0x773c84(0x151)]}});}for(const _0x59d9f8 of _0x3d5d12){_0x41df05[_0x773c84(0x172)]({'type':_0x773c84(0x157),'id':_0x59d9f8['id'],'name':_0x59d9f8[_0x773c84(0x13d)],'population':_0x59d9f8['population'],'metadata':{'description':_0x59d9f8[_0x773c84(0x165)],'createdAt':_0x59d9f8['createdAt'],'updatedAt':_0x59d9f8['updatedAt']}});}return _0x41df05;}}
1
+ const a49_0x51d8dd=a49_0x32a3;(function(_0x9e7bb9,_0x277d17){const _0x1455f4=a49_0x32a3,_0x527d4d=_0x9e7bb9();while(!![]){try{const _0x513c58=parseInt(_0x1455f4(0xbd))/0x1+-parseInt(_0x1455f4(0xc4))/0x2*(-parseInt(_0x1455f4(0x8a))/0x3)+parseInt(_0x1455f4(0xb1))/0x4+-parseInt(_0x1455f4(0xaa))/0x5+-parseInt(_0x1455f4(0xbc))/0x6*(parseInt(_0x1455f4(0x72))/0x7)+parseInt(_0x1455f4(0x71))/0x8+-parseInt(_0x1455f4(0x92))/0x9;if(_0x513c58===_0x277d17)break;else _0x527d4d['push'](_0x527d4d['shift']());}catch(_0x55cc5a){_0x527d4d['push'](_0x527d4d['shift']());}}}(a49_0x1bcd,0xe1fc0));function a49_0x1bcd(){const _0x425067=['description','updateParentSegment','then','test','getFolder','Resource\x20\x27','getParentSQL','13967982QgCFgu','resolveParentIdOrName','population','\x27\x20not\x20found\x20in\x20parent\x20segment','listFields','type','getSegmentFolder','\x27\x20not\x20found','join','all','ambiguous','Path\x20cannot\x20be\x20empty','catch','push','attributes','client','updatedAt',')\x20exceeded','traversePath','resolveSegmentId','../utils/segment-path-parser.js','getParentFull','parentFolderId','\x20in\x20parent\x20','7000960wVPsEw','rootFolderId','schema','Maximum\x20recursion\x20depth\x20(','Folder\x20not\x20found:\x20','createdAt','listFolders','3329612RkdAkX','isArray','getSegment','segment','Child\x20segment\x20not\x20found:\x20','resolveFolderId','resolveParentId','Segment\x20\x27','INVALID_ARGUMENT','resolvePathToResource','folder','100710yPpVgN','1825472phuxsX','\x27\x20not\x20found\x20in\x20','behavior','find','createSegment','detectResourceTypeInFolder','listParents','2WyXlGA','listParentSegments','name','detectResourceType','13273120AZAtMr','378iJCGXd','listRecursive','listActivations','parentColumn','listUnified','getParent','updateParent','getSegmentSQL','length','parentTableName','Path\x20must\x20be\x20absolute\x20(cannot\x20start\x20with\x20.\x20or\x20..)','getParentSegmentFull','filter','parentDatabaseName','segments','segmentFolderId','\x27\x20not\x20found\x20in\x20path','NOT_FOUND','Folder\x20\x27','Parent\x20segment\x20not\x20found:\x20','listSegments','behaviors','createSegmentFolder','some','1401591UooYBy'];a49_0x1bcd=function(){return _0x425067;};return a49_0x1bcd();}function a49_0x32a3(_0x38aaeb,_0x38f5d9){const _0x1bcd25=a49_0x1bcd();return a49_0x32a3=function(_0x32a34a,_0x4eb0af){_0x32a34a=_0x32a34a-0x6f;let _0x2b88cd=_0x1bcd25[_0x32a34a];return _0x2b88cd;},a49_0x32a3(_0x38aaeb,_0x38f5d9);}import{SDKError,ErrorCode}from'./errors.js';export class SegmentAPI{[a49_0x51d8dd(0xa1)];constructor(_0x37018e){const _0x2aa2da=a49_0x51d8dd;this[_0x2aa2da(0xa1)]=_0x37018e;}async[a49_0x51d8dd(0xc3)](){const _0x5b83f6=a49_0x51d8dd;return await this['client'][_0x5b83f6(0xc5)]();}async[a49_0x51d8dd(0x77)](_0x32eb4c){const _0x2a4519=a49_0x51d8dd;return await this[_0x2a4519(0xa1)]['getParentSegment'](_0x32eb4c);}async[a49_0x51d8dd(0x86)](_0x3b1677){const _0xbcfccc=a49_0x51d8dd;return await this[_0xbcfccc(0xa1)]['listSegments'](_0x3b1677);}async['getSegment'](_0x5b0269,_0x7836c4){const _0x329271=a49_0x51d8dd;return await this['client'][_0x329271(0xb3)](_0x5b0269,_0x7836c4);}async[a49_0x51d8dd(0xb0)](_0x225da7){const _0xf4e4c2=a49_0x51d8dd;return await this[_0xf4e4c2(0xa1)]['listSegmentFolders'](_0x225da7);}async[a49_0x51d8dd(0x8f)](_0x2461f4){const _0x440f3f=a49_0x51d8dd;return await this['client'][_0x440f3f(0x98)](_0x2461f4);}async[a49_0x51d8dd(0x74)](_0x1cbcec,_0x318b50){const _0x3b3c5f=a49_0x51d8dd;return await this[_0x3b3c5f(0xa1)][_0x3b3c5f(0x74)](_0x1cbcec,_0x318b50);}async[a49_0x51d8dd(0x91)](_0x4d9374){const _0xa05a7d=a49_0x51d8dd;return await this[_0xa05a7d(0xa1)]['getParentSegmentSQL'](_0x4d9374);}async[a49_0x51d8dd(0x79)](_0x15e619,_0x45d69b){const _0x573169=a49_0x51d8dd;return await this['client'][_0x573169(0x79)](_0x15e619,_0x45d69b);}async[a49_0x51d8dd(0xb7)](_0x3c9aa0){const _0x2ee2bf=a49_0x51d8dd,_0x523d1b=await this[_0x2ee2bf(0xc3)](),_0x5d4a78=_0x523d1b['find'](_0x288ec1=>_0x288ec1['attributes'][_0x2ee2bf(0x6f)]===_0x3c9aa0);if(!_0x5d4a78)throw new SDKError(ErrorCode[_0x2ee2bf(0x83)],_0x2ee2bf(0x85)+_0x3c9aa0);return _0x5d4a78['id'];}async[a49_0x51d8dd(0xa5)](_0x23bb85,_0x59ba50){const _0x4e3e57=a49_0x51d8dd,_0x27aad7=await this[_0x4e3e57(0x86)](_0x23bb85),_0x3b80f3=_0x27aad7[_0x4e3e57(0xc0)](_0x3e8c62=>_0x3e8c62[_0x4e3e57(0x6f)]===_0x59ba50);if(!_0x3b80f3)throw new SDKError(ErrorCode[_0x4e3e57(0x83)],_0x4e3e57(0xb5)+_0x59ba50+_0x4e3e57(0xa9)+_0x23bb85);return _0x3b80f3['id'];}async[a49_0x51d8dd(0xb6)](_0x1b0119,_0x4f3d12){const _0x2370e2=a49_0x51d8dd,_0x3439f9=await this[_0x2370e2(0xb0)](_0x1b0119),_0x277ed2=_0x3439f9['find'](_0xfd9da0=>_0xfd9da0[_0x2370e2(0x6f)]===_0x4f3d12);if(!_0x277ed2)throw new SDKError(ErrorCode[_0x2370e2(0x83)],_0x2370e2(0xae)+_0x4f3d12+_0x2370e2(0xa9)+_0x1b0119);return _0x277ed2['id'];}async[a49_0x51d8dd(0x96)](_0x285c9b){const _0x4f2e31=a49_0x51d8dd,_0x49f0eb=await this[_0x4f2e31(0x93)](_0x285c9b),_0x1b99b2=await this[_0x4f2e31(0xa1)][_0x4f2e31(0x7d)](_0x49f0eb),_0x593c5d=[];if(_0x1b99b2[_0x4f2e31(0xa0)]&&Array[_0x4f2e31(0xb2)](_0x1b99b2[_0x4f2e31(0xa0)]))for(const _0x42daa2 of _0x1b99b2[_0x4f2e31(0xa0)]){const _0xd7db2c=_0x42daa2;_0xd7db2c[_0x4f2e31(0x6f)]&&_0xd7db2c[_0x4f2e31(0x97)]&&_0x593c5d['push']({'name':_0xd7db2c[_0x4f2e31(0x6f)],'type':_0xd7db2c['type'],'source':'attribute','parentDatabaseName':_0xd7db2c[_0x4f2e31(0x7f)],'parentTableName':_0xd7db2c[_0x4f2e31(0x7b)],'parentColumn':_0xd7db2c[_0x4f2e31(0x75)]});}if(_0x1b99b2[_0x4f2e31(0x87)]&&Array[_0x4f2e31(0xb2)](_0x1b99b2[_0x4f2e31(0x87)]))for(const _0x3a09c9 of _0x1b99b2['behaviors']){const _0x259032=_0x3a09c9,_0x2c7137=_0x259032[_0x4f2e31(0x6f)];if(_0x2c7137&&_0x259032[_0x4f2e31(0xac)]&&Array['isArray'](_0x259032[_0x4f2e31(0xac)]))for(const _0x1eee57 of _0x259032[_0x4f2e31(0xac)]){_0x1eee57['name']&&_0x1eee57[_0x4f2e31(0x97)]&&_0x593c5d['push']({'name':_0x2c7137+'.'+_0x1eee57[_0x4f2e31(0x6f)],'type':_0x1eee57[_0x4f2e31(0x97)],'source':_0x4f2e31(0xbf),'behaviorName':_0x2c7137,'parentDatabaseName':_0x259032[_0x4f2e31(0x7f)],'parentTableName':_0x259032[_0x4f2e31(0x7b)],'parentColumn':_0x1eee57[_0x4f2e31(0x75)]});}}return _0x593c5d;}async['createParent'](_0x547b9b){const _0x346bc0=a49_0x51d8dd;return await this[_0x346bc0(0xa1)]['createParentSegment'](_0x547b9b);}async[a49_0x51d8dd(0x78)](_0x1ac28c,_0x478cc9){const _0x1f9f8a=a49_0x51d8dd,_0x542bae=await this[_0x1f9f8a(0x93)](_0x1ac28c);return await this['client'][_0x1f9f8a(0x8c)](_0x542bae,_0x478cc9);}async[a49_0x51d8dd(0xa7)](_0x37abd6){const _0x1190e9=a49_0x51d8dd,_0x163e0e=await this[_0x1190e9(0x93)](_0x37abd6);return await this[_0x1190e9(0xa1)]['getParentSegmentFull'](_0x163e0e);}async[a49_0x51d8dd(0xc1)](_0x24e5e8,_0x1cedc5){const _0x147c27=a49_0x51d8dd;return await this[_0x147c27(0xa1)][_0x147c27(0xc1)](_0x24e5e8,_0x1cedc5);}async['updateSegmentById'](_0x2e0735,_0x3ad154,_0x4f84a3){return await this['client']['updateSegment'](_0x2e0735,_0x3ad154,_0x4f84a3);}async['createFolder'](_0x3493c3,_0x38804b){const _0x51d5d1=a49_0x51d8dd,_0x43d35a=await this['resolveParentIdOrName'](_0x3493c3);return await this[_0x51d5d1(0xa1)][_0x51d5d1(0x88)](_0x43d35a,_0x38804b);}async[a49_0x51d8dd(0x93)](_0x80f4e5){const _0x40e768=a49_0x51d8dd;if(/^\d+$/[_0x40e768(0x8e)](_0x80f4e5))return _0x80f4e5;return await this['resolveParentId'](_0x80f4e5);}async[a49_0x51d8dd(0x70)](_0x3c7f1a,_0x674c49){const _0x5e66cf=a49_0x51d8dd,[_0x17e3b0,_0x366dfb]=await Promise[_0x5e66cf(0x9b)]([this['resolveFolderId'](_0x3c7f1a,_0x674c49)[_0x5e66cf(0x8d)](()=>!![])[_0x5e66cf(0x9e)](()=>![]),this[_0x5e66cf(0xa5)](_0x3c7f1a,_0x674c49)[_0x5e66cf(0x8d)](()=>!![])[_0x5e66cf(0x9e)](()=>![])]);if(_0x17e3b0&&_0x366dfb)return _0x5e66cf(0x9c);else{if(_0x17e3b0)return _0x5e66cf(0xbb);else{if(_0x366dfb)return _0x5e66cf(0xb4);}}throw new SDKError(ErrorCode['NOT_FOUND'],_0x5e66cf(0x90)+_0x674c49+_0x5e66cf(0x95));}async['detectResourceTypeInFolder'](_0x50d122,_0x1bc8d0,_0x50195e){const _0x5d912f=a49_0x51d8dd,[_0x572b88,_0x53f681]=await Promise[_0x5d912f(0x9b)]([this[_0x5d912f(0xb0)](_0x50d122),this[_0x5d912f(0x86)](_0x50d122)]),_0xfa80d4=_0x50195e?_0x572b88['filter'](_0x352654=>_0x352654[_0x5d912f(0xa8)]===_0x50195e):_0x572b88['filter'](_0x1cb9f5=>!_0x1cb9f5[_0x5d912f(0xa8)]),_0x1799e9=_0x50195e?_0x53f681[_0x5d912f(0x7e)](_0x1b6a0c=>_0x1b6a0c['segmentFolderId']===_0x50195e):_0x53f681[_0x5d912f(0x7e)](_0x522ff8=>!_0x522ff8[_0x5d912f(0x81)]),_0x49e0af=_0xfa80d4[_0x5d912f(0x89)](_0x21f61a=>_0x21f61a[_0x5d912f(0x6f)]===_0x1bc8d0),_0x48ed30=_0x1799e9[_0x5d912f(0x89)](_0x55da06=>_0x55da06['name']===_0x1bc8d0);if(_0x49e0af&&_0x48ed30)return _0x5d912f(0x9c);else{if(_0x49e0af)return'folder';else{if(_0x48ed30)return _0x5d912f(0xb4);}}throw new SDKError(ErrorCode[_0x5d912f(0x83)],_0x5d912f(0x90)+_0x1bc8d0+_0x5d912f(0xbe)+(_0x50195e?_0x5d912f(0xbb):'parent\x20segment'));}async[a49_0x51d8dd(0xa4)](_0x4eda76){const _0x1fcd6e=a49_0x51d8dd;if(_0x4eda76[_0x1fcd6e(0x7a)]===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1fcd6e(0x9d));const _0x4dc93b=_0x4eda76[0x0],_0x164633=await this['resolveParentId'](_0x4dc93b);if(_0x4eda76['length']===0x1)return{'parentId':_0x164633,'parentName':_0x4dc93b,'type':'parent','fullPath':_0x4dc93b};const _0x2cd912=await this[_0x1fcd6e(0xa7)](_0x164633),_0x328532=_0x2cd912[_0x1fcd6e(0xab)],_0x35dd07=[];let _0x5d4272=_0x328532;for(let _0x30ca66=0x1;_0x30ca66<_0x4eda76['length']-0x1;_0x30ca66++){const _0x36b79f=_0x4eda76[_0x30ca66],_0x2b08f2=await this[_0x1fcd6e(0xb0)](_0x164633),_0x412df7=_0x5d4272?_0x2b08f2['find'](_0x154fc1=>_0x154fc1[_0x1fcd6e(0x6f)]===_0x36b79f&&_0x154fc1[_0x1fcd6e(0xa8)]===_0x5d4272):_0x2b08f2['find'](_0x3bcb57=>_0x3bcb57[_0x1fcd6e(0x6f)]===_0x36b79f&&!_0x3bcb57[_0x1fcd6e(0xa8)]);if(!_0x412df7)throw new SDKError(ErrorCode[_0x1fcd6e(0x83)],'Folder\x20\x27'+_0x36b79f+_0x1fcd6e(0x82));_0x35dd07[_0x1fcd6e(0x9f)](_0x36b79f),_0x5d4272=_0x412df7['id'];}const _0x210fcf=_0x4eda76[_0x4eda76[_0x1fcd6e(0x7a)]-0x1],_0x3515fd=await this[_0x1fcd6e(0xc2)](_0x164633,_0x210fcf,_0x5d4272);if(_0x3515fd===_0x1fcd6e(0x9c))return{'parentId':_0x164633,'parentName':_0x4dc93b,'folderId':_0x5d4272,'folderPath':_0x35dd07[_0x1fcd6e(0x7a)]>0x0?_0x35dd07:undefined,'type':_0x1fcd6e(0xbb),'fullPath':_0x4eda76[_0x1fcd6e(0x9a)]('/')};else{if(_0x3515fd===_0x1fcd6e(0xbb)){const _0x3f870a=await this[_0x1fcd6e(0xb0)](_0x164633),_0x25a6e2=_0x5d4272?_0x3f870a[_0x1fcd6e(0xc0)](_0x5ce90b=>_0x5ce90b[_0x1fcd6e(0x6f)]===_0x210fcf&&_0x5ce90b[_0x1fcd6e(0xa8)]===_0x5d4272):_0x3f870a[_0x1fcd6e(0xc0)](_0x127432=>_0x127432[_0x1fcd6e(0x6f)]===_0x210fcf&&!_0x127432[_0x1fcd6e(0xa8)]);if(!_0x25a6e2)throw new SDKError(ErrorCode[_0x1fcd6e(0x83)],_0x1fcd6e(0x84)+_0x210fcf+_0x1fcd6e(0x99));return _0x35dd07[_0x1fcd6e(0x9f)](_0x210fcf),{'parentId':_0x164633,'parentName':_0x4dc93b,'folderId':_0x25a6e2['id'],'folderPath':_0x35dd07,'type':'folder','fullPath':_0x4eda76[_0x1fcd6e(0x9a)]('/')};}else{const _0x53326d=await this['listSegments'](_0x164633),_0xd94874=_0x5d4272?_0x53326d[_0x1fcd6e(0xc0)](_0x1721b2=>_0x1721b2['name']===_0x210fcf&&_0x1721b2['segmentFolderId']===_0x5d4272):_0x53326d[_0x1fcd6e(0xc0)](_0x1bfa29=>_0x1bfa29['name']===_0x210fcf&&!_0x1bfa29[_0x1fcd6e(0x81)]);if(!_0xd94874)throw new SDKError(ErrorCode[_0x1fcd6e(0x83)],_0x1fcd6e(0xb8)+_0x210fcf+'\x27\x20not\x20found');return{'parentId':_0x164633,'parentName':_0x4dc93b,'folderId':_0x5d4272,'folderPath':_0x35dd07[_0x1fcd6e(0x7a)]>0x0?_0x35dd07:undefined,'segmentId':_0xd94874['id'],'segmentName':_0x210fcf,'type':_0x1fcd6e(0xb4),'fullPath':_0x4eda76[_0x1fcd6e(0x9a)]('/')};}}}async[a49_0x51d8dd(0xba)](_0x1c987f){const _0x460919=a49_0x51d8dd,{parsePath:_0x6f2412}=await import(_0x460919(0xa6)),_0x2bbf33=_0x6f2412(_0x1c987f);if(!_0x2bbf33['isAbsolute'])throw new SDKError(ErrorCode[_0x460919(0xb9)],_0x460919(0x7c));return await this['traversePath'](_0x2bbf33[_0x460919(0x80)]);}async['listUnified'](_0x4b9899,_0x18df5b){const _0x5aca04=a49_0x51d8dd,[_0x577e0f,_0x21dc7c]=await Promise[_0x5aca04(0x9b)]([this[_0x5aca04(0xb0)](_0x4b9899),this[_0x5aca04(0x86)](_0x4b9899)]);if(_0x18df5b){const _0x43255d=_0x577e0f['filter'](_0x342c70=>_0x342c70[_0x5aca04(0xa8)]===_0x18df5b),_0x256edf=_0x21dc7c[_0x5aca04(0x7e)](_0x4f3835=>_0x4f3835['segmentFolderId']===_0x18df5b);return{'folders':_0x43255d,'segments':_0x256edf};}const _0x41e441=await this[_0x5aca04(0xa7)](_0x4b9899),_0x2324bb=_0x41e441[_0x5aca04(0xab)];if(_0x2324bb){const _0x4c0b18=_0x577e0f[_0x5aca04(0x7e)](_0x363c37=>_0x363c37[_0x5aca04(0xa8)]===_0x2324bb),_0x48bf4c=_0x21dc7c[_0x5aca04(0x7e)](_0x77447c=>_0x77447c[_0x5aca04(0x81)]===_0x2324bb);return{'folders':_0x4c0b18,'segments':_0x48bf4c};}const _0x3c2d67=_0x577e0f['filter'](_0x3b820f=>!_0x3b820f[_0x5aca04(0xa8)]),_0xc3bc61=_0x21dc7c[_0x5aca04(0x7e)](_0x368dba=>!_0x368dba[_0x5aca04(0x81)]);return{'folders':_0x3c2d67,'segments':_0xc3bc61};}async[a49_0x51d8dd(0x73)](_0x567563,_0x5c18fa,_0x38b3f6=0x0,_0x5b20b8=0xa){const _0x59f76c=a49_0x51d8dd;if(_0x38b3f6>=_0x5b20b8)throw new SDKError(ErrorCode[_0x59f76c(0xb9)],_0x59f76c(0xad)+_0x5b20b8+_0x59f76c(0xa3));const {folders:_0x1a81e3,segments:_0x249ca0}=await this[_0x59f76c(0x76)](_0x567563,_0x5c18fa),_0x53d2ed=[];for(const _0x5313a3 of _0x1a81e3){const _0x25d9ac=await this[_0x59f76c(0x73)](_0x567563,_0x5313a3['id'],_0x38b3f6+0x1,_0x5b20b8);_0x53d2ed[_0x59f76c(0x9f)]({'type':_0x59f76c(0xbb),'id':_0x5313a3['id'],'name':_0x5313a3[_0x59f76c(0x6f)],'children':_0x25d9ac[_0x59f76c(0x7a)]>0x0?_0x25d9ac:undefined,'metadata':{'description':_0x5313a3[_0x59f76c(0x8b)]||undefined,'folderCount':_0x25d9ac[_0x59f76c(0x7e)](_0x1b4388=>_0x1b4388[_0x59f76c(0x97)]==='folder')[_0x59f76c(0x7a)],'segmentCount':_0x25d9ac[_0x59f76c(0x7e)](_0x2e8957=>_0x2e8957[_0x59f76c(0x97)]===_0x59f76c(0xb4))['length'],'createdAt':_0x5313a3[_0x59f76c(0xaf)],'updatedAt':_0x5313a3[_0x59f76c(0xa2)]}});}for(const _0x179498 of _0x249ca0){_0x53d2ed[_0x59f76c(0x9f)]({'type':_0x59f76c(0xb4),'id':_0x179498['id'],'name':_0x179498[_0x59f76c(0x6f)],'population':_0x179498[_0x59f76c(0x94)],'metadata':{'description':_0x179498['description'],'createdAt':_0x179498['createdAt'],'updatedAt':_0x179498[_0x59f76c(0xa2)]}});}return _0x53d2ed;}}
package/dist/sdk/table.js CHANGED
@@ -1 +1 @@
1
- const a50_0x4f2ab9=a50_0x3c53;(function(_0x12512a,_0x6f1f7a){const _0x5e1609=a50_0x3c53,_0x479210=_0x12512a();while(!![]){try{const _0x3e09e4=parseInt(_0x5e1609(0x1e7))/0x1+-parseInt(_0x5e1609(0x201))/0x2*(-parseInt(_0x5e1609(0x1e2))/0x3)+-parseInt(_0x5e1609(0x1e8))/0x4+parseInt(_0x5e1609(0x1fe))/0x5+-parseInt(_0x5e1609(0x1f7))/0x6*(-parseInt(_0x5e1609(0x204))/0x7)+parseInt(_0x5e1609(0x20b))/0x8+parseInt(_0x5e1609(0x1fd))/0x9*(-parseInt(_0x5e1609(0x1ef))/0xa);if(_0x3e09e4===_0x6f1f7a)break;else _0x479210['push'](_0x479210['shift']());}catch(_0x5c8fe8){_0x479210['push'](_0x479210['shift']());}}}(a50_0x59e3,0x8ab1c));import{escapeStringLiteral,buildLikePattern}from'../utils/string-utils.js';import{SDKError,ErrorCode}from'./errors.js';function a50_0x3c53(_0x28ee27,_0x2439b8){const _0x59e33e=a50_0x59e3();return a50_0x3c53=function(_0x3c53df,_0x3f65fc){_0x3c53df=_0x3c53df-0x1df;let _0x5c4469=_0x59e33e[_0x3c53df];return _0x5c4469;},a50_0x3c53(_0x28ee27,_0x2439b8);}function a50_0x59e3(){const _0x47793d=['\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','\x0a\x20\x20\x20\x20','4dAGfUq','\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20','trim','51492aaLouP','\x0a\x20\x20AND\x20table_name\x20LIKE\x20','\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_schema\x20AS\x20database_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20','isInteger','\x0a\x20\x20\x20\x20\x20\x20','Usage:\x20tdx\x20describe\x20<database.table>','Usage:\x20tdx\x20show\x20<database.table>','6816400nThgVq','\x0a\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20ordinal_position\x0a\x20\x20\x20\x20','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22prod_*\x22)\x20or\x20omit\x20to\x20search\x20all\x20databases.','Database\x20name\x20is\x20required','MISSING_ARGUMENT','validateDatabase','574608CeTaaH','show','INVALID_ARGUMENT','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22user_*\x22)\x20or\x20omit\x20to\x20list\x20all\x20tables.','Provide\x20a\x20valid\x20database\x20name\x20or\x20omit\x20to\x20list\x20tables\x20from\x20all\x20databases.','241375alGbvZ','3093976erYpCp','slice','client','\x0aORDER\x20BY\x20table_name\x0aLIMIT\x2010000','length','describe','\x20ESCAPE\x20\x27\x5c\x27','10TSyRCq','\x0aORDER\x20BY\x20database_name,\x20table_name\x0aLIMIT\x2010000','list','data','\x0a\x20\x20AND\x20table_schema\x20LIKE\x20','\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.schemata\x0a\x20\x20\x20\x20\x20\x20WHERE\x20catalog_name\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20schema_name\x20=\x20','validateTable','\x20LIMIT\x20','204urfsit','Use\x20--limit\x20<number>\x20to\x20specify\x20row\x20limit\x20(must\x20be\x20positive).','Database\x20name\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Table\x20name\x20is\x20required','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','executeQuery','6134697XamJVN','1483090mwQqvs'];a50_0x59e3=function(){return _0x47793d;};return a50_0x59e3();}export class TableAPI{[a50_0x4f2ab9(0x1ea)];constructor(_0x1e54a7){const _0x544418=a50_0x4f2ab9;this[_0x544418(0x1ea)]=_0x1e54a7;}async[a50_0x4f2ab9(0x1f1)](_0xc361ab,_0x1e1e29,_0x2f8feb){const _0x59961e=a50_0x4f2ab9;if(_0xc361ab!==undefined&&_0xc361ab[_0x59961e(0x203)]()['length']===0x0)throw new SDKError(ErrorCode[_0x59961e(0x1e4)],_0x59961e(0x1f9),undefined,{'helpText':_0x59961e(0x1e6)});if(_0x1e1e29!==undefined&&_0x1e1e29[_0x59961e(0x203)]()[_0x59961e(0x1ec)]===0x0)throw new SDKError(ErrorCode[_0x59961e(0x1e4)],_0x59961e(0x1fb),undefined,{'helpText':_0x59961e(0x1e5)});if(_0x2f8feb!==undefined&&_0x2f8feb[_0x59961e(0x203)]()[_0x59961e(0x1ec)]===0x0)throw new SDKError(ErrorCode[_0x59961e(0x1e4)],'Database\x20pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only',undefined,{'helpText':_0x59961e(0x20d)});let _0x28fade;_0xc361ab?(_0x28fade=_0x59961e(0x1ff)+escapeStringLiteral(_0xc361ab)+_0x59961e(0x208),_0x1e1e29&&(_0x28fade+='\x0a\x20\x20AND\x20table_name\x20LIKE\x20'+buildLikePattern(_0x1e1e29)+_0x59961e(0x1ee)),_0x28fade+=_0x59961e(0x1eb)):(_0x28fade=_0x59961e(0x206),_0x2f8feb&&(_0x28fade+=_0x59961e(0x1f3)+buildLikePattern(_0x2f8feb)+'\x20ESCAPE\x20\x27\x5c\x27'),_0x1e1e29&&(_0x28fade+=_0x59961e(0x205)+buildLikePattern(_0x1e1e29)+_0x59961e(0x1ee)),_0x28fade+=_0x59961e(0x1f0));const _0x4ca9c4=await this[_0x59961e(0x1ea)][_0x59961e(0x1fc)](_0x28fade['trim']());return _0x4ca9c4[_0x59961e(0x1f2)];}async[a50_0x4f2ab9(0x1e1)](_0x4b9616){const _0x5373f5=a50_0x4f2ab9,_0xc02d7d=(_0x5373f5(0x1f4)+escapeStringLiteral(_0x4b9616)+_0x5373f5(0x200))[_0x5373f5(0x203)](),_0x2b3356=await this[_0x5373f5(0x1ea)][_0x5373f5(0x1fc)](_0xc02d7d);return _0x2b3356['data'][_0x5373f5(0x1ec)]>0x0;}async[a50_0x4f2ab9(0x1f5)](_0x429f76,_0x5cff06){const _0x8efe63=a50_0x4f2ab9,_0x3c9302=('\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20'+escapeStringLiteral(_0x429f76)+_0x8efe63(0x202)+escapeStringLiteral(_0x5cff06)+_0x8efe63(0x200))[_0x8efe63(0x203)](),_0x51020f=await this[_0x8efe63(0x1ea)][_0x8efe63(0x1fc)](_0x3c9302);return _0x51020f[_0x8efe63(0x1f2)][_0x8efe63(0x1ec)]>0x0;}async[a50_0x4f2ab9(0x1ed)](_0x18acb6,_0x257ab9){const _0x4eb803=a50_0x4f2ab9;if(!_0x18acb6||_0x18acb6[_0x4eb803(0x203)]()['length']===0x0)throw new SDKError(ErrorCode[_0x4eb803(0x1e0)],_0x4eb803(0x1df),undefined,{'helpText':_0x4eb803(0x209)});if(!_0x257ab9||_0x257ab9[_0x4eb803(0x203)]()[_0x4eb803(0x1ec)]===0x0)throw new SDKError(ErrorCode[_0x4eb803(0x1e0)],_0x4eb803(0x1fa),undefined,{'helpText':_0x4eb803(0x209)});const _0x37c030=('\x0a\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20column_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20data_type,\x0a\x20\x20\x20\x20\x20\x20\x20\x20is_nullable\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.columns\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20'+escapeStringLiteral(_0x18acb6)+_0x4eb803(0x202)+escapeStringLiteral(_0x257ab9)+_0x4eb803(0x20c))['trim'](),_0x298fb2=await this[_0x4eb803(0x1ea)]['executeQuery'](_0x37c030);return _0x298fb2[_0x4eb803(0x1f2)];}async[a50_0x4f2ab9(0x1e3)](_0x306553,_0x269bc1,_0x5e9065=0x28,_0x2a9662){const _0x547224=a50_0x4f2ab9;try{if(!_0x306553||_0x306553[_0x547224(0x203)]()[_0x547224(0x1ec)]===0x0)throw new SDKError(ErrorCode[_0x547224(0x1e0)],_0x547224(0x1df),undefined,{'helpText':_0x547224(0x20a)});if(!_0x269bc1||_0x269bc1[_0x547224(0x203)]()[_0x547224(0x1ec)]===0x0)throw new SDKError(ErrorCode[_0x547224(0x1e0)],_0x547224(0x1fa),undefined,{'helpText':'Usage:\x20tdx\x20show\x20<database.table>'});if(!Number[_0x547224(0x207)](_0x5e9065)||_0x5e9065<=0x0)throw new SDKError(ErrorCode[_0x547224(0x1e4)],'Limit\x20must\x20be\x20a\x20positive\x20integer',undefined,{'helpText':_0x547224(0x1f8)});const _0x581bdc=escapeStringLiteral(_0x306553)[_0x547224(0x1e9)](0x1,-0x1)+'.'+escapeStringLiteral(_0x269bc1)['slice'](0x1,-0x1),_0x15cab6='SELECT\x20*\x20FROM\x20'+_0x581bdc+_0x547224(0x1f6)+_0x5e9065,_0x199ce5=await this['client'][_0x547224(0x1fc)](_0x15cab6,{'catalog':_0x2a9662,'schema':_0x306553});return _0x199ce5;}catch(_0x27e80f){if(_0x27e80f instanceof SDKError)throw _0x27e80f;throw _0x27e80f;}}}
1
+ function a50_0x46ed(_0x15de6b,_0x943ac9){const _0x276434=a50_0x2764();return a50_0x46ed=function(_0x46ed95,_0x30c38b){_0x46ed95=_0x46ed95-0x1ba;let _0x5c6d76=_0x276434[_0x46ed95];return _0x5c6d76;},a50_0x46ed(_0x15de6b,_0x943ac9);}const a50_0x2146e3=a50_0x46ed;(function(_0x3699d5,_0x5504d6){const _0x56e1e9=a50_0x46ed,_0x17bb20=_0x3699d5();while(!![]){try{const _0x2ff57d=-parseInt(_0x56e1e9(0x1bb))/0x1+-parseInt(_0x56e1e9(0x1ba))/0x2+parseInt(_0x56e1e9(0x1c9))/0x3*(-parseInt(_0x56e1e9(0x1c2))/0x4)+-parseInt(_0x56e1e9(0x1e4))/0x5+-parseInt(_0x56e1e9(0x1e1))/0x6+-parseInt(_0x56e1e9(0x1c1))/0x7*(-parseInt(_0x56e1e9(0x1c6))/0x8)+parseInt(_0x56e1e9(0x1e3))/0x9;if(_0x2ff57d===_0x5504d6)break;else _0x17bb20['push'](_0x17bb20['shift']());}catch(_0x27e2f6){_0x17bb20['push'](_0x17bb20['shift']());}}}(a50_0x2764,0x5c161));import{escapeStringLiteral,buildLikePattern}from'../utils/string-utils.js';import{SDKError,ErrorCode}from'./errors.js';function a50_0x2764(){const _0x772b19=['length','trim','\x0a\x20\x20AND\x20table_name\x20LIKE\x20','304jQJgUa','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22prod_*\x22)\x20or\x20omit\x20to\x20search\x20all\x20databases.','Database\x20name\x20cannot\x20be\x20empty\x20or\x20whitespace-only','1851kTDlKC','client','\x0aORDER\x20BY\x20table_name\x0aLIMIT\x2010000','\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','\x0a\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20column_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20data_type,\x0a\x20\x20\x20\x20\x20\x20\x20\x20is_nullable\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.columns\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','\x0a\x20\x20\x20\x20\x20\x20','Usage:\x20tdx\x20describe\x20<database.table>','describe','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22user_*\x22)\x20or\x20omit\x20to\x20list\x20all\x20tables.','\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_schema\x20AS\x20database_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20','\x20ESCAPE\x20\x27\x5c\x27','isInteger','validateDatabase','INVALID_ARGUMENT','Use\x20--limit\x20<number>\x20to\x20specify\x20row\x20limit\x20(must\x20be\x20positive).','Table\x20name\x20is\x20required','Provide\x20a\x20valid\x20database\x20name\x20or\x20omit\x20to\x20list\x20tables\x20from\x20all\x20databases.','MISSING_ARGUMENT','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','executeQuery','show','\x0aORDER\x20BY\x20database_name,\x20table_name\x0aLIMIT\x2010000','Usage:\x20tdx\x20show\x20<database.table>','2049978FZCrUG','data','18149085PzHszl','1910325DVJeiJ','1036748EtNEgg','437738CgYSRe','\x0a\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20ordinal_position\x0a\x20\x20\x20\x20','validateTable','list','Database\x20name\x20is\x20required','\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20','100198sqxwMD','3264KIZFtl'];a50_0x2764=function(){return _0x772b19;};return a50_0x2764();}export class TableAPI{['client'];constructor(_0x904796){const _0x450df8=a50_0x46ed;this[_0x450df8(0x1ca)]=_0x904796;}async[a50_0x2146e3(0x1be)](_0x3a2c40,_0x274c7d,_0x18c78f){const _0x42709d=a50_0x2146e3;if(_0x3a2c40!==undefined&&_0x3a2c40[_0x42709d(0x1c4)]()['length']===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x42709d(0x1c8),undefined,{'helpText':_0x42709d(0x1da)});if(_0x274c7d!==undefined&&_0x274c7d[_0x42709d(0x1c4)]()[_0x42709d(0x1c3)]===0x0)throw new SDKError(ErrorCode[_0x42709d(0x1d7)],_0x42709d(0x1dc),undefined,{'helpText':_0x42709d(0x1d1)});if(_0x18c78f!==undefined&&_0x18c78f[_0x42709d(0x1c4)]()[_0x42709d(0x1c3)]===0x0)throw new SDKError(ErrorCode[_0x42709d(0x1d7)],'Database\x20pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only',undefined,{'helpText':_0x42709d(0x1c7)});let _0x9a9efa;_0x3a2c40?(_0x9a9efa=_0x42709d(0x1cc)+escapeStringLiteral(_0x3a2c40)+_0x42709d(0x1ce),_0x274c7d&&(_0x9a9efa+=_0x42709d(0x1c5)+buildLikePattern(_0x274c7d)+'\x20ESCAPE\x20\x27\x5c\x27'),_0x9a9efa+=_0x42709d(0x1cb)):(_0x9a9efa=_0x42709d(0x1d3),_0x18c78f&&(_0x9a9efa+='\x0a\x20\x20AND\x20table_schema\x20LIKE\x20'+buildLikePattern(_0x18c78f)+_0x42709d(0x1d4)),_0x274c7d&&(_0x9a9efa+=_0x42709d(0x1c5)+buildLikePattern(_0x274c7d)+_0x42709d(0x1d4)),_0x9a9efa+=_0x42709d(0x1df));const _0x3efa62=await this[_0x42709d(0x1ca)][_0x42709d(0x1dd)](_0x9a9efa['trim']());return _0x3efa62['data'];}async[a50_0x2146e3(0x1d6)](_0x22954e){const _0x3ef53c=a50_0x2146e3,_0xaecaa3=('\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.schemata\x0a\x20\x20\x20\x20\x20\x20WHERE\x20catalog_name\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20schema_name\x20=\x20'+escapeStringLiteral(_0x22954e)+'\x0a\x20\x20\x20\x20')[_0x3ef53c(0x1c4)](),_0x5e374f=await this[_0x3ef53c(0x1ca)][_0x3ef53c(0x1dd)](_0xaecaa3);return _0x5e374f[_0x3ef53c(0x1e2)]['length']>0x0;}async[a50_0x2146e3(0x1bd)](_0x49b396,_0x546d36){const _0x599be0=a50_0x2146e3,_0x328e73=(_0x599be0(0x1d2)+escapeStringLiteral(_0x49b396)+_0x599be0(0x1c0)+escapeStringLiteral(_0x546d36)+'\x0a\x20\x20\x20\x20')[_0x599be0(0x1c4)](),_0x7e23e=await this[_0x599be0(0x1ca)][_0x599be0(0x1dd)](_0x328e73);return _0x7e23e[_0x599be0(0x1e2)][_0x599be0(0x1c3)]>0x0;}async[a50_0x2146e3(0x1d0)](_0x573f34,_0x4671df){const _0x4d43e7=a50_0x2146e3;if(!_0x573f34||_0x573f34[_0x4d43e7(0x1c4)]()[_0x4d43e7(0x1c3)]===0x0)throw new SDKError(ErrorCode[_0x4d43e7(0x1db)],_0x4d43e7(0x1bf),undefined,{'helpText':'Usage:\x20tdx\x20describe\x20<database.table>'});if(!_0x4671df||_0x4671df[_0x4d43e7(0x1c4)]()[_0x4d43e7(0x1c3)]===0x0)throw new SDKError(ErrorCode[_0x4d43e7(0x1db)],_0x4d43e7(0x1d9),undefined,{'helpText':_0x4d43e7(0x1cf)});const _0x1a841f=(_0x4d43e7(0x1cd)+escapeStringLiteral(_0x573f34)+_0x4d43e7(0x1c0)+escapeStringLiteral(_0x4671df)+_0x4d43e7(0x1bc))['trim'](),_0x4185e2=await this[_0x4d43e7(0x1ca)][_0x4d43e7(0x1dd)](_0x1a841f);return _0x4185e2['data'];}async[a50_0x2146e3(0x1de)](_0x404a59,_0x15bdaa,_0x2f1646=0x28,_0x4ef201){const _0x2822c2=a50_0x2146e3;try{if(!_0x404a59||_0x404a59['trim']()[_0x2822c2(0x1c3)]===0x0)throw new SDKError(ErrorCode[_0x2822c2(0x1db)],_0x2822c2(0x1bf),undefined,{'helpText':_0x2822c2(0x1e0)});if(!_0x15bdaa||_0x15bdaa[_0x2822c2(0x1c4)]()[_0x2822c2(0x1c3)]===0x0)throw new SDKError(ErrorCode[_0x2822c2(0x1db)],_0x2822c2(0x1d9),undefined,{'helpText':'Usage:\x20tdx\x20show\x20<database.table>'});if(!Number[_0x2822c2(0x1d5)](_0x2f1646)||_0x2f1646<=0x0)throw new SDKError(ErrorCode[_0x2822c2(0x1d7)],'Limit\x20must\x20be\x20a\x20positive\x20integer',undefined,{'helpText':_0x2822c2(0x1d8)});const _0x8e08d3=escapeStringLiteral(_0x404a59)['slice'](0x1,-0x1)+'.'+escapeStringLiteral(_0x15bdaa)['slice'](0x1,-0x1),_0x4c85da='SELECT\x20*\x20FROM\x20'+_0x8e08d3+'\x20LIMIT\x20'+_0x2f1646,_0x778fc2=await this[_0x2822c2(0x1ca)][_0x2822c2(0x1dd)](_0x4c85da,{'catalog':_0x4ef201,'schema':_0x404a59});return _0x778fc2;}catch(_0x57bbb3){if(_0x57bbb3 instanceof SDKError)throw _0x57bbb3;throw _0x57bbb3;}}}
@@ -1 +1 @@
1
- function a51_0x1722(_0x4714b1,_0x4f2bd0){const _0xf7e3d7=a51_0xf7e3();return a51_0x1722=function(_0x172275,_0x1b3b19){_0x172275=_0x172275-0x151;let _0x3ea00b=_0xf7e3d7[_0x172275];return _0x3ea00b;},a51_0x1722(_0x4714b1,_0x4f2bd0);}const a51_0x5705c1=a51_0x1722;function a51_0xf7e3(){const _0x391c00=['push','268434XrBuzV','includeRetried','filter','resumeFrom','resolveProjectId','fullName','readdir','projects','retryAttempt','upstreams','project','last_id','parentId','kill','.tar.gz','isDirectory','unlink','sessionTime','extract','now','limit','tdx-workflow-','test','Project\x20not\x20found:\x20','success','timezone','done','endsWith','download','102389aKCUiN','sessionId','projectName','retryAt','\x20workflow\x20files\x20found\x20in\x20project\x20directory','attempts','join','listProjects','1244155QNZzTM','mkdir','startedAt','scheduleFrom','find','6pgsIQO','skipValidation','data','607288ekaPEK','1057120NYPeRi','status','logs','basename','exportParams','downloadProjectArchive','client','retryParams','map','name','lastAttempt','finishedAt','create','getTaskLogs','NUMERIC_ID_PATTERN','getAttempt','381422sLgePz','replace','cancelRequested','lastId','Cannot\x20read\x20workflow\x20file:\x20','fromTask','isGroup','3TGISeI','listSessions','access','length','config','deleteProject','force','clearScheduleAll','1626660JertUn','message','tar','tdx-workflow-push-','workflowName','No\x20','workflows','createdAt','workflow','revision','sessionUuid','toISOString','tasks'];a51_0xf7e3=function(){return _0x391c00;};return a51_0xf7e3();}(function(_0x272c7d,_0x2446f7){const _0x3a2f5c=a51_0x1722,_0x2bcf43=_0x272c7d();while(!![]){try{const _0x166a5c=-parseInt(_0x3a2f5c(0x155))/0x1+parseInt(_0x3a2f5c(0x176))/0x2*(-parseInt(_0x3a2f5c(0x17d))/0x3)+-parseInt(_0x3a2f5c(0x165))/0x4+-parseInt(_0x3a2f5c(0x15d))/0x5*(-parseInt(_0x3a2f5c(0x162))/0x6)+parseInt(_0x3a2f5c(0x185))/0x7+parseInt(_0x3a2f5c(0x166))/0x8+-parseInt(_0x3a2f5c(0x193))/0x9;if(_0x166a5c===_0x2446f7)break;else _0x2bcf43['push'](_0x2bcf43['shift']());}catch(_0x3560bd){_0x2bcf43['push'](_0x2bcf43['shift']());}}}(a51_0xf7e3,0x21d6b));import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';export class WorkflowAPI{[a51_0x5705c1(0x16c)];static [a51_0x5705c1(0x174)]=/^\d+$/;constructor(_0x1f78b1){const _0x2d62fe=a51_0x5705c1;this[_0x2d62fe(0x16c)]=_0x1f78b1;}async[a51_0x5705c1(0x197)](_0x392938){const _0x206718=a51_0x5705c1;if(WorkflowAPI[_0x206718(0x174)][_0x206718(0x1a9)](_0x392938))return{'id':_0x392938,'name':_0x392938};const _0x47b5bf=await this[_0x206718(0x16c)][_0x206718(0x15c)]({'name_pattern':_0x392938}),_0xc2ce74=_0x47b5bf[_0x206718(0x164)][_0x206718(0x161)](_0x4fae67=>_0x4fae67['name']===_0x392938);if(!_0xc2ce74)throw new Error(_0x206718(0x1aa)+_0x392938);return{'id':_0xc2ce74['id'],'name':_0xc2ce74['name']};}async[a51_0x5705c1(0x19a)](_0x416513,_0x4f3df7){const _0x19c68c=a51_0x5705c1,_0x113972=await this[_0x19c68c(0x16c)][_0x19c68c(0x15c)]({'name_pattern':_0x416513,..._0x4f3df7});return _0x113972[_0x19c68c(0x164)][_0x19c68c(0x16e)](_0xe6ce34=>({..._0xe6ce34,'project_id':_0xe6ce34['id'],'project_name':_0xe6ce34[_0x19c68c(0x16f)]}));}async[a51_0x5705c1(0x18b)](_0x3ed575,_0x580b06){const _0x47d8fc=a51_0x5705c1,_0x4255cc=await this['client']['listWorkflows']({'project_name':_0x3ed575,..._0x580b06});return _0x4255cc['data'][_0x47d8fc(0x16e)](_0x2bb568=>({'project_id':_0x2bb568[_0x47d8fc(0x19d)]?.['id'],'project_name':_0x2bb568[_0x47d8fc(0x19d)]?.[_0x47d8fc(0x16f)],'workflow_id':_0x2bb568['id'],'workflow_name':_0x2bb568['name'],'revision':_0x2bb568[_0x47d8fc(0x18e)],'timezone':_0x2bb568[_0x47d8fc(0x151)],'config':_0x2bb568[_0x47d8fc(0x181)],'id':_0x2bb568['id'],'name':_0x2bb568[_0x47d8fc(0x16f)],'project':_0x2bb568[_0x47d8fc(0x19d)]}));}async['sessions'](_0x47ad28){const _0x3411f7=a51_0x5705c1;let _0x891fbc;if(_0x47ad28?.[_0x3411f7(0x157)]){let _0x34521c,_0x1cd473=![];while(!_0x1cd473){const _0xbdd266=await this[_0x3411f7(0x16c)]['listProjects']({'limit':0x64,'last_id':_0x34521c}),_0x1fd4f1=_0xbdd266[_0x3411f7(0x164)][_0x3411f7(0x161)](_0x3f044f=>_0x3f044f[_0x3411f7(0x16f)]===_0x47ad28[_0x3411f7(0x157)]);if(_0x1fd4f1){_0x891fbc=_0x1fd4f1['id'],_0x1cd473=!![];break;}if(!_0xbdd266[_0x3411f7(0x179)]||_0xbdd266[_0x3411f7(0x164)][_0x3411f7(0x180)]===0x0)break;_0x34521c=_0xbdd266[_0x3411f7(0x179)];}if(!_0x891fbc)throw new Error(_0x3411f7(0x1aa)+_0x47ad28[_0x3411f7(0x157)]);}const _0x3ca94b=await this[_0x3411f7(0x16c)][_0x3411f7(0x17e)]({'project_id':_0x891fbc,'project_name':_0x47ad28?.[_0x3411f7(0x157)],'workflow_name':_0x47ad28?.['workflowName'],'status':_0x47ad28?.[_0x3411f7(0x167)],'from_time':_0x47ad28?.['fromTime'],'to_time':_0x47ad28?.['toTime'],'limit':_0x47ad28?.[_0x3411f7(0x1a7)],'last_id':_0x47ad28?.['last_id']});return _0x3ca94b[_0x3411f7(0x164)][_0x3411f7(0x16e)](_0x525142=>({'project_id':_0x525142['project']?.['id'],'project_name':_0x525142[_0x3411f7(0x19d)]?.[_0x3411f7(0x16f)],'workflow_id':_0x525142[_0x3411f7(0x18d)]?.['id'],'workflow_name':_0x525142[_0x3411f7(0x18d)]?.[_0x3411f7(0x16f)],'session_id':_0x525142['id'],'sessionUuid':_0x525142[_0x3411f7(0x18f)],'sessionTime':_0x525142[_0x3411f7(0x1a4)],'lastAttempt':_0x525142[_0x3411f7(0x170)],'id':_0x525142['id'],'project':_0x525142[_0x3411f7(0x19d)],'workflow':_0x525142[_0x3411f7(0x18d)]}));}async[a51_0x5705c1(0x15a)](_0x20d5d7){const _0x1eded0=a51_0x5705c1,_0x126632=await this[_0x1eded0(0x16c)]['listAttempts']({'project_name':_0x20d5d7?.[_0x1eded0(0x157)],'workflow_name':_0x20d5d7?.[_0x1eded0(0x189)],'include_retried':_0x20d5d7?.[_0x1eded0(0x194)],'limit':_0x20d5d7?.[_0x1eded0(0x1a7)],'last_id':_0x20d5d7?.[_0x1eded0(0x19e)]});return _0x126632[_0x1eded0(0x164)][_0x1eded0(0x16e)](_0x3bcf69=>({'project_id':_0x3bcf69[_0x1eded0(0x19d)]?.['id'],'project_name':_0x3bcf69[_0x1eded0(0x19d)]?.['name'],'workflow_id':_0x3bcf69[_0x1eded0(0x18d)]?.['id'],'workflow_name':_0x3bcf69[_0x1eded0(0x18d)]?.[_0x1eded0(0x16f)],'session_id':_0x3bcf69[_0x1eded0(0x156)],'sessionUuid':_0x3bcf69['sessionUuid'],'sessionTime':_0x3bcf69[_0x1eded0(0x1a4)],'attempt_id':_0x3bcf69['id'],'attempt_index':_0x3bcf69['index'],'retryAttemptName':_0x3bcf69['retryAttemptName'],'done':_0x3bcf69[_0x1eded0(0x152)],'success':_0x3bcf69[_0x1eded0(0x1ab)],'cancelRequested':_0x3bcf69[_0x1eded0(0x178)],'params':_0x3bcf69['params'],'createdAt':_0x3bcf69[_0x1eded0(0x18c)],'finishedAt':_0x3bcf69[_0x1eded0(0x171)],'id':_0x3bcf69['id'],'index':_0x3bcf69['index'],'project':_0x3bcf69['project'],'workflow':_0x3bcf69[_0x1eded0(0x18d)]}));}async['attempt'](_0x68c6){const _0x1d5ee5=a51_0x5705c1,_0x3e427a=await this[_0x1d5ee5(0x16c)][_0x1d5ee5(0x175)](_0x68c6);return _0x3e427a;}async[a51_0x5705c1(0x191)](_0x39b505,_0x206e7a=![]){const _0x306469=a51_0x5705c1,_0xfa9771=await this[_0x306469(0x16c)]['getAttemptTasks'](_0x39b505,_0x206e7a);return _0xfa9771[_0x306469(0x16e)](_0x1402eb=>({'task_id':_0x1402eb['id'],'task_name':_0x1402eb[_0x306469(0x198)],'parentId':_0x1402eb[_0x306469(0x19f)],'config':_0x1402eb[_0x306469(0x181)],'upstreams':_0x1402eb[_0x306469(0x19c)],'state':_0x1402eb['state'],'exportParams':_0x1402eb[_0x306469(0x16a)],'storeParams':_0x1402eb['storeParams'],'stateParams':_0x1402eb['stateParams'],'updatedAt':_0x1402eb['updatedAt'],'retryAt':_0x1402eb[_0x306469(0x158)],'startedAt':_0x1402eb[_0x306469(0x15f)],'error':_0x1402eb['error'],'isGroup':_0x1402eb[_0x306469(0x17c)],'id':_0x1402eb['id'],'fullName':_0x1402eb[_0x306469(0x198)]}));}async[a51_0x5705c1(0x168)](_0x64a919,_0x359bf2,_0x59c54a){const _0x88d931=a51_0x5705c1;return await this[_0x88d931(0x16c)][_0x88d931(0x173)](_0x64a919,_0x359bf2,_0x59c54a);}async[a51_0x5705c1(0x1a0)](_0x2d93ee,_0x2a257f){const _0x128bd7=a51_0x5705c1,_0x5c51d0=await this[_0x128bd7(0x16c)]['killAttempt'](_0x2d93ee,_0x2a257f);return _0x5c51d0[_0x128bd7(0x186)];}async['retrySession'](_0x286000,_0x1c8add){const _0x191ef1=a51_0x5705c1,_0x1e84f5=await this[_0x191ef1(0x16c)]['retrySession'](_0x286000,{'from_task':_0x1c8add?.[_0x191ef1(0x17b)],'retry_params':_0x1c8add?.['retryParams']});return{'attemptId':_0x1e84f5['id'],'sessionId':_0x1e84f5['sessionId']};}async[a51_0x5705c1(0x19b)](_0x78fc11,_0xb4d0f5){const _0x3a8595=a51_0x5705c1,_0x10be3f=await this[_0x3a8595(0x16c)][_0x3a8595(0x19b)](_0x78fc11,{'resume_from':_0xb4d0f5?.[_0x3a8595(0x196)],'retry_params':_0xb4d0f5?.[_0x3a8595(0x16d)],'force':_0xb4d0f5?.[_0x3a8595(0x183)]});return{'attemptId':_0x10be3f['id'],'sessionId':_0x10be3f[_0x3a8595(0x156)]};}async[a51_0x5705c1(0x154)](_0x39a94f,_0x1cacf5,_0x3e2e0b){const _0x141d96=a51_0x5705c1,{promises:_0x5b415f}=await import('fs'),_0xf07c43=await import('path'),_0x14a0bf=await import('os'),_0x2dbed5=await import(_0x141d96(0x187)),{id:_0x3c2894,name:_0x16e401}=await this[_0x141d96(0x197)](_0x39a94f),_0x8bef75=_0x14a0bf['tmpdir'](),_0x55b578=_0xf07c43[_0x141d96(0x15b)](_0x8bef75,_0x141d96(0x1a8)+_0x3c2894+'-'+Date[_0x141d96(0x1a6)]()+'.tar.gz');try{await this[_0x141d96(0x16c)][_0x141d96(0x16b)](_0x3c2894,_0x55b578,_0x3e2e0b?.['revision']);const _0x5decfa=_0xf07c43[_0x141d96(0x15b)](_0x1cacf5,_0x16e401);await _0x5b415f[_0x141d96(0x15e)](_0x5decfa,{'recursive':!![]}),await _0x2dbed5[_0x141d96(0x1a5)]({'file':_0x55b578,'cwd':_0x5decfa,'gzip':!![]});const _0x2e6d9c=async _0x36499f=>{const _0x1f1092=_0x141d96;let _0x1a4475=0x0;const _0x4f639d=await _0x5b415f[_0x1f1092(0x199)](_0x36499f,{'withFileTypes':!![]});for(const _0x34ca91 of _0x4f639d){const _0x573f7f=_0xf07c43[_0x1f1092(0x15b)](_0x36499f,_0x34ca91[_0x1f1092(0x16f)]);if(_0x34ca91['isFile']())_0x1a4475++;else _0x34ca91[_0x1f1092(0x1a2)]()&&(_0x1a4475+=await _0x2e6d9c(_0x573f7f));}return _0x1a4475;},_0x273b4c=await _0x2e6d9c(_0x5decfa);return{'projectName':_0x16e401,'revision':_0x3e2e0b?.[_0x141d96(0x18e)]||'latest','filesExtracted':_0x273b4c};}finally{try{await _0x5b415f[_0x141d96(0x1a3)](_0x55b578);}catch{}}}async[a51_0x5705c1(0x192)](_0x39dee6,_0x39c46a){const _0x239fc7=a51_0x5705c1,{promises:_0x562b96}=await import('fs'),_0x4d470e=await import('path'),_0x2bb7be=await import(_0x239fc7(0x187)),_0x3326d1=_0x39c46a?.[_0x239fc7(0x157)]||_0x4d470e[_0x239fc7(0x169)](_0x39dee6),_0x2329ad=_0x39c46a?.[_0x239fc7(0x18e)]||new Date()[_0x239fc7(0x190)]()[_0x239fc7(0x177)](/[:.]/g,'-');try{await _0x562b96['access'](_0x39dee6);}catch{throw new Error('Project\x20directory\x20not\x20found:\x20'+_0x39dee6);}if(!_0x39c46a?.[_0x239fc7(0x163)]){const _0x37ee31=await _0x562b96['readdir'](_0x39dee6),_0x1c1023=_0x37ee31[_0x239fc7(0x195)](_0x117150=>_0x117150[_0x239fc7(0x153)](WORKFLOW_FILE_EXTENSION));if(_0x1c1023['length']===0x0)throw new Error(_0x239fc7(0x18a)+WORKFLOW_FILE_EXTENSION+_0x239fc7(0x159));for(const _0x1914c7 of _0x1c1023){const _0x264871=_0x4d470e[_0x239fc7(0x15b)](_0x39dee6,_0x1914c7);try{await _0x562b96[_0x239fc7(0x17f)](_0x264871);}catch{throw new Error(_0x239fc7(0x17a)+_0x1914c7);}}}const _0x33a162=async(_0x1354ca,_0x1a1ac9='')=>{const _0x4e68ba=_0x239fc7,_0x41f166=await _0x562b96['readdir'](_0x1354ca,{'withFileTypes':!![]}),_0x4ebe4d=[];for(const _0x58355a of _0x41f166){const _0xa1f6b7=_0x4d470e[_0x4e68ba(0x15b)](_0x1a1ac9,_0x58355a[_0x4e68ba(0x16f)]),_0x1cb4be=_0x4d470e['join'](_0x1354ca,_0x58355a['name']);if(!shouldIncludeInArchive(_0x58355a[_0x4e68ba(0x16f)]))continue;_0x58355a['isDirectory']()?_0x4ebe4d[_0x4e68ba(0x192)](...await _0x33a162(_0x1cb4be,_0xa1f6b7)):_0x4ebe4d['push'](_0xa1f6b7);}return _0x4ebe4d;},_0x5c8e35=await _0x33a162(_0x39dee6),_0x3eee7a=await import('os'),_0x3eb60d=_0x3eee7a['tmpdir'](),_0x210e2e=_0x4d470e[_0x239fc7(0x15b)](_0x3eb60d,_0x239fc7(0x188)+Date['now']()+_0x239fc7(0x1a1));try{await _0x2bb7be[_0x239fc7(0x172)]({'file':_0x210e2e,'gzip':!![],'cwd':_0x39dee6,'portable':!![]},_0x5c8e35);const _0x3e138b=await this['client']['uploadProjectArchive'](_0x3326d1,_0x2329ad,_0x210e2e,{'scheduleFrom':_0x39c46a?.[_0x239fc7(0x160)],'clearSchedule':_0x39c46a?.['clearSchedule'],'clearScheduleAll':_0x39c46a?.[_0x239fc7(0x184)]});return{'projectId':_0x3e138b['id'],'projectName':_0x3e138b[_0x239fc7(0x16f)],'revision':_0x3e138b[_0x239fc7(0x18e)]};}finally{try{await _0x562b96[_0x239fc7(0x1a3)](_0x210e2e);}catch{}}}async['delete'](_0x22700e){const _0x40a4e4=a51_0x5705c1,{id:_0x5bd035}=await this[_0x40a4e4(0x197)](_0x22700e),_0xfc39c7=await this[_0x40a4e4(0x16c)][_0x40a4e4(0x182)](_0x5bd035);return{'projectId':_0xfc39c7['id'],'projectName':_0xfc39c7[_0x40a4e4(0x16f)]};}}
1
+ function a51_0x273a(){const _0x1cdc92=['isDirectory','params','listAttempts','client','resolveProjectId','parentId','tdx-workflow-','\x20workflow\x20files\x20found\x20in\x20project\x20directory','tmpdir','19412305XeHMOX','retrySession','delete','replace','projectName','getTaskLogs','tdx-workflow-push-','22951zMJNhI','name','isFile','12evBWZa','workflow','sessionUuid','unlink','getAttempt','config','tar','387064VjfJNz','finishedAt','timezone','retryAttemptName','workflowName','deleteProject','NUMERIC_ID_PATTERN','index','revision','includeRetried','updatedAt','create','skipValidation','listProjects','state','data','No\x20','length','readdir','last_id','now','12qZkLuu','sessionTime','77qKOYxJ','listSessions','lastAttempt','access','path','toTime','startedAt','limit','retryParams','project','3703980MhCfLl','find','cancelRequested','sessionId','retryAt','66vcNmiZ','test','tasks','attempt','fullName','1164725JePkQO','latest','listWorkflows','force','projects','fromTime','Cannot\x20read\x20workflow\x20file:\x20','mkdir','error','446308XEVYUH','scheduleFrom','.tar.gz','resumeFrom','18CAcFir','fromTask','Project\x20not\x20found:\x20','stateParams','retryAttempt','isGroup','storeParams','workflows','push','join','sessions','filter','Project\x20directory\x20not\x20found:\x20','status','2399960FafqNd','basename','clearSchedule','extract','attempts','map','clearScheduleAll'];a51_0x273a=function(){return _0x1cdc92;};return a51_0x273a();}const a51_0x51d003=a51_0x2e1b;(function(_0x4c60b8,_0x57aa38){const _0x412322=a51_0x2e1b,_0x4fc833=_0x4c60b8();while(!![]){try{const _0x163eff=parseInt(_0x412322(0x132))/0x1*(parseInt(_0x412322(0xfb))/0x2)+parseInt(_0x412322(0xea))/0x3*(-parseInt(_0x412322(0x109))/0x4)+parseInt(_0x412322(0x100))/0x5+parseInt(_0x412322(0xf6))/0x6+parseInt(_0x412322(0xec))/0x7*(parseInt(_0x412322(0xd5))/0x8)+-parseInt(_0x412322(0x10d))/0x9*(-parseInt(_0x412322(0x11b))/0xa)+-parseInt(_0x412322(0x12b))/0xb*(parseInt(_0x412322(0xce))/0xc);if(_0x163eff===_0x57aa38)break;else _0x4fc833['push'](_0x4fc833['shift']());}catch(_0x193655){_0x4fc833['push'](_0x4fc833['shift']());}}}(a51_0x273a,0x63ce0));function a51_0x2e1b(_0xe0b2f2,_0x39ee77){const _0x273a9d=a51_0x273a();return a51_0x2e1b=function(_0x2e1bc2,_0x2d5568){_0x2e1bc2=_0x2e1bc2-0xcd;let _0x48fddc=_0x273a9d[_0x2e1bc2];return _0x48fddc;},a51_0x2e1b(_0xe0b2f2,_0x39ee77);}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';export class WorkflowAPI{[a51_0x51d003(0x125)];static [a51_0x51d003(0xdb)]=/^\d+$/;constructor(_0x40c375){this['client']=_0x40c375;}async[a51_0x51d003(0x126)](_0x63ca1c){const _0x133811=a51_0x51d003;if(WorkflowAPI[_0x133811(0xdb)][_0x133811(0xfc)](_0x63ca1c))return{'id':_0x63ca1c,'name':_0x63ca1c};const _0x15b194=await this[_0x133811(0x125)]['listProjects']({'name_pattern':_0x63ca1c}),_0x1d02c2=_0x15b194[_0x133811(0xe4)][_0x133811(0xf7)](_0x10bb32=>_0x10bb32[_0x133811(0x133)]===_0x63ca1c);if(!_0x1d02c2)throw new Error(_0x133811(0x10f)+_0x63ca1c);return{'id':_0x1d02c2['id'],'name':_0x1d02c2[_0x133811(0x133)]};}async[a51_0x51d003(0x104)](_0x2cede3,_0x188c13){const _0x250e4e=a51_0x51d003,_0x380ba4=await this[_0x250e4e(0x125)][_0x250e4e(0xe2)]({'name_pattern':_0x2cede3,..._0x188c13});return _0x380ba4[_0x250e4e(0xe4)][_0x250e4e(0x120)](_0x291ade=>({..._0x291ade,'project_id':_0x291ade['id'],'project_name':_0x291ade['name']}));}async[a51_0x51d003(0x114)](_0x2b20ee,_0x35bf7d){const _0x109054=a51_0x51d003,_0x3f248c=await this['client'][_0x109054(0x102)]({'project_name':_0x2b20ee,..._0x35bf7d});return _0x3f248c[_0x109054(0xe4)][_0x109054(0x120)](_0x69d44f=>({'project_id':_0x69d44f[_0x109054(0xf5)]?.['id'],'project_name':_0x69d44f[_0x109054(0xf5)]?.[_0x109054(0x133)],'workflow_id':_0x69d44f['id'],'workflow_name':_0x69d44f[_0x109054(0x133)],'revision':_0x69d44f['revision'],'timezone':_0x69d44f[_0x109054(0xd7)],'config':_0x69d44f[_0x109054(0xd3)],'id':_0x69d44f['id'],'name':_0x69d44f['name'],'project':_0x69d44f[_0x109054(0xf5)]}));}async[a51_0x51d003(0x117)](_0x3db439){const _0x8300ab=a51_0x51d003;let _0x50828a;if(_0x3db439?.['projectName']){let _0x16425a,_0x4a864b=![];while(!_0x4a864b){const _0xe29fc6=await this[_0x8300ab(0x125)][_0x8300ab(0xe2)]({'limit':0x64,'last_id':_0x16425a}),_0x5b7980=_0xe29fc6['data'][_0x8300ab(0xf7)](_0x4af9f1=>_0x4af9f1[_0x8300ab(0x133)]===_0x3db439['projectName']);if(_0x5b7980){_0x50828a=_0x5b7980['id'],_0x4a864b=!![];break;}if(!_0xe29fc6['lastId']||_0xe29fc6['data'][_0x8300ab(0xe6)]===0x0)break;_0x16425a=_0xe29fc6['lastId'];}if(!_0x50828a)throw new Error(_0x8300ab(0x10f)+_0x3db439[_0x8300ab(0x12f)]);}const _0x3995cf=await this[_0x8300ab(0x125)][_0x8300ab(0xed)]({'project_id':_0x50828a,'project_name':_0x3db439?.[_0x8300ab(0x12f)],'workflow_name':_0x3db439?.[_0x8300ab(0xd9)],'status':_0x3db439?.[_0x8300ab(0x11a)],'from_time':_0x3db439?.[_0x8300ab(0x105)],'to_time':_0x3db439?.[_0x8300ab(0xf1)],'limit':_0x3db439?.['limit'],'last_id':_0x3db439?.[_0x8300ab(0xe8)]});return _0x3995cf[_0x8300ab(0xe4)][_0x8300ab(0x120)](_0x43b3bb=>({'project_id':_0x43b3bb['project']?.['id'],'project_name':_0x43b3bb[_0x8300ab(0xf5)]?.[_0x8300ab(0x133)],'workflow_id':_0x43b3bb[_0x8300ab(0xcf)]?.['id'],'workflow_name':_0x43b3bb[_0x8300ab(0xcf)]?.[_0x8300ab(0x133)],'session_id':_0x43b3bb['id'],'sessionUuid':_0x43b3bb['sessionUuid'],'sessionTime':_0x43b3bb[_0x8300ab(0xeb)],'lastAttempt':_0x43b3bb[_0x8300ab(0xee)],'id':_0x43b3bb['id'],'project':_0x43b3bb[_0x8300ab(0xf5)],'workflow':_0x43b3bb[_0x8300ab(0xcf)]}));}async[a51_0x51d003(0x11f)](_0x5ea31d){const _0x12c7ce=a51_0x51d003,_0x3e51e9=await this['client'][_0x12c7ce(0x124)]({'project_name':_0x5ea31d?.[_0x12c7ce(0x12f)],'workflow_name':_0x5ea31d?.[_0x12c7ce(0xd9)],'include_retried':_0x5ea31d?.[_0x12c7ce(0xde)],'limit':_0x5ea31d?.[_0x12c7ce(0xf3)],'last_id':_0x5ea31d?.[_0x12c7ce(0xe8)]});return _0x3e51e9[_0x12c7ce(0xe4)][_0x12c7ce(0x120)](_0x3b3385=>({'project_id':_0x3b3385[_0x12c7ce(0xf5)]?.['id'],'project_name':_0x3b3385[_0x12c7ce(0xf5)]?.[_0x12c7ce(0x133)],'workflow_id':_0x3b3385['workflow']?.['id'],'workflow_name':_0x3b3385['workflow']?.[_0x12c7ce(0x133)],'session_id':_0x3b3385[_0x12c7ce(0xf9)],'sessionUuid':_0x3b3385[_0x12c7ce(0xd0)],'sessionTime':_0x3b3385[_0x12c7ce(0xeb)],'attempt_id':_0x3b3385['id'],'attempt_index':_0x3b3385[_0x12c7ce(0xdc)],'retryAttemptName':_0x3b3385[_0x12c7ce(0xd8)],'done':_0x3b3385['done'],'success':_0x3b3385['success'],'cancelRequested':_0x3b3385[_0x12c7ce(0xf8)],'params':_0x3b3385[_0x12c7ce(0x123)],'createdAt':_0x3b3385['createdAt'],'finishedAt':_0x3b3385[_0x12c7ce(0xd6)],'id':_0x3b3385['id'],'index':_0x3b3385[_0x12c7ce(0xdc)],'project':_0x3b3385['project'],'workflow':_0x3b3385[_0x12c7ce(0xcf)]}));}async[a51_0x51d003(0xfe)](_0x1f2ab5){const _0x2cfd39=a51_0x51d003,_0x4e568c=await this[_0x2cfd39(0x125)][_0x2cfd39(0xd2)](_0x1f2ab5);return _0x4e568c;}async[a51_0x51d003(0xfd)](_0x1d24c9,_0x1aabb4=![]){const _0x156d67=a51_0x51d003,_0x129251=await this[_0x156d67(0x125)]['getAttemptTasks'](_0x1d24c9,_0x1aabb4);return _0x129251['map'](_0x10c3dd=>({'task_id':_0x10c3dd['id'],'task_name':_0x10c3dd[_0x156d67(0xff)],'parentId':_0x10c3dd[_0x156d67(0x127)],'config':_0x10c3dd[_0x156d67(0xd3)],'upstreams':_0x10c3dd['upstreams'],'state':_0x10c3dd[_0x156d67(0xe3)],'exportParams':_0x10c3dd['exportParams'],'storeParams':_0x10c3dd[_0x156d67(0x113)],'stateParams':_0x10c3dd[_0x156d67(0x110)],'updatedAt':_0x10c3dd[_0x156d67(0xdf)],'retryAt':_0x10c3dd[_0x156d67(0xfa)],'startedAt':_0x10c3dd[_0x156d67(0xf2)],'error':_0x10c3dd[_0x156d67(0x108)],'isGroup':_0x10c3dd[_0x156d67(0x112)],'id':_0x10c3dd['id'],'fullName':_0x10c3dd[_0x156d67(0xff)]}));}async['logs'](_0x4ef776,_0x238536,_0x450dd9){const _0x1cb787=a51_0x51d003;return await this[_0x1cb787(0x125)][_0x1cb787(0x130)](_0x4ef776,_0x238536,_0x450dd9);}async['kill'](_0x55da95,_0x1c8eac){const _0x3cdcb3=a51_0x51d003,_0x4459fe=await this[_0x3cdcb3(0x125)]['killAttempt'](_0x55da95,_0x1c8eac);return _0x4459fe['message'];}async[a51_0x51d003(0x12c)](_0x3ca949,_0x37787b){const _0x16e1b6=a51_0x51d003,_0x4b764e=await this[_0x16e1b6(0x125)][_0x16e1b6(0x12c)](_0x3ca949,{'from_task':_0x37787b?.[_0x16e1b6(0x10e)],'retry_params':_0x37787b?.[_0x16e1b6(0xf4)]});return{'attemptId':_0x4b764e['id'],'sessionId':_0x4b764e[_0x16e1b6(0xf9)]};}async['retryAttempt'](_0x13bf90,_0x30636c){const _0x37ee19=a51_0x51d003,_0x1bfba4=await this[_0x37ee19(0x125)][_0x37ee19(0x111)](_0x13bf90,{'resume_from':_0x30636c?.[_0x37ee19(0x10c)],'retry_params':_0x30636c?.[_0x37ee19(0xf4)],'force':_0x30636c?.[_0x37ee19(0x103)]});return{'attemptId':_0x1bfba4['id'],'sessionId':_0x1bfba4[_0x37ee19(0xf9)]};}async['download'](_0x2c0337,_0x3c4a85,_0x1b6d07){const _0x3d9c93=a51_0x51d003,{promises:_0x3e9230}=await import('fs'),_0x3c8f4b=await import(_0x3d9c93(0xf0)),_0x59a2b5=await import('os'),_0x289d5d=await import(_0x3d9c93(0xd4)),{id:_0xbb330d,name:_0x3d73a3}=await this[_0x3d9c93(0x126)](_0x2c0337),_0x48c2bb=_0x59a2b5['tmpdir'](),_0x3e2d64=_0x3c8f4b[_0x3d9c93(0x116)](_0x48c2bb,_0x3d9c93(0x128)+_0xbb330d+'-'+Date['now']()+_0x3d9c93(0x10b));try{await this['client']['downloadProjectArchive'](_0xbb330d,_0x3e2d64,_0x1b6d07?.[_0x3d9c93(0xdd)]);const _0x22eb2f=_0x3c8f4b[_0x3d9c93(0x116)](_0x3c4a85,_0x3d73a3);await _0x3e9230[_0x3d9c93(0x107)](_0x22eb2f,{'recursive':!![]}),await _0x289d5d[_0x3d9c93(0x11e)]({'file':_0x3e2d64,'cwd':_0x22eb2f,'gzip':!![]});const _0x64991d=async _0x2401cc=>{const _0x3a9cc3=_0x3d9c93;let _0x20d96d=0x0;const _0x49bc8d=await _0x3e9230[_0x3a9cc3(0xe7)](_0x2401cc,{'withFileTypes':!![]});for(const _0x238ee5 of _0x49bc8d){const _0x1b8b73=_0x3c8f4b[_0x3a9cc3(0x116)](_0x2401cc,_0x238ee5[_0x3a9cc3(0x133)]);if(_0x238ee5[_0x3a9cc3(0xcd)]())_0x20d96d++;else _0x238ee5['isDirectory']()&&(_0x20d96d+=await _0x64991d(_0x1b8b73));}return _0x20d96d;},_0x46b371=await _0x64991d(_0x22eb2f);return{'projectName':_0x3d73a3,'revision':_0x1b6d07?.[_0x3d9c93(0xdd)]||_0x3d9c93(0x101),'filesExtracted':_0x46b371};}finally{try{await _0x3e9230[_0x3d9c93(0xd1)](_0x3e2d64);}catch{}}}async[a51_0x51d003(0x115)](_0x31ccec,_0x1990e8){const _0x5243cf=a51_0x51d003,{promises:_0x5ec4fd}=await import('fs'),_0x5c8932=await import('path'),_0x145f4b=await import(_0x5243cf(0xd4)),_0x10a91d=_0x1990e8?.[_0x5243cf(0x12f)]||_0x5c8932[_0x5243cf(0x11c)](_0x31ccec),_0x5acc0a=_0x1990e8?.[_0x5243cf(0xdd)]||new Date()['toISOString']()[_0x5243cf(0x12e)](/[:.]/g,'-');try{await _0x5ec4fd[_0x5243cf(0xef)](_0x31ccec);}catch{throw new Error(_0x5243cf(0x119)+_0x31ccec);}if(!_0x1990e8?.[_0x5243cf(0xe1)]){const _0xe11ecb=await _0x5ec4fd[_0x5243cf(0xe7)](_0x31ccec),_0x156c28=_0xe11ecb[_0x5243cf(0x118)](_0xb14df5=>_0xb14df5['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x156c28[_0x5243cf(0xe6)]===0x0)throw new Error(_0x5243cf(0xe5)+WORKFLOW_FILE_EXTENSION+_0x5243cf(0x129));for(const _0x53f97f of _0x156c28){const _0x3a9724=_0x5c8932[_0x5243cf(0x116)](_0x31ccec,_0x53f97f);try{await _0x5ec4fd[_0x5243cf(0xef)](_0x3a9724);}catch{throw new Error(_0x5243cf(0x106)+_0x53f97f);}}}const _0x50e10e=async(_0x1f1082,_0x2a64c5='')=>{const _0x2624d0=_0x5243cf,_0x1b989a=await _0x5ec4fd[_0x2624d0(0xe7)](_0x1f1082,{'withFileTypes':!![]}),_0x19652a=[];for(const _0x2c44de of _0x1b989a){const _0x3e0eaa=_0x5c8932[_0x2624d0(0x116)](_0x2a64c5,_0x2c44de[_0x2624d0(0x133)]),_0x354438=_0x5c8932[_0x2624d0(0x116)](_0x1f1082,_0x2c44de['name']);if(!shouldIncludeInArchive(_0x2c44de[_0x2624d0(0x133)]))continue;_0x2c44de[_0x2624d0(0x122)]()?_0x19652a['push'](...await _0x50e10e(_0x354438,_0x3e0eaa)):_0x19652a['push'](_0x3e0eaa);}return _0x19652a;},_0x10a35d=await _0x50e10e(_0x31ccec),_0x43c7d4=await import('os'),_0x1cae9b=_0x43c7d4[_0x5243cf(0x12a)](),_0x333a9e=_0x5c8932['join'](_0x1cae9b,_0x5243cf(0x131)+Date[_0x5243cf(0xe9)]()+_0x5243cf(0x10b));try{await _0x145f4b[_0x5243cf(0xe0)]({'file':_0x333a9e,'gzip':!![],'cwd':_0x31ccec,'portable':!![]},_0x10a35d);const _0x179140=await this['client']['uploadProjectArchive'](_0x10a91d,_0x5acc0a,_0x333a9e,{'scheduleFrom':_0x1990e8?.[_0x5243cf(0x10a)],'clearSchedule':_0x1990e8?.[_0x5243cf(0x11d)],'clearScheduleAll':_0x1990e8?.[_0x5243cf(0x121)]});return{'projectId':_0x179140['id'],'projectName':_0x179140['name'],'revision':_0x179140[_0x5243cf(0xdd)]};}finally{try{await _0x5ec4fd['unlink'](_0x333a9e);}catch{}}}async[a51_0x51d003(0x12d)](_0x161b79){const _0x249766=a51_0x51d003,{id:_0x40457d}=await this[_0x249766(0x126)](_0x161b79),_0x204875=await this[_0x249766(0x125)][_0x249766(0xda)](_0x40457d);return{'projectId':_0x204875['id'],'projectName':_0x204875['name']};}}
@@ -1 +1 @@
1
- const a54_0x42f597=a54_0xe4cb;(function(_0x269750,_0x4ea74a){const _0x75876f=a54_0xe4cb,_0x4d4bd1=_0x269750();while(!![]){try{const _0x39d552=parseInt(_0x75876f(0xcf))/0x1+-parseInt(_0x75876f(0xd3))/0x2+-parseInt(_0x75876f(0xe1))/0x3+parseInt(_0x75876f(0xdf))/0x4*(-parseInt(_0x75876f(0xd9))/0x5)+-parseInt(_0x75876f(0xc8))/0x6+-parseInt(_0x75876f(0xce))/0x7+parseInt(_0x75876f(0xe5))/0x8;if(_0x39d552===_0x4ea74a)break;else _0x4d4bd1['push'](_0x4d4bd1['shift']());}catch(_0x3aefbd){_0x4d4bd1['push'](_0x4d4bd1['shift']());}}}(a54_0x3f61,0x65f28));export const TD_ENDPOINTS={'us01':'https://api.treasuredata.com','jp01':a54_0x42f597(0xef),'eu01':a54_0x42f597(0xe4),'ap02':a54_0x42f597(0xec),'ap03':a54_0x42f597(0xee),'dev-us01':a54_0x42f597(0xf1),'dev-eu01':'https://api-development.eu01.treasuredata.com','stg-us01':'https://api-staging.us01.treasuredata.com','stg-jp01':a54_0x42f597(0xd6),'stg-ap03':a54_0x42f597(0xd4)};export const CDP_ENDPOINTS={'us01':'https://api-cdp.treasuredata.com','jp01':a54_0x42f597(0xe3),'eu01':a54_0x42f597(0xd1),'ap02':a54_0x42f597(0xcd),'ap03':a54_0x42f597(0xeb),'dev-us01':a54_0x42f597(0xf2),'dev-eu01':'https://api-development-cdp.eu01.treasuredata.com','stg-us01':'https://api-staging-cdp.us01.treasuredata.com','stg-jp01':a54_0x42f597(0xc9),'stg-ap03':'https://api-staging-cdp.ap03.treasuredata.com'};export const WORKFLOW_ENDPOINTS={'us01':a54_0x42f597(0xd5),'jp01':a54_0x42f597(0xde),'eu01':'https://api-workflow.eu01.treasuredata.com','ap02':'https://api-workflow.ap02.treasuredata.com','ap03':a54_0x42f597(0xe2),'dev-us01':'https://api-development-workflow.us01.treasuredata.com','dev-eu01':a54_0x42f597(0xdc),'stg-us01':a54_0x42f597(0xdb),'stg-jp01':a54_0x42f597(0xea),'stg-ap03':'https://api-staging-workflow.ap03.treasuredata.com'};export const TRINO_ENDPOINTS={'us01':a54_0x42f597(0xf0),'jp01':a54_0x42f597(0xe8),'eu01':a54_0x42f597(0xe7),'ap02':a54_0x42f597(0xe0),'ap03':'https://api-presto.ap03.treasuredata.com','dev-us01':'https://api-development-presto.treasuredata.com','dev-eu01':a54_0x42f597(0xd0),'stg-us01':a54_0x42f597(0xca),'stg-jp01':a54_0x42f597(0xe9),'stg-ap03':'https://api-staging-presto.ap03.treasuredata.com'};export const LLM_ENDPOINTS={'us01':'https://llm-api.treasuredata.com','jp01':'https://llm-api.treasuredata.co.jp','eu01':a54_0x42f597(0xed),'ap02':a54_0x42f597(0xcb),'ap03':a54_0x42f597(0xd8),'dev-us01':a54_0x42f597(0xda),'dev-eu01':a54_0x42f597(0xd2),'stg-us01':a54_0x42f597(0xcc),'stg-jp01':a54_0x42f597(0xe6),'stg-ap03':a54_0x42f597(0xd7)};function a54_0x3f61(){const _0x14a95e=['https://api-development-cdp.us01.treasuredata.com','1875816WjDKBI','https://api-staging-cdp.treasuredata.co.jp','https://api-staging-presto.treasuredata.com','https://llm-api.ap02.treasuredata.com','https://llm-api-staging.us01.treasuredata.com','https://api-cdp.ap02.treasuredata.com','5104015hdgBzs','98527mUSxdw','https://api-development-presto.eu01.treasuredata.com','https://api-cdp.eu01.treasuredata.com','https://llm-api-development.eu01.treasuredata.com','1565328VWqhHI','https://api-staging.ap03.treasuredata.com','https://api-workflow.treasuredata.com','https://api-staging.treasuredata.co.jp','https://llm-api-staging.ap03.treasuredata.com','https://llm-api.ap03.treasuredata.com','60040FyIcmM','https://llm-api-development.us01.treasuredata.com','https://api-staging-workflow.us01.treasuredata.com','https://api-development-workflow.eu01.treasuredata.com','No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27','https://api-workflow.treasuredata.co.jp','140ukGvlN','https://api-presto.ap02.treasuredata.com','983955fhcchV','https://api-workflow.ap03.treasuredata.com','https://api-cdp.treasuredata.co.jp','https://api.eu01.treasuredata.com','23134072fJNJtI','https://llm-api-staging.treasuredata.co.jp','https://api-presto.eu01.treasuredata.com','https://api-presto.treasuredata.co.jp','https://api-staging-presto.treasuredata.co.jp','https://api-staging-workflow.treasuredata.co.jp','https://api-cdp.ap03.treasuredata.com','https://api.ap02.treasuredata.com','https://llm-api.eu01.treasuredata.com','https://api.ap03.treasuredata.com','https://api.treasuredata.co.jp','https://api-presto.treasuredata.com','https://api-development.us01.treasuredata.com'];a54_0x3f61=function(){return _0x14a95e;};return a54_0x3f61();}export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS};function a54_0xe4cb(_0x546394,_0x17759){const _0x3f61b8=a54_0x3f61();return a54_0xe4cb=function(_0xe4cbd5,_0x362efc){_0xe4cbd5=_0xe4cbd5-0xc8;let _0x3d4ec3=_0x3f61b8[_0xe4cbd5];return _0x3d4ec3;},a54_0xe4cb(_0x546394,_0x17759);}export function getEndpoint(_0x4dfcf5,_0x433be9='td'){const _0x14ee61=a54_0x42f597,_0x43196e=API_ENDPOINTS[_0x433be9]?.[_0x4dfcf5];if(!_0x43196e)throw new Error(_0x14ee61(0xdd)+_0x433be9+'\x27\x20and\x20site\x20\x27'+_0x4dfcf5+'\x27');return _0x43196e;}
1
+ const a54_0x4417aa=a54_0x24a6;(function(_0x2a5f1c,_0x4b3a3e){const _0x3336f2=a54_0x24a6,_0x59b41f=_0x2a5f1c();while(!![]){try{const _0x420431=-parseInt(_0x3336f2(0x173))/0x1+parseInt(_0x3336f2(0x197))/0x2+-parseInt(_0x3336f2(0x175))/0x3+-parseInt(_0x3336f2(0x195))/0x4*(-parseInt(_0x3336f2(0x182))/0x5)+parseInt(_0x3336f2(0x183))/0x6*(-parseInt(_0x3336f2(0x18c))/0x7)+-parseInt(_0x3336f2(0x16f))/0x8+parseInt(_0x3336f2(0x172))/0x9*(parseInt(_0x3336f2(0x18d))/0xa);if(_0x420431===_0x4b3a3e)break;else _0x59b41f['push'](_0x59b41f['shift']());}catch(_0x527c29){_0x59b41f['push'](_0x59b41f['shift']());}}}(a54_0x1b45,0x19ba1));export const TD_ENDPOINTS={'us01':'https://api.treasuredata.com','jp01':a54_0x4417aa(0x17c),'eu01':a54_0x4417aa(0x189),'ap02':a54_0x4417aa(0x18b),'ap03':a54_0x4417aa(0x19a),'dev-us01':a54_0x4417aa(0x191),'dev-eu01':a54_0x4417aa(0x179),'stg-us01':a54_0x4417aa(0x18e),'stg-jp01':a54_0x4417aa(0x18f),'stg-ap03':'https://api-staging.ap03.treasuredata.com'};export const CDP_ENDPOINTS={'us01':a54_0x4417aa(0x19d),'jp01':a54_0x4417aa(0x178),'eu01':'https://api-cdp.eu01.treasuredata.com','ap02':a54_0x4417aa(0x190),'ap03':a54_0x4417aa(0x170),'dev-us01':'https://api-development-cdp.us01.treasuredata.com','dev-eu01':'https://api-development-cdp.eu01.treasuredata.com','stg-us01':a54_0x4417aa(0x171),'stg-jp01':a54_0x4417aa(0x194),'stg-ap03':a54_0x4417aa(0x18a)};export const WORKFLOW_ENDPOINTS={'us01':a54_0x4417aa(0x16e),'jp01':'https://api-workflow.treasuredata.co.jp','eu01':a54_0x4417aa(0x177),'ap02':a54_0x4417aa(0x17e),'ap03':a54_0x4417aa(0x1a2),'dev-us01':a54_0x4417aa(0x186),'dev-eu01':a54_0x4417aa(0x19b),'stg-us01':a54_0x4417aa(0x19e),'stg-jp01':a54_0x4417aa(0x199),'stg-ap03':a54_0x4417aa(0x184)};export const TRINO_ENDPOINTS={'us01':a54_0x4417aa(0x174),'jp01':a54_0x4417aa(0x1a0),'eu01':a54_0x4417aa(0x176),'ap02':a54_0x4417aa(0x1a1),'ap03':a54_0x4417aa(0x192),'dev-us01':'https://api-development-presto.treasuredata.com','dev-eu01':a54_0x4417aa(0x16d),'stg-us01':'https://api-staging-presto.treasuredata.com','stg-jp01':a54_0x4417aa(0x188),'stg-ap03':a54_0x4417aa(0x193)};function a54_0x1b45(){const _0x179d85=['https://api-staging.treasuredata.co.jp','https://api-cdp.ap02.treasuredata.com','https://api-development.us01.treasuredata.com','https://api-presto.ap03.treasuredata.com','https://api-staging-presto.ap03.treasuredata.com','https://api-staging-cdp.treasuredata.co.jp','4SpfWPM','https://llm-api.treasuredata.co.jp','309100iRDmLC','No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27','https://api-staging-workflow.treasuredata.co.jp','https://api.ap03.treasuredata.com','https://api-development-workflow.eu01.treasuredata.com','https://llm-api-staging.treasuredata.co.jp','https://api-cdp.treasuredata.com','https://api-staging-workflow.us01.treasuredata.com','https://llm-api.eu01.treasuredata.com','https://api-presto.treasuredata.co.jp','https://api-presto.ap02.treasuredata.com','https://api-workflow.ap03.treasuredata.com','https://api-development-presto.eu01.treasuredata.com','https://api-workflow.treasuredata.com','477008KLNaRE','https://api-cdp.ap03.treasuredata.com','https://api-staging-cdp.us01.treasuredata.com','2605653ylcZpB','32336cpQRwd','https://api-presto.treasuredata.com','346617DrXzlw','https://api-presto.eu01.treasuredata.com','https://api-workflow.eu01.treasuredata.com','https://api-cdp.treasuredata.co.jp','https://api-development.eu01.treasuredata.com','https://llm-api-development.us01.treasuredata.com','https://llm-api-staging.us01.treasuredata.com','https://api.treasuredata.co.jp','\x27\x20and\x20site\x20\x27','https://api-workflow.ap02.treasuredata.com','https://llm-api.treasuredata.com','https://llm-api.ap02.treasuredata.com','https://llm-api-staging.ap03.treasuredata.com','293620alBqrY','6lGvOnv','https://api-staging-workflow.ap03.treasuredata.com','https://llm-api-development.eu01.treasuredata.com','https://api-development-workflow.us01.treasuredata.com','https://llm-api.ap03.treasuredata.com','https://api-staging-presto.treasuredata.co.jp','https://api.eu01.treasuredata.com','https://api-staging-cdp.ap03.treasuredata.com','https://api.ap02.treasuredata.com','1329391VuKpeJ','10qhaNbI','https://api-staging.us01.treasuredata.com'];a54_0x1b45=function(){return _0x179d85;};return a54_0x1b45();}function a54_0x24a6(_0x51f281,_0x2af855){const _0x1b4592=a54_0x1b45();return a54_0x24a6=function(_0x24a6aa,_0x949b5a){_0x24a6aa=_0x24a6aa-0x16d;let _0x4121b2=_0x1b4592[_0x24a6aa];return _0x4121b2;},a54_0x24a6(_0x51f281,_0x2af855);}export const LLM_ENDPOINTS={'us01':a54_0x4417aa(0x17f),'jp01':a54_0x4417aa(0x196),'eu01':a54_0x4417aa(0x19f),'ap02':a54_0x4417aa(0x180),'ap03':a54_0x4417aa(0x187),'dev-us01':a54_0x4417aa(0x17a),'dev-eu01':a54_0x4417aa(0x185),'stg-us01':a54_0x4417aa(0x17b),'stg-jp01':a54_0x4417aa(0x19c),'stg-ap03':a54_0x4417aa(0x181)};export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS};export function getEndpoint(_0x263f72,_0x57164c='td'){const _0x2d95a5=a54_0x4417aa,_0x167123=API_ENDPOINTS[_0x57164c]?.[_0x263f72];if(!_0x167123)throw new Error(_0x2d95a5(0x198)+_0x57164c+_0x2d95a5(0x17d)+_0x263f72+'\x27');return _0x167123;}
@@ -1 +1 @@
1
- function a55_0x17cd(_0x4c59a7,_0x10171f){const _0x420dce=a55_0x420d();return a55_0x17cd=function(_0x17cd44,_0xf2f03b){_0x17cd44=_0x17cd44-0x1b2;let _0x591089=_0x420dce[_0x17cd44];return _0x591089;},a55_0x17cd(_0x4c59a7,_0x10171f);}function a55_0x420d(){const _0x3a9fd0=['830ujgNco','17622kJJcpQ','us01','10119688DSyOEZ','dev-us01','979614TWiUpx','27fgaIAu','3UHxvaI','8367684gQUtJW','jp01','7IDEUWw','12783210DuIAcI','7380EjFtJn','7216415sgUZjt'];a55_0x420d=function(){return _0x3a9fd0;};return a55_0x420d();}const a55_0x4a7603=a55_0x17cd;(function(_0x24524f,_0x1b9cf5){const _0x2a318c=a55_0x17cd,_0x42e132=_0x24524f();while(!![]){try{const _0x406847=parseInt(_0x2a318c(0x1b2))/0x1*(-parseInt(_0x2a318c(0x1be))/0x2)+-parseInt(_0x2a318c(0x1bf))/0x3*(-parseInt(_0x2a318c(0x1b7))/0x4)+parseInt(_0x2a318c(0x1b8))/0x5+-parseInt(_0x2a318c(0x1b3))/0x6+-parseInt(_0x2a318c(0x1b5))/0x7*(-parseInt(_0x2a318c(0x1bc))/0x8)+parseInt(_0x2a318c(0x1ba))/0x9*(-parseInt(_0x2a318c(0x1b9))/0xa)+parseInt(_0x2a318c(0x1b6))/0xb;if(_0x406847===_0x1b9cf5)break;else _0x42e132['push'](_0x42e132['shift']());}catch(_0x2dbecc){_0x42e132['push'](_0x42e132['shift']());}}}(a55_0x420d,0xd20fa));export const SITE_ALIASES={'us':a55_0x4a7603(0x1bb),'aws':a55_0x4a7603(0x1bb),'jp':a55_0x4a7603(0x1b4),'aws-tokyo':'jp01','dev':a55_0x4a7603(0x1bd),'stg':'stg-us01'};export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
1
+ function a55_0x2841(_0x197fad,_0x1927ce){const _0x3d4922=a55_0x3d49();return a55_0x2841=function(_0x28419d,_0x27be72){_0x28419d=_0x28419d-0x157;let _0xfd3fa5=_0x3d4922[_0x28419d];return _0xfd3fa5;},a55_0x2841(_0x197fad,_0x1927ce);}function a55_0x3d49(){const _0x384fd5=['19wmfTSi','1455780doEFbt','1260932xEENeF','387eiwqmz','39718DzlfJR','160870GsgHQW','35rmRwbM','jp01','736464lMWoHI','dev-us01','us01','271720ZIoQLf','207993OFaaUf','stg-us01'];a55_0x3d49=function(){return _0x384fd5;};return a55_0x3d49();}const a55_0x5e31b1=a55_0x2841;(function(_0x4cf7ff,_0x1a94c7){const _0x856b8f=a55_0x2841,_0x4e71e9=_0x4cf7ff();while(!![]){try{const _0x3cb620=parseInt(_0x856b8f(0x160))/0x1*(parseInt(_0x856b8f(0x164))/0x2)+parseInt(_0x856b8f(0x15e))/0x3+-parseInt(_0x856b8f(0x162))/0x4+-parseInt(_0x856b8f(0x161))/0x5+-parseInt(_0x856b8f(0x15a))/0x6+parseInt(_0x856b8f(0x158))/0x7*(-parseInt(_0x856b8f(0x15d))/0x8)+-parseInt(_0x856b8f(0x163))/0x9*(-parseInt(_0x856b8f(0x157))/0xa);if(_0x3cb620===_0x1a94c7)break;else _0x4e71e9['push'](_0x4e71e9['shift']());}catch(_0x5eff53){_0x4e71e9['push'](_0x4e71e9['shift']());}}}(a55_0x3d49,0x3a74b));export const SITE_ALIASES={'us':a55_0x5e31b1(0x15c),'aws':a55_0x5e31b1(0x15c),'jp':a55_0x5e31b1(0x159),'aws-tokyo':a55_0x5e31b1(0x159),'dev':a55_0x5e31b1(0x15b),'stg':a55_0x5e31b1(0x15f)};export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
@@ -1 +1 @@
1
- function a58_0x2367(_0x3f878e,_0x121619){const _0x35ef7d=a58_0x35ef();return a58_0x2367=function(_0x236729,_0x31093f){_0x236729=_0x236729-0x193;let _0x1f22a5=_0x35ef7d[_0x236729];return _0x1f22a5;},a58_0x2367(_0x3f878e,_0x121619);}(function(_0x858406,_0x3c498c){const _0x245f15=a58_0x2367,_0xea9f00=_0x858406();while(!![]){try{const _0x182562=parseInt(_0x245f15(0x19a))/0x1+parseInt(_0x245f15(0x19c))/0x2+-parseInt(_0x245f15(0x198))/0x3*(-parseInt(_0x245f15(0x196))/0x4)+parseInt(_0x245f15(0x1a0))/0x5*(-parseInt(_0x245f15(0x19d))/0x6)+parseInt(_0x245f15(0x1a2))/0x7+parseInt(_0x245f15(0x193))/0x8*(-parseInt(_0x245f15(0x1a1))/0x9)+-parseInt(_0x245f15(0x19e))/0xa*(parseInt(_0x245f15(0x197))/0xb);if(_0x182562===_0x3c498c)break;else _0xea9f00['push'](_0xea9f00['shift']());}catch(_0x4e9896){_0xea9f00['push'](_0xea9f00['shift']());}}}(a58_0x35ef,0x5999b));export function parseAgentRef(_0x2e6ad2){const _0x296937=a58_0x2367;if(!_0x2e6ad2||_0x2e6ad2['trim']()==='')throw new Error(_0x296937(0x19b));const _0x1c1f1c=_0x2e6ad2['trim'](),_0x370bcf=_0x1c1f1c[_0x296937(0x194)]('/');if(_0x370bcf[_0x296937(0x199)]===0x1)return{'projectName':_0x370bcf[0x0],'agentName':undefined};else{if(_0x370bcf[_0x296937(0x199)]===0x2){const [_0x5e016c,_0x1209fa]=_0x370bcf;if(!_0x5e016c||_0x5e016c['trim']()==='')throw new Error(_0x296937(0x19f));if(!_0x1209fa||_0x1209fa[_0x296937(0x1a4)]()==='')throw new Error(_0x296937(0x1a3));return{'projectName':_0x5e016c[_0x296937(0x1a4)](),'agentName':_0x1209fa[_0x296937(0x1a4)]()};}else throw new Error('Invalid\x20agent\x20reference\x20format:\x20'+_0x2e6ad2+_0x296937(0x195));}}function a58_0x35ef(){const _0x20bd80=['trim','56kCotPX','split','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22','625804YYEsRl','11NfKsXR','3VEEkdv','length','511573vRFHVW','Agent\x20reference\x20cannot\x20be\x20empty','650152bwCTbU','44286jAqAcS','4612710VKmpnI','Project\x20name\x20cannot\x20be\x20empty','20kauZQG','186741QWZHOl','69587KroXTd','Agent\x20name\x20cannot\x20be\x20empty'];a58_0x35ef=function(){return _0x20bd80;};return a58_0x35ef();}
1
+ function a58_0x1293(){const _0x9ed842=['249668rPkiiR','8kIqyPo','458523XbvBDb','2729410fNTSpP','trim','509604OgAKMA','Invalid\x20agent\x20reference\x20format:\x20','Project\x20name\x20cannot\x20be\x20empty','521108hhKfbi','30611sOyAvy','305845uHfFBV','66dMQkGl','length','39GkASdH','split','Agent\x20name\x20cannot\x20be\x20empty','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22'];a58_0x1293=function(){return _0x9ed842;};return a58_0x1293();}function a58_0x2115(_0x15c728,_0x6de8dd){const _0x129311=a58_0x1293();return a58_0x2115=function(_0x2115bd,_0x3af337){_0x2115bd=_0x2115bd-0x156;let _0x94b60=_0x129311[_0x2115bd];return _0x94b60;},a58_0x2115(_0x15c728,_0x6de8dd);}(function(_0x17e981,_0x3bfc0d){const _0x5375ae=a58_0x2115,_0x567e9a=_0x17e981();while(!![]){try{const _0x857e6c=parseInt(_0x5375ae(0x15c))/0x1+parseInt(_0x5375ae(0x15f))/0x2+-parseInt(_0x5375ae(0x164))/0x3*(parseInt(_0x5375ae(0x157))/0x4)+parseInt(_0x5375ae(0x161))/0x5*(parseInt(_0x5375ae(0x162))/0x6)+-parseInt(_0x5375ae(0x160))/0x7*(-parseInt(_0x5375ae(0x158))/0x8)+parseInt(_0x5375ae(0x159))/0x9+-parseInt(_0x5375ae(0x15a))/0xa;if(_0x857e6c===_0x3bfc0d)break;else _0x567e9a['push'](_0x567e9a['shift']());}catch(_0x5e0acd){_0x567e9a['push'](_0x567e9a['shift']());}}}(a58_0x1293,0x65117));export function parseAgentRef(_0x14789f){const _0x3d6c76=a58_0x2115;if(!_0x14789f||_0x14789f[_0x3d6c76(0x15b)]()==='')throw new Error('Agent\x20reference\x20cannot\x20be\x20empty');const _0x558ae8=_0x14789f[_0x3d6c76(0x15b)](),_0x773a48=_0x558ae8[_0x3d6c76(0x165)]('/');if(_0x773a48['length']===0x1)return{'projectName':_0x773a48[0x0],'agentName':undefined};else{if(_0x773a48[_0x3d6c76(0x163)]===0x2){const [_0x547971,_0x435b90]=_0x773a48;if(!_0x547971||_0x547971[_0x3d6c76(0x15b)]()==='')throw new Error(_0x3d6c76(0x15e));if(!_0x435b90||_0x435b90[_0x3d6c76(0x15b)]()==='')throw new Error(_0x3d6c76(0x166));return{'projectName':_0x547971[_0x3d6c76(0x15b)](),'agentName':_0x435b90['trim']()};}else throw new Error(_0x3d6c76(0x15d)+_0x14789f+_0x3d6c76(0x156));}}
@@ -1 +1 @@
1
- (function(_0x1d1074,_0x21bf5b){const _0x1e5382=a59_0x175c,_0x4a632c=_0x1d1074();while(!![]){try{const _0x5345ab=parseInt(_0x1e5382(0x11a))/0x1*(-parseInt(_0x1e5382(0x117))/0x2)+parseInt(_0x1e5382(0x119))/0x3+parseInt(_0x1e5382(0x122))/0x4*(parseInt(_0x1e5382(0x11f))/0x5)+-parseInt(_0x1e5382(0x11d))/0x6+parseInt(_0x1e5382(0x121))/0x7+-parseInt(_0x1e5382(0x116))/0x8*(-parseInt(_0x1e5382(0x120))/0x9)+parseInt(_0x1e5382(0x11c))/0xa;if(_0x5345ab===_0x21bf5b)break;else _0x4a632c['push'](_0x4a632c['shift']());}catch(_0x57da07){_0x4a632c['push'](_0x4a632c['shift']());}}}(a59_0x5603,0x6e24a));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){const _0x50a6fc=a59_0x175c;return join(process[_0x50a6fc(0x11b)](),'.cache','tdx');}function getLastChatIdPath(){const _0x10dcd9=a59_0x175c;return join(getCacheDir(),_0x10dcd9(0x11e));}function ensureCacheDir(){const _0x5abbd7=getCacheDir();!existsSync(_0x5abbd7)&&mkdirSync(_0x5abbd7,{'recursive':!![]});}function a59_0x175c(_0x209f80,_0x1ddc72){const _0x5603d2=a59_0x5603();return a59_0x175c=function(_0x175cef,_0x21c69c){_0x175cef=_0x175cef-0x116;let _0x510700=_0x5603d2[_0x175cef];return _0x510700;},a59_0x175c(_0x209f80,_0x1ddc72);}export function saveLastChatId(_0x93ff1a){const _0x49964f=a59_0x175c;ensureCacheDir();const _0x1aa7b7=getLastChatIdPath();writeFileSync(_0x1aa7b7,_0x93ff1a,_0x49964f(0x118));}export function loadLastChatId(){const _0x526de2=a59_0x175c,_0x2d53fa=getLastChatIdPath();if(!existsSync(_0x2d53fa))return undefined;try{const _0x317b8c=readFileSync(_0x2d53fa,_0x526de2(0x118))['trim']();return _0x317b8c||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x26655b=a59_0x175c,_0x463605=getLastChatIdPath();if(existsSync(_0x463605))try{writeFileSync(_0x463605,'',_0x26655b(0x118));}catch{}}function a59_0x5603(){const _0x498321=['9FFIlsN','1715259bOleKE','546332zcZDec','4335424qaIbUk','215242nRcyop','utf-8','762057jPhNwE','7Ixyrzw','cwd','5565750AWJyPL','4816890lGmGZY','last_chat_id','15vAHkRZ'];a59_0x5603=function(){return _0x498321;};return a59_0x5603();}
1
+ (function(_0x59b95f,_0x5a0660){const _0xbfacc7=a59_0x2b45,_0x4318d6=_0x59b95f();while(!![]){try{const _0xcfbaec=parseInt(_0xbfacc7(0x83))/0x1*(-parseInt(_0xbfacc7(0x85))/0x2)+-parseInt(_0xbfacc7(0x81))/0x3*(-parseInt(_0xbfacc7(0x7c))/0x4)+-parseInt(_0xbfacc7(0x79))/0x5*(parseInt(_0xbfacc7(0x7b))/0x6)+parseInt(_0xbfacc7(0x82))/0x7+parseInt(_0xbfacc7(0x7f))/0x8+-parseInt(_0xbfacc7(0x84))/0x9*(-parseInt(_0xbfacc7(0x77))/0xa)+parseInt(_0xbfacc7(0x7d))/0xb;if(_0xcfbaec===_0x5a0660)break;else _0x4318d6['push'](_0x4318d6['shift']());}catch(_0x127f71){_0x4318d6['push'](_0x4318d6['shift']());}}}(a59_0x4bdc,0x83a0a));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';function a59_0x2b45(_0x45082b,_0x14d16a){const _0x4bdcb9=a59_0x4bdc();return a59_0x2b45=function(_0x2b452a,_0x6169f){_0x2b452a=_0x2b452a-0x77;let _0x5d1860=_0x4bdcb9[_0x2b452a];return _0x5d1860;},a59_0x2b45(_0x45082b,_0x14d16a);}import{join}from'path';function getCacheDir(){const _0x71e6ba=a59_0x2b45;return join(process[_0x71e6ba(0x80)](),_0x71e6ba(0x7a),_0x71e6ba(0x7e));}function getLastChatIdPath(){return join(getCacheDir(),'last_chat_id');}function ensureCacheDir(){const _0x429442=getCacheDir();!existsSync(_0x429442)&&mkdirSync(_0x429442,{'recursive':!![]});}function a59_0x4bdc(){const _0x452be1=['40AFQHcU','utf-8','835NEfaxE','.cache','36258WczDpq','3788uxoMJz','7602716AReRgh','tdx','1470352bwkRGM','cwd','2313IYRtwp','2582657Yuwocx','30669VcoURk','1457334Lgialu','70uausTv'];a59_0x4bdc=function(){return _0x452be1;};return a59_0x4bdc();}export function saveLastChatId(_0x4d1bc9){const _0x4050ca=a59_0x2b45;ensureCacheDir();const _0x2a67fd=getLastChatIdPath();writeFileSync(_0x2a67fd,_0x4d1bc9,_0x4050ca(0x78));}export function loadLastChatId(){const _0x4306be=getLastChatIdPath();if(!existsSync(_0x4306be))return undefined;try{const _0xf6d2d=readFileSync(_0x4306be,'utf-8')['trim']();return _0xf6d2d||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x4b337d=getLastChatIdPath();if(existsSync(_0x4b337d))try{writeFileSync(_0x4b337d,'','utf-8');}catch{}}
@@ -1 +1 @@
1
- (function(_0x4f4018,_0xda66ba){const _0x56812d=a60_0x1c4e,_0x42750f=_0x4f4018();while(!![]){try{const _0x17b616=-parseInt(_0x56812d(0x1d3))/0x1*(-parseInt(_0x56812d(0x1d4))/0x2)+parseInt(_0x56812d(0x1e2))/0x3*(-parseInt(_0x56812d(0x1cd))/0x4)+parseInt(_0x56812d(0x1db))/0x5+parseInt(_0x56812d(0x1e6))/0x6+parseInt(_0x56812d(0x1d6))/0x7+parseInt(_0x56812d(0x1d0))/0x8+-parseInt(_0x56812d(0x1d9))/0x9*(parseInt(_0x56812d(0x1d2))/0xa);if(_0x17b616===_0xda66ba)break;else _0x42750f['push'](_0x42750f['shift']());}catch(_0x24b54f){_0x42750f['push'](_0x42750f['shift']());}}}(a60_0x5074,0xbb92b));import{Chalk}from'chalk';export function shouldUseColor(_0x17c281={}){const _0x4aaeb2=a60_0x1c4e;if(_0x17c281['noColor']===!![])return![];if(_0x17c281[_0x4aaeb2(0x1e1)]===!![])return!![];if(process['env'][_0x4aaeb2(0x1cf)]!==undefined)return![];return process[_0x4aaeb2(0x1e5)][_0x4aaeb2(0x1e7)]??![];}function a60_0x5074(){const _0xf555de=['228770sfcilb','1lKjetB','870718KZyWdQ','blue','10684667xMhowM','cyan','string','405FOGEYD','boolean','464610ezuabE','entries','join','stringify','map','length','color','3tNAopP','isArray','green','stdout','2193090CBKbft','isTTY','dim','number','5904004JcmKit','null','NO_COLOR','6828704wLrVma','repeat'];a60_0x5074=function(){return _0xf555de;};return a60_0x5074();}function getChalk(_0x5b019a={}){if(shouldUseColor(_0x5b019a))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x2cc1d4,_0x48c397={}){return getChalk(_0x48c397)['dim'](_0x2cc1d4);}export function colorHeader(_0x2b1eb3,_0x424a8b={}){const _0x375b65=a60_0x1c4e;return getChalk(_0x424a8b)[_0x375b65(0x1d7)](_0x2b1eb3);}export function colorType(_0x158cae,_0x5524a1={}){const _0x46b479=a60_0x1c4e;return getChalk(_0x5524a1)[_0x46b479(0x1cb)](_0x158cae);}function a60_0x1c4e(_0x5e2df5,_0x5111a1){const _0x507451=a60_0x5074();return a60_0x1c4e=function(_0x1c4e07,_0xcf5be9){_0x1c4e07=_0x1c4e07-0x1cb;let _0xf49d8f=_0x507451[_0x1c4e07];return _0xf49d8f;},a60_0x1c4e(_0x5e2df5,_0x5111a1);}export function colorJSONKey(_0x25bf7a,_0x12e886={}){const _0x46ce72=a60_0x1c4e;return getChalk(_0x12e886)[_0x46ce72(0x1d5)](_0x25bf7a);}export function colorJSONString(_0x1fdbbf,_0x338f45={}){const _0x375c67=a60_0x1c4e;return getChalk(_0x338f45)[_0x375c67(0x1e4)](_0x1fdbbf);}export function colorJSONNumber(_0x3721d4,_0x4e7f2c={}){const _0x437b3d=a60_0x1c4e;return getChalk(_0x4e7f2c)[_0x437b3d(0x1d7)](_0x3721d4);}export function colorJSONBoolean(_0x38f5c2,_0x4674e5={}){return getChalk(_0x4674e5)['yellow'](_0x38f5c2);}export function colorJSONNull(_0x41fa70,_0x5e8c3c={}){return getChalk(_0x5e8c3c)['dim'](_0x41fa70);}export function colorizeJSONCompact(_0x261524,_0x32c514={}){const _0x396379=a60_0x1c4e;if(!shouldUseColor(_0x32c514))return JSON[_0x396379(0x1de)](_0x261524);if(_0x261524===null)return colorJSONNull(_0x396379(0x1ce),_0x32c514);if(typeof _0x261524===_0x396379(0x1da))return colorJSONBoolean(String(_0x261524),_0x32c514);if(typeof _0x261524===_0x396379(0x1cc))return colorJSONNumber(String(_0x261524),_0x32c514);if(typeof _0x261524===_0x396379(0x1d8))return colorJSONString(JSON['stringify'](_0x261524),_0x32c514);if(Array['isArray'](_0x261524)){if(_0x261524[_0x396379(0x1e0)]===0x0)return'[]';const _0x30ea96=_0x261524[_0x396379(0x1df)](_0x2e177c=>colorizeJSONCompact(_0x2e177c,_0x32c514));return'['+_0x30ea96[_0x396379(0x1dd)](',')+']';}if(typeof _0x261524==='object'){const _0x26e43e=Object[_0x396379(0x1dc)](_0x261524);if(_0x26e43e[_0x396379(0x1e0)]===0x0)return'{}';const _0x4ebb52=_0x26e43e[_0x396379(0x1df)](([_0x30ba6b,_0x2b828b])=>{const _0x4ba0e0=_0x396379,_0x76b5c1=colorJSONKey(JSON[_0x4ba0e0(0x1de)](_0x30ba6b),_0x32c514),_0x3f9e27=colorizeJSONCompact(_0x2b828b,_0x32c514);return _0x76b5c1+':'+_0x3f9e27;});return'{'+_0x4ebb52[_0x396379(0x1dd)](',')+'}';}return String(_0x261524);}export function colorizeJSON(_0x2706b4,_0x18281c={},_0x19dc22=0x0){const _0xce1f0a=a60_0x1c4e;if(!shouldUseColor(_0x18281c))return JSON[_0xce1f0a(0x1de)](_0x2706b4,null,0x2);const _0x122ad3='\x20'[_0xce1f0a(0x1d1)](_0x19dc22),_0x48e6bf=_0x19dc22+0x2;if(_0x2706b4===null)return colorJSONNull('null',_0x18281c);if(typeof _0x2706b4===_0xce1f0a(0x1da))return colorJSONBoolean(String(_0x2706b4),_0x18281c);if(typeof _0x2706b4===_0xce1f0a(0x1cc))return colorJSONNumber(String(_0x2706b4),_0x18281c);if(typeof _0x2706b4==='string')return colorJSONString(JSON['stringify'](_0x2706b4),_0x18281c);if(Array[_0xce1f0a(0x1e3)](_0x2706b4)){if(_0x2706b4[_0xce1f0a(0x1e0)]===0x0)return'[]';const _0x360144=_0x2706b4[_0xce1f0a(0x1df)](_0x55f17b=>{const _0x17312b=_0xce1f0a,_0x497a20=colorizeJSON(_0x55f17b,_0x18281c,_0x48e6bf);return''+'\x20'[_0x17312b(0x1d1)](_0x48e6bf)+_0x497a20;});return'[\x0a'+_0x360144[_0xce1f0a(0x1dd)](',\x0a')+('\x0a'+_0x122ad3+']');}if(typeof _0x2706b4==='object'){const _0x2eb96d=Object['entries'](_0x2706b4);if(_0x2eb96d[_0xce1f0a(0x1e0)]===0x0)return'{}';const _0x563c30=_0x2eb96d[_0xce1f0a(0x1df)](([_0xb7bc14,_0x2de50e])=>{const _0x4502ea=_0xce1f0a,_0x19ff9d=colorJSONKey(JSON['stringify'](_0xb7bc14),_0x18281c),_0x5eea0a=colorizeJSON(_0x2de50e,_0x18281c,_0x48e6bf);return''+'\x20'[_0x4502ea(0x1d1)](_0x48e6bf)+_0x19ff9d+':\x20'+_0x5eea0a;});return'{\x0a'+_0x563c30[_0xce1f0a(0x1dd)](',\x0a')+('\x0a'+_0x122ad3+'}');}return String(_0x2706b4);}
1
+ (function(_0x54d73d,_0x136a10){const _0x188cf5=a60_0x2b39,_0x22e592=_0x54d73d();while(!![]){try{const _0xd2e24f=-parseInt(_0x188cf5(0x181))/0x1+-parseInt(_0x188cf5(0x18f))/0x2+parseInt(_0x188cf5(0x192))/0x3*(parseInt(_0x188cf5(0x187))/0x4)+-parseInt(_0x188cf5(0x199))/0x5*(parseInt(_0x188cf5(0x184))/0x6)+-parseInt(_0x188cf5(0x196))/0x7*(parseInt(_0x188cf5(0x183))/0x8)+parseInt(_0x188cf5(0x189))/0x9+parseInt(_0x188cf5(0x198))/0xa*(parseInt(_0x188cf5(0x19a))/0xb);if(_0xd2e24f===_0x136a10)break;else _0x22e592['push'](_0x22e592['shift']());}catch(_0x453722){_0x22e592['push'](_0x22e592['shift']());}}}(a60_0x5e61,0x2f873));function a60_0x2b39(_0xd388a0,_0x6e9c14){const _0x5e613f=a60_0x5e61();return a60_0x2b39=function(_0x2b39b0,_0x59a66d){_0x2b39b0=_0x2b39b0-0x17d;let _0x374df5=_0x5e613f[_0x2b39b0];return _0x374df5;},a60_0x2b39(_0xd388a0,_0x6e9c14);}import{Chalk}from'chalk';export function shouldUseColor(_0x596e66={}){const _0x46c822=a60_0x2b39;if(_0x596e66[_0x46c822(0x18a)]===!![])return![];if(_0x596e66[_0x46c822(0x19c)]===!![])return!![];if(process[_0x46c822(0x17e)][_0x46c822(0x197)]!==undefined)return![];return process['stdout'][_0x46c822(0x182)]??![];}function getChalk(_0x4df0f2={}){if(shouldUseColor(_0x4df0f2))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}function a60_0x5e61(){const _0x13f924=['156lyfReJ','isArray','length','124XEYXUP','boolean','98073mRMsKw','noColor','entries','green','object','string','418720FNwVuU','repeat','number','35439nORkMX','dim','stringify','blue','14VGstIF','NO_COLOR','29990GPQKHu','23130OcrjrP','2079dXavzj','cyan','color','null','env','join','map','59844wORujh','isTTY','1439024YYavFs'];a60_0x5e61=function(){return _0x13f924;};return a60_0x5e61();}export function colorBorder(_0x558e52,_0x435dc9={}){const _0x52b65f=a60_0x2b39;return getChalk(_0x435dc9)[_0x52b65f(0x193)](_0x558e52);}export function colorHeader(_0x36f369,_0x3dcd73={}){const _0x1b10d6=a60_0x2b39;return getChalk(_0x3dcd73)[_0x1b10d6(0x19b)](_0x36f369);}export function colorType(_0x3946eb,_0xd74246={}){return getChalk(_0xd74246)['dim'](_0x3946eb);}export function colorJSONKey(_0x11d7b9,_0x2abdf5={}){const _0x4e7b79=a60_0x2b39;return getChalk(_0x2abdf5)[_0x4e7b79(0x195)](_0x11d7b9);}export function colorJSONString(_0x2e5a9e,_0x8398d4={}){const _0x5ba20f=a60_0x2b39;return getChalk(_0x8398d4)[_0x5ba20f(0x18c)](_0x2e5a9e);}export function colorJSONNumber(_0x3f4a53,_0x5a0915={}){const _0x30139c=a60_0x2b39;return getChalk(_0x5a0915)[_0x30139c(0x19b)](_0x3f4a53);}export function colorJSONBoolean(_0x5ad5c9,_0x202c41={}){return getChalk(_0x202c41)['yellow'](_0x5ad5c9);}export function colorJSONNull(_0x52a56e,_0x12b079={}){return getChalk(_0x12b079)['dim'](_0x52a56e);}export function colorizeJSONCompact(_0x5c574f,_0x35275e={}){const _0x4baa61=a60_0x2b39;if(!shouldUseColor(_0x35275e))return JSON['stringify'](_0x5c574f);if(_0x5c574f===null)return colorJSONNull(_0x4baa61(0x17d),_0x35275e);if(typeof _0x5c574f===_0x4baa61(0x188))return colorJSONBoolean(String(_0x5c574f),_0x35275e);if(typeof _0x5c574f==='number')return colorJSONNumber(String(_0x5c574f),_0x35275e);if(typeof _0x5c574f===_0x4baa61(0x18e))return colorJSONString(JSON[_0x4baa61(0x194)](_0x5c574f),_0x35275e);if(Array[_0x4baa61(0x185)](_0x5c574f)){if(_0x5c574f['length']===0x0)return'[]';const _0x4dfd41=_0x5c574f['map'](_0x5143af=>colorizeJSONCompact(_0x5143af,_0x35275e));return'['+_0x4dfd41[_0x4baa61(0x17f)](',')+']';}if(typeof _0x5c574f===_0x4baa61(0x18d)){const _0x358220=Object['entries'](_0x5c574f);if(_0x358220[_0x4baa61(0x186)]===0x0)return'{}';const _0x3b7fed=_0x358220[_0x4baa61(0x180)](([_0x2294e6,_0x1dfcf9])=>{const _0x3e114e=_0x4baa61,_0x53332c=colorJSONKey(JSON[_0x3e114e(0x194)](_0x2294e6),_0x35275e),_0x8eeadb=colorizeJSONCompact(_0x1dfcf9,_0x35275e);return _0x53332c+':'+_0x8eeadb;});return'{'+_0x3b7fed[_0x4baa61(0x17f)](',')+'}';}return String(_0x5c574f);}export function colorizeJSON(_0x1c2a43,_0x2872b3={},_0x29a9d7=0x0){const _0x237a22=a60_0x2b39;if(!shouldUseColor(_0x2872b3))return JSON[_0x237a22(0x194)](_0x1c2a43,null,0x2);const _0x1a01d5='\x20'[_0x237a22(0x190)](_0x29a9d7),_0x269c49=_0x29a9d7+0x2;if(_0x1c2a43===null)return colorJSONNull(_0x237a22(0x17d),_0x2872b3);if(typeof _0x1c2a43==='boolean')return colorJSONBoolean(String(_0x1c2a43),_0x2872b3);if(typeof _0x1c2a43===_0x237a22(0x191))return colorJSONNumber(String(_0x1c2a43),_0x2872b3);if(typeof _0x1c2a43===_0x237a22(0x18e))return colorJSONString(JSON[_0x237a22(0x194)](_0x1c2a43),_0x2872b3);if(Array['isArray'](_0x1c2a43)){if(_0x1c2a43[_0x237a22(0x186)]===0x0)return'[]';const _0x3d3787=_0x1c2a43[_0x237a22(0x180)](_0x26a1a4=>{const _0x532630=_0x237a22,_0xcd8973=colorizeJSON(_0x26a1a4,_0x2872b3,_0x269c49);return''+'\x20'[_0x532630(0x190)](_0x269c49)+_0xcd8973;});return'[\x0a'+_0x3d3787[_0x237a22(0x17f)](',\x0a')+('\x0a'+_0x1a01d5+']');}if(typeof _0x1c2a43==='object'){const _0x62e8c=Object[_0x237a22(0x18b)](_0x1c2a43);if(_0x62e8c['length']===0x0)return'{}';const _0x11caa0=_0x62e8c['map'](([_0x3fe99e,_0x1a161c])=>{const _0x827cf2=_0x237a22,_0x29a5a0=colorJSONKey(JSON[_0x827cf2(0x194)](_0x3fe99e),_0x2872b3),_0x3918d8=colorizeJSON(_0x1a161c,_0x2872b3,_0x269c49);return''+'\x20'[_0x827cf2(0x190)](_0x269c49)+_0x29a5a0+':\x20'+_0x3918d8;});return'{\x0a'+_0x11caa0[_0x237a22(0x17f)](',\x0a')+('\x0a'+_0x1a01d5+'}');}return String(_0x1c2a43);}
@@ -1 +1 @@
1
- function a61_0x3b65(){const _0x21b79b=['stderr','No\x20data','max','red','4522510gRJjvK','length','json','759885jstGwB','[error]','2953755FQJEqd','noColor','tsv','18mIgMQm','bold','format','string','bigint','./formatters.js','color','table','log','5214520gRgqhM','jsonl','5517140piKVhi','isTTY','stringify','forEach','debug','[query]','sdk-result','[logs]','boolean','[Object]','push','close','error','join','isInteger','less','-FXRSn','varchar','object','map','split','trim','entries','cmdout','Results\x20saved\x20to\x20','66ntouGH','─┬─','query','number','85655mbdUzB','1262tElyMq','limit','816LHHtOX','resolve','FINISHED','double','end','stdin','padEnd','output','stdout','inherit','repeat'];a61_0x3b65=function(){return _0x21b79b;};return a61_0x3b65();}(function(_0x3bec3d,_0x19eaa2){const _0x122115=a61_0x214b,_0xa1c79=_0x3bec3d();while(!![]){try{const _0x5ec541=parseInt(_0x122115(0x18f))/0x1+parseInt(_0x122115(0x190))/0x2*(-parseInt(_0x122115(0x192))/0x3)+-parseInt(_0x122115(0x1b4))/0x4+-parseInt(_0x122115(0x1a6))/0x5+parseInt(_0x122115(0x18b))/0x6*(parseInt(_0x122115(0x1a4))/0x7)+parseInt(_0x122115(0x1b2))/0x8+-parseInt(_0x122115(0x1a9))/0x9*(-parseInt(_0x122115(0x1a1))/0xa);if(_0x5ec541===_0x19eaa2)break;else _0xa1c79['push'](_0xa1c79['shift']());}catch(_0x2c34ea){_0xa1c79['push'](_0xa1c79['shift']());}}}(a61_0x3b65,0xa9889));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';function a61_0x214b(_0x470877,_0xe9a763){const _0x3b65c4=a61_0x3b65();return a61_0x214b=function(_0x214bda,_0x18bc39){_0x214bda=_0x214bda-0x184;let _0x465b66=_0x3b65c4[_0x214bda];return _0x465b66;},a61_0x214b(_0x470877,_0xe9a763);}import a61_0x1fee3b from'chalk';export function parseOutputOptions(_0x2f9206){const _0x3500f9=a61_0x214b;return{'format':_0x2f9206[_0x3500f9(0x1ab)]||_0x3500f9(0x1b0),'output':_0x2f9206[_0x3500f9(0x199)]||'','limit':_0x2f9206[_0x3500f9(0x191)],'color':_0x2f9206[_0x3500f9(0x1af)],'noColor':_0x2f9206[_0x3500f9(0x1a7)]};}function convertSDKResultToQueryResult(_0x5eaab6){const _0x1dd1eb=a61_0x214b,_0x122de2=[];if(_0x5eaab6[_0x1dd1eb(0x1a2)]>0x0){const _0x42f092=_0x5eaab6[0x0];for(const [_0x1b9418,_0x2a7534]of Object[_0x1dd1eb(0x188)](_0x42f092)){let _0x39cca1=_0x1dd1eb(0x1c5);if(typeof _0x2a7534===_0x1dd1eb(0x18e))_0x39cca1=Number[_0x1dd1eb(0x1c2)](_0x2a7534)?_0x1dd1eb(0x1ad):_0x1dd1eb(0x195);else{if(typeof _0x2a7534==='boolean')_0x39cca1=_0x1dd1eb(0x1bc);else _0x2a7534===null&&(_0x39cca1=_0x1dd1eb(0x1c5));}_0x122de2[_0x1dd1eb(0x1be)]({'name':_0x1b9418,'type':_0x39cca1});}}return{'queryId':_0x1dd1eb(0x1ba),'columns':_0x122de2,'data':_0x5eaab6,'stats':{'state':_0x1dd1eb(0x194),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x5eaab6[_0x1dd1eb(0x1a2)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0xf95628,_0x1962fe){const _0x3e72ac=convertSDKResultToQueryResult(_0xf95628);return formatQueryOutput(_0x3e72ac,_0x1962fe);}export async function formatQueryOutput(_0x12e388,_0x5f54fb){const _0x139cfe=a61_0x214b,{format:_0x20df1d,limit:_0x4b02d1,output:_0x1a7f9c,color:_0xd5b459,noColor:_0x15a019}=_0x5f54fb,_0x14190e=Boolean(_0x1a7f9c)&&!_0xd5b459,_0x28ab23={'color':_0xd5b459,'noColor':_0x15a019||_0x14190e};if(_0x20df1d===_0x139cfe(0x1b0)){const {formatAsTable:_0x4683d4}=await import('./formatters.js'),_0x2f59ee=shouldUseLess(_0x20df1d,_0x1a7f9c);return _0x4683d4(_0x12e388,_0x4b02d1,_0x2f59ee,_0x28ab23);}else{if(_0x20df1d===_0x139cfe(0x1a3)){const {formatAsJSON:_0x1eaa89}=await import('./formatters.js');return _0x1eaa89(_0x12e388,_0x28ab23);}else{if(_0x20df1d===_0x139cfe(0x1b3)){const {formatAsJSONL:_0xefda12}=await import('./formatters.js');return _0xefda12(_0x12e388,_0x28ab23);}else{const {formatQueryResult:_0x3f9b6f}=await import(_0x139cfe(0x1ae));return _0x3f9b6f(_0x12e388,_0x20df1d);}}}}function shouldUseLess(_0x4a62fd,_0x4dc49b){const _0x27a236=a61_0x214b;return _0x4a62fd===_0x27a236(0x1b0)&&process[_0x27a236(0x19a)][_0x27a236(0x1b5)]&&!_0x4dc49b;}export function resolveOutputOptions(_0x1fbbf6){const _0x369085=a61_0x214b,_0x232d5b=resolveOutputFormat(_0x1fbbf6[_0x369085(0x1ab)],_0x1fbbf6[_0x369085(0x199)],'table');let _0x250108=typeof _0x1fbbf6[_0x369085(0x191)]==='number'?_0x1fbbf6['limit']:parseInt(_0x1fbbf6[_0x369085(0x191)]||'40',0xa);const _0x167906=_0x1fbbf6[_0x369085(0x199)]||'';return shouldUseLess(_0x232d5b,_0x167906)&&(_0x250108=Infinity),{'format':_0x232d5b,'output':_0x167906,'limit':_0x250108,'color':_0x1fbbf6['color'],'noColor':_0x1fbbf6[_0x369085(0x1a7)]};}export function writeOutput(_0x23d418,_0x3664f2,_0x3a9448){const _0x1dfdbb=a61_0x214b;return _0x3664f2?(writeFileSync(_0x3664f2,_0x23d418),console[_0x1dfdbb(0x1c0)](_0x1dfdbb(0x18a)+_0x3664f2),Promise[_0x1dfdbb(0x193)]()):shouldUseLess(_0x3a9448||'','')?new Promise(_0x1f1616=>{const _0x41c732=_0x1dfdbb,_0x460621=spawn(_0x41c732(0x1c3),[_0x41c732(0x1c4)],{'stdio':['pipe',_0x41c732(0x19b),_0x41c732(0x19b)]});let _0x1854db=![];_0x460621['on'](_0x41c732(0x1c0),()=>{const _0x8b0592=_0x41c732;!_0x1854db&&(_0x1854db=!![],console[_0x8b0592(0x1b1)](_0x23d418),_0x1f1616());}),_0x460621['on'](_0x41c732(0x1bf),()=>{!_0x1854db&&(_0x1854db=!![],_0x1f1616());}),_0x460621['on']('spawn',()=>{const _0x2240da=_0x41c732;!_0x1854db&&_0x460621['stdin']&&(_0x460621[_0x2240da(0x197)]['on'](_0x2240da(0x1c0),()=>{}),_0x460621[_0x2240da(0x197)]['write'](_0x23d418),_0x460621[_0x2240da(0x197)][_0x2240da(0x196)]());}),!_0x460621['stdin']&&(!_0x1854db&&(_0x1854db=!![],console[_0x41c732(0x1b1)](_0x23d418),_0x1f1616()));}):(console[_0x1dfdbb(0x1b1)](_0x23d418),Promise[_0x1dfdbb(0x193)]());}export async function handleSDKOutput(_0x68dd79,_0xda66a7){const _0x564b0b=a61_0x214b,_0x3ed167=resolveOutputOptions(_0xda66a7),_0x4b6118=await formatSDKOutput(_0x68dd79,_0x3ed167);await writeOutput(_0x4b6118,_0x3ed167[_0x564b0b(0x199)]||undefined,_0x3ed167[_0x564b0b(0x1ab)]);}export async function handleQueryOutput(_0x2ef5c1,_0x321466){const _0x5cd266=a61_0x214b,_0x13013e=resolveOutputOptions(_0x321466),_0x545744=await formatQueryOutput(_0x2ef5c1,_0x13013e);await writeOutput(_0x545744,_0x13013e[_0x5cd266(0x199)]||undefined,_0x13013e[_0x5cd266(0x1ab)]);}async function formatSingleObject(_0x498651,_0x3345f1){const _0x42c7fd=a61_0x214b,{format:_0x44d3c9,color:_0x3d6b3f,noColor:_0x34aa1e}=_0x3345f1,_0x4ba43f={'color':_0x3d6b3f,'noColor':_0x34aa1e};if(_0x44d3c9===_0x42c7fd(0x1a3)){if(shouldUseColor(_0x4ba43f))return colorizeJSON(_0x498651,_0x4ba43f);return JSON[_0x42c7fd(0x1b6)](_0x498651,null,0x2);}else{if(_0x44d3c9===_0x42c7fd(0x1b3)){if(shouldUseColor(_0x4ba43f))return colorizeJSONCompact(_0x498651,_0x4ba43f);return JSON[_0x42c7fd(0x1b6)](_0x498651);}else{if(_0x44d3c9===_0x42c7fd(0x1a8))return Object[_0x42c7fd(0x188)](_0x498651)[_0x42c7fd(0x185)](([_0x41f5eb,_0x3c07ee])=>_0x41f5eb+'\x09'+_0x3c07ee)[_0x42c7fd(0x1c1)]('\x0a');else{const _0x551073=Object[_0x42c7fd(0x188)](_0x498651);if(_0x551073[_0x42c7fd(0x1a2)]===0x0)return _0x42c7fd(0x19e);const _0x171208=_0x498651['debug'],_0x3f1cac=_0x498651[_0x42c7fd(0x18d)],_0x285f69=_0x3f1cac?typeof _0x3f1cac===_0x42c7fd(0x1ac)?_0x3f1cac:JSON['stringify'](_0x3f1cac,null,0x2):undefined,_0x12f095=_0x551073['filter'](([_0x5b5680])=>_0x5b5680!==_0x42c7fd(0x1b8)&&_0x5b5680!=='query'),_0x412156=Math[_0x42c7fd(0x19f)](..._0x12f095[_0x42c7fd(0x185)](([_0xead548])=>_0xead548[_0x42c7fd(0x1a2)])),_0x134afe=Math[_0x42c7fd(0x19f)](..._0x12f095[_0x42c7fd(0x185)](([,_0x1cbc3e])=>{const _0x2eafc2=_0x42c7fd;try{const _0x28a52f=_0x1cbc3e===null||_0x1cbc3e===undefined?'':typeof _0x1cbc3e===_0x2eafc2(0x184)?JSON[_0x2eafc2(0x1b6)](_0x1cbc3e):String(_0x1cbc3e),_0x3a0e82=_0x28a52f[_0x2eafc2(0x186)]('\x0a');return Math[_0x2eafc2(0x19f)](..._0x3a0e82[_0x2eafc2(0x185)](_0x590bf6=>_0x590bf6[_0x2eafc2(0x1a2)]),0x0);}catch{return 0x0;}}),0x14),_0x5bf38b=[];_0x5bf38b[_0x42c7fd(0x1be)](colorBorder('┌─'+'─'[_0x42c7fd(0x19c)](_0x412156)+_0x42c7fd(0x18c)+'─'[_0x42c7fd(0x19c)](_0x134afe)+'─┐',_0x4ba43f)),_0x12f095[_0x42c7fd(0x1b7)](([_0x1a13cc,_0x4d1b89])=>{const _0x460c78=_0x42c7fd;let _0x475d4f;try{_0x475d4f=_0x4d1b89===null||_0x4d1b89===undefined?'':typeof _0x4d1b89===_0x460c78(0x184)?JSON['stringify'](_0x4d1b89):String(_0x4d1b89);}catch{_0x475d4f=_0x460c78(0x1bd);}const _0x29e706=_0x1a13cc[_0x460c78(0x198)](_0x412156),_0x220540=_0x475d4f[_0x460c78(0x186)]('\x0a');_0x220540[_0x460c78(0x1b7)]((_0xe3366e,_0x18c271)=>{const _0x313772=_0x460c78,_0x1763b0=colorBorder('│',_0x4ba43f);_0x18c271===0x0?_0x5bf38b[_0x313772(0x1be)](_0x1763b0+'\x20'+_0x29e706+'\x20'+_0x1763b0+'\x20'+_0xe3366e[_0x313772(0x198)](_0x134afe)+'\x20'+_0x1763b0):_0x5bf38b[_0x313772(0x1be)](_0x1763b0+'\x20'+'\x20'['repeat'](_0x412156)+'\x20'+_0x1763b0+'\x20'+_0xe3366e[_0x313772(0x198)](_0x134afe)+'\x20'+_0x1763b0);});}),_0x5bf38b['push'](colorBorder('└─'+'─'[_0x42c7fd(0x19c)](_0x412156)+'─┴─'+'─'[_0x42c7fd(0x19c)](_0x134afe)+'─┘',_0x4ba43f));_0x285f69&&(_0x5bf38b[_0x42c7fd(0x1be)](''),_0x5bf38b[_0x42c7fd(0x1be)](String(a61_0x1fee3b['yellow'][_0x42c7fd(0x1aa)](_0x42c7fd(0x1b9)))),_0x5bf38b[_0x42c7fd(0x1be)](_0x285f69));if(_0x171208){if(_0x171208[_0x42c7fd(0x19d)]){_0x5bf38b['push'](''),_0x5bf38b['push'](String(a61_0x1fee3b[_0x42c7fd(0x1a0)]['bold'](_0x42c7fd(0x1a5))));const _0xf1d7b4=_0x171208[_0x42c7fd(0x19d)][_0x42c7fd(0x186)]('\x0a');_0xf1d7b4[_0x42c7fd(0x1b7)](_0x44cd76=>{const _0x4c2bd9=_0x42c7fd;_0x44cd76[_0x4c2bd9(0x187)]()&&_0x5bf38b[_0x4c2bd9(0x1be)](_0x44cd76);});}if(_0x171208[_0x42c7fd(0x189)]){_0x5bf38b[_0x42c7fd(0x1be)](''),_0x5bf38b[_0x42c7fd(0x1be)](String(a61_0x1fee3b['cyan']['bold'](_0x42c7fd(0x1bb))));const _0x1df129=_0x171208[_0x42c7fd(0x189)][_0x42c7fd(0x186)]('\x0a');_0x1df129[_0x42c7fd(0x1b7)](_0x2dd464=>{const _0x3a9ea9=_0x42c7fd;_0x2dd464[_0x3a9ea9(0x187)]()&&_0x5bf38b[_0x3a9ea9(0x1be)](_0x2dd464);});}}return _0x5bf38b[_0x42c7fd(0x1c1)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x353efa,_0x33241c){const _0x4ff609=a61_0x214b,_0x41bbd7=resolveOutputOptions(_0x33241c),_0x3c2e45=await formatSingleObject(_0x353efa,_0x41bbd7);await writeOutput(_0x3c2e45,_0x41bbd7[_0x4ff609(0x199)]||undefined,_0x41bbd7[_0x4ff609(0x1ab)]);}
1
+ (function(_0xbc82ef,_0x1b8142){const _0x2c3562=a61_0x2c11,_0x1ce41e=_0xbc82ef();while(!![]){try{const _0x5d73e2=-parseInt(_0x2c3562(0x12a))/0x1+-parseInt(_0x2c3562(0x131))/0x2*(-parseInt(_0x2c3562(0x12f))/0x3)+-parseInt(_0x2c3562(0x122))/0x4+parseInt(_0x2c3562(0x137))/0x5*(-parseInt(_0x2c3562(0x136))/0x6)+-parseInt(_0x2c3562(0xfd))/0x7*(-parseInt(_0x2c3562(0x128))/0x8)+parseInt(_0x2c3562(0x114))/0x9*(parseInt(_0x2c3562(0x119))/0xa)+-parseInt(_0x2c3562(0xfb))/0xb;if(_0x5d73e2===_0x1b8142)break;else _0x1ce41e['push'](_0x1ce41e['shift']());}catch(_0x4a49cd){_0x1ce41e['push'](_0x1ce41e['shift']());}}}(a61_0x1bee,0x65e50));import{writeFileSync}from'fs';import{spawn}from'child_process';function a61_0x2c11(_0x48f374,_0x4ee58a){const _0x1beefd=a61_0x1bee();return a61_0x2c11=function(_0x2c11df,_0x15c144){_0x2c11df=_0x2c11df-0xf7;let _0x4b4fe7=_0x1beefd[_0x2c11df];return _0x4b4fe7;},a61_0x2c11(_0x48f374,_0x4ee58a);}import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a61_0x1b2041 from'chalk';export function parseOutputOptions(_0x3c1952){const _0x238357=a61_0x2c11;return{'format':_0x3c1952[_0x238357(0x12b)]||_0x238357(0xf8),'output':_0x3c1952[_0x238357(0x107)]||'','limit':_0x3c1952[_0x238357(0x135)],'color':_0x3c1952[_0x238357(0x118)],'noColor':_0x3c1952[_0x238357(0x10b)]};}function convertSDKResultToQueryResult(_0x12a34){const _0x221881=a61_0x2c11,_0x980093=[];if(_0x12a34[_0x221881(0x12c)]>0x0){const _0xb47c01=_0x12a34[0x0];for(const [_0x2ab453,_0x122899]of Object[_0x221881(0x110)](_0xb47c01)){let _0x51cf57=_0x221881(0x129);if(typeof _0x122899===_0x221881(0x10e))_0x51cf57=Number[_0x221881(0x134)](_0x122899)?'bigint':_0x221881(0x109);else{if(typeof _0x122899==='boolean')_0x51cf57=_0x221881(0x100);else _0x122899===null&&(_0x51cf57=_0x221881(0x129));}_0x980093[_0x221881(0x125)]({'name':_0x2ab453,'type':_0x51cf57});}}return{'queryId':'sdk-result','columns':_0x980093,'data':_0x12a34,'stats':{'state':_0x221881(0x12e),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x12a34[_0x221881(0x12c)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x8bef10,_0x24e08b){const _0x302743=convertSDKResultToQueryResult(_0x8bef10);return formatQueryOutput(_0x302743,_0x24e08b);}export async function formatQueryOutput(_0x2fe53c,_0x13daa2){const _0x13ef08=a61_0x2c11,{format:_0x35355e,limit:_0x306799,output:_0x36541d,color:_0x103d1a,noColor:_0x5e7f67}=_0x13daa2,_0x2d3664=Boolean(_0x36541d)&&!_0x103d1a,_0xeee406={'color':_0x103d1a,'noColor':_0x5e7f67||_0x2d3664};if(_0x35355e==='table'){const {formatAsTable:_0x5c99a4}=await import(_0x13ef08(0x11b)),_0x470404=shouldUseLess(_0x35355e,_0x36541d);return _0x5c99a4(_0x2fe53c,_0x306799,_0x470404,_0xeee406);}else{if(_0x35355e===_0x13ef08(0x10a)){const {formatAsJSON:_0x50e3ee}=await import('./formatters.js');return _0x50e3ee(_0x2fe53c,_0xeee406);}else{if(_0x35355e===_0x13ef08(0x132)){const {formatAsJSONL:_0x2fb93b}=await import(_0x13ef08(0x11b));return _0x2fb93b(_0x2fe53c,_0xeee406);}else{const {formatQueryResult:_0x5e3b09}=await import(_0x13ef08(0x11b));return _0x5e3b09(_0x2fe53c,_0x35355e);}}}}function shouldUseLess(_0x3b2e8b,_0xead25f){const _0xb8096a=a61_0x2c11;return _0x3b2e8b===_0xb8096a(0xf8)&&process[_0xb8096a(0x113)]['isTTY']&&!_0xead25f;}export function resolveOutputOptions(_0xe24d6e){const _0x9fb8bd=a61_0x2c11,_0x519bf4=resolveOutputFormat(_0xe24d6e[_0x9fb8bd(0x12b)],_0xe24d6e[_0x9fb8bd(0x107)],_0x9fb8bd(0xf8));let _0x3436a3=typeof _0xe24d6e[_0x9fb8bd(0x135)]==='number'?_0xe24d6e[_0x9fb8bd(0x135)]:parseInt(_0xe24d6e[_0x9fb8bd(0x135)]||'40',0xa);const _0x50e6ea=_0xe24d6e['output']||'';return shouldUseLess(_0x519bf4,_0x50e6ea)&&(_0x3436a3=Infinity),{'format':_0x519bf4,'output':_0x50e6ea,'limit':_0x3436a3,'color':_0xe24d6e[_0x9fb8bd(0x118)],'noColor':_0xe24d6e[_0x9fb8bd(0x10b)]};}export function writeOutput(_0x2e1f07,_0x1af31e,_0x1483c4){const _0x1582fe=a61_0x2c11;return _0x1af31e?(writeFileSync(_0x1af31e,_0x2e1f07),console[_0x1582fe(0xff)](_0x1582fe(0xfc)+_0x1af31e),Promise[_0x1582fe(0x102)]()):shouldUseLess(_0x1483c4||'','')?new Promise(_0x2c3288=>{const _0x5c1600=_0x1582fe,_0x352a99=spawn(_0x5c1600(0x11e),[_0x5c1600(0x111)],{'stdio':['pipe',_0x5c1600(0x127),_0x5c1600(0x127)]});let _0x4800da=![];_0x352a99['on'](_0x5c1600(0xff),()=>{const _0x30f870=_0x5c1600;!_0x4800da&&(_0x4800da=!![],console[_0x30f870(0x115)](_0x2e1f07),_0x2c3288());}),_0x352a99['on']('close',()=>{!_0x4800da&&(_0x4800da=!![],_0x2c3288());}),_0x352a99['on']('spawn',()=>{const _0x3c6ee5=_0x5c1600;!_0x4800da&&_0x352a99[_0x3c6ee5(0x11c)]&&(_0x352a99[_0x3c6ee5(0x11c)]['on'](_0x3c6ee5(0xff),()=>{}),_0x352a99[_0x3c6ee5(0x11c)][_0x3c6ee5(0x124)](_0x2e1f07),_0x352a99[_0x3c6ee5(0x11c)][_0x3c6ee5(0x101)]());}),!_0x352a99[_0x5c1600(0x11c)]&&(!_0x4800da&&(_0x4800da=!![],console['log'](_0x2e1f07),_0x2c3288()));}):(console[_0x1582fe(0x115)](_0x2e1f07),Promise[_0x1582fe(0x102)]());}export async function handleSDKOutput(_0x28ca2a,_0x1c8177){const _0x18257e=a61_0x2c11,_0x40703b=resolveOutputOptions(_0x1c8177),_0x225de0=await formatSDKOutput(_0x28ca2a,_0x40703b);await writeOutput(_0x225de0,_0x40703b['output']||undefined,_0x40703b[_0x18257e(0x12b)]);}export async function handleQueryOutput(_0x88c745,_0x11f592){const _0x2cfda3=a61_0x2c11,_0x1cd9b4=resolveOutputOptions(_0x11f592),_0x5775a3=await formatQueryOutput(_0x88c745,_0x1cd9b4);await writeOutput(_0x5775a3,_0x1cd9b4[_0x2cfda3(0x107)]||undefined,_0x1cd9b4['format']);}function a61_0x1bee(){const _0x2a7d7f=['number','cmdout','entries','-FXRSn','No\x20data','stdout','3104352OTriwP','log','map','query','color','20zdwRll','split','./formatters.js','stdin','tsv','less','cyan','padEnd','max','921980hAMFVm','stderr','write','push','stringify','inherit','6277976lzFXEd','varchar','252497yCZiyG','format','length','red','FINISHED','3363bDjfGx','[error]','316AWcDoM','jsonl','join','isInteger','limit','60CdQMhj','10160DResbs','debug','table','object','─┬─','8041539JulaVg','Results\x20saved\x20to\x20','7nscXMl','─┴─','error','boolean','end','resolve','bold','repeat','[query]','trim','output','yellow','double','json','noColor','forEach','[Object]'];a61_0x1bee=function(){return _0x2a7d7f;};return a61_0x1bee();}async function formatSingleObject(_0x1d39d7,_0x4e29f8){const _0x3ebdcd=a61_0x2c11,{format:_0x254578,color:_0x276550,noColor:_0x1bce1c}=_0x4e29f8,_0x58798a={'color':_0x276550,'noColor':_0x1bce1c};if(_0x254578==='json'){if(shouldUseColor(_0x58798a))return colorizeJSON(_0x1d39d7,_0x58798a);return JSON[_0x3ebdcd(0x126)](_0x1d39d7,null,0x2);}else{if(_0x254578===_0x3ebdcd(0x132)){if(shouldUseColor(_0x58798a))return colorizeJSONCompact(_0x1d39d7,_0x58798a);return JSON[_0x3ebdcd(0x126)](_0x1d39d7);}else{if(_0x254578===_0x3ebdcd(0x11d))return Object[_0x3ebdcd(0x110)](_0x1d39d7)['map'](([_0x3e0ffc,_0x789944])=>_0x3e0ffc+'\x09'+_0x789944)['join']('\x0a');else{const _0x439ae4=Object[_0x3ebdcd(0x110)](_0x1d39d7);if(_0x439ae4[_0x3ebdcd(0x12c)]===0x0)return _0x3ebdcd(0x112);const _0x589271=_0x1d39d7[_0x3ebdcd(0xf7)],_0x3b8646=_0x1d39d7[_0x3ebdcd(0x117)],_0x3714d7=_0x3b8646?typeof _0x3b8646==='string'?_0x3b8646:JSON[_0x3ebdcd(0x126)](_0x3b8646,null,0x2):undefined,_0x11b631=_0x439ae4['filter'](([_0x21e99c])=>_0x21e99c!==_0x3ebdcd(0xf7)&&_0x21e99c!=='query'),_0x5027dc=Math[_0x3ebdcd(0x121)](..._0x11b631['map'](([_0x533f9a])=>_0x533f9a['length'])),_0x5ac12d=Math['max'](..._0x11b631[_0x3ebdcd(0x116)](([,_0x1e1cd3])=>{const _0x45881a=_0x3ebdcd;try{const _0x374dc5=_0x1e1cd3===null||_0x1e1cd3===undefined?'':typeof _0x1e1cd3==='object'?JSON[_0x45881a(0x126)](_0x1e1cd3):String(_0x1e1cd3),_0x29d956=_0x374dc5[_0x45881a(0x11a)]('\x0a');return Math['max'](..._0x29d956[_0x45881a(0x116)](_0x3c6b0f=>_0x3c6b0f[_0x45881a(0x12c)]),0x0);}catch{return 0x0;}}),0x14),_0x13a136=[];_0x13a136[_0x3ebdcd(0x125)](colorBorder('┌─'+'─'[_0x3ebdcd(0x104)](_0x5027dc)+_0x3ebdcd(0xfa)+'─'[_0x3ebdcd(0x104)](_0x5ac12d)+'─┐',_0x58798a)),_0x11b631['forEach'](([_0x232e20,_0x3cab0f])=>{const _0x328f90=_0x3ebdcd;let _0x3fc3a8;try{_0x3fc3a8=_0x3cab0f===null||_0x3cab0f===undefined?'':typeof _0x3cab0f===_0x328f90(0xf9)?JSON['stringify'](_0x3cab0f):String(_0x3cab0f);}catch{_0x3fc3a8=_0x328f90(0x10d);}const _0x11cc42=_0x232e20[_0x328f90(0x120)](_0x5027dc),_0x5ccbe3=_0x3fc3a8[_0x328f90(0x11a)]('\x0a');_0x5ccbe3[_0x328f90(0x10c)]((_0x4619f5,_0x168d20)=>{const _0x53770b=_0x328f90,_0x29867a=colorBorder('│',_0x58798a);_0x168d20===0x0?_0x13a136[_0x53770b(0x125)](_0x29867a+'\x20'+_0x11cc42+'\x20'+_0x29867a+'\x20'+_0x4619f5[_0x53770b(0x120)](_0x5ac12d)+'\x20'+_0x29867a):_0x13a136[_0x53770b(0x125)](_0x29867a+'\x20'+'\x20'['repeat'](_0x5027dc)+'\x20'+_0x29867a+'\x20'+_0x4619f5[_0x53770b(0x120)](_0x5ac12d)+'\x20'+_0x29867a);});}),_0x13a136[_0x3ebdcd(0x125)](colorBorder('└─'+'─'[_0x3ebdcd(0x104)](_0x5027dc)+_0x3ebdcd(0xfe)+'─'[_0x3ebdcd(0x104)](_0x5ac12d)+'─┘',_0x58798a));_0x3714d7&&(_0x13a136[_0x3ebdcd(0x125)](''),_0x13a136[_0x3ebdcd(0x125)](String(a61_0x1b2041[_0x3ebdcd(0x108)]['bold'](_0x3ebdcd(0x105)))),_0x13a136['push'](_0x3714d7));if(_0x589271){if(_0x589271[_0x3ebdcd(0x123)]){_0x13a136[_0x3ebdcd(0x125)](''),_0x13a136[_0x3ebdcd(0x125)](String(a61_0x1b2041[_0x3ebdcd(0x12d)][_0x3ebdcd(0x103)](_0x3ebdcd(0x130))));const _0x406cfd=_0x589271[_0x3ebdcd(0x123)][_0x3ebdcd(0x11a)]('\x0a');_0x406cfd['forEach'](_0x474ba1=>{const _0x58fd37=_0x3ebdcd;_0x474ba1[_0x58fd37(0x106)]()&&_0x13a136['push'](_0x474ba1);});}if(_0x589271[_0x3ebdcd(0x10f)]){_0x13a136[_0x3ebdcd(0x125)](''),_0x13a136[_0x3ebdcd(0x125)](String(a61_0x1b2041[_0x3ebdcd(0x11f)][_0x3ebdcd(0x103)]('[logs]')));const _0x1f2c63=_0x589271['cmdout'][_0x3ebdcd(0x11a)]('\x0a');_0x1f2c63['forEach'](_0x4827ec=>{const _0x4c515f=_0x3ebdcd;_0x4827ec[_0x4c515f(0x106)]()&&_0x13a136['push'](_0x4827ec);});}}return _0x13a136[_0x3ebdcd(0x133)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x2efadb,_0x29cbbb){const _0x20b410=a61_0x2c11,_0x31351e=resolveOutputOptions(_0x29cbbb),_0xeb7e9=await formatSingleObject(_0x2efadb,_0x31351e);await writeOutput(_0xeb7e9,_0x31351e[_0x20b410(0x107)]||undefined,_0x31351e[_0x20b410(0x12b)]);}
@@ -1 +1 @@
1
- (function(_0x760b04,_0x1a2670){const _0x36b938=a62_0x3eeb,_0xd4f500=_0x760b04();while(!![]){try{const _0x128729=-parseInt(_0x36b938(0x1b9))/0x1*(parseInt(_0x36b938(0x1ba))/0x2)+-parseInt(_0x36b938(0x1bf))/0x3*(-parseInt(_0x36b938(0x1c9))/0x4)+-parseInt(_0x36b938(0x1c4))/0x5*(parseInt(_0x36b938(0x1be))/0x6)+-parseInt(_0x36b938(0x1cb))/0x7*(parseInt(_0x36b938(0x1c5))/0x8)+parseInt(_0x36b938(0x1c2))/0x9+parseInt(_0x36b938(0x1c6))/0xa*(-parseInt(_0x36b938(0x1cd))/0xb)+parseInt(_0x36b938(0x1b7))/0xc;if(_0x128729===_0x1a2670)break;else _0xd4f500['push'](_0xd4f500['shift']());}catch(_0x49bbad){_0xd4f500['push'](_0xd4f500['shift']());}}}(a62_0x2278,0x951b7));import*as a62_0x280af7 from'node:fs';import*as a62_0x41c3dc from'node:path';function a62_0x3eeb(_0x586a89,_0x4c6ed0){const _0x2278cb=a62_0x2278();return a62_0x3eeb=function(_0x3eeb7c,_0x513c43){_0x3eeb7c=_0x3eeb7c-0x1b7;let _0x557c3f=_0x2278cb[_0x3eeb7c];return _0x557c3f;},a62_0x3eeb(_0x586a89,_0x4c6ed0);}function a62_0x2278(){const _0x1edd8d=['writeFileSync','21700752VVKAEO','mkdirSync','118qvNGcV','17246IuSjgC','warn','statSync','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','12UwbNNm','484854XzAaEA','dirname','chmodSync','10921851JNSwjv','existsSync','1591805fZERig','16UbjgPT','107080WsLiNZ',').\x20','Warning:\x20','4DjJzDS','Should\x20be\x200600\x20or\x20more\x20restrictive.','1903279YABkJB','\x20has\x20insecure\x20permissions\x20(','385kBWuzn'];a62_0x2278=function(){return _0x1edd8d;};return a62_0x2278();}export function setSecureFilePermissions(_0x523455){const _0x293928=a62_0x3eeb;try{a62_0x280af7['chmodSync'](_0x523455,0x180);}catch{console[_0x293928(0x1bb)](_0x293928(0x1bd)+_0x523455);}}export function setSecureDirectoryPermissions(_0x3213da){const _0x2d6997=a62_0x3eeb;try{a62_0x280af7[_0x2d6997(0x1c1)](_0x3213da,0x1c0);}catch{console[_0x2d6997(0x1bb)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x3213da);}}export function createSecureDirectory(_0x3deb05){const _0x29048a=a62_0x3eeb;!a62_0x280af7[_0x29048a(0x1c3)](_0x3deb05)&&(a62_0x280af7[_0x29048a(0x1b8)](_0x3deb05,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x3deb05));}export function validateSecureFilePermissions(_0xeb893f){const _0xf9f28=a62_0x3eeb;try{const _0x31969b=a62_0x280af7[_0xf9f28(0x1bc)](_0xeb893f),_0x19e066=_0x31969b['mode']&0x1ff,_0x4ba48e=(_0x19e066&0x3f)!==0x0;if(_0x4ba48e)return console['warn'](_0xf9f28(0x1c8)+_0xeb893f+_0xf9f28(0x1cc)+_0x19e066['toString'](0x8)+_0xf9f28(0x1c7)+_0xf9f28(0x1ca)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x29d3f5,_0x4a9fd0){const _0x15f1cd=a62_0x3eeb,_0x2aa794=a62_0x41c3dc[_0x15f1cd(0x1c0)](_0x29d3f5);createSecureDirectory(_0x2aa794),a62_0x280af7[_0x15f1cd(0x1ce)](_0x29d3f5,_0x4a9fd0,{'mode':0x180}),setSecureFilePermissions(_0x29d3f5);}
1
+ function a62_0x5039(_0x2f2c72,_0x133c14){const _0x4cdaa0=a62_0x4cda();return a62_0x5039=function(_0x5039c1,_0x21c046){_0x5039c1=_0x5039c1-0x15f;let _0x4a26fb=_0x4cdaa0[_0x5039c1];return _0x4a26fb;},a62_0x5039(_0x2f2c72,_0x133c14);}(function(_0x465c79,_0x50db2f){const _0xfd81b6=a62_0x5039,_0x44153c=_0x465c79();while(!![]){try{const _0x2ef7ae=-parseInt(_0xfd81b6(0x168))/0x1+parseInt(_0xfd81b6(0x163))/0x2+parseInt(_0xfd81b6(0x171))/0x3*(parseInt(_0xfd81b6(0x16c))/0x4)+parseInt(_0xfd81b6(0x161))/0x5+-parseInt(_0xfd81b6(0x167))/0x6*(parseInt(_0xfd81b6(0x15f))/0x7)+-parseInt(_0xfd81b6(0x160))/0x8*(-parseInt(_0xfd81b6(0x16f))/0x9)+-parseInt(_0xfd81b6(0x16b))/0xa;if(_0x2ef7ae===_0x50db2f)break;else _0x44153c['push'](_0x44153c['shift']());}catch(_0x5f4d3d){_0x44153c['push'](_0x44153c['shift']());}}}(a62_0x4cda,0x2db04));function a62_0x4cda(){const _0x1c69dc=['750510LDAxSv','Warning:\x20','133164NMjakq','chmodSync','Should\x20be\x200600\x20or\x20more\x20restrictive.','writeFileSync','90sktboJ','246370XaqKwa','existsSync','dirname','270010XIQlhf','29308JohHwh','warn','toString','45XsnyeC','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','138VctnNi','\x20has\x20insecure\x20permissions\x20(','mkdirSync','164927JQkhzZ','416320JjWyRs'];a62_0x4cda=function(){return _0x1c69dc;};return a62_0x4cda();}import*as a62_0x265e97 from'node:fs';import*as a62_0x314db3 from'node:path';export function setSecureFilePermissions(_0xda3fd0){const _0x2a60f1=a62_0x5039;try{a62_0x265e97[_0x2a60f1(0x164)](_0xda3fd0,0x180);}catch{console[_0x2a60f1(0x16d)](_0x2a60f1(0x170)+_0xda3fd0);}}export function setSecureDirectoryPermissions(_0x4aafbd){const _0x27c45f=a62_0x5039;try{a62_0x265e97[_0x27c45f(0x164)](_0x4aafbd,0x1c0);}catch{console[_0x27c45f(0x16d)](_0x27c45f(0x170)+_0x4aafbd);}}export function createSecureDirectory(_0x324b66){const _0x489f60=a62_0x5039;!a62_0x265e97[_0x489f60(0x169)](_0x324b66)&&(a62_0x265e97[_0x489f60(0x173)](_0x324b66,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x324b66));}export function validateSecureFilePermissions(_0x45f4b5){const _0x2a5fca=a62_0x5039;try{const _0x1ade7c=a62_0x265e97['statSync'](_0x45f4b5),_0x403cf8=_0x1ade7c['mode']&0x1ff,_0x3b5f99=(_0x403cf8&0x3f)!==0x0;if(_0x3b5f99)return console[_0x2a5fca(0x16d)](_0x2a5fca(0x162)+_0x45f4b5+_0x2a5fca(0x172)+_0x403cf8[_0x2a5fca(0x16e)](0x8)+').\x20'+_0x2a5fca(0x165)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x239022,_0x27168e){const _0x4d3703=a62_0x5039,_0xd902fa=a62_0x314db3[_0x4d3703(0x16a)](_0x239022);createSecureDirectory(_0xd902fa),a62_0x265e97[_0x4d3703(0x166)](_0x239022,_0x27168e,{'mode':0x180}),setSecureFilePermissions(_0x239022);}
@@ -1 +1 @@
1
- (function(_0xe79fac,_0x56682c){const _0x56a5dc=a63_0xfaba,_0x5e3e91=_0xe79fac();while(!![]){try{const _0x3dc4dc=parseInt(_0x56a5dc(0x19f))/0x1*(parseInt(_0x56a5dc(0x1aa))/0x2)+parseInt(_0x56a5dc(0x1a9))/0x3+-parseInt(_0x56a5dc(0x1a8))/0x4+parseInt(_0x56a5dc(0x1ab))/0x5*(-parseInt(_0x56a5dc(0x1a7))/0x6)+parseInt(_0x56a5dc(0x1a1))/0x7+parseInt(_0x56a5dc(0x19d))/0x8*(parseInt(_0x56a5dc(0x1a2))/0x9)+-parseInt(_0x56a5dc(0x1a5))/0xa*(parseInt(_0x56a5dc(0x1ae))/0xb);if(_0x3dc4dc===_0x56682c)break;else _0x5e3e91['push'](_0x5e3e91['shift']());}catch(_0x8edbb6){_0x5e3e91['push'](_0x5e3e91['shift']());}}}(a63_0x4731,0x5c3ab));function a63_0xfaba(_0xa04f6a,_0x31a89c){const _0x473196=a63_0x4731();return a63_0xfaba=function(_0xfaba54,_0x40bb32){_0xfaba54=_0xfaba54-0x19d;let _0x16235d=_0x473196[_0xfaba54];return _0x16235d;},a63_0xfaba(_0xa04f6a,_0x31a89c);}export function detectFormatFromExtension(_0x20020d){const _0x16a2a9=a63_0xfaba,_0x39d24d=_0x20020d[_0x16a2a9(0x19e)]()[_0x16a2a9(0x1a6)]('.')[_0x16a2a9(0x1a0)]();switch(_0x39d24d){case _0x16a2a9(0x1ad):return'json';case _0x16a2a9(0x1af):return'jsonl';case _0x16a2a9(0x1a4):case _0x16a2a9(0x1ac):return _0x16a2a9(0x1a4);case _0x16a2a9(0x1b0):case _0x16a2a9(0x1a3):return'table';default:return undefined;}}function a63_0x4731(){const _0x4676ef=['tsv','3518630INalgT','split','3688026cLdKZM','1724864gFSlbx','1045560OYmkRV','24390OfOWis','5NuiAwo','tab','json','33RJWjNh','jsonl','txt','5763304XrzHwi','toLowerCase','54MFEAMX','pop','5262488OZnuWL','9ApJbQj','text'];a63_0x4731=function(){return _0x4676ef;};return a63_0x4731();}export function resolveOutputFormat(_0x463250,_0x104090,_0x260fab){if(_0x463250)return _0x463250;if(_0x104090){const _0x2923b7=detectFormatFromExtension(_0x104090);if(_0x2923b7)return _0x2923b7;}return _0x260fab;}
1
+ (function(_0x451db4,_0x4a8bec){const _0xd5c246=a63_0xc718,_0x2c9b4e=_0x451db4();while(!![]){try{const _0x5b48df=-parseInt(_0xd5c246(0x1f2))/0x1*(-parseInt(_0xd5c246(0x1f6))/0x2)+parseInt(_0xd5c246(0x1ef))/0x3*(-parseInt(_0xd5c246(0x1f1))/0x4)+-parseInt(_0xd5c246(0x1e7))/0x5*(-parseInt(_0xd5c246(0x1e6))/0x6)+parseInt(_0xd5c246(0x1f4))/0x7+parseInt(_0xd5c246(0x1ec))/0x8*(-parseInt(_0xd5c246(0x1f3))/0x9)+parseInt(_0xd5c246(0x1ea))/0xa+parseInt(_0xd5c246(0x1ee))/0xb*(parseInt(_0xd5c246(0x1ed))/0xc);if(_0x5b48df===_0x4a8bec)break;else _0x2c9b4e['push'](_0x2c9b4e['shift']());}catch(_0x23bc8c){_0x2c9b4e['push'](_0x2c9b4e['shift']());}}}(a63_0x192e,0x45fb8));function a63_0x192e(){const _0x5e217d=['text','14lnYWvM','table','tab','78LLQBOk','25665ZpcjFC','split','json','1324790uhQMVu','tsv','20904NaTpyq','7425816QddQIJ','11VTiuPk','69jydQkF','txt','48836snaYwK','1995UZmhnR','954sOrZtH','87094VSEljK'];a63_0x192e=function(){return _0x5e217d;};return a63_0x192e();}function a63_0xc718(_0x214524,_0x656897){const _0x192e3b=a63_0x192e();return a63_0xc718=function(_0xc71862,_0x297e5f){_0xc71862=_0xc71862-0x1e4;let _0xf3b71e=_0x192e3b[_0xc71862];return _0xf3b71e;},a63_0xc718(_0x214524,_0x656897);}export function detectFormatFromExtension(_0x208081){const _0x37b2c0=a63_0xc718,_0x436481=_0x208081['toLowerCase']()[_0x37b2c0(0x1e8)]('.')['pop']();switch(_0x436481){case _0x37b2c0(0x1e9):return _0x37b2c0(0x1e9);case'jsonl':return'jsonl';case'tsv':case _0x37b2c0(0x1e5):return _0x37b2c0(0x1eb);case _0x37b2c0(0x1f0):case _0x37b2c0(0x1f5):return _0x37b2c0(0x1e4);default:return undefined;}}export function resolveOutputFormat(_0x3ce81e,_0x4b58ec,_0x52f5be){if(_0x3ce81e)return _0x3ce81e;if(_0x4b58ec){const _0x1b5b62=detectFormatFromExtension(_0x4b58ec);if(_0x1b5b62)return _0x1b5b62;}return _0x52f5be;}
@@ -1 +1 @@
1
- (function(_0x13e094,_0x5f5aa2){const _0x4b2a36=a64_0x3647,_0xc488fc=_0x13e094();while(!![]){try{const _0x449fad=-parseInt(_0x4b2a36(0xbb))/0x1+-parseInt(_0x4b2a36(0xc9))/0x2*(-parseInt(_0x4b2a36(0xb2))/0x3)+parseInt(_0x4b2a36(0xc2))/0x4+-parseInt(_0x4b2a36(0xaa))/0x5+-parseInt(_0x4b2a36(0xc8))/0x6+-parseInt(_0x4b2a36(0xa9))/0x7+parseInt(_0x4b2a36(0xd0))/0x8;if(_0x449fad===_0x5f5aa2)break;else _0xc488fc['push'](_0xc488fc['shift']());}catch(_0xa29f49){_0xc488fc['push'](_0xc488fc['shift']());}}}(a64_0xc488,0xb9f66));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x16c2dd=a64_0x3647;return process[_0x16c2dd(0xb6)]['columns']||Infinity;}export function formatAsTable(_0x46992b,_0x136569=DEFAULT_MAX_DISPLAY_ROWS,_0x3c5bae=![],_0x120bbb={}){const _0x25242e=a64_0x3647;if(_0x46992b[_0x25242e(0xa5)][_0x25242e(0xd5)]===0x0)return _0x25242e(0xc6);const _0x43ed3f=_0x46992b['columns'][_0x25242e(0xa6)](_0x4cd254=>_0x4cd254['name']),_0xe99021=_0x46992b['columns'][_0x25242e(0xa6)](_0x575fa9=>simplifyType(_0x575fa9[_0x25242e(0xc0)])),_0xfd3421=_0x46992b[_0x25242e(0xa5)][_0x25242e(0xb9)](0x0,_0x136569),_0x24fe11=_0x46992b[_0x25242e(0xa5)][_0x25242e(0xd5)],_0x59c175=_0x24fe11>_0x136569,_0x4c40c4=[],_0x1219df=getTerminalWidth(),_0x173480=_0x1219df!==Infinity,_0x26167d=0x32;let _0x10bd7f=_0x43ed3f['map']((_0x9c8e79,_0x325bfc)=>{const _0x4dc326=_0x25242e,_0x1c0937=stringWidth(_0xe99021[_0x325bfc]),_0x132b66=Math[_0x4dc326(0xae)](..._0xfd3421[_0x4dc326(0xa6)](_0x436123=>{const _0x59f5c0=_0x436123[_0x9c8e79];return stringWidth(formatValue(_0x59f5c0));})),_0x2d025b=Math[_0x4dc326(0xae)](stringWidth(_0x9c8e79),_0x1c0937,_0x132b66);return _0x3c5bae?_0x2d025b:Math[_0x4dc326(0xc5)](_0x2d025b,_0x26167d);});if(_0x173480&&!_0x3c5bae&&_0x43ed3f[_0x25242e(0xd5)]>0x0){const _0x23bc1d=_0x521cea=>{let _0x24798e=0x1;for(const _0x63dac3 of _0x521cea){_0x24798e+=_0x63dac3+0x3;}return _0x24798e+0x1;};let _0x44012e=_0x23bc1d(_0x10bd7f);if(_0x44012e>_0x1219df){const _0x2a9f45=0x3;for(let _0x165dc2=_0x10bd7f[_0x25242e(0xd5)]-0x1;_0x165dc2>=0x0;_0x165dc2--){_0x44012e=_0x23bc1d(_0x10bd7f);if(_0x44012e<=_0x1219df)break;const _0x4775ae=_0x10bd7f[_0x165dc2],_0x28ac34=_0x44012e-_0x1219df,_0x129984=_0x4775ae-_0x2a9f45,_0x1a1f92=Math[_0x25242e(0xc5)](_0x28ac34,_0x129984);_0x1a1f92>0x0&&(_0x10bd7f[_0x165dc2]=_0x4775ae-_0x1a1f92);}}}const _0x1ef2b2=_0x43ed3f,_0x4841aa=_0xe99021,_0x879344=_0x10bd7f,_0x53ee8e=_0x10bd7f;_0x4c40c4[_0x25242e(0xb7)](colorBorder('┌'+_0x53ee8e[_0x25242e(0xa6)](_0x262300=>'─'['repeat'](_0x262300+0x2))[_0x25242e(0xa7)]('┬')+'┐',_0x120bbb));const _0x1cca48=_0x1ef2b2['map']((_0x5ac5e3,_0x2cf12e)=>centerAlign(_0x5ac5e3,_0x879344[_0x2cf12e]));_0x4c40c4['push'](colorBorder('│',_0x120bbb)+'\x20'+_0x1cca48[_0x25242e(0xa7)]('\x20'+colorBorder('│',_0x120bbb)+'\x20')+'\x20'+colorBorder('│',_0x120bbb));const _0x16f141=_0x4841aa[_0x25242e(0xa6)]((_0x1c7aa4,_0xf9466f)=>colorType(centerAlign(_0x1c7aa4,_0x879344[_0xf9466f]),_0x120bbb));_0x4c40c4[_0x25242e(0xb7)](colorBorder('│',_0x120bbb)+'\x20'+_0x16f141[_0x25242e(0xa7)]('\x20'+colorBorder('│',_0x120bbb)+'\x20')+'\x20'+colorBorder('│',_0x120bbb)),_0x4c40c4[_0x25242e(0xb7)](colorBorder('├'+_0x53ee8e[_0x25242e(0xa6)](_0x313a7b=>'─'['repeat'](_0x313a7b+0x2))[_0x25242e(0xa7)]('┼')+'┤',_0x120bbb));const _0x130666=(_0x3e4bcf,_0x1b0e27)=>{const _0x47c325=_0x25242e,_0x466ada=stringWidth(_0x3e4bcf);if(_0x466ada<=_0x1b0e27)return _0x3e4bcf;let _0x12060e=_0x3e4bcf;while(stringWidth(_0x12060e+'…')>_0x1b0e27&&_0x12060e[_0x47c325(0xd5)]>0x0){_0x12060e=_0x12060e['slice'](0x0,-0x1);}return _0x12060e+'…';};_0xfd3421['forEach'](_0x4edec8=>{const _0x5dbf01=_0x25242e,_0x20d8b1=_0x43ed3f[_0x5dbf01(0xa6)]((_0x1352f7,_0x2bcfc5)=>{const _0x1ce371=_0x5dbf01,_0x38f600=_0x4edec8[_0x1352f7],_0x3e74b6=formatValue(_0x38f600),_0x232fb2=_0x879344[_0x2bcfc5],_0x4354eb=_0x130666(_0x3e74b6,_0x232fb2),_0x509aa2=typeof _0x38f600==='number'||typeof _0x38f600===_0x1ce371(0xba)&&/^-?\d+$/[_0x1ce371(0xad)](_0x38f600);return _0x509aa2?padStart(_0x4354eb,_0x232fb2):padEnd(_0x4354eb,_0x232fb2);});_0x4c40c4[_0x5dbf01(0xb7)](colorBorder('│',_0x120bbb)+'\x20'+_0x20d8b1[_0x5dbf01(0xa7)]('\x20'+colorBorder('│',_0x120bbb)+'\x20')+'\x20'+colorBorder('│',_0x120bbb));});const _0x5d33ad=_0x53ee8e[_0x25242e(0xca)]((_0x5b2972,_0x1c1180)=>_0x5b2972+_0x1c1180+0x3,-0x1);_0x4c40c4[_0x25242e(0xb7)](colorBorder('├'+_0x53ee8e['map'](_0x1bea3b=>'─'[_0x25242e(0xcb)](_0x1bea3b+0x2))[_0x25242e(0xa7)]('┴')+'┤',_0x120bbb));let _0x2e7eeb;_0x59c175?_0x2e7eeb=_0x24fe11+_0x25242e(0xd4)+_0x136569+_0x25242e(0xab):_0x2e7eeb=_0x24fe11+_0x25242e(0xc3)+(_0x24fe11===0x1?'':'s');const _0x168d3e=_0x2e7eeb[_0x25242e(0xb1)](_0x5d33ad-0x2);return _0x4c40c4[_0x25242e(0xb7)](colorBorder('│',_0x120bbb)+'\x20'+_0x168d3e+'\x20'+colorBorder('│',_0x120bbb)),_0x4c40c4['push'](colorBorder('└'+'─'[_0x25242e(0xcb)](_0x5d33ad)+'┘',_0x120bbb)),_0x4c40c4[_0x25242e(0xa7)]('\x0a');}function simplifyType(_0x274eb3){const _0x15f901=a64_0x3647,_0x383abe={'varchar':_0x15f901(0xba),'bigint':_0x15f901(0xc1),'integer':_0x15f901(0xb3),'double':_0x15f901(0xbc),'boolean':'bool','date':_0x15f901(0xaf),'timestamp':_0x15f901(0xbd),'array':_0x15f901(0xa8),'map':_0x15f901(0xa6),'row':_0x15f901(0xd7)},_0x23a441=_0x274eb3['toLowerCase']();for(const [_0x3061e3,_0x162dce]of Object[_0x15f901(0xd3)](_0x383abe)){if(_0x23a441['startsWith'](_0x3061e3))return _0x162dce;}return _0x274eb3['length']>0xa?_0x274eb3[_0x15f901(0xce)](0x0,0xa):_0x274eb3;}export function formatAsJSON(_0x361c02,_0x559437={}){const _0x54f7ef=a64_0x3647;if(_0x361c02[_0x54f7ef(0xa5)]['length']===0x0)return'[]';if(shouldUseColor(_0x559437))return colorizeJSON(_0x361c02['data'],_0x559437);const _0x2e2115=_0x361c02[_0x54f7ef(0xa5)][_0x54f7ef(0xa6)](_0x27eee9=>'\x20\x20'+JSON[_0x54f7ef(0xc7)](_0x27eee9));return'[\x0a'+_0x2e2115['join'](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x16f767,_0x2f6510={}){const _0x1a3c8e=a64_0x3647;if(_0x16f767['data'][_0x1a3c8e(0xd5)]===0x0)return'';if(shouldUseColor(_0x2f6510))return _0x16f767[_0x1a3c8e(0xa5)][_0x1a3c8e(0xa6)](_0x11cb8e=>colorizeJSONCompact(_0x11cb8e,_0x2f6510))['join']('\x0a');return _0x16f767[_0x1a3c8e(0xa5)][_0x1a3c8e(0xa6)](_0x4db5f6=>JSON[_0x1a3c8e(0xc7)](_0x4db5f6))[_0x1a3c8e(0xa7)]('\x0a');}export function formatAsTSV(_0x555110){const _0x11c1bc=a64_0x3647;if(_0x555110[_0x11c1bc(0xa5)][_0x11c1bc(0xd5)]===0x0)return'';const _0x457aaa=[],_0x2358ee=_0x555110['columns']['map'](_0x1cfc49=>_0x1cfc49['name']);return _0x457aaa[_0x11c1bc(0xb7)](_0x2358ee[_0x11c1bc(0xa7)]('\x09')),_0x555110[_0x11c1bc(0xa5)][_0x11c1bc(0xac)](_0x2984a1=>{const _0x121338=_0x11c1bc,_0x4491f3=_0x2358ee[_0x121338(0xa6)](_0x41464e=>{const _0x4ed8db=_0x2984a1[_0x41464e];return formatValueForTSV(_0x4ed8db);});_0x457aaa[_0x121338(0xb7)](_0x4491f3[_0x121338(0xa7)]('\x09'));}),_0x457aaa[_0x11c1bc(0xa7)]('\x0a');}function formatValue(_0x265ac1){const _0x48a83a=a64_0x3647;if(_0x265ac1===null||_0x265ac1===undefined)return'';if(typeof _0x265ac1===_0x48a83a(0xba)){const _0x39e1d3=_0x265ac1[_0x48a83a(0xcd)](/\n/g,'\x5cn')[_0x48a83a(0xcd)](/\r/g,'\x5cr')[_0x48a83a(0xcd)](/\t/g,'\x5ct');return _0x39e1d3;}if(typeof _0x265ac1===_0x48a83a(0xd6))return String(_0x265ac1);if(typeof _0x265ac1==='boolean')return _0x265ac1?'true':'false';if(_0x265ac1 instanceof Date)return _0x265ac1[_0x48a83a(0xbf)]();if(typeof _0x265ac1===_0x48a83a(0xb5))return JSON['stringify'](_0x265ac1);return String(_0x265ac1);}function formatValueForTSV(_0x1d335e){const _0x5bf04e=a64_0x3647;if(_0x1d335e===null||_0x1d335e===undefined)return'';if(typeof _0x1d335e===_0x5bf04e(0xba))return _0x1d335e[_0x5bf04e(0xcd)](/\t/g,'\x5ct')[_0x5bf04e(0xcd)](/\n/g,'\x5cn');if(typeof _0x1d335e==='number'||typeof _0x1d335e===_0x5bf04e(0xd1))return String(_0x1d335e);if(_0x1d335e instanceof Date)return _0x1d335e[_0x5bf04e(0xbf)]();if(typeof _0x1d335e===_0x5bf04e(0xb5))return JSON[_0x5bf04e(0xc7)](_0x1d335e);return String(_0x1d335e);}export function formatQueryResult(_0x2e251c,_0x5e3b11){const _0x3e4fba=a64_0x3647;switch(_0x5e3b11){case _0x3e4fba(0xcf):return formatAsTable(_0x2e251c);case _0x3e4fba(0xb8):return formatAsJSON(_0x2e251c);case _0x3e4fba(0xcc):return formatAsJSONL(_0x2e251c);case _0x3e4fba(0xc4):return formatAsTSV(_0x2e251c);default:return formatAsJSON(_0x2e251c);}}function a64_0x3647(_0x1dfa4e,_0x2280db){const _0xc48878=a64_0xc488();return a64_0x3647=function(_0x3647f3,_0x4e1e3f){_0x3647f3=_0x3647f3-0xa5;let _0x391b3a=_0xc48878[_0x3647f3];return _0x391b3a;},a64_0x3647(_0x1dfa4e,_0x2280db);}function a64_0xc488(){const _0xe8231b=['test','max','date','floor','padEnd','7131eoQEXR','int','log','object','stdout','push','json','slice','string','796994ELczCi','double','timestamp','toFixed','toISOString','type','long','2074684guXgqD','\x20row','tsv','min','No\x20rows\x20returned','stringify','454320FifBZc','874cbDkxQ','reduce','repeat','jsonl','replace','substring','table','12782288GKvZfU','boolean','pow','entries','\x20rows\x20(','length','number','row','data','map','join','array','696087YpsybE','7106745hggQqm','\x20shown)','forEach'];a64_0xc488=function(){return _0xe8231b;};return a64_0xc488();}export function formatBytes(_0x485681){const _0x15425a=a64_0x3647;if(_0x485681===0x0)return'0\x20B';const _0x3bc586=['B','KB','MB','GB','TB'],_0x8b5ce=0x400,_0x2c69d3=Math['floor'](Math['log'](_0x485681)/Math[_0x15425a(0xb4)](_0x8b5ce)),_0x27aa93=_0x485681/Math['pow'](_0x8b5ce,_0x2c69d3),_0xbcd3a6=_0x27aa93>=0xa?0x1:0x2;return _0x27aa93[_0x15425a(0xbe)](_0xbcd3a6)+'\x20'+_0x3bc586[_0x2c69d3];}export function formatRows(_0xf90cf8){const _0x1965f6=a64_0x3647;if(_0xf90cf8==null)return'-';if(_0xf90cf8===0x0)return'0';if(_0xf90cf8<0x3e8)return _0xf90cf8['toString']();const _0x4fa2bd=['','K','M','B','T'],_0x6b08cc=0x3e8,_0x56b01b=Math[_0x1965f6(0xb0)](Math[_0x1965f6(0xb4)](_0xf90cf8)/Math[_0x1965f6(0xb4)](_0x6b08cc)),_0x6ffe5f=_0xf90cf8/Math[_0x1965f6(0xd2)](_0x6b08cc,_0x56b01b),_0x484219=_0x6ffe5f>=0xa?0x1:0x2;return''+_0x6ffe5f[_0x1965f6(0xbe)](_0x484219)+_0x4fa2bd[_0x56b01b];}
1
+ (function(_0x5385bf,_0x1d0295){const _0x740600=a64_0xe735,_0x44c235=_0x5385bf();while(!![]){try{const _0x1650b0=parseInt(_0x740600(0x186))/0x1*(-parseInt(_0x740600(0x182))/0x2)+parseInt(_0x740600(0x1ab))/0x3+parseInt(_0x740600(0x19c))/0x4+-parseInt(_0x740600(0x1a7))/0x5*(-parseInt(_0x740600(0x19d))/0x6)+-parseInt(_0x740600(0x189))/0x7+-parseInt(_0x740600(0x192))/0x8*(parseInt(_0x740600(0x1b2))/0x9)+parseInt(_0x740600(0x1a1))/0xa;if(_0x1650b0===_0x1d0295)break;else _0x44c235['push'](_0x44c235['shift']());}catch(_0x4b8250){_0x44c235['push'](_0x44c235['shift']());}}}(a64_0x237a,0xd3156));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';function a64_0x237a(){const _0x13f3c3=['date','array','boolean','log','92845dBLVMA','name','min','toLowerCase','2817183hLkwgy','entries','string','int','\x20rows\x20(','row','reduce','36AfsGar','replace','join','long','substring','repeat','1658qSsHJO','toISOString','test','stringify','761BRhOhC','map','slice','7688023jdGXJY','jsonl','table','\x20shown)','type','floor','length','0\x20B','toString','2360504FzkYzT','push','columns','forEach','json','timestamp','number','data','double','max','1335028BvcEEb','210ntwGoD','pow','startsWith','object','18512750FHMNIz','toFixed'];a64_0x237a=function(){return _0x13f3c3;};return a64_0x237a();}const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x24e0b9=a64_0xe735;return process['stdout'][_0x24e0b9(0x194)]||Infinity;}export function formatAsTable(_0x9c6956,_0x4e41ef=DEFAULT_MAX_DISPLAY_ROWS,_0x1478dd=![],_0x4a3870={}){const _0x170858=a64_0xe735;if(_0x9c6956['data'][_0x170858(0x18f)]===0x0)return'No\x20rows\x20returned';const _0x56068c=_0x9c6956[_0x170858(0x194)][_0x170858(0x187)](_0x437ed0=>_0x437ed0[_0x170858(0x1a8)]),_0x51efe3=_0x9c6956[_0x170858(0x194)]['map'](_0x20c6ac=>simplifyType(_0x20c6ac[_0x170858(0x18d)])),_0x19f840=_0x9c6956['data']['slice'](0x0,_0x4e41ef),_0x5adb42=_0x9c6956[_0x170858(0x199)][_0x170858(0x18f)],_0x5e3877=_0x5adb42>_0x4e41ef,_0xa4bd13=[],_0x3d81e0=getTerminalWidth(),_0x105f7c=_0x3d81e0!==Infinity,_0x5e7904=0x32;let _0x290e52=_0x56068c[_0x170858(0x187)]((_0xf8a5c2,_0x519b90)=>{const _0x2eb9d5=_0x170858,_0x60ecdd=stringWidth(_0x51efe3[_0x519b90]),_0x5ccd8a=Math[_0x2eb9d5(0x19b)](..._0x19f840[_0x2eb9d5(0x187)](_0x4e141d=>{const _0x2952e6=_0x4e141d[_0xf8a5c2];return stringWidth(formatValue(_0x2952e6));})),_0xeebca1=Math[_0x2eb9d5(0x19b)](stringWidth(_0xf8a5c2),_0x60ecdd,_0x5ccd8a);return _0x1478dd?_0xeebca1:Math[_0x2eb9d5(0x1a9)](_0xeebca1,_0x5e7904);});if(_0x105f7c&&!_0x1478dd&&_0x56068c[_0x170858(0x18f)]>0x0){const _0x43a0d3=_0xa60187=>{let _0x30eb39=0x1;for(const _0x1fe789 of _0xa60187){_0x30eb39+=_0x1fe789+0x3;}return _0x30eb39+0x1;};let _0x16a213=_0x43a0d3(_0x290e52);if(_0x16a213>_0x3d81e0){const _0x105f23=0x3;for(let _0x37bf7e=_0x290e52[_0x170858(0x18f)]-0x1;_0x37bf7e>=0x0;_0x37bf7e--){_0x16a213=_0x43a0d3(_0x290e52);if(_0x16a213<=_0x3d81e0)break;const _0x397180=_0x290e52[_0x37bf7e],_0x3288e4=_0x16a213-_0x3d81e0,_0x10ff6d=_0x397180-_0x105f23,_0x3d69b4=Math[_0x170858(0x1a9)](_0x3288e4,_0x10ff6d);_0x3d69b4>0x0&&(_0x290e52[_0x37bf7e]=_0x397180-_0x3d69b4);}}}const _0x31ccfb=_0x56068c,_0x8ccaee=_0x51efe3,_0x50733e=_0x290e52,_0x4ebf7f=_0x290e52;_0xa4bd13['push'](colorBorder('┌'+_0x4ebf7f[_0x170858(0x187)](_0x47f729=>'─'[_0x170858(0x1b7)](_0x47f729+0x2))[_0x170858(0x1b4)]('┬')+'┐',_0x4a3870));const _0x2c4faa=_0x31ccfb[_0x170858(0x187)]((_0x4e9c25,_0x18647a)=>centerAlign(_0x4e9c25,_0x50733e[_0x18647a]));_0xa4bd13[_0x170858(0x193)](colorBorder('│',_0x4a3870)+'\x20'+_0x2c4faa[_0x170858(0x1b4)]('\x20'+colorBorder('│',_0x4a3870)+'\x20')+'\x20'+colorBorder('│',_0x4a3870));const _0x4bd374=_0x8ccaee[_0x170858(0x187)]((_0x12f25a,_0x59b358)=>colorType(centerAlign(_0x12f25a,_0x50733e[_0x59b358]),_0x4a3870));_0xa4bd13[_0x170858(0x193)](colorBorder('│',_0x4a3870)+'\x20'+_0x4bd374['join']('\x20'+colorBorder('│',_0x4a3870)+'\x20')+'\x20'+colorBorder('│',_0x4a3870)),_0xa4bd13['push'](colorBorder('├'+_0x4ebf7f[_0x170858(0x187)](_0x86ec97=>'─'[_0x170858(0x1b7)](_0x86ec97+0x2))[_0x170858(0x1b4)]('┼')+'┤',_0x4a3870));const _0x14e952=(_0x221e54,_0x440825)=>{const _0x45e019=_0x170858,_0x580446=stringWidth(_0x221e54);if(_0x580446<=_0x440825)return _0x221e54;let _0x297b30=_0x221e54;while(stringWidth(_0x297b30+'…')>_0x440825&&_0x297b30[_0x45e019(0x18f)]>0x0){_0x297b30=_0x297b30[_0x45e019(0x188)](0x0,-0x1);}return _0x297b30+'…';};_0x19f840[_0x170858(0x195)](_0x39a4e2=>{const _0x41c331=_0x170858,_0x38385b=_0x56068c['map']((_0x5751bf,_0xf46026)=>{const _0x1a431b=a64_0xe735,_0xb6e17c=_0x39a4e2[_0x5751bf],_0xb9d689=formatValue(_0xb6e17c),_0x40bc64=_0x50733e[_0xf46026],_0x17c3b5=_0x14e952(_0xb9d689,_0x40bc64),_0x324986=typeof _0xb6e17c===_0x1a431b(0x198)||typeof _0xb6e17c===_0x1a431b(0x1ad)&&/^-?\d+$/[_0x1a431b(0x184)](_0xb6e17c);return _0x324986?padStart(_0x17c3b5,_0x40bc64):padEnd(_0x17c3b5,_0x40bc64);});_0xa4bd13[_0x41c331(0x193)](colorBorder('│',_0x4a3870)+'\x20'+_0x38385b['join']('\x20'+colorBorder('│',_0x4a3870)+'\x20')+'\x20'+colorBorder('│',_0x4a3870));});const _0x255160=_0x4ebf7f[_0x170858(0x1b1)]((_0x2fb1cb,_0x23efb9)=>_0x2fb1cb+_0x23efb9+0x3,-0x1);_0xa4bd13[_0x170858(0x193)](colorBorder('├'+_0x4ebf7f['map'](_0x27e9c5=>'─'[_0x170858(0x1b7)](_0x27e9c5+0x2))['join']('┴')+'┤',_0x4a3870));let _0x38aafd;_0x5e3877?_0x38aafd=_0x5adb42+_0x170858(0x1af)+_0x4e41ef+_0x170858(0x18c):_0x38aafd=_0x5adb42+'\x20row'+(_0x5adb42===0x1?'':'s');const _0x55aefa=_0x38aafd['padEnd'](_0x255160-0x2);return _0xa4bd13[_0x170858(0x193)](colorBorder('│',_0x4a3870)+'\x20'+_0x55aefa+'\x20'+colorBorder('│',_0x4a3870)),_0xa4bd13[_0x170858(0x193)](colorBorder('└'+'─'[_0x170858(0x1b7)](_0x255160)+'┘',_0x4a3870)),_0xa4bd13[_0x170858(0x1b4)]('\x0a');}function simplifyType(_0x137f10){const _0x315716=a64_0xe735,_0x594525={'varchar':_0x315716(0x1ad),'bigint':_0x315716(0x1b5),'integer':_0x315716(0x1ae),'double':_0x315716(0x19a),'boolean':'bool','date':_0x315716(0x1a3),'timestamp':_0x315716(0x197),'array':_0x315716(0x1a4),'map':'map','row':_0x315716(0x1b0)},_0x2f96c2=_0x137f10[_0x315716(0x1aa)]();for(const [_0xb07616,_0x28a732]of Object[_0x315716(0x1ac)](_0x594525)){if(_0x2f96c2[_0x315716(0x19f)](_0xb07616))return _0x28a732;}return _0x137f10[_0x315716(0x18f)]>0xa?_0x137f10[_0x315716(0x1b6)](0x0,0xa):_0x137f10;}export function formatAsJSON(_0x170443,_0xb6b22a={}){const _0x38693d=a64_0xe735;if(_0x170443['data'][_0x38693d(0x18f)]===0x0)return'[]';if(shouldUseColor(_0xb6b22a))return colorizeJSON(_0x170443[_0x38693d(0x199)],_0xb6b22a);const _0x11df98=_0x170443[_0x38693d(0x199)][_0x38693d(0x187)](_0x5176b7=>'\x20\x20'+JSON[_0x38693d(0x185)](_0x5176b7));return'[\x0a'+_0x11df98[_0x38693d(0x1b4)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x6bdcf2,_0x56a3b2={}){const _0x1cdfec=a64_0xe735;if(_0x6bdcf2['data'][_0x1cdfec(0x18f)]===0x0)return'';if(shouldUseColor(_0x56a3b2))return _0x6bdcf2['data'][_0x1cdfec(0x187)](_0x41b089=>colorizeJSONCompact(_0x41b089,_0x56a3b2))[_0x1cdfec(0x1b4)]('\x0a');return _0x6bdcf2['data'][_0x1cdfec(0x187)](_0x1cb598=>JSON['stringify'](_0x1cb598))['join']('\x0a');}export function formatAsTSV(_0x5568d5){const _0x5810ed=a64_0xe735;if(_0x5568d5[_0x5810ed(0x199)]['length']===0x0)return'';const _0x46f932=[],_0x3d8773=_0x5568d5[_0x5810ed(0x194)][_0x5810ed(0x187)](_0x32292c=>_0x32292c[_0x5810ed(0x1a8)]);return _0x46f932[_0x5810ed(0x193)](_0x3d8773[_0x5810ed(0x1b4)]('\x09')),_0x5568d5[_0x5810ed(0x199)][_0x5810ed(0x195)](_0x1d643e=>{const _0x4d7005=_0x5810ed,_0x4764b5=_0x3d8773[_0x4d7005(0x187)](_0x40df66=>{const _0x2d5f76=_0x1d643e[_0x40df66];return formatValueForTSV(_0x2d5f76);});_0x46f932[_0x4d7005(0x193)](_0x4764b5['join']('\x09'));}),_0x46f932['join']('\x0a');}function formatValue(_0x39f9b7){const _0x30e7f6=a64_0xe735;if(_0x39f9b7===null||_0x39f9b7===undefined)return'';if(typeof _0x39f9b7==='string'){const _0x351ff5=_0x39f9b7['replace'](/\n/g,'\x5cn')[_0x30e7f6(0x1b3)](/\r/g,'\x5cr')[_0x30e7f6(0x1b3)](/\t/g,'\x5ct');return _0x351ff5;}if(typeof _0x39f9b7===_0x30e7f6(0x198))return String(_0x39f9b7);if(typeof _0x39f9b7===_0x30e7f6(0x1a5))return _0x39f9b7?'true':'false';if(_0x39f9b7 instanceof Date)return _0x39f9b7[_0x30e7f6(0x183)]();if(typeof _0x39f9b7===_0x30e7f6(0x1a0))return JSON[_0x30e7f6(0x185)](_0x39f9b7);return String(_0x39f9b7);}function a64_0xe735(_0x321011,_0x2a2d39){const _0x237a9e=a64_0x237a();return a64_0xe735=function(_0xe73535,_0x2b3c4b){_0xe73535=_0xe73535-0x182;let _0x38b171=_0x237a9e[_0xe73535];return _0x38b171;},a64_0xe735(_0x321011,_0x2a2d39);}function formatValueForTSV(_0x541a7c){const _0x42cf00=a64_0xe735;if(_0x541a7c===null||_0x541a7c===undefined)return'';if(typeof _0x541a7c===_0x42cf00(0x1ad))return _0x541a7c[_0x42cf00(0x1b3)](/\t/g,'\x5ct')[_0x42cf00(0x1b3)](/\n/g,'\x5cn');if(typeof _0x541a7c===_0x42cf00(0x198)||typeof _0x541a7c===_0x42cf00(0x1a5))return String(_0x541a7c);if(_0x541a7c instanceof Date)return _0x541a7c[_0x42cf00(0x183)]();if(typeof _0x541a7c===_0x42cf00(0x1a0))return JSON[_0x42cf00(0x185)](_0x541a7c);return String(_0x541a7c);}export function formatQueryResult(_0x3cbac4,_0x4ce90e){const _0x4c584b=a64_0xe735;switch(_0x4ce90e){case _0x4c584b(0x18b):return formatAsTable(_0x3cbac4);case _0x4c584b(0x196):return formatAsJSON(_0x3cbac4);case _0x4c584b(0x18a):return formatAsJSONL(_0x3cbac4);case'tsv':return formatAsTSV(_0x3cbac4);default:return formatAsJSON(_0x3cbac4);}}export function formatBytes(_0x1f86d0){const _0xa6cd4=a64_0xe735;if(_0x1f86d0===0x0)return _0xa6cd4(0x190);const _0x20a7e0=['B','KB','MB','GB','TB'],_0x45c659=0x400,_0x3f948e=Math['floor'](Math[_0xa6cd4(0x1a6)](_0x1f86d0)/Math[_0xa6cd4(0x1a6)](_0x45c659)),_0x38509f=_0x1f86d0/Math[_0xa6cd4(0x19e)](_0x45c659,_0x3f948e),_0x1af71e=_0x38509f>=0xa?0x1:0x2;return _0x38509f[_0xa6cd4(0x1a2)](_0x1af71e)+'\x20'+_0x20a7e0[_0x3f948e];}export function formatRows(_0x12ba79){const _0x359a69=a64_0xe735;if(_0x12ba79==null)return'-';if(_0x12ba79===0x0)return'0';if(_0x12ba79<0x3e8)return _0x12ba79[_0x359a69(0x191)]();const _0x42c5fc=['','K','M','B','T'],_0x16f6a7=0x3e8,_0xf40ec0=Math[_0x359a69(0x18e)](Math[_0x359a69(0x1a6)](_0x12ba79)/Math[_0x359a69(0x1a6)](_0x16f6a7)),_0x45afff=_0x12ba79/Math[_0x359a69(0x19e)](_0x16f6a7,_0xf40ec0),_0x3ca1df=_0x45afff>=0xa?0x1:0x2;return''+_0x45afff[_0x359a69(0x1a2)](_0x3ca1df)+_0x42c5fc[_0xf40ec0];}
@@ -1 +1 @@
1
- (function(_0x569001,_0x430c01){const _0x230068=a65_0x4612,_0x1f710d=_0x569001();while(!![]){try{const _0x24fe89=-parseInt(_0x230068(0x1ba))/0x1+-parseInt(_0x230068(0x1ad))/0x2*(parseInt(_0x230068(0x1b0))/0x3)+parseInt(_0x230068(0x1a7))/0x4+-parseInt(_0x230068(0x1b3))/0x5*(parseInt(_0x230068(0x1ac))/0x6)+-parseInt(_0x230068(0x1a8))/0x7+parseInt(_0x230068(0x1b5))/0x8+parseInt(_0x230068(0x1b7))/0x9;if(_0x24fe89===_0x430c01)break;else _0x1f710d['push'](_0x1f710d['shift']());}catch(_0x156fff){_0x1f710d['push'](_0x1f710d['shift']());}}}(a65_0x4f4c,0x87dd9));function a65_0x4612(_0x516c31,_0x3451c2){const _0x4f4c42=a65_0x4f4c();return a65_0x4612=function(_0x46124c,_0x4d297e){_0x46124c=_0x46124c-0x1a7;let _0x48cc93=_0x4f4c42[_0x46124c];return _0x48cc93;},a65_0x4612(_0x516c31,_0x3451c2);}function a65_0x4f4c(){const _0x4a6a78=['EACCES','79444NOfAjQ','INTERNAL','793608yBuksH','3786741deSEls','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','NOT_FOUND','code','126CgtkMp','941242ljXxhh','parse','\x27:\x20','6kufQFM','message','INVALID_ARGUMENT','94730VWMQaw','Failed\x20to\x20load\x20JSON:\x20','5966320HkoPSM','utf-8','14146452JIQSkY','ENOENT'];a65_0x4f4c=function(){return _0x4a6a78;};return a65_0x4f4c();}import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x281439,_0x2fc68c){const _0x5bfefa=a65_0x4612;try{if(_0x2fc68c){const _0x57952d=await readFile(_0x281439,_0x5bfefa(0x1b6));try{return JSON['parse'](_0x57952d);}catch(_0x3a7bb3){throw new SDKError(ErrorCode[_0x5bfefa(0x1b2)],'Invalid\x20JSON\x20in\x20file\x20\x27'+_0x281439+_0x5bfefa(0x1af)+(_0x3a7bb3 instanceof Error?_0x3a7bb3['message']:String(_0x3a7bb3)));}}else try{return JSON[_0x5bfefa(0x1ae)](_0x281439);}catch(_0x70642f){throw new SDKError(ErrorCode[_0x5bfefa(0x1b2)],'Invalid\x20JSON\x20string:\x20'+(_0x70642f instanceof Error?_0x70642f[_0x5bfefa(0x1b1)]:String(_0x70642f)));}}catch(_0x1c68c7){if(_0x1c68c7 instanceof SDKError)throw _0x1c68c7;if(_0x1c68c7 instanceof Error&&'code'in _0x1c68c7){const _0x19307b=_0x1c68c7;if(_0x19307b[_0x5bfefa(0x1ab)]===_0x5bfefa(0x1b8))throw new SDKError(ErrorCode[_0x5bfefa(0x1aa)],'File\x20not\x20found:\x20'+_0x281439);else{if(_0x19307b[_0x5bfefa(0x1ab)]===_0x5bfefa(0x1b9))throw new SDKError(ErrorCode['PERMISSION_DENIED'],'Permission\x20denied\x20reading\x20file:\x20'+_0x281439);}}throw new SDKError(ErrorCode[_0x5bfefa(0x1bb)],_0x5bfefa(0x1b4)+(_0x1c68c7 instanceof Error?_0x1c68c7[_0x5bfefa(0x1b1)]:String(_0x1c68c7)));}}export async function loadJSONFromOptions(_0x55f7c8,_0x9d4261){const _0x16d575=a65_0x4612;if(_0x55f7c8&&_0x9d4261)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x16d575(0x1a9));if(_0x55f7c8)return await loadJSON(_0x55f7c8,![]);if(_0x9d4261)return await loadJSON(_0x9d4261,!![]);return undefined;}
1
+ (function(_0x4fce92,_0xd32c8d){const _0x3f7378=a65_0x59c4,_0x207750=_0x4fce92();while(!![]){try{const _0x4db928=parseInt(_0x3f7378(0x87))/0x1*(parseInt(_0x3f7378(0x90))/0x2)+-parseInt(_0x3f7378(0x8d))/0x3+parseInt(_0x3f7378(0x9d))/0x4*(-parseInt(_0x3f7378(0x95))/0x5)+-parseInt(_0x3f7378(0x8c))/0x6+parseInt(_0x3f7378(0x9b))/0x7*(-parseInt(_0x3f7378(0x89))/0x8)+-parseInt(_0x3f7378(0x8e))/0x9+parseInt(_0x3f7378(0x88))/0xa;if(_0x4db928===_0xd32c8d)break;else _0x207750['push'](_0x207750['shift']());}catch(_0x3ead6b){_0x207750['push'](_0x207750['shift']());}}}(a65_0xa2ef,0x19938));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x2b7927,_0x407976){const _0x346949=a65_0x59c4;try{if(_0x407976){const _0x448041=await readFile(_0x2b7927,_0x346949(0x97));try{return JSON[_0x346949(0x8f)](_0x448041);}catch(_0x321b73){throw new SDKError(ErrorCode[_0x346949(0x9c)],_0x346949(0x91)+_0x2b7927+_0x346949(0x93)+(_0x321b73 instanceof Error?_0x321b73['message']:String(_0x321b73)));}}else try{return JSON[_0x346949(0x8f)](_0x2b7927);}catch(_0x17b60f){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Invalid\x20JSON\x20string:\x20'+(_0x17b60f instanceof Error?_0x17b60f['message']:String(_0x17b60f)));}}catch(_0x4e8541){if(_0x4e8541 instanceof SDKError)throw _0x4e8541;if(_0x4e8541 instanceof Error&&_0x346949(0x8b)in _0x4e8541){const _0x219091=_0x4e8541;if(_0x219091[_0x346949(0x8b)]===_0x346949(0x99))throw new SDKError(ErrorCode['NOT_FOUND'],_0x346949(0x94)+_0x2b7927);else{if(_0x219091[_0x346949(0x8b)]==='EACCES')throw new SDKError(ErrorCode[_0x346949(0x96)],_0x346949(0x9a)+_0x2b7927);}}throw new SDKError(ErrorCode[_0x346949(0x8a)],'Failed\x20to\x20load\x20JSON:\x20'+(_0x4e8541 instanceof Error?_0x4e8541[_0x346949(0x98)]:String(_0x4e8541)));}}export async function loadJSONFromOptions(_0x775f3e,_0x42cf0e){const _0x42dead=a65_0x59c4;if(_0x775f3e&&_0x42cf0e)throw new SDKError(ErrorCode[_0x42dead(0x9c)],_0x42dead(0x92));if(_0x775f3e)return await loadJSON(_0x775f3e,![]);if(_0x42cf0e)return await loadJSON(_0x42cf0e,!![]);return undefined;}function a65_0x59c4(_0x38dace,_0x455f9e){const _0xa2ef81=a65_0xa2ef();return a65_0x59c4=function(_0x59c4fd,_0x12527f){_0x59c4fd=_0x59c4fd-0x87;let _0x19a8a6=_0xa2ef81[_0x59c4fd];return _0x19a8a6;},a65_0x59c4(_0x38dace,_0x455f9e);}function a65_0xa2ef(){const _0x53506e=['INVALID_ARGUMENT','4ubGwyw','69219tTVdix','5069680kGRcCy','8VGdnqC','INTERNAL','code','471900NfeHaa','263079ixymMY','1020321mDOUlc','parse','2GCSibr','Invalid\x20JSON\x20in\x20file\x20\x27','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','\x27:\x20','File\x20not\x20found:\x20','803890XexFpa','PERMISSION_DENIED','utf-8','message','ENOENT','Permission\x20denied\x20reading\x20file:\x20','216559eeKpnP'];a65_0xa2ef=function(){return _0x53506e;};return a65_0xa2ef();}
@@ -1 +1 @@
1
- const a66_0x4f54dc=a66_0x3ebd;function a66_0x3ebd(_0x1a9456,_0x1f0873){const _0x4b6fce=a66_0x4b6f();return a66_0x3ebd=function(_0x3ebdf6,_0x1a2242){_0x3ebdf6=_0x3ebdf6-0x1e6;let _0x3dfa4d=_0x4b6fce[_0x3ebdf6];return _0x3dfa4d;},a66_0x3ebd(_0x1a9456,_0x1f0873);}(function(_0x3ba18d,_0x485d98){const _0x317255=a66_0x3ebd,_0x758089=_0x3ba18d();while(!![]){try{const _0x40e8c6=parseInt(_0x317255(0x1ef))/0x1+parseInt(_0x317255(0x1f1))/0x2+parseInt(_0x317255(0x1e9))/0x3*(parseInt(_0x317255(0x1f2))/0x4)+parseInt(_0x317255(0x1e8))/0x5*(-parseInt(_0x317255(0x1ec))/0x6)+-parseInt(_0x317255(0x1eb))/0x7+parseInt(_0x317255(0x1f0))/0x8*(parseInt(_0x317255(0x1ea))/0x9)+-parseInt(_0x317255(0x1ee))/0xa;if(_0x40e8c6===_0x485d98)break;else _0x758089['push'](_0x758089['shift']());}catch(_0x539331){_0x758089['push'](_0x758089['shift']());}}}(a66_0x4b6f,0x5f689));function a66_0x4b6f(){const _0x5ce0a6=['claude-4.5-haiku','claude-4.5-sonnet','5nWfHTP','1588935azpLkk','67329dMFkUT','4962594WQfDin','4681770wLKrrr','toLowerCase','5558250yTxCSV','458495BkkdgQ','824pPjZkO','1354344QVVXlf','4CcIiQB'];a66_0x4b6f=function(){return _0x5ce0a6;};return a66_0x4b6f();}const MODEL_ALIASES={'haiku':a66_0x4f54dc(0x1e6),'sonnet':a66_0x4f54dc(0x1e7)};export function resolveModelAlias(_0x4eb010){const _0x7e7975=a66_0x4f54dc;return MODEL_ALIASES[_0x4eb010[_0x7e7975(0x1ed)]()]||_0x4eb010;}export function getModelAliases(){return{...MODEL_ALIASES};}
1
+ const a66_0x2358ba=a66_0x5d5c;(function(_0x546cbc,_0x12d632){const _0x4f0320=a66_0x5d5c,_0x5886e3=_0x546cbc();while(!![]){try{const _0x226802=-parseInt(_0x4f0320(0x156))/0x1+parseInt(_0x4f0320(0x155))/0x2*(-parseInt(_0x4f0320(0x14f))/0x3)+-parseInt(_0x4f0320(0x15b))/0x4+-parseInt(_0x4f0320(0x14e))/0x5*(parseInt(_0x4f0320(0x152))/0x6)+parseInt(_0x4f0320(0x14d))/0x7*(-parseInt(_0x4f0320(0x150))/0x8)+-parseInt(_0x4f0320(0x157))/0x9*(parseInt(_0x4f0320(0x15a))/0xa)+-parseInt(_0x4f0320(0x154))/0xb*(-parseInt(_0x4f0320(0x159))/0xc);if(_0x226802===_0x12d632)break;else _0x5886e3['push'](_0x5886e3['shift']());}catch(_0x448ab7){_0x5886e3['push'](_0x5886e3['shift']());}}}(a66_0x4a00,0x43d87));const MODEL_ALIASES={'haiku':a66_0x2358ba(0x158),'sonnet':a66_0x2358ba(0x153)};function a66_0x5d5c(_0x179943,_0x3d16e4){const _0x4a0011=a66_0x4a00();return a66_0x5d5c=function(_0x5d5ca4,_0x4a779d){_0x5d5ca4=_0x5d5ca4-0x14d;let _0xb6ead8=_0x4a0011[_0x5d5ca4];return _0xb6ead8;},a66_0x5d5c(_0x179943,_0x3d16e4);}export function resolveModelAlias(_0x3c6e78){const _0x5b1b9c=a66_0x2358ba;return MODEL_ALIASES[_0x3c6e78[_0x5b1b9c(0x151)]()]||_0x3c6e78;}function a66_0x4a00(){const _0x11c812=['23191LSxZeW','13370vmMGGo','3DywnVA','80PKbulg','toLowerCase','522NYoDWH','claude-4.5-sonnet','2730926larIdS','1101366hpmUgD','94329HhNOoC','9azAefn','claude-4.5-haiku','96AmZSxS','2816470OxgZUY','2063224ybuhtE'];a66_0x4a00=function(){return _0x11c812;};return a66_0x4a00();}export function getModelAliases(){return{...MODEL_ALIASES};}