@treasuredata/tdx 2026.3.50 β†’ 2026.3.51

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 (228) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.d.ts.map +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-command.js.map +1 -1
  16. package/dist/commands/claude-statusline-command.js +1 -1
  17. package/dist/commands/claude-usage-command.js +1 -1
  18. package/dist/commands/command.js +1 -1
  19. package/dist/commands/connection-command.js +1 -1
  20. package/dist/commands/databases.js +1 -1
  21. package/dist/commands/delivery-command.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/engage-campaign-pull-command.js +1 -1
  24. package/dist/commands/engage-campaign-push-command.js +1 -1
  25. package/dist/commands/engage-campaign-validate-command.js +1 -1
  26. package/dist/commands/engage-command.js +1 -1
  27. package/dist/commands/engage-template-pull-command.js +1 -1
  28. package/dist/commands/engage-template-push-command.js +1 -1
  29. package/dist/commands/engage-template-validate-command.js +1 -1
  30. package/dist/commands/job-command.js +1 -1
  31. package/dist/commands/journey-command.js +1 -1
  32. package/dist/commands/journey-validate-command.js +1 -1
  33. package/dist/commands/llm-command.js +1 -1
  34. package/dist/commands/mcp-command.js +1 -1
  35. package/dist/commands/parent-segment-command.js +1 -1
  36. package/dist/commands/policy-command.js +1 -1
  37. package/dist/commands/profile-command.js +1 -1
  38. package/dist/commands/profiles-command.js +1 -1
  39. package/dist/commands/query-command.js +1 -1
  40. package/dist/commands/schedule-command.js +1 -1
  41. package/dist/commands/segment-command.js +1 -1
  42. package/dist/commands/segment-create-command.js +1 -1
  43. package/dist/commands/segment-fields-command.js +1 -1
  44. package/dist/commands/segment-pull-command.js +1 -1
  45. package/dist/commands/segment-push-command.js +1 -1
  46. package/dist/commands/segment-update-command.js +1 -1
  47. package/dist/commands/segment-use-command.js +1 -1
  48. package/dist/commands/segment-validate-command.js +1 -1
  49. package/dist/commands/segments.js +1 -1
  50. package/dist/commands/show.js +1 -1
  51. package/dist/commands/status-command.js +1 -1
  52. package/dist/commands/tables.js +1 -1
  53. package/dist/commands/unset-command.js +1 -1
  54. package/dist/commands/upgrade-command.js +1 -1
  55. package/dist/commands/use-command.js +1 -1
  56. package/dist/commands/user-command.js +1 -1
  57. package/dist/commands/work-command.js +1 -1
  58. package/dist/commands/workflow-command.js +1 -1
  59. package/dist/core/auth.js +1 -1
  60. package/dist/core/command-output.js +1 -1
  61. package/dist/core/config.js +1 -1
  62. package/dist/core/connection-cache.js +1 -1
  63. package/dist/core/constants.js +1 -1
  64. package/dist/core/credential-cache.js +1 -1
  65. package/dist/core/global-context.d.ts.map +1 -1
  66. package/dist/core/global-context.js +1 -1
  67. package/dist/core/global-context.js.map +1 -1
  68. package/dist/core/keychain.js +1 -1
  69. package/dist/core/oauth-keychain.js +1 -1
  70. package/dist/core/oauth.d.ts +1 -0
  71. package/dist/core/oauth.d.ts.map +1 -1
  72. package/dist/core/oauth.js +1 -1
  73. package/dist/core/oauth.js.map +1 -1
  74. package/dist/core/profile.js +1 -1
  75. package/dist/core/project-config.js +1 -1
  76. package/dist/core/session.js +1 -1
  77. package/dist/core/user-cache.js +1 -1
  78. package/dist/core/version.js +1 -1
  79. package/dist/index.js +1 -1
  80. package/dist/mcp/server.js +1 -1
  81. package/dist/mcp/tools/index.js +1 -1
  82. package/dist/mcp/tools/tdx-run.js +1 -1
  83. package/dist/mcp/tools/tdx-search.js +1 -1
  84. package/dist/mcp/utils.js +1 -1
  85. package/dist/proxy/claude-usage-tracker.js +1 -1
  86. package/dist/proxy/passthrough-server.d.ts +21 -4
  87. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  88. package/dist/proxy/passthrough-server.js +1 -1
  89. package/dist/proxy/passthrough-server.js.map +1 -1
  90. package/dist/proxy/sse-usage-parser.js +1 -1
  91. package/dist/sdk/agent/agent-config.js +1 -1
  92. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  93. package/dist/sdk/agent/agent-yaml.js +1 -1
  94. package/dist/sdk/agent/test/evaluator.js +1 -1
  95. package/dist/sdk/agent/test/executor.js +1 -1
  96. package/dist/sdk/agent/test/index.js +1 -1
  97. package/dist/sdk/agent/test/output.js +1 -1
  98. package/dist/sdk/agent/test/parser.js +1 -1
  99. package/dist/sdk/agent/tool-target-registry.js +1 -1
  100. package/dist/sdk/api.js +1 -1
  101. package/dist/sdk/cas/cas-api-client.js +1 -1
  102. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  103. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  104. package/dist/sdk/cas/index.js +1 -1
  105. package/dist/sdk/cas/pull-workflow.js +1 -1
  106. package/dist/sdk/cas/push-workflow.js +1 -1
  107. package/dist/sdk/client/cdp-api-client.js +1 -1
  108. package/dist/sdk/client/delivery-api-client.js +1 -1
  109. package/dist/sdk/client/endpoints.js +1 -1
  110. package/dist/sdk/client/engage-api-client.js +1 -1
  111. package/dist/sdk/client/http-client.js +1 -1
  112. package/dist/sdk/client/llm-api-client.js +1 -1
  113. package/dist/sdk/client/oauth-refresh.js +1 -1
  114. package/dist/sdk/client/rate-limiter.js +1 -1
  115. package/dist/sdk/client/td-api-client.js +1 -1
  116. package/dist/sdk/client/trino-api-client.js +1 -1
  117. package/dist/sdk/client/workflow-client.js +1 -1
  118. package/dist/sdk/connection-validator.js +1 -1
  119. package/dist/sdk/connection.js +1 -1
  120. package/dist/sdk/delivery.js +1 -1
  121. package/dist/sdk/engage/campaign-pull.js +1 -1
  122. package/dist/sdk/engage/campaign-push.js +1 -1
  123. package/dist/sdk/engage/campaign-validator.js +1 -1
  124. package/dist/sdk/engage/campaign-yaml.js +1 -1
  125. package/dist/sdk/engage/template-pull.js +1 -1
  126. package/dist/sdk/engage/template-push.js +1 -1
  127. package/dist/sdk/engage/template-validator.js +1 -1
  128. package/dist/sdk/engage/template-yaml.js +1 -1
  129. package/dist/sdk/engage/types/campaign-def.js +1 -1
  130. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  131. package/dist/sdk/engage/types/template-schema.js +1 -1
  132. package/dist/sdk/engage.js +1 -1
  133. package/dist/sdk/errors.js +1 -1
  134. package/dist/sdk/index.js +1 -1
  135. package/dist/sdk/io/index.js +1 -1
  136. package/dist/sdk/io/node-filesystem.js +1 -1
  137. package/dist/sdk/job.js +1 -1
  138. package/dist/sdk/journey.js +1 -1
  139. package/dist/sdk/llm/chat-cache.js +1 -1
  140. package/dist/sdk/llm/index.js +1 -1
  141. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  142. package/dist/sdk/llm/model-factors.js +1 -1
  143. package/dist/sdk/personalization.js +1 -1
  144. package/dist/sdk/policy.js +1 -1
  145. package/dist/sdk/query/index.js +1 -1
  146. package/dist/sdk/query/sql-parser.js +1 -1
  147. package/dist/sdk/realtime.js +1 -1
  148. package/dist/sdk/schedule.js +1 -1
  149. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  150. package/dist/sdk/segment/fields-display.js +1 -1
  151. package/dist/sdk/segment/file-discovery.js +1 -1
  152. package/dist/sdk/segment/journey-utils.js +1 -1
  153. package/dist/sdk/segment/journey-validator.js +1 -1
  154. package/dist/sdk/segment/journey-yaml.js +1 -1
  155. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  156. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  157. package/dist/sdk/segment/pull-workflow.js +1 -1
  158. package/dist/sdk/segment/push-recovery.js +1 -1
  159. package/dist/sdk/segment/push-workflow.js +1 -1
  160. package/dist/sdk/segment/resolution-context.js +1 -1
  161. package/dist/sdk/segment/segment-path-parser.js +1 -1
  162. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  163. package/dist/sdk/segment/segment-validator.js +1 -1
  164. package/dist/sdk/segment/target-resolution.js +1 -1
  165. package/dist/sdk/segment/tdx-config.js +1 -1
  166. package/dist/sdk/segment/types/activation-schema.js +1 -1
  167. package/dist/sdk/segment/types/journey-def.js +1 -1
  168. package/dist/sdk/segment/types/journey-schema.js +1 -1
  169. package/dist/sdk/segment/types/segment-def.js +1 -1
  170. package/dist/sdk/segment/types/segment-schema.js +1 -1
  171. package/dist/sdk/segment/validate-files.js +1 -1
  172. package/dist/sdk/segment/yaml-validator.js +1 -1
  173. package/dist/sdk/segment.js +1 -1
  174. package/dist/sdk/types/index.js +1 -1
  175. package/dist/sdk/types/progress.js +1 -1
  176. package/dist/sdk/types/workspace.js +1 -1
  177. package/dist/sdk/user.js +1 -1
  178. package/dist/sdk/util/format-detector.js +1 -1
  179. package/dist/sdk/util/formatters.js +1 -1
  180. package/dist/sdk/util/index.js +1 -1
  181. package/dist/sdk/util/paginate.js +1 -1
  182. package/dist/sdk/util/tree-formatter.js +1 -1
  183. package/dist/sdk/workflow/archive-validation.js +1 -1
  184. package/dist/sdk/workflow/clone-workflow.js +1 -1
  185. package/dist/sdk/workflow/index.js +1 -1
  186. package/dist/sdk/workflow/pull-workflow.js +1 -1
  187. package/dist/sdk/workflow/push-workflow.js +1 -1
  188. package/dist/sdk/workflow/tdx-config.js +1 -1
  189. package/dist/sdk/workflow/workflow-utils.js +1 -1
  190. package/dist/sdk/workspace/frontmatter.js +1 -1
  191. package/dist/sdk/workspace/git.js +1 -1
  192. package/dist/sdk/workspace/index.js +1 -1
  193. package/dist/sdk/workspace/templates.js +1 -1
  194. package/dist/sdk/workspace/weekly.js +1 -1
  195. package/dist/sdk/workspace/wikilinks.js +1 -1
  196. package/dist/test-utils/command-runner.js +1 -1
  197. package/dist/test-utils/factories.js +1 -1
  198. package/dist/test-utils/fixtures.js +1 -1
  199. package/dist/test-utils/http-mock.js +1 -1
  200. package/dist/test-utils/index.js +1 -1
  201. package/dist/utils/async.js +1 -1
  202. package/dist/utils/colors.js +1 -1
  203. package/dist/utils/diff.js +1 -1
  204. package/dist/utils/file-permissions.js +1 -1
  205. package/dist/utils/file-reader.js +1 -1
  206. package/dist/utils/github-releases.js +1 -1
  207. package/dist/utils/global-cache.js +1 -1
  208. package/dist/utils/json-loader.js +1 -1
  209. package/dist/utils/local-cache.js +1 -1
  210. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  211. package/dist/utils/logger/formatters/index.js +1 -1
  212. package/dist/utils/logger/handlers/console-handler.js +1 -1
  213. package/dist/utils/logger/handlers/file-handler.js +1 -1
  214. package/dist/utils/logger/handlers/index.js +1 -1
  215. package/dist/utils/logger/handlers/null-handler.js +1 -1
  216. package/dist/utils/logger/index.js +1 -1
  217. package/dist/utils/logger/logger.js +1 -1
  218. package/dist/utils/logger/types.js +1 -1
  219. package/dist/utils/option-validation.js +1 -1
  220. package/dist/utils/process.js +1 -1
  221. package/dist/utils/prompt.js +1 -1
  222. package/dist/utils/spinner.js +1 -1
  223. package/dist/utils/sse-parser.js +1 -1
  224. package/dist/utils/string-utils.js +1 -1
  225. package/dist/utils/table-ref-parser.js +1 -1
  226. package/dist/utils/tdx-logger.js +1 -1
  227. package/dist/utils/version-check.js +1 -1
  228. package/package.json +1 -1
@@ -1 +1 @@
1
- const a166_0x1f67f1=a166_0x237d;function a166_0x237d(_0x19d4ec,_0x103343){_0x19d4ec=_0x19d4ec-0x15c;const _0x370293=a166_0x3702();let _0x237df5=_0x370293[_0x19d4ec];return _0x237df5;}(function(_0x59148c,_0x166b3f){const _0x4795a5=a166_0x237d,_0x356275=_0x59148c();while(!![]){try{const _0x1293fe=parseInt(_0x4795a5(0x226))/0x1*(-parseInt(_0x4795a5(0x229))/0x2)+parseInt(_0x4795a5(0x1f2))/0x3+parseInt(_0x4795a5(0x182))/0x4+-parseInt(_0x4795a5(0x213))/0x5+-parseInt(_0x4795a5(0x170))/0x6*(parseInt(_0x4795a5(0x1d9))/0x7)+parseInt(_0x4795a5(0x1a6))/0x8+parseInt(_0x4795a5(0x17f))/0x9;if(_0x1293fe===_0x166b3f)break;else _0x356275['push'](_0x356275['shift']());}catch(_0x66cd06){_0x356275['push'](_0x356275['shift']());}}}(a166_0x3702,0x5ebf4));import{CDPApiClient}from'./client/cdp-api-client.js';import{TrinoApiClient}from'./client/trino-api-client.js';function a166_0x3702(){const _0x64ec45=['getBehaviorNames','updatedAt','catch','Calculating\x20statistics\x20for:\x20','behavior','keys','updateSegment','createFolder','3618955wsRiSW','delete','isEnabled','interval','type','getConfig','Path\x20cannot\x20be\x20empty','data','entityToSegment','idStitching','filter','cdp_audience_','trigger_event','realtimeDefToConfig','_tdxInstance','customerPercent','database','getParentSegmentSQL','resolveFolderId','53loVstE','getFolder','relationships','12026ZcHZed','getSegmentSQLFromRule','Validating\x20all\x20attributes\x20in\x20parallel...','has','segment-batch','rule','population','Folder\x20not\x20found:\x20','behaviors','Attribute\x20\x27','schemaValid','listSegments','Behavior\x20\x27','coveragePercent','attribute','Fetching\x20sample\x20data\x20for:\x20','deleteActivation','YAML\x20file\x20has\x20no\x20rule\x20definition','detectResourceTypeInFolder','criteria','segmentFolderId','\x20in\x20parent\x20','Personalization\x20services\x20fetch\x20failed\x20for\x20parent\x20segment\x20','schema','createParentSegment','INVALID_ARGUMENT','journey','118458NLGpNg','batchAttributes','resolveParentIdOrName','message','personalization','getSegmentSQL','detectResourceType','events','onProgress','createParent','attributes','isAbsolute','listFolders','parentDatabaseName','column','5747940fCgrVL','resolvePathToResource','executeQuery','887500WYLurN','Fetching\x20enriched\x20master\x20data...','customers','ordered_set','error','\x27\x20not\x20found\x20in\x20path','keyColumns','buildTreeFromEntities','source_field','schemaError','runParentSegment','state','getRootFolderId','listParents','description','join','stitching_keys','single','matrixColumnName','child_key','Calculating\x20coverage\x20for:\x20','parent','listFields','parentFolderId','Master\x20table:\x20','find','journeyBundleName','getParentSegment','personalization_services','Validating\x20attribute:\x20','Counting\x20master\x20table\x20rows...','set','matchedCount','getAudienceBehaviors','Resource\x20\x27','id_stitching','5188520EQdurn','listRecursive','previewParentYaml','folder-segment','getEntityParentFolderId','split','createSegment','parent_key','getTdxInstance','entity','versionNumber','realtime','segment','journeyBundleId','rowCount','ambiguous','segment-realtime','list','validateRealtimeConfig','pushParentYaml','primary_key','create','getOutputDatabaseName','createJourneySegment','validateParentYaml','\x27:\x20','listSegmentFolders','isArray','totalEvents','counter','includes','parentColumn','some','Validating\x20all\x20behaviors\x20in\x20parallel...','createActivation','getActivation','entityToFolder','Parent\x20segment\x20not\x20found:\x20','resolveParentId','eventTables','SEGMENT_NOT_FOUND','then','source','segments','length','enriched','get','push','matched_count','Table','\x27\x20not\x20found','224Hgvohi','string','sampleData','folder','source_table','listActivations','parent\x20segment','debug','test','listOutputTables','map','groupingName','getSegment','getParentFull','SHOW\x20TABLES\x20IN\x20','\x27\x20not\x20found\x20in\x20parent\x20segment','updateSegmentById','tdx.sdk.segment','listParentSegments','enrichDefWithRealtimeAndPersonalization','connection','sourceTableError','table','runParent','batch_segments','1659720fNFYKk','Validating\x20master\x20table:\x20','trinoClient','Folder\x20\x27','matrixTableName','getSegmentEntity','RT\x20event\x20\x27','updateParent','name','listUnifiedWithJourneys','getParent','Path\x20must\x20be\x20absolute\x20(cannot\x20start\x20with\x20.\x20or\x20..)','parentFolder','client','traversePath','allValid','all','deleteSegment','Child\x20segment\x20not\x20found:\x20','sections','slice','syncPersonalizationServices','sourceTableValid','master','createdAt'];a166_0x3702=function(){return _0x64ec45;};return a166_0x3702();}import{SDKError,ErrorCode}from'./errors.js';import{deduplicateJourneysByBundle,entityToJourneyListItem,parseJourneyState}from'./journey.js';import{parsePath}from'./segment/segment-path-parser.js';import{pullSegments as a166_0x26cf0c}from'./segment/pull-workflow.js';import{buildSegmentNameToIdMap,createSegmentIdResolver,extractRootFolderId}from'./segment/push-workflow.js';import{parseSegmentYamlFile,yamlRuleToApi,collectSegmentRefsFromRule,resolveRuleSegmentIds}from'./segment/child-segment-yaml.js';import{apiToDef,defToApi,serializeDef,parseDef}from'./segment/parent-segment-yaml.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{DEFAULT_TIME_RANGE,DEFAULT_SAMPLE_LIMIT,generateSchemaValidationSQL,generateMasterCountSQL,generateMasterSampleSQL,generateAttributeCoverageSQL,generateBehaviorStatsSQL,generateAttributeSampleSQL,generateBehaviorSampleSQL,generateEnrichedSQL,generateAttributeSchemaSQL,generateBehaviorSchemaSQL,findAttributeByName,findBehaviorByName,getAttributeColumns,getBehaviorColumns}from'./segment/parent-segment-preview.js';import{Logger}from'../utils/logger/index.js';const logger=Logger['of'](a166_0x1f67f1(0x1ea));export class SegmentSDK{[a166_0x1f67f1(0x1ff)];['trinoClient'];constructor(_0x25e557){const _0x301a0f=a166_0x1f67f1;this[_0x301a0f(0x1ff)]=new CDPApiClient(_0x25e557),this[_0x301a0f(0x1f4)]=new TrinoApiClient(_0x25e557);}async['listParents'](){const _0x2aa80f=a166_0x1f67f1;return await this['client'][_0x2aa80f(0x1eb)]();}async[a166_0x1f67f1(0x1fc)](_0x5b8a98){const _0x373060=a166_0x1f67f1;return await this[_0x373060(0x1ff)][_0x373060(0x19d)](_0x5b8a98);}async['getRootFolderId'](_0xae596){const _0x543589=a166_0x1f67f1,_0x28b3b8=await this[_0x543589(0x1fc)](_0xae596);return extractRootFolderId(_0x28b3b8);}async[a166_0x1f67f1(0x160)](_0x27e419){const _0x3554ff=a166_0x1f67f1;return await this[_0x3554ff(0x1ff)]['listSegments'](_0x27e419);}async[a166_0x1f67f1(0x1e5)](_0x24fbf9,_0x2d2cc1){const _0x5d9958=a166_0x1f67f1;return await this[_0x5d9958(0x1ff)][_0x5d9958(0x1e5)](_0x24fbf9,_0x2d2cc1);}async[a166_0x1f67f1(0x1f7)](_0x4739e9){const _0x110fb4=a166_0x1f67f1;return await this[_0x110fb4(0x1ff)]['getSegmentEntity'](_0x4739e9);}async[a166_0x1f67f1(0x17c)](_0x375fce){const _0x5bcf37=a166_0x1f67f1;return await this['client'][_0x5bcf37(0x1c0)](_0x375fce);}async[a166_0x1f67f1(0x227)](_0x1fc624){return await this['client']['getSegmentFolder'](_0x1fc624);}async[a166_0x1f67f1(0x1de)](_0x4e1a15,_0x2cda16){const _0x407bb5=a166_0x1f67f1;return await this[_0x407bb5(0x1ff)][_0x407bb5(0x1de)](_0x4e1a15,_0x2cda16);}async[a166_0x1f67f1(0x1c9)](_0xef9f76,_0x4666e4,_0x3d47f8){const _0x2114a8=a166_0x1f67f1;return await this[_0x2114a8(0x1ff)][_0x2114a8(0x1c9)](_0xef9f76,_0x4666e4,_0x3d47f8);}async[a166_0x1f67f1(0x1c8)](_0x3b8ad4,_0x3583c1,_0x5dfbc5){const _0x456437=a166_0x1f67f1;return await this['client'][_0x456437(0x1c8)](_0x3b8ad4,_0x3583c1,_0x5dfbc5);}async['updateActivation'](_0x73c2f1,_0x50bc95,_0x2e60c6,_0x5b72f9){const _0x5310d5=a166_0x1f67f1;return await this[_0x5310d5(0x1ff)]['updateActivation'](_0x73c2f1,_0x50bc95,_0x2e60c6,_0x5b72f9);}async[a166_0x1f67f1(0x165)](_0x10bb2f,_0x4b2339,_0x18c46c){const _0x13d1f6=a166_0x1f67f1;return await this[_0x13d1f6(0x1ff)][_0x13d1f6(0x165)](_0x10bb2f,_0x4b2339,_0x18c46c);}async['getParentSQL'](_0x511610){const _0x4c39e8=a166_0x1f67f1;return await this['client'][_0x4c39e8(0x224)](_0x511610);}[a166_0x1f67f1(0x1bc)](_0x37b5ea){const _0x2179be=a166_0x1f67f1;return _0x2179be(0x21e)+_0x37b5ea;}async[a166_0x1f67f1(0x1e2)](_0x1e3496){const _0x3a7070=a166_0x1f67f1,_0x701ac3=this[_0x3a7070(0x1bc)](_0x1e3496),_0x5c8616=_0x3a7070(0x1e7)+_0x701ac3,_0x8f2b86=await this['trinoClient']['executeQuery'](_0x5c8616,{'catalog':'td','schema':_0x701ac3});return _0x8f2b86['data'][_0x3a7070(0x1e3)](_0x50bd31=>({'name':_0x50bd31[_0x3a7070(0x1d7)],'type':_0x50bd31[_0x3a7070(0x1d7)]===_0x3a7070(0x184)?_0x3a7070(0x184):_0x3a7070(0x20f)}));}async[a166_0x1f67f1(0x20b)](_0x17f835){const _0x1f3ec5=a166_0x1f67f1,_0x2b93f7=await this[_0x1f3ec5(0x1ff)][_0x1f3ec5(0x1a3)](_0x17f835);return _0x2b93f7[_0x1f3ec5(0x1e3)](_0x37d159=>_0x37d159[_0x1f3ec5(0x1fa)]);}async[a166_0x1f67f1(0x175)](_0x300c20,_0x335d94){const _0x318e35=a166_0x1f67f1;return await this[_0x318e35(0x1ff)][_0x318e35(0x175)](_0x300c20,_0x335d94);}async[a166_0x1f67f1(0x22a)](_0x33dc34,_0x296761){const _0x1d1e4f=a166_0x1f67f1;return await this[_0x1d1e4f(0x1ff)][_0x1d1e4f(0x22a)](_0x33dc34,_0x296761);}async['getSegmentSQLFromYaml'](_0x4ea145,_0x5d5577,_0x194936){const _0x479f19=a166_0x1f67f1,_0xb31b58=parseSegmentYamlFile(_0x4ea145);if(!_0xb31b58[_0x479f19(0x22e)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x479f19(0x166));const _0x16a03e=await this[_0x479f19(0x1cc)](_0x5d5577);let _0x1a9da4=_0xb31b58[_0x479f19(0x22e)];const _0x19d969=collectSegmentRefsFromRule(_0xb31b58[_0x479f19(0x22e)]);if(_0x19d969['length']>0x0){const _0x40980d=await this[_0x479f19(0x160)](_0x16a03e),_0x2d3737=buildSegmentNameToIdMap(_0x40980d),_0x2f2452=createSegmentIdResolver(_0x2d3737,_0x194936);_0x1a9da4=await resolveRuleSegmentIds(_0x1a9da4,_0x2f2452);}const _0x4ea009=yamlRuleToApi(_0x1a9da4);return await this['client'][_0x479f19(0x22a)](_0x16a03e,_0x4ea009);}async['resolveParentId'](_0x3a064a){const _0xac130b=a166_0x1f67f1,_0x311224=await this[_0xac130b(0x18f)](),_0x1c512f=_0x311224[_0xac130b(0x19b)](_0x267add=>_0x267add[_0xac130b(0x17a)][_0xac130b(0x1fa)]===_0x3a064a);if(!_0x1c512f)throw new SDKError(ErrorCode[_0xac130b(0x1ce)],_0xac130b(0x1cb)+_0x3a064a);return _0x1c512f['id'];}async[a166_0x1f67f1(0x1f0)](_0x26ab10){const _0x443090=a166_0x1f67f1;let _0x4bd278=_0x26ab10;return!/^\d+$/[_0x443090(0x1e1)](_0x26ab10)&&(_0x4bd278=await this[_0x443090(0x1cc)](_0x26ab10)),await this[_0x443090(0x1ff)][_0x443090(0x18c)](_0x4bd278);}async['resolveSegmentId'](_0x57de23,_0x418463){const _0x54c5bb=a166_0x1f67f1,_0xb9a438=await this['listSegments'](_0x57de23),_0x2714fd=_0xb9a438[_0x54c5bb(0x19b)](_0x49fa7b=>_0x49fa7b['name']===_0x418463);if(!_0x2714fd)throw new SDKError(ErrorCode[_0x54c5bb(0x1ce)],_0x54c5bb(0x204)+_0x418463+'\x20in\x20parent\x20'+_0x57de23);return _0x2714fd['id'];}async[a166_0x1f67f1(0x225)](_0x212917,_0x2026b9){const _0x26f7fe=a166_0x1f67f1,_0x8404cd=await this[_0x26f7fe(0x17c)](_0x212917),_0x527498=_0x8404cd[_0x26f7fe(0x19b)](_0x13662e=>_0x13662e[_0x26f7fe(0x1fa)]===_0x2026b9);if(!_0x527498)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x26f7fe(0x15c)+_0x2026b9+_0x26f7fe(0x16a)+_0x212917);return _0x527498['id'];}async[a166_0x1f67f1(0x198)](_0x1af5f7){const _0x20f310=a166_0x1f67f1,_0xda94f5=await this['resolveParentIdOrName'](_0x1af5f7),[_0x5d9365,_0x1ecb31]=await Promise[_0x20f310(0x202)]([this['client']['getAudienceAttributes'](_0xda94f5),this['client'][_0x20f310(0x1a3)](_0xda94f5)]),_0x2ac7b9=[];for(const _0x4f1d35 of _0x5d9365){_0x2ac7b9['push']({'name':_0x4f1d35[_0x20f310(0x1fa)],'type':_0x4f1d35[_0x20f310(0x217)],'source':_0x20f310(0x163),'parentDatabaseName':_0x4f1d35[_0x20f310(0x17d)],'parentTableName':_0x4f1d35['parentTableName'],'parentColumn':_0x4f1d35[_0x20f310(0x1c5)],'groupingName':_0x4f1d35[_0x20f310(0x1e4)]??undefined,'matrixColumnName':_0x4f1d35['matrixColumnName']});}for(const _0x380a6f of _0x1ecb31){const _0x2d7154=_0x380a6f['name'];if(_0x380a6f[_0x20f310(0x16c)]&&Array[_0x20f310(0x1c1)](_0x380a6f[_0x20f310(0x16c)]))for(const _0x1e283e of _0x380a6f[_0x20f310(0x16c)]){_0x1e283e[_0x20f310(0x1fa)]&&_0x1e283e[_0x20f310(0x217)]&&_0x2ac7b9[_0x20f310(0x1d5)]({'name':_0x2d7154+'.'+_0x1e283e[_0x20f310(0x1fa)],'type':_0x1e283e[_0x20f310(0x217)],'source':_0x20f310(0x20f),'behaviorName':_0x2d7154,'parentDatabaseName':_0x380a6f[_0x20f310(0x17d)],'parentTableName':_0x380a6f['parentTableName'],'parentColumn':_0x1e283e['parentColumn'],'matrixColumnName':_0x1e283e[_0x20f310(0x194)],'matrixTableName':_0x380a6f[_0x20f310(0x1f6)]});}}return _0x2ac7b9;}async['createParent'](_0x168d8b){const _0x3d9fd7=a166_0x1f67f1;return await this[_0x3d9fd7(0x1ff)][_0x3d9fd7(0x16d)](_0x168d8b);}async[a166_0x1f67f1(0x1f9)](_0x5bd04f,_0x2d95ed){const _0x573571=a166_0x1f67f1,_0x547b40=await this['resolveParentIdOrName'](_0x5bd04f);return await this[_0x573571(0x1ff)]['updateParentSegment'](_0x547b40,_0x2d95ed);}async[a166_0x1f67f1(0x1e6)](_0x7f88cd){const _0x50aed0=a166_0x1f67f1,_0xf3e77a=await this[_0x50aed0(0x172)](_0x7f88cd);return await this[_0x50aed0(0x1ff)]['getParentSegmentFull'](_0xf3e77a);}async['pullParentYaml'](_0x3f54ad){const _0x112d8d=a166_0x1f67f1,_0x1e49d3=await this[_0x112d8d(0x1e6)](_0x3f54ad),_0xc33e36=apiToDef(_0x1e49d3);return await this[_0x112d8d(0x1ec)](_0xc33e36,_0x1e49d3['id']),serializeDef(_0xc33e36);}async[a166_0x1f67f1(0x1b9)](_0x18b384){const _0xa24168=a166_0x1f67f1,_0x358530=typeof _0x18b384===_0xa24168(0x1da)?parseDef(_0x18b384):_0x18b384,_0x4db5c1=defToApi(_0x358530);let _0x40de3b=null,_0x98b4dc='';try{_0x40de3b=await this[_0xa24168(0x1e6)](_0x358530[_0xa24168(0x1fa)]);const _0x2c621a=apiToDef(_0x40de3b);await this[_0xa24168(0x1ec)](_0x2c621a,_0x40de3b['id']),_0x98b4dc=serializeDef(_0x2c621a);}catch{}const _0x345c96=serializeDef(_0x358530),_0x22f72f=generateDiff(_0x98b4dc,_0x345c96),_0x2ea084=formatDiffWithColors(_0x22f72f),_0x18a5b3=_0x40de3b===null,_0x2e3cfc=hasChanges(_0x22f72f),_0x5ec5f3={'isNew':_0x18a5b3,'id':_0x40de3b?.['id']||'','name':_0x358530['name'],'diff':_0x22f72f,'diffFormatted':_0x2ea084,'hasChanges':_0x2e3cfc},_0x2ea3d6=async()=>{const _0x3952eb=_0xa24168;let _0x389b51;_0x18a5b3?_0x389b51=await this[_0x3952eb(0x179)](_0x4db5c1):_0x389b51=await this[_0x3952eb(0x1f9)](_0x40de3b['id'],_0x4db5c1);const _0x2fb814=_0x389b51['id']||_0x40de3b?.['id']||'';if(_0x358530[_0x3952eb(0x1b1)]&&_0x2fb814){const _0x272fd2=this[_0x3952eb(0x1ae)](),_0x175a8f=this[_0x3952eb(0x220)](_0x358530[_0x3952eb(0x1b1)]);await _0x272fd2['realtime']['updateConfig'](_0x2fb814,_0x175a8f);}if(_0x358530['personalization_services']&&_0x358530[_0x3952eb(0x19e)][_0x3952eb(0x1d2)]>0x0&&_0x2fb814){const _0x3b6584=this[_0x3952eb(0x1ae)]();await this['syncPersonalizationServices'](_0x3b6584,_0x2fb814,_0x358530['personalization_services']);}return _0x389b51;};return{..._0x5ec5f3,'apply':_0x2ea3d6};}async[a166_0x1f67f1(0x1be)](_0x1a391a,_0x15d1b1={}){const _0x550b8f=a166_0x1f67f1,_0x28d963=typeof _0x1a391a===_0x550b8f(0x1da)?parseDef(_0x1a391a):_0x1a391a,_0x3498ac=[];let _0x567683=!![];const _0x45ab70=_0x3b3e17=>_0x15d1b1[_0x550b8f(0x178)]?.(_0x3b3e17),_0x2d863d={'name':_0x28d963[_0x550b8f(0x1fa)],'master':{'database':_0x28d963[_0x550b8f(0x209)][_0x550b8f(0x223)],'table':_0x28d963[_0x550b8f(0x209)][_0x550b8f(0x1ef)],'schemaValid':![]},'attributes':[],'behaviors':[],'errors':_0x3498ac,'allValid':!![]},_0x5e1d79=async _0x59a6bf=>{const _0x862a0f=_0x550b8f;try{const _0x6deada=await this[_0x862a0f(0x1f4)][_0x862a0f(0x181)](_0x59a6bf);return{'data':_0x6deada[_0x862a0f(0x21a)]};}catch(_0x2c4eb1){const _0x41aa5a=_0x2c4eb1 instanceof Error?_0x2c4eb1[_0x862a0f(0x173)]:String(_0x2c4eb1);return{'data':[],'error':_0x41aa5a};}};if(_0x15d1b1['realtime']){_0x2d863d[_0x550b8f(0x1b1)]=await this[_0x550b8f(0x1b8)](_0x28d963,_0x5e1d79,_0x45ab70);if(_0x2d863d['realtime'][_0x550b8f(0x177)])for(const _0x51a708 of _0x2d863d[_0x550b8f(0x1b1)][_0x550b8f(0x177)]){_0x51a708[_0x550b8f(0x1ee)]&&(_0x3498ac[_0x550b8f(0x1d5)](_0x550b8f(0x1f8)+_0x51a708[_0x550b8f(0x1fa)]+'\x27:\x20'+_0x51a708[_0x550b8f(0x1ee)]),_0x567683=![]);}return _0x2d863d['master'][_0x550b8f(0x15f)]=!![],_0x2d863d[_0x550b8f(0x201)]=_0x567683,_0x2d863d;}_0x45ab70(_0x550b8f(0x1f3)+_0x28d963[_0x550b8f(0x209)][_0x550b8f(0x223)]+'.'+_0x28d963[_0x550b8f(0x209)][_0x550b8f(0x1ef)]);const _0x5161ca=generateSchemaValidationSQL(_0x28d963[_0x550b8f(0x209)][_0x550b8f(0x223)],_0x28d963['master'][_0x550b8f(0x1ef)]),_0x189282=await _0x5e1d79(_0x5161ca);if(_0x189282['error'])_0x2d863d['master']['schemaValid']=![],_0x2d863d[_0x550b8f(0x209)][_0x550b8f(0x18b)]=_0x189282[_0x550b8f(0x186)],_0x3498ac[_0x550b8f(0x1d5)](_0x550b8f(0x19a)+_0x189282[_0x550b8f(0x186)]),_0x567683=![];else{_0x2d863d[_0x550b8f(0x209)]['schemaValid']=!![],_0x45ab70(_0x550b8f(0x1a0));const _0x526836=await _0x5e1d79(generateMasterCountSQL(_0x28d963));!_0x526836[_0x550b8f(0x186)]&&_0x526836[_0x550b8f(0x21a)][_0x550b8f(0x1d2)]>0x0&&(_0x2d863d[_0x550b8f(0x209)]['rowCount']=_0x526836['data'][0x0]['row_count']);}if(_0x15d1b1[_0x550b8f(0x209)])return _0x2d863d['allValid']=_0x567683,_0x2d863d;const _0x4f9e97=async _0x5f159e=>{const _0x4b72ef=_0x550b8f,_0x402f57={'name':_0x5f159e[_0x4b72ef(0x1fa)],'database':_0x5f159e[_0x4b72ef(0x1d0)][_0x4b72ef(0x223)],'table':_0x5f159e[_0x4b72ef(0x1d0)]['table'],'joinKey':_0x5f159e[_0x4b72ef(0x191)][_0x4b72ef(0x195)],'foreignKey':_0x5f159e[_0x4b72ef(0x191)][_0x4b72ef(0x1ad)],'columns':getAttributeColumns(_0x5f159e),'schemaValid':![]};_0x45ab70(_0x4b72ef(0x19f)+_0x5f159e[_0x4b72ef(0x1fa)]);const _0x4cd8b2=await _0x5e1d79(generateAttributeSchemaSQL(_0x28d963,_0x5f159e));if(_0x4cd8b2[_0x4b72ef(0x186)])_0x402f57['schemaError']=_0x4cd8b2['error'];else{_0x402f57[_0x4b72ef(0x15f)]=!![],_0x45ab70(_0x4b72ef(0x196)+_0x5f159e[_0x4b72ef(0x1fa)]);const _0xe56417=await _0x5e1d79(generateAttributeCoverageSQL(_0x28d963,_0x5f159e));!_0xe56417[_0x4b72ef(0x186)]&&_0xe56417[_0x4b72ef(0x21a)][_0x4b72ef(0x1d2)]>0x0&&(_0x402f57['matchedCount']=_0xe56417[_0x4b72ef(0x21a)][0x0][_0x4b72ef(0x1d6)],_0x2d863d[_0x4b72ef(0x209)][_0x4b72ef(0x1b4)]&&_0x2d863d[_0x4b72ef(0x209)][_0x4b72ef(0x1b4)]>0x0&&(_0x402f57[_0x4b72ef(0x162)]=_0x402f57[_0x4b72ef(0x1a2)]/_0x2d863d[_0x4b72ef(0x209)][_0x4b72ef(0x1b4)]*0x64));}return _0x402f57;},_0x6c3e2c=async(_0x4308ca,_0x1d48b0)=>{const _0x5e8045=_0x550b8f,_0x7ada62={'name':_0x4308ca['name'],'database':_0x4308ca['source'][_0x5e8045(0x223)],'table':_0x4308ca['source']['table'],'joinKey':_0x4308ca['join'][_0x5e8045(0x195)],'foreignKey':_0x4308ca['join'][_0x5e8045(0x1ad)],'columns':getBehaviorColumns(_0x4308ca),'schemaValid':![]};_0x45ab70('Validating\x20behavior:\x20'+_0x4308ca[_0x5e8045(0x1fa)]);const _0xadf47b=await _0x5e1d79(generateBehaviorSchemaSQL(_0x28d963,_0x4308ca));if(_0xadf47b[_0x5e8045(0x186)])_0x7ada62[_0x5e8045(0x18b)]=_0xadf47b[_0x5e8045(0x186)];else{_0x7ada62[_0x5e8045(0x15f)]=!![],_0x45ab70(_0x5e8045(0x20e)+_0x4308ca['name']+'\x20('+_0x1d48b0+')');const _0x17df8a=await _0x5e1d79(generateBehaviorStatsSQL(_0x28d963,_0x4308ca,_0x1d48b0));!_0x17df8a['error']&&_0x17df8a[_0x5e8045(0x21a)]['length']>0x0&&(_0x7ada62['customersWithEvents']=_0x17df8a['data'][0x0]['customers_with_events'],_0x7ada62[_0x5e8045(0x1c2)]=_0x17df8a[_0x5e8045(0x21a)][0x0]['total_events'],_0x2d863d['master']['rowCount']&&_0x2d863d['master'][_0x5e8045(0x1b4)]>0x0&&(_0x7ada62[_0x5e8045(0x222)]=_0x7ada62['customersWithEvents']/_0x2d863d[_0x5e8045(0x209)][_0x5e8045(0x1b4)]*0x64));}return _0x7ada62;},_0x7e6ea8=(_0x592f4b,_0x28601b)=>{const _0x411567=_0x550b8f;_0x2d863d[_0x411567(0x17a)]=_0x592f4b,_0x2d863d[_0x411567(0x15d)]=_0x28601b;for(const _0x1a5fe8 of _0x592f4b){!_0x1a5fe8[_0x411567(0x15f)]&&(_0x3498ac[_0x411567(0x1d5)]('Attribute\x20\x27'+_0x1a5fe8[_0x411567(0x1fa)]+_0x411567(0x1bf)+_0x1a5fe8['schemaError']),_0x567683=![]);}for(const _0x6f5544 of _0x28601b){!_0x6f5544[_0x411567(0x15f)]&&(_0x3498ac[_0x411567(0x1d5)]('Behavior\x20\x27'+_0x6f5544[_0x411567(0x1fa)]+'\x27:\x20'+_0x6f5544[_0x411567(0x18b)]),_0x567683=![]);}},_0x3d88c1=_0x15d1b1[_0x550b8f(0x216)]||DEFAULT_TIME_RANGE;if(typeof _0x15d1b1['attribute']===_0x550b8f(0x1da)){const _0x2280a7=findAttributeByName(_0x28d963,_0x15d1b1[_0x550b8f(0x163)]);if(!_0x2280a7)throw new SDKError(ErrorCode[_0x550b8f(0x1ce)],_0x550b8f(0x15e)+_0x15d1b1[_0x550b8f(0x163)]+'\x27\x20not\x20found');const _0x53974a=await _0x4f9e97(_0x2280a7);return _0x7e6ea8([_0x53974a],[]),_0x2d863d[_0x550b8f(0x201)]=_0x567683,_0x2d863d;}if(_0x15d1b1['attribute']===!![]){_0x45ab70(_0x550b8f(0x22b));const _0x504067=await Promise[_0x550b8f(0x202)]((_0x28d963[_0x550b8f(0x17a)]||[])[_0x550b8f(0x1e3)](_0x428b57=>_0x4f9e97(_0x428b57)));return _0x7e6ea8(_0x504067,[]),_0x2d863d[_0x550b8f(0x201)]=_0x567683,_0x2d863d;}if(typeof _0x15d1b1['behavior']==='string'){const _0x5dbd43=findBehaviorByName(_0x28d963,_0x15d1b1[_0x550b8f(0x20f)]);if(!_0x5dbd43)throw new SDKError(ErrorCode[_0x550b8f(0x1ce)],'Behavior\x20\x27'+_0x15d1b1['behavior']+'\x27\x20not\x20found');const _0x21a052=await _0x6c3e2c(_0x5dbd43,_0x3d88c1);return _0x7e6ea8([],[_0x21a052]),_0x2d863d[_0x550b8f(0x201)]=_0x567683,_0x2d863d;}if(_0x15d1b1[_0x550b8f(0x20f)]===!![]){_0x45ab70(_0x550b8f(0x1c7));const _0x115c6e=await Promise['all']((_0x28d963[_0x550b8f(0x15d)]||[])[_0x550b8f(0x1e3)](_0x5f1a9c=>_0x6c3e2c(_0x5f1a9c,_0x3d88c1)));return _0x7e6ea8([],_0x115c6e),_0x2d863d[_0x550b8f(0x201)]=_0x567683,_0x2d863d;}if(_0x15d1b1[_0x550b8f(0x1d3)]){_0x45ab70(_0x550b8f(0x22b));const _0x55f50e=await Promise['all']((_0x28d963[_0x550b8f(0x17a)]||[])['map'](_0x2d5c51=>_0x4f9e97(_0x2d5c51)));return _0x7e6ea8(_0x55f50e,[]),_0x2d863d['allValid']=_0x567683,_0x2d863d;}_0x45ab70('Validating\x20all\x20attributes\x20and\x20behaviors\x20in\x20parallel...');const [_0x3997db,_0x250913]=await Promise[_0x550b8f(0x202)]([Promise[_0x550b8f(0x202)]((_0x28d963[_0x550b8f(0x17a)]||[])[_0x550b8f(0x1e3)](_0x340080=>_0x4f9e97(_0x340080))),Promise['all']((_0x28d963[_0x550b8f(0x15d)]||[])[_0x550b8f(0x1e3)](_0x56746b=>_0x6c3e2c(_0x56746b,_0x3d88c1)))]);_0x7e6ea8(_0x3997db,_0x250913);if(_0x28d963[_0x550b8f(0x1b1)]||_0x28d963[_0x550b8f(0x19e)]){_0x2d863d[_0x550b8f(0x1b1)]=await this[_0x550b8f(0x1b8)](_0x28d963,_0x5e1d79,_0x45ab70);if(_0x2d863d[_0x550b8f(0x1b1)]['events'])for(const _0x35cb1b of _0x2d863d[_0x550b8f(0x1b1)][_0x550b8f(0x177)]){_0x35cb1b[_0x550b8f(0x1ee)]&&(_0x3498ac[_0x550b8f(0x1d5)]('RT\x20event\x20\x27'+_0x35cb1b['name']+_0x550b8f(0x1bf)+_0x35cb1b[_0x550b8f(0x1ee)]),_0x567683=![]);}}return _0x2d863d[_0x550b8f(0x201)]=_0x567683,_0x2d863d;}async[a166_0x1f67f1(0x1a8)](_0x1e2758,_0x1e8552={}){const _0x33f445=a166_0x1f67f1,_0xd68ccc=typeof _0x1e2758==='string'?parseDef(_0x1e2758):_0x1e2758,_0xc19eec=[];let _0xe6e96a=!![];const _0x52fc83=_0x1fe3d9=>_0x1e8552[_0x33f445(0x178)]?.(_0x1fe3d9),_0x383dbe={'name':_0xd68ccc['name'],'master':{'database':_0xd68ccc['master'][_0x33f445(0x223)],'table':_0xd68ccc[_0x33f445(0x209)][_0x33f445(0x1ef)],'schemaValid':!![]},'attributes':[],'behaviors':[],'errors':_0xc19eec,'allValid':!![]},_0x26fd8e=async _0x1d5432=>{const _0x2907ac=_0x33f445;try{const _0x4973fa=await this[_0x2907ac(0x1f4)][_0x2907ac(0x181)](_0x1d5432);return{'data':_0x4973fa[_0x2907ac(0x21a)]};}catch(_0x68b1f9){const _0x4e87db=_0x68b1f9 instanceof Error?_0x68b1f9[_0x2907ac(0x173)]:String(_0x68b1f9);return{'data':[],'error':_0x4e87db};}};if(_0x1e8552[_0x33f445(0x209)]){_0x52fc83('Fetching\x20master\x20sample\x20data...');const _0x3fc3e1=generateMasterSampleSQL(_0xd68ccc,DEFAULT_SAMPLE_LIMIT),_0x146d31=await _0x26fd8e(_0x3fc3e1);return!_0x146d31['error']?_0x383dbe[_0x33f445(0x1db)]=_0x146d31[_0x33f445(0x21a)]:(_0xc19eec[_0x33f445(0x1d5)](_0x33f445(0x19a)+_0x146d31['error']),_0xe6e96a=![]),_0x383dbe[_0x33f445(0x201)]=_0xe6e96a,_0x383dbe;}if(_0x1e8552[_0x33f445(0x163)]){const _0x481f6e=findAttributeByName(_0xd68ccc,_0x1e8552[_0x33f445(0x163)]);if(!_0x481f6e)throw new SDKError(ErrorCode[_0x33f445(0x1ce)],_0x33f445(0x15e)+_0x1e8552[_0x33f445(0x163)]+'\x27\x20not\x20found');_0x52fc83('Fetching\x20sample\x20data\x20for:\x20'+_0x481f6e[_0x33f445(0x1fa)]);const _0x5d7d39=generateAttributeSampleSQL(_0xd68ccc,_0x481f6e,DEFAULT_SAMPLE_LIMIT),_0x29ba7b=await _0x26fd8e(_0x5d7d39);return!_0x29ba7b[_0x33f445(0x186)]?_0x383dbe['sampleData']=_0x29ba7b[_0x33f445(0x21a)]:(_0xc19eec['push'](_0x33f445(0x15e)+_0x481f6e[_0x33f445(0x1fa)]+_0x33f445(0x1bf)+_0x29ba7b[_0x33f445(0x186)]),_0xe6e96a=![]),_0x383dbe[_0x33f445(0x201)]=_0xe6e96a,_0x383dbe;}if(_0x1e8552['behavior']){const _0x408e37=findBehaviorByName(_0xd68ccc,_0x1e8552[_0x33f445(0x20f)]);if(!_0x408e37)throw new SDKError(ErrorCode[_0x33f445(0x1ce)],_0x33f445(0x161)+_0x1e8552[_0x33f445(0x20f)]+_0x33f445(0x1d8));const _0x10c163=_0x1e8552[_0x33f445(0x216)]||DEFAULT_TIME_RANGE;_0x52fc83(_0x33f445(0x164)+_0x408e37[_0x33f445(0x1fa)]+'\x20('+_0x10c163+')');const _0x342036=generateBehaviorSampleSQL(_0xd68ccc,_0x408e37,DEFAULT_SAMPLE_LIMIT,_0x10c163),_0x3c4d8c=await _0x26fd8e(_0x342036);return!_0x3c4d8c[_0x33f445(0x186)]?_0x383dbe[_0x33f445(0x1db)]=_0x3c4d8c[_0x33f445(0x21a)]:(_0xc19eec[_0x33f445(0x1d5)](_0x33f445(0x161)+_0x408e37[_0x33f445(0x1fa)]+'\x27:\x20'+_0x3c4d8c[_0x33f445(0x186)]),_0xe6e96a=![]),_0x383dbe[_0x33f445(0x201)]=_0xe6e96a,_0x383dbe;}if(_0x1e8552[_0x33f445(0x1d3)]){_0x52fc83(_0x33f445(0x183));const _0x455dcd=generateEnrichedSQL(_0xd68ccc,DEFAULT_SAMPLE_LIMIT),_0x17cecd=await _0x26fd8e(_0x455dcd);return!_0x17cecd['error']?_0x383dbe[_0x33f445(0x1db)]=_0x17cecd['data']:(_0xc19eec[_0x33f445(0x1d5)]('Enriched\x20query:\x20'+_0x17cecd[_0x33f445(0x186)]),_0xe6e96a=![]),_0x383dbe[_0x33f445(0x201)]=_0xe6e96a,_0x383dbe;}return _0x383dbe[_0x33f445(0x201)]=_0xe6e96a,_0x383dbe;}async[a166_0x1f67f1(0x1ac)](_0x3ffcde,_0x4b324d){const _0x51e103=a166_0x1f67f1;return await this[_0x51e103(0x1ff)][_0x51e103(0x1ac)](_0x3ffcde,_0x4b324d);}async[a166_0x1f67f1(0x1bd)](_0x34f958){const _0x6f6cd9=a166_0x1f67f1;return await this['client'][_0x6f6cd9(0x1bd)](_0x34f958);}async[a166_0x1f67f1(0x1e9)](_0x129672,_0x5e3d23,_0x2a6b93){const _0x55918c=a166_0x1f67f1;return await this[_0x55918c(0x1ff)][_0x55918c(0x211)](_0x129672,_0x5e3d23,_0x2a6b93);}async['deleteSegment'](_0x930173){const _0x4179ca=a166_0x1f67f1;return await this[_0x4179ca(0x1ff)][_0x4179ca(0x203)](_0x930173);}async[a166_0x1f67f1(0x212)](_0x4beffa,_0x30b998){const _0x1e2667=a166_0x1f67f1,_0x4eb9bc=await this[_0x1e2667(0x172)](_0x4beffa);return await this[_0x1e2667(0x1ff)]['createSegmentFolder'](_0x4eb9bc,_0x30b998);}async[a166_0x1f67f1(0x172)](_0x341952){const _0x371aee=a166_0x1f67f1;if(/^\d+$/[_0x371aee(0x1e1)](_0x341952))return _0x341952;return await this['resolveParentId'](_0x341952);}async[a166_0x1f67f1(0x176)](_0xde048c,_0x5c3a64){const _0x53e80f=a166_0x1f67f1,[_0x2a664f,_0x1ce0e3]=await Promise[_0x53e80f(0x202)]([this[_0x53e80f(0x225)](_0xde048c,_0x5c3a64)[_0x53e80f(0x1cf)](()=>!![])['catch'](()=>![]),this['resolveSegmentId'](_0xde048c,_0x5c3a64)[_0x53e80f(0x1cf)](()=>!![])[_0x53e80f(0x20d)](()=>![])]);if(_0x2a664f&&_0x1ce0e3)return _0x53e80f(0x1b5);else{if(_0x2a664f)return _0x53e80f(0x1dc);else{if(_0x1ce0e3)return _0x53e80f(0x1b2);}}throw new SDKError(ErrorCode[_0x53e80f(0x1ce)],'Resource\x20\x27'+_0x5c3a64+_0x53e80f(0x1e8));}async[a166_0x1f67f1(0x167)](_0x4e2f07,_0xb3b155,_0x396fe3){const _0x49736c=a166_0x1f67f1,[_0x3b0ee7,_0x1e4f91]=await Promise[_0x49736c(0x202)]([this[_0x49736c(0x17c)](_0x4e2f07),this[_0x49736c(0x160)](_0x4e2f07)]),_0xef8175=_0x396fe3?_0x3b0ee7[_0x49736c(0x21d)](_0x46feea=>_0x46feea[_0x49736c(0x199)]===_0x396fe3):_0x3b0ee7[_0x49736c(0x21d)](_0x205321=>!_0x205321[_0x49736c(0x199)]),_0x149749=_0x396fe3?_0x1e4f91[_0x49736c(0x21d)](_0x56c0d0=>_0x56c0d0[_0x49736c(0x169)]===_0x396fe3):_0x1e4f91[_0x49736c(0x21d)](_0x588c10=>!_0x588c10[_0x49736c(0x169)]),_0x1e3a0a=_0xef8175[_0x49736c(0x1c6)](_0x753e0b=>_0x753e0b[_0x49736c(0x1fa)]===_0xb3b155),_0x375d2c=_0x149749[_0x49736c(0x1c6)](_0x55f316=>_0x55f316[_0x49736c(0x1fa)]===_0xb3b155);if(_0x1e3a0a&&_0x375d2c)return _0x49736c(0x1b5);else{if(_0x1e3a0a)return _0x49736c(0x1dc);else{if(_0x375d2c)return _0x49736c(0x1b2);}}throw new SDKError(ErrorCode[_0x49736c(0x1ce)],_0x49736c(0x1a4)+_0xb3b155+'\x27\x20not\x20found\x20in\x20'+(_0x396fe3?_0x49736c(0x1dc):_0x49736c(0x1df)));}async[a166_0x1f67f1(0x200)](_0x5c37fc){const _0x54aedc=a166_0x1f67f1;if(_0x5c37fc[_0x54aedc(0x1d2)]===0x0)throw new SDKError(ErrorCode[_0x54aedc(0x16e)],_0x54aedc(0x219));const _0x3f836e=_0x5c37fc[0x0],_0x19502b=await this[_0x54aedc(0x1cc)](_0x3f836e);if(_0x5c37fc[_0x54aedc(0x1d2)]===0x1)return{'parentId':_0x19502b,'parentName':_0x3f836e,'type':_0x54aedc(0x197),'fullPath':_0x3f836e};const _0x18211c=await this[_0x54aedc(0x18e)](_0x19502b),_0x2891e3=[];let _0x1fddbc=_0x18211c;for(let _0x30ffb8=0x1;_0x30ffb8<_0x5c37fc[_0x54aedc(0x1d2)]-0x1;_0x30ffb8++){const _0x4284be=_0x5c37fc[_0x30ffb8],_0x5983bb=await this['listFolders'](_0x19502b),_0x2f2eb4=_0x1fddbc?_0x5983bb[_0x54aedc(0x19b)](_0x2e6be3=>_0x2e6be3[_0x54aedc(0x1fa)]===_0x4284be&&_0x2e6be3[_0x54aedc(0x199)]===_0x1fddbc):_0x5983bb[_0x54aedc(0x19b)](_0x47f512=>_0x47f512[_0x54aedc(0x1fa)]===_0x4284be&&!_0x47f512[_0x54aedc(0x199)]);if(!_0x2f2eb4)throw new SDKError(ErrorCode[_0x54aedc(0x1ce)],'Folder\x20\x27'+_0x4284be+_0x54aedc(0x187));_0x2891e3[_0x54aedc(0x1d5)](_0x4284be),_0x1fddbc=_0x2f2eb4['id'];}const _0xe63737=_0x5c37fc[_0x5c37fc['length']-0x1],_0x2668b0=await this[_0x54aedc(0x167)](_0x19502b,_0xe63737,_0x1fddbc);if(_0x2668b0===_0x54aedc(0x1b5)||_0x2668b0===_0x54aedc(0x1dc)){const _0x4b10ac=await this[_0x54aedc(0x17c)](_0x19502b),_0x173773=_0x1fddbc?_0x4b10ac[_0x54aedc(0x19b)](_0x581606=>_0x581606[_0x54aedc(0x1fa)]===_0xe63737&&_0x581606[_0x54aedc(0x199)]===_0x1fddbc):_0x4b10ac[_0x54aedc(0x19b)](_0x5b4571=>_0x5b4571[_0x54aedc(0x1fa)]===_0xe63737&&!_0x5b4571[_0x54aedc(0x199)]);if(!_0x173773)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x54aedc(0x1f5)+_0xe63737+_0x54aedc(0x1d8));return _0x2891e3[_0x54aedc(0x1d5)](_0xe63737),{'parentId':_0x19502b,'parentName':_0x3f836e,'folderId':_0x173773['id'],'folderPath':_0x2891e3,'type':_0x54aedc(0x1dc),'fullPath':_0x5c37fc[_0x54aedc(0x191)]('/')};}else{const _0x15b1d4=await this['listSegments'](_0x19502b),_0x3e70e3=_0x1fddbc?_0x15b1d4['find'](_0x12ff22=>_0x12ff22[_0x54aedc(0x1fa)]===_0xe63737&&_0x12ff22['segmentFolderId']===_0x1fddbc):_0x15b1d4[_0x54aedc(0x19b)](_0x3e9cc5=>_0x3e9cc5[_0x54aedc(0x1fa)]===_0xe63737&&!_0x3e9cc5[_0x54aedc(0x169)]);if(!_0x3e70e3)throw new SDKError(ErrorCode[_0x54aedc(0x1ce)],'Segment\x20\x27'+_0xe63737+_0x54aedc(0x1d8));return{'parentId':_0x19502b,'parentName':_0x3f836e,'folderId':_0x1fddbc,'folderPath':_0x2891e3[_0x54aedc(0x1d2)]>0x0?_0x2891e3:undefined,'segmentId':_0x3e70e3['id'],'segmentName':_0xe63737,'type':_0x54aedc(0x1b2),'fullPath':_0x5c37fc[_0x54aedc(0x191)]('/')};}}async[a166_0x1f67f1(0x180)](_0x2b32e7){const _0x1a21a9=a166_0x1f67f1,_0x45e4f2=parsePath(_0x2b32e7);if(!_0x45e4f2[_0x1a21a9(0x17b)])throw new SDKError(ErrorCode[_0x1a21a9(0x16e)],_0x1a21a9(0x1fd));return await this[_0x1a21a9(0x200)](_0x45e4f2[_0x1a21a9(0x1d1)]);}async[a166_0x1f67f1(0x1fb)](_0xc0bcb5,_0x22b844){const _0x2dfd75=a166_0x1f67f1;let _0x30bce5=_0x22b844;!_0x30bce5&&(_0x30bce5=await this[_0x2dfd75(0x18e)](_0xc0bcb5));if(!_0x30bce5)return{'folders':[],'segments':[],'journeys':[]};const _0x4eb4d5=await this[_0x2dfd75(0x1ff)]['listEntitiesByFolder'](_0x30bce5,0x1,![]),_0x2fcf3e=_0x4eb4d5[_0x2dfd75(0x21a)],_0xc98d06=_0x2fcf3e[_0x2dfd75(0x21d)](_0xff8958=>{const _0x889aa7=_0x2dfd75;if(_0xff8958['id']===_0x30bce5)return![];const _0x480a71=this[_0x889aa7(0x1aa)](_0xff8958);return _0x480a71===_0x30bce5||!_0x480a71;}),_0x1d813b=_0xc98d06[_0x2dfd75(0x21d)](_0x246879=>_0x246879[_0x2dfd75(0x217)]===_0x2dfd75(0x1a9))[_0x2dfd75(0x1e3)](_0x12972c=>this[_0x2dfd75(0x1ca)](_0x12972c,_0xc0bcb5)),_0xe47ff=_0xc98d06[_0x2dfd75(0x21d)](_0x482228=>_0x482228[_0x2dfd75(0x217)]===_0x2dfd75(0x22d)||_0x482228['type']===_0x2dfd75(0x1b6))[_0x2dfd75(0x1e3)](_0x2e6ddb=>this[_0x2dfd75(0x21b)](_0x2e6ddb,_0xc0bcb5)),_0x49f27d=_0xc98d06['filter'](_0x3a7051=>_0x3a7051[_0x2dfd75(0x217)]===_0x2dfd75(0x16f)),_0x4d1816=_0x49f27d[_0x2dfd75(0x1e3)](_0x387936=>({'journeyBundleId':_0x387936[_0x2dfd75(0x17a)][_0x2dfd75(0x1b3)],'versionNumber':_0x387936[_0x2dfd75(0x17a)][_0x2dfd75(0x1b0)],'id':_0x387936['id'],'entity':_0x387936})),_0x166d4f=deduplicateJourneysByBundle(_0x4d1816),_0x33c0ea=_0x166d4f[_0x2dfd75(0x1e3)](_0x5e9f2e=>entityToJourneyListItem(_0x5e9f2e['entity'],_0xc0bcb5));return{'folders':_0x1d813b,'segments':_0xe47ff,'journeys':_0x33c0ea};}[a166_0x1f67f1(0x1ca)](_0x445ed1,_0x2113d3){const _0x22aa09=a166_0x1f67f1;return{'audienceId':_0x2113d3,'id':_0x445ed1['id'],'name':_0x445ed1[_0x22aa09(0x17a)][_0x22aa09(0x1fa)],'parentFolderId':_0x445ed1['attributes'][_0x22aa09(0x199)]??_0x445ed1[_0x22aa09(0x228)]?.[_0x22aa09(0x1fe)]?.[_0x22aa09(0x21a)]?.['id']??null,'description':_0x445ed1[_0x22aa09(0x17a)][_0x22aa09(0x190)]??null,'createdAt':_0x445ed1[_0x22aa09(0x17a)][_0x22aa09(0x20a)],'updatedAt':_0x445ed1[_0x22aa09(0x17a)][_0x22aa09(0x20c)]};}[a166_0x1f67f1(0x21b)](_0x55bb18,_0x20845d){const _0x1b2a2a=a166_0x1f67f1;return{'audienceId':_0x20845d,'id':_0x55bb18['id'],'name':_0x55bb18[_0x1b2a2a(0x17a)][_0x1b2a2a(0x1fa)],'description':_0x55bb18[_0x1b2a2a(0x17a)][_0x1b2a2a(0x190)]??undefined,'realtime':_0x55bb18['type']===_0x1b2a2a(0x1b6),'segmentFolderId':_0x55bb18[_0x1b2a2a(0x17a)][_0x1b2a2a(0x169)]??_0x55bb18[_0x1b2a2a(0x228)]?.[_0x1b2a2a(0x1fe)]?.['data']?.['id']??undefined,'population':_0x55bb18[_0x1b2a2a(0x17a)]['population'],'createdAt':_0x55bb18[_0x1b2a2a(0x17a)][_0x1b2a2a(0x20a)],'updatedAt':_0x55bb18[_0x1b2a2a(0x17a)][_0x1b2a2a(0x20c)]};}async[a166_0x1f67f1(0x1a7)](_0x240706,_0x3dcead,_0x423846,_0x1156ee=0xa){const _0x3bb2f3=a166_0x1f67f1;let _0x2a5df3=_0x3dcead;!_0x2a5df3&&(_0x2a5df3=await this[_0x3bb2f3(0x18e)](_0x240706));if(!_0x2a5df3)return[];const _0x1455ab=await this['client']['listEntitiesByFolder'](_0x2a5df3,_0x1156ee,![]),_0x4a63fb=_0x1455ab[_0x3bb2f3(0x21a)];return this[_0x3bb2f3(0x189)](_0x4a63fb,_0x2a5df3);}['buildTreeFromEntities'](_0x416a9d,_0x3a2bd3){const _0x2c1d5b=a166_0x1f67f1,_0x422b7c=new Map();for(const _0x45a114 of _0x416a9d){if(_0x45a114[_0x2c1d5b(0x217)]===_0x2c1d5b(0x1a9)&&_0x45a114['id']===_0x3a2bd3)continue;const _0x5e42dd=this['getEntityParentFolderId'](_0x45a114)??_0x3a2bd3;!_0x422b7c[_0x2c1d5b(0x22c)](_0x5e42dd)&&_0x422b7c[_0x2c1d5b(0x1a1)](_0x5e42dd,[]),_0x422b7c['get'](_0x5e42dd)[_0x2c1d5b(0x1d5)](_0x45a114);}return this['buildTreeNodesForFolder'](_0x3a2bd3,_0x422b7c);}[a166_0x1f67f1(0x1aa)](_0x15476a){const _0x1acc87=a166_0x1f67f1;if(_0x15476a[_0x1acc87(0x228)]?.[_0x1acc87(0x1fe)]?.[_0x1acc87(0x21a)]?.['id'])return _0x15476a[_0x1acc87(0x228)][_0x1acc87(0x1fe)][_0x1acc87(0x21a)]['id'];return _0x15476a[_0x1acc87(0x17a)]['parentFolderId']??_0x15476a[_0x1acc87(0x17a)]['segmentFolderId']??undefined;}['buildTreeNodesForFolder'](_0xfcda86,_0x3d1685){const _0x7c94f3=a166_0x1f67f1,_0x73db9b=_0x3d1685['get'](_0xfcda86)??[],_0x6f6004=[],_0x407945=_0x73db9b[_0x7c94f3(0x21d)](_0x38c336=>_0x38c336[_0x7c94f3(0x217)]===_0x7c94f3(0x1a9)),_0x4d9d18=_0x73db9b[_0x7c94f3(0x21d)](_0x289a7e=>_0x289a7e[_0x7c94f3(0x217)]==='segment-batch'||_0x289a7e[_0x7c94f3(0x217)]===_0x7c94f3(0x1b6)),_0x4daae8=_0x73db9b[_0x7c94f3(0x21d)](_0x295843=>_0x295843[_0x7c94f3(0x217)]===_0x7c94f3(0x16f)),_0x4324eb=_0x4daae8[_0x7c94f3(0x1e3)](_0x35b23c=>({'journeyBundleId':_0x35b23c['attributes'][_0x7c94f3(0x1b3)],'versionNumber':_0x35b23c['attributes'][_0x7c94f3(0x1b0)],'id':_0x35b23c['id'],'entity':_0x35b23c})),_0xcafff1=deduplicateJourneysByBundle(_0x4324eb);for(const _0x97e519 of _0x407945){const _0xf4906f=this['buildTreeNodesForFolder'](_0x97e519['id'],_0x3d1685);_0x6f6004[_0x7c94f3(0x1d5)]({'type':'folder','id':_0x97e519['id'],'name':_0x97e519[_0x7c94f3(0x17a)]['name'],'children':_0xf4906f[_0x7c94f3(0x1d2)]>0x0?_0xf4906f:undefined,'metadata':{'description':_0x97e519[_0x7c94f3(0x17a)][_0x7c94f3(0x190)]??undefined,'folderCount':_0xf4906f[_0x7c94f3(0x21d)](_0x436438=>_0x436438[_0x7c94f3(0x217)]===_0x7c94f3(0x1dc))[_0x7c94f3(0x1d2)],'segmentCount':_0xf4906f[_0x7c94f3(0x21d)](_0x23dddb=>_0x23dddb['type']==='segment')[_0x7c94f3(0x1d2)],'journeyCount':_0xf4906f[_0x7c94f3(0x21d)](_0x28452b=>_0x28452b[_0x7c94f3(0x217)]===_0x7c94f3(0x16f))[_0x7c94f3(0x1d2)],'createdAt':_0x97e519[_0x7c94f3(0x17a)][_0x7c94f3(0x20a)],'updatedAt':_0x97e519[_0x7c94f3(0x17a)]['updatedAt']}});}for(const _0x268169 of _0x4d9d18){_0x6f6004['push']({'type':_0x7c94f3(0x1b2),'id':_0x268169['id'],'name':_0x268169[_0x7c94f3(0x17a)][_0x7c94f3(0x1fa)],'population':_0x268169['attributes'][_0x7c94f3(0x22f)],'metadata':{'description':_0x268169[_0x7c94f3(0x17a)][_0x7c94f3(0x190)]??undefined,'createdAt':_0x268169[_0x7c94f3(0x17a)]['createdAt'],'updatedAt':_0x268169[_0x7c94f3(0x17a)]['updatedAt']}});}for(const _0x354877 of _0xcafff1){const _0x5e1a60=_0x354877[_0x7c94f3(0x1af)];_0x6f6004[_0x7c94f3(0x1d5)]({'type':_0x7c94f3(0x16f),'id':_0x5e1a60['id'],'name':_0x5e1a60['attributes'][_0x7c94f3(0x19c)]??_0x5e1a60[_0x7c94f3(0x17a)]['name']??'','state':parseJourneyState(_0x5e1a60['attributes'][_0x7c94f3(0x18d)]),'metadata':{}});}return _0x6f6004;}async['pullSegments'](_0x33dfe8,_0xc5b60a={}){const _0x4b874b=a166_0x1f67f1,_0x193f56=this[_0x4b874b(0x1ae)](),_0x580075={'segment':_0x193f56['segment'],'journey':_0x193f56[_0x4b874b(0x16f)],'user':_0x193f56['user'],'connection':_0x193f56[_0x4b874b(0x1ed)]};return a166_0x26cf0c(_0x580075,_0x33dfe8,_0xc5b60a);}async[a166_0x1f67f1(0x1b8)](_0x469b85,_0x17b182,_0x2cf356){const _0x1dec4c=a166_0x1f67f1,_0x195e74=[_0x1dec4c(0x193),_0x1dec4c(0x1c3),_0x1dec4c(0x1a1),_0x1dec4c(0x185),_0x1dec4c(0x1b7),'imported_batch'];let _0xda8cbf=![];try{const _0x232588=this['getTdxInstance'](),_0x72d7d0=await this[_0x1dec4c(0x1cc)](_0x469b85['name']);_0xda8cbf=await _0x232588[_0x1dec4c(0x1b1)][_0x1dec4c(0x215)](_0x72d7d0);}catch{}const _0x3812ae={'enabled':_0xda8cbf};if(_0x469b85[_0x1dec4c(0x1b1)]){const _0xff05fa=_0x469b85['realtime'];_0xff05fa[_0x1dec4c(0x177)]&&_0xff05fa[_0x1dec4c(0x177)][_0x1dec4c(0x1d2)]>0x0&&(_0x2cf356('Validating\x20RT\x20event\x20source\x20tables...'),_0x3812ae['events']=await Promise[_0x1dec4c(0x202)](_0xff05fa['events'][_0x1dec4c(0x1e3)](async _0x2d428f=>{const _0x205708=_0x1dec4c,_0x54361c={'name':_0x2d428f[_0x205708(0x1fa)],'sourceTable':_0x2d428f['source_table']};if(_0x2d428f[_0x205708(0x1dd)]){const _0x12410a=_0x2d428f[_0x205708(0x1dd)][_0x205708(0x1ab)]('.'),_0x5064c8=_0x12410a[0x0]||'',_0x2c8617=_0x12410a[0x1]||_0x12410a[0x0]||'';if(_0x5064c8&&_0x2c8617){const _0xd085c0=await _0x17b182(generateSchemaValidationSQL(_0x5064c8,_0x2c8617));_0x54361c[_0x205708(0x208)]=!_0xd085c0['error'],_0x54361c['sourceTableError']=_0xd085c0[_0x205708(0x186)];}}return _0x54361c;}))),_0xff05fa[_0x1dec4c(0x17a)]&&_0xff05fa['attributes']['length']>0x0&&(_0x3812ae[_0x1dec4c(0x17a)]=_0xff05fa[_0x1dec4c(0x17a)]['map'](_0x8419c5=>({'name':_0x8419c5[_0x1dec4c(0x1fa)],'type':_0x8419c5[_0x1dec4c(0x217)],'valid':_0x195e74[_0x1dec4c(0x1c4)](_0x8419c5[_0x1dec4c(0x217)])}))),_0xff05fa[_0x1dec4c(0x1a5)]&&(_0x3812ae[_0x1dec4c(0x21c)]={'primaryKey':_0xff05fa['id_stitching']['primary_key'],'stitchingKeys':_0xff05fa[_0x1dec4c(0x1a5)][_0x1dec4c(0x192)]});}return _0x469b85[_0x1dec4c(0x19e)]&&_0x469b85[_0x1dec4c(0x19e)]['length']>0x0&&(_0x3812ae['personalizationServices']=_0x469b85[_0x1dec4c(0x19e)][_0x1dec4c(0x1e3)](_0xbb7603=>({'name':_0xbb7603[_0x1dec4c(0x1fa)],'valid':!!_0xbb7603['name']}))),_0x3812ae;}async[a166_0x1f67f1(0x1ec)](_0x483f9b,_0x2b7629){const _0x1c8432=a166_0x1f67f1,_0x26bf49=this['getTdxInstance'](),_0x5b7332=await _0x26bf49[_0x1c8432(0x1b1)]['isEnabled'](_0x2b7629);if(!_0x5b7332)return;try{const _0x53ed3e=await _0x26bf49[_0x1c8432(0x1b1)][_0x1c8432(0x218)](_0x2b7629);_0x53ed3e&&Object[_0x1c8432(0x210)](_0x53ed3e)[_0x1c8432(0x1d2)]>0x0&&(_0x483f9b[_0x1c8432(0x1b1)]={},_0x53ed3e[_0x1c8432(0x1cd)]&&_0x53ed3e[_0x1c8432(0x1cd)][_0x1c8432(0x1d2)]>0x0&&(_0x483f9b[_0x1c8432(0x1b1)][_0x1c8432(0x177)]=_0x53ed3e[_0x1c8432(0x1cd)]['map'](_0x4ce242=>({'name':_0x4ce242[_0x1c8432(0x1ef)],'source_table':_0x4ce242[_0x1c8432(0x223)]+'.'+_0x4ce242['table']}))),_0x53ed3e[_0x1c8432(0x171)]&&_0x53ed3e[_0x1c8432(0x171)][_0x1c8432(0x1d2)]>0x0&&(_0x483f9b[_0x1c8432(0x1b1)][_0x1c8432(0x17a)]=_0x53ed3e[_0x1c8432(0x171)][_0x1c8432(0x1e3)](_0x5b1d7a=>({'name':_0x5b1d7a[_0x1c8432(0x1fa)],'type':'imported_batch','source_field':_0x5b1d7a[_0x1c8432(0x17e)]}))),_0x53ed3e['keyColumns']&&_0x53ed3e[_0x1c8432(0x188)]['length']>0x0&&(_0x483f9b['realtime']['id_stitching']={'primary_key':_0x53ed3e['keyColumns'][0x0][_0x1c8432(0x1fa)],'stitching_keys':_0x53ed3e[_0x1c8432(0x188)][_0x1c8432(0x206)](0x1)[_0x1c8432(0x1e3)](_0x18a345=>_0x18a345[_0x1c8432(0x1fa)])}));}catch(_0xdfd167){logger[_0x1c8432(0x1e0)]('RT\x20config\x20fetch\x20failed\x20for\x20parent\x20segment\x20'+_0x2b7629+':\x20'+_0xdfd167);}try{const _0x28a082=await _0x26bf49[_0x1c8432(0x174)][_0x1c8432(0x1b7)](_0x2b7629);_0x28a082&&_0x28a082[_0x1c8432(0x1d2)]>0x0&&(_0x483f9b['personalization_services']=_0x28a082[_0x1c8432(0x1e3)](_0x467335=>({'name':_0x467335[_0x1c8432(0x1fa)],..._0x467335[_0x1c8432(0x190)]&&{'description':_0x467335['description']},..._0x467335[_0x1c8432(0x21f)]&&{'trigger_event':_0x467335[_0x1c8432(0x21f)]},..._0x467335['sections']&&_0x467335[_0x1c8432(0x205)][_0x1c8432(0x1d2)]>0x0&&{'sections':_0x467335[_0x1c8432(0x205)][_0x1c8432(0x1e3)](_0x2830f4=>({'name':_0x2830f4['name'],..._0x2830f4[_0x1c8432(0x168)]&&{'criteria':_0x2830f4['criteria']},..._0x2830f4['attributes']&&_0x2830f4[_0x1c8432(0x17a)][_0x1c8432(0x1d2)]>0x0&&{'attributes':_0x2830f4[_0x1c8432(0x17a)]},..._0x2830f4['batch_segments']&&_0x2830f4[_0x1c8432(0x1f1)][_0x1c8432(0x1d2)]>0x0&&{'batch_segments':_0x2830f4[_0x1c8432(0x1f1)]}}))}})));}catch(_0x2fa89f){logger[_0x1c8432(0x1e0)](_0x1c8432(0x16b)+_0x2b7629+':\x20'+_0x2fa89f);}}[a166_0x1f67f1(0x220)](_0x31f399){const _0x118e2b=a166_0x1f67f1,_0x61c754={};_0x31f399[_0x118e2b(0x177)]&&_0x31f399[_0x118e2b(0x177)][_0x118e2b(0x1d2)]>0x0&&(_0x61c754[_0x118e2b(0x1cd)]=_0x31f399[_0x118e2b(0x177)][_0x118e2b(0x21d)](_0x3e4618=>_0x3e4618[_0x118e2b(0x1dd)])['map'](_0x405aff=>{const _0x35b8e6=_0x118e2b,_0x12173a=_0x405aff['source_table'][_0x35b8e6(0x1ab)]('.');return{'database':_0x12173a[0x0]||'','table':_0x12173a[0x1]||_0x12173a[0x0]||''};}));_0x31f399[_0x118e2b(0x17a)]&&_0x31f399[_0x118e2b(0x17a)][_0x118e2b(0x1d2)]>0x0&&(_0x61c754['batchAttributes']=_0x31f399[_0x118e2b(0x17a)][_0x118e2b(0x1e3)](_0x8e8a7a=>({'column':_0x8e8a7a[_0x118e2b(0x18a)]||_0x8e8a7a[_0x118e2b(0x1fa)],'name':_0x8e8a7a['name']})));if(_0x31f399[_0x118e2b(0x1a5)]){const _0x5d7661=[{'name':_0x31f399['id_stitching'][_0x118e2b(0x1ba)]}];if(_0x31f399[_0x118e2b(0x1a5)][_0x118e2b(0x192)])for(const _0x2b336b of _0x31f399[_0x118e2b(0x1a5)]['stitching_keys']){_0x5d7661[_0x118e2b(0x1d5)]({'name':_0x2b336b});}_0x61c754[_0x118e2b(0x188)]=_0x5d7661;}return _0x61c754;}async[a166_0x1f67f1(0x207)](_0x19fac4,_0x29b3c4,_0x4d5c04){const _0x3655d5=a166_0x1f67f1;let _0x5d647c=[];try{_0x5d647c=await _0x19fac4[_0x3655d5(0x174)][_0x3655d5(0x1b7)](_0x29b3c4);}catch{}const _0x4ea5cb=new Map(_0x5d647c[_0x3655d5(0x1e3)](_0x5e881f=>[_0x5e881f[_0x3655d5(0x1fa)],_0x5e881f])),_0x464ab8=new Map(_0x4d5c04[_0x3655d5(0x1e3)](_0x47171b=>[_0x47171b[_0x3655d5(0x1fa)],_0x47171b]));for(const _0x256ac6 of _0x4d5c04){const _0x35c62c=_0x4ea5cb[_0x3655d5(0x1d4)](_0x256ac6[_0x3655d5(0x1fa)]),_0x48b543={'name':_0x256ac6['name'],..._0x256ac6['description']&&{'description':_0x256ac6[_0x3655d5(0x190)]},..._0x256ac6[_0x3655d5(0x21f)]&&{'trigger_event':_0x256ac6[_0x3655d5(0x21f)]},..._0x256ac6[_0x3655d5(0x205)]&&{'sections':_0x256ac6[_0x3655d5(0x205)][_0x3655d5(0x1e3)](_0x3748cd=>({'name':_0x3748cd['name'],'criteria':_0x3748cd['criteria']||'','attributes':_0x3748cd['attributes']||[],'batch_segments':_0x3748cd['batch_segments']||[]}))}};_0x35c62c?.['id']?await _0x19fac4[_0x3655d5(0x174)]['update'](_0x29b3c4,_0x35c62c['id'],_0x48b543):await _0x19fac4[_0x3655d5(0x174)][_0x3655d5(0x1bb)](_0x29b3c4,_0x48b543);}for(const _0x564975 of _0x5d647c){!_0x464ab8[_0x3655d5(0x22c)](_0x564975['name'])&&_0x564975['id']&&await _0x19fac4[_0x3655d5(0x174)][_0x3655d5(0x214)](_0x29b3c4,_0x564975['id']);}}[a166_0x1f67f1(0x1ae)](){const _0x50217c=a166_0x1f67f1;return this[_0x50217c(0x221)];}}
1
+ const a166_0x18003a=a166_0x20fc;(function(_0x35e22f,_0x412824){const _0x5d45e5=a166_0x20fc,_0xb4e3b8=_0x35e22f();while(!![]){try{const _0x4122c1=parseInt(_0x5d45e5(0x21d))/0x1+-parseInt(_0x5d45e5(0x181))/0x2*(-parseInt(_0x5d45e5(0x1d0))/0x3)+-parseInt(_0x5d45e5(0x1b3))/0x4+parseInt(_0x5d45e5(0x14d))/0x5*(-parseInt(_0x5d45e5(0x169))/0x6)+-parseInt(_0x5d45e5(0x180))/0x7*(-parseInt(_0x5d45e5(0x202))/0x8)+-parseInt(_0x5d45e5(0x1f6))/0x9+parseInt(_0x5d45e5(0x185))/0xa*(-parseInt(_0x5d45e5(0x1dd))/0xb);if(_0x4122c1===_0x412824)break;else _0xb4e3b8['push'](_0xb4e3b8['shift']());}catch(_0x5a8e6d){_0xb4e3b8['push'](_0xb4e3b8['shift']());}}}(a166_0x483d,0xd10a8));import{CDPApiClient}from'./client/cdp-api-client.js';import{TrinoApiClient}from'./client/trino-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function a166_0x20fc(_0x4db190,_0x390927){_0x4db190=_0x4db190-0x142;const _0x483d2c=a166_0x483d();let _0x20fc07=_0x483d2c[_0x4db190];return _0x20fc07;}import{deduplicateJourneysByBundle,entityToJourneyListItem,parseJourneyState}from'./journey.js';import{parsePath}from'./segment/segment-path-parser.js';import{pullSegments as a166_0x122b09}from'./segment/pull-workflow.js';import{buildSegmentNameToIdMap,createSegmentIdResolver,extractRootFolderId}from'./segment/push-workflow.js';import{parseSegmentYamlFile,yamlRuleToApi,collectSegmentRefsFromRule,resolveRuleSegmentIds}from'./segment/child-segment-yaml.js';import{apiToDef,defToApi,serializeDef,parseDef}from'./segment/parent-segment-yaml.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{DEFAULT_TIME_RANGE,DEFAULT_SAMPLE_LIMIT,generateSchemaValidationSQL,generateMasterCountSQL,generateMasterSampleSQL,generateAttributeCoverageSQL,generateBehaviorStatsSQL,generateAttributeSampleSQL,generateBehaviorSampleSQL,generateEnrichedSQL,generateAttributeSchemaSQL,generateBehaviorSchemaSQL,findAttributeByName,findBehaviorByName,getAttributeColumns,getBehaviorColumns}from'./segment/parent-segment-preview.js';import{Logger}from'../utils/logger/index.js';function a166_0x483d(){const _0xa105f8=['updatedAt','stitching_keys','single','segment-batch','test','isAbsolute','entityToFolder','RT\x20config\x20fetch\x20failed\x20for\x20parent\x20segment\x20','connection','find','Enriched\x20query:\x20','Segment\x20\x27','getSegmentSQLFromYaml','source_table','SHOW\x20TABLES\x20IN\x20','getParentSegmentSQL','createdAt','primary_key','table','parent_key','3lcSIMB','eventTables','behaviors','resolvePathToResource','idStitching','updateConfig','folder','detectResourceType','Validating\x20all\x20attributes\x20in\x20parallel...','interval','\x27:\x20','\x27\x20not\x20found\x20in\x20parent\x20segment','Child\x20segment\x20not\x20found:\x20','121IRJIxd','groupingName','rule','Validating\x20master\x20table:\x20','keyColumns','getActivation','includes','journey','\x27\x20not\x20found\x20in\x20','detectResourceTypeInFolder','personalization','listEntitiesByFolder','createParent','sections','Folder\x20\x27','RT\x20event\x20\x27','allValid','join','traversePath','parentFolderId','previewParentYaml','batch_segments','attributes','name','push','2703411fmxtuu','counter','tdx.sdk.segment','length','row_count','personalizationServices','customerPercent','description','getTdxInstance','listFields','getSegment','then','88ejNJZl','segmentFolderId','cdp_audience_','runParentSegment','id_stitching','getFolder','getParentFull','matrixColumnName','entityToSegment','getConfig','ordered_set','schemaValid','runParent','criteria','journeyBundleId','getRootFolderId','resolveParentId','updateSegment','entity','enrichDefWithRealtimeAndPersonalization','realtime','executeQuery','listParents','rowCount','parentFolder','Fetching\x20sample\x20data\x20for:\x20','sampleData','676919SyzkqD','segment-realtime','pullSegments','getSegmentEntity','getEntityParentFolderId','listUnifiedWithJourneys','trinoClient','data','getSegmentSQL','split','listSegments','getParentSegment','Fetching\x20enriched\x20master\x20data...','attribute','segment','versionNumber','1154965NHXkJD','isEnabled','column','relationships','Validating\x20RT\x20event\x20source\x20tables...','message','INVALID_ARGUMENT','createSegment','validateRealtimeConfig','sourceTableError','getAudienceAttributes','deleteActivation','Resource\x20\x27','Validating\x20all\x20behaviors\x20in\x20parallel...','slice','Validating\x20attribute:\x20','error','getOutputDatabaseName','getSegmentFolder','getParentSegmentFull','createActivation','Validating\x20behavior:\x20','behavior','totalEvents','trigger_event','population','getParent','createFolder','18CkJMXH','isArray','realtimeDefToConfig','user','get','coveragePercent','Personalization\x20services\x20fetch\x20failed\x20for\x20parent\x20segment\x20','parentDatabaseName','client','Fetching\x20master\x20sample\x20data...','map','type','\x27\x20not\x20found\x20in\x20path','listFolders','list','Calculating\x20statistics\x20for:\x20','createJourneySegment','\x20in\x20parent\x20','\x27\x20not\x20found','matchedCount','batchAttributes','parent','onProgress','799729oZUljD','3314454SoBsRm','parentTableName','imported_batch','source','48820UquaOj','listActivations','folder-segment','create','resolveFolderId','master','updateActivation','Attribute\x20\x27','enriched','delete','update','Table','personalization_services','SEGMENT_NOT_FOUND','Master\x20table:\x20','child_key','pullParentYaml','customers','schemaError','schema','validateParentYaml','all','buildTreeNodesForFolder','listOutputTables','parent\x20segment','getParentSQL','debug','getSegmentSQLFromRule','customers_with_events','string','source_field','listSegmentFolders','ambiguous','updateParentSegment','getAudienceBehaviors','journeyBundleName','sourceTableValid','some','buildTreeFromEntities','Behavior\x20\x27','events','listRecursive','updateParent','resolveParentIdOrName','syncPersonalizationServices','customersWithEvents','6750284qHsDVh','filter','Folder\x20not\x20found:\x20','database','updateSegmentById','parentColumn','catch','pushParentYaml','Parent\x20segment\x20not\x20found:\x20'];a166_0x483d=function(){return _0xa105f8;};return a166_0x483d();}const logger=Logger['of'](a166_0x18003a(0x1f8));export class SegmentSDK{[a166_0x18003a(0x171)];[a166_0x18003a(0x143)];constructor(_0x558796){this['client']=new CDPApiClient(_0x558796),this['trinoClient']=new TrinoApiClient(_0x558796);}async[a166_0x18003a(0x218)](){const _0x313b84=a166_0x18003a;return await this[_0x313b84(0x171)]['listParentSegments']();}async[a166_0x18003a(0x167)](_0x3469b6){const _0x45f370=a166_0x18003a;return await this['client'][_0x45f370(0x148)](_0x3469b6);}async[a166_0x18003a(0x211)](_0x3b003e){const _0x474de7=await this['getParent'](_0x3b003e);return extractRootFolderId(_0x474de7);}async[a166_0x18003a(0x147)](_0x31ebfd){const _0x4f17f4=a166_0x18003a;return await this['client'][_0x4f17f4(0x147)](_0x31ebfd);}async[a166_0x18003a(0x200)](_0x1b629d,_0x46f5a1){const _0x509621=a166_0x18003a;return await this['client'][_0x509621(0x200)](_0x1b629d,_0x46f5a1);}async[a166_0x18003a(0x220)](_0xedcf8b){const _0x4844db=a166_0x18003a;return await this[_0x4844db(0x171)][_0x4844db(0x220)](_0xedcf8b);}async[a166_0x18003a(0x176)](_0x9e98b7){const _0x281fad=a166_0x18003a;return await this['client'][_0x281fad(0x1a4)](_0x9e98b7);}async[a166_0x18003a(0x207)](_0x49be7a){const _0x2cbbe2=a166_0x18003a;return await this[_0x2cbbe2(0x171)][_0x2cbbe2(0x15f)](_0x49be7a);}async[a166_0x18003a(0x186)](_0x10d904,_0x333ee1){const _0x254767=a166_0x18003a;return await this[_0x254767(0x171)][_0x254767(0x186)](_0x10d904,_0x333ee1);}async['getActivation'](_0x41be0d,_0x36f770,_0x5b8c30){const _0x47e63e=a166_0x18003a;return await this[_0x47e63e(0x171)][_0x47e63e(0x1e2)](_0x41be0d,_0x36f770,_0x5b8c30);}async[a166_0x18003a(0x161)](_0x3fd6b1,_0x2d109c,_0x79a8ba){return await this['client']['createActivation'](_0x3fd6b1,_0x2d109c,_0x79a8ba);}async['updateActivation'](_0x3fefaf,_0x4b4c6d,_0x5009f5,_0x145946){const _0x256a17=a166_0x18003a;return await this[_0x256a17(0x171)][_0x256a17(0x18b)](_0x3fefaf,_0x4b4c6d,_0x5009f5,_0x145946);}async[a166_0x18003a(0x158)](_0x169f82,_0x2d8120,_0x4c9345){const _0x5869b1=a166_0x18003a;return await this['client'][_0x5869b1(0x158)](_0x169f82,_0x2d8120,_0x4c9345);}async[a166_0x18003a(0x19e)](_0x4a5933){const _0x572d59=a166_0x18003a;return await this[_0x572d59(0x171)][_0x572d59(0x1cb)](_0x4a5933);}[a166_0x18003a(0x15e)](_0x392d55){const _0x462f33=a166_0x18003a;return _0x462f33(0x204)+_0x392d55;}async[a166_0x18003a(0x19c)](_0x48d46e){const _0xb8fdde=a166_0x18003a,_0xab6101=this[_0xb8fdde(0x15e)](_0x48d46e),_0xe0abe9=_0xb8fdde(0x1ca)+_0xab6101,_0x2dfc39=await this[_0xb8fdde(0x143)][_0xb8fdde(0x217)](_0xe0abe9,{'catalog':'td','schema':_0xab6101});return _0x2dfc39[_0xb8fdde(0x144)][_0xb8fdde(0x173)](_0x532a60=>({'name':_0x532a60['Table'],'type':_0x532a60[_0xb8fdde(0x190)]===_0xb8fdde(0x196)?_0xb8fdde(0x196):'behavior'}));}async['getBehaviorNames'](_0x36d50a){const _0x2cfc5f=a166_0x18003a,_0x54c45f=await this[_0x2cfc5f(0x171)]['getAudienceBehaviors'](_0x36d50a);return _0x54c45f['map'](_0x35f757=>_0x35f757[_0x2cfc5f(0x1f4)]);}async[a166_0x18003a(0x145)](_0x5b06ee,_0x4b9f91){const _0x4234c7=a166_0x18003a;return await this[_0x4234c7(0x171)][_0x4234c7(0x145)](_0x5b06ee,_0x4b9f91);}async[a166_0x18003a(0x1a0)](_0x19a438,_0xfdea24){const _0x3e8574=a166_0x18003a;return await this[_0x3e8574(0x171)][_0x3e8574(0x1a0)](_0x19a438,_0xfdea24);}async[a166_0x18003a(0x1c8)](_0x4ca50f,_0x5e77f7,_0x38b987){const _0x3d7c68=a166_0x18003a,_0x50f7ff=parseSegmentYamlFile(_0x4ca50f);if(!_0x50f7ff[_0x3d7c68(0x1df)])throw new SDKError(ErrorCode[_0x3d7c68(0x153)],'YAML\x20file\x20has\x20no\x20rule\x20definition');const _0x20ad29=await this[_0x3d7c68(0x212)](_0x5e77f7);let _0x1b0608=_0x50f7ff[_0x3d7c68(0x1df)];const _0x211135=collectSegmentRefsFromRule(_0x50f7ff[_0x3d7c68(0x1df)]);if(_0x211135[_0x3d7c68(0x1f9)]>0x0){const _0x509bff=await this['listSegments'](_0x20ad29),_0x153b3c=buildSegmentNameToIdMap(_0x509bff),_0xaa6ac2=createSegmentIdResolver(_0x153b3c,_0x38b987);_0x1b0608=await resolveRuleSegmentIds(_0x1b0608,_0xaa6ac2);}const _0x4d40f2=yamlRuleToApi(_0x1b0608);return await this['client'][_0x3d7c68(0x1a0)](_0x20ad29,_0x4d40f2);}async[a166_0x18003a(0x212)](_0x1767d0){const _0x57c684=a166_0x18003a,_0xfd45d6=await this[_0x57c684(0x218)](),_0x5c4b86=_0xfd45d6['find'](_0x42b9c0=>_0x42b9c0[_0x57c684(0x1f3)]['name']===_0x1767d0);if(!_0x5c4b86)throw new SDKError(ErrorCode[_0x57c684(0x192)],_0x57c684(0x1bb)+_0x1767d0);return _0x5c4b86['id'];}async[a166_0x18003a(0x20e)](_0x2dbd5d){const _0x4960b5=a166_0x18003a;let _0x2da3f7=_0x2dbd5d;return!/^\d+$/[_0x4960b5(0x1c0)](_0x2dbd5d)&&(_0x2da3f7=await this['resolveParentId'](_0x2dbd5d)),await this['client'][_0x4960b5(0x205)](_0x2da3f7);}async['resolveSegmentId'](_0x41154b,_0x14a90e){const _0x14f866=a166_0x18003a,_0x5e4a21=await this[_0x14f866(0x147)](_0x41154b),_0xa5a97d=_0x5e4a21['find'](_0x23dae0=>_0x23dae0[_0x14f866(0x1f4)]===_0x14a90e);if(!_0xa5a97d)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x14f866(0x1dc)+_0x14a90e+'\x20in\x20parent\x20'+_0x41154b);return _0xa5a97d['id'];}async['resolveFolderId'](_0xce087d,_0x1c7c83){const _0x3844f1=a166_0x18003a,_0x21c73e=await this['listFolders'](_0xce087d),_0x4e0af5=_0x21c73e[_0x3844f1(0x1c5)](_0xf38f7f=>_0xf38f7f[_0x3844f1(0x1f4)]===_0x1c7c83);if(!_0x4e0af5)throw new SDKError(ErrorCode[_0x3844f1(0x192)],_0x3844f1(0x1b5)+_0x1c7c83+_0x3844f1(0x17a)+_0xce087d);return _0x4e0af5['id'];}async[a166_0x18003a(0x1ff)](_0x2181d1){const _0x5d8511=a166_0x18003a,_0x50b250=await this[_0x5d8511(0x1b0)](_0x2181d1),[_0x279b6c,_0x30c08a]=await Promise[_0x5d8511(0x19a)]([this[_0x5d8511(0x171)][_0x5d8511(0x157)](_0x50b250),this['client'][_0x5d8511(0x1a7)](_0x50b250)]),_0x23cb19=[];for(const _0x1b8092 of _0x279b6c){_0x23cb19[_0x5d8511(0x1f5)]({'name':_0x1b8092[_0x5d8511(0x1f4)],'type':_0x1b8092[_0x5d8511(0x174)],'source':_0x5d8511(0x14a),'parentDatabaseName':_0x1b8092['parentDatabaseName'],'parentTableName':_0x1b8092[_0x5d8511(0x182)],'parentColumn':_0x1b8092[_0x5d8511(0x1b8)],'groupingName':_0x1b8092[_0x5d8511(0x1de)]??undefined,'matrixColumnName':_0x1b8092[_0x5d8511(0x209)]});}for(const _0x3c230a of _0x30c08a){const _0x19461e=_0x3c230a['name'];if(_0x3c230a[_0x5d8511(0x198)]&&Array[_0x5d8511(0x16a)](_0x3c230a['schema']))for(const _0x16df07 of _0x3c230a['schema']){_0x16df07['name']&&_0x16df07[_0x5d8511(0x174)]&&_0x23cb19[_0x5d8511(0x1f5)]({'name':_0x19461e+'.'+_0x16df07[_0x5d8511(0x1f4)],'type':_0x16df07[_0x5d8511(0x174)],'source':_0x5d8511(0x163),'behaviorName':_0x19461e,'parentDatabaseName':_0x3c230a[_0x5d8511(0x170)],'parentTableName':_0x3c230a['parentTableName'],'parentColumn':_0x16df07[_0x5d8511(0x1b8)],'matrixColumnName':_0x16df07[_0x5d8511(0x209)],'matrixTableName':_0x3c230a['matrixTableName']});}}return _0x23cb19;}async[a166_0x18003a(0x1e9)](_0x1124bd){return await this['client']['createParentSegment'](_0x1124bd);}async['updateParent'](_0xed4107,_0x16f00d){const _0x5778a5=a166_0x18003a,_0x473506=await this[_0x5778a5(0x1b0)](_0xed4107);return await this['client'][_0x5778a5(0x1a6)](_0x473506,_0x16f00d);}async[a166_0x18003a(0x208)](_0x5dfdd7){const _0x4cc6ac=a166_0x18003a,_0x5f0d86=await this['resolveParentIdOrName'](_0x5dfdd7);return await this[_0x4cc6ac(0x171)][_0x4cc6ac(0x160)](_0x5f0d86);}async[a166_0x18003a(0x195)](_0x5cfb8d){const _0x25bd97=a166_0x18003a,_0x576088=await this[_0x25bd97(0x208)](_0x5cfb8d),_0x3e77ca=apiToDef(_0x576088);return await this['enrichDefWithRealtimeAndPersonalization'](_0x3e77ca,_0x576088['id']),serializeDef(_0x3e77ca);}async[a166_0x18003a(0x1ba)](_0x486573){const _0x23633f=a166_0x18003a,_0x1d4e92=typeof _0x486573==='string'?parseDef(_0x486573):_0x486573,_0xf4a03b=defToApi(_0x1d4e92);let _0x3f593a=null,_0x2fef29='';try{_0x3f593a=await this[_0x23633f(0x208)](_0x1d4e92[_0x23633f(0x1f4)]);const _0x3ad060=apiToDef(_0x3f593a);await this['enrichDefWithRealtimeAndPersonalization'](_0x3ad060,_0x3f593a['id']),_0x2fef29=serializeDef(_0x3ad060);}catch{}const _0x94f2e3=serializeDef(_0x1d4e92),_0x5e6fb0=generateDiff(_0x2fef29,_0x94f2e3),_0x54357a=formatDiffWithColors(_0x5e6fb0),_0x30d955=_0x3f593a===null,_0x1a3785=hasChanges(_0x5e6fb0),_0x425d26={'isNew':_0x30d955,'id':_0x3f593a?.['id']||'','name':_0x1d4e92['name'],'diff':_0x5e6fb0,'diffFormatted':_0x54357a,'hasChanges':_0x1a3785},_0x16eeef=async()=>{const _0x153ff9=_0x23633f;let _0x13c3ea;_0x30d955?_0x13c3ea=await this[_0x153ff9(0x1e9)](_0xf4a03b):_0x13c3ea=await this[_0x153ff9(0x1af)](_0x3f593a['id'],_0xf4a03b);const _0x32b728=_0x13c3ea['id']||_0x3f593a?.['id']||'';if(_0x1d4e92[_0x153ff9(0x216)]&&_0x32b728){const _0x199639=this['getTdxInstance'](),_0xc7df3=this[_0x153ff9(0x16b)](_0x1d4e92[_0x153ff9(0x216)]);await _0x199639['realtime'][_0x153ff9(0x1d5)](_0x32b728,_0xc7df3);}if(_0x1d4e92[_0x153ff9(0x191)]&&_0x1d4e92[_0x153ff9(0x191)][_0x153ff9(0x1f9)]>0x0&&_0x32b728){const _0x4ec839=this[_0x153ff9(0x1fe)]();await this[_0x153ff9(0x1b1)](_0x4ec839,_0x32b728,_0x1d4e92[_0x153ff9(0x191)]);}return _0x13c3ea;};return{..._0x425d26,'apply':_0x16eeef};}async[a166_0x18003a(0x199)](_0x324e24,_0x72f672={}){const _0x5082ef=a166_0x18003a,_0x4292aa=typeof _0x324e24==='string'?parseDef(_0x324e24):_0x324e24,_0x54c538=[];let _0x4d9bf5=!![];const _0x590917=_0x1bdae5=>_0x72f672[_0x5082ef(0x17f)]?.(_0x1bdae5),_0x4bc0c5={'name':_0x4292aa[_0x5082ef(0x1f4)],'master':{'database':_0x4292aa[_0x5082ef(0x18a)][_0x5082ef(0x1b6)],'table':_0x4292aa[_0x5082ef(0x18a)][_0x5082ef(0x1ce)],'schemaValid':![]},'attributes':[],'behaviors':[],'errors':_0x54c538,'allValid':!![]},_0x3b86bc=async _0x232e0f=>{const _0xa91d2e=_0x5082ef;try{const _0x16fb0d=await this['trinoClient'][_0xa91d2e(0x217)](_0x232e0f);return{'data':_0x16fb0d[_0xa91d2e(0x144)]};}catch(_0x2506d2){const _0x53cce1=_0x2506d2 instanceof Error?_0x2506d2[_0xa91d2e(0x152)]:String(_0x2506d2);return{'data':[],'error':_0x53cce1};}};if(_0x72f672['realtime']){_0x4bc0c5['realtime']=await this[_0x5082ef(0x155)](_0x4292aa,_0x3b86bc,_0x590917);if(_0x4bc0c5[_0x5082ef(0x216)][_0x5082ef(0x1ad)])for(const _0x48b9cd of _0x4bc0c5[_0x5082ef(0x216)][_0x5082ef(0x1ad)]){_0x48b9cd[_0x5082ef(0x156)]&&(_0x54c538['push'](_0x5082ef(0x1ec)+_0x48b9cd[_0x5082ef(0x1f4)]+_0x5082ef(0x1da)+_0x48b9cd['sourceTableError']),_0x4d9bf5=![]);}return _0x4bc0c5['master'][_0x5082ef(0x20d)]=!![],_0x4bc0c5['allValid']=_0x4d9bf5,_0x4bc0c5;}_0x590917(_0x5082ef(0x1e0)+_0x4292aa[_0x5082ef(0x18a)][_0x5082ef(0x1b6)]+'.'+_0x4292aa['master'][_0x5082ef(0x1ce)]);const _0x1d8036=generateSchemaValidationSQL(_0x4292aa[_0x5082ef(0x18a)][_0x5082ef(0x1b6)],_0x4292aa[_0x5082ef(0x18a)][_0x5082ef(0x1ce)]),_0x4cdea6=await _0x3b86bc(_0x1d8036);if(_0x4cdea6['error'])_0x4bc0c5[_0x5082ef(0x18a)][_0x5082ef(0x20d)]=![],_0x4bc0c5['master'][_0x5082ef(0x197)]=_0x4cdea6['error'],_0x54c538[_0x5082ef(0x1f5)](_0x5082ef(0x193)+_0x4cdea6[_0x5082ef(0x15d)]),_0x4d9bf5=![];else{_0x4bc0c5[_0x5082ef(0x18a)][_0x5082ef(0x20d)]=!![],_0x590917('Counting\x20master\x20table\x20rows...');const _0x270653=await _0x3b86bc(generateMasterCountSQL(_0x4292aa));!_0x270653[_0x5082ef(0x15d)]&&_0x270653[_0x5082ef(0x144)]['length']>0x0&&(_0x4bc0c5['master'][_0x5082ef(0x219)]=_0x270653[_0x5082ef(0x144)][0x0][_0x5082ef(0x1fa)]);}if(_0x72f672['master'])return _0x4bc0c5[_0x5082ef(0x1ed)]=_0x4d9bf5,_0x4bc0c5;const _0x3905a9=async _0x481970=>{const _0x7d4be7=_0x5082ef,_0x148098={'name':_0x481970['name'],'database':_0x481970['source'][_0x7d4be7(0x1b6)],'table':_0x481970[_0x7d4be7(0x184)][_0x7d4be7(0x1ce)],'joinKey':_0x481970[_0x7d4be7(0x1ee)]['child_key'],'foreignKey':_0x481970[_0x7d4be7(0x1ee)]['parent_key'],'columns':getAttributeColumns(_0x481970),'schemaValid':![]};_0x590917(_0x7d4be7(0x15c)+_0x481970[_0x7d4be7(0x1f4)]);const _0x4238a8=await _0x3b86bc(generateAttributeSchemaSQL(_0x4292aa,_0x481970));if(_0x4238a8[_0x7d4be7(0x15d)])_0x148098[_0x7d4be7(0x197)]=_0x4238a8[_0x7d4be7(0x15d)];else{_0x148098[_0x7d4be7(0x20d)]=!![],_0x590917('Calculating\x20coverage\x20for:\x20'+_0x481970[_0x7d4be7(0x1f4)]);const _0x487a62=await _0x3b86bc(generateAttributeCoverageSQL(_0x4292aa,_0x481970));!_0x487a62[_0x7d4be7(0x15d)]&&_0x487a62[_0x7d4be7(0x144)][_0x7d4be7(0x1f9)]>0x0&&(_0x148098[_0x7d4be7(0x17c)]=_0x487a62['data'][0x0]['matched_count'],_0x4bc0c5[_0x7d4be7(0x18a)]['rowCount']&&_0x4bc0c5[_0x7d4be7(0x18a)][_0x7d4be7(0x219)]>0x0&&(_0x148098[_0x7d4be7(0x16e)]=_0x148098[_0x7d4be7(0x17c)]/_0x4bc0c5[_0x7d4be7(0x18a)][_0x7d4be7(0x219)]*0x64));}return _0x148098;},_0x2f9a51=async(_0x51b4a1,_0x4e4b55)=>{const _0x4d9d18=_0x5082ef,_0x418103={'name':_0x51b4a1[_0x4d9d18(0x1f4)],'database':_0x51b4a1[_0x4d9d18(0x184)]['database'],'table':_0x51b4a1[_0x4d9d18(0x184)]['table'],'joinKey':_0x51b4a1[_0x4d9d18(0x1ee)][_0x4d9d18(0x194)],'foreignKey':_0x51b4a1['join'][_0x4d9d18(0x1cf)],'columns':getBehaviorColumns(_0x51b4a1),'schemaValid':![]};_0x590917(_0x4d9d18(0x162)+_0x51b4a1['name']);const _0x2f6852=await _0x3b86bc(generateBehaviorSchemaSQL(_0x4292aa,_0x51b4a1));if(_0x2f6852[_0x4d9d18(0x15d)])_0x418103[_0x4d9d18(0x197)]=_0x2f6852[_0x4d9d18(0x15d)];else{_0x418103['schemaValid']=!![],_0x590917(_0x4d9d18(0x178)+_0x51b4a1[_0x4d9d18(0x1f4)]+'\x20('+_0x4e4b55+')');const _0x4eac48=await _0x3b86bc(generateBehaviorStatsSQL(_0x4292aa,_0x51b4a1,_0x4e4b55));!_0x4eac48[_0x4d9d18(0x15d)]&&_0x4eac48[_0x4d9d18(0x144)][_0x4d9d18(0x1f9)]>0x0&&(_0x418103[_0x4d9d18(0x1b2)]=_0x4eac48[_0x4d9d18(0x144)][0x0][_0x4d9d18(0x1a1)],_0x418103[_0x4d9d18(0x164)]=_0x4eac48[_0x4d9d18(0x144)][0x0]['total_events'],_0x4bc0c5['master']['rowCount']&&_0x4bc0c5[_0x4d9d18(0x18a)][_0x4d9d18(0x219)]>0x0&&(_0x418103[_0x4d9d18(0x1fc)]=_0x418103[_0x4d9d18(0x1b2)]/_0x4bc0c5[_0x4d9d18(0x18a)][_0x4d9d18(0x219)]*0x64));}return _0x418103;},_0x499cc6=(_0x4126fb,_0x33990e)=>{const _0x2a9cc7=_0x5082ef;_0x4bc0c5[_0x2a9cc7(0x1f3)]=_0x4126fb,_0x4bc0c5[_0x2a9cc7(0x1d2)]=_0x33990e;for(const _0x423d88 of _0x4126fb){!_0x423d88[_0x2a9cc7(0x20d)]&&(_0x54c538[_0x2a9cc7(0x1f5)](_0x2a9cc7(0x18c)+_0x423d88[_0x2a9cc7(0x1f4)]+_0x2a9cc7(0x1da)+_0x423d88[_0x2a9cc7(0x197)]),_0x4d9bf5=![]);}for(const _0x3e5411 of _0x33990e){!_0x3e5411[_0x2a9cc7(0x20d)]&&(_0x54c538['push'](_0x2a9cc7(0x1ac)+_0x3e5411[_0x2a9cc7(0x1f4)]+_0x2a9cc7(0x1da)+_0x3e5411[_0x2a9cc7(0x197)]),_0x4d9bf5=![]);}},_0x5e1130=_0x72f672['interval']||DEFAULT_TIME_RANGE;if(typeof _0x72f672['attribute']===_0x5082ef(0x1a2)){const _0x8f708c=findAttributeByName(_0x4292aa,_0x72f672['attribute']);if(!_0x8f708c)throw new SDKError(ErrorCode[_0x5082ef(0x192)],_0x5082ef(0x18c)+_0x72f672[_0x5082ef(0x14a)]+_0x5082ef(0x17b));const _0x1470bb=await _0x3905a9(_0x8f708c);return _0x499cc6([_0x1470bb],[]),_0x4bc0c5['allValid']=_0x4d9bf5,_0x4bc0c5;}if(_0x72f672[_0x5082ef(0x14a)]===!![]){_0x590917(_0x5082ef(0x1d8));const _0x5d1922=await Promise[_0x5082ef(0x19a)]((_0x4292aa[_0x5082ef(0x1f3)]||[])[_0x5082ef(0x173)](_0x3983bb=>_0x3905a9(_0x3983bb)));return _0x499cc6(_0x5d1922,[]),_0x4bc0c5[_0x5082ef(0x1ed)]=_0x4d9bf5,_0x4bc0c5;}if(typeof _0x72f672[_0x5082ef(0x163)]===_0x5082ef(0x1a2)){const _0x132d0d=findBehaviorByName(_0x4292aa,_0x72f672[_0x5082ef(0x163)]);if(!_0x132d0d)throw new SDKError(ErrorCode[_0x5082ef(0x192)],_0x5082ef(0x1ac)+_0x72f672[_0x5082ef(0x163)]+_0x5082ef(0x17b));const _0x2bd183=await _0x2f9a51(_0x132d0d,_0x5e1130);return _0x499cc6([],[_0x2bd183]),_0x4bc0c5[_0x5082ef(0x1ed)]=_0x4d9bf5,_0x4bc0c5;}if(_0x72f672['behavior']===!![]){_0x590917(_0x5082ef(0x15a));const _0x519e7e=await Promise[_0x5082ef(0x19a)]((_0x4292aa[_0x5082ef(0x1d2)]||[])[_0x5082ef(0x173)](_0x3ff777=>_0x2f9a51(_0x3ff777,_0x5e1130)));return _0x499cc6([],_0x519e7e),_0x4bc0c5[_0x5082ef(0x1ed)]=_0x4d9bf5,_0x4bc0c5;}if(_0x72f672[_0x5082ef(0x18d)]){_0x590917(_0x5082ef(0x1d8));const _0x63f712=await Promise[_0x5082ef(0x19a)]((_0x4292aa[_0x5082ef(0x1f3)]||[])['map'](_0x5881cc=>_0x3905a9(_0x5881cc)));return _0x499cc6(_0x63f712,[]),_0x4bc0c5[_0x5082ef(0x1ed)]=_0x4d9bf5,_0x4bc0c5;}_0x590917('Validating\x20all\x20attributes\x20and\x20behaviors\x20in\x20parallel...');const [_0x27099f,_0x768634]=await Promise['all']([Promise[_0x5082ef(0x19a)]((_0x4292aa[_0x5082ef(0x1f3)]||[])['map'](_0x357c03=>_0x3905a9(_0x357c03))),Promise['all']((_0x4292aa[_0x5082ef(0x1d2)]||[])[_0x5082ef(0x173)](_0xd70c27=>_0x2f9a51(_0xd70c27,_0x5e1130)))]);_0x499cc6(_0x27099f,_0x768634);if(_0x4292aa[_0x5082ef(0x216)]||_0x4292aa[_0x5082ef(0x191)]){_0x4bc0c5['realtime']=await this[_0x5082ef(0x155)](_0x4292aa,_0x3b86bc,_0x590917);if(_0x4bc0c5['realtime'][_0x5082ef(0x1ad)])for(const _0x4fe6d2 of _0x4bc0c5[_0x5082ef(0x216)][_0x5082ef(0x1ad)]){_0x4fe6d2[_0x5082ef(0x156)]&&(_0x54c538[_0x5082ef(0x1f5)]('RT\x20event\x20\x27'+_0x4fe6d2[_0x5082ef(0x1f4)]+_0x5082ef(0x1da)+_0x4fe6d2[_0x5082ef(0x156)]),_0x4d9bf5=![]);}}return _0x4bc0c5[_0x5082ef(0x1ed)]=_0x4d9bf5,_0x4bc0c5;}async[a166_0x18003a(0x1f1)](_0x50d88f,_0x4ba895={}){const _0x32544b=a166_0x18003a,_0x1f480b=typeof _0x50d88f===_0x32544b(0x1a2)?parseDef(_0x50d88f):_0x50d88f,_0x1dd5e2=[];let _0x42029a=!![];const _0x147c42=_0x44f626=>_0x4ba895['onProgress']?.(_0x44f626),_0x45a17b={'name':_0x1f480b[_0x32544b(0x1f4)],'master':{'database':_0x1f480b[_0x32544b(0x18a)][_0x32544b(0x1b6)],'table':_0x1f480b[_0x32544b(0x18a)]['table'],'schemaValid':!![]},'attributes':[],'behaviors':[],'errors':_0x1dd5e2,'allValid':!![]},_0xe1805d=async _0x4ce09f=>{const _0x2c8fcf=_0x32544b;try{const _0x356e72=await this['trinoClient'][_0x2c8fcf(0x217)](_0x4ce09f);return{'data':_0x356e72[_0x2c8fcf(0x144)]};}catch(_0x242e68){const _0x30304c=_0x242e68 instanceof Error?_0x242e68['message']:String(_0x242e68);return{'data':[],'error':_0x30304c};}};if(_0x4ba895['master']){_0x147c42(_0x32544b(0x172));const _0x4d1e8d=generateMasterSampleSQL(_0x1f480b,DEFAULT_SAMPLE_LIMIT),_0xd9a25e=await _0xe1805d(_0x4d1e8d);return!_0xd9a25e['error']?_0x45a17b[_0x32544b(0x21c)]=_0xd9a25e[_0x32544b(0x144)]:(_0x1dd5e2['push']('Master\x20table:\x20'+_0xd9a25e['error']),_0x42029a=![]),_0x45a17b[_0x32544b(0x1ed)]=_0x42029a,_0x45a17b;}if(_0x4ba895['attribute']){const _0x1e07db=findAttributeByName(_0x1f480b,_0x4ba895[_0x32544b(0x14a)]);if(!_0x1e07db)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x32544b(0x18c)+_0x4ba895[_0x32544b(0x14a)]+'\x27\x20not\x20found');_0x147c42(_0x32544b(0x21b)+_0x1e07db[_0x32544b(0x1f4)]);const _0x4ad137=generateAttributeSampleSQL(_0x1f480b,_0x1e07db,DEFAULT_SAMPLE_LIMIT),_0x21ac8b=await _0xe1805d(_0x4ad137);return!_0x21ac8b[_0x32544b(0x15d)]?_0x45a17b[_0x32544b(0x21c)]=_0x21ac8b[_0x32544b(0x144)]:(_0x1dd5e2[_0x32544b(0x1f5)](_0x32544b(0x18c)+_0x1e07db[_0x32544b(0x1f4)]+'\x27:\x20'+_0x21ac8b[_0x32544b(0x15d)]),_0x42029a=![]),_0x45a17b[_0x32544b(0x1ed)]=_0x42029a,_0x45a17b;}if(_0x4ba895[_0x32544b(0x163)]){const _0x1326c9=findBehaviorByName(_0x1f480b,_0x4ba895[_0x32544b(0x163)]);if(!_0x1326c9)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x32544b(0x1ac)+_0x4ba895[_0x32544b(0x163)]+_0x32544b(0x17b));const _0x12e778=_0x4ba895[_0x32544b(0x1d9)]||DEFAULT_TIME_RANGE;_0x147c42(_0x32544b(0x21b)+_0x1326c9[_0x32544b(0x1f4)]+'\x20('+_0x12e778+')');const _0x409405=generateBehaviorSampleSQL(_0x1f480b,_0x1326c9,DEFAULT_SAMPLE_LIMIT,_0x12e778),_0xa10bde=await _0xe1805d(_0x409405);return!_0xa10bde[_0x32544b(0x15d)]?_0x45a17b[_0x32544b(0x21c)]=_0xa10bde[_0x32544b(0x144)]:(_0x1dd5e2[_0x32544b(0x1f5)](_0x32544b(0x1ac)+_0x1326c9['name']+_0x32544b(0x1da)+_0xa10bde[_0x32544b(0x15d)]),_0x42029a=![]),_0x45a17b[_0x32544b(0x1ed)]=_0x42029a,_0x45a17b;}if(_0x4ba895[_0x32544b(0x18d)]){_0x147c42(_0x32544b(0x149));const _0x3243ac=generateEnrichedSQL(_0x1f480b,DEFAULT_SAMPLE_LIMIT),_0x5e82bd=await _0xe1805d(_0x3243ac);return!_0x5e82bd[_0x32544b(0x15d)]?_0x45a17b[_0x32544b(0x21c)]=_0x5e82bd['data']:(_0x1dd5e2[_0x32544b(0x1f5)](_0x32544b(0x1c6)+_0x5e82bd[_0x32544b(0x15d)]),_0x42029a=![]),_0x45a17b[_0x32544b(0x1ed)]=_0x42029a,_0x45a17b;}return _0x45a17b[_0x32544b(0x1ed)]=_0x42029a,_0x45a17b;}async[a166_0x18003a(0x154)](_0x5d57c0,_0x236f89){return await this['client']['createSegment'](_0x5d57c0,_0x236f89);}async[a166_0x18003a(0x179)](_0x2c7494){const _0x4f7223=a166_0x18003a;return await this[_0x4f7223(0x171)]['createJourneySegment'](_0x2c7494);}async[a166_0x18003a(0x1b7)](_0x29105d,_0x442574,_0x5b0ca0){const _0x4d0ce7=a166_0x18003a;return await this[_0x4d0ce7(0x171)][_0x4d0ce7(0x213)](_0x29105d,_0x442574,_0x5b0ca0);}async['deleteSegment'](_0x1fa0f1){const _0x32d4ef=a166_0x18003a;return await this[_0x32d4ef(0x171)]['deleteSegment'](_0x1fa0f1);}async[a166_0x18003a(0x168)](_0x19cad4,_0x26e302){const _0x1318b6=a166_0x18003a,_0x1cb979=await this[_0x1318b6(0x1b0)](_0x19cad4);return await this[_0x1318b6(0x171)]['createSegmentFolder'](_0x1cb979,_0x26e302);}async[a166_0x18003a(0x1b0)](_0xc8f0b6){const _0x5954fc=a166_0x18003a;if(/^\d+$/[_0x5954fc(0x1c0)](_0xc8f0b6))return _0xc8f0b6;return await this['resolveParentId'](_0xc8f0b6);}async[a166_0x18003a(0x1d7)](_0x3295d8,_0x151fa9){const _0x5685ec=a166_0x18003a,[_0x1135f8,_0x22d3af]=await Promise['all']([this[_0x5685ec(0x189)](_0x3295d8,_0x151fa9)[_0x5685ec(0x201)](()=>!![])[_0x5685ec(0x1b9)](()=>![]),this['resolveSegmentId'](_0x3295d8,_0x151fa9)['then'](()=>!![])['catch'](()=>![])]);if(_0x1135f8&&_0x22d3af)return'ambiguous';else{if(_0x1135f8)return'folder';else{if(_0x22d3af)return _0x5685ec(0x14b);}}throw new SDKError(ErrorCode[_0x5685ec(0x192)],_0x5685ec(0x159)+_0x151fa9+_0x5685ec(0x1db));}async[a166_0x18003a(0x1e6)](_0x128895,_0x5daafa,_0x2e290a){const _0x46e80b=a166_0x18003a,[_0x108813,_0xa22d34]=await Promise[_0x46e80b(0x19a)]([this[_0x46e80b(0x176)](_0x128895),this[_0x46e80b(0x147)](_0x128895)]),_0x33ce8a=_0x2e290a?_0x108813['filter'](_0x56bbbd=>_0x56bbbd[_0x46e80b(0x1f0)]===_0x2e290a):_0x108813[_0x46e80b(0x1b4)](_0x150617=>!_0x150617['parentFolderId']),_0x247d8c=_0x2e290a?_0xa22d34[_0x46e80b(0x1b4)](_0x47dae2=>_0x47dae2[_0x46e80b(0x203)]===_0x2e290a):_0xa22d34[_0x46e80b(0x1b4)](_0x2be140=>!_0x2be140[_0x46e80b(0x203)]),_0x23a2e1=_0x33ce8a[_0x46e80b(0x1aa)](_0x4f54fe=>_0x4f54fe['name']===_0x5daafa),_0x2679a0=_0x247d8c[_0x46e80b(0x1aa)](_0x4412f7=>_0x4412f7[_0x46e80b(0x1f4)]===_0x5daafa);if(_0x23a2e1&&_0x2679a0)return _0x46e80b(0x1a5);else{if(_0x23a2e1)return _0x46e80b(0x1d6);else{if(_0x2679a0)return _0x46e80b(0x14b);}}throw new SDKError(ErrorCode[_0x46e80b(0x192)],_0x46e80b(0x159)+_0x5daafa+_0x46e80b(0x1e5)+(_0x2e290a?_0x46e80b(0x1d6):_0x46e80b(0x19d)));}async[a166_0x18003a(0x1ef)](_0x2badc4){const _0x156deb=a166_0x18003a;if(_0x2badc4[_0x156deb(0x1f9)]===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Path\x20cannot\x20be\x20empty');const _0xc1039a=_0x2badc4[0x0],_0x53aef5=await this[_0x156deb(0x212)](_0xc1039a);if(_0x2badc4[_0x156deb(0x1f9)]===0x1)return{'parentId':_0x53aef5,'parentName':_0xc1039a,'type':_0x156deb(0x17e),'fullPath':_0xc1039a};const _0x2df6ed=await this[_0x156deb(0x211)](_0x53aef5),_0x125c77=[];let _0x166b97=_0x2df6ed;for(let _0x7d20d8=0x1;_0x7d20d8<_0x2badc4['length']-0x1;_0x7d20d8++){const _0x335f1a=_0x2badc4[_0x7d20d8],_0x4b4b17=await this[_0x156deb(0x176)](_0x53aef5),_0x518914=_0x166b97?_0x4b4b17[_0x156deb(0x1c5)](_0x418477=>_0x418477['name']===_0x335f1a&&_0x418477['parentFolderId']===_0x166b97):_0x4b4b17['find'](_0x4d6df7=>_0x4d6df7[_0x156deb(0x1f4)]===_0x335f1a&&!_0x4d6df7[_0x156deb(0x1f0)]);if(!_0x518914)throw new SDKError(ErrorCode[_0x156deb(0x192)],'Folder\x20\x27'+_0x335f1a+_0x156deb(0x175));_0x125c77['push'](_0x335f1a),_0x166b97=_0x518914['id'];}const _0x5b9ae2=_0x2badc4[_0x2badc4[_0x156deb(0x1f9)]-0x1],_0x14978f=await this['detectResourceTypeInFolder'](_0x53aef5,_0x5b9ae2,_0x166b97);if(_0x14978f===_0x156deb(0x1a5)||_0x14978f==='folder'){const _0x39d9d8=await this[_0x156deb(0x176)](_0x53aef5),_0x37cbe0=_0x166b97?_0x39d9d8[_0x156deb(0x1c5)](_0x38af5c=>_0x38af5c[_0x156deb(0x1f4)]===_0x5b9ae2&&_0x38af5c[_0x156deb(0x1f0)]===_0x166b97):_0x39d9d8[_0x156deb(0x1c5)](_0x4416b=>_0x4416b[_0x156deb(0x1f4)]===_0x5b9ae2&&!_0x4416b['parentFolderId']);if(!_0x37cbe0)throw new SDKError(ErrorCode['SEGMENT_NOT_FOUND'],_0x156deb(0x1eb)+_0x5b9ae2+'\x27\x20not\x20found');return _0x125c77[_0x156deb(0x1f5)](_0x5b9ae2),{'parentId':_0x53aef5,'parentName':_0xc1039a,'folderId':_0x37cbe0['id'],'folderPath':_0x125c77,'type':_0x156deb(0x1d6),'fullPath':_0x2badc4[_0x156deb(0x1ee)]('/')};}else{const _0x591902=await this[_0x156deb(0x147)](_0x53aef5),_0x5022e4=_0x166b97?_0x591902[_0x156deb(0x1c5)](_0x318958=>_0x318958['name']===_0x5b9ae2&&_0x318958[_0x156deb(0x203)]===_0x166b97):_0x591902[_0x156deb(0x1c5)](_0x5b30af=>_0x5b30af[_0x156deb(0x1f4)]===_0x5b9ae2&&!_0x5b30af[_0x156deb(0x203)]);if(!_0x5022e4)throw new SDKError(ErrorCode[_0x156deb(0x192)],_0x156deb(0x1c7)+_0x5b9ae2+_0x156deb(0x17b));return{'parentId':_0x53aef5,'parentName':_0xc1039a,'folderId':_0x166b97,'folderPath':_0x125c77[_0x156deb(0x1f9)]>0x0?_0x125c77:undefined,'segmentId':_0x5022e4['id'],'segmentName':_0x5b9ae2,'type':'segment','fullPath':_0x2badc4[_0x156deb(0x1ee)]('/')};}}async[a166_0x18003a(0x1d3)](_0x483fa2){const _0x3c6e28=a166_0x18003a,_0x14a3c2=parsePath(_0x483fa2);if(!_0x14a3c2[_0x3c6e28(0x1c1)])throw new SDKError(ErrorCode[_0x3c6e28(0x153)],'Path\x20must\x20be\x20absolute\x20(cannot\x20start\x20with\x20.\x20or\x20..)');return await this[_0x3c6e28(0x1ef)](_0x14a3c2['segments']);}async[a166_0x18003a(0x142)](_0x1b4e65,_0x28065c){const _0x1fde49=a166_0x18003a;let _0x220c39=_0x28065c;!_0x220c39&&(_0x220c39=await this['getRootFolderId'](_0x1b4e65));if(!_0x220c39)return{'folders':[],'segments':[],'journeys':[]};const _0x26f46f=await this[_0x1fde49(0x171)][_0x1fde49(0x1e8)](_0x220c39,0x1,![]),_0x46685c=_0x26f46f[_0x1fde49(0x144)],_0x248204=_0x46685c[_0x1fde49(0x1b4)](_0x478749=>{if(_0x478749['id']===_0x220c39)return![];const _0x41fc33=this['getEntityParentFolderId'](_0x478749);return _0x41fc33===_0x220c39||!_0x41fc33;}),_0x22bcc3=_0x248204['filter'](_0x2cc6f2=>_0x2cc6f2[_0x1fde49(0x174)]===_0x1fde49(0x187))['map'](_0x255d47=>this[_0x1fde49(0x1c2)](_0x255d47,_0x1b4e65)),_0x43746d=_0x248204[_0x1fde49(0x1b4)](_0x43c195=>_0x43c195[_0x1fde49(0x174)]===_0x1fde49(0x1bf)||_0x43c195['type']==='segment-realtime')[_0x1fde49(0x173)](_0x12d058=>this['entityToSegment'](_0x12d058,_0x1b4e65)),_0x7e0b67=_0x248204[_0x1fde49(0x1b4)](_0x19f95a=>_0x19f95a['type']===_0x1fde49(0x1e4)),_0xecd42a=_0x7e0b67['map'](_0x5018a7=>({'journeyBundleId':_0x5018a7[_0x1fde49(0x1f3)][_0x1fde49(0x210)],'versionNumber':_0x5018a7['attributes'][_0x1fde49(0x14c)],'id':_0x5018a7['id'],'entity':_0x5018a7})),_0x1afa40=deduplicateJourneysByBundle(_0xecd42a),_0xd5b68f=_0x1afa40[_0x1fde49(0x173)](_0x53d688=>entityToJourneyListItem(_0x53d688[_0x1fde49(0x214)],_0x1b4e65));return{'folders':_0x22bcc3,'segments':_0x43746d,'journeys':_0xd5b68f};}['entityToFolder'](_0x3b6444,_0x33ba79){const _0x496296=a166_0x18003a;return{'audienceId':_0x33ba79,'id':_0x3b6444['id'],'name':_0x3b6444[_0x496296(0x1f3)][_0x496296(0x1f4)],'parentFolderId':_0x3b6444['attributes'][_0x496296(0x1f0)]??_0x3b6444[_0x496296(0x150)]?.['parentFolder']?.['data']?.['id']??null,'description':_0x3b6444[_0x496296(0x1f3)][_0x496296(0x1fd)]??null,'createdAt':_0x3b6444[_0x496296(0x1f3)][_0x496296(0x1cc)],'updatedAt':_0x3b6444['attributes'][_0x496296(0x1bc)]};}[a166_0x18003a(0x20a)](_0x2e4cf4,_0x3d65d4){const _0x462c0c=a166_0x18003a;return{'audienceId':_0x3d65d4,'id':_0x2e4cf4['id'],'name':_0x2e4cf4[_0x462c0c(0x1f3)][_0x462c0c(0x1f4)],'description':_0x2e4cf4[_0x462c0c(0x1f3)][_0x462c0c(0x1fd)]??undefined,'realtime':_0x2e4cf4['type']===_0x462c0c(0x21e),'segmentFolderId':_0x2e4cf4[_0x462c0c(0x1f3)][_0x462c0c(0x203)]??_0x2e4cf4[_0x462c0c(0x150)]?.['parentFolder']?.[_0x462c0c(0x144)]?.['id']??undefined,'population':_0x2e4cf4[_0x462c0c(0x1f3)][_0x462c0c(0x166)],'createdAt':_0x2e4cf4[_0x462c0c(0x1f3)][_0x462c0c(0x1cc)],'updatedAt':_0x2e4cf4[_0x462c0c(0x1f3)][_0x462c0c(0x1bc)]};}async[a166_0x18003a(0x1ae)](_0x5eb230,_0x5cc097,_0xe95632,_0x241100=0xa){const _0x3a78c8=a166_0x18003a;let _0x1b963b=_0x5cc097;!_0x1b963b&&(_0x1b963b=await this[_0x3a78c8(0x211)](_0x5eb230));if(!_0x1b963b)return[];const _0x134472=await this[_0x3a78c8(0x171)][_0x3a78c8(0x1e8)](_0x1b963b,_0x241100,![]),_0x160c00=_0x134472[_0x3a78c8(0x144)];return this[_0x3a78c8(0x1ab)](_0x160c00,_0x1b963b);}['buildTreeFromEntities'](_0x216e64,_0x4f8a77){const _0x5a65c0=a166_0x18003a,_0x16a257=new Map();for(const _0x409a51 of _0x216e64){if(_0x409a51[_0x5a65c0(0x174)]===_0x5a65c0(0x187)&&_0x409a51['id']===_0x4f8a77)continue;const _0x428a64=this[_0x5a65c0(0x221)](_0x409a51)??_0x4f8a77;!_0x16a257['has'](_0x428a64)&&_0x16a257['set'](_0x428a64,[]),_0x16a257[_0x5a65c0(0x16d)](_0x428a64)[_0x5a65c0(0x1f5)](_0x409a51);}return this[_0x5a65c0(0x19b)](_0x4f8a77,_0x16a257);}[a166_0x18003a(0x221)](_0x362cd6){const _0x514f52=a166_0x18003a;if(_0x362cd6[_0x514f52(0x150)]?.[_0x514f52(0x21a)]?.[_0x514f52(0x144)]?.['id'])return _0x362cd6[_0x514f52(0x150)][_0x514f52(0x21a)][_0x514f52(0x144)]['id'];return _0x362cd6['attributes']['parentFolderId']??_0x362cd6[_0x514f52(0x1f3)][_0x514f52(0x203)]??undefined;}[a166_0x18003a(0x19b)](_0x13d90e,_0x20bf6d){const _0x4b830d=a166_0x18003a,_0x182223=_0x20bf6d[_0x4b830d(0x16d)](_0x13d90e)??[],_0x59c09b=[],_0x528884=_0x182223[_0x4b830d(0x1b4)](_0x25182b=>_0x25182b[_0x4b830d(0x174)]===_0x4b830d(0x187)),_0x39517d=_0x182223[_0x4b830d(0x1b4)](_0x42c460=>_0x42c460[_0x4b830d(0x174)]===_0x4b830d(0x1bf)||_0x42c460[_0x4b830d(0x174)]===_0x4b830d(0x21e)),_0x51c16e=_0x182223[_0x4b830d(0x1b4)](_0x27e4e8=>_0x27e4e8[_0x4b830d(0x174)]===_0x4b830d(0x1e4)),_0x34fe93=_0x51c16e[_0x4b830d(0x173)](_0xe70653=>({'journeyBundleId':_0xe70653[_0x4b830d(0x1f3)][_0x4b830d(0x210)],'versionNumber':_0xe70653[_0x4b830d(0x1f3)][_0x4b830d(0x14c)],'id':_0xe70653['id'],'entity':_0xe70653})),_0x2e64b8=deduplicateJourneysByBundle(_0x34fe93);for(const _0x33a945 of _0x528884){const _0x5419d2=this[_0x4b830d(0x19b)](_0x33a945['id'],_0x20bf6d);_0x59c09b[_0x4b830d(0x1f5)]({'type':'folder','id':_0x33a945['id'],'name':_0x33a945[_0x4b830d(0x1f3)][_0x4b830d(0x1f4)],'children':_0x5419d2['length']>0x0?_0x5419d2:undefined,'metadata':{'description':_0x33a945[_0x4b830d(0x1f3)][_0x4b830d(0x1fd)]??undefined,'folderCount':_0x5419d2['filter'](_0x410aba=>_0x410aba['type']===_0x4b830d(0x1d6))['length'],'segmentCount':_0x5419d2[_0x4b830d(0x1b4)](_0x3a09c6=>_0x3a09c6[_0x4b830d(0x174)]===_0x4b830d(0x14b))[_0x4b830d(0x1f9)],'journeyCount':_0x5419d2[_0x4b830d(0x1b4)](_0x14bd52=>_0x14bd52[_0x4b830d(0x174)]===_0x4b830d(0x1e4))[_0x4b830d(0x1f9)],'createdAt':_0x33a945['attributes']['createdAt'],'updatedAt':_0x33a945[_0x4b830d(0x1f3)][_0x4b830d(0x1bc)]}});}for(const _0x100271 of _0x39517d){_0x59c09b['push']({'type':'segment','id':_0x100271['id'],'name':_0x100271[_0x4b830d(0x1f3)][_0x4b830d(0x1f4)],'population':_0x100271['attributes']['population'],'metadata':{'description':_0x100271[_0x4b830d(0x1f3)][_0x4b830d(0x1fd)]??undefined,'createdAt':_0x100271['attributes'][_0x4b830d(0x1cc)],'updatedAt':_0x100271['attributes'][_0x4b830d(0x1bc)]}});}for(const _0x2244f3 of _0x2e64b8){const _0x378e02=_0x2244f3[_0x4b830d(0x214)];_0x59c09b['push']({'type':_0x4b830d(0x1e4),'id':_0x378e02['id'],'name':_0x378e02[_0x4b830d(0x1f3)][_0x4b830d(0x1a8)]??_0x378e02[_0x4b830d(0x1f3)][_0x4b830d(0x1f4)]??'','state':parseJourneyState(_0x378e02['attributes']['state']),'metadata':{}});}return _0x59c09b;}async[a166_0x18003a(0x21f)](_0x58d6e6,_0x1e0f32={}){const _0x5ada41=a166_0x18003a,_0x186615=this[_0x5ada41(0x1fe)](),_0x35a0eb={'segment':_0x186615[_0x5ada41(0x14b)],'journey':_0x186615[_0x5ada41(0x1e4)],'user':_0x186615[_0x5ada41(0x16c)],'connection':_0x186615[_0x5ada41(0x1c4)]};return a166_0x122b09(_0x35a0eb,_0x58d6e6,_0x1e0f32);}async[a166_0x18003a(0x155)](_0x437def,_0x1150b2,_0x3b054b){const _0x32e1e1=a166_0x18003a,_0x3954cb=[_0x32e1e1(0x1be),_0x32e1e1(0x1f7),'set',_0x32e1e1(0x20c),_0x32e1e1(0x177),_0x32e1e1(0x183)];let _0x35fdb8=![];try{const _0xadc314=this['getTdxInstance'](),_0x4938de=await this['resolveParentId'](_0x437def['name']);_0x35fdb8=await _0xadc314['realtime'][_0x32e1e1(0x14e)](_0x4938de);}catch{}const _0x37a1a0={'enabled':_0x35fdb8};if(_0x437def['realtime']){const _0xca75e1=_0x437def[_0x32e1e1(0x216)];_0xca75e1['events']&&_0xca75e1[_0x32e1e1(0x1ad)][_0x32e1e1(0x1f9)]>0x0&&(_0x3b054b(_0x32e1e1(0x151)),_0x37a1a0['events']=await Promise[_0x32e1e1(0x19a)](_0xca75e1['events'][_0x32e1e1(0x173)](async _0x749471=>{const _0xa5a134=_0x32e1e1,_0x40e62e={'name':_0x749471[_0xa5a134(0x1f4)],'sourceTable':_0x749471['source_table']};if(_0x749471['source_table']){const _0x38bc2e=_0x749471[_0xa5a134(0x1c9)]['split']('.'),_0x2b25b4=_0x38bc2e[0x0]||'',_0x5435e6=_0x38bc2e[0x1]||_0x38bc2e[0x0]||'';if(_0x2b25b4&&_0x5435e6){const _0x4186b3=await _0x1150b2(generateSchemaValidationSQL(_0x2b25b4,_0x5435e6));_0x40e62e[_0xa5a134(0x1a9)]=!_0x4186b3['error'],_0x40e62e['sourceTableError']=_0x4186b3['error'];}}return _0x40e62e;}))),_0xca75e1[_0x32e1e1(0x1f3)]&&_0xca75e1[_0x32e1e1(0x1f3)][_0x32e1e1(0x1f9)]>0x0&&(_0x37a1a0[_0x32e1e1(0x1f3)]=_0xca75e1[_0x32e1e1(0x1f3)][_0x32e1e1(0x173)](_0x28a556=>({'name':_0x28a556['name'],'type':_0x28a556[_0x32e1e1(0x174)],'valid':_0x3954cb[_0x32e1e1(0x1e3)](_0x28a556[_0x32e1e1(0x174)])}))),_0xca75e1[_0x32e1e1(0x206)]&&(_0x37a1a0[_0x32e1e1(0x1d4)]={'primaryKey':_0xca75e1['id_stitching'][_0x32e1e1(0x1cd)],'stitchingKeys':_0xca75e1['id_stitching'][_0x32e1e1(0x1bd)]});}return _0x437def[_0x32e1e1(0x191)]&&_0x437def[_0x32e1e1(0x191)][_0x32e1e1(0x1f9)]>0x0&&(_0x37a1a0[_0x32e1e1(0x1fb)]=_0x437def[_0x32e1e1(0x191)][_0x32e1e1(0x173)](_0x5630fc=>({'name':_0x5630fc[_0x32e1e1(0x1f4)],'valid':!!_0x5630fc[_0x32e1e1(0x1f4)]}))),_0x37a1a0;}async[a166_0x18003a(0x215)](_0x32bf7a,_0x312c64){const _0x593384=a166_0x18003a,_0x47fbb8=this[_0x593384(0x1fe)](),_0x28406e=await _0x47fbb8['realtime'][_0x593384(0x14e)](_0x312c64);if(!_0x28406e)return;try{const _0x58658b=await _0x47fbb8[_0x593384(0x216)][_0x593384(0x20b)](_0x312c64);_0x58658b&&Object['keys'](_0x58658b)[_0x593384(0x1f9)]>0x0&&(_0x32bf7a[_0x593384(0x216)]={},_0x58658b['eventTables']&&_0x58658b[_0x593384(0x1d1)]['length']>0x0&&(_0x32bf7a['realtime'][_0x593384(0x1ad)]=_0x58658b[_0x593384(0x1d1)][_0x593384(0x173)](_0xf8ed83=>({'name':_0xf8ed83['table'],'source_table':_0xf8ed83[_0x593384(0x1b6)]+'.'+_0xf8ed83[_0x593384(0x1ce)]}))),_0x58658b[_0x593384(0x17d)]&&_0x58658b[_0x593384(0x17d)][_0x593384(0x1f9)]>0x0&&(_0x32bf7a['realtime'][_0x593384(0x1f3)]=_0x58658b[_0x593384(0x17d)][_0x593384(0x173)](_0x26348f=>({'name':_0x26348f[_0x593384(0x1f4)],'type':_0x593384(0x183),'source_field':_0x26348f[_0x593384(0x14f)]}))),_0x58658b['keyColumns']&&_0x58658b[_0x593384(0x1e1)][_0x593384(0x1f9)]>0x0&&(_0x32bf7a[_0x593384(0x216)]['id_stitching']={'primary_key':_0x58658b[_0x593384(0x1e1)][0x0][_0x593384(0x1f4)],'stitching_keys':_0x58658b[_0x593384(0x1e1)][_0x593384(0x15b)](0x1)[_0x593384(0x173)](_0x4d793a=>_0x4d793a[_0x593384(0x1f4)])}));}catch(_0x55aa7c){logger['debug'](_0x593384(0x1c3)+_0x312c64+':\x20'+_0x55aa7c);}try{const _0x4b1c0a=await _0x47fbb8[_0x593384(0x1e7)][_0x593384(0x177)](_0x312c64);_0x4b1c0a&&_0x4b1c0a[_0x593384(0x1f9)]>0x0&&(_0x32bf7a['personalization_services']=_0x4b1c0a[_0x593384(0x173)](_0xf9fff3=>({'name':_0xf9fff3[_0x593384(0x1f4)],..._0xf9fff3[_0x593384(0x1fd)]&&{'description':_0xf9fff3[_0x593384(0x1fd)]},..._0xf9fff3[_0x593384(0x165)]&&{'trigger_event':_0xf9fff3[_0x593384(0x165)]},..._0xf9fff3[_0x593384(0x1ea)]&&_0xf9fff3[_0x593384(0x1ea)]['length']>0x0&&{'sections':_0xf9fff3[_0x593384(0x1ea)][_0x593384(0x173)](_0x520588=>({'name':_0x520588[_0x593384(0x1f4)],..._0x520588[_0x593384(0x20f)]&&{'criteria':_0x520588[_0x593384(0x20f)]},..._0x520588['attributes']&&_0x520588['attributes'][_0x593384(0x1f9)]>0x0&&{'attributes':_0x520588[_0x593384(0x1f3)]},..._0x520588['batch_segments']&&_0x520588['batch_segments']['length']>0x0&&{'batch_segments':_0x520588['batch_segments']}}))}})));}catch(_0x522a59){logger[_0x593384(0x19f)](_0x593384(0x16f)+_0x312c64+':\x20'+_0x522a59);}}[a166_0x18003a(0x16b)](_0x4f4137){const _0x5b3f72=a166_0x18003a,_0x552863={};_0x4f4137[_0x5b3f72(0x1ad)]&&_0x4f4137[_0x5b3f72(0x1ad)]['length']>0x0&&(_0x552863[_0x5b3f72(0x1d1)]=_0x4f4137[_0x5b3f72(0x1ad)][_0x5b3f72(0x1b4)](_0x4e8dbc=>_0x4e8dbc[_0x5b3f72(0x1c9)])['map'](_0x57c87=>{const _0x246c97=_0x5b3f72,_0x2e1583=_0x57c87['source_table'][_0x246c97(0x146)]('.');return{'database':_0x2e1583[0x0]||'','table':_0x2e1583[0x1]||_0x2e1583[0x0]||''};}));_0x4f4137[_0x5b3f72(0x1f3)]&&_0x4f4137[_0x5b3f72(0x1f3)][_0x5b3f72(0x1f9)]>0x0&&(_0x552863[_0x5b3f72(0x17d)]=_0x4f4137[_0x5b3f72(0x1f3)]['map'](_0x1e837e=>({'column':_0x1e837e[_0x5b3f72(0x1a3)]||_0x1e837e[_0x5b3f72(0x1f4)],'name':_0x1e837e['name']})));if(_0x4f4137[_0x5b3f72(0x206)]){const _0x1f4aef=[{'name':_0x4f4137['id_stitching'][_0x5b3f72(0x1cd)]}];if(_0x4f4137[_0x5b3f72(0x206)][_0x5b3f72(0x1bd)])for(const _0x276089 of _0x4f4137[_0x5b3f72(0x206)][_0x5b3f72(0x1bd)]){_0x1f4aef[_0x5b3f72(0x1f5)]({'name':_0x276089});}_0x552863['keyColumns']=_0x1f4aef;}return _0x552863;}async[a166_0x18003a(0x1b1)](_0x37349f,_0x142e4f,_0x566199){const _0x1e8da7=a166_0x18003a;let _0x14c782=[];try{_0x14c782=await _0x37349f[_0x1e8da7(0x1e7)][_0x1e8da7(0x177)](_0x142e4f);}catch{}const _0x35d799=new Map(_0x14c782[_0x1e8da7(0x173)](_0x22a2d6=>[_0x22a2d6[_0x1e8da7(0x1f4)],_0x22a2d6])),_0x2ccabe=new Map(_0x566199[_0x1e8da7(0x173)](_0x13ca18=>[_0x13ca18[_0x1e8da7(0x1f4)],_0x13ca18]));for(const _0x322cb8 of _0x566199){const _0x52eb10=_0x35d799['get'](_0x322cb8[_0x1e8da7(0x1f4)]),_0xbaf71e={'name':_0x322cb8[_0x1e8da7(0x1f4)],..._0x322cb8[_0x1e8da7(0x1fd)]&&{'description':_0x322cb8[_0x1e8da7(0x1fd)]},..._0x322cb8[_0x1e8da7(0x165)]&&{'trigger_event':_0x322cb8[_0x1e8da7(0x165)]},..._0x322cb8[_0x1e8da7(0x1ea)]&&{'sections':_0x322cb8[_0x1e8da7(0x1ea)][_0x1e8da7(0x173)](_0x358543=>({'name':_0x358543[_0x1e8da7(0x1f4)],'criteria':_0x358543[_0x1e8da7(0x20f)]||'','attributes':_0x358543[_0x1e8da7(0x1f3)]||[],'batch_segments':_0x358543[_0x1e8da7(0x1f2)]||[]}))}};_0x52eb10?.['id']?await _0x37349f[_0x1e8da7(0x1e7)][_0x1e8da7(0x18f)](_0x142e4f,_0x52eb10['id'],_0xbaf71e):await _0x37349f[_0x1e8da7(0x1e7)][_0x1e8da7(0x188)](_0x142e4f,_0xbaf71e);}for(const _0x2bcd86 of _0x14c782){!_0x2ccabe['has'](_0x2bcd86['name'])&&_0x2bcd86['id']&&await _0x37349f['personalization'][_0x1e8da7(0x18e)](_0x142e4f,_0x2bcd86['id']);}}[a166_0x18003a(0x1fe)](){return this['_tdxInstance'];}}
@@ -1 +1 @@
1
- const a173_0x516587=a173_0x45e1;(function(_0x8cb609,_0x108b49){const _0x504b57=a173_0x45e1,_0x733cbf=_0x8cb609();while(!![]){try{const _0x2ae64f=-parseInt(_0x504b57(0xe5))/0x1+-parseInt(_0x504b57(0xed))/0x2*(parseInt(_0x504b57(0xee))/0x3)+-parseInt(_0x504b57(0xe3))/0x4+parseInt(_0x504b57(0xea))/0x5*(-parseInt(_0x504b57(0xe2))/0x6)+parseInt(_0x504b57(0xe7))/0x7*(-parseInt(_0x504b57(0xef))/0x8)+parseInt(_0x504b57(0xf0))/0x9*(-parseInt(_0x504b57(0xe9))/0xa)+parseInt(_0x504b57(0xeb))/0xb*(parseInt(_0x504b57(0xe4))/0xc);if(_0x2ae64f===_0x108b49)break;else _0x733cbf['push'](_0x733cbf['shift']());}catch(_0x1bf58d){_0x733cbf['push'](_0x733cbf['shift']());}}}(a173_0x1433,0xb8e99));export const SITE_ALIASES={'us':a173_0x516587(0xe8),'aws':a173_0x516587(0xe8),'jp':a173_0x516587(0xe1),'jp01':'ap01','aws-tokyo':'ap01','dev':a173_0x516587(0xe0),'stg':a173_0x516587(0xe6),'stg-jp01':a173_0x516587(0xec)};export{getEndpoint,API_ENDPOINTS}from'../client/endpoints.js';export{DOCUMENT_KIND_FOLDERS,ALL_STATUSES,STATUS_PHASES,PRIORITY_ORDER,KIND_PRIORITY}from'./workspace.js';function a173_0x45e1(_0x2945b5,_0x40cb2f){_0x2945b5=_0x2945b5-0xe0;const _0x14338f=a173_0x1433();let _0x45e102=_0x14338f[_0x2945b5];return _0x45e102;}export{noopReporter}from'./progress.js';function a173_0x1433(){const _0xb9562e=['9dgxvrk','dev-us01','ap01','1664394FMLjBY','5655228xRsTKs','3350628daQPRE','1044962NQMpkj','stg-us01','1778yEEism','us01','941090BZZqjo','15bGGCra','253mAoARb','stg-ap01','258kemMPQ','19869MpZWpE','44888TVvDZo'];a173_0x1433=function(){return _0xb9562e;};return a173_0x1433();}
1
+ function a173_0x4d54(_0x414953,_0xe90e88){_0x414953=_0x414953-0x198;const _0x74f875=a173_0x74f8();let _0x4d54fe=_0x74f875[_0x414953];return _0x4d54fe;}const a173_0xb899c9=a173_0x4d54;(function(_0x254a12,_0x1db77e){const _0x5691c5=a173_0x4d54,_0x51424e=_0x254a12();while(!![]){try{const _0x144572=-parseInt(_0x5691c5(0x19f))/0x1*(parseInt(_0x5691c5(0x1a3))/0x2)+-parseInt(_0x5691c5(0x19e))/0x3+-parseInt(_0x5691c5(0x1a1))/0x4*(-parseInt(_0x5691c5(0x19c))/0x5)+-parseInt(_0x5691c5(0x199))/0x6+-parseInt(_0x5691c5(0x1a5))/0x7+-parseInt(_0x5691c5(0x19b))/0x8*(-parseInt(_0x5691c5(0x1a0))/0x9)+parseInt(_0x5691c5(0x19d))/0xa;if(_0x144572===_0x1db77e)break;else _0x51424e['push'](_0x51424e['shift']());}catch(_0x532274){_0x51424e['push'](_0x51424e['shift']());}}}(a173_0x74f8,0x245f5));export const SITE_ALIASES={'us':a173_0xb899c9(0x19a),'aws':a173_0xb899c9(0x19a),'jp':a173_0xb899c9(0x1a2),'jp01':a173_0xb899c9(0x1a2),'aws-tokyo':'ap01','dev':a173_0xb899c9(0x1a4),'stg':'stg-us01','stg-jp01':a173_0xb899c9(0x198)};function a173_0x74f8(){const _0xf4f6f8=['36628RhiyYY','18JQFIoH','4TUqPgO','ap01','8WKwMla','dev-us01','231623sSmQlJ','stg-ap01','332250aMgIZC','us01','990064oZqUSZ','1263490SboUpV','1100880eEQBMY','679035FQWPlH'];a173_0x74f8=function(){return _0xf4f6f8;};return a173_0x74f8();}export{getEndpoint,API_ENDPOINTS}from'../client/endpoints.js';export{DOCUMENT_KIND_FOLDERS,ALL_STATUSES,STATUS_PHASES,PRIORITY_ORDER,KIND_PRIORITY}from'./workspace.js';export{noopReporter}from'./progress.js';
@@ -1 +1 @@
1
- function a177_0x243a(_0x1340f4,_0x512b44){_0x1340f4=_0x1340f4-0xdf;const _0x3f03dc=a177_0x3f03();let _0x243ab9=_0x3f03dc[_0x1340f4];return _0x243ab9;}(function(_0x35cfb5,_0x108aab){const _0x4adcdb=a177_0x243a,_0x252228=_0x35cfb5();while(!![]){try{const _0x3d2dc9=parseInt(_0x4adcdb(0xe4))/0x1*(parseInt(_0x4adcdb(0xe3))/0x2)+parseInt(_0x4adcdb(0xe1))/0x3*(parseInt(_0x4adcdb(0xe7))/0x4)+-parseInt(_0x4adcdb(0xe2))/0x5+-parseInt(_0x4adcdb(0xe8))/0x6*(parseInt(_0x4adcdb(0xe6))/0x7)+parseInt(_0x4adcdb(0xe0))/0x8+parseInt(_0x4adcdb(0xe5))/0x9*(-parseInt(_0x4adcdb(0xdf))/0xa)+parseInt(_0x4adcdb(0xe9))/0xb;if(_0x3d2dc9===_0x108aab)break;else _0x252228['push'](_0x252228['shift']());}catch(_0x2221ab){_0x252228['push'](_0x252228['shift']());}}}(a177_0x3f03,0x5ee72));function a177_0x3f03(){const _0xfde68c=['11094YhHQnr','3290895WxYIfi','4762kbwsNC','283nYHkvn','711AEkVgy','7JLjEgy','488QyELel','1146738PFQjXt','1375495Qeblsl','96430rNrdwo','5998376pkguXF'];a177_0x3f03=function(){return _0xfde68c;};return a177_0x3f03();}export const noopReporter={'update':()=>{}};
1
+ function a177_0x39d2(_0x3ee4de,_0x7e439b){_0x3ee4de=_0x3ee4de-0xe8;const _0x53375a=a177_0x5337();let _0x39d27f=_0x53375a[_0x3ee4de];return _0x39d27f;}(function(_0xa1d63c,_0x3abb98){const _0x7cdbef=a177_0x39d2,_0x48bd2f=_0xa1d63c();while(!![]){try{const _0x238bdb=parseInt(_0x7cdbef(0xf2))/0x1*(parseInt(_0x7cdbef(0xf1))/0x2)+parseInt(_0x7cdbef(0xe9))/0x3*(-parseInt(_0x7cdbef(0xed))/0x4)+parseInt(_0x7cdbef(0xee))/0x5+parseInt(_0x7cdbef(0xef))/0x6*(parseInt(_0x7cdbef(0xf3))/0x7)+-parseInt(_0x7cdbef(0xec))/0x8+-parseInt(_0x7cdbef(0xea))/0x9*(-parseInt(_0x7cdbef(0xf0))/0xa)+parseInt(_0x7cdbef(0xeb))/0xb*(-parseInt(_0x7cdbef(0xe8))/0xc);if(_0x238bdb===_0x3abb98)break;else _0x48bd2f['push'](_0x48bd2f['shift']());}catch(_0x516c9f){_0x48bd2f['push'](_0x48bd2f['shift']());}}}(a177_0x5337,0x3035c));export const noopReporter={'update':()=>{}};function a177_0x5337(){const _0x5c3347=['12NJBzUJ','1896675JecYiW','84dTZfHw','50NqHjJW','418nUlMzb','1011LPIrTp','74011rZzfqp','3120PxgnSK','83157maAesb','205209bGPRId','15279UQjmhv','1687168EZCRvz'];a177_0x5337=function(){return _0x5c3347;};return a177_0x5337();}
@@ -1 +1 @@
1
- const a182_0xe57aba=a182_0x5dbf;(function(_0x336826,_0x594686){const _0x31566f=a182_0x5dbf,_0xd581e7=_0x336826();while(!![]){try{const _0x4ac65b=-parseInt(_0x31566f(0xf8))/0x1+parseInt(_0x31566f(0x103))/0x2+parseInt(_0x31566f(0xff))/0x3+-parseInt(_0x31566f(0x101))/0x4+-parseInt(_0x31566f(0xfd))/0x5*(parseInt(_0x31566f(0xf7))/0x6)+parseInt(_0x31566f(0xee))/0x7+parseInt(_0x31566f(0xfe))/0x8;if(_0x4ac65b===_0x594686)break;else _0xd581e7['push'](_0xd581e7['shift']());}catch(_0x28c02c){_0xd581e7['push'](_0xd581e7['shift']());}}}(a182_0x1b09,0x33259));export const DOCUMENT_KIND_FOLDERS={'goal':a182_0xe57aba(0x104),'item':a182_0xe57aba(0xf2),'guide':a182_0xe57aba(0xf6),'note':a182_0xe57aba(0xf9),'reference':a182_0xe57aba(0xed),'workflow':'workflows','template':a182_0xe57aba(0x105)};export const STALE_DONE_DAYS=0xe;export const STALE_VOID_DAYS=0x3;function a182_0x1b09(){const _0x4f4a4a=['references','201145pFQfbx','note','review','todo','items','done','void','superseded','guides','1380900CnbvqW','94720HIcUAK','notes','guide','proposed','accepted','5qEgNTD','1820744FhgGAf','779793bKniYo','deprecated','247368oDAOXu','planning','159900nNCnVp','goals','templates'];a182_0x1b09=function(){return _0x4f4a4a;};return a182_0x1b09();}export const ALL_STATUSES=['backlog',a182_0xe57aba(0xf1),a182_0xe57aba(0x102),'design_review','in_progress',a182_0xe57aba(0xf0),a182_0xe57aba(0xf3),a182_0xe57aba(0xf4)];export const ALL_GUIDE_STATUSES=[a182_0xe57aba(0xfb),a182_0xe57aba(0xfc),a182_0xe57aba(0x100),a182_0xe57aba(0xf5)];function a182_0x5dbf(_0x36fa8b,_0x21d754){_0x36fa8b=_0x36fa8b-0xed;const _0x1b09d7=a182_0x1b09();let _0x5dbf24=_0x1b09d7[_0x36fa8b];return _0x5dbf24;}export const KNOWLEDGE_KINDS=[a182_0xe57aba(0xef),a182_0xe57aba(0xfa),'reference'];export const STATUS_PHASES={'Not\x20Started':['backlog',a182_0xe57aba(0xf1)],'Design':['planning','design_review'],'Implementation':['in_progress',a182_0xe57aba(0xf0)],'Done':['done','void']};export const PRIORITY_ORDER={'critical':0x0,'high':0x1,'medium':0x2,'low':0x3};export const KIND_PRIORITY={'goal':0x6,'item':0x5,'guide':0x4,'note':0x3,'reference':0x2,'workflow':0x1,'template':0x0};
1
+ const a182_0x1be7ba=a182_0x24df;(function(_0x42cf07,_0x2c0a80){const _0x4e13b6=a182_0x24df,_0x5c1ea0=_0x42cf07();while(!![]){try{const _0x95ef7d=parseInt(_0x4e13b6(0x191))/0x1*(-parseInt(_0x4e13b6(0x17f))/0x2)+-parseInt(_0x4e13b6(0x18b))/0x3*(parseInt(_0x4e13b6(0x184))/0x4)+parseInt(_0x4e13b6(0x17c))/0x5+-parseInt(_0x4e13b6(0x181))/0x6*(-parseInt(_0x4e13b6(0x182))/0x7)+-parseInt(_0x4e13b6(0x193))/0x8*(-parseInt(_0x4e13b6(0x189))/0x9)+parseInt(_0x4e13b6(0x17a))/0xa+-parseInt(_0x4e13b6(0x18a))/0xb;if(_0x95ef7d===_0x2c0a80)break;else _0x5c1ea0['push'](_0x5c1ea0['shift']());}catch(_0x5e6f12){_0x5c1ea0['push'](_0x5c1ea0['shift']());}}}(a182_0x1e47,0x62da6));export const DOCUMENT_KIND_FOLDERS={'goal':a182_0x1be7ba(0x18f),'item':a182_0x1be7ba(0x18c),'guide':a182_0x1be7ba(0x185),'note':'notes','reference':'references','workflow':a182_0x1be7ba(0x18e),'template':a182_0x1be7ba(0x188)};export const STALE_DONE_DAYS=0xe;export const STALE_VOID_DAYS=0x3;export const ALL_STATUSES=[a182_0x1be7ba(0x186),'todo',a182_0x1be7ba(0x18d),a182_0x1be7ba(0x187),'in_progress','review','done','void'];export const ALL_GUIDE_STATUSES=['proposed',a182_0x1be7ba(0x190),'deprecated',a182_0x1be7ba(0x17b)];export const KNOWLEDGE_KINDS=[a182_0x1be7ba(0x192),'guide',a182_0x1be7ba(0x17e)];function a182_0x1e47(){const _0x2b78fb=['goals','accepted','1USIipy','note','169128WUwEyR','4756380PRCmQR','superseded','2946525fZSXrJ','todo','reference','1297668BAbjvm','review','3826122eKgTSv','7zZVWBD','void','4UjReNh','guides','backlog','design_review','templates','171GAMLYK','9249295pbmpcM','629184CoLVje','items','planning','workflows'];a182_0x1e47=function(){return _0x2b78fb;};return a182_0x1e47();}function a182_0x24df(_0x13f89d,_0x128c5e){_0x13f89d=_0x13f89d-0x17a;const _0x1e476e=a182_0x1e47();let _0x24df0d=_0x1e476e[_0x13f89d];return _0x24df0d;}export const STATUS_PHASES={'Not\x20Started':[a182_0x1be7ba(0x186),a182_0x1be7ba(0x17d)],'Design':['planning',a182_0x1be7ba(0x187)],'Implementation':['in_progress',a182_0x1be7ba(0x180)],'Done':['done',a182_0x1be7ba(0x183)]};export const PRIORITY_ORDER={'critical':0x0,'high':0x1,'medium':0x2,'low':0x3};export const KIND_PRIORITY={'goal':0x6,'item':0x5,'guide':0x4,'note':0x3,'reference':0x2,'workflow':0x1,'template':0x0};
package/dist/sdk/user.js CHANGED
@@ -1 +1 @@
1
- function a183_0x568b(_0x3951a6,_0x5509ac){_0x3951a6=_0x3951a6-0xf8;const _0x20ca09=a183_0x20ca();let _0x568b86=_0x20ca09[_0x3951a6];return _0x568b86;}const a183_0x492e1f=a183_0x568b;(function(_0x4de4eb,_0x2e36df){const _0x2008b9=a183_0x568b,_0x147766=_0x4de4eb();while(!![]){try{const _0x3dfafa=-parseInt(_0x2008b9(0x106))/0x1*(parseInt(_0x2008b9(0x101))/0x2)+-parseInt(_0x2008b9(0x102))/0x3*(parseInt(_0x2008b9(0x110))/0x4)+-parseInt(_0x2008b9(0xf8))/0x5+-parseInt(_0x2008b9(0x108))/0x6*(parseInt(_0x2008b9(0x105))/0x7)+-parseInt(_0x2008b9(0x10d))/0x8*(parseInt(_0x2008b9(0xff))/0x9)+-parseInt(_0x2008b9(0x100))/0xa+parseInt(_0x2008b9(0x107))/0xb*(parseInt(_0x2008b9(0xfe))/0xc);if(_0x3dfafa===_0x2e36df)break;else _0x147766['push'](_0x147766['shift']());}catch(_0x5c8cb4){_0x147766['push'](_0x147766['shift']());}}}(a183_0x20ca,0x2184a));import{TDApiClient}from'./client/td-api-client.js';import{loadCachedUsers,saveCachedUsers,clearUserCache}from'../core/user-cache.js';function a183_0x20ca(){const _0xf91d78=['buildUserMaps','12lxQhfd','591966UBoTqk','2297460JTBRMu','4wjfaHR','9UUidqR','getCurrent','clearCache','91oAVdWJ','11593DTLJFF','8759377HlBQMR','107292soMgsY','toLowerCase','findByEmail','map','email','8kwtlMN','client','findById','73012Diddxb','265430XyUuAD','profile','find','list','buildIdToEmailMap'];a183_0x20ca=function(){return _0xf91d78;};return a183_0x20ca();}export class UserSDK{[a183_0x492e1f(0x10e)];[a183_0x492e1f(0xf9)];constructor(_0x188963){const _0x519d49=a183_0x492e1f;this[_0x519d49(0x10e)]=new TDApiClient(_0x188963),this[_0x519d49(0xf9)]=_0x188963[_0x519d49(0xf9)]||'default';}async[a183_0x492e1f(0x103)](){const _0x3d3545=a183_0x492e1f;return await this[_0x3d3545(0x10e)]['getUserInfo']();}async[a183_0x492e1f(0xfb)](_0x158183=![]){const _0x5dca88=a183_0x492e1f;if(!_0x158183){const _0x5e1c60=loadCachedUsers(this[_0x5dca88(0xf9)]);if(_0x5e1c60)return _0x5e1c60;}const _0x198774=await this[_0x5dca88(0x10e)]['listUsers']();return saveCachedUsers(this[_0x5dca88(0xf9)],_0x198774),_0x198774;}[a183_0x492e1f(0x104)](){const _0x24a5f8=a183_0x492e1f;clearUserCache(this[_0x24a5f8(0xf9)]);}async[a183_0x492e1f(0x10a)](_0x13fdc1){const _0x557629=a183_0x492e1f,_0xa3518c=await this['list']();return _0xa3518c['find'](_0x5bb603=>_0x5bb603[_0x557629(0x10c)]['toLowerCase']()===_0x13fdc1['toLowerCase']());}async[a183_0x492e1f(0x10f)](_0x3127ed){const _0x36f7ea=a183_0x492e1f,_0x575529=await this['list']();return _0x575529[_0x36f7ea(0xfa)](_0x5923c3=>_0x5923c3['id']===_0x3127ed);}async['buildEmailToIdMap'](){const _0x2f96ef=a183_0x492e1f,_0x215d14=await this[_0x2f96ef(0xfb)]();return new Map(_0x215d14[_0x2f96ef(0x10b)](_0x3a8d52=>[_0x3a8d52[_0x2f96ef(0x10c)][_0x2f96ef(0x109)](),_0x3a8d52['id']]));}async[a183_0x492e1f(0xfc)](){const _0x34c69f=a183_0x492e1f,_0x644044=await this['list']();return new Map(_0x644044[_0x34c69f(0x10b)](_0x5e7931=>[_0x5e7931['id'],_0x5e7931[_0x34c69f(0x10c)]]));}async[a183_0x492e1f(0xfd)](){const _0x33bde4=a183_0x492e1f,_0x8696e4=await this[_0x33bde4(0xfb)]();return{'emailToId':new Map(_0x8696e4[_0x33bde4(0x10b)](_0x336c20=>[_0x336c20[_0x33bde4(0x10c)][_0x33bde4(0x109)](),_0x336c20['id']])),'idToEmail':new Map(_0x8696e4[_0x33bde4(0x10b)](_0x333a93=>[_0x333a93['id'],_0x333a93[_0x33bde4(0x10c)]]))};}}
1
+ const a183_0x281285=a183_0x28bb;(function(_0x50b012,_0x28fb8c){const _0x367149=a183_0x28bb,_0x4fa416=_0x50b012();while(!![]){try{const _0x1ff83a=-parseInt(_0x367149(0x1ba))/0x1*(parseInt(_0x367149(0x1ae))/0x2)+-parseInt(_0x367149(0x1bc))/0x3+-parseInt(_0x367149(0x1b7))/0x4*(parseInt(_0x367149(0x1c6))/0x5)+parseInt(_0x367149(0x1ac))/0x6+-parseInt(_0x367149(0x1c4))/0x7*(-parseInt(_0x367149(0x1bf))/0x8)+parseInt(_0x367149(0x1b8))/0x9+parseInt(_0x367149(0x1b1))/0xa*(parseInt(_0x367149(0x1be))/0xb);if(_0x1ff83a===_0x28fb8c)break;else _0x4fa416['push'](_0x4fa416['shift']());}catch(_0x5070a7){_0x4fa416['push'](_0x4fa416['shift']());}}}(a183_0x1567,0x3d907));function a183_0x28bb(_0x14696b,_0x159abb){_0x14696b=_0x14696b-0x1ac;const _0x156702=a183_0x1567();let _0x28bb4e=_0x156702[_0x14696b];return _0x28bb4e;}import{TDApiClient}from'./client/td-api-client.js';import{loadCachedUsers,saveCachedUsers,clearUserCache}from'../core/user-cache.js';function a183_0x1567(){const _0x2c350a=['638391DshpYb','map','1615735kiBhRe','8ECKxjK','email','findById','buildUserMaps','client','2501093PnQQSH','getUserInfo','695UNJnIw','1240176gruFHa','clearCache','2186NepGiY','profile','getCurrent','10Egenus','listUsers','buildIdToEmailMap','find','buildEmailToIdMap','default','11956lpYvOu','2126052uKotdT','toLowerCase','61zYTAbK','list'];a183_0x1567=function(){return _0x2c350a;};return a183_0x1567();}export class UserSDK{[a183_0x281285(0x1c3)];[a183_0x281285(0x1af)];constructor(_0x234598){const _0x21f552=a183_0x281285;this[_0x21f552(0x1c3)]=new TDApiClient(_0x234598),this[_0x21f552(0x1af)]=_0x234598['profile']||_0x21f552(0x1b6);}async[a183_0x281285(0x1b0)](){const _0x5a2b29=a183_0x281285;return await this['client'][_0x5a2b29(0x1c5)]();}async[a183_0x281285(0x1bb)](_0xf44507=![]){const _0x1558d9=a183_0x281285;if(!_0xf44507){const _0x79f74e=loadCachedUsers(this[_0x1558d9(0x1af)]);if(_0x79f74e)return _0x79f74e;}const _0x1e62fe=await this['client'][_0x1558d9(0x1b2)]();return saveCachedUsers(this[_0x1558d9(0x1af)],_0x1e62fe),_0x1e62fe;}[a183_0x281285(0x1ad)](){const _0x4e2df3=a183_0x281285;clearUserCache(this[_0x4e2df3(0x1af)]);}async['findByEmail'](_0x546e25){const _0x17a9c7=a183_0x281285,_0x43b644=await this[_0x17a9c7(0x1bb)]();return _0x43b644[_0x17a9c7(0x1b4)](_0x49e705=>_0x49e705[_0x17a9c7(0x1c0)][_0x17a9c7(0x1b9)]()===_0x546e25[_0x17a9c7(0x1b9)]());}async[a183_0x281285(0x1c1)](_0x10154c){const _0x260644=await this['list']();return _0x260644['find'](_0x147073=>_0x147073['id']===_0x10154c);}async[a183_0x281285(0x1b5)](){const _0x4b9628=a183_0x281285,_0x1f9b9d=await this[_0x4b9628(0x1bb)]();return new Map(_0x1f9b9d[_0x4b9628(0x1bd)](_0x2a0dc7=>[_0x2a0dc7[_0x4b9628(0x1c0)][_0x4b9628(0x1b9)](),_0x2a0dc7['id']]));}async[a183_0x281285(0x1b3)](){const _0x4e65e2=a183_0x281285,_0x5dc6e3=await this[_0x4e65e2(0x1bb)]();return new Map(_0x5dc6e3[_0x4e65e2(0x1bd)](_0x59cb9c=>[_0x59cb9c['id'],_0x59cb9c[_0x4e65e2(0x1c0)]]));}async[a183_0x281285(0x1c2)](){const _0x5ba511=a183_0x281285,_0x5b3a9c=await this[_0x5ba511(0x1bb)]();return{'emailToId':new Map(_0x5b3a9c[_0x5ba511(0x1bd)](_0x176344=>[_0x176344['email'][_0x5ba511(0x1b9)](),_0x176344['id']])),'idToEmail':new Map(_0x5b3a9c[_0x5ba511(0x1bd)](_0x435dac=>[_0x435dac['id'],_0x435dac['email']]))};}}
@@ -1 +1 @@
1
- (function(_0x3faf81,_0x30d485){const _0x15554c=a184_0x94e3,_0x3fd0f3=_0x3faf81();while(!![]){try{const _0x248d22=parseInt(_0x15554c(0x78))/0x1*(-parseInt(_0x15554c(0x76))/0x2)+-parseInt(_0x15554c(0x6b))/0x3*(-parseInt(_0x15554c(0x6e))/0x4)+-parseInt(_0x15554c(0x74))/0x5+parseInt(_0x15554c(0x70))/0x6*(-parseInt(_0x15554c(0x6d))/0x7)+-parseInt(_0x15554c(0x80))/0x8*(parseInt(_0x15554c(0x7d))/0x9)+parseInt(_0x15554c(0x6a))/0xa*(parseInt(_0x15554c(0x71))/0xb)+parseInt(_0x15554c(0x73))/0xc*(parseInt(_0x15554c(0x7c))/0xd);if(_0x248d22===_0x30d485)break;else _0x3fd0f3['push'](_0x3fd0f3['shift']());}catch(_0x3f5761){_0x3fd0f3['push'](_0x3fd0f3['shift']());}}}(a184_0x49fb,0xa5e8b));export function detectFormatFromExtension(_0x4216d8){const _0x29eb99=a184_0x94e3,_0x374d12=_0x4216d8[_0x29eb99(0x7a)]()[_0x29eb99(0x7e)]('.')[_0x29eb99(0x72)]();switch(_0x374d12){case _0x29eb99(0x79):return _0x29eb99(0x79);case _0x29eb99(0x6f):return'jsonl';case _0x29eb99(0x6c):case _0x29eb99(0x7f):return'tsv';case _0x29eb99(0x77):case _0x29eb99(0x75):return _0x29eb99(0x7b);default:return undefined;}}export function resolveOutputFormat(_0x25eddf,_0x48390d,_0x1e7d5f){if(_0x25eddf)return _0x25eddf;if(_0x48390d){const _0x5e4d1e=detectFormatFromExtension(_0x48390d);if(_0x5e4d1e)return _0x5e4d1e;}return _0x1e7d5f;}function a184_0x94e3(_0x254adc,_0x1831f0){_0x254adc=_0x254adc-0x6a;const _0x49fba4=a184_0x49fb();let _0x94e38b=_0x49fba4[_0x254adc];return _0x94e38b;}function a184_0x49fb(){const _0x41ac28=['tab','1244584mtiUWX','20OYSARO','2305050hujzQc','tsv','2785048fyKkRm','4mdfWYS','jsonl','18keWrbB','5577792LPdlor','pop','48ilPwfC','1664445jGZZkk','text','2930EufikS','txt','857elKgim','json','toLowerCase','table','5962541TGlfes','9wNcLur','split'];a184_0x49fb=function(){return _0x41ac28;};return a184_0x49fb();}
1
+ function a184_0x16fb(_0x3e846b,_0xa42286){_0x3e846b=_0x3e846b-0x1f4;const _0x2e659d=a184_0x2e65();let _0x16fbdf=_0x2e659d[_0x3e846b];return _0x16fbdf;}(function(_0x581286,_0x46f3da){const _0x2c0c6f=a184_0x16fb,_0x5bcda4=_0x581286();while(!![]){try{const _0x59945c=-parseInt(_0x2c0c6f(0x201))/0x1+parseInt(_0x2c0c6f(0x1f4))/0x2*(-parseInt(_0x2c0c6f(0x1f8))/0x3)+parseInt(_0x2c0c6f(0x1fb))/0x4+parseInt(_0x2c0c6f(0x204))/0x5+parseInt(_0x2c0c6f(0x1fa))/0x6+parseInt(_0x2c0c6f(0x1fd))/0x7*(-parseInt(_0x2c0c6f(0x1fc))/0x8)+parseInt(_0x2c0c6f(0x1f9))/0x9*(parseInt(_0x2c0c6f(0x1ff))/0xa);if(_0x59945c===_0x46f3da)break;else _0x5bcda4['push'](_0x5bcda4['shift']());}catch(_0x347376){_0x5bcda4['push'](_0x5bcda4['shift']());}}}(a184_0x2e65,0xac2fe));export function detectFormatFromExtension(_0x4d0013){const _0x300990=a184_0x16fb,_0x5613f3=_0x4d0013[_0x300990(0x1f5)]()[_0x300990(0x202)]('.')[_0x300990(0x1f7)]();switch(_0x5613f3){case _0x300990(0x205):return _0x300990(0x205);case _0x300990(0x1f6):return _0x300990(0x1f6);case _0x300990(0x203):case _0x300990(0x1fe):return _0x300990(0x203);case'txt':case'text':return _0x300990(0x200);default:return undefined;}}export function resolveOutputFormat(_0x36974f,_0x41f9e4,_0x57d690){if(_0x36974f)return _0x36974f;if(_0x41f9e4){const _0x2defbb=detectFormatFromExtension(_0x41f9e4);if(_0x2defbb)return _0x2defbb;}return _0x57d690;}function a184_0x2e65(){const _0x2ba5de=['4476916CvvQIT','5268152FVliNL','7bMJqYr','tab','250VqfUSB','table','283340PEpOzl','split','tsv','3740980NicMLS','json','70ULzieg','toLowerCase','jsonl','pop','107376lvWQPy','17235bzpIsW','5907342OWfJRy'];a184_0x2e65=function(){return _0x2ba5de;};return a184_0x2e65();}
@@ -1 +1 @@
1
- (function(_0x35fd78,_0x2f61bb){const _0x641fb1=a185_0x32a5,_0x2da7e4=_0x35fd78();while(!![]){try{const _0x1c4b7a=parseInt(_0x641fb1(0x156))/0x1*(-parseInt(_0x641fb1(0x148))/0x2)+parseInt(_0x641fb1(0x137))/0x3*(-parseInt(_0x641fb1(0x15c))/0x4)+-parseInt(_0x641fb1(0x15b))/0x5*(parseInt(_0x641fb1(0x131))/0x6)+-parseInt(_0x641fb1(0x150))/0x7*(-parseInt(_0x641fb1(0x152))/0x8)+-parseInt(_0x641fb1(0x151))/0x9+parseInt(_0x641fb1(0x127))/0xa*(-parseInt(_0x641fb1(0x14c))/0xb)+parseInt(_0x641fb1(0x132))/0xc;if(_0x1c4b7a===_0x2f61bb)break;else _0x2da7e4['push'](_0x2da7e4['shift']());}catch(_0x4e647c){_0x2da7e4['push'](_0x2da7e4['shift']());}}}(a185_0x3854,0xa5a6c));import{centerAlign,stringWidth,padEnd,padStart}from'../../utils/string-utils.js';function a185_0x3854(){const _0x46e350=['type','int','true','No\x20rows\x20returned','6155dLrMVY','4jHFzTB','pow','min','\x20shown)','length','30PcgoyK','false','0\x20B','name','toLowerCase','test','floor','reduce','\x1b]8;;','join','1752gBBRPT','24564516dKeTpl','max','timestamp','jsonl','startsWith','1883661NYPhLX','\x20row','toFixed','number','map','log','\x20rows\x20(','stringify','json','slice','string','repeat','forEach','padEnd','data','table','push','322988mykWQz','boolean','substring','isTTY','1390334jhoBqF','long','replace','toISOString','1152655pdbfwf','6031683unCpyj','56zVVdds','entries','double','stdout','3Tymgyy'];a185_0x3854=function(){return _0x46e350;};return a185_0x3854();}import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../../utils/colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x253cc7=a185_0x32a5;return process[_0x253cc7(0x155)]['columns']||Infinity;}export function formatAsTable(_0x25f625,_0x2d2297=DEFAULT_MAX_DISPLAY_ROWS,_0x1f3862=![],_0x4e874e={}){const _0x36c545=a185_0x32a5;if(_0x25f625[_0x36c545(0x145)][_0x36c545(0x126)]===0x0)return _0x36c545(0x15a);const _0x37f9a5=_0x25f625['columns'][_0x36c545(0x13b)](_0x3cf42d=>_0x3cf42d['name']),_0x5a6660=_0x25f625['columns'][_0x36c545(0x13b)](_0x3d2785=>simplifyType(_0x3d2785[_0x36c545(0x157)])),_0x30218b=_0x25f625[_0x36c545(0x145)][_0x36c545(0x140)](0x0,_0x2d2297),_0x55dc6d=_0x25f625[_0x36c545(0x145)][_0x36c545(0x126)],_0x591bdc=_0x55dc6d>_0x2d2297,_0x25af7d=[],_0x44efcb=getTerminalWidth(),_0x5ddda9=_0x44efcb!==Infinity,_0x550f8d=0x32;let _0x4603ea=_0x37f9a5[_0x36c545(0x13b)]((_0x4afd77,_0xf42b4f)=>{const _0x453929=_0x36c545,_0x38debf=stringWidth(_0x5a6660[_0xf42b4f]),_0x37def4=Math[_0x453929(0x133)](..._0x30218b['map'](_0x5789b9=>{const _0x5a9c28=_0x5789b9[_0x4afd77];return stringWidth(formatValue(_0x5a9c28));})),_0x1e35a6=Math[_0x453929(0x133)](stringWidth(_0x4afd77),_0x38debf,_0x37def4);return _0x1f3862?_0x1e35a6:Math['min'](_0x1e35a6,_0x550f8d);});if(_0x5ddda9&&!_0x1f3862&&_0x37f9a5[_0x36c545(0x126)]>0x0){const _0x34232b=_0x42b4e6=>{let _0x5b6958=0x1;for(const _0x41b309 of _0x42b4e6){_0x5b6958+=_0x41b309+0x3;}return _0x5b6958+0x1;};let _0x49f7ca=_0x34232b(_0x4603ea);if(_0x49f7ca>_0x44efcb){const _0x2c7ac7=0x3;for(let _0x303a72=_0x4603ea['length']-0x1;_0x303a72>=0x0;_0x303a72--){_0x49f7ca=_0x34232b(_0x4603ea);if(_0x49f7ca<=_0x44efcb)break;const _0x53fa40=_0x4603ea[_0x303a72],_0x14fe92=_0x49f7ca-_0x44efcb,_0x38b21b=_0x53fa40-_0x2c7ac7,_0x2c42f8=Math[_0x36c545(0x124)](_0x14fe92,_0x38b21b);_0x2c42f8>0x0&&(_0x4603ea[_0x303a72]=_0x53fa40-_0x2c42f8);}}}const _0x4298c=_0x37f9a5,_0x398d5f=_0x5a6660,_0x2decff=_0x4603ea,_0x53f017=_0x4603ea;_0x25af7d[_0x36c545(0x147)](colorBorder('β”Œ'+_0x53f017['map'](_0x3e2660=>'─'[_0x36c545(0x142)](_0x3e2660+0x2))[_0x36c545(0x130)]('┬')+'┐',_0x4e874e));const _0x2c7347=_0x4298c[_0x36c545(0x13b)]((_0x1490a0,_0x467377)=>centerAlign(_0x1490a0,_0x2decff[_0x467377]));_0x25af7d[_0x36c545(0x147)](colorBorder('β”‚',_0x4e874e)+'\x20'+_0x2c7347['join']('\x20'+colorBorder('β”‚',_0x4e874e)+'\x20')+'\x20'+colorBorder('β”‚',_0x4e874e));const _0x36b917=_0x398d5f[_0x36c545(0x13b)]((_0x48244d,_0x120bb8)=>colorType(centerAlign(_0x48244d,_0x2decff[_0x120bb8]),_0x4e874e));_0x25af7d['push'](colorBorder('β”‚',_0x4e874e)+'\x20'+_0x36b917[_0x36c545(0x130)]('\x20'+colorBorder('β”‚',_0x4e874e)+'\x20')+'\x20'+colorBorder('β”‚',_0x4e874e)),_0x25af7d['push'](colorBorder('β”œ'+_0x53f017['map'](_0x194661=>'─'[_0x36c545(0x142)](_0x194661+0x2))[_0x36c545(0x130)]('β”Ό')+'─',_0x4e874e));const _0x140f33=(_0x167531,_0x367718)=>{const _0x31ffa0=_0x36c545,_0x414fdd=stringWidth(_0x167531);if(_0x414fdd<=_0x367718)return _0x167531;let _0x569c92=_0x167531;while(stringWidth(_0x569c92+'…')>_0x367718&&_0x569c92['length']>0x0){_0x569c92=_0x569c92[_0x31ffa0(0x140)](0x0,-0x1);}return _0x569c92+'…';};_0x30218b[_0x36c545(0x143)](_0x3a144d=>{const _0x2fe604=_0x36c545,_0x5d2fd3=_0x37f9a5[_0x2fe604(0x13b)]((_0x588759,_0x5203ad)=>{const _0xccedf=_0x2fe604,_0x5f0da9=_0x3a144d[_0x588759],_0x43cbd2=formatValue(_0x5f0da9),_0x1152a7=_0x2decff[_0x5203ad],_0x5fcb3f=_0x140f33(_0x43cbd2,_0x1152a7),_0x143ee9=typeof _0x5f0da9===_0xccedf(0x13a)||typeof _0x5f0da9==='string'&&/^-?\d+$/[_0xccedf(0x12c)](_0x5f0da9);return _0x143ee9?padStart(_0x5fcb3f,_0x1152a7):padEnd(_0x5fcb3f,_0x1152a7);});_0x25af7d['push'](colorBorder('β”‚',_0x4e874e)+'\x20'+_0x5d2fd3[_0x2fe604(0x130)]('\x20'+colorBorder('β”‚',_0x4e874e)+'\x20')+'\x20'+colorBorder('β”‚',_0x4e874e));});const _0x1a52f2=_0x53f017[_0x36c545(0x12e)]((_0x3d58a0,_0x3dbb71)=>_0x3d58a0+_0x3dbb71+0x3,-0x1);_0x25af7d[_0x36c545(0x147)](colorBorder('β”œ'+_0x53f017[_0x36c545(0x13b)](_0x53aa82=>'─'[_0x36c545(0x142)](_0x53aa82+0x2))['join']('β”΄')+'─',_0x4e874e));let _0x58f5ca;_0x591bdc?_0x58f5ca=_0x55dc6d+_0x36c545(0x13d)+_0x2d2297+_0x36c545(0x125):_0x58f5ca=_0x55dc6d+_0x36c545(0x138)+(_0x55dc6d===0x1?'':'s');const _0x2d9c4a=_0x58f5ca[_0x36c545(0x144)](_0x1a52f2-0x2);return _0x25af7d['push'](colorBorder('β”‚',_0x4e874e)+'\x20'+_0x2d9c4a+'\x20'+colorBorder('β”‚',_0x4e874e)),_0x25af7d[_0x36c545(0x147)](colorBorder('β””'+'─'[_0x36c545(0x142)](_0x1a52f2)+'β”˜',_0x4e874e)),_0x25af7d['join']('\x0a');}function simplifyType(_0x3c3e2c){const _0x4c1185=a185_0x32a5,_0x556857={'varchar':_0x4c1185(0x141),'bigint':_0x4c1185(0x14d),'integer':_0x4c1185(0x158),'double':_0x4c1185(0x154),'boolean':'bool','date':'date','timestamp':_0x4c1185(0x134),'array':'array','map':'map','row':'row'},_0x231a11=_0x3c3e2c[_0x4c1185(0x12b)]();for(const [_0x470294,_0x13db2f]of Object[_0x4c1185(0x153)](_0x556857)){if(_0x231a11[_0x4c1185(0x136)](_0x470294))return _0x13db2f;}return _0x3c3e2c['length']>0xa?_0x3c3e2c[_0x4c1185(0x14a)](0x0,0xa):_0x3c3e2c;}export function formatAsJSON(_0x1f7356,_0x3b2b8c={}){const _0x26976b=a185_0x32a5;if(_0x1f7356[_0x26976b(0x145)]['length']===0x0)return'[]';if(shouldUseColor(_0x3b2b8c))return colorizeJSON(_0x1f7356[_0x26976b(0x145)],_0x3b2b8c);const _0x5e88d3=_0x1f7356[_0x26976b(0x145)]['map'](_0x3bda31=>'\x20\x20'+JSON[_0x26976b(0x13e)](_0x3bda31));return'[\x0a'+_0x5e88d3[_0x26976b(0x130)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x3c0d8a,_0x228cd9={}){const _0x4565e6=a185_0x32a5;if(_0x3c0d8a[_0x4565e6(0x145)]['length']===0x0)return'';if(shouldUseColor(_0x228cd9))return _0x3c0d8a[_0x4565e6(0x145)]['map'](_0x5c2bd7=>colorizeJSONCompact(_0x5c2bd7,_0x228cd9))[_0x4565e6(0x130)]('\x0a');return _0x3c0d8a[_0x4565e6(0x145)]['map'](_0x3029e6=>JSON[_0x4565e6(0x13e)](_0x3029e6))[_0x4565e6(0x130)]('\x0a');}export function formatAsTSV(_0x5172e4){const _0x5be744=a185_0x32a5;if(_0x5172e4['data'][_0x5be744(0x126)]===0x0)return'';const _0xae39fa=[],_0x39a9f5=_0x5172e4['columns'][_0x5be744(0x13b)](_0x3838b9=>_0x3838b9[_0x5be744(0x12a)]);return _0xae39fa[_0x5be744(0x147)](_0x39a9f5[_0x5be744(0x130)]('\x09')),_0x5172e4[_0x5be744(0x145)][_0x5be744(0x143)](_0x49c096=>{const _0x2b8870=_0x5be744,_0x11c925=_0x39a9f5['map'](_0x1db78d=>{const _0x2b53ee=_0x49c096[_0x1db78d];return formatValueForTSV(_0x2b53ee);});_0xae39fa['push'](_0x11c925[_0x2b8870(0x130)]('\x09'));}),_0xae39fa[_0x5be744(0x130)]('\x0a');}function formatValue(_0x594cd6){const _0x189218=a185_0x32a5;if(_0x594cd6===null||_0x594cd6===undefined)return'';if(typeof _0x594cd6===_0x189218(0x141)){const _0x2eed5c=_0x594cd6[_0x189218(0x14e)](/\n/g,'\x5cn')[_0x189218(0x14e)](/\r/g,'\x5cr')[_0x189218(0x14e)](/\t/g,'\x5ct');return _0x2eed5c;}if(typeof _0x594cd6==='number')return String(_0x594cd6);if(typeof _0x594cd6==='boolean')return _0x594cd6?_0x189218(0x159):_0x189218(0x128);if(_0x594cd6 instanceof Date)return _0x594cd6[_0x189218(0x14f)]();if(typeof _0x594cd6==='object')return JSON[_0x189218(0x13e)](_0x594cd6);return String(_0x594cd6);}function formatValueForTSV(_0x4910a6){const _0x42436c=a185_0x32a5;if(_0x4910a6===null||_0x4910a6===undefined)return'';if(typeof _0x4910a6===_0x42436c(0x141))return _0x4910a6[_0x42436c(0x14e)](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x4910a6===_0x42436c(0x13a)||typeof _0x4910a6===_0x42436c(0x149))return String(_0x4910a6);if(_0x4910a6 instanceof Date)return _0x4910a6[_0x42436c(0x14f)]();if(typeof _0x4910a6==='object')return JSON[_0x42436c(0x13e)](_0x4910a6);return String(_0x4910a6);}export function formatQueryResult(_0x2e9fdc,_0x22ce6f){const _0x3698d0=a185_0x32a5;switch(_0x22ce6f){case _0x3698d0(0x146):return formatAsTable(_0x2e9fdc);case _0x3698d0(0x13f):return formatAsJSON(_0x2e9fdc);case _0x3698d0(0x135):return formatAsJSONL(_0x2e9fdc);case'tsv':return formatAsTSV(_0x2e9fdc);default:return formatAsJSON(_0x2e9fdc);}}function a185_0x32a5(_0x2a7080,_0x1814c0){_0x2a7080=_0x2a7080-0x124;const _0x385486=a185_0x3854();let _0x32a5e4=_0x385486[_0x2a7080];return _0x32a5e4;}export function formatBytes(_0x1c055b){const _0x26d511=a185_0x32a5;if(_0x1c055b===0x0)return _0x26d511(0x129);const _0x431177=['B','KB','MB','GB','TB'],_0x57a103=0x400,_0x32060c=Math[_0x26d511(0x12d)](Math[_0x26d511(0x13c)](_0x1c055b)/Math['log'](_0x57a103)),_0x1a5c03=_0x1c055b/Math[_0x26d511(0x15d)](_0x57a103,_0x32060c),_0x35889e=_0x1a5c03>=0xa?0x1:0x2;return _0x1a5c03[_0x26d511(0x139)](_0x35889e)+'\x20'+_0x431177[_0x32060c];}export function formatRows(_0x51b843){const _0x4e471b=a185_0x32a5;if(_0x51b843==null)return'-';if(_0x51b843===0x0)return'0';if(_0x51b843<0x3e8)return _0x51b843['toString']();const _0x387bf9=['','K','M','B','T'],_0x106ea3=0x3e8,_0x3e2968=Math[_0x4e471b(0x12d)](Math['log'](_0x51b843)/Math['log'](_0x106ea3)),_0x1cd680=_0x51b843/Math[_0x4e471b(0x15d)](_0x106ea3,_0x3e2968),_0x58035d=_0x1cd680>=0xa?0x1:0x2;return''+_0x1cd680['toFixed'](_0x58035d)+_0x387bf9[_0x3e2968];}export function hyperlink(_0x4407eb,_0x2d94e8){const _0x3b7702=a185_0x32a5;if(!process['stdout'][_0x3b7702(0x14b)])return _0x4407eb;return _0x3b7702(0x12f)+_0x2d94e8+'\x07'+_0x4407eb+'\x1b]8;;\x07';}
1
+ (function(_0x446190,_0x1e0263){const _0x5d3f0f=a185_0x1591,_0x2a8d79=_0x446190();while(!![]){try{const _0x41b5d8=-parseInt(_0x5d3f0f(0x1f7))/0x1+-parseInt(_0x5d3f0f(0x1ee))/0x2+parseInt(_0x5d3f0f(0x20d))/0x3+parseInt(_0x5d3f0f(0x202))/0x4*(parseInt(_0x5d3f0f(0x1fc))/0x5)+parseInt(_0x5d3f0f(0x20f))/0x6*(parseInt(_0x5d3f0f(0x211))/0x7)+parseInt(_0x5d3f0f(0x203))/0x8+parseInt(_0x5d3f0f(0x1e4))/0x9*(parseInt(_0x5d3f0f(0x1f3))/0xa);if(_0x41b5d8===_0x1e0263)break;else _0x2a8d79['push'](_0x2a8d79['shift']());}catch(_0x2b76f9){_0x2a8d79['push'](_0x2a8d79['shift']());}}}(a185_0x37da,0x2cea7));import{centerAlign,stringWidth,padEnd,padStart}from'../../utils/string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../../utils/colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x148f34=a185_0x1591;return process[_0x148f34(0x207)][_0x148f34(0x1e3)]||Infinity;}export function formatAsTable(_0xee59ee,_0x345b84=DEFAULT_MAX_DISPLAY_ROWS,_0x4ed612=![],_0x29a591={}){const _0x41d550=a185_0x1591;if(_0xee59ee[_0x41d550(0x212)][_0x41d550(0x1f8)]===0x0)return _0x41d550(0x1fa);const _0x291864=_0xee59ee['columns'][_0x41d550(0x20b)](_0x57da93=>_0x57da93[_0x41d550(0x1f1)]),_0x545eb8=_0xee59ee[_0x41d550(0x1e3)][_0x41d550(0x20b)](_0x162819=>simplifyType(_0x162819['type'])),_0x303b3f=_0xee59ee[_0x41d550(0x212)][_0x41d550(0x1fd)](0x0,_0x345b84),_0xb5d7f7=_0xee59ee[_0x41d550(0x212)][_0x41d550(0x1f8)],_0x3daaf0=_0xb5d7f7>_0x345b84,_0x534424=[],_0x17ea7b=getTerminalWidth(),_0x344949=_0x17ea7b!==Infinity,_0x4782b2=0x32;let _0x571f7f=_0x291864['map']((_0x4db9b2,_0x2cac5c)=>{const _0x246c3d=_0x41d550,_0x15af9c=stringWidth(_0x545eb8[_0x2cac5c]),_0xc50b28=Math[_0x246c3d(0x1ef)](..._0x303b3f[_0x246c3d(0x20b)](_0x131acc=>{const _0x276754=_0x131acc[_0x4db9b2];return stringWidth(formatValue(_0x276754));})),_0x5181d7=Math[_0x246c3d(0x1ef)](stringWidth(_0x4db9b2),_0x15af9c,_0xc50b28);return _0x4ed612?_0x5181d7:Math[_0x246c3d(0x1f5)](_0x5181d7,_0x4782b2);});if(_0x344949&&!_0x4ed612&&_0x291864['length']>0x0){const _0xf12fd5=_0xef00c2=>{let _0x52237b=0x1;for(const _0x5a1c46 of _0xef00c2){_0x52237b+=_0x5a1c46+0x3;}return _0x52237b+0x1;};let _0x4a5fe7=_0xf12fd5(_0x571f7f);if(_0x4a5fe7>_0x17ea7b){const _0x331176=0x3;for(let _0x56a1a6=_0x571f7f[_0x41d550(0x1f8)]-0x1;_0x56a1a6>=0x0;_0x56a1a6--){_0x4a5fe7=_0xf12fd5(_0x571f7f);if(_0x4a5fe7<=_0x17ea7b)break;const _0x3f0db4=_0x571f7f[_0x56a1a6],_0x37dd0b=_0x4a5fe7-_0x17ea7b,_0x453cf0=_0x3f0db4-_0x331176,_0x49691c=Math[_0x41d550(0x1f5)](_0x37dd0b,_0x453cf0);_0x49691c>0x0&&(_0x571f7f[_0x56a1a6]=_0x3f0db4-_0x49691c);}}}const _0x16e476=_0x291864,_0x501860=_0x545eb8,_0x51af84=_0x571f7f,_0x2dbf7c=_0x571f7f;_0x534424[_0x41d550(0x20c)](colorBorder('β”Œ'+_0x2dbf7c['map'](_0xf8c306=>'─'[_0x41d550(0x201)](_0xf8c306+0x2))[_0x41d550(0x1f2)]('┬')+'┐',_0x29a591));const _0x331b8d=_0x16e476[_0x41d550(0x20b)]((_0x3a6d86,_0x4e0411)=>centerAlign(_0x3a6d86,_0x51af84[_0x4e0411]));_0x534424[_0x41d550(0x20c)](colorBorder('β”‚',_0x29a591)+'\x20'+_0x331b8d['join']('\x20'+colorBorder('β”‚',_0x29a591)+'\x20')+'\x20'+colorBorder('β”‚',_0x29a591));const _0x4b0706=_0x501860[_0x41d550(0x20b)]((_0x1b26f7,_0x453f4d)=>colorType(centerAlign(_0x1b26f7,_0x51af84[_0x453f4d]),_0x29a591));_0x534424['push'](colorBorder('β”‚',_0x29a591)+'\x20'+_0x4b0706['join']('\x20'+colorBorder('β”‚',_0x29a591)+'\x20')+'\x20'+colorBorder('β”‚',_0x29a591)),_0x534424[_0x41d550(0x20c)](colorBorder('β”œ'+_0x2dbf7c[_0x41d550(0x20b)](_0x5542ce=>'─'['repeat'](_0x5542ce+0x2))[_0x41d550(0x1f2)]('β”Ό')+'─',_0x29a591));const _0x2069b6=(_0x24704a,_0x567527)=>{const _0x38f968=_0x41d550,_0x1f13eb=stringWidth(_0x24704a);if(_0x1f13eb<=_0x567527)return _0x24704a;let _0x3f07dd=_0x24704a;while(stringWidth(_0x3f07dd+'…')>_0x567527&&_0x3f07dd[_0x38f968(0x1f8)]>0x0){_0x3f07dd=_0x3f07dd[_0x38f968(0x1fd)](0x0,-0x1);}return _0x3f07dd+'…';};_0x303b3f[_0x41d550(0x209)](_0x3ce95d=>{const _0xe0e239=_0x41d550,_0x4affa9=_0x291864[_0xe0e239(0x20b)]((_0x297e6f,_0x5f1dc8)=>{const _0x436eac=_0xe0e239,_0x290a43=_0x3ce95d[_0x297e6f],_0x29b357=formatValue(_0x290a43),_0x1ec89a=_0x51af84[_0x5f1dc8],_0x35218d=_0x2069b6(_0x29b357,_0x1ec89a),_0xed6342=typeof _0x290a43===_0x436eac(0x1df)||typeof _0x290a43===_0x436eac(0x1e9)&&/^-?\d+$/['test'](_0x290a43);return _0xed6342?padStart(_0x35218d,_0x1ec89a):padEnd(_0x35218d,_0x1ec89a);});_0x534424[_0xe0e239(0x20c)](colorBorder('β”‚',_0x29a591)+'\x20'+_0x4affa9[_0xe0e239(0x1f2)]('\x20'+colorBorder('β”‚',_0x29a591)+'\x20')+'\x20'+colorBorder('β”‚',_0x29a591));});const _0x5995ca=_0x2dbf7c['reduce']((_0x2a6d28,_0xa51767)=>_0x2a6d28+_0xa51767+0x3,-0x1);_0x534424[_0x41d550(0x20c)](colorBorder('β”œ'+_0x2dbf7c[_0x41d550(0x20b)](_0x1ef2e7=>'─'[_0x41d550(0x201)](_0x1ef2e7+0x2))['join']('β”΄')+'─',_0x29a591));let _0x48d0cf;_0x3daaf0?_0x48d0cf=_0xb5d7f7+_0x41d550(0x1e7)+_0x345b84+_0x41d550(0x1f6):_0x48d0cf=_0xb5d7f7+_0x41d550(0x200)+(_0xb5d7f7===0x1?'':'s');const _0xadc17=_0x48d0cf[_0x41d550(0x1ed)](_0x5995ca-0x2);return _0x534424[_0x41d550(0x20c)](colorBorder('β”‚',_0x29a591)+'\x20'+_0xadc17+'\x20'+colorBorder('β”‚',_0x29a591)),_0x534424[_0x41d550(0x20c)](colorBorder('β””'+'─'[_0x41d550(0x201)](_0x5995ca)+'β”˜',_0x29a591)),_0x534424[_0x41d550(0x1f2)]('\x0a');}function simplifyType(_0x20fa31){const _0x39f65e=a185_0x1591,_0x16c654={'varchar':_0x39f65e(0x1e9),'bigint':_0x39f65e(0x1e0),'integer':_0x39f65e(0x1fe),'double':_0x39f65e(0x213),'boolean':_0x39f65e(0x20e),'date':_0x39f65e(0x1ff),'timestamp':'timestamp','array':'array','map':_0x39f65e(0x20b),'row':_0x39f65e(0x1f9)},_0x236377=_0x20fa31[_0x39f65e(0x204)]();for(const [_0x45074b,_0xdc8999]of Object['entries'](_0x16c654)){if(_0x236377['startsWith'](_0x45074b))return _0xdc8999;}return _0x20fa31['length']>0xa?_0x20fa31[_0x39f65e(0x20a)](0x0,0xa):_0x20fa31;}function a185_0x1591(_0x3bd7ec,_0x294003){_0x3bd7ec=_0x3bd7ec-0x1de;const _0x37da58=a185_0x37da();let _0x159171=_0x37da58[_0x3bd7ec];return _0x159171;}export function formatAsJSON(_0x1eaff2,_0x138730={}){const _0x1b8f9a=a185_0x1591;if(_0x1eaff2[_0x1b8f9a(0x212)][_0x1b8f9a(0x1f8)]===0x0)return'[]';if(shouldUseColor(_0x138730))return colorizeJSON(_0x1eaff2[_0x1b8f9a(0x212)],_0x138730);const _0x2d64d6=_0x1eaff2[_0x1b8f9a(0x212)][_0x1b8f9a(0x20b)](_0x11f6e4=>'\x20\x20'+JSON['stringify'](_0x11f6e4));return'[\x0a'+_0x2d64d6[_0x1b8f9a(0x1f2)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0xbde21c,_0x420289={}){const _0x2b9cd0=a185_0x1591;if(_0xbde21c['data'][_0x2b9cd0(0x1f8)]===0x0)return'';if(shouldUseColor(_0x420289))return _0xbde21c['data']['map'](_0x3d0c6b=>colorizeJSONCompact(_0x3d0c6b,_0x420289))['join']('\x0a');return _0xbde21c[_0x2b9cd0(0x212)]['map'](_0x5e244f=>JSON[_0x2b9cd0(0x214)](_0x5e244f))[_0x2b9cd0(0x1f2)]('\x0a');}export function formatAsTSV(_0x11be46){const _0x495660=a185_0x1591;if(_0x11be46[_0x495660(0x212)][_0x495660(0x1f8)]===0x0)return'';const _0xb959aa=[],_0x2c2a5b=_0x11be46[_0x495660(0x1e3)]['map'](_0x55d3f4=>_0x55d3f4['name']);return _0xb959aa['push'](_0x2c2a5b['join']('\x09')),_0x11be46[_0x495660(0x212)][_0x495660(0x209)](_0x335d2c=>{const _0x4d29ba=_0x495660,_0x573444=_0x2c2a5b[_0x4d29ba(0x20b)](_0x288a71=>{const _0x376cce=_0x335d2c[_0x288a71];return formatValueForTSV(_0x376cce);});_0xb959aa[_0x4d29ba(0x20c)](_0x573444['join']('\x09'));}),_0xb959aa[_0x495660(0x1f2)]('\x0a');}function a185_0x37da(){const _0x24260e=['toString','false','stdout','replace','forEach','substring','map','push','95130gaDcZr','bool','182304ECTaGd','object','35eZJlPs','data','double','stringify','boolean','number','long','log','toISOString','columns','27TzRRCP','floor','toFixed','\x20rows\x20(','pow','string','json','0\x20B','true','padEnd','395198AeZiKp','max','\x1b]8;;','name','join','447010ojPNCU','table','min','\x20shown)','258994gNYleE','length','row','No\x20rows\x20returned','jsonl','415qLwFXO','slice','int','date','\x20row','repeat','12372QCqGBY','528928YxAvlp','toLowerCase'];a185_0x37da=function(){return _0x24260e;};return a185_0x37da();}function formatValue(_0x42a132){const _0x5c0206=a185_0x1591;if(_0x42a132===null||_0x42a132===undefined)return'';if(typeof _0x42a132==='string'){const _0x2ac97b=_0x42a132[_0x5c0206(0x208)](/\n/g,'\x5cn')[_0x5c0206(0x208)](/\r/g,'\x5cr')[_0x5c0206(0x208)](/\t/g,'\x5ct');return _0x2ac97b;}if(typeof _0x42a132===_0x5c0206(0x1df))return String(_0x42a132);if(typeof _0x42a132===_0x5c0206(0x1de))return _0x42a132?_0x5c0206(0x1ec):_0x5c0206(0x206);if(_0x42a132 instanceof Date)return _0x42a132[_0x5c0206(0x1e2)]();if(typeof _0x42a132===_0x5c0206(0x210))return JSON[_0x5c0206(0x214)](_0x42a132);return String(_0x42a132);}function formatValueForTSV(_0xc70900){const _0x10cb9e=a185_0x1591;if(_0xc70900===null||_0xc70900===undefined)return'';if(typeof _0xc70900===_0x10cb9e(0x1e9))return _0xc70900[_0x10cb9e(0x208)](/\t/g,'\x5ct')[_0x10cb9e(0x208)](/\n/g,'\x5cn');if(typeof _0xc70900==='number'||typeof _0xc70900===_0x10cb9e(0x1de))return String(_0xc70900);if(_0xc70900 instanceof Date)return _0xc70900[_0x10cb9e(0x1e2)]();if(typeof _0xc70900===_0x10cb9e(0x210))return JSON[_0x10cb9e(0x214)](_0xc70900);return String(_0xc70900);}export function formatQueryResult(_0x38d064,_0x1249e2){const _0x5a09ad=a185_0x1591;switch(_0x1249e2){case _0x5a09ad(0x1f4):return formatAsTable(_0x38d064);case _0x5a09ad(0x1ea):return formatAsJSON(_0x38d064);case _0x5a09ad(0x1fb):return formatAsJSONL(_0x38d064);case'tsv':return formatAsTSV(_0x38d064);default:return formatAsJSON(_0x38d064);}}export function formatBytes(_0x2bd6c5){const _0x3df909=a185_0x1591;if(_0x2bd6c5===0x0)return _0x3df909(0x1eb);const _0x1065f5=['B','KB','MB','GB','TB'],_0x21d7f2=0x400,_0x14f191=Math[_0x3df909(0x1e5)](Math[_0x3df909(0x1e1)](_0x2bd6c5)/Math['log'](_0x21d7f2)),_0x1c9c88=_0x2bd6c5/Math[_0x3df909(0x1e8)](_0x21d7f2,_0x14f191),_0x22f81d=_0x1c9c88>=0xa?0x1:0x2;return _0x1c9c88[_0x3df909(0x1e6)](_0x22f81d)+'\x20'+_0x1065f5[_0x14f191];}export function formatRows(_0x57be31){const _0x5392e8=a185_0x1591;if(_0x57be31==null)return'-';if(_0x57be31===0x0)return'0';if(_0x57be31<0x3e8)return _0x57be31[_0x5392e8(0x205)]();const _0x348142=['','K','M','B','T'],_0x306a8d=0x3e8,_0x1a7a7d=Math[_0x5392e8(0x1e5)](Math[_0x5392e8(0x1e1)](_0x57be31)/Math['log'](_0x306a8d)),_0x35826e=_0x57be31/Math[_0x5392e8(0x1e8)](_0x306a8d,_0x1a7a7d),_0x56cb9a=_0x35826e>=0xa?0x1:0x2;return''+_0x35826e[_0x5392e8(0x1e6)](_0x56cb9a)+_0x348142[_0x1a7a7d];}export function hyperlink(_0x24b631,_0x592ad5){const _0x5d4ed9=a185_0x1591;if(!process[_0x5d4ed9(0x207)]['isTTY'])return _0x24b631;return _0x5d4ed9(0x1f0)+_0x592ad5+'\x07'+_0x24b631+'\x1b]8;;\x07';}
@@ -1 +1 @@
1
- function a186_0x2fd2(){var _0x4c0e30=['46235BqiUeG','467541fhaDcY','25321128fdWVVh','88005pHLOmH','80knEcLz','221928bSWcJa','2402090nwtEsK','112jXqbqa','3534454dovceO','130oaNDsp','11EZfSuT','12OUzJEU'];a186_0x2fd2=function(){return _0x4c0e30;};return a186_0x2fd2();}(function(_0x1b21cb,_0x5ab22d){var _0x49f84a=a186_0x3ce0,_0x2bd4d4=_0x1b21cb();while(!![]){try{var _0x136f16=parseInt(_0x49f84a(0x149))/0x1*(parseInt(_0x49f84a(0x148))/0x2)+-parseInt(_0x49f84a(0x14c))/0x3*(-parseInt(_0x49f84a(0x14d))/0x4)+-parseInt(_0x49f84a(0x152))/0x5*(parseInt(_0x49f84a(0x14e))/0x6)+-parseInt(_0x49f84a(0x151))/0x7+parseInt(_0x49f84a(0x150))/0x8*(-parseInt(_0x49f84a(0x14a))/0x9)+-parseInt(_0x49f84a(0x14f))/0xa+parseInt(_0x49f84a(0x147))/0xb*(parseInt(_0x49f84a(0x14b))/0xc);if(_0x136f16===_0x5ab22d)break;else _0x2bd4d4['push'](_0x2bd4d4['shift']());}catch(_0x3e3d4b){_0x2bd4d4['push'](_0x2bd4d4['shift']());}}}(a186_0x2fd2,0x83dc3));export*from'./formatters.js';export*from'./format-detector.js';export*from'./tree-formatter.js';function a186_0x3ce0(_0x451fac,_0x4b0256){_0x451fac=_0x451fac-0x147;var _0x2fd241=a186_0x2fd2();var _0x3ce008=_0x2fd241[_0x451fac];return _0x3ce008;}export*from'./paginate.js';
1
+ (function(_0x35790e,_0x15944d){var _0x50d1af=a186_0x3630,_0x38fc05=_0x35790e();while(!![]){try{var _0x36729d=-parseInt(_0x50d1af(0x1a1))/0x1+parseInt(_0x50d1af(0x1a2))/0x2+-parseInt(_0x50d1af(0x19f))/0x3*(-parseInt(_0x50d1af(0x1a0))/0x4)+parseInt(_0x50d1af(0x19d))/0x5+-parseInt(_0x50d1af(0x19a))/0x6+-parseInt(_0x50d1af(0x19e))/0x7*(parseInt(_0x50d1af(0x19c))/0x8)+-parseInt(_0x50d1af(0x199))/0x9*(-parseInt(_0x50d1af(0x19b))/0xa);if(_0x36729d===_0x15944d)break;else _0x38fc05['push'](_0x38fc05['shift']());}catch(_0x4381db){_0x38fc05['push'](_0x38fc05['shift']());}}}(a186_0xf23d,0x41ee5));export*from'./formatters.js';function a186_0x3630(_0x455f94,_0x3894a2){_0x455f94=_0x455f94-0x199;var _0xf23d81=a186_0xf23d();var _0x363026=_0xf23d81[_0x455f94];return _0x363026;}export*from'./format-detector.js';export*from'./tree-formatter.js';export*from'./paginate.js';function a186_0xf23d(){var _0x176a53=['8934399QEIavc','2268528fgkJFl','10MmSxWL','2056IhxHJo','484120yRtbjU','9653ASZlWM','3ovLxeM','127340sOcaCY','379945UwIUTE','522238YNSGSt'];a186_0xf23d=function(){return _0x176a53;};return a186_0xf23d();}
@@ -1 +1 @@
1
- (function(_0x34ba0d,_0x1f57c4){const _0x1e2162=a187_0x3c30,_0x35f13c=_0x34ba0d();while(!![]){try{const _0x1d0520=parseInt(_0x1e2162(0x185))/0x1*(parseInt(_0x1e2162(0x17f))/0x2)+parseInt(_0x1e2162(0x184))/0x3*(-parseInt(_0x1e2162(0x17b))/0x4)+parseInt(_0x1e2162(0x182))/0x5*(-parseInt(_0x1e2162(0x17c))/0x6)+parseInt(_0x1e2162(0x17e))/0x7+parseInt(_0x1e2162(0x186))/0x8*(-parseInt(_0x1e2162(0x183))/0x9)+-parseInt(_0x1e2162(0x180))/0xa+-parseInt(_0x1e2162(0x189))/0xb*(-parseInt(_0x1e2162(0x17d))/0xc);if(_0x1d0520===_0x1f57c4)break;else _0x35f13c['push'](_0x35f13c['shift']());}catch(_0x50454f){_0x35f13c['push'](_0x35f13c['shift']());}}}(a187_0x226d,0x309bd));function a187_0x3c30(_0x44efdd,_0x915e4d){_0x44efdd=_0x44efdd-0x17b;const _0x226dee=a187_0x226d();let _0x3c3030=_0x226dee[_0x44efdd];return _0x3c3030;}function a187_0x226d(){const _0x5d1578=['222357DoUZRh','1lLSXDl','16pnodZn','data','length','24046jIYZQK','min','isArray','8wSlxgR','402yNWOam','4404QECgcz','474418QdRvlW','344138UTyodZ','610100wDRSOd','slice','29550vWvAiL','1070037NJTAQr'];a187_0x226d=function(){return _0x5d1578;};return a187_0x226d();}export const PAGE_SIZE=0x64;export const MAX_PAGINATION_LIMIT=0x2710;export async function paginate(_0x38e171,_0x3e228b=MAX_PAGINATION_LIMIT,_0xe176f6=0x0){const _0x5a80e4=a187_0x3c30,_0x21884b=Math[_0x5a80e4(0x18a)](_0x3e228b,MAX_PAGINATION_LIMIT),_0x30c2de=[];let _0x388136=_0xe176f6;while(_0x30c2de[_0x5a80e4(0x188)]<_0x21884b){const _0x26cdb4=Math['min'](PAGE_SIZE,_0x21884b-_0x30c2de[_0x5a80e4(0x188)]),_0x308946=await _0x38e171(_0x26cdb4,_0x388136),_0x48b3e3=Array[_0x5a80e4(0x18b)](_0x308946[_0x5a80e4(0x187)])?_0x308946[_0x5a80e4(0x187)]:[_0x308946[_0x5a80e4(0x187)]];_0x30c2de['push'](..._0x48b3e3);if(_0x48b3e3[_0x5a80e4(0x188)]<_0x26cdb4)break;_0x388136+=_0x26cdb4;}return _0x30c2de[_0x5a80e4(0x188)]>_0x21884b?_0x30c2de[_0x5a80e4(0x181)](0x0,_0x21884b):_0x30c2de;}
1
+ (function(_0xba2810,_0x27b831){const _0x30cc84=a187_0x3f45,_0x1f036b=_0xba2810();while(!![]){try{const _0x73c560=parseInt(_0x30cc84(0x8b))/0x1+parseInt(_0x30cc84(0x81))/0x2+parseInt(_0x30cc84(0x83))/0x3*(parseInt(_0x30cc84(0x8c))/0x4)+parseInt(_0x30cc84(0x86))/0x5+parseInt(_0x30cc84(0x87))/0x6+-parseInt(_0x30cc84(0x84))/0x7+-parseInt(_0x30cc84(0x82))/0x8;if(_0x73c560===_0x27b831)break;else _0x1f036b['push'](_0x1f036b['shift']());}catch(_0x394c29){_0x1f036b['push'](_0x1f036b['shift']());}}}(a187_0x30a7,0xdbbd6));function a187_0x3f45(_0x5f0b0e,_0x1d2809){_0x5f0b0e=_0x5f0b0e-0x81;const _0x30a742=a187_0x30a7();let _0x3f456c=_0x30a742[_0x5f0b0e];return _0x3f456c;}export const PAGE_SIZE=0x64;export const MAX_PAGINATION_LIMIT=0x2710;export async function paginate(_0x1f77ac,_0x3023ef=MAX_PAGINATION_LIMIT,_0x373caa=0x0){const _0x3e4abb=a187_0x3f45,_0x1246cd=Math[_0x3e4abb(0x8d)](_0x3023ef,MAX_PAGINATION_LIMIT),_0x27a82a=[];let _0x554e01=_0x373caa;while(_0x27a82a[_0x3e4abb(0x88)]<_0x1246cd){const _0x3480f5=Math[_0x3e4abb(0x8d)](PAGE_SIZE,_0x1246cd-_0x27a82a[_0x3e4abb(0x88)]),_0x56628f=await _0x1f77ac(_0x3480f5,_0x554e01),_0x371ad7=Array[_0x3e4abb(0x85)](_0x56628f[_0x3e4abb(0x8e)])?_0x56628f[_0x3e4abb(0x8e)]:[_0x56628f[_0x3e4abb(0x8e)]];_0x27a82a[_0x3e4abb(0x89)](..._0x371ad7);if(_0x371ad7[_0x3e4abb(0x88)]<_0x3480f5)break;_0x554e01+=_0x3480f5;}return _0x27a82a[_0x3e4abb(0x88)]>_0x1246cd?_0x27a82a[_0x3e4abb(0x8a)](0x0,_0x1246cd):_0x27a82a;}function a187_0x30a7(){const _0x5aa322=['927350jOlLKH','913932siWQlE','length','push','slice','1791081sCgdyi','5932460MREETt','min','data','398182WCXwGj','21811904QNfcbL','3ZunKOn','1291759RANMXD','isArray'];a187_0x30a7=function(){return _0x5aa322;};return a187_0x30a7();}
@@ -1 +1 @@
1
- function a188_0x3698(){const _0x22d65d=['population','folder','length','(draft)','icon','displayName','paused','localeCompare','🎯\x20','sort','state','journeyBundleName','13067570ccugTw','showIcons','β”œβ”€β”€\x20','6044496huGasW','segmentCount','journey','segment','showTreeLines','type','getSegmentUrl','join','base','(paused)','indent','21496NKJZjF','completed','name','\x20journey','getJourneyUrl','push','9bvSfPp','draft','(completed)','journeyCount','sortKey','πŸ—ΊοΈ\x20','2811450QPmqkU','2579259isLQJc','\x20segment','(empty)','7JPCCHd','showMetadata','dim','children','folderCount','\x20\x20\x20','\x20\x20\x20\x20','launched','118UVGtTJ','268038iSlgym','4874616wyUNPZ','metadata'];a188_0x3698=function(){return _0x22d65d;};return a188_0x3698();}(function(_0x453baf,_0x336dc2){const _0x3453e6=a188_0x4247,_0x5edb0b=_0x453baf();while(!![]){try{const _0x10a38e=-parseInt(_0x3453e6(0x1e5))/0x1*(-parseInt(_0x3453e6(0x1cd))/0x2)+parseInt(_0x3453e6(0x1da))/0x3+parseInt(_0x3453e6(0x1e7))/0x4+-parseInt(_0x3453e6(0x1d9))/0x5+parseInt(_0x3453e6(0x1e6))/0x6*(-parseInt(_0x3453e6(0x1dd))/0x7)+-parseInt(_0x3453e6(0x1f8))/0x8+parseInt(_0x3453e6(0x1d3))/0x9*(-parseInt(_0x3453e6(0x1f5))/0xa);if(_0x10a38e===_0x336dc2)break;else _0x5edb0b['push'](_0x5edb0b['shift']());}catch(_0x5bc780){_0x5edb0b['push'](_0x5edb0b['shift']());}}}(a188_0x3698,0xa560d));function a188_0x4247(_0x39c795,_0x3649be){_0x39c795=_0x39c795-0x1c6;const _0x369836=a188_0x3698();let _0x424722=_0x369836[_0x39c795];return _0x424722;}import{formatRows,hyperlink}from'./formatters.js';import a188_0x90fc68 from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20','getSegmentUrl':undefined,'getJourneyUrl':undefined};export function formatTree(_0x23acb1,_0x105ab0={},_0x14aa85=0x0,_0x4f044f=''){const _0x29e9ea=a188_0x4247,_0x218f2a={...DEFAULT_OPTIONS,..._0x105ab0},_0x27abd7=[],_0x2f0ae4=[..._0x23acb1][_0x29e9ea(0x1f2)]((_0x2238f6,_0x570209)=>_0x2238f6[_0x29e9ea(0x1cf)][_0x29e9ea(0x1f0)](_0x570209[_0x29e9ea(0x1cf)],undefined,{'sensitivity':_0x29e9ea(0x1ca)}));for(let _0x374380=0x0;_0x374380<_0x2f0ae4[_0x29e9ea(0x1eb)];_0x374380++){const _0x551d8b=_0x2f0ae4[_0x374380],_0x17fd8d=_0x374380===_0x2f0ae4[_0x29e9ea(0x1eb)]-0x1;let _0x954df='';_0x14aa85>0x0&&(_0x954df+=_0x4f044f);_0x218f2a['showTreeLines']&&_0x14aa85>0x0&&(_0x954df+=a188_0x90fc68[_0x29e9ea(0x1df)](_0x17fd8d?'└──\x20':_0x29e9ea(0x1f7)));if(_0x218f2a[_0x29e9ea(0x1f6)]){if(_0x551d8b[_0x29e9ea(0x1c7)]===_0x29e9ea(0x1ea))_0x954df+='πŸ“\x20';else _0x551d8b[_0x29e9ea(0x1c7)]==='journey'?_0x954df+=_0x29e9ea(0x1d8):_0x954df+=_0x29e9ea(0x1f1);}if(_0x218f2a[_0x29e9ea(0x1c8)]&&_0x551d8b[_0x29e9ea(0x1c7)]===_0x29e9ea(0x1fb))_0x954df+=hyperlink(_0x551d8b['name'],_0x218f2a[_0x29e9ea(0x1c8)](_0x551d8b['id']));else _0x218f2a[_0x29e9ea(0x1d1)]&&_0x551d8b[_0x29e9ea(0x1c7)]===_0x29e9ea(0x1fa)?_0x954df+=hyperlink(_0x551d8b[_0x29e9ea(0x1cf)],_0x218f2a['getJourneyUrl'](_0x551d8b['id'])):_0x954df+=_0x551d8b[_0x29e9ea(0x1cf)];if(_0x218f2a[_0x29e9ea(0x1de)]){if(_0x551d8b[_0x29e9ea(0x1c7)]===_0x29e9ea(0x1ea)){const _0x5daaa8=[];_0x551d8b['metadata'][_0x29e9ea(0x1f9)]&&_0x5daaa8['push'](_0x551d8b[_0x29e9ea(0x1e8)]['segmentCount']+_0x29e9ea(0x1db)+(_0x551d8b['metadata'][_0x29e9ea(0x1f9)]!==0x1?'s':'')),_0x551d8b['metadata'][_0x29e9ea(0x1e1)]&&_0x5daaa8[_0x29e9ea(0x1d2)](_0x551d8b[_0x29e9ea(0x1e8)][_0x29e9ea(0x1e1)]+'\x20folder'+(_0x551d8b[_0x29e9ea(0x1e8)][_0x29e9ea(0x1e1)]!==0x1?'s':'')),_0x551d8b[_0x29e9ea(0x1e8)][_0x29e9ea(0x1d6)]&&_0x5daaa8[_0x29e9ea(0x1d2)](_0x551d8b[_0x29e9ea(0x1e8)][_0x29e9ea(0x1d6)]+_0x29e9ea(0x1d0)+(_0x551d8b[_0x29e9ea(0x1e8)][_0x29e9ea(0x1d6)]!==0x1?'s':'')),_0x5daaa8[_0x29e9ea(0x1eb)]>0x0&&(_0x954df+=a188_0x90fc68[_0x29e9ea(0x1df)]('\x20('+_0x5daaa8[_0x29e9ea(0x1c9)](',\x20')+')'));}else{if(_0x551d8b[_0x29e9ea(0x1c7)]===_0x29e9ea(0x1fb)&&_0x551d8b[_0x29e9ea(0x1e9)]!==undefined)_0x954df+=a188_0x90fc68[_0x29e9ea(0x1df)]('\x20('+formatRows(_0x551d8b[_0x29e9ea(0x1e9)])+')');else _0x551d8b[_0x29e9ea(0x1c7)]==='journey'&&_0x551d8b['state']&&(_0x954df+=a188_0x90fc68[_0x29e9ea(0x1df)]('\x20'+getJourneyStateIndicator(_0x551d8b[_0x29e9ea(0x1f3)])));}}_0x27abd7['push'](_0x954df);if(_0x551d8b['children']&&_0x551d8b[_0x29e9ea(0x1e0)]['length']>0x0){let _0x492264;if(_0x14aa85===0x0)_0x492264='';else _0x218f2a[_0x29e9ea(0x1c6)]?_0x492264=_0x4f044f+(_0x17fd8d?_0x29e9ea(0x1e3):a188_0x90fc68[_0x29e9ea(0x1df)]('β”‚')+_0x29e9ea(0x1e2)):_0x492264=_0x4f044f+_0x218f2a[_0x29e9ea(0x1cc)];const _0x4d22d5=formatTree(_0x551d8b[_0x29e9ea(0x1e0)],_0x218f2a,_0x14aa85+0x1,_0x492264);_0x27abd7[_0x29e9ea(0x1d2)](_0x4d22d5);}}return _0x27abd7[_0x29e9ea(0x1c9)]('\x0a');}export function formatFlatList(_0x6eb2d7,_0x3df7c6,_0x528586={},_0x333c17=[]){const _0x3bf028=a188_0x4247,_0x2554cc={...DEFAULT_OPTIONS,..._0x528586},_0x51e1b3=[];for(const _0x3521e7 of _0x6eb2d7){_0x51e1b3[_0x3bf028(0x1d2)]({'sortKey':_0x3521e7['name'],'displayName':_0x3521e7[_0x3bf028(0x1cf)],'icon':_0x2554cc[_0x3bf028(0x1f6)]?'πŸ“':'','metadata':undefined});}for(const _0x3f157c of _0x3df7c6){const _0xd1d1cb=_0x2554cc[_0x3bf028(0x1de)]&&_0x3f157c[_0x3bf028(0x1e9)]!==undefined?a188_0x90fc68[_0x3bf028(0x1df)]('\x20('+formatRows(_0x3f157c[_0x3bf028(0x1e9)])+')'):'',_0x1bb06d=_0x2554cc['getSegmentUrl']?hyperlink(_0x3f157c[_0x3bf028(0x1cf)],_0x2554cc[_0x3bf028(0x1c8)](_0x3f157c['id'])):_0x3f157c[_0x3bf028(0x1cf)];_0x51e1b3[_0x3bf028(0x1d2)]({'sortKey':_0x3f157c['name'],'displayName':_0x1bb06d,'icon':_0x2554cc[_0x3bf028(0x1f6)]?'🎯':'','metadata':_0xd1d1cb});}for(const _0x39934d of _0x333c17){const _0x1984bd=getJourneyStateIndicator(_0x39934d[_0x3bf028(0x1f3)]),_0x5adce3=_0x2554cc['showMetadata']?a188_0x90fc68[_0x3bf028(0x1df)]('\x20'+_0x1984bd):'',_0x2ddcd6=_0x2554cc[_0x3bf028(0x1d1)]?hyperlink(_0x39934d[_0x3bf028(0x1f4)],_0x2554cc[_0x3bf028(0x1d1)](_0x39934d['id'])):_0x39934d[_0x3bf028(0x1f4)];_0x51e1b3[_0x3bf028(0x1d2)]({'sortKey':_0x39934d[_0x3bf028(0x1f4)],'displayName':_0x2ddcd6,'icon':_0x2554cc[_0x3bf028(0x1f6)]?'πŸ—ΊοΈ':'','metadata':_0x5adce3});}_0x51e1b3[_0x3bf028(0x1f2)]((_0xe29534,_0x57ceb4)=>_0xe29534[_0x3bf028(0x1d7)][_0x3bf028(0x1f0)](_0x57ceb4[_0x3bf028(0x1d7)],undefined,{'sensitivity':_0x3bf028(0x1ca)}));if(_0x51e1b3[_0x3bf028(0x1eb)]===0x0)return _0x3bf028(0x1dc);const _0x1b6bc4=_0x51e1b3['map'](_0x4a1130=>{const _0x5c23ca=_0x3bf028,_0x43e90e=_0x4a1130[_0x5c23ca(0x1ed)]?_0x4a1130['icon']+'\x20':'',_0x43e516=_0x4a1130[_0x5c23ca(0x1e8)]||'';return''+_0x43e90e+_0x4a1130[_0x5c23ca(0x1ee)]+_0x43e516;});return _0x1b6bc4[_0x3bf028(0x1c9)]('\x0a');}function getJourneyStateIndicator(_0x25fe02){const _0x446851=a188_0x4247;switch(_0x25fe02){case _0x446851(0x1d4):return _0x446851(0x1ec);case _0x446851(0x1e4):return'(running)';case _0x446851(0x1ef):return _0x446851(0x1cb);case _0x446851(0x1ce):return _0x446851(0x1d5);default:return'('+_0x25fe02+')';}}
1
+ (function(_0x2d19fb,_0x56879d){const _0x57ef51=a188_0x58bd,_0x3dfd1e=_0x2d19fb();while(!![]){try{const _0x417c5c=-parseInt(_0x57ef51(0x176))/0x1+-parseInt(_0x57ef51(0x175))/0x2*(parseInt(_0x57ef51(0x179))/0x3)+-parseInt(_0x57ef51(0x164))/0x4*(-parseInt(_0x57ef51(0x159))/0x5)+-parseInt(_0x57ef51(0x181))/0x6+-parseInt(_0x57ef51(0x17e))/0x7*(parseInt(_0x57ef51(0x152))/0x8)+parseInt(_0x57ef51(0x17c))/0x9*(parseInt(_0x57ef51(0x15d))/0xa)+-parseInt(_0x57ef51(0x15b))/0xb*(-parseInt(_0x57ef51(0x15e))/0xc);if(_0x417c5c===_0x56879d)break;else _0x3dfd1e['push'](_0x3dfd1e['shift']());}catch(_0x38e2f6){_0x3dfd1e['push'](_0x3dfd1e['shift']());}}}(a188_0x52cf,0xb8087));import{formatRows,hyperlink}from'./formatters.js';import a188_0x4d23a6 from'chalk';function a188_0x58bd(_0x37dff1,_0x592aa9){_0x37dff1=_0x37dff1-0x150;const _0x52cf85=a188_0x52cf();let _0x58bd00=_0x52cf85[_0x37dff1];return _0x58bd00;}const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20','getSegmentUrl':undefined,'getJourneyUrl':undefined};export function formatTree(_0x2afca4,_0x11cfa6={},_0x29acd7=0x0,_0xcbcb8c=''){const _0x1edf54=a188_0x58bd,_0x8f03bd={...DEFAULT_OPTIONS,..._0x11cfa6},_0x31ee2e=[],_0x5729e3=[..._0x2afca4][_0x1edf54(0x184)]((_0x49e6dd,_0x2ca8eb)=>_0x49e6dd[_0x1edf54(0x161)][_0x1edf54(0x16a)](_0x2ca8eb[_0x1edf54(0x161)],undefined,{'sensitivity':'base'}));for(let _0x10f4b9=0x0;_0x10f4b9<_0x5729e3[_0x1edf54(0x171)];_0x10f4b9++){const _0x32f7ee=_0x5729e3[_0x10f4b9],_0x179d10=_0x10f4b9===_0x5729e3[_0x1edf54(0x171)]-0x1;let _0x179c3b='';_0x29acd7>0x0&&(_0x179c3b+=_0xcbcb8c);_0x8f03bd[_0x1edf54(0x180)]&&_0x29acd7>0x0&&(_0x179c3b+=a188_0x4d23a6[_0x1edf54(0x178)](_0x179d10?'└──\x20':_0x1edf54(0x155)));if(_0x8f03bd[_0x1edf54(0x17a)]){if(_0x32f7ee[_0x1edf54(0x158)]===_0x1edf54(0x15f))_0x179c3b+=_0x1edf54(0x17f);else _0x32f7ee[_0x1edf54(0x158)]===_0x1edf54(0x16d)?_0x179c3b+='πŸ—ΊοΈ\x20':_0x179c3b+=_0x1edf54(0x162);}if(_0x8f03bd[_0x1edf54(0x172)]&&_0x32f7ee[_0x1edf54(0x158)]==='segment')_0x179c3b+=hyperlink(_0x32f7ee[_0x1edf54(0x161)],_0x8f03bd[_0x1edf54(0x172)](_0x32f7ee['id']));else _0x8f03bd[_0x1edf54(0x151)]&&_0x32f7ee[_0x1edf54(0x158)]===_0x1edf54(0x16d)?_0x179c3b+=hyperlink(_0x32f7ee['name'],_0x8f03bd[_0x1edf54(0x151)](_0x32f7ee['id'])):_0x179c3b+=_0x32f7ee[_0x1edf54(0x161)];if(_0x8f03bd['showMetadata']){if(_0x32f7ee[_0x1edf54(0x158)]===_0x1edf54(0x15f)){const _0x27d1b2=[];_0x32f7ee[_0x1edf54(0x16c)][_0x1edf54(0x163)]&&_0x27d1b2[_0x1edf54(0x154)](_0x32f7ee[_0x1edf54(0x16c)][_0x1edf54(0x163)]+_0x1edf54(0x169)+(_0x32f7ee['metadata'][_0x1edf54(0x163)]!==0x1?'s':'')),_0x32f7ee[_0x1edf54(0x16c)][_0x1edf54(0x17d)]&&_0x27d1b2['push'](_0x32f7ee[_0x1edf54(0x16c)][_0x1edf54(0x17d)]+_0x1edf54(0x15a)+(_0x32f7ee['metadata']['folderCount']!==0x1?'s':'')),_0x32f7ee[_0x1edf54(0x16c)][_0x1edf54(0x16f)]&&_0x27d1b2[_0x1edf54(0x154)](_0x32f7ee[_0x1edf54(0x16c)][_0x1edf54(0x16f)]+_0x1edf54(0x16b)+(_0x32f7ee['metadata'][_0x1edf54(0x16f)]!==0x1?'s':'')),_0x27d1b2['length']>0x0&&(_0x179c3b+=a188_0x4d23a6[_0x1edf54(0x178)]('\x20('+_0x27d1b2[_0x1edf54(0x15c)](',\x20')+')'));}else{if(_0x32f7ee['type']==='segment'&&_0x32f7ee['population']!==undefined)_0x179c3b+=a188_0x4d23a6['dim']('\x20('+formatRows(_0x32f7ee[_0x1edf54(0x186)])+')');else _0x32f7ee[_0x1edf54(0x158)]===_0x1edf54(0x16d)&&_0x32f7ee[_0x1edf54(0x168)]&&(_0x179c3b+=a188_0x4d23a6[_0x1edf54(0x178)]('\x20'+getJourneyStateIndicator(_0x32f7ee[_0x1edf54(0x168)])));}}_0x31ee2e[_0x1edf54(0x154)](_0x179c3b);if(_0x32f7ee[_0x1edf54(0x166)]&&_0x32f7ee['children']['length']>0x0){let _0x171377;if(_0x29acd7===0x0)_0x171377='';else _0x8f03bd[_0x1edf54(0x180)]?_0x171377=_0xcbcb8c+(_0x179d10?'\x20\x20\x20\x20':a188_0x4d23a6[_0x1edf54(0x178)]('β”‚')+_0x1edf54(0x153)):_0x171377=_0xcbcb8c+_0x8f03bd[_0x1edf54(0x160)];const _0x447c46=formatTree(_0x32f7ee[_0x1edf54(0x166)],_0x8f03bd,_0x29acd7+0x1,_0x171377);_0x31ee2e[_0x1edf54(0x154)](_0x447c46);}}return _0x31ee2e['join']('\x0a');}function a188_0x52cf(){const _0x3e9197=['sort','map','population','icon','getJourneyUrl','33064SWYCDJ','\x20\x20\x20','push','β”œβ”€β”€\x20','(paused)','showMetadata','type','2954335zRCELy','\x20folder','3674bOCbPn','join','250caSOPM','81612IXGoJT','folder','indent','name','🎯\x20','segmentCount','4ylKsbA','journeyBundleName','children','completed','state','\x20segment','localeCompare','\x20journey','metadata','journey','(running)','journeyCount','launched','length','getSegmentUrl','(draft)','πŸ—ΊοΈ','108516RnmeAZ','1167304LOBHWZ','(completed)','dim','15jiZNNn','showIcons','base','210321LdlnaB','folderCount','21yXWxiP','πŸ“\x20','showTreeLines','7451004eevScI','draft','sortKey'];a188_0x52cf=function(){return _0x3e9197;};return a188_0x52cf();}export function formatFlatList(_0x5aff2b,_0x479baa,_0x2a98eb={},_0x23e7ac=[]){const _0x317a8e=a188_0x58bd,_0x1e59f1={...DEFAULT_OPTIONS,..._0x2a98eb},_0xc1f01b=[];for(const _0x17acc5 of _0x5aff2b){_0xc1f01b[_0x317a8e(0x154)]({'sortKey':_0x17acc5[_0x317a8e(0x161)],'displayName':_0x17acc5[_0x317a8e(0x161)],'icon':_0x1e59f1[_0x317a8e(0x17a)]?'πŸ“':'','metadata':undefined});}for(const _0x45ca01 of _0x479baa){const _0x52b675=_0x1e59f1[_0x317a8e(0x157)]&&_0x45ca01[_0x317a8e(0x186)]!==undefined?a188_0x4d23a6[_0x317a8e(0x178)]('\x20('+formatRows(_0x45ca01[_0x317a8e(0x186)])+')'):'',_0x25e73b=_0x1e59f1['getSegmentUrl']?hyperlink(_0x45ca01['name'],_0x1e59f1[_0x317a8e(0x172)](_0x45ca01['id'])):_0x45ca01[_0x317a8e(0x161)];_0xc1f01b[_0x317a8e(0x154)]({'sortKey':_0x45ca01[_0x317a8e(0x161)],'displayName':_0x25e73b,'icon':_0x1e59f1[_0x317a8e(0x17a)]?'🎯':'','metadata':_0x52b675});}for(const _0x1e80d5 of _0x23e7ac){const _0x3bca8b=getJourneyStateIndicator(_0x1e80d5['state']),_0x2ead62=_0x1e59f1[_0x317a8e(0x157)]?a188_0x4d23a6['dim']('\x20'+_0x3bca8b):'',_0x282904=_0x1e59f1[_0x317a8e(0x151)]?hyperlink(_0x1e80d5['journeyBundleName'],_0x1e59f1['getJourneyUrl'](_0x1e80d5['id'])):_0x1e80d5[_0x317a8e(0x165)];_0xc1f01b[_0x317a8e(0x154)]({'sortKey':_0x1e80d5[_0x317a8e(0x165)],'displayName':_0x282904,'icon':_0x1e59f1[_0x317a8e(0x17a)]?_0x317a8e(0x174):'','metadata':_0x2ead62});}_0xc1f01b['sort']((_0x5a4f28,_0x57f7eb)=>_0x5a4f28['sortKey'][_0x317a8e(0x16a)](_0x57f7eb[_0x317a8e(0x183)],undefined,{'sensitivity':_0x317a8e(0x17b)}));if(_0xc1f01b[_0x317a8e(0x171)]===0x0)return'(empty)';const _0x5f3929=_0xc1f01b[_0x317a8e(0x185)](_0x2ceff7=>{const _0x411af5=_0x317a8e,_0x3d8d97=_0x2ceff7[_0x411af5(0x150)]?_0x2ceff7['icon']+'\x20':'',_0x436176=_0x2ceff7[_0x411af5(0x16c)]||'';return''+_0x3d8d97+_0x2ceff7['displayName']+_0x436176;});return _0x5f3929['join']('\x0a');}function getJourneyStateIndicator(_0x4b043c){const _0x371b38=a188_0x58bd;switch(_0x4b043c){case _0x371b38(0x182):return _0x371b38(0x173);case _0x371b38(0x170):return _0x371b38(0x16e);case'paused':return _0x371b38(0x156);case _0x371b38(0x167):return _0x371b38(0x177);default:return'('+_0x4b043c+')';}}
@@ -1 +1 @@
1
- const a189_0x5bac47=a189_0x35f8;(function(_0x23b7a2,_0x20645c){const _0x21351e=a189_0x35f8,_0x592244=_0x23b7a2();while(!![]){try{const _0x377385=parseInt(_0x21351e(0x1f1))/0x1*(parseInt(_0x21351e(0x1ed))/0x2)+parseInt(_0x21351e(0x1ee))/0x3+parseInt(_0x21351e(0x1ff))/0x4+parseInt(_0x21351e(0x1ea))/0x5+-parseInt(_0x21351e(0x1f8))/0x6*(parseInt(_0x21351e(0x1fd))/0x7)+-parseInt(_0x21351e(0x1f9))/0x8*(-parseInt(_0x21351e(0x1f5))/0x9)+-parseInt(_0x21351e(0x200))/0xa;if(_0x377385===_0x20645c)break;else _0x592244['push'](_0x592244['shift']());}catch(_0x5d09ac){_0x592244['push'](_0x592244['shift']());}}}(a189_0x5d22,0xcd2c6));import{SDKError,ErrorCode}from'../errors.js';const GZIP_MAGIC=Buffer[a189_0x5bac47(0x1ef)]([0x1f,0x8b]),MIN_GZIP_SIZE=0x14;export function validateGzipArchive(_0x25f03c){const _0x19a5f7=a189_0x5bac47;if(_0x25f03c['length']<MIN_GZIP_SIZE)return{'isValid':![],'size':_0x25f03c[_0x19a5f7(0x1f7)],'error':{'message':_0x19a5f7(0x1f4)+_0x25f03c[_0x19a5f7(0x1f7)]+_0x19a5f7(0x1fb),'preview':getContentPreview(_0x25f03c),'helpText':'Check\x20if\x20the\x20project\x20exists\x20and\x20has\x20been\x20pushed\x20at\x20least\x20once.'}};if(!_0x25f03c[_0x19a5f7(0x1f6)](0x0,0x2)[_0x19a5f7(0x1f3)](GZIP_MAGIC)){const _0x5047f0=getContentPreview(_0x25f03c),_0x47db40=_0x5047f0?'\x20Server\x20response\x20preview:\x20'+_0x5047f0:'';return{'isValid':![],'size':_0x25f03c[_0x19a5f7(0x1f7)],'error':{'message':_0x19a5f7(0x1e9)+_0x47db40,'preview':_0x5047f0,'helpText':'The\x20server\x20may\x20have\x20returned\x20an\x20error\x20page\x20instead\x20of\x20the\x20archive.\x20Try\x20pushing\x20a\x20new\x20revision.'}};}return{'isValid':!![],'size':_0x25f03c[_0x19a5f7(0x1f7)]};}function a189_0x5d22(){const _0x4efbbb=['charCodeAt','19700KDhIqx','4763664ApSUYX','from','error','155xeZkvV','trim','equals','Downloaded\x20archive\x20is\x20too\x20small\x20(','5373lyCkSy','subarray','length','516426muwcNN','4184zJTdja','helpText','\x20bytes).\x20The\x20server\x20may\x20have\x20returned\x20an\x20error\x20or\x20empty\x20response.','toString','35wzGXHm','...','3266068zcxxVN','39322320ernBDz','message','filter','split','Downloaded\x20file\x20is\x20not\x20a\x20valid\x20gzip\x20archive.','4797955ZPQMff','WORKFLOW_ARCHIVE_CORRUPTED'];a189_0x5d22=function(){return _0x4efbbb;};return a189_0x5d22();}function getContentPreview(_0x204d35){const _0x46f99d=a189_0x5bac47;if(_0x204d35[_0x46f99d(0x1f7)]===0x0)return'(empty\x20response)';const _0x59cb7d=_0x204d35[_0x46f99d(0x1f6)](0x0,0xc8)[_0x46f99d(0x1fc)]('utf-8'),_0x4b26cc=_0x59cb7d[_0x46f99d(0x1e8)]('')[_0x46f99d(0x202)](_0x367269=>{const _0x226d59=_0x46f99d,_0x3c8105=_0x367269[_0x226d59(0x1ec)](0x0);return _0x3c8105>=0x20&&_0x3c8105<0x7f||_0x3c8105===0xa||_0x3c8105===0xd||_0x3c8105===0x9;})[_0x46f99d(0x1f7)],_0xb3cf=_0x4b26cc/_0x59cb7d[_0x46f99d(0x1f7)];if(_0xb3cf>0.8){const _0x4f14b0=_0x59cb7d['slice'](0x0,0x64)[_0x46f99d(0x1f2)]();return _0x4f14b0[_0x46f99d(0x1f7)]<_0x59cb7d[_0x46f99d(0x1f2)]()[_0x46f99d(0x1f7)]?_0x4f14b0+_0x46f99d(0x1fe):_0x4f14b0;}return undefined;}function a189_0x35f8(_0x500a16,_0xd736c7){_0x500a16=_0x500a16-0x1e8;const _0x5d2250=a189_0x5d22();let _0x35f846=_0x5d2250[_0x500a16];return _0x35f846;}export function throwArchiveValidationError(_0x47d587){const _0x56f852=a189_0x5bac47;if(!_0x47d587[_0x56f852(0x1f0)])throw new SDKError(ErrorCode[_0x56f852(0x1eb)],'Archive\x20validation\x20failed\x20with\x20unknown\x20error');throw new SDKError(ErrorCode['WORKFLOW_ARCHIVE_CORRUPTED'],_0x47d587['error'][_0x56f852(0x201)],undefined,{'helpText':_0x47d587['error'][_0x56f852(0x1fa)]});}
1
+ const a189_0x327d8c=a189_0x183d;(function(_0xab91b4,_0xba1deb){const _0x438e29=a189_0x183d,_0x4d4f76=_0xab91b4();while(!![]){try{const _0x3f64f1=-parseInt(_0x438e29(0x199))/0x1*(-parseInt(_0x438e29(0x1a2))/0x2)+parseInt(_0x438e29(0x191))/0x3*(parseInt(_0x438e29(0x18f))/0x4)+-parseInt(_0x438e29(0x19c))/0x5*(-parseInt(_0x438e29(0x1aa))/0x6)+parseInt(_0x438e29(0x1ae))/0x7*(-parseInt(_0x438e29(0x196))/0x8)+-parseInt(_0x438e29(0x198))/0x9*(-parseInt(_0x438e29(0x19a))/0xa)+parseInt(_0x438e29(0x190))/0xb*(parseInt(_0x438e29(0x194))/0xc)+parseInt(_0x438e29(0x197))/0xd*(-parseInt(_0x438e29(0x19b))/0xe);if(_0x3f64f1===_0xba1deb)break;else _0x4d4f76['push'](_0x4d4f76['shift']());}catch(_0x491add){_0x4d4f76['push'](_0x4d4f76['shift']());}}}(a189_0x22c5,0x82fe7));import{SDKError,ErrorCode}from'../errors.js';const GZIP_MAGIC=Buffer[a189_0x327d8c(0x1a4)]([0x1f,0x8b]),MIN_GZIP_SIZE=0x14;export function validateGzipArchive(_0xfa6e9f){const _0xa246bf=a189_0x327d8c;if(_0xfa6e9f['length']<MIN_GZIP_SIZE)return{'isValid':![],'size':_0xfa6e9f[_0xa246bf(0x1a6)],'error':{'message':_0xa246bf(0x1a1)+_0xfa6e9f['length']+'\x20bytes).\x20The\x20server\x20may\x20have\x20returned\x20an\x20error\x20or\x20empty\x20response.','preview':getContentPreview(_0xfa6e9f),'helpText':_0xa246bf(0x1a0)}};if(!_0xfa6e9f[_0xa246bf(0x195)](0x0,0x2)['equals'](GZIP_MAGIC)){const _0x3a14ff=getContentPreview(_0xfa6e9f),_0x2ddb86=_0x3a14ff?'\x20Server\x20response\x20preview:\x20'+_0x3a14ff:'';return{'isValid':![],'size':_0xfa6e9f[_0xa246bf(0x1a6)],'error':{'message':_0xa246bf(0x193)+_0x2ddb86,'preview':_0x3a14ff,'helpText':_0xa246bf(0x1ad)}};}return{'isValid':!![],'size':_0xfa6e9f[_0xa246bf(0x1a6)]};}function getContentPreview(_0x140978){const _0x2f8e21=a189_0x327d8c;if(_0x140978[_0x2f8e21(0x1a6)]===0x0)return _0x2f8e21(0x19f);const _0x27da97=_0x140978[_0x2f8e21(0x195)](0x0,0xc8)[_0x2f8e21(0x1ac)](_0x2f8e21(0x18e)),_0x2dd851=_0x27da97['split']('')[_0x2f8e21(0x1a9)](_0x5acf0b=>{const _0x343af2=_0x2f8e21,_0xcfbb08=_0x5acf0b[_0x343af2(0x1a3)](0x0);return _0xcfbb08>=0x20&&_0xcfbb08<0x7f||_0xcfbb08===0xa||_0xcfbb08===0xd||_0xcfbb08===0x9;})[_0x2f8e21(0x1a6)],_0x23c0d6=_0x2dd851/_0x27da97['length'];if(_0x23c0d6>0.8){const _0x12a387=_0x27da97['slice'](0x0,0x64)[_0x2f8e21(0x1a5)]();return _0x12a387[_0x2f8e21(0x1a6)]<_0x27da97[_0x2f8e21(0x1a5)]()['length']?_0x12a387+_0x2f8e21(0x1a7):_0x12a387;}return undefined;}function a189_0x183d(_0x773bc7,_0x4b5df8){_0x773bc7=_0x773bc7-0x18e;const _0x22c5b3=a189_0x22c5();let _0x183daf=_0x22c5b3[_0x773bc7];return _0x183daf;}export function throwArchiveValidationError(_0x4a876f){const _0x47df62=a189_0x327d8c;if(!_0x4a876f['error'])throw new SDKError(ErrorCode['WORKFLOW_ARCHIVE_CORRUPTED'],_0x47df62(0x19d));throw new SDKError(ErrorCode[_0x47df62(0x192)],_0x4a876f[_0x47df62(0x19e)][_0x47df62(0x1a8)],undefined,{'helpText':_0x4a876f[_0x47df62(0x19e)][_0x47df62(0x1ab)]});}function a189_0x22c5(){const _0xcef688=['from','trim','length','...','message','filter','6CYjdMr','helpText','toString','The\x20server\x20may\x20have\x20returned\x20an\x20error\x20page\x20instead\x20of\x20the\x20archive.\x20Try\x20pushing\x20a\x20new\x20revision.','8617SkCtKk','utf-8','4KHVFKW','52580GYzLuS','2044443ajJtDT','WORKFLOW_ARCHIVE_CORRUPTED','Downloaded\x20file\x20is\x20not\x20a\x20valid\x20gzip\x20archive.','84UeSHYa','subarray','872vVRNHx','80275HZMHdL','2275965yBIAoz','10tFHenc','10hkNlFW','2758DjPHfX','449795KZnmKE','Archive\x20validation\x20failed\x20with\x20unknown\x20error','error','(empty\x20response)','Check\x20if\x20the\x20project\x20exists\x20and\x20has\x20been\x20pushed\x20at\x20least\x20once.','Downloaded\x20archive\x20is\x20too\x20small\x20(','165884ZKPiKF','charCodeAt'];a189_0x22c5=function(){return _0xcef688;};return a189_0x22c5();}
@@ -1 +1 @@
1
- (function(_0x464867,_0x57544e){const _0xc08e77=a190_0x56f5,_0xa77382=_0x464867();while(!![]){try{const _0x1b02ea=-parseInt(_0xc08e77(0x172))/0x1*(-parseInt(_0xc08e77(0x179))/0x2)+parseInt(_0xc08e77(0x17b))/0x3*(-parseInt(_0xc08e77(0x17a))/0x4)+parseInt(_0xc08e77(0x176))/0x5+parseInt(_0xc08e77(0x18e))/0x6*(parseInt(_0xc08e77(0x17c))/0x7)+parseInt(_0xc08e77(0x175))/0x8*(parseInt(_0xc08e77(0x184))/0x9)+parseInt(_0xc08e77(0x18f))/0xa*(-parseInt(_0xc08e77(0x177))/0xb)+-parseInt(_0xc08e77(0x18a))/0xc*(parseInt(_0xc08e77(0x171))/0xd);if(_0x1b02ea===_0x57544e)break;else _0xa77382['push'](_0xa77382['shift']());}catch(_0x38f2ff){_0xa77382['push'](_0xa77382['shift']());}}}(a190_0x3384,0xd01b0));function a190_0x3384(){const _0x5ea4b4=['revision','readdir','uploadProjectArchive','isDirectory','tdx-wf-clone-','tar','23841vJPnfD','access','length','replace','find','listProjects','36250008wpYULj','name','filter','push','8246094TmLmMT','2040bCUBdW','sourceProjectName','Source\x20directory\x20not\x20found:\x20','join','data','create','No\x20','13uyFEmr','163ENhjKJ','sourceDir','mkdtemp','5112qMMeGY','1187760WsufTB','28171ChsuAr','workflow_project','18214oVsIIh','500KAZDAx','9441HyvPPG','7Vclfax','newProjectName'];a190_0x3384=function(){return _0x5ea4b4;};return a190_0x3384();}import{promises as a190_0x5a5ad7}from'fs';import a190_0x1fb482 from'path';import a190_0x1071b7 from'os';import{tryFindWorkflowTdxConfig}from'./tdx-config.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';export async function prepareCloneWorkflow(_0x4ada2e,_0x5d3aae,_0x6de6c,_0x39313c={}){const _0x24c625=a190_0x56f5,{client:_0x4cb061}=_0x4ada2e,_0x267220=a190_0x1fb482['resolve'](_0x5d3aae);try{await a190_0x5a5ad7[_0x24c625(0x185)](_0x267220);}catch{throw new Error(_0x24c625(0x191)+_0x5d3aae);}const _0xecdff=tryFindWorkflowTdxConfig(_0x267220),_0x123c80=_0xecdff?.['config'][_0x24c625(0x178)],_0x4123f5=_0x39313c['revision']||new Date()['toISOString']()[_0x24c625(0x187)](/[:.]/g,'-');if(!_0x39313c['skipValidation']){const _0x287fdd=await a190_0x5a5ad7[_0x24c625(0x17f)](_0x267220),_0x583186=_0x287fdd[_0x24c625(0x18c)](_0x4c3430=>_0x4c3430['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x583186[_0x24c625(0x186)]===0x0)throw new Error(_0x24c625(0x170)+WORKFLOW_FILE_EXTENSION+'\x20workflow\x20files\x20found\x20in\x20'+_0x267220);}const _0x1b336f=await getProjectFiles(_0x267220);let _0x28fd64=![],_0x54bbe7;try{const _0x41efd7=await _0x4cb061[_0x24c625(0x189)]({'name_pattern':_0x6de6c}),_0x1128b9=_0x41efd7[_0x24c625(0x193)][_0x24c625(0x188)](_0x4697a3=>_0x4697a3[_0x24c625(0x18b)]===_0x6de6c);_0x1128b9&&(_0x28fd64=!![],_0x54bbe7=_0x1128b9['id']);}catch{}return{'sourceDir':_0x267220,'sourceProjectName':_0x123c80,'newProjectName':_0x6de6c,'revision':_0x4123f5,'fileCount':_0x1b336f[_0x24c625(0x186)],'files':_0x1b336f,'targetExists':_0x28fd64,'existingProjectId':_0x54bbe7};}function a190_0x56f5(_0x50c5bc,_0x55d957){_0x50c5bc=_0x50c5bc-0x170;const _0x338446=a190_0x3384();let _0x56f5e2=_0x338446[_0x50c5bc];return _0x56f5e2;}export async function executeCloneWorkflow(_0x2ee8a0,_0x25d0a3){const _0x149077=a190_0x56f5,_0x21d28c=await import(_0x149077(0x183)),{client:_0x135d15}=_0x2ee8a0,_0x27c423=await getProjectFiles(_0x25d0a3[_0x149077(0x173)]),_0x5766d0=await a190_0x5a5ad7[_0x149077(0x174)](a190_0x1fb482[_0x149077(0x192)](a190_0x1071b7['tmpdir'](),_0x149077(0x182))),_0x4d68a4=a190_0x1fb482[_0x149077(0x192)](_0x5766d0,'archive.tar.gz');try{await _0x21d28c[_0x149077(0x194)]({'file':_0x4d68a4,'gzip':!![],'cwd':_0x25d0a3[_0x149077(0x173)],'portable':!![]},_0x27c423);const _0x45515f=await _0x135d15[_0x149077(0x180)](_0x25d0a3[_0x149077(0x17d)],_0x25d0a3[_0x149077(0x17e)],_0x4d68a4);return{'sourceDir':_0x25d0a3['sourceDir'],'sourceProjectName':_0x25d0a3[_0x149077(0x190)],'newProjectName':_0x45515f[_0x149077(0x18b)],'newProjectId':_0x45515f['id'],'revision':_0x45515f['revision'],'fileCount':_0x27c423[_0x149077(0x186)],'files':_0x27c423};}finally{await a190_0x5a5ad7['rm'](_0x5766d0,{'recursive':!![],'force':!![]});}}async function getProjectFiles(_0x17add9,_0x3b7cc9=''){const _0x4b1dc9=a190_0x56f5,_0x106ae1=[],_0x39d5d6=await a190_0x5a5ad7[_0x4b1dc9(0x17f)](_0x17add9,{'withFileTypes':!![]});for(const _0x4fe6d4 of _0x39d5d6){const _0x447593=_0x3b7cc9?a190_0x1fb482[_0x4b1dc9(0x192)](_0x3b7cc9,_0x4fe6d4[_0x4b1dc9(0x18b)]):_0x4fe6d4[_0x4b1dc9(0x18b)];if(_0x4fe6d4[_0x4b1dc9(0x18b)]==='tdx.json')continue;if(!shouldIncludeInArchive(_0x4fe6d4[_0x4b1dc9(0x18b)]))continue;if(_0x4fe6d4[_0x4b1dc9(0x181)]()){const _0x5b3fb4=await getProjectFiles(a190_0x1fb482[_0x4b1dc9(0x192)](_0x17add9,_0x4fe6d4[_0x4b1dc9(0x18b)]),_0x447593);_0x106ae1[_0x4b1dc9(0x18d)](..._0x5b3fb4);}else _0x106ae1['push'](_0x447593);}return _0x106ae1;}
1
+ (function(_0x18921d,_0x37e127){const _0x46daf6=a190_0x21fd,_0x506008=_0x18921d();while(!![]){try{const _0x203254=-parseInt(_0x46daf6(0xc3))/0x1+-parseInt(_0x46daf6(0xb0))/0x2*(parseInt(_0x46daf6(0xb8))/0x3)+-parseInt(_0x46daf6(0xbf))/0x4*(-parseInt(_0x46daf6(0xcc))/0x5)+-parseInt(_0x46daf6(0xb6))/0x6+parseInt(_0x46daf6(0xab))/0x7+parseInt(_0x46daf6(0xb7))/0x8*(-parseInt(_0x46daf6(0xc7))/0x9)+parseInt(_0x46daf6(0xbe))/0xa*(parseInt(_0x46daf6(0xc6))/0xb);if(_0x203254===_0x37e127)break;else _0x506008['push'](_0x506008['shift']());}catch(_0x56aaee){_0x506008['push'](_0x506008['shift']());}}}(a190_0x417f,0x49aac));import{promises as a190_0x493d5c}from'fs';import a190_0x2a1414 from'path';function a190_0x21fd(_0x220ca2,_0x166f28){_0x220ca2=_0x220ca2-0xab;const _0x417f69=a190_0x417f();let _0x21fd9c=_0x417f69[_0x220ca2];return _0x21fd9c;}import a190_0x284bac from'os';function a190_0x417f(){const _0x5905b6=['1912326lMttJE','64hNAlZi','34053hNAIzd','filter','sourceProjectName','isDirectory','tar','config','5099570gHAyIX','868qkKoIF','Source\x20directory\x20not\x20found:\x20','resolve','find','90871yIVWcK','uploadProjectArchive','name','11MnEJCV','41634YEuODf','listProjects','revision','archive.tar.gz','data','10245NUDTuS','tdx.json','join','sourceDir','1257788RmRWkm','tmpdir','access','newProjectName','create','68nOGqLT','tdx-wf-clone-','\x20workflow\x20files\x20found\x20in\x20','push','length','workflow_project'];a190_0x417f=function(){return _0x5905b6;};return a190_0x417f();}import{tryFindWorkflowTdxConfig}from'./tdx-config.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';export async function prepareCloneWorkflow(_0x8205a7,_0x3f57c7,_0x11f712,_0x29d9ca={}){const _0x55ee65=a190_0x21fd,{client:_0x483822}=_0x8205a7,_0x4e8414=a190_0x2a1414[_0x55ee65(0xc1)](_0x3f57c7);try{await a190_0x493d5c[_0x55ee65(0xad)](_0x4e8414);}catch{throw new Error(_0x55ee65(0xc0)+_0x3f57c7);}const _0x28d98c=tryFindWorkflowTdxConfig(_0x4e8414),_0x2b2780=_0x28d98c?.[_0x55ee65(0xbd)][_0x55ee65(0xb5)],_0x50e46a=_0x29d9ca['revision']||new Date()['toISOString']()['replace'](/[:.]/g,'-');if(!_0x29d9ca['skipValidation']){const _0xe5eea7=await a190_0x493d5c['readdir'](_0x4e8414),_0x284396=_0xe5eea7[_0x55ee65(0xb9)](_0x21ab01=>_0x21ab01['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x284396[_0x55ee65(0xb4)]===0x0)throw new Error('No\x20'+WORKFLOW_FILE_EXTENSION+_0x55ee65(0xb2)+_0x4e8414);}const _0x405259=await getProjectFiles(_0x4e8414);let _0x5f2a2c=![],_0x59a4a9;try{const _0x4b67e5=await _0x483822[_0x55ee65(0xc8)]({'name_pattern':_0x11f712}),_0x648c78=_0x4b67e5[_0x55ee65(0xcb)][_0x55ee65(0xc2)](_0x326bb8=>_0x326bb8[_0x55ee65(0xc5)]===_0x11f712);_0x648c78&&(_0x5f2a2c=!![],_0x59a4a9=_0x648c78['id']);}catch{}return{'sourceDir':_0x4e8414,'sourceProjectName':_0x2b2780,'newProjectName':_0x11f712,'revision':_0x50e46a,'fileCount':_0x405259[_0x55ee65(0xb4)],'files':_0x405259,'targetExists':_0x5f2a2c,'existingProjectId':_0x59a4a9};}export async function executeCloneWorkflow(_0xdd41e8,_0x427471){const _0x3d618b=a190_0x21fd,_0x12fbdd=await import(_0x3d618b(0xbc)),{client:_0x1a4338}=_0xdd41e8,_0x58b7cc=await getProjectFiles(_0x427471['sourceDir']),_0xecd5ff=await a190_0x493d5c['mkdtemp'](a190_0x2a1414['join'](a190_0x284bac[_0x3d618b(0xac)](),_0x3d618b(0xb1))),_0x5d7c2f=a190_0x2a1414['join'](_0xecd5ff,_0x3d618b(0xca));try{await _0x12fbdd[_0x3d618b(0xaf)]({'file':_0x5d7c2f,'gzip':!![],'cwd':_0x427471[_0x3d618b(0xcf)],'portable':!![]},_0x58b7cc);const _0x2bbbd2=await _0x1a4338[_0x3d618b(0xc4)](_0x427471[_0x3d618b(0xae)],_0x427471['revision'],_0x5d7c2f);return{'sourceDir':_0x427471[_0x3d618b(0xcf)],'sourceProjectName':_0x427471[_0x3d618b(0xba)],'newProjectName':_0x2bbbd2[_0x3d618b(0xc5)],'newProjectId':_0x2bbbd2['id'],'revision':_0x2bbbd2[_0x3d618b(0xc9)],'fileCount':_0x58b7cc['length'],'files':_0x58b7cc};}finally{await a190_0x493d5c['rm'](_0xecd5ff,{'recursive':!![],'force':!![]});}}async function getProjectFiles(_0x4a06b4,_0x59c6df=''){const _0x1b8d3b=a190_0x21fd,_0x1741d7=[],_0x3950dc=await a190_0x493d5c['readdir'](_0x4a06b4,{'withFileTypes':!![]});for(const _0x429609 of _0x3950dc){const _0x19090e=_0x59c6df?a190_0x2a1414[_0x1b8d3b(0xce)](_0x59c6df,_0x429609[_0x1b8d3b(0xc5)]):_0x429609[_0x1b8d3b(0xc5)];if(_0x429609[_0x1b8d3b(0xc5)]===_0x1b8d3b(0xcd))continue;if(!shouldIncludeInArchive(_0x429609[_0x1b8d3b(0xc5)]))continue;if(_0x429609[_0x1b8d3b(0xbb)]()){const _0x317a1e=await getProjectFiles(a190_0x2a1414[_0x1b8d3b(0xce)](_0x4a06b4,_0x429609[_0x1b8d3b(0xc5)]),_0x19090e);_0x1741d7[_0x1b8d3b(0xb3)](..._0x317a1e);}else _0x1741d7[_0x1b8d3b(0xb3)](_0x19090e);}return _0x1741d7;}