@treasuredata/tdx 0.1.7 → 0.1.9

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 (78) hide show
  1. package/README.md +85 -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/command.js +1 -1
  15. package/dist/commands/context-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/llm-command.js +1 -1
  19. package/dist/commands/llm-proxy.d.ts +24 -0
  20. package/dist/commands/llm-proxy.d.ts.map +1 -0
  21. package/dist/commands/llm-proxy.js +1 -0
  22. package/dist/commands/llm-proxy.js.map +1 -0
  23. package/dist/commands/profiles-command.js +1 -1
  24. package/dist/commands/query-command.js +1 -1
  25. package/dist/commands/segment-command.js +1 -1
  26. package/dist/commands/segments.js +1 -1
  27. package/dist/commands/show.js +1 -1
  28. package/dist/commands/tables.js +1 -1
  29. package/dist/commands/use-command.js +1 -1
  30. package/dist/commands/workflow-command.js +1 -1
  31. package/dist/core/auth.js +1 -1
  32. package/dist/core/config.js +1 -1
  33. package/dist/core/global-context.js +1 -1
  34. package/dist/core/profile.js +1 -1
  35. package/dist/core/project-config.js +1 -1
  36. package/dist/core/session.js +1 -1
  37. package/dist/index.js +1 -1
  38. package/dist/proxy/anthropic-adapter.d.ts +79 -0
  39. package/dist/proxy/anthropic-adapter.d.ts.map +1 -0
  40. package/dist/proxy/anthropic-adapter.js +1 -0
  41. package/dist/proxy/anthropic-adapter.js.map +1 -0
  42. package/dist/proxy/server.d.ts +59 -0
  43. package/dist/proxy/server.d.ts.map +1 -0
  44. package/dist/proxy/server.js +1 -0
  45. package/dist/proxy/server.js.map +1 -0
  46. package/dist/sdk/api.js +1 -1
  47. package/dist/sdk/database.js +1 -1
  48. package/dist/sdk/errors.js +1 -1
  49. package/dist/sdk/index.js +1 -1
  50. package/dist/sdk/llm.js +1 -1
  51. package/dist/sdk/query.js +1 -1
  52. package/dist/sdk/segment.js +1 -1
  53. package/dist/sdk/table.js +1 -1
  54. package/dist/sdk/workflow.js +1 -1
  55. package/dist/types/anthropic.d.ts +139 -0
  56. package/dist/types/anthropic.d.ts.map +1 -0
  57. package/dist/types/anthropic.js +1 -0
  58. package/dist/types/anthropic.js.map +1 -0
  59. package/dist/types/endpoints.js +1 -1
  60. package/dist/types/index.js +1 -1
  61. package/dist/utils/agent-ref-parser.js +1 -1
  62. package/dist/utils/chat-cache.js +1 -1
  63. package/dist/utils/colors.js +1 -1
  64. package/dist/utils/command-output.js +1 -1
  65. package/dist/utils/file-permissions.js +1 -1
  66. package/dist/utils/format-detector.js +1 -1
  67. package/dist/utils/formatters.js +1 -1
  68. package/dist/utils/model-aliases.js +1 -1
  69. package/dist/utils/option-validation.js +1 -1
  70. package/dist/utils/process.js +1 -1
  71. package/dist/utils/segment-ref-parser.js +1 -1
  72. package/dist/utils/spinner.js +1 -1
  73. package/dist/utils/sql-parser.js +1 -1
  74. package/dist/utils/sse-parser.js +1 -1
  75. package/dist/utils/string-utils.js +1 -1
  76. package/dist/utils/table-ref-parser.js +1 -1
  77. package/dist/utils/workflow-utils.js +1 -1
  78. package/package.json +3 -1
@@ -0,0 +1,139 @@
1
+ /**
2
+ * TypeScript types for Anthropic Messages API
3
+ * Based on: https://docs.anthropic.com/en/api/messages
4
+ */
5
+ export interface AnthropicMessage {
6
+ role: 'user' | 'assistant';
7
+ content: string | AnthropicContentBlock[];
8
+ }
9
+ export interface AnthropicContentBlock {
10
+ type: 'text' | 'image' | 'tool_use' | 'tool_result';
11
+ text?: string;
12
+ source?: {
13
+ type: 'base64';
14
+ media_type: string;
15
+ data: string;
16
+ };
17
+ id?: string;
18
+ name?: string;
19
+ input?: Record<string, unknown>;
20
+ tool_use_id?: string;
21
+ content?: string | AnthropicContentBlock[];
22
+ is_error?: boolean;
23
+ }
24
+ export interface AnthropicTool {
25
+ name: string;
26
+ description?: string;
27
+ input_schema: {
28
+ type: 'object';
29
+ properties?: Record<string, unknown>;
30
+ required?: string[];
31
+ };
32
+ }
33
+ export interface AnthropicMessagesRequest {
34
+ model: string;
35
+ messages: AnthropicMessage[];
36
+ max_tokens: number;
37
+ metadata?: {
38
+ user_id?: string;
39
+ };
40
+ stop_sequences?: string[];
41
+ stream?: boolean;
42
+ system?: string | AnthropicContentBlock[];
43
+ temperature?: number;
44
+ tool_choice?: {
45
+ type: 'auto' | 'any' | 'tool';
46
+ name?: string;
47
+ };
48
+ tools?: AnthropicTool[];
49
+ top_k?: number;
50
+ top_p?: number;
51
+ }
52
+ export interface AnthropicUsage {
53
+ input_tokens: number;
54
+ output_tokens: number;
55
+ }
56
+ export interface AnthropicMessagesResponse {
57
+ id: string;
58
+ type: 'message';
59
+ role: 'assistant';
60
+ content: AnthropicContentBlock[];
61
+ model: string;
62
+ stop_reason: 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | null;
63
+ stop_sequence: string | null;
64
+ usage: AnthropicUsage;
65
+ }
66
+ export type AnthropicStreamEvent = AnthropicMessageStartEvent | AnthropicContentBlockStartEvent | AnthropicContentBlockDeltaEvent | AnthropicContentBlockStopEvent | AnthropicMessageDeltaEvent | AnthropicMessageStopEvent | AnthropicPingEvent | AnthropicErrorEvent;
67
+ export interface AnthropicMessageStartEvent {
68
+ type: 'message_start';
69
+ message: {
70
+ id: string;
71
+ type: 'message';
72
+ role: 'assistant';
73
+ content: [];
74
+ model: string;
75
+ stop_reason: null;
76
+ stop_sequence: null;
77
+ usage: {
78
+ input_tokens: number;
79
+ output_tokens: number;
80
+ };
81
+ };
82
+ }
83
+ export interface AnthropicContentBlockStartEvent {
84
+ type: 'content_block_start';
85
+ index: number;
86
+ content_block: {
87
+ type: 'text' | 'tool_use';
88
+ text?: string;
89
+ id?: string;
90
+ name?: string;
91
+ input?: Record<string, unknown>;
92
+ };
93
+ }
94
+ export interface AnthropicContentBlockDeltaEvent {
95
+ type: 'content_block_delta';
96
+ index: number;
97
+ delta: {
98
+ type: 'text_delta' | 'input_json_delta';
99
+ text?: string;
100
+ partial_json?: string;
101
+ };
102
+ }
103
+ export interface AnthropicContentBlockStopEvent {
104
+ type: 'content_block_stop';
105
+ index: number;
106
+ }
107
+ export interface AnthropicMessageDeltaEvent {
108
+ type: 'message_delta';
109
+ delta: {
110
+ stop_reason: 'end_turn' | 'max_tokens' | 'stop_sequence' | 'tool_use' | null;
111
+ stop_sequence: string | null;
112
+ };
113
+ usage: {
114
+ output_tokens: number;
115
+ };
116
+ }
117
+ export interface AnthropicMessageStopEvent {
118
+ type: 'message_stop';
119
+ }
120
+ export interface AnthropicPingEvent {
121
+ type: 'ping';
122
+ }
123
+ export interface AnthropicErrorEvent {
124
+ type: 'error';
125
+ error: {
126
+ type: string;
127
+ message: string;
128
+ };
129
+ }
130
+ export interface AnthropicCountTokensRequest {
131
+ model: string;
132
+ messages: AnthropicMessage[];
133
+ system?: string | AnthropicContentBlock[];
134
+ tools?: AnthropicTool[];
135
+ }
136
+ export interface AnthropicCountTokensResponse {
137
+ input_tokens: number;
138
+ }
139
+ //# sourceMappingURL=anthropic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../src/types/anthropic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,qBAAqB,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,GAAG,qBAAqB,EAAE,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACrC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,qBAAqB,EAAE,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/D,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,UAAU,GAAG,YAAY,GAAG,eAAe,GAAG,UAAU,GAAG,IAAI,CAAC;IAC7E,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,cAAc,CAAC;CACvB;AAGD,MAAM,MAAM,oBAAoB,GAC5B,0BAA0B,GAC1B,+BAA+B,GAC/B,+BAA+B,GAC/B,8BAA8B,GAC9B,0BAA0B,GAC1B,yBAAyB,GACzB,kBAAkB,GAClB,mBAAmB,CAAC;AAExB,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,WAAW,CAAC;QAClB,OAAO,EAAE,EAAE,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,IAAI,CAAC;QAClB,aAAa,EAAE,IAAI,CAAC;QACpB,KAAK,EAAE;YACL,YAAY,EAAE,MAAM,CAAC;YACrB,aAAa,EAAE,MAAM,CAAC;SACvB,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,qBAAqB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE;QACb,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;QAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACjC,CAAC;CACH;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,qBAAqB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QACL,IAAI,EAAE,YAAY,GAAG,kBAAkB,CAAC;QACxC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE;QACL,WAAW,EAAE,UAAU,GAAG,YAAY,GAAG,eAAe,GAAG,UAAU,GAAG,IAAI,CAAC;QAC7E,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC;IACF,KAAK,EAAE;QACL,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAGD,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,qBAAqB,EAAE,CAAC;IAC1C,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anthropic.js","sourceRoot":"","sources":["../../src/types/anthropic.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -1 +1 @@
1
- function a40_0x1be5(_0x9eba77,_0x66bb0d){const _0x3cf1b1=a40_0x3cf1();return a40_0x1be5=function(_0x1be534,_0x2f850c){_0x1be534=_0x1be534-0x1f1;let _0x56f345=_0x3cf1b1[_0x1be534];return _0x56f345;},a40_0x1be5(_0x9eba77,_0x66bb0d);}const a40_0x483b34=a40_0x1be5;(function(_0x34774a,_0xad7268){const _0x289c3b=a40_0x1be5,_0x359e30=_0x34774a();while(!![]){try{const _0x2491da=parseInt(_0x289c3b(0x21b))/0x1+parseInt(_0x289c3b(0x210))/0x2*(parseInt(_0x289c3b(0x21d))/0x3)+parseInt(_0x289c3b(0x1f9))/0x4+parseInt(_0x289c3b(0x211))/0x5*(-parseInt(_0x289c3b(0x1f2))/0x6)+parseInt(_0x289c3b(0x217))/0x7*(-parseInt(_0x289c3b(0x1f3))/0x8)+-parseInt(_0x289c3b(0x20e))/0x9+-parseInt(_0x289c3b(0x205))/0xa;if(_0x2491da===_0xad7268)break;else _0x359e30['push'](_0x359e30['shift']());}catch(_0x294339){_0x359e30['push'](_0x359e30['shift']());}}}(a40_0x3cf1,0xd4ec3));export const TD_ENDPOINTS={'us01':a40_0x483b34(0x20a),'jp01':a40_0x483b34(0x215),'eu01':a40_0x483b34(0x1ff),'ap02':a40_0x483b34(0x1fc),'ap03':'https://api.ap03.treasuredata.com','dev-us01':a40_0x483b34(0x1f7),'dev-eu01':a40_0x483b34(0x20c),'stg-us01':a40_0x483b34(0x219),'stg-jp01':'https://api-staging.treasuredata.co.jp','stg-ap03':a40_0x483b34(0x1fa)};export const CDP_ENDPOINTS={'us01':a40_0x483b34(0x206),'jp01':a40_0x483b34(0x200),'eu01':'https://api-cdp.eu01.treasuredata.com','ap02':'https://api-cdp.ap02.treasuredata.com','ap03':'https://api-cdp.ap03.treasuredata.com','dev-us01':a40_0x483b34(0x1f1),'dev-eu01':a40_0x483b34(0x214),'stg-us01':a40_0x483b34(0x1fd),'stg-jp01':a40_0x483b34(0x201),'stg-ap03':a40_0x483b34(0x21c)};export const WORKFLOW_ENDPOINTS={'us01':a40_0x483b34(0x20b),'jp01':'https://api-workflow.treasuredata.co.jp','eu01':a40_0x483b34(0x21e),'ap02':a40_0x483b34(0x216),'ap03':a40_0x483b34(0x208),'dev-us01':a40_0x483b34(0x209),'dev-eu01':'https://api-development-workflow.eu01.treasuredata.com','stg-us01':a40_0x483b34(0x21a),'stg-jp01':a40_0x483b34(0x20d),'stg-ap03':'https://api-staging-workflow.ap03.treasuredata.com'};function a40_0x3cf1(){const _0x3da0b2=['https://api-presto.treasuredata.co.jp','https://api-workflow.ap03.treasuredata.com','https://api-development-workflow.us01.treasuredata.com','https://api.treasuredata.com','https://api-workflow.treasuredata.com','https://api-development.eu01.treasuredata.com','https://api-staging-workflow.treasuredata.co.jp','12910356MEDTAI','https://llm-api-development.eu01.treasuredata.com','85942spHhzI','5AcIUKb','https://api-development-presto.treasuredata.com','\x27\x20and\x20site\x20\x27','https://api-development-cdp.eu01.treasuredata.com','https://api.treasuredata.co.jp','https://api-workflow.ap02.treasuredata.com','338303XVpVaZ','https://llm-api.ap02.treasuredata.com','https://api-staging.us01.treasuredata.com','https://api-staging-workflow.us01.treasuredata.com','1432346EOFzre','https://api-staging-cdp.ap03.treasuredata.com','24NbvAFz','https://api-workflow.eu01.treasuredata.com','https://llm-api-staging.treasuredata.co.jp','https://api-development-cdp.us01.treasuredata.com','3607908UIyvbU','8CNbqop','https://api-staging-presto.ap03.treasuredata.com','No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27','https://llm-api.treasuredata.com','https://api-development.us01.treasuredata.com','https://api-development-presto.eu01.treasuredata.com','6643296orUayp','https://api-staging.ap03.treasuredata.com','https://api-presto.eu01.treasuredata.com','https://api.ap02.treasuredata.com','https://api-staging-cdp.us01.treasuredata.com','https://llm-api.treasuredata.co.jp','https://api.eu01.treasuredata.com','https://api-cdp.treasuredata.co.jp','https://api-staging-cdp.treasuredata.co.jp','https://api-presto.ap02.treasuredata.com','https://llm-api.ap03.treasuredata.com','https://api-staging-presto.treasuredata.co.jp','4806760EpDRAS','https://api-cdp.treasuredata.com'];a40_0x3cf1=function(){return _0x3da0b2;};return a40_0x3cf1();}export const TRINO_ENDPOINTS={'us01':'https://api-presto.treasuredata.com','jp01':a40_0x483b34(0x207),'eu01':a40_0x483b34(0x1fb),'ap02':a40_0x483b34(0x202),'ap03':'https://api-presto.ap03.treasuredata.com','dev-us01':a40_0x483b34(0x212),'dev-eu01':a40_0x483b34(0x1f8),'stg-us01':'https://api-staging-presto.treasuredata.com','stg-jp01':a40_0x483b34(0x204),'stg-ap03':a40_0x483b34(0x1f4)};export const LLM_ENDPOINTS={'us01':a40_0x483b34(0x1f6),'jp01':a40_0x483b34(0x1fe),'eu01':'https://llm-api.eu01.treasuredata.com','ap02':a40_0x483b34(0x218),'ap03':a40_0x483b34(0x203),'dev-us01':'https://llm-api-development.us01.treasuredata.com','dev-eu01':a40_0x483b34(0x20f),'stg-us01':'https://llm-api-staging.us01.treasuredata.com','stg-jp01':a40_0x483b34(0x21f),'stg-ap03':'https://llm-api-staging.ap03.treasuredata.com'};export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS};export function getEndpoint(_0x4661fd,_0x350823='td'){const _0x54fc2a=a40_0x483b34,_0x449bf7=API_ENDPOINTS[_0x350823]?.[_0x4661fd];if(!_0x449bf7)throw new Error(_0x54fc2a(0x1f5)+_0x350823+_0x54fc2a(0x213)+_0x4661fd+'\x27');return _0x449bf7;}
1
+ function a44_0x4219(_0x14f1a9,_0x456117){const _0xad84e6=a44_0xad84();return a44_0x4219=function(_0x4219b1,_0x19e08c){_0x4219b1=_0x4219b1-0x79;let _0x2591f1=_0xad84e6[_0x4219b1];return _0x2591f1;},a44_0x4219(_0x14f1a9,_0x456117);}const a44_0x5f96=a44_0x4219;(function(_0x38ab4a,_0x221e7b){const _0x3966f9=a44_0x4219,_0x203b5e=_0x38ab4a();while(!![]){try{const _0x47c9a3=-parseInt(_0x3966f9(0x9e))/0x1+parseInt(_0x3966f9(0x8c))/0x2*(-parseInt(_0x3966f9(0xa3))/0x3)+-parseInt(_0x3966f9(0x7e))/0x4*(parseInt(_0x3966f9(0x9b))/0x5)+parseInt(_0x3966f9(0xa4))/0x6*(-parseInt(_0x3966f9(0x90))/0x7)+-parseInt(_0x3966f9(0x85))/0x8*(parseInt(_0x3966f9(0x9f))/0x9)+parseInt(_0x3966f9(0x98))/0xa*(parseInt(_0x3966f9(0x8d))/0xb)+parseInt(_0x3966f9(0x9a))/0xc;if(_0x47c9a3===_0x221e7b)break;else _0x203b5e['push'](_0x203b5e['shift']());}catch(_0x1c3b8f){_0x203b5e['push'](_0x203b5e['shift']());}}}(a44_0xad84,0x29528));export const TD_ENDPOINTS={'us01':a44_0x5f96(0x81),'jp01':a44_0x5f96(0x82),'eu01':a44_0x5f96(0x8b),'ap02':a44_0x5f96(0x94),'ap03':a44_0x5f96(0x79),'dev-us01':'https://api-development.us01.treasuredata.com','dev-eu01':a44_0x5f96(0x93),'stg-us01':a44_0x5f96(0x7d),'stg-jp01':a44_0x5f96(0x84),'stg-ap03':a44_0x5f96(0x88)};export const CDP_ENDPOINTS={'us01':'https://api-cdp.treasuredata.com','jp01':a44_0x5f96(0xa0),'eu01':a44_0x5f96(0x97),'ap02':'https://api-cdp.ap02.treasuredata.com','ap03':a44_0x5f96(0x8f),'dev-us01':'https://api-development-cdp.us01.treasuredata.com','dev-eu01':'https://api-development-cdp.eu01.treasuredata.com','stg-us01':a44_0x5f96(0x92),'stg-jp01':a44_0x5f96(0x95),'stg-ap03':a44_0x5f96(0x8a)};function a44_0xad84(){const _0x5e0bfe=['https://api.treasuredata.co.jp','https://llm-api-staging.us01.treasuredata.com','https://api-staging.treasuredata.co.jp','85808yPNDwS','https://api-development-workflow.eu01.treasuredata.com','https://llm-api-staging.ap03.treasuredata.com','https://api-staging.ap03.treasuredata.com','https://api-development-presto.eu01.treasuredata.com','https://api-staging-cdp.ap03.treasuredata.com','https://api.eu01.treasuredata.com','2HtrBRI','11bdCoRe','https://llm-api.eu01.treasuredata.com','https://api-cdp.ap03.treasuredata.com','17031CcoBct','https://llm-api-staging.treasuredata.co.jp','https://api-staging-cdp.us01.treasuredata.com','https://api-development.eu01.treasuredata.com','https://api.ap02.treasuredata.com','https://api-staging-cdp.treasuredata.co.jp','https://api-development-workflow.us01.treasuredata.com','https://api-cdp.eu01.treasuredata.com','1075540OaqfEr','https://api-workflow.eu01.treasuredata.com','7275012vCLrbL','3905EaJGTE','https://llm-api.treasuredata.com','https://llm-api.ap03.treasuredata.com','211436MJsxFs','18CaOqKd','https://api-cdp.treasuredata.co.jp','https://api-workflow.treasuredata.com','https://api-staging-presto.ap03.treasuredata.com','306093fpQfSE','438rymjpG','https://api-workflow.ap02.treasuredata.com','https://api.ap03.treasuredata.com','https://api-presto.treasuredata.com','https://api-presto.ap03.treasuredata.com','https://api-staging-presto.treasuredata.co.jp','https://api-staging.us01.treasuredata.com','164ixoPpS','https://api-staging-presto.treasuredata.com','https://api-staging-workflow.treasuredata.co.jp','https://api.treasuredata.com'];a44_0xad84=function(){return _0x5e0bfe;};return a44_0xad84();}export const WORKFLOW_ENDPOINTS={'us01':a44_0x5f96(0xa1),'jp01':'https://api-workflow.treasuredata.co.jp','eu01':a44_0x5f96(0x99),'ap02':a44_0x5f96(0xa5),'ap03':'https://api-workflow.ap03.treasuredata.com','dev-us01':a44_0x5f96(0x96),'dev-eu01':a44_0x5f96(0x86),'stg-us01':'https://api-staging-workflow.us01.treasuredata.com','stg-jp01':a44_0x5f96(0x80),'stg-ap03':'https://api-staging-workflow.ap03.treasuredata.com'};export const TRINO_ENDPOINTS={'us01':a44_0x5f96(0x7a),'jp01':'https://api-presto.treasuredata.co.jp','eu01':'https://api-presto.eu01.treasuredata.com','ap02':'https://api-presto.ap02.treasuredata.com','ap03':a44_0x5f96(0x7b),'dev-us01':'https://api-development-presto.treasuredata.com','dev-eu01':a44_0x5f96(0x89),'stg-us01':a44_0x5f96(0x7f),'stg-jp01':a44_0x5f96(0x7c),'stg-ap03':a44_0x5f96(0xa2)};export const LLM_ENDPOINTS={'us01':a44_0x5f96(0x9c),'jp01':'https://llm-api.treasuredata.co.jp','eu01':a44_0x5f96(0x8e),'ap02':'https://llm-api.ap02.treasuredata.com','ap03':a44_0x5f96(0x9d),'dev-us01':'https://llm-api-development.us01.treasuredata.com','dev-eu01':'https://llm-api-development.eu01.treasuredata.com','stg-us01':a44_0x5f96(0x83),'stg-jp01':a44_0x5f96(0x91),'stg-ap03':a44_0x5f96(0x87)};export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS};export function getEndpoint(_0x30740a,_0x19f9ff='td'){const _0x48355a=API_ENDPOINTS[_0x19f9ff]?.[_0x30740a];if(!_0x48355a)throw new Error('No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27'+_0x19f9ff+'\x27\x20and\x20site\x20\x27'+_0x30740a+'\x27');return _0x48355a;}
@@ -1 +1 @@
1
- const a41_0x20f99b=a41_0x72cf;(function(_0x5a3940,_0x2bd9ea){const _0x13da13=a41_0x72cf,_0x2c51c6=_0x5a3940();while(!![]){try{const _0x1bbcd6=-parseInt(_0x13da13(0x1cd))/0x1+parseInt(_0x13da13(0x1d1))/0x2*(parseInt(_0x13da13(0x1d3))/0x3)+-parseInt(_0x13da13(0x1cc))/0x4+parseInt(_0x13da13(0x1d4))/0x5+-parseInt(_0x13da13(0x1d0))/0x6+parseInt(_0x13da13(0x1cb))/0x7+-parseInt(_0x13da13(0x1cf))/0x8;if(_0x1bbcd6===_0x2bd9ea)break;else _0x2c51c6['push'](_0x2c51c6['shift']());}catch(_0x2583da){_0x2c51c6['push'](_0x2c51c6['shift']());}}}(a41_0x476d,0x789bf));function a41_0x72cf(_0x236843,_0x5cf3b8){const _0x476db2=a41_0x476d();return a41_0x72cf=function(_0x72cfad,_0x458834){_0x72cfad=_0x72cfad-0x1cb;let _0x649759=_0x476db2[_0x72cfad];return _0x649759;},a41_0x72cf(_0x236843,_0x5cf3b8);}export const SITE_ALIASES={'us':a41_0x20f99b(0x1d2),'aws':a41_0x20f99b(0x1d2),'jp':a41_0x20f99b(0x1ce),'aws-tokyo':a41_0x20f99b(0x1ce),'dev':'dev-us01','stg':'stg-us01'};export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';function a41_0x476d(){const _0x396cf7=['1819900yevuML','121363gyCbHU','jp01','12218208GoZKMn','792054WumqTs','218LvYxzr','us01','23631WLZQBP','4698115BsgNDb','6519954SEUXQL'];a41_0x476d=function(){return _0x396cf7;};return a41_0x476d();}
1
+ const a45_0x497db7=a45_0x3532;function a45_0x2cee(){const _0x19a5c9=['5615520NBHHxo','900208bJVQjk','us01','3610194jhaNsX','2902578CAKtLF','stg-us01','36lUAPCT','846137otbmEd','jp01','18wIrmQD','3710133JpnxaC','1535825AOxXDa'];a45_0x2cee=function(){return _0x19a5c9;};return a45_0x2cee();}function a45_0x3532(_0x541c6d,_0xfd210){const _0x2cee72=a45_0x2cee();return a45_0x3532=function(_0x353202,_0x3d72fc){_0x353202=_0x353202-0xc2;let _0x49851a=_0x2cee72[_0x353202];return _0x49851a;},a45_0x3532(_0x541c6d,_0xfd210);}(function(_0x34567c,_0x5cc070){const _0x2bda03=a45_0x3532,_0x4d6d26=_0x34567c();while(!![]){try{const _0x16848f=-parseInt(_0x2bda03(0xca))/0x1+parseInt(_0x2bda03(0xc7))/0x2+-parseInt(_0x2bda03(0xcd))/0x3+parseInt(_0x2bda03(0xc3))/0x4+-parseInt(_0x2bda03(0xc2))/0x5*(-parseInt(_0x2bda03(0xcc))/0x6)+-parseInt(_0x2bda03(0xc6))/0x7+-parseInt(_0x2bda03(0xc4))/0x8*(parseInt(_0x2bda03(0xc9))/0x9);if(_0x16848f===_0x5cc070)break;else _0x4d6d26['push'](_0x4d6d26['shift']());}catch(_0x2e6b46){_0x4d6d26['push'](_0x4d6d26['shift']());}}}(a45_0x2cee,0xb1ba2));export const SITE_ALIASES={'us':a45_0x497db7(0xc5),'aws':'us01','jp':a45_0x497db7(0xcb),'aws-tokyo':a45_0x497db7(0xcb),'dev':'dev-us01','stg':a45_0x497db7(0xc8)};export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
@@ -1 +1 @@
1
- function a44_0x4670(_0x5a678c,_0x249cda){const _0x140dc9=a44_0x140d();return a44_0x4670=function(_0x467075,_0x48d59f){_0x467075=_0x467075-0x1ee;let _0x59860c=_0x140dc9[_0x467075];return _0x59860c;},a44_0x4670(_0x5a678c,_0x249cda);}(function(_0x5b76b6,_0x47af18){const _0x110330=a44_0x4670,_0x49bb9f=_0x5b76b6();while(!![]){try{const _0x3a62c6=parseInt(_0x110330(0x1f3))/0x1+parseInt(_0x110330(0x1f9))/0x2+parseInt(_0x110330(0x1fe))/0x3+parseInt(_0x110330(0x1f0))/0x4*(parseInt(_0x110330(0x1ee))/0x5)+-parseInt(_0x110330(0x1f5))/0x6*(-parseInt(_0x110330(0x1f7))/0x7)+parseInt(_0x110330(0x1f2))/0x8*(-parseInt(_0x110330(0x1ff))/0x9)+parseInt(_0x110330(0x1f1))/0xa*(-parseInt(_0x110330(0x1fa))/0xb);if(_0x3a62c6===_0x47af18)break;else _0x49bb9f['push'](_0x49bb9f['shift']());}catch(_0x241563){_0x49bb9f['push'](_0x49bb9f['shift']());}}}(a44_0x140d,0x93e39));function a44_0x140d(){const _0x223a8c=['171leQvwL','15EVrpLF','Project\x20name\x20cannot\x20be\x20empty','726072kxRLJh','2460nrECXi','212552biLRPG','897381IKNRsY','split','38268uYNkHq','length','287xFfrTr','Agent\x20reference\x20cannot\x20be\x20empty','410924UdDYsu','81301WxZzwX','Invalid\x20agent\x20reference\x20format:\x20','trim','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22','3059565rVtLLp'];a44_0x140d=function(){return _0x223a8c;};return a44_0x140d();}export function parseAgentRef(_0x3544b9){const _0x271fe4=a44_0x4670;if(!_0x3544b9||_0x3544b9[_0x271fe4(0x1fc)]()==='')throw new Error(_0x271fe4(0x1f8));const _0x237131=_0x3544b9[_0x271fe4(0x1fc)](),_0x407544=_0x237131[_0x271fe4(0x1f4)]('/');if(_0x407544[_0x271fe4(0x1f6)]===0x1)return{'projectName':_0x407544[0x0],'agentName':undefined};else{if(_0x407544[_0x271fe4(0x1f6)]===0x2){const [_0x3ec1e0,_0x37e3d9]=_0x407544;if(!_0x3ec1e0||_0x3ec1e0[_0x271fe4(0x1fc)]()==='')throw new Error(_0x271fe4(0x1ef));if(!_0x37e3d9||_0x37e3d9[_0x271fe4(0x1fc)]()==='')throw new Error('Agent\x20name\x20cannot\x20be\x20empty');return{'projectName':_0x3ec1e0[_0x271fe4(0x1fc)](),'agentName':_0x37e3d9[_0x271fe4(0x1fc)]()};}else throw new Error(_0x271fe4(0x1fb)+_0x3544b9+_0x271fe4(0x1fd));}}
1
+ function a48_0x5c96(_0x268055,_0x5c7a5f){const _0x515df1=a48_0x515d();return a48_0x5c96=function(_0x5c969d,_0x3050fc){_0x5c969d=_0x5c969d-0x1e9;let _0x2c20f9=_0x515df1[_0x5c969d];return _0x2c20f9;},a48_0x5c96(_0x268055,_0x5c7a5f);}function a48_0x515d(){const _0x4f500e=['3909045xXykzQ','Agent\x20reference\x20cannot\x20be\x20empty','426ryzRaB','114lWKhez','length','63020zRylpV','321yZkjjP','Project\x20name\x20cannot\x20be\x20empty','33nHrwaY','10277120AbKMKP','2005860phzFEB','5266LGXaOD','Invalid\x20agent\x20reference\x20format:\x20','Agent\x20name\x20cannot\x20be\x20empty','8eXsMVj','5343255OVWxLW','trim','split','3340KmcnHf'];a48_0x515d=function(){return _0x4f500e;};return a48_0x515d();}(function(_0x5f184b,_0x44a856){const _0x48f9e1=a48_0x5c96,_0x3d78f3=_0x5f184b();while(!![]){try{const _0x5170a7=-parseInt(_0x48f9e1(0x1ed))/0x1*(-parseInt(_0x48f9e1(0x1f6))/0x2)+parseInt(_0x48f9e1(0x1f1))/0x3*(-parseInt(_0x48f9e1(0x1ea))/0x4)+-parseInt(_0x48f9e1(0x1f0))/0x5*(-parseInt(_0x48f9e1(0x1ee))/0x6)+-parseInt(_0x48f9e1(0x1eb))/0x7*(parseInt(_0x48f9e1(0x1f9))/0x8)+-parseInt(_0x48f9e1(0x1fa))/0x9+parseInt(_0x48f9e1(0x1f4))/0xa+-parseInt(_0x48f9e1(0x1f3))/0xb*(parseInt(_0x48f9e1(0x1f5))/0xc);if(_0x5170a7===_0x44a856)break;else _0x3d78f3['push'](_0x3d78f3['shift']());}catch(_0x4c81b6){_0x3d78f3['push'](_0x3d78f3['shift']());}}}(a48_0x515d,0x9db12));export function parseAgentRef(_0x133fa4){const _0x2cd8b6=a48_0x5c96;if(!_0x133fa4||_0x133fa4['trim']()==='')throw new Error(_0x2cd8b6(0x1ec));const _0xcb283d=_0x133fa4[_0x2cd8b6(0x1fb)](),_0x85e67=_0xcb283d[_0x2cd8b6(0x1e9)]('/');if(_0x85e67[_0x2cd8b6(0x1ef)]===0x1)return{'projectName':_0x85e67[0x0],'agentName':undefined};else{if(_0x85e67[_0x2cd8b6(0x1ef)]===0x2){const [_0x45a2ae,_0x115b68]=_0x85e67;if(!_0x45a2ae||_0x45a2ae[_0x2cd8b6(0x1fb)]()==='')throw new Error(_0x2cd8b6(0x1f2));if(!_0x115b68||_0x115b68[_0x2cd8b6(0x1fb)]()==='')throw new Error(_0x2cd8b6(0x1f8));return{'projectName':_0x45a2ae[_0x2cd8b6(0x1fb)](),'agentName':_0x115b68[_0x2cd8b6(0x1fb)]()};}else throw new Error(_0x2cd8b6(0x1f7)+_0x133fa4+'.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22');}}
@@ -1 +1 @@
1
- (function(_0x32246c,_0xcc1759){const _0x1e61c5=a45_0x2719,_0x4cc6ab=_0x32246c();while(!![]){try{const _0x427d81=parseInt(_0x1e61c5(0x9f))/0x1+-parseInt(_0x1e61c5(0xa3))/0x2*(parseInt(_0x1e61c5(0x96))/0x3)+parseInt(_0x1e61c5(0xa1))/0x4+parseInt(_0x1e61c5(0x9e))/0x5+parseInt(_0x1e61c5(0x97))/0x6+parseInt(_0x1e61c5(0xa2))/0x7*(parseInt(_0x1e61c5(0xa4))/0x8)+-parseInt(_0x1e61c5(0xa0))/0x9;if(_0x427d81===_0xcc1759)break;else _0x4cc6ab['push'](_0x4cc6ab['shift']());}catch(_0x55d8cc){_0x4cc6ab['push'](_0x4cc6ab['shift']());}}}(a45_0x33c4,0x52d79));function a45_0x33c4(){const _0x1df2bb=['4246288GlZayc','38103THUyXb','1532802jkkOsc','trim','last_chat_id','cwd','.cache','utf-8','tdx','155080tEERhN','597880WDHXSK','11769246BGoSlX','1232288wnIYom','7JTARpg','12PtlDRi'];a45_0x33c4=function(){return _0x1df2bb;};return a45_0x33c4();}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';function a45_0x2719(_0x3497f8,_0x377dc8){const _0x33c47c=a45_0x33c4();return a45_0x2719=function(_0x271947,_0x30f2b8){_0x271947=_0x271947-0x96;let _0x17b9a2=_0x33c47c[_0x271947];return _0x17b9a2;},a45_0x2719(_0x3497f8,_0x377dc8);}import{join}from'path';function getCacheDir(){const _0x4758ee=a45_0x2719;return join(process[_0x4758ee(0x9a)](),_0x4758ee(0x9b),_0x4758ee(0x9d));}function getLastChatIdPath(){const _0x2eae89=a45_0x2719;return join(getCacheDir(),_0x2eae89(0x99));}function ensureCacheDir(){const _0x2c428e=getCacheDir();!existsSync(_0x2c428e)&&mkdirSync(_0x2c428e,{'recursive':!![]});}export function saveLastChatId(_0x15ac72){const _0x1e894e=a45_0x2719;ensureCacheDir();const _0x59d1a3=getLastChatIdPath();writeFileSync(_0x59d1a3,_0x15ac72,_0x1e894e(0x9c));}export function loadLastChatId(){const _0x3c4535=a45_0x2719,_0x5ad225=getLastChatIdPath();if(!existsSync(_0x5ad225))return undefined;try{const _0x33b97e=readFileSync(_0x5ad225,_0x3c4535(0x9c))[_0x3c4535(0x98)]();return _0x33b97e||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x187548=a45_0x2719,_0x20db46=getLastChatIdPath();if(existsSync(_0x20db46))try{writeFileSync(_0x20db46,'',_0x187548(0x9c));}catch{}}
1
+ (function(_0x12c3e4,_0x5bf618){const _0x2fa9b1=a49_0x50a9,_0x47f864=_0x12c3e4();while(!![]){try{const _0x51098d=parseInt(_0x2fa9b1(0x122))/0x1+-parseInt(_0x2fa9b1(0x121))/0x2+parseInt(_0x2fa9b1(0x123))/0x3*(-parseInt(_0x2fa9b1(0x11f))/0x4)+parseInt(_0x2fa9b1(0x119))/0x5*(parseInt(_0x2fa9b1(0x11e))/0x6)+parseInt(_0x2fa9b1(0x120))/0x7*(-parseInt(_0x2fa9b1(0x116))/0x8)+-parseInt(_0x2fa9b1(0x11b))/0x9*(-parseInt(_0x2fa9b1(0x11d))/0xa)+parseInt(_0x2fa9b1(0x124))/0xb;if(_0x51098d===_0x5bf618)break;else _0x47f864['push'](_0x47f864['shift']());}catch(_0xe14784){_0x47f864['push'](_0x47f864['shift']());}}}(a49_0x3eba,0x770e7));function a49_0x50a9(_0x2b91ad,_0x131e46){const _0x3ebad7=a49_0x3eba();return a49_0x50a9=function(_0x50a967,_0x11f2d2){_0x50a967=_0x50a967-0x116;let _0x31761c=_0x3ebad7[_0x50a967];return _0x31761c;},a49_0x50a9(_0x2b91ad,_0x131e46);}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){const _0x45a11f=a49_0x50a9;return join(process['cwd'](),_0x45a11f(0x117),_0x45a11f(0x11a));}function getLastChatIdPath(){const _0x181600=a49_0x50a9;return join(getCacheDir(),_0x181600(0x118));}function a49_0x3eba(){const _0x3d0798=['70ZePyAt','6UqcXUY','28NrnBjI','287pzFzwz','834120ORdvdA','406536hameUP','153183ZrOVqo','8480802RcPwAQ','trim','97776GouOWY','.cache','last_chat_id','210355KqilAh','tdx','698985IOYWEw','utf-8'];a49_0x3eba=function(){return _0x3d0798;};return a49_0x3eba();}function ensureCacheDir(){const _0x91ee66=getCacheDir();!existsSync(_0x91ee66)&&mkdirSync(_0x91ee66,{'recursive':!![]});}export function saveLastChatId(_0x1484b7){const _0x499e1a=a49_0x50a9;ensureCacheDir();const _0xb7f8fe=getLastChatIdPath();writeFileSync(_0xb7f8fe,_0x1484b7,_0x499e1a(0x11c));}export function loadLastChatId(){const _0x1f61c6=a49_0x50a9,_0x1c58a8=getLastChatIdPath();if(!existsSync(_0x1c58a8))return undefined;try{const _0x44b15e=readFileSync(_0x1c58a8,_0x1f61c6(0x11c))[_0x1f61c6(0x125)]();return _0x44b15e||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x5dfa03=a49_0x50a9,_0x388b76=getLastChatIdPath();if(existsSync(_0x388b76))try{writeFileSync(_0x388b76,'',_0x5dfa03(0x11c));}catch{}}
@@ -1 +1 @@
1
- (function(_0x37f4a1,_0xd45fe){const _0x187eca=a46_0x16c6,_0x53b370=_0x37f4a1();while(!![]){try{const _0x3eed45=parseInt(_0x187eca(0x202))/0x1+parseInt(_0x187eca(0x1ed))/0x2+parseInt(_0x187eca(0x203))/0x3+parseInt(_0x187eca(0x1f6))/0x4+-parseInt(_0x187eca(0x1f1))/0x5+-parseInt(_0x187eca(0x204))/0x6*(-parseInt(_0x187eca(0x1eb))/0x7)+-parseInt(_0x187eca(0x1ee))/0x8*(parseInt(_0x187eca(0x1f3))/0x9);if(_0x3eed45===_0xd45fe)break;else _0x53b370['push'](_0x53b370['shift']());}catch(_0x4e955d){_0x53b370['push'](_0x53b370['shift']());}}}(a46_0x243b,0x30d7d));import{Chalk}from'chalk';export function shouldUseColor(_0x13182d={}){const _0x4bf92f=a46_0x16c6;if(_0x13182d[_0x4bf92f(0x1ea)]===!![])return![];if(_0x13182d[_0x4bf92f(0x1fd)]===!![])return!![];if(process[_0x4bf92f(0x1e8)]['NO_COLOR']!==undefined)return![];return process[_0x4bf92f(0x1e9)][_0x4bf92f(0x1f2)]??![];}function getChalk(_0x53aeae={}){if(shouldUseColor(_0x53aeae))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}function a46_0x16c6(_0x46c4ec,_0x255a93){const _0x243be6=a46_0x243b();return a46_0x16c6=function(_0x16c6ec,_0x8daf79){_0x16c6ec=_0x16c6ec-0x1e7;let _0x591677=_0x243be6[_0x16c6ec];return _0x591677;},a46_0x16c6(_0x46c4ec,_0x255a93);}export function colorBorder(_0x1bc3fd,_0x1b8d24={}){return getChalk(_0x1b8d24)['dim'](_0x1bc3fd);}function a46_0x243b(){const _0x113ff0=['green','blue','repeat','color','number','isArray','join','stringify','96889jXVqnM','1015548RiEZSb','12ArPuzQ','entries','yellow','env','stdout','noColor','1356103FwOLPM','null','516484KuQjjY','387592uLwZlV','string','object','256180oRXGoC','isTTY','207hooAxx','cyan','length','1138076rBqawR','map','boolean','dim'];a46_0x243b=function(){return _0x113ff0;};return a46_0x243b();}export function colorHeader(_0x1c07d5,_0x3a89fd={}){const _0x81d351=a46_0x16c6;return getChalk(_0x3a89fd)[_0x81d351(0x1f4)](_0x1c07d5);}export function colorType(_0x270d71,_0x53b547={}){return getChalk(_0x53b547)['dim'](_0x270d71);}export function colorJSONKey(_0x359a14,_0xd8876c={}){const _0x4b56cd=a46_0x16c6;return getChalk(_0xd8876c)[_0x4b56cd(0x1fb)](_0x359a14);}export function colorJSONString(_0x5d38ff,_0x3833ef={}){const _0x551fb5=a46_0x16c6;return getChalk(_0x3833ef)[_0x551fb5(0x1fa)](_0x5d38ff);}export function colorJSONNumber(_0x12d83e,_0x288dac={}){const _0x2b974e=a46_0x16c6;return getChalk(_0x288dac)[_0x2b974e(0x1f4)](_0x12d83e);}export function colorJSONBoolean(_0x46d0c7,_0x2f0a35={}){const _0x2b3773=a46_0x16c6;return getChalk(_0x2f0a35)[_0x2b3773(0x1e7)](_0x46d0c7);}export function colorJSONNull(_0x174bbb,_0x2382f9={}){const _0x5aab46=a46_0x16c6;return getChalk(_0x2382f9)[_0x5aab46(0x1f9)](_0x174bbb);}export function colorizeJSONCompact(_0x55b682,_0x45d36d={}){const _0x2ef78f=a46_0x16c6;if(!shouldUseColor(_0x45d36d))return JSON[_0x2ef78f(0x201)](_0x55b682);if(_0x55b682===null)return colorJSONNull(_0x2ef78f(0x1ec),_0x45d36d);if(typeof _0x55b682===_0x2ef78f(0x1f8))return colorJSONBoolean(String(_0x55b682),_0x45d36d);if(typeof _0x55b682===_0x2ef78f(0x1fe))return colorJSONNumber(String(_0x55b682),_0x45d36d);if(typeof _0x55b682===_0x2ef78f(0x1ef))return colorJSONString(JSON[_0x2ef78f(0x201)](_0x55b682),_0x45d36d);if(Array[_0x2ef78f(0x1ff)](_0x55b682)){if(_0x55b682[_0x2ef78f(0x1f5)]===0x0)return'[]';const _0x1ccfc9=_0x55b682[_0x2ef78f(0x1f7)](_0x35235b=>colorizeJSONCompact(_0x35235b,_0x45d36d));return'['+_0x1ccfc9[_0x2ef78f(0x200)](',')+']';}if(typeof _0x55b682===_0x2ef78f(0x1f0)){const _0x4259c8=Object[_0x2ef78f(0x205)](_0x55b682);if(_0x4259c8[_0x2ef78f(0x1f5)]===0x0)return'{}';const _0x4846c2=_0x4259c8[_0x2ef78f(0x1f7)](([_0x199070,_0x246baa])=>{const _0x2a7934=_0x2ef78f,_0x3e08da=colorJSONKey(JSON[_0x2a7934(0x201)](_0x199070),_0x45d36d),_0x6b7bc6=colorizeJSONCompact(_0x246baa,_0x45d36d);return _0x3e08da+':'+_0x6b7bc6;});return'{'+_0x4846c2[_0x2ef78f(0x200)](',')+'}';}return String(_0x55b682);}export function colorizeJSON(_0x462411,_0x42a389={},_0x2b877c=0x0){const _0x30220c=a46_0x16c6;if(!shouldUseColor(_0x42a389))return JSON[_0x30220c(0x201)](_0x462411,null,0x2);const _0x4b173d='\x20'[_0x30220c(0x1fc)](_0x2b877c),_0x2e6624=_0x2b877c+0x2;if(_0x462411===null)return colorJSONNull('null',_0x42a389);if(typeof _0x462411===_0x30220c(0x1f8))return colorJSONBoolean(String(_0x462411),_0x42a389);if(typeof _0x462411===_0x30220c(0x1fe))return colorJSONNumber(String(_0x462411),_0x42a389);if(typeof _0x462411===_0x30220c(0x1ef))return colorJSONString(JSON[_0x30220c(0x201)](_0x462411),_0x42a389);if(Array['isArray'](_0x462411)){if(_0x462411[_0x30220c(0x1f5)]===0x0)return'[]';const _0x527377=_0x462411[_0x30220c(0x1f7)](_0x2e2c41=>{const _0x1dfa92=_0x30220c,_0x1fbcdd=colorizeJSON(_0x2e2c41,_0x42a389,_0x2e6624);return''+'\x20'[_0x1dfa92(0x1fc)](_0x2e6624)+_0x1fbcdd;});return'[\x0a'+_0x527377[_0x30220c(0x200)](',\x0a')+('\x0a'+_0x4b173d+']');}if(typeof _0x462411===_0x30220c(0x1f0)){const _0x541d29=Object[_0x30220c(0x205)](_0x462411);if(_0x541d29[_0x30220c(0x1f5)]===0x0)return'{}';const _0x5bf26a=_0x541d29[_0x30220c(0x1f7)](([_0x29da4b,_0x527f30])=>{const _0x61c814=colorJSONKey(JSON['stringify'](_0x29da4b),_0x42a389),_0x50a124=colorizeJSON(_0x527f30,_0x42a389,_0x2e6624);return''+'\x20'['repeat'](_0x2e6624)+_0x61c814+':\x20'+_0x50a124;});return'{\x0a'+_0x5bf26a[_0x30220c(0x200)](',\x0a')+('\x0a'+_0x4b173d+'}');}return String(_0x462411);}
1
+ (function(_0x3cb68e,_0x57ca7a){const _0x1ece8e=a50_0x1d3f,_0x24c1b3=_0x3cb68e();while(!![]){try{const _0x4cc07f=-parseInt(_0x1ece8e(0x1c3))/0x1+parseInt(_0x1ece8e(0x1bb))/0x2+parseInt(_0x1ece8e(0x1c4))/0x3+-parseInt(_0x1ece8e(0x1bc))/0x4*(parseInt(_0x1ece8e(0x1d4))/0x5)+-parseInt(_0x1ece8e(0x1c9))/0x6+-parseInt(_0x1ece8e(0x1be))/0x7*(-parseInt(_0x1ece8e(0x1d7))/0x8)+-parseInt(_0x1ece8e(0x1c1))/0x9;if(_0x4cc07f===_0x57ca7a)break;else _0x24c1b3['push'](_0x24c1b3['shift']());}catch(_0x2634e8){_0x24c1b3['push'](_0x24c1b3['shift']());}}}(a50_0x306b,0x5c878));import{Chalk}from'chalk';function a50_0x1d3f(_0x2b3647,_0x3c880a){const _0x306bd4=a50_0x306b();return a50_0x1d3f=function(_0x1d3f13,_0x403e0f){_0x1d3f13=_0x1d3f13-0x1ba;let _0x59d19b=_0x306bd4[_0x1d3f13];return _0x59d19b;},a50_0x1d3f(_0x2b3647,_0x3c880a);}export function shouldUseColor(_0x383f1b={}){const _0x539103=a50_0x1d3f;if(_0x383f1b[_0x539103(0x1ce)]===!![])return![];if(_0x383f1b['color']===!![])return!![];if(process[_0x539103(0x1c0)][_0x539103(0x1c2)]!==undefined)return![];return process[_0x539103(0x1bf)][_0x539103(0x1bd)]??![];}function getChalk(_0x10ade5={}){if(shouldUseColor(_0x10ade5))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x2f06a3,_0xfaee3a={}){const _0x221624=a50_0x1d3f;return getChalk(_0xfaee3a)[_0x221624(0x1d1)](_0x2f06a3);}export function colorHeader(_0x1546bf,_0xdb379={}){const _0x477cfb=a50_0x1d3f;return getChalk(_0xdb379)[_0x477cfb(0x1d0)](_0x1546bf);}function a50_0x306b(){const _0x89f60b=['dim','repeat','stringify','2205485eLIcqb','join','null','15408hAlWGI','map','738166GTdiLN','4lgEkdf','isTTY','1589PGZBGk','stdout','env','1734669xAeCxV','NO_COLOR','42801niSPqv','1077651kELLRi','green','yellow','number','isArray','659178tLlgMb','object','boolean','blue','string','noColor','length','cyan'];a50_0x306b=function(){return _0x89f60b;};return a50_0x306b();}export function colorType(_0x53a100,_0x4620ef={}){const _0x322df1=a50_0x1d3f;return getChalk(_0x4620ef)[_0x322df1(0x1d1)](_0x53a100);}export function colorJSONKey(_0x26afc5,_0xe24b5c={}){const _0x1e3044=a50_0x1d3f;return getChalk(_0xe24b5c)[_0x1e3044(0x1cc)](_0x26afc5);}export function colorJSONString(_0x1a90a7,_0x26cced={}){const _0x7ba76f=a50_0x1d3f;return getChalk(_0x26cced)[_0x7ba76f(0x1c5)](_0x1a90a7);}export function colorJSONNumber(_0x391029,_0x328328={}){const _0x5181d4=a50_0x1d3f;return getChalk(_0x328328)[_0x5181d4(0x1d0)](_0x391029);}export function colorJSONBoolean(_0x20c9cf,_0x55d8d1={}){const _0x796db4=a50_0x1d3f;return getChalk(_0x55d8d1)[_0x796db4(0x1c6)](_0x20c9cf);}export function colorJSONNull(_0x376486,_0x247a2b={}){const _0x164451=a50_0x1d3f;return getChalk(_0x247a2b)[_0x164451(0x1d1)](_0x376486);}export function colorizeJSONCompact(_0x14bc86,_0x5ccacb={}){const _0x5c15a4=a50_0x1d3f;if(!shouldUseColor(_0x5ccacb))return JSON[_0x5c15a4(0x1d3)](_0x14bc86);if(_0x14bc86===null)return colorJSONNull('null',_0x5ccacb);if(typeof _0x14bc86===_0x5c15a4(0x1cb))return colorJSONBoolean(String(_0x14bc86),_0x5ccacb);if(typeof _0x14bc86===_0x5c15a4(0x1c7))return colorJSONNumber(String(_0x14bc86),_0x5ccacb);if(typeof _0x14bc86===_0x5c15a4(0x1cd))return colorJSONString(JSON[_0x5c15a4(0x1d3)](_0x14bc86),_0x5ccacb);if(Array[_0x5c15a4(0x1c8)](_0x14bc86)){if(_0x14bc86[_0x5c15a4(0x1cf)]===0x0)return'[]';const _0x5f1db5=_0x14bc86['map'](_0xda10f2=>colorizeJSONCompact(_0xda10f2,_0x5ccacb));return'['+_0x5f1db5[_0x5c15a4(0x1d5)](',')+']';}if(typeof _0x14bc86===_0x5c15a4(0x1ca)){const _0x38e736=Object['entries'](_0x14bc86);if(_0x38e736[_0x5c15a4(0x1cf)]===0x0)return'{}';const _0x461b2c=_0x38e736[_0x5c15a4(0x1ba)](([_0xd4baab,_0x450212])=>{const _0x4403d9=colorJSONKey(JSON['stringify'](_0xd4baab),_0x5ccacb),_0x52fd88=colorizeJSONCompact(_0x450212,_0x5ccacb);return _0x4403d9+':'+_0x52fd88;});return'{'+_0x461b2c[_0x5c15a4(0x1d5)](',')+'}';}return String(_0x14bc86);}export function colorizeJSON(_0x3e2d52,_0x2cb431={},_0x49af95=0x0){const _0x34a624=a50_0x1d3f;if(!shouldUseColor(_0x2cb431))return JSON[_0x34a624(0x1d3)](_0x3e2d52,null,0x2);const _0x2de035='\x20'[_0x34a624(0x1d2)](_0x49af95),_0x176c19=_0x49af95+0x2;if(_0x3e2d52===null)return colorJSONNull(_0x34a624(0x1d6),_0x2cb431);if(typeof _0x3e2d52===_0x34a624(0x1cb))return colorJSONBoolean(String(_0x3e2d52),_0x2cb431);if(typeof _0x3e2d52===_0x34a624(0x1c7))return colorJSONNumber(String(_0x3e2d52),_0x2cb431);if(typeof _0x3e2d52===_0x34a624(0x1cd))return colorJSONString(JSON[_0x34a624(0x1d3)](_0x3e2d52),_0x2cb431);if(Array[_0x34a624(0x1c8)](_0x3e2d52)){if(_0x3e2d52[_0x34a624(0x1cf)]===0x0)return'[]';const _0x17e3f0=_0x3e2d52[_0x34a624(0x1ba)](_0x32ad59=>{const _0x5191e8=_0x34a624,_0x1fb71b=colorizeJSON(_0x32ad59,_0x2cb431,_0x176c19);return''+'\x20'[_0x5191e8(0x1d2)](_0x176c19)+_0x1fb71b;});return'[\x0a'+_0x17e3f0[_0x34a624(0x1d5)](',\x0a')+('\x0a'+_0x2de035+']');}if(typeof _0x3e2d52===_0x34a624(0x1ca)){const _0x5c2458=Object['entries'](_0x3e2d52);if(_0x5c2458[_0x34a624(0x1cf)]===0x0)return'{}';const _0x205714=_0x5c2458[_0x34a624(0x1ba)](([_0x3616e0,_0x312c20])=>{const _0x558250=_0x34a624,_0x1aa8fa=colorJSONKey(JSON[_0x558250(0x1d3)](_0x3616e0),_0x2cb431),_0x2203ec=colorizeJSON(_0x312c20,_0x2cb431,_0x176c19);return''+'\x20'[_0x558250(0x1d2)](_0x176c19)+_0x1aa8fa+':\x20'+_0x2203ec;});return'{\x0a'+_0x205714[_0x34a624(0x1d5)](',\x0a')+('\x0a'+_0x2de035+'}');}return String(_0x3e2d52);}
@@ -1 +1 @@
1
- (function(_0x50ee85,_0x4a30ea){const _0xd11f15=a47_0x282f,_0x51d962=_0x50ee85();while(!![]){try{const _0x424397=-parseInt(_0xd11f15(0xdd))/0x1*(parseInt(_0xd11f15(0xda))/0x2)+parseInt(_0xd11f15(0xe8))/0x3*(-parseInt(_0xd11f15(0xc9))/0x4)+-parseInt(_0xd11f15(0xd4))/0x5+-parseInt(_0xd11f15(0xc5))/0x6+parseInt(_0xd11f15(0xe7))/0x7+parseInt(_0xd11f15(0xcd))/0x8*(parseInt(_0xd11f15(0xe4))/0x9)+-parseInt(_0xd11f15(0xe5))/0xa*(-parseInt(_0xd11f15(0xd6))/0xb);if(_0x424397===_0x4a30ea)break;else _0x51d962['push'](_0x51d962['shift']());}catch(_0x5ba632){_0x51d962['push'](_0x51d962['shift']());}}}(a47_0xf4a6,0x8dca4));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';export function parseOutputOptions(_0x598efb){const _0x413293=a47_0x282f;return{'format':_0x598efb[_0x413293(0xd1)]||_0x413293(0xcb),'output':_0x598efb[_0x413293(0xe1)]||'','limit':_0x598efb[_0x413293(0xd8)],'color':_0x598efb[_0x413293(0xeb)],'noColor':_0x598efb[_0x413293(0xed)]};}function convertSDKResultToQueryResult(_0x3876aa){const _0x1b8270=a47_0x282f,_0x262c18=[];if(_0x3876aa[_0x1b8270(0xcf)]>0x0){const _0x46c74e=_0x3876aa[0x0];for(const [_0x22e9cc,_0x138014]of Object[_0x1b8270(0xce)](_0x46c74e)){let _0x35e281=_0x1b8270(0xd2);if(typeof _0x138014===_0x1b8270(0xdc))_0x35e281=Number[_0x1b8270(0xd3)](_0x138014)?_0x1b8270(0xcc):'double';else{if(typeof _0x138014===_0x1b8270(0xe3))_0x35e281=_0x1b8270(0xe3);else _0x138014===null&&(_0x35e281=_0x1b8270(0xd2));}_0x262c18['push']({'name':_0x22e9cc,'type':_0x35e281});}}return{'queryId':_0x1b8270(0xd0),'columns':_0x262c18,'data':_0x3876aa,'stats':{'state':_0x1b8270(0xde),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x3876aa['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x2c2fa7,_0x4d8fb4){const _0x2610f8=convertSDKResultToQueryResult(_0x2c2fa7);return formatQueryOutput(_0x2610f8,_0x4d8fb4);}export async function formatQueryOutput(_0x563629,_0x2c6083){const _0x4ab512=a47_0x282f,{format:_0x434bea,limit:_0x4306cf,output:_0x651d40,color:_0x5720c3,noColor:_0x5c630b}=_0x2c6083,_0x3c0685=Boolean(_0x651d40)&&!_0x5720c3,_0x3f79d8={'color':_0x5720c3,'noColor':_0x5c630b||_0x3c0685};if(_0x434bea===_0x4ab512(0xcb)){const {formatAsTable:_0x1e3df2}=await import('./formatters.js'),_0x34bed9=shouldUseLess(_0x434bea,_0x651d40);return _0x1e3df2(_0x563629,_0x4306cf,_0x34bed9,_0x3f79d8);}else{if(_0x434bea==='json'){const {formatAsJSON:_0xd75fa3}=await import(_0x4ab512(0xd7));return _0xd75fa3(_0x563629,_0x3f79d8);}else{if(_0x434bea===_0x4ab512(0xc6)){const {formatAsJSONL:_0x2dccdf}=await import(_0x4ab512(0xd7));return _0x2dccdf(_0x563629,_0x3f79d8);}else{const {formatQueryResult:_0x42c521}=await import(_0x4ab512(0xd7));return _0x42c521(_0x563629,_0x434bea);}}}}function a47_0x282f(_0x99a05e,_0x59dc8e){const _0xf4a607=a47_0xf4a6();return a47_0x282f=function(_0x282fec,_0x2fc706){_0x282fec=_0x282fec-0xc5;let _0x39e031=_0xf4a607[_0x282fec];return _0x39e031;},a47_0x282f(_0x99a05e,_0x59dc8e);}function shouldUseLess(_0x26de62,_0x2b9f85){const _0x342fe3=a47_0x282f;return _0x26de62==='table'&&process[_0x342fe3(0xea)][_0x342fe3(0xdb)]&&!_0x2b9f85;}function a47_0xf4a6(){const _0x39d24a=['table','bigint','8YgStIK','entries','length','sdk-result','format','varchar','isInteger','91035xtkNAx','stdin','22DaCEpo','./formatters.js','limit','inherit','4tUahAh','isTTY','number','331249DLfrQQ','FINISHED','end','spawn','output','less','boolean','3415149QShVJP','7062290ckCfgK','log','5451726RVYxtf','123HLOsmO','error','stdout','color','-FXRSn','noColor','4531608dJBdWo','jsonl','write','resolve','54048LlDGvL','pipe'];a47_0xf4a6=function(){return _0x39d24a;};return a47_0xf4a6();}export function resolveOutputOptions(_0x32ba5d){const _0x5a2435=a47_0x282f,_0x5a66d7=resolveOutputFormat(_0x32ba5d['format'],_0x32ba5d['output'],'table');let _0x491d74=typeof _0x32ba5d[_0x5a2435(0xd8)]===_0x5a2435(0xdc)?_0x32ba5d[_0x5a2435(0xd8)]:parseInt(_0x32ba5d[_0x5a2435(0xd8)]||'40',0xa);const _0x3ed8a1=_0x32ba5d[_0x5a2435(0xe1)]||'';return shouldUseLess(_0x5a66d7,_0x3ed8a1)&&(_0x491d74=Infinity),{'format':_0x5a66d7,'output':_0x3ed8a1,'limit':_0x491d74,'color':_0x32ba5d[_0x5a2435(0xeb)],'noColor':_0x32ba5d[_0x5a2435(0xed)]};}export function writeOutput(_0xf97fcf,_0x3e1a08,_0x232603){const _0x669506=a47_0x282f;return _0x3e1a08?(writeFileSync(_0x3e1a08,_0xf97fcf),console[_0x669506(0xe9)]('Results\x20saved\x20to\x20'+_0x3e1a08),Promise[_0x669506(0xc8)]()):shouldUseLess(_0x232603||'','')?new Promise(_0x2dbb46=>{const _0x209c81=_0x669506,_0x197933=spawn(_0x209c81(0xe2),[_0x209c81(0xec)],{'stdio':[_0x209c81(0xca),_0x209c81(0xd9),'inherit']});let _0x3d3063=![];_0x197933['on'](_0x209c81(0xe9),()=>{const _0x5ca6e4=_0x209c81;!_0x3d3063&&(_0x3d3063=!![],console[_0x5ca6e4(0xe6)](_0xf97fcf),_0x2dbb46());}),_0x197933['on']('close',()=>{!_0x3d3063&&(_0x3d3063=!![],_0x2dbb46());}),_0x197933['on'](_0x209c81(0xe0),()=>{const _0x17000c=_0x209c81;!_0x3d3063&&_0x197933['stdin']&&(_0x197933[_0x17000c(0xd5)]['on'](_0x17000c(0xe9),()=>{}),_0x197933[_0x17000c(0xd5)][_0x17000c(0xc7)](_0xf97fcf),_0x197933['stdin'][_0x17000c(0xdf)]());}),!_0x197933[_0x209c81(0xd5)]&&(!_0x3d3063&&(_0x3d3063=!![],console['log'](_0xf97fcf),_0x2dbb46()));}):(console['log'](_0xf97fcf),Promise[_0x669506(0xc8)]());}export async function handleSDKOutput(_0x2045db,_0x41e3fb){const _0x1c7ded=resolveOutputOptions(_0x41e3fb),_0x20e07a=await formatSDKOutput(_0x2045db,_0x1c7ded);await writeOutput(_0x20e07a,_0x1c7ded['output']||undefined,_0x1c7ded['format']);}export async function handleQueryOutput(_0x79719b,_0x1a5dcd){const _0x305e84=a47_0x282f,_0x4059a3=resolveOutputOptions(_0x1a5dcd),_0x61de8=await formatQueryOutput(_0x79719b,_0x4059a3);await writeOutput(_0x61de8,_0x4059a3[_0x305e84(0xe1)]||undefined,_0x4059a3[_0x305e84(0xd1)]);}
1
+ function a51_0x4b81(){const _0x3e8d43=['length','2361651eDgSGE','12572270oXCKNB','color','double','noColor','isInteger','format','table','error','entries','json','sdk-result','stdout','output','FINISHED','end','resolve','isTTY','close','less','6BnaKBz','pipe','717345yDAUpW','11fSVVGg','3408436bGNgQD','6882410hgAWEv','329196HApAKR','spawn','Results\x20saved\x20to\x20','boolean','log','number','11929FWmUbF','./formatters.js','limit','94IrEhkl','stdin','8VxhFNl'];a51_0x4b81=function(){return _0x3e8d43;};return a51_0x4b81();}(function(_0x93a752,_0x48c938){const _0x58ba5a=a51_0x3b2a,_0xd83836=_0x93a752();while(!![]){try{const _0x26a30c=parseInt(_0x58ba5a(0x1c4))/0x1*(parseInt(_0x58ba5a(0x1c7))/0x2)+parseInt(_0x58ba5a(0x1cb))/0x3+-parseInt(_0x58ba5a(0x1bc))/0x4+parseInt(_0x58ba5a(0x1bd))/0x5*(parseInt(_0x58ba5a(0x1b8))/0x6)+parseInt(_0x58ba5a(0x1be))/0x7+-parseInt(_0x58ba5a(0x1c9))/0x8*(-parseInt(_0x58ba5a(0x1ba))/0x9)+parseInt(_0x58ba5a(0x1cc))/0xa*(-parseInt(_0x58ba5a(0x1bb))/0xb);if(_0x26a30c===_0x48c938)break;else _0xd83836['push'](_0xd83836['shift']());}catch(_0x17823c){_0xd83836['push'](_0xd83836['shift']());}}}(a51_0x4b81,0xb517f));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';export function parseOutputOptions(_0x21252d){const _0x159fe0=a51_0x3b2a;return{'format':_0x21252d[_0x159fe0(0x1d1)]||_0x159fe0(0x1d2),'output':_0x21252d[_0x159fe0(0x1d8)]||'','limit':_0x21252d[_0x159fe0(0x1c6)],'color':_0x21252d['color'],'noColor':_0x21252d[_0x159fe0(0x1cf)]};}function convertSDKResultToQueryResult(_0x103033){const _0x579e3c=a51_0x3b2a,_0x18053a=[];if(_0x103033[_0x579e3c(0x1ca)]>0x0){const _0x564af4=_0x103033[0x0];for(const [_0x2d7400,_0x24b37d]of Object[_0x579e3c(0x1d4)](_0x564af4)){let _0x47bb33='varchar';if(typeof _0x24b37d===_0x579e3c(0x1c3))_0x47bb33=Number[_0x579e3c(0x1d0)](_0x24b37d)?'bigint':_0x579e3c(0x1ce);else{if(typeof _0x24b37d===_0x579e3c(0x1c1))_0x47bb33=_0x579e3c(0x1c1);else _0x24b37d===null&&(_0x47bb33='varchar');}_0x18053a['push']({'name':_0x2d7400,'type':_0x47bb33});}}return{'queryId':_0x579e3c(0x1d6),'columns':_0x18053a,'data':_0x103033,'stats':{'state':_0x579e3c(0x1d9),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x103033[_0x579e3c(0x1ca)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}function a51_0x3b2a(_0x5e1330,_0x1f7966){const _0x4b814e=a51_0x4b81();return a51_0x3b2a=function(_0x3b2a3a,_0x20f871){_0x3b2a3a=_0x3b2a3a-0x1b8;let _0x3ccb5d=_0x4b814e[_0x3b2a3a];return _0x3ccb5d;},a51_0x3b2a(_0x5e1330,_0x1f7966);}export async function formatSDKOutput(_0x470b94,_0xc2f26){const _0x3f1473=convertSDKResultToQueryResult(_0x470b94);return formatQueryOutput(_0x3f1473,_0xc2f26);}export async function formatQueryOutput(_0x2b7162,_0x5ab932){const _0xbb90b6=a51_0x3b2a,{format:_0x2f5a84,limit:_0x5cdc16,output:_0x526b8c,color:_0xbd7ea8,noColor:_0x43c88f}=_0x5ab932,_0x308473=Boolean(_0x526b8c)&&!_0xbd7ea8,_0x2d892d={'color':_0xbd7ea8,'noColor':_0x43c88f||_0x308473};if(_0x2f5a84==='table'){const {formatAsTable:_0x4b6d23}=await import(_0xbb90b6(0x1c5)),_0x20e16c=shouldUseLess(_0x2f5a84,_0x526b8c);return _0x4b6d23(_0x2b7162,_0x5cdc16,_0x20e16c,_0x2d892d);}else{if(_0x2f5a84===_0xbb90b6(0x1d5)){const {formatAsJSON:_0x2983cd}=await import(_0xbb90b6(0x1c5));return _0x2983cd(_0x2b7162,_0x2d892d);}else{if(_0x2f5a84==='jsonl'){const {formatAsJSONL:_0xb2b324}=await import(_0xbb90b6(0x1c5));return _0xb2b324(_0x2b7162,_0x2d892d);}else{const {formatQueryResult:_0x5a7164}=await import(_0xbb90b6(0x1c5));return _0x5a7164(_0x2b7162,_0x2f5a84);}}}}function shouldUseLess(_0x10ad78,_0x311ea4){const _0x3d8c06=a51_0x3b2a;return _0x10ad78===_0x3d8c06(0x1d2)&&process[_0x3d8c06(0x1d7)][_0x3d8c06(0x1dc)]&&!_0x311ea4;}export function resolveOutputOptions(_0x4ee226){const _0x39ad51=a51_0x3b2a,_0x18499e=resolveOutputFormat(_0x4ee226[_0x39ad51(0x1d1)],_0x4ee226['output'],'table');let _0x670643=typeof _0x4ee226[_0x39ad51(0x1c6)]===_0x39ad51(0x1c3)?_0x4ee226[_0x39ad51(0x1c6)]:parseInt(_0x4ee226['limit']||'40',0xa);const _0x17419b=_0x4ee226[_0x39ad51(0x1d8)]||'';return shouldUseLess(_0x18499e,_0x17419b)&&(_0x670643=Infinity),{'format':_0x18499e,'output':_0x17419b,'limit':_0x670643,'color':_0x4ee226[_0x39ad51(0x1cd)],'noColor':_0x4ee226['noColor']};}export function writeOutput(_0x44edce,_0x21d62f,_0x1e2e26){const _0x2c939e=a51_0x3b2a;return _0x21d62f?(writeFileSync(_0x21d62f,_0x44edce),console[_0x2c939e(0x1d3)](_0x2c939e(0x1c0)+_0x21d62f),Promise[_0x2c939e(0x1db)]()):shouldUseLess(_0x1e2e26||'','')?new Promise(_0x54354b=>{const _0x2cfb05=_0x2c939e,_0x9d0604=spawn(_0x2cfb05(0x1de),['-FXRSn'],{'stdio':[_0x2cfb05(0x1b9),'inherit','inherit']});let _0x15a4a1=![];_0x9d0604['on'](_0x2cfb05(0x1d3),()=>{const _0xd806ea=_0x2cfb05;!_0x15a4a1&&(_0x15a4a1=!![],console[_0xd806ea(0x1c2)](_0x44edce),_0x54354b());}),_0x9d0604['on'](_0x2cfb05(0x1dd),()=>{!_0x15a4a1&&(_0x15a4a1=!![],_0x54354b());}),_0x9d0604['on'](_0x2cfb05(0x1bf),()=>{const _0x2510c3=_0x2cfb05;!_0x15a4a1&&_0x9d0604[_0x2510c3(0x1c8)]&&(_0x9d0604['stdin']['on'](_0x2510c3(0x1d3),()=>{}),_0x9d0604['stdin']['write'](_0x44edce),_0x9d0604[_0x2510c3(0x1c8)][_0x2510c3(0x1da)]());}),!_0x9d0604[_0x2cfb05(0x1c8)]&&(!_0x15a4a1&&(_0x15a4a1=!![],console['log'](_0x44edce),_0x54354b()));}):(console[_0x2c939e(0x1c2)](_0x44edce),Promise[_0x2c939e(0x1db)]());}export async function handleSDKOutput(_0x2a767a,_0x2a02a2){const _0x8254fe=a51_0x3b2a,_0x800308=resolveOutputOptions(_0x2a02a2),_0x56f83b=await formatSDKOutput(_0x2a767a,_0x800308);await writeOutput(_0x56f83b,_0x800308[_0x8254fe(0x1d8)]||undefined,_0x800308['format']);}export async function handleQueryOutput(_0x1f785b,_0x22b782){const _0x1ffa30=a51_0x3b2a,_0x50066b=resolveOutputOptions(_0x22b782),_0x3513ca=await formatQueryOutput(_0x1f785b,_0x50066b);await writeOutput(_0x3513ca,_0x50066b[_0x1ffa30(0x1d8)]||undefined,_0x50066b[_0x1ffa30(0x1d1)]);}
@@ -1 +1 @@
1
- function a48_0x1b5a(){const _0x188acd=['10bVdfFq','721596UYEDpN','19544ZKEsBU','statSync','2997214MVUsub','\x20has\x20insecure\x20permissions\x20(','mode','430851QntGxI','3224493kVyDcG','854MMRcVn','2470384saxxKZ','Warning:\x20','1141LExHSk','dirname','794kVGpUB','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','toString','chmodSync','Should\x20be\x200600\x20or\x20more\x20restrictive.','warn','mkdirSync','writeFileSync','15EYLnNm'];a48_0x1b5a=function(){return _0x188acd;};return a48_0x1b5a();}(function(_0xde67a6,_0x38449e){const _0xcc78b8=a48_0x33f5,_0x232192=_0xde67a6();while(!![]){try{const _0x596ef7=-parseInt(_0xcc78b8(0xf1))/0x1*(parseInt(_0xcc78b8(0xf3))/0x2)+parseInt(_0xcc78b8(0xec))/0x3+parseInt(_0xcc78b8(0xef))/0x4+-parseInt(_0xcc78b8(0xfb))/0x5*(parseInt(_0xcc78b8(0xfd))/0x6)+parseInt(_0xcc78b8(0xee))/0x7*(parseInt(_0xcc78b8(0xfe))/0x8)+-parseInt(_0xcc78b8(0xed))/0x9*(-parseInt(_0xcc78b8(0xfc))/0xa)+-parseInt(_0xcc78b8(0xe9))/0xb;if(_0x596ef7===_0x38449e)break;else _0x232192['push'](_0x232192['shift']());}catch(_0x1f2c6f){_0x232192['push'](_0x232192['shift']());}}}(a48_0x1b5a,0x50e17));import*as a48_0x2367eb from'node:fs';import*as a48_0x4eb915 from'node:path';export function setSecureFilePermissions(_0x265464){const _0x2ecdda=a48_0x33f5;try{a48_0x2367eb[_0x2ecdda(0xf6)](_0x265464,0x180);}catch{console['warn'](_0x2ecdda(0xf4)+_0x265464);}}function a48_0x33f5(_0x51165a,_0x58ec37){const _0x1b5a3f=a48_0x1b5a();return a48_0x33f5=function(_0x33f59d,_0x2fafff){_0x33f59d=_0x33f59d-0xe8;let _0x550c41=_0x1b5a3f[_0x33f59d];return _0x550c41;},a48_0x33f5(_0x51165a,_0x58ec37);}export function setSecureDirectoryPermissions(_0x284219){const _0x4080c3=a48_0x33f5;try{a48_0x2367eb[_0x4080c3(0xf6)](_0x284219,0x1c0);}catch{console[_0x4080c3(0xf8)](_0x4080c3(0xf4)+_0x284219);}}export function createSecureDirectory(_0x35032a){const _0x1ba9c7=a48_0x33f5;!a48_0x2367eb['existsSync'](_0x35032a)&&(a48_0x2367eb[_0x1ba9c7(0xf9)](_0x35032a,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x35032a));}export function validateSecureFilePermissions(_0x2604a0){const _0x928da2=a48_0x33f5;try{const _0x1c257d=a48_0x2367eb[_0x928da2(0xe8)](_0x2604a0),_0x3b6ce7=_0x1c257d[_0x928da2(0xeb)]&0x1ff,_0x52110=(_0x3b6ce7&0x3f)!==0x0;if(_0x52110)return console[_0x928da2(0xf8)](_0x928da2(0xf0)+_0x2604a0+_0x928da2(0xea)+_0x3b6ce7[_0x928da2(0xf5)](0x8)+').\x20'+_0x928da2(0xf7)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x557d3f,_0x2df18c){const _0x1aba6c=a48_0x33f5,_0x584ae6=a48_0x4eb915[_0x1aba6c(0xf2)](_0x557d3f);createSecureDirectory(_0x584ae6),a48_0x2367eb[_0x1aba6c(0xfa)](_0x557d3f,_0x2df18c,{'mode':0x180}),setSecureFilePermissions(_0x557d3f);}
1
+ (function(_0x590e3a,_0x29e673){const _0x2eeb1d=a52_0xb125,_0x1e7a2b=_0x590e3a();while(!![]){try{const _0x279fc2=parseInt(_0x2eeb1d(0xc7))/0x1+parseInt(_0x2eeb1d(0xb1))/0x2*(parseInt(_0x2eeb1d(0xba))/0x3)+-parseInt(_0x2eeb1d(0xb7))/0x4*(-parseInt(_0x2eeb1d(0xc4))/0x5)+parseInt(_0x2eeb1d(0xb2))/0x6*(parseInt(_0x2eeb1d(0xb5))/0x7)+-parseInt(_0x2eeb1d(0xb8))/0x8*(-parseInt(_0x2eeb1d(0xc2))/0x9)+-parseInt(_0x2eeb1d(0xc0))/0xa*(parseInt(_0x2eeb1d(0xb6))/0xb)+-parseInt(_0x2eeb1d(0xbc))/0xc;if(_0x279fc2===_0x29e673)break;else _0x1e7a2b['push'](_0x1e7a2b['shift']());}catch(_0x442bbc){_0x1e7a2b['push'](_0x1e7a2b['shift']());}}}(a52_0x30a9,0xa951f));import*as a52_0x5a1c0c from'node:fs';function a52_0xb125(_0x3847be,_0xb1f516){const _0x30a90b=a52_0x30a9();return a52_0xb125=function(_0xb1256b,_0x1ead66){_0xb1256b=_0xb1256b-0xb1;let _0x1542b7=_0x30a90b[_0xb1256b];return _0x1542b7;},a52_0xb125(_0x3847be,_0xb1f516);}import*as a52_0x1ca46d from'node:path';export function setSecureFilePermissions(_0x465d04){const _0x34d739=a52_0xb125;try{a52_0x5a1c0c['chmodSync'](_0x465d04,0x180);}catch{console[_0x34d739(0xbd)](_0x34d739(0xb9)+_0x465d04);}}export function setSecureDirectoryPermissions(_0x279ef4){const _0x4dd3dd=a52_0xb125;try{a52_0x5a1c0c[_0x4dd3dd(0xc5)](_0x279ef4,0x1c0);}catch{console['warn'](_0x4dd3dd(0xb9)+_0x279ef4);}}export function createSecureDirectory(_0x50e632){const _0x1a9e10=a52_0xb125;!a52_0x5a1c0c['existsSync'](_0x50e632)&&(a52_0x5a1c0c[_0x1a9e10(0xbe)](_0x50e632,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x50e632));}export function validateSecureFilePermissions(_0x365903){const _0x121dea=a52_0xb125;try{const _0x484852=a52_0x5a1c0c['statSync'](_0x365903),_0x4322cb=_0x484852[_0x121dea(0xc3)]&0x1ff,_0x2438ce=(_0x4322cb&0x3f)!==0x0;if(_0x2438ce)return console[_0x121dea(0xbd)]('Warning:\x20'+_0x365903+_0x121dea(0xc6)+_0x4322cb[_0x121dea(0xc1)](0x8)+_0x121dea(0xbf)+_0x121dea(0xbb)),![];return!![];}catch{return!![];}}function a52_0x30a9(){const _0x313a6a=['6120KVfegx','dirname','writeFileSync','2758gInUYX','6303SDreNe','3544CuXLgp','552YtDcEJ','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','60svwRww','Should\x20be\x200600\x20or\x20more\x20restrictive.','28527936YljkKw','warn','mkdirSync',').\x20','10310RAwRtQ','toString','135243McnlwV','mode','3005aeEMTz','chmodSync','\x20has\x20insecure\x20permissions\x20(','725797eHNlzN','96460qPbXzA'];a52_0x30a9=function(){return _0x313a6a;};return a52_0x30a9();}export function writeSecureFile(_0x17b329,_0x2c3d2a){const _0x2f5673=a52_0xb125,_0x3f4486=a52_0x1ca46d[_0x2f5673(0xb3)](_0x17b329);createSecureDirectory(_0x3f4486),a52_0x5a1c0c[_0x2f5673(0xb4)](_0x17b329,_0x2c3d2a,{'mode':0x180}),setSecureFilePermissions(_0x17b329);}
@@ -1 +1 @@
1
- function a49_0x45bc(_0x4503ba,_0x35b4a4){const _0x48762e=a49_0x4876();return a49_0x45bc=function(_0x45bc0d,_0x149b10){_0x45bc0d=_0x45bc0d-0x1af;let _0x580273=_0x48762e[_0x45bc0d];return _0x580273;},a49_0x45bc(_0x4503ba,_0x35b4a4);}function a49_0x4876(){const _0x35f3ce=['jsonl','1547EKrpxA','toLowerCase','json','7657535TkIxge','20DDnjXy','8568CHCPSG','5886832CghWUM','text','table','36150NRTsvn','5330512esROiM','tab','43hDitZj','10490994foCYSJ','4094547sfoKWS','tsv'];a49_0x4876=function(){return _0x35f3ce;};return a49_0x4876();}(function(_0xfb92ba,_0x289ae2){const _0x5363db=a49_0x45bc,_0x5a99cd=_0xfb92ba();while(!![]){try{const _0x4be3d9=parseInt(_0x5363db(0x1bf))/0x1*(parseInt(_0x5363db(0x1bc))/0x2)+-parseInt(_0x5363db(0x1b0))/0x3+-parseInt(_0x5363db(0x1b9))/0x4+parseInt(_0x5363db(0x1b6))/0x5+parseInt(_0x5363db(0x1b8))/0x6*(-parseInt(_0x5363db(0x1b3))/0x7)+-parseInt(_0x5363db(0x1bd))/0x8+parseInt(_0x5363db(0x1af))/0x9*(parseInt(_0x5363db(0x1b7))/0xa);if(_0x4be3d9===_0x289ae2)break;else _0x5a99cd['push'](_0x5a99cd['shift']());}catch(_0x12d2c6){_0x5a99cd['push'](_0x5a99cd['shift']());}}}(a49_0x4876,0xc8965));export function detectFormatFromExtension(_0x4f50cf){const _0x250afe=a49_0x45bc,_0x542c20=_0x4f50cf[_0x250afe(0x1b4)]()['split']('.')['pop']();switch(_0x542c20){case'json':return _0x250afe(0x1b5);case _0x250afe(0x1b2):return _0x250afe(0x1b2);case _0x250afe(0x1b1):case _0x250afe(0x1be):return'tsv';case'txt':case _0x250afe(0x1ba):return _0x250afe(0x1bb);default:return undefined;}}export function resolveOutputFormat(_0x47abfd,_0x52745f,_0x4e3a95){if(_0x47abfd)return _0x47abfd;if(_0x52745f){const _0x2fbe6c=detectFormatFromExtension(_0x52745f);if(_0x2fbe6c)return _0x2fbe6c;}return _0x4e3a95;}
1
+ (function(_0x3dd74a,_0x2ba76d){const _0x199054=a53_0x1657,_0x29c72b=_0x3dd74a();while(!![]){try{const _0x3bfb28=-parseInt(_0x199054(0x140))/0x1*(parseInt(_0x199054(0x13e))/0x2)+-parseInt(_0x199054(0x142))/0x3+-parseInt(_0x199054(0x145))/0x4*(-parseInt(_0x199054(0x133))/0x5)+parseInt(_0x199054(0x138))/0x6+-parseInt(_0x199054(0x141))/0x7*(parseInt(_0x199054(0x139))/0x8)+-parseInt(_0x199054(0x13a))/0x9*(parseInt(_0x199054(0x13f))/0xa)+-parseInt(_0x199054(0x13b))/0xb*(-parseInt(_0x199054(0x136))/0xc);if(_0x3bfb28===_0x2ba76d)break;else _0x29c72b['push'](_0x29c72b['shift']());}catch(_0x1eee3a){_0x29c72b['push'](_0x29c72b['shift']());}}}(a53_0x19b7,0x49811));export function detectFormatFromExtension(_0x21ba6f){const _0x12d117=a53_0x1657,_0x52e976=_0x21ba6f[_0x12d117(0x144)]()[_0x12d117(0x137)]('.')[_0x12d117(0x135)]();switch(_0x52e976){case _0x12d117(0x146):return _0x12d117(0x146);case _0x12d117(0x13d):return _0x12d117(0x13d);case _0x12d117(0x134):case _0x12d117(0x132):return _0x12d117(0x134);case'txt':case _0x12d117(0x13c):return _0x12d117(0x143);default:return undefined;}}function a53_0x1657(_0x1d420b,_0xfa8a77){const _0x19b7cc=a53_0x19b7();return a53_0x1657=function(_0x1657cd,_0x79da36){_0x1657cd=_0x1657cd-0x132;let _0x190c8d=_0x19b7cc[_0x1657cd];return _0x190c8d;},a53_0x1657(_0x1d420b,_0xfa8a77);}function a53_0x19b7(){const _0x12f82a=['537840YzUEHH','8CHVxCb','52659ITQZCX','66PynhxV','text','jsonl','2OJYMbQ','530WeMXiM','173961kNRpcP','4095966UKcYYa','821874hXpUjk','table','toLowerCase','418892PdxPvY','json','tab','5GGMLSA','tsv','pop','2899740pYCuMZ','split'];a53_0x19b7=function(){return _0x12f82a;};return a53_0x19b7();}export function resolveOutputFormat(_0x31e35,_0x235fa9,_0x37fc76){if(_0x31e35)return _0x31e35;if(_0x235fa9){const _0x104f0f=detectFormatFromExtension(_0x235fa9);if(_0x104f0f)return _0x104f0f;}return _0x37fc76;}
@@ -1 +1 @@
1
- function a50_0x47f8(_0x320562,_0x137a16){const _0x4ad40d=a50_0x4ad4();return a50_0x47f8=function(_0x47f855,_0x2a04c0){_0x47f855=_0x47f855-0x123;let _0x1345c0=_0x4ad40d[_0x47f855];return _0x1345c0;},a50_0x47f8(_0x320562,_0x137a16);}(function(_0x1e052e,_0x5f3e6f){const _0x2110db=a50_0x47f8,_0x2f683a=_0x1e052e();while(!![]){try{const _0x222b85=parseInt(_0x2110db(0x13b))/0x1+parseInt(_0x2110db(0x13a))/0x2+-parseInt(_0x2110db(0x14a))/0x3*(-parseInt(_0x2110db(0x140))/0x4)+-parseInt(_0x2110db(0x144))/0x5+parseInt(_0x2110db(0x13c))/0x6*(-parseInt(_0x2110db(0x12e))/0x7)+parseInt(_0x2110db(0x12d))/0x8+-parseInt(_0x2110db(0x130))/0x9;if(_0x222b85===_0x5f3e6f)break;else _0x2f683a['push'](_0x2f683a['shift']());}catch(_0x3bdf9a){_0x2f683a['push'](_0x2f683a['shift']());}}}(a50_0x4ad4,0x7b05f));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 _0xf9a064=a50_0x47f8;return process[_0xf9a064(0x150)][_0xf9a064(0x131)]||Infinity;}export function formatAsTable(_0x26d823,_0x52bf48=DEFAULT_MAX_DISPLAY_ROWS,_0x103b54=![],_0x46aa31={}){const _0x23f08d=a50_0x47f8;if(_0x26d823[_0x23f08d(0x14b)]['length']===0x0)return _0x23f08d(0x14c);const _0x3760fd=_0x26d823[_0x23f08d(0x131)][_0x23f08d(0x13e)](_0x550cc3=>_0x550cc3[_0x23f08d(0x139)]),_0x2376ec=_0x26d823[_0x23f08d(0x131)][_0x23f08d(0x13e)](_0x570a7d=>simplifyType(_0x570a7d[_0x23f08d(0x13d)])),_0x3ef0b6=_0x26d823[_0x23f08d(0x14b)][_0x23f08d(0x143)](0x0,_0x52bf48),_0x3ddba4=_0x26d823[_0x23f08d(0x14b)][_0x23f08d(0x134)],_0x4d4243=_0x3ddba4>_0x52bf48,_0x42a319=[],_0x1e12eb=getTerminalWidth(),_0x2bd0b5=_0x1e12eb!==Infinity,_0x2f3dc6=0x32;let _0x3621ed=_0x3760fd[_0x23f08d(0x13e)]((_0x2b3a00,_0x1c892f)=>{const _0x5b73ef=_0x23f08d,_0x1ab639=stringWidth(_0x2376ec[_0x1c892f]),_0x43bd9b=Math[_0x5b73ef(0x128)](..._0x3ef0b6[_0x5b73ef(0x13e)](_0x3cca38=>{const _0x3acae6=_0x3cca38[_0x2b3a00];return stringWidth(formatValue(_0x3acae6));})),_0x39ce80=Math[_0x5b73ef(0x128)](stringWidth(_0x2b3a00),_0x1ab639,_0x43bd9b);return _0x103b54?_0x39ce80:Math[_0x5b73ef(0x13f)](_0x39ce80,_0x2f3dc6);});if(_0x2bd0b5&&!_0x103b54&&_0x3760fd[_0x23f08d(0x134)]>0x0){const _0x1461f7=_0x4ae00c=>{let _0x93782f=0x1;for(const _0xd74c15 of _0x4ae00c){_0x93782f+=_0xd74c15+0x3;}return _0x93782f+0x1;};let _0x29ceec=_0x1461f7(_0x3621ed);if(_0x29ceec>_0x1e12eb){const _0x886029=0x3;for(let _0x14cb05=_0x3621ed[_0x23f08d(0x134)]-0x1;_0x14cb05>=0x0;_0x14cb05--){_0x29ceec=_0x1461f7(_0x3621ed);if(_0x29ceec<=_0x1e12eb)break;const _0x6f7885=_0x3621ed[_0x14cb05],_0x53a651=_0x29ceec-_0x1e12eb,_0x4b2270=_0x6f7885-_0x886029,_0x102cfe=Math['min'](_0x53a651,_0x4b2270);_0x102cfe>0x0&&(_0x3621ed[_0x14cb05]=_0x6f7885-_0x102cfe);}}}const _0x330a1d=_0x3760fd,_0x591c27=_0x2376ec,_0x2ca93f=_0x3621ed,_0x18ce91=_0x3621ed;_0x42a319[_0x23f08d(0x149)](colorBorder('┌'+_0x18ce91[_0x23f08d(0x13e)](_0x1acc15=>'─'['repeat'](_0x1acc15+0x2))[_0x23f08d(0x135)]('┬')+'┐',_0x46aa31));const _0x432f78=_0x330a1d[_0x23f08d(0x13e)]((_0x397341,_0x5698e5)=>centerAlign(_0x397341,_0x2ca93f[_0x5698e5]));_0x42a319[_0x23f08d(0x149)](colorBorder('│',_0x46aa31)+'\x20'+_0x432f78[_0x23f08d(0x135)]('\x20'+colorBorder('│',_0x46aa31)+'\x20')+'\x20'+colorBorder('│',_0x46aa31));const _0x40ab9a=_0x591c27[_0x23f08d(0x13e)]((_0x20de61,_0x9c48d5)=>colorType(centerAlign(_0x20de61,_0x2ca93f[_0x9c48d5]),_0x46aa31));_0x42a319[_0x23f08d(0x149)](colorBorder('│',_0x46aa31)+'\x20'+_0x40ab9a[_0x23f08d(0x135)]('\x20'+colorBorder('│',_0x46aa31)+'\x20')+'\x20'+colorBorder('│',_0x46aa31)),_0x42a319['push'](colorBorder('├'+_0x18ce91[_0x23f08d(0x13e)](_0xbff129=>'─'[_0x23f08d(0x14f)](_0xbff129+0x2))[_0x23f08d(0x135)]('┼')+'┤',_0x46aa31));const _0x4afc3c=(_0x3d9928,_0x4561ea)=>{const _0x40ea22=_0x23f08d,_0x4a5418=stringWidth(_0x3d9928);if(_0x4a5418<=_0x4561ea)return _0x3d9928;let _0x2dc9dc=_0x3d9928;while(stringWidth(_0x2dc9dc+'…')>_0x4561ea&&_0x2dc9dc[_0x40ea22(0x134)]>0x0){_0x2dc9dc=_0x2dc9dc['slice'](0x0,-0x1);}return _0x2dc9dc+'…';};_0x3ef0b6[_0x23f08d(0x148)](_0x49854e=>{const _0x4ffa7b=_0x23f08d,_0x3cdac7=_0x3760fd[_0x4ffa7b(0x13e)]((_0x4298d7,_0x1ab3db)=>{const _0xbda811=_0x4ffa7b,_0x2f3a4b=_0x49854e[_0x4298d7],_0x54745d=formatValue(_0x2f3a4b),_0xb0d317=_0x2ca93f[_0x1ab3db],_0x5775c9=_0x4afc3c(_0x54745d,_0xb0d317),_0x756816=typeof _0x2f3a4b===_0xbda811(0x146)||typeof _0x2f3a4b===_0xbda811(0x124)&&/^-?\d+$/['test'](_0x2f3a4b);return _0x756816?padStart(_0x5775c9,_0xb0d317):padEnd(_0x5775c9,_0xb0d317);});_0x42a319[_0x4ffa7b(0x149)](colorBorder('│',_0x46aa31)+'\x20'+_0x3cdac7[_0x4ffa7b(0x135)]('\x20'+colorBorder('│',_0x46aa31)+'\x20')+'\x20'+colorBorder('│',_0x46aa31));});const _0x216c10=_0x18ce91[_0x23f08d(0x123)]((_0x417e14,_0xf4fbf0)=>_0x417e14+_0xf4fbf0+0x3,-0x1);_0x42a319[_0x23f08d(0x149)](colorBorder('├'+_0x18ce91[_0x23f08d(0x13e)](_0x1868aa=>'─'[_0x23f08d(0x14f)](_0x1868aa+0x2))[_0x23f08d(0x135)]('┴')+'┤',_0x46aa31));let _0x139ae0;_0x4d4243?_0x139ae0=_0x3ddba4+_0x23f08d(0x14e)+_0x52bf48+_0x23f08d(0x12c):_0x139ae0=_0x3ddba4+'\x20row'+(_0x3ddba4===0x1?'':'s');const _0x145353=_0x139ae0[_0x23f08d(0x133)](_0x216c10-0x2);return _0x42a319['push'](colorBorder('│',_0x46aa31)+'\x20'+_0x145353+'\x20'+colorBorder('│',_0x46aa31)),_0x42a319[_0x23f08d(0x149)](colorBorder('└'+'─'[_0x23f08d(0x14f)](_0x216c10)+'┘',_0x46aa31)),_0x42a319['join']('\x0a');}function a50_0x4ad4(){const _0x18630c=['54OivIGm','data','No\x20rows\x20returned','boolean','\x20rows\x20(','repeat','stdout','reduce','string','table','timestamp','toISOString','max','substring','double','object','\x20shown)','7080616vBHihR','110117NPjQDT','replace','10609731uVBKAf','columns','false','padEnd','length','join','startsWith','row','jsonl','name','1282126vtPdSQ','164006ElzSaZ','66ESdhHu','type','map','min','126364AGQSIu','bool','tsv','slice','2014905tcxQDJ','long','number','stringify','forEach','push'];a50_0x4ad4=function(){return _0x18630c;};return a50_0x4ad4();}function simplifyType(_0x258ce6){const _0x9fcfd9=a50_0x47f8,_0x57b5d0={'varchar':'string','bigint':_0x9fcfd9(0x145),'integer':'int','double':_0x9fcfd9(0x12a),'boolean':_0x9fcfd9(0x141),'date':'date','timestamp':_0x9fcfd9(0x126),'array':'array','map':_0x9fcfd9(0x13e),'row':_0x9fcfd9(0x137)},_0x41feb5=_0x258ce6['toLowerCase']();for(const [_0x305784,_0x34beb9]of Object['entries'](_0x57b5d0)){if(_0x41feb5[_0x9fcfd9(0x136)](_0x305784))return _0x34beb9;}return _0x258ce6[_0x9fcfd9(0x134)]>0xa?_0x258ce6[_0x9fcfd9(0x129)](0x0,0xa):_0x258ce6;}export function formatAsJSON(_0x51c45a,_0x58e132={}){const _0xc04336=a50_0x47f8;if(_0x51c45a['data'][_0xc04336(0x134)]===0x0)return'[]';if(shouldUseColor(_0x58e132))return colorizeJSON(_0x51c45a['data'],_0x58e132);const _0x3b93e9=_0x51c45a['data'][_0xc04336(0x13e)](_0x2e3aea=>'\x20\x20'+JSON[_0xc04336(0x147)](_0x2e3aea));return'[\x0a'+_0x3b93e9[_0xc04336(0x135)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x563f8a,_0xeec942={}){const _0xae3f75=a50_0x47f8;if(_0x563f8a[_0xae3f75(0x14b)]['length']===0x0)return'';if(shouldUseColor(_0xeec942))return _0x563f8a[_0xae3f75(0x14b)]['map'](_0x26583d=>colorizeJSONCompact(_0x26583d,_0xeec942))[_0xae3f75(0x135)]('\x0a');return _0x563f8a['data']['map'](_0x2f1876=>JSON[_0xae3f75(0x147)](_0x2f1876))[_0xae3f75(0x135)]('\x0a');}export function formatAsTSV(_0x2e2165){const _0x42ce36=a50_0x47f8;if(_0x2e2165[_0x42ce36(0x14b)]['length']===0x0)return'';const _0x562645=[],_0x34b51a=_0x2e2165['columns'][_0x42ce36(0x13e)](_0x1dd17b=>_0x1dd17b[_0x42ce36(0x139)]);return _0x562645[_0x42ce36(0x149)](_0x34b51a[_0x42ce36(0x135)]('\x09')),_0x2e2165[_0x42ce36(0x14b)][_0x42ce36(0x148)](_0x2db3bc=>{const _0x35bcd9=_0x42ce36,_0x17a07a=_0x34b51a[_0x35bcd9(0x13e)](_0x39d4ed=>{const _0x5868cf=_0x2db3bc[_0x39d4ed];return formatValueForTSV(_0x5868cf);});_0x562645[_0x35bcd9(0x149)](_0x17a07a[_0x35bcd9(0x135)]('\x09'));}),_0x562645[_0x42ce36(0x135)]('\x0a');}function formatValue(_0x5eeaa0){const _0x4375af=a50_0x47f8;if(_0x5eeaa0===null||_0x5eeaa0===undefined)return'';if(typeof _0x5eeaa0===_0x4375af(0x124)){const _0x96cea0=_0x5eeaa0[_0x4375af(0x12f)](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr')[_0x4375af(0x12f)](/\t/g,'\x5ct');return _0x96cea0;}if(typeof _0x5eeaa0===_0x4375af(0x146))return String(_0x5eeaa0);if(typeof _0x5eeaa0===_0x4375af(0x14d))return _0x5eeaa0?'true':_0x4375af(0x132);if(_0x5eeaa0 instanceof Date)return _0x5eeaa0[_0x4375af(0x127)]();if(typeof _0x5eeaa0===_0x4375af(0x12b))return JSON[_0x4375af(0x147)](_0x5eeaa0);return String(_0x5eeaa0);}function formatValueForTSV(_0x356fd2){const _0x74cd55=a50_0x47f8;if(_0x356fd2===null||_0x356fd2===undefined)return'';if(typeof _0x356fd2===_0x74cd55(0x124))return _0x356fd2[_0x74cd55(0x12f)](/\t/g,'\x5ct')[_0x74cd55(0x12f)](/\n/g,'\x5cn');if(typeof _0x356fd2===_0x74cd55(0x146)||typeof _0x356fd2===_0x74cd55(0x14d))return String(_0x356fd2);if(_0x356fd2 instanceof Date)return _0x356fd2[_0x74cd55(0x127)]();if(typeof _0x356fd2==='object')return JSON[_0x74cd55(0x147)](_0x356fd2);return String(_0x356fd2);}export function formatQueryResult(_0x123377,_0x4dcfd2){const _0x1173f9=a50_0x47f8;switch(_0x4dcfd2){case _0x1173f9(0x125):return formatAsTable(_0x123377);case'json':return formatAsJSON(_0x123377);case _0x1173f9(0x138):return formatAsJSONL(_0x123377);case _0x1173f9(0x142):return formatAsTSV(_0x123377);default:return formatAsJSON(_0x123377);}}
1
+ (function(_0x4e9616,_0x417cba){const _0x4115bd=a54_0x5480,_0x5738b0=_0x4e9616();while(!![]){try{const _0x4067d9=-parseInt(_0x4115bd(0x12d))/0x1*(-parseInt(_0x4115bd(0x136))/0x2)+-parseInt(_0x4115bd(0x11b))/0x3+parseInt(_0x4115bd(0x13a))/0x4+-parseInt(_0x4115bd(0x12e))/0x5*(parseInt(_0x4115bd(0x128))/0x6)+-parseInt(_0x4115bd(0x10f))/0x7*(parseInt(_0x4115bd(0x126))/0x8)+parseInt(_0x4115bd(0x139))/0x9*(-parseInt(_0x4115bd(0x11a))/0xa)+-parseInt(_0x4115bd(0x11f))/0xb*(-parseInt(_0x4115bd(0x131))/0xc);if(_0x4067d9===_0x417cba)break;else _0x5738b0['push'](_0x5738b0['shift']());}catch(_0x50e21c){_0x5738b0['push'](_0x5738b0['shift']());}}}(a54_0x4c24,0x3d75f));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';function a54_0x5480(_0x467486,_0x169b29){const _0x4c24f0=a54_0x4c24();return a54_0x5480=function(_0x5480e1,_0x1841de){_0x5480e1=_0x5480e1-0x10a;let _0x61e365=_0x4c24f0[_0x5480e1];return _0x61e365;},a54_0x5480(_0x467486,_0x169b29);}const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x1c9fa7=a54_0x5480;return process[_0x1c9fa7(0x13b)][_0x1c9fa7(0x137)]||Infinity;}export function formatAsTable(_0x34d96e,_0x46a868=DEFAULT_MAX_DISPLAY_ROWS,_0x37dce5=![],_0x49f831={}){const _0x355f64=a54_0x5480;if(_0x34d96e[_0x355f64(0x119)][_0x355f64(0x130)]===0x0)return _0x355f64(0x13c);const _0x4edf38=_0x34d96e[_0x355f64(0x137)]['map'](_0x39c810=>_0x39c810[_0x355f64(0x13d)]),_0x2018f8=_0x34d96e[_0x355f64(0x137)][_0x355f64(0x121)](_0x170390=>simplifyType(_0x170390[_0x355f64(0x123)])),_0x33475c=_0x34d96e[_0x355f64(0x119)][_0x355f64(0x129)](0x0,_0x46a868),_0x6ed9b8=_0x34d96e[_0x355f64(0x119)]['length'],_0x131454=_0x6ed9b8>_0x46a868,_0x31f47d=[],_0x5efc21=getTerminalWidth(),_0x5f1ee7=_0x5efc21!==Infinity,_0x48e313=0x32;let _0x8b9390=_0x4edf38[_0x355f64(0x121)]((_0xb4f692,_0x318b4a)=>{const _0x45a2ec=_0x355f64,_0x2980ca=stringWidth(_0x2018f8[_0x318b4a]),_0x292254=Math[_0x45a2ec(0x113)](..._0x33475c['map'](_0x177eb5=>{const _0x307c5c=_0x177eb5[_0xb4f692];return stringWidth(formatValue(_0x307c5c));})),_0x2ca79d=Math[_0x45a2ec(0x113)](stringWidth(_0xb4f692),_0x2980ca,_0x292254);return _0x37dce5?_0x2ca79d:Math[_0x45a2ec(0x133)](_0x2ca79d,_0x48e313);});if(_0x5f1ee7&&!_0x37dce5&&_0x4edf38[_0x355f64(0x130)]>0x0){const _0x47cb7d=_0x5185dd=>{let _0xfe24c9=0x1;for(const _0x4d9783 of _0x5185dd){_0xfe24c9+=_0x4d9783+0x3;}return _0xfe24c9+0x1;};let _0x55ff7c=_0x47cb7d(_0x8b9390);if(_0x55ff7c>_0x5efc21){const _0x5a330b=0x3;for(let _0x42373f=_0x8b9390[_0x355f64(0x130)]-0x1;_0x42373f>=0x0;_0x42373f--){_0x55ff7c=_0x47cb7d(_0x8b9390);if(_0x55ff7c<=_0x5efc21)break;const _0x3090b4=_0x8b9390[_0x42373f],_0x3aae40=_0x55ff7c-_0x5efc21,_0xff3e44=_0x3090b4-_0x5a330b,_0x219a29=Math[_0x355f64(0x133)](_0x3aae40,_0xff3e44);_0x219a29>0x0&&(_0x8b9390[_0x42373f]=_0x3090b4-_0x219a29);}}}const _0x426903=_0x4edf38,_0x5f2b97=_0x2018f8,_0x20f6a6=_0x8b9390,_0x1f86ba=_0x8b9390;_0x31f47d[_0x355f64(0x12c)](colorBorder('┌'+_0x1f86ba['map'](_0x577ebf=>'─'[_0x355f64(0x11d)](_0x577ebf+0x2))[_0x355f64(0x110)]('┬')+'┐',_0x49f831));const _0xc8c1e0=_0x426903[_0x355f64(0x121)]((_0x4ec0d7,_0x4613b6)=>centerAlign(_0x4ec0d7,_0x20f6a6[_0x4613b6]));_0x31f47d[_0x355f64(0x12c)](colorBorder('│',_0x49f831)+'\x20'+_0xc8c1e0[_0x355f64(0x110)]('\x20'+colorBorder('│',_0x49f831)+'\x20')+'\x20'+colorBorder('│',_0x49f831));const _0x237ebd=_0x5f2b97['map']((_0x13a316,_0x23ed04)=>colorType(centerAlign(_0x13a316,_0x20f6a6[_0x23ed04]),_0x49f831));_0x31f47d[_0x355f64(0x12c)](colorBorder('│',_0x49f831)+'\x20'+_0x237ebd[_0x355f64(0x110)]('\x20'+colorBorder('│',_0x49f831)+'\x20')+'\x20'+colorBorder('│',_0x49f831)),_0x31f47d[_0x355f64(0x12c)](colorBorder('├'+_0x1f86ba[_0x355f64(0x121)](_0x177dba=>'─'[_0x355f64(0x11d)](_0x177dba+0x2))[_0x355f64(0x110)]('┼')+'┤',_0x49f831));const _0x386fdc=(_0x4e0e73,_0x53b344)=>{const _0x484602=_0x355f64,_0x60b2cc=stringWidth(_0x4e0e73);if(_0x60b2cc<=_0x53b344)return _0x4e0e73;let _0x8b5c7e=_0x4e0e73;while(stringWidth(_0x8b5c7e+'…')>_0x53b344&&_0x8b5c7e[_0x484602(0x130)]>0x0){_0x8b5c7e=_0x8b5c7e[_0x484602(0x129)](0x0,-0x1);}return _0x8b5c7e+'…';};_0x33475c[_0x355f64(0x11c)](_0x5e11e1=>{const _0x35eca8=_0x355f64,_0x54ccbd=_0x4edf38[_0x35eca8(0x121)]((_0x1d0124,_0x3e1a7d)=>{const _0x36936f=_0x35eca8,_0x2717a8=_0x5e11e1[_0x1d0124],_0x2937eb=formatValue(_0x2717a8),_0x32671c=_0x20f6a6[_0x3e1a7d],_0x4dc2e7=_0x386fdc(_0x2937eb,_0x32671c),_0x40613=typeof _0x2717a8==='number'||typeof _0x2717a8===_0x36936f(0x127)&&/^-?\d+$/[_0x36936f(0x111)](_0x2717a8);return _0x40613?padStart(_0x4dc2e7,_0x32671c):padEnd(_0x4dc2e7,_0x32671c);});_0x31f47d[_0x35eca8(0x12c)](colorBorder('│',_0x49f831)+'\x20'+_0x54ccbd[_0x35eca8(0x110)]('\x20'+colorBorder('│',_0x49f831)+'\x20')+'\x20'+colorBorder('│',_0x49f831));});const _0x8c159d=_0x1f86ba[_0x355f64(0x10e)]((_0x4246a6,_0x104e4c)=>_0x4246a6+_0x104e4c+0x3,-0x1);_0x31f47d[_0x355f64(0x12c)](colorBorder('├'+_0x1f86ba[_0x355f64(0x121)](_0x258aa4=>'─'['repeat'](_0x258aa4+0x2))[_0x355f64(0x110)]('┴')+'┤',_0x49f831));let _0x405072;_0x131454?_0x405072=_0x6ed9b8+_0x355f64(0x135)+_0x46a868+_0x355f64(0x10d):_0x405072=_0x6ed9b8+_0x355f64(0x10b)+(_0x6ed9b8===0x1?'':'s');const _0x8c0712=_0x405072[_0x355f64(0x132)](_0x8c159d-0x2);return _0x31f47d[_0x355f64(0x12c)](colorBorder('│',_0x49f831)+'\x20'+_0x8c0712+'\x20'+colorBorder('│',_0x49f831)),_0x31f47d[_0x355f64(0x12c)](colorBorder('└'+'─'[_0x355f64(0x11d)](_0x8c159d)+'┘',_0x49f831)),_0x31f47d['join']('\x0a');}function a54_0x4c24(){const _0x2798b7=['stringify','toISOString','object','data','1450lsRoja','215682LGPIMN','forEach','repeat','startsWith','3338819GEbhcf','false','map','bool','type','tsv','number','1672PQktTU','string','29586IncjLn','slice','true','double','push','3WynYBH','285IdqQoP','timestamp','length','12CtFgQx','padEnd','min','substring','\x20rows\x20(','222962jswKck','columns','toLowerCase','810htBaXv','655644dvWONu','stdout','No\x20rows\x20returned','name','date','\x20row','replace','\x20shown)','reduce','6167ttGuWY','join','test','int','max','long','boolean'];a54_0x4c24=function(){return _0x2798b7;};return a54_0x4c24();}function simplifyType(_0x2d09c6){const _0x262eda=a54_0x5480,_0x51e001={'varchar':_0x262eda(0x127),'bigint':_0x262eda(0x114),'integer':_0x262eda(0x112),'double':_0x262eda(0x12b),'boolean':_0x262eda(0x122),'date':_0x262eda(0x10a),'timestamp':_0x262eda(0x12f),'array':'array','map':_0x262eda(0x121),'row':'row'},_0x6adbdb=_0x2d09c6[_0x262eda(0x138)]();for(const [_0x5edb9f,_0xa7e302]of Object['entries'](_0x51e001)){if(_0x6adbdb[_0x262eda(0x11e)](_0x5edb9f))return _0xa7e302;}return _0x2d09c6[_0x262eda(0x130)]>0xa?_0x2d09c6[_0x262eda(0x134)](0x0,0xa):_0x2d09c6;}export function formatAsJSON(_0x47d712,_0x4539a8={}){const _0x35eb4e=a54_0x5480;if(_0x47d712[_0x35eb4e(0x119)]['length']===0x0)return'[]';if(shouldUseColor(_0x4539a8))return colorizeJSON(_0x47d712['data'],_0x4539a8);const _0x572c66=_0x47d712[_0x35eb4e(0x119)][_0x35eb4e(0x121)](_0x26e435=>'\x20\x20'+JSON[_0x35eb4e(0x116)](_0x26e435));return'[\x0a'+_0x572c66[_0x35eb4e(0x110)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x3efae0,_0x4088cd={}){const _0x49500a=a54_0x5480;if(_0x3efae0['data'][_0x49500a(0x130)]===0x0)return'';if(shouldUseColor(_0x4088cd))return _0x3efae0[_0x49500a(0x119)][_0x49500a(0x121)](_0x206766=>colorizeJSONCompact(_0x206766,_0x4088cd))['join']('\x0a');return _0x3efae0[_0x49500a(0x119)][_0x49500a(0x121)](_0x156914=>JSON[_0x49500a(0x116)](_0x156914))[_0x49500a(0x110)]('\x0a');}export function formatAsTSV(_0x4120ae){const _0x170661=a54_0x5480;if(_0x4120ae['data']['length']===0x0)return'';const _0x26845=[],_0x3e1348=_0x4120ae['columns'][_0x170661(0x121)](_0x1d1f5f=>_0x1d1f5f[_0x170661(0x13d)]);return _0x26845['push'](_0x3e1348['join']('\x09')),_0x4120ae[_0x170661(0x119)][_0x170661(0x11c)](_0x1b052d=>{const _0x32078f=_0x170661,_0x1bb7ef=_0x3e1348[_0x32078f(0x121)](_0x1419fa=>{const _0x5673c9=_0x1b052d[_0x1419fa];return formatValueForTSV(_0x5673c9);});_0x26845[_0x32078f(0x12c)](_0x1bb7ef[_0x32078f(0x110)]('\x09'));}),_0x26845['join']('\x0a');}function formatValue(_0x2b6434){const _0x1263d9=a54_0x5480;if(_0x2b6434===null||_0x2b6434===undefined)return'';if(typeof _0x2b6434===_0x1263d9(0x127)){const _0x4d0d09=_0x2b6434['replace'](/\n/g,'\x5cn')[_0x1263d9(0x10c)](/\r/g,'\x5cr')['replace'](/\t/g,'\x5ct');return _0x4d0d09;}if(typeof _0x2b6434===_0x1263d9(0x125))return String(_0x2b6434);if(typeof _0x2b6434===_0x1263d9(0x115))return _0x2b6434?_0x1263d9(0x12a):_0x1263d9(0x120);if(_0x2b6434 instanceof Date)return _0x2b6434['toISOString']();if(typeof _0x2b6434===_0x1263d9(0x118))return JSON[_0x1263d9(0x116)](_0x2b6434);return String(_0x2b6434);}function formatValueForTSV(_0x3a5e80){const _0x4c558e=a54_0x5480;if(_0x3a5e80===null||_0x3a5e80===undefined)return'';if(typeof _0x3a5e80==='string')return _0x3a5e80[_0x4c558e(0x10c)](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x3a5e80===_0x4c558e(0x125)||typeof _0x3a5e80===_0x4c558e(0x115))return String(_0x3a5e80);if(_0x3a5e80 instanceof Date)return _0x3a5e80[_0x4c558e(0x117)]();if(typeof _0x3a5e80===_0x4c558e(0x118))return JSON[_0x4c558e(0x116)](_0x3a5e80);return String(_0x3a5e80);}export function formatQueryResult(_0x464596,_0x28b287){const _0x131f5=a54_0x5480;switch(_0x28b287){case'table':return formatAsTable(_0x464596);case'json':return formatAsJSON(_0x464596);case'jsonl':return formatAsJSONL(_0x464596);case _0x131f5(0x124):return formatAsTSV(_0x464596);default:return formatAsJSON(_0x464596);}}
@@ -1 +1 @@
1
- function a51_0x2c9e(_0x337ea7,_0x2a0e58){const _0x46a102=a51_0x46a1();return a51_0x2c9e=function(_0x2c9e20,_0x3a970e){_0x2c9e20=_0x2c9e20-0x107;let _0x2ab817=_0x46a102[_0x2c9e20];return _0x2ab817;},a51_0x2c9e(_0x337ea7,_0x2a0e58);}(function(_0x51b12a,_0x1dace6){const _0x3c3055=a51_0x2c9e,_0x589843=_0x51b12a();while(!![]){try{const _0x5bbc24=-parseInt(_0x3c3055(0x10c))/0x1+-parseInt(_0x3c3055(0x10d))/0x2+parseInt(_0x3c3055(0x108))/0x3+parseInt(_0x3c3055(0x10e))/0x4*(-parseInt(_0x3c3055(0x110))/0x5)+-parseInt(_0x3c3055(0x107))/0x6*(parseInt(_0x3c3055(0x109))/0x7)+parseInt(_0x3c3055(0x10a))/0x8+-parseInt(_0x3c3055(0x10b))/0x9*(-parseInt(_0x3c3055(0x10f))/0xa);if(_0x5bbc24===_0x1dace6)break;else _0x589843['push'](_0x589843['shift']());}catch(_0x28c924){_0x589843['push'](_0x589843['shift']());}}}(a51_0x46a1,0xc8f72));const MODEL_ALIASES={'haiku':'claude-4.5-haiku','sonnet':'claude-4.5-sonnet'};export function resolveModelAlias(_0x4a529f){return MODEL_ALIASES[_0x4a529f['toLowerCase']()]||_0x4a529f;}export function getModelAliases(){return{...MODEL_ALIASES};}function a51_0x46a1(){const _0x452136=['842843wveSkT','2538414JTQdLW','1081028QHRGYq','7170UvhjXV','25oQScPH','738AsnkRI','4303704ZzeQWC','58051FoOqrj','5794640zKhora','39510Byucfw'];a51_0x46a1=function(){return _0x452136;};return a51_0x46a1();}
1
+ const a55_0x159b4b=a55_0x11b3;(function(_0x8f0f8a,_0x8c8107){const _0x5ccecb=a55_0x11b3,_0x16f38b=_0x8f0f8a();while(!![]){try{const _0x2707ba=parseInt(_0x5ccecb(0xea))/0x1+-parseInt(_0x5ccecb(0xe6))/0x2*(-parseInt(_0x5ccecb(0xe7))/0x3)+-parseInt(_0x5ccecb(0xe0))/0x4*(-parseInt(_0x5ccecb(0xe8))/0x5)+parseInt(_0x5ccecb(0xe9))/0x6+parseInt(_0x5ccecb(0xe5))/0x7+parseInt(_0x5ccecb(0xe1))/0x8+-parseInt(_0x5ccecb(0xe4))/0x9;if(_0x2707ba===_0x8c8107)break;else _0x16f38b['push'](_0x16f38b['shift']());}catch(_0x4a6194){_0x16f38b['push'](_0x16f38b['shift']());}}}(a55_0xc152,0x3d8f8));function a55_0xc152(){const _0x13ab48=['22ydpwSg','100923OuTaKg','1563585Cpkfiq','1274586uxgfWy','308095gqxsfW','4TbKbPU','3083600KLMwXy','toLowerCase','claude-4.5-haiku','13697712LosXYH','1297632ZkCmZu'];a55_0xc152=function(){return _0x13ab48;};return a55_0xc152();}const MODEL_ALIASES={'haiku':a55_0x159b4b(0xe3),'sonnet':'claude-4.5-sonnet'};function a55_0x11b3(_0x5e055f,_0x46707b){const _0xc1523c=a55_0xc152();return a55_0x11b3=function(_0x11b382,_0x41dc8e){_0x11b382=_0x11b382-0xe0;let _0x1259e9=_0xc1523c[_0x11b382];return _0x1259e9;},a55_0x11b3(_0x5e055f,_0x46707b);}export function resolveModelAlias(_0x1d041c){const _0x3b9b98=a55_0x159b4b;return MODEL_ALIASES[_0x1d041c[_0x3b9b98(0xe2)]()]||_0x1d041c;}export function getModelAliases(){return{...MODEL_ALIASES};}
@@ -1 +1 @@
1
- (function(_0x5074da,_0x1aab13){const _0x3bfe24=a52_0x3a35,_0x225cd4=_0x5074da();while(!![]){try{const _0x298d1a=parseInt(_0x3bfe24(0x10a))/0x1*(-parseInt(_0x3bfe24(0x110))/0x2)+parseInt(_0x3bfe24(0x10d))/0x3*(-parseInt(_0x3bfe24(0x10e))/0x4)+parseInt(_0x3bfe24(0x116))/0x5+parseInt(_0x3bfe24(0x112))/0x6+parseInt(_0x3bfe24(0x111))/0x7*(-parseInt(_0x3bfe24(0x115))/0x8)+parseInt(_0x3bfe24(0x10b))/0x9+parseInt(_0x3bfe24(0x106))/0xa;if(_0x298d1a===_0x1aab13)break;else _0x225cd4['push'](_0x225cd4['shift']());}catch(_0x2b59c6){_0x225cd4['push'](_0x225cd4['shift']());}}}(a52_0x2c00,0x66776));export function validateLimitOption(_0x35016f){const _0x106767=a52_0x3a35;if(!Number[_0x106767(0x114)](_0x35016f))return{'isValid':![],'error':_0x106767(0x10c)+_0x35016f+_0x106767(0x107)};if(_0x35016f<=0x0)return{'isValid':![],'error':_0x106767(0x10c)+_0x35016f+_0x106767(0x109)};return{'isValid':!![],'value':_0x35016f};}function a52_0x3a35(_0x87af48,_0x4971de){const _0x2c00f5=a52_0x2c00();return a52_0x3a35=function(_0x3a3501,_0x4fc4e2){_0x3a3501=_0x3a3501-0x106;let _0x1c21db=_0x2c00f5[_0x3a3501];return _0x1c21db;},a52_0x3a35(_0x87af48,_0x4971de);}function a52_0x2c00(){const _0x4531bf=['1514736cLcIBH','Invalid\x20limit\x20value:\x20','15XrMKuC','467164IEbmje','number','2JkGRUh','7hDtJBG','3199158mushLA','Invalid\x20timeout\x20value:\x20','isInteger','6107016oDcvdS','2385265uUVErI','9976850UpfOZX','.\x20Must\x20be\x20an\x20integer.','.\x20Must\x20be\x20a\x20positive\x20number.','.\x20Must\x20be\x20a\x20positive\x20integer.','409201KaoPpw'];a52_0x2c00=function(){return _0x4531bf;};return a52_0x2c00();}export function validateTimeoutOption(_0x50bf85,_0xd827e4=0x1e){const _0x491ffe=a52_0x3a35;if(_0x50bf85===undefined)return{'isValid':!![],'value':_0xd827e4};const _0x4bc501=typeof _0x50bf85===_0x491ffe(0x10f)?_0x50bf85:parseFloat(_0x50bf85);if(isNaN(_0x4bc501))return{'isValid':![],'error':_0x491ffe(0x113)+_0x50bf85+'.\x20Must\x20be\x20a\x20number.'};if(_0x4bc501<=0x0)return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x4bc501+_0x491ffe(0x108)};return{'isValid':!![],'value':_0x4bc501};}
1
+ (function(_0x1c310d,_0x83f2f2){const _0x4a991f=a56_0x7851,_0x3c90aa=_0x1c310d();while(!![]){try{const _0x4454f2=-parseInt(_0x4a991f(0x1d1))/0x1*(parseInt(_0x4a991f(0x1cd))/0x2)+parseInt(_0x4a991f(0x1c1))/0x3*(parseInt(_0x4a991f(0x1d0))/0x4)+-parseInt(_0x4a991f(0x1c3))/0x5+-parseInt(_0x4a991f(0x1c8))/0x6*(-parseInt(_0x4a991f(0x1c7))/0x7)+parseInt(_0x4a991f(0x1ce))/0x8*(parseInt(_0x4a991f(0x1c2))/0x9)+-parseInt(_0x4a991f(0x1cb))/0xa*(parseInt(_0x4a991f(0x1c4))/0xb)+parseInt(_0x4a991f(0x1c6))/0xc*(-parseInt(_0x4a991f(0x1c5))/0xd);if(_0x4454f2===_0x83f2f2)break;else _0x3c90aa['push'](_0x3c90aa['shift']());}catch(_0x135af6){_0x3c90aa['push'](_0x3c90aa['shift']());}}}(a56_0xb6d1,0xb4f3d));function a56_0x7851(_0xa6603a,_0x46891d){const _0xb6d11f=a56_0xb6d1();return a56_0x7851=function(_0x78511c,_0x24c3ad){_0x78511c=_0x78511c-0x1c1;let _0x3fa8be=_0xb6d11f[_0x78511c];return _0x3fa8be;},a56_0x7851(_0xa6603a,_0x46891d);}export function validateLimitOption(_0x606f9e){const _0x14647b=a56_0x7851;if(!Number['isInteger'](_0x606f9e))return{'isValid':![],'error':_0x14647b(0x1ca)+_0x606f9e+'.\x20Must\x20be\x20an\x20integer.'};if(_0x606f9e<=0x0)return{'isValid':![],'error':_0x14647b(0x1ca)+_0x606f9e+_0x14647b(0x1cf)};return{'isValid':!![],'value':_0x606f9e};}function a56_0xb6d1(){const _0x1d6782=['1628235SbAczL','18oPhFxv','.\x20Must\x20be\x20a\x20number.','Invalid\x20limit\x20value:\x20','13862550FbqgFk','Invalid\x20timeout\x20value:\x20','92014WsOxqF','8SSfipJ','.\x20Must\x20be\x20a\x20positive\x20integer.','1716PUQqvX','7kXPSXs','4401TfYDJh','11763963sDFVKj','223805BTRJtd','11wxqbcy','13hZynLa','1680228pdxsLl'];a56_0xb6d1=function(){return _0x1d6782;};return a56_0xb6d1();}export function validateTimeoutOption(_0x126a93,_0x25cf31=0x1e){const _0x529fab=a56_0x7851;if(_0x126a93===undefined)return{'isValid':!![],'value':_0x25cf31};const _0x135029=typeof _0x126a93==='number'?_0x126a93:parseFloat(_0x126a93);if(isNaN(_0x135029))return{'isValid':![],'error':_0x529fab(0x1cc)+_0x126a93+_0x529fab(0x1c9)};if(_0x135029<=0x0)return{'isValid':![],'error':_0x529fab(0x1cc)+_0x135029+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x135029};}
@@ -1 +1 @@
1
- function a53_0x1b4f(_0x23a230,_0x2cb308){var _0x3e0971=a53_0x3e09();return a53_0x1b4f=function(_0x1b4f9e,_0x2e4adc){_0x1b4f9e=_0x1b4f9e-0x89;var _0x44c6fa=_0x3e0971[_0x1b4f9e];return _0x44c6fa;},a53_0x1b4f(_0x23a230,_0x2cb308);}(function(_0x294dc6,_0x102ee1){var _0x4d5f71=a53_0x1b4f,_0x4652d5=_0x294dc6();while(!![]){try{var _0x3cdede=-parseInt(_0x4d5f71(0x8f))/0x1*(parseInt(_0x4d5f71(0x94))/0x2)+-parseInt(_0x4d5f71(0x90))/0x3*(parseInt(_0x4d5f71(0x92))/0x4)+parseInt(_0x4d5f71(0x8d))/0x5*(-parseInt(_0x4d5f71(0x8c))/0x6)+parseInt(_0x4d5f71(0x8e))/0x7*(-parseInt(_0x4d5f71(0x89))/0x8)+-parseInt(_0x4d5f71(0x91))/0x9*(parseInt(_0x4d5f71(0x95))/0xa)+-parseInt(_0x4d5f71(0x93))/0xb+parseInt(_0x4d5f71(0x8a))/0xc;if(_0x3cdede===_0x102ee1)break;else _0x4652d5['push'](_0x4652d5['shift']());}catch(_0x374e60){_0x4652d5['push'](_0x4652d5['shift']());}}}(a53_0x3e09,0x91bc5));export function getPPID(){var _0x597d7d=a53_0x1b4f;return process[_0x597d7d(0x8b)];}function a53_0x3e09(){var _0x3fe390=['104570hDvCDD','53150ZbqjNo','312QlsVjR','33757080ENJTGI','ppid','2481774XSKvPO','5DAZENc','4165lyBuIQ','7AETrWq','45oxWDms','423OCRSyc','310252ASlfzM','858TogVtg'];a53_0x3e09=function(){return _0x3fe390;};return a53_0x3e09();}export function isProcessRunning(_0x6b4630){try{return process['kill'](_0x6b4630,0x0),!![];}catch{return![];}}
1
+ function a57_0x280b(){var _0x4f8ccc=['7612LbMVeF','kill','137796eokLks','2429523DePLeW','ppid','778425gGbwbj','301554PPuxRh','329TlylNb','40557sbIzWW','8320USEmDe','6CiVXnR','1095BoLJDM','8IQvjSa'];a57_0x280b=function(){return _0x4f8ccc;};return a57_0x280b();}function a57_0x5d8d(_0x5d6e5,_0x2a624f){var _0x280b9a=a57_0x280b();return a57_0x5d8d=function(_0x5d8da7,_0x5cd4ab){_0x5d8da7=_0x5d8da7-0xe0;var _0x55406c=_0x280b9a[_0x5d8da7];return _0x55406c;},a57_0x5d8d(_0x5d6e5,_0x2a624f);}(function(_0x3da64c,_0x49d36c){var _0x238ff1=a57_0x5d8d,_0x44d68a=_0x3da64c();while(!![]){try{var _0x332836=-parseInt(_0x238ff1(0xe2))/0x1*(parseInt(_0x238ff1(0xeb))/0x2)+-parseInt(_0x238ff1(0xea))/0x3+-parseInt(_0x238ff1(0xe5))/0x4*(-parseInt(_0x238ff1(0xe3))/0x5)+parseInt(_0x238ff1(0xe7))/0x6*(parseInt(_0x238ff1(0xec))/0x7)+-parseInt(_0x238ff1(0xe4))/0x8*(-parseInt(_0x238ff1(0xe8))/0x9)+-parseInt(_0x238ff1(0xe1))/0xa+-parseInt(_0x238ff1(0xe0))/0xb;if(_0x332836===_0x49d36c)break;else _0x44d68a['push'](_0x44d68a['shift']());}catch(_0x318f1c){_0x44d68a['push'](_0x44d68a['shift']());}}}(a57_0x280b,0x91dca));export function getPPID(){var _0x2fc782=a57_0x5d8d;return process[_0x2fc782(0xe9)];}export function isProcessRunning(_0x5eaa22){var _0x11ecfd=a57_0x5d8d;try{return process[_0x11ecfd(0xe6)](_0x5eaa22,0x0),!![];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x1a9769,_0x304ac0){const _0x304fb7=a54_0x4b6e,_0x2856f6=_0x1a9769();while(!![]){try{const _0x4f06f1=parseInt(_0x304fb7(0x1d2))/0x1+-parseInt(_0x304fb7(0x1cd))/0x2*(parseInt(_0x304fb7(0x1d3))/0x3)+-parseInt(_0x304fb7(0x1dc))/0x4*(parseInt(_0x304fb7(0x1dd))/0x5)+parseInt(_0x304fb7(0x1d0))/0x6*(parseInt(_0x304fb7(0x1d7))/0x7)+-parseInt(_0x304fb7(0x1da))/0x8+-parseInt(_0x304fb7(0x1cf))/0x9*(-parseInt(_0x304fb7(0x1d8))/0xa)+parseInt(_0x304fb7(0x1ce))/0xb*(parseInt(_0x304fb7(0x1d6))/0xc);if(_0x4f06f1===_0x304ac0)break;else _0x2856f6['push'](_0x2856f6['shift']());}catch(_0x298aec){_0x2856f6['push'](_0x2856f6['shift']());}}}(a54_0x37b4,0xc31dc));function a54_0x4b6e(_0x228bc5,_0x5e638f){const _0x37b4f1=a54_0x37b4();return a54_0x4b6e=function(_0x4b6eed,_0x3d1ddc){_0x4b6eed=_0x4b6eed-0x1cd;let _0x3ae42f=_0x37b4f1[_0x4b6eed];return _0x3ae42f;},a54_0x4b6e(_0x228bc5,_0x5e638f);}export function parseSegmentRef(_0x39b0fd){const _0x40191d=a54_0x4b6e,_0x19b4ab=_0x39b0fd[_0x40191d(0x1d4)]('/');if(_0x19b4ab===-0x1)return{'parentId':_0x39b0fd};if(_0x19b4ab===0x0)throw new Error(_0x40191d(0x1d5)+_0x39b0fd+_0x40191d(0x1d9));const _0x5665ee=_0x39b0fd[_0x40191d(0x1d1)](0x0,_0x19b4ab),_0x2df612=_0x39b0fd['substring'](_0x19b4ab+0x1);if(_0x2df612==='')throw new Error(_0x40191d(0x1d5)+_0x39b0fd+_0x40191d(0x1db));return{'parentId':_0x5665ee,'childId':_0x2df612};}function a54_0x37b4(){const _0x2b295a=['.\x20Child\x20name\x20cannot\x20be\x20empty','2806256LSUdgE','10qeFkWD','1634XlVGPQ','83534TBZTbU','13237353kgzFHK','18skbKAW','substring','1535283zoAUou','5487bPgJzB','indexOf','Invalid\x20segment\x20reference\x20format:\x20','660lXdEZh','2118053aMJOoa','10QwYtvh','.\x20Parent\x20name\x20cannot\x20be\x20empty','5079120qDUxRM'];a54_0x37b4=function(){return _0x2b295a;};return a54_0x37b4();}
1
+ function a58_0x4565(_0x5af9ed,_0x3211f4){const _0x1fd33b=a58_0x1fd3();return a58_0x4565=function(_0x456564,_0x1848fa){_0x456564=_0x456564-0xf6;let _0x2d4dd7=_0x1fd33b[_0x456564];return _0x2d4dd7;},a58_0x4565(_0x5af9ed,_0x3211f4);}(function(_0x4fe5d2,_0x294dfc){const _0x49f719=a58_0x4565,_0x430165=_0x4fe5d2();while(!![]){try{const _0x1da186=-parseInt(_0x49f719(0xf8))/0x1+-parseInt(_0x49f719(0xfb))/0x2*(parseInt(_0x49f719(0xf7))/0x3)+-parseInt(_0x49f719(0x100))/0x4+-parseInt(_0x49f719(0xfa))/0x5*(parseInt(_0x49f719(0xfe))/0x6)+parseInt(_0x49f719(0xfd))/0x7+parseInt(_0x49f719(0xff))/0x8+-parseInt(_0x49f719(0x103))/0x9*(-parseInt(_0x49f719(0x102))/0xa);if(_0x1da186===_0x294dfc)break;else _0x430165['push'](_0x430165['shift']());}catch(_0x3612f2){_0x430165['push'](_0x430165['shift']());}}}(a58_0x1fd3,0x9de74));function a58_0x1fd3(){const _0x1011f7=['366LwlXGW','indexOf','2915318vnFcXj','23862MgztAc','2575264Hcdrrl','3638824UEkjIv','substring','30GUypHX','9761571QZCggq','Invalid\x20segment\x20reference\x20format:\x20','9264fdTark','625856fuEvOh','.\x20Parent\x20name\x20cannot\x20be\x20empty','1565ESQXBc'];a58_0x1fd3=function(){return _0x1011f7;};return a58_0x1fd3();}export function parseSegmentRef(_0x2ffcfd){const _0x538201=a58_0x4565,_0xcde3d1=_0x2ffcfd[_0x538201(0xfc)]('/');if(_0xcde3d1===-0x1)return{'parentId':_0x2ffcfd};if(_0xcde3d1===0x0)throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x2ffcfd+_0x538201(0xf9));const _0x424451=_0x2ffcfd[_0x538201(0x101)](0x0,_0xcde3d1),_0x595477=_0x2ffcfd[_0x538201(0x101)](_0xcde3d1+0x1);if(_0x595477==='')throw new Error(_0x538201(0xf6)+_0x2ffcfd+'.\x20Child\x20name\x20cannot\x20be\x20empty');return{'parentId':_0x424451,'childId':_0x595477};}
@@ -1 +1 @@
1
- (function(_0x485ec0,_0x1c9f03){const _0x5c4b91=a55_0x4010,_0x7bf6c0=_0x485ec0();while(!![]){try{const _0x15a4ad=-parseInt(_0x5c4b91(0x1f0))/0x1+-parseInt(_0x5c4b91(0x1ef))/0x2*(-parseInt(_0x5c4b91(0x1e0))/0x3)+-parseInt(_0x5c4b91(0x1de))/0x4+parseInt(_0x5c4b91(0x1ec))/0x5*(parseInt(_0x5c4b91(0x1e6))/0x6)+-parseInt(_0x5c4b91(0x1e9))/0x7+-parseInt(_0x5c4b91(0x1e2))/0x8+parseInt(_0x5c4b91(0x1e5))/0x9*(parseInt(_0x5c4b91(0x1da))/0xa);if(_0x15a4ad===_0x1c9f03)break;else _0x7bf6c0['push'](_0x7bf6c0['shift']());}catch(_0x478ae9){_0x7bf6c0['push'](_0x7bf6c0['shift']());}}}(a55_0x24da,0xbcb58));import a55_0x10c64d from'ora';export function createCommandSpinner(_0x1c2ccb,_0x4ee7c0={}){const _0x5376d9=a55_0x4010,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x4ee7c0;return a55_0x10c64d({'text':_0x1c2ccb,'color':_0x5376d9(0x1ee),'isEnabled':forceEnabled||process['stdout'][_0x5376d9(0x1e1)]&&!verbose});}export async function withSpinner(_0x311764,_0xd1f18b,_0x2f572a={}){const _0x2e8c58=a55_0x4010,_0x30ac3d=_0x2f572a[_0x2e8c58(0x1f2)]??(()=>Date[_0x2e8c58(0x1ea)]()),_0x43c85a=createCommandSpinner(_0x311764,_0x2f572a);_0x43c85a[_0x2e8c58(0x1e3)]();const _0x578887=_0x30ac3d();try{const _0x35e5ea=await _0xd1f18b(),_0x2cfcf1=_0x30ac3d()-_0x578887;return _0x43c85a[_0x2e8c58(0x1e4)](),{'data':_0x35e5ea,'elapsedMs':_0x2cfcf1};}catch(_0xadf2c1){_0x43c85a[_0x2e8c58(0x1e4)]();throw _0xadf2c1;}}export async function withQuerySpinner(_0x19e984,_0x3153e3,_0x2486cd={}){const _0x46e3f3=a55_0x4010,_0x3d9851=_0x2486cd['clock']??(()=>Date[_0x46e3f3(0x1ea)]()),_0x2ad840=_0x2486cd[_0x46e3f3(0x1e7)]??setInterval,_0x1e993d=createCommandSpinner(_0x19e984,_0x2486cd);_0x1e993d[_0x46e3f3(0x1e3)]();const _0xf3ea19=_0x3d9851(),_0x209269=_0x19e984[_0x46e3f3(0x1eb)](_0x46e3f3(0x1e8),''),_0x4e5941={},_0x4ff2ec=()=>{const _0xcd731f=_0x46e3f3;if(!_0x1e993d[_0xcd731f(0x1ed)])return;const _0x486114=((_0x3d9851()-_0xf3ea19)/0x3e8)[_0xcd731f(0x1db)](0x1),_0x427b05=_0x4e5941[_0xcd731f(0x1dc)]??_0x209269,_0x2f57de=_0x4e5941[_0xcd731f(0x1dd)]?_0xcd731f(0x1df)+_0x4e5941[_0xcd731f(0x1dd)]+']':'',_0x448b34=_0x4e5941['extra']?'\x20'+_0x4e5941[_0xcd731f(0x1f1)]:'';_0x1e993d['text']=_0x427b05+'\x20('+_0x486114+'s)'+_0x448b34+_0x2f57de;},_0x137f1b=_0x2ad840(()=>{_0x4ff2ec();},0x3e8),_0x1a2915={'setPhase':_0x4589c6=>{_0x4e5941['phase']=_0x4589c6,_0x4ff2ec();},'setJobId':_0x4d1971=>{_0x4e5941['jobId']=_0x4d1971,_0x4ff2ec();},'setExtra':_0x3fcbf8=>{const _0x14c2b7=_0x46e3f3;_0x4e5941[_0x14c2b7(0x1f1)]=_0x3fcbf8,_0x4ff2ec();}};_0x4ff2ec();try{const _0x38ef27=await _0x3153e3(_0x1a2915),_0x39c721=_0x3d9851()-_0xf3ea19;return{'data':_0x38ef27,'elapsedMs':_0x39c721};}finally{clearInterval(_0x137f1b),_0x1e993d['stop']();}}function a55_0x4010(_0x494cf4,_0x53db05){const _0x24da02=a55_0x24da();return a55_0x4010=function(_0x4010d5,_0x358d67){_0x4010d5=_0x4010d5-0x1da;let _0x5a42d0=_0x24da02[_0x4010d5];return _0x5a42d0;},a55_0x4010(_0x494cf4,_0x53db05);}function a55_0x24da(){const _0x5e4553=['replace','10AEnHWU','isSpinning','cyan','4cdxplx','342548lfCtqn','extra','clock','20RVzCfJ','toFixed','phase','jobId','908660anzlul','\x20[Job\x20ID:\x20','1629564CAdoqw','isTTY','11027352HgQXhd','start','stop','6794109QKlOYr','2579058admQfv','intervalFactory','...','5143460JZSIfU','now'];a55_0x24da=function(){return _0x5e4553;};return a55_0x24da();}export function formatElapsed(_0x2bbb31){const _0x3a6013=a55_0x4010;return(_0x2bbb31/0x3e8)[_0x3a6013(0x1db)](0x2)+'s';}
1
+ (function(_0x2a431b,_0x59b3da){const _0x1d926e=a59_0x1b56,_0x4fd608=_0x2a431b();while(!![]){try{const _0x24334d=-parseInt(_0x1d926e(0x1a5))/0x1+-parseInt(_0x1d926e(0x194))/0x2+-parseInt(_0x1d926e(0x192))/0x3*(-parseInt(_0x1d926e(0x19f))/0x4)+parseInt(_0x1d926e(0x199))/0x5+-parseInt(_0x1d926e(0x1a0))/0x6*(parseInt(_0x1d926e(0x1a6))/0x7)+parseInt(_0x1d926e(0x197))/0x8*(-parseInt(_0x1d926e(0x1a2))/0x9)+parseInt(_0x1d926e(0x193))/0xa*(parseInt(_0x1d926e(0x18c))/0xb);if(_0x24334d===_0x59b3da)break;else _0x4fd608['push'](_0x4fd608['shift']());}catch(_0x3d0346){_0x4fd608['push'](_0x4fd608['shift']());}}}(a59_0x5a4b,0xa90a2));function a59_0x1b56(_0x2864a8,_0xdb57cc){const _0x5a4b00=a59_0x5a4b();return a59_0x1b56=function(_0x1b5644,_0x5e3cab){_0x1b5644=_0x1b5644-0x18b;let _0x597a18=_0x5a4b00[_0x1b5644];return _0x597a18;},a59_0x1b56(_0x2864a8,_0xdb57cc);}import a59_0x5116f1 from'ora';export function createCommandSpinner(_0x45f07b,_0x3affbf={}){const _0x40c494=a59_0x1b56,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x3affbf;return a59_0x5116f1({'text':_0x45f07b,'color':_0x40c494(0x18e),'isEnabled':forceEnabled||process[_0x40c494(0x190)][_0x40c494(0x18f)]&&!verbose});}export async function withSpinner(_0x4c23c1,_0x11eb29,_0x392b2e={}){const _0x179de5=a59_0x1b56,_0x4a0176=_0x392b2e[_0x179de5(0x19e)]??(()=>Date['now']()),_0x2420ad=createCommandSpinner(_0x4c23c1,_0x392b2e);_0x2420ad[_0x179de5(0x195)]();const _0x5922eb=_0x4a0176();try{const _0x1e4344=await _0x11eb29(),_0x55f468=_0x4a0176()-_0x5922eb;return _0x2420ad[_0x179de5(0x1a4)](),{'data':_0x1e4344,'elapsedMs':_0x55f468};}catch(_0x2ee475){_0x2420ad[_0x179de5(0x1a4)]();throw _0x2ee475;}}function a59_0x5a4b(){const _0x5352d0=['jobId','cyan','isTTY','stdout','\x20[Job\x20ID:\x20','3MLDMCa','190qBCSzh','1153856KXfuLm','start','intervalFactory','4461432AGaVgs','now','5138450poptuA','extra','text','phase','...','clock','419412uXwKDx','237696eVoxpY','toFixed','9Wglway','isSpinning','stop','674770NGUNTU','105rpFcHQ','replace','1136740KPGIjD'];a59_0x5a4b=function(){return _0x5352d0;};return a59_0x5a4b();}export async function withQuerySpinner(_0x3c8c3d,_0x88e47c,_0x50d8e9={}){const _0x4557d9=a59_0x1b56,_0x526dd7=_0x50d8e9[_0x4557d9(0x19e)]??(()=>Date[_0x4557d9(0x198)]()),_0x42accb=_0x50d8e9[_0x4557d9(0x196)]??setInterval,_0x831097=createCommandSpinner(_0x3c8c3d,_0x50d8e9);_0x831097[_0x4557d9(0x195)]();const _0x33af03=_0x526dd7(),_0x139cb6=_0x3c8c3d[_0x4557d9(0x18b)](_0x4557d9(0x19d),''),_0x5e5a85={},_0x2954cc=()=>{const _0x30c8d5=_0x4557d9;if(!_0x831097[_0x30c8d5(0x1a3)])return;const _0x283973=((_0x526dd7()-_0x33af03)/0x3e8)[_0x30c8d5(0x1a1)](0x1),_0x3f1297=_0x5e5a85[_0x30c8d5(0x19c)]??_0x139cb6,_0x1635ea=_0x5e5a85[_0x30c8d5(0x18d)]?_0x30c8d5(0x191)+_0x5e5a85[_0x30c8d5(0x18d)]+']':'',_0x5e8b62=_0x5e5a85['extra']?'\x20'+_0x5e5a85['extra']:'';_0x831097[_0x30c8d5(0x19b)]=_0x3f1297+'\x20('+_0x283973+'s)'+_0x5e8b62+_0x1635ea;},_0x37cab1=_0x42accb(()=>{_0x2954cc();},0x3e8),_0x1473c7={'setPhase':_0xcce038=>{_0x5e5a85['phase']=_0xcce038,_0x2954cc();},'setJobId':_0x328d0e=>{const _0x1682af=_0x4557d9;_0x5e5a85[_0x1682af(0x18d)]=_0x328d0e,_0x2954cc();},'setExtra':_0xe7c03b=>{const _0x2d661e=_0x4557d9;_0x5e5a85[_0x2d661e(0x19a)]=_0xe7c03b,_0x2954cc();}};_0x2954cc();try{const _0x53aa8b=await _0x88e47c(_0x1473c7),_0x3926b9=_0x526dd7()-_0x33af03;return{'data':_0x53aa8b,'elapsedMs':_0x3926b9};}finally{clearInterval(_0x37cab1),_0x831097[_0x4557d9(0x1a4)]();}}export function formatElapsed(_0xbcaaf2){const _0xe4b4eb=a59_0x1b56;return(_0xbcaaf2/0x3e8)[_0xe4b4eb(0x1a1)](0x2)+'s';}