@treasuredata/tdx 2026.8.0 → 2026.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) 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.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.d.ts +9 -0
  12. package/dist/commands/auth-command.d.ts.map +1 -1
  13. package/dist/commands/auth-command.js +1 -1
  14. package/dist/commands/auth-command.js.map +1 -1
  15. package/dist/commands/cas-command.js +1 -1
  16. package/dist/commands/cas-segment-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/claude-command.d.ts +10 -1
  19. package/dist/commands/claude-command.d.ts.map +1 -1
  20. package/dist/commands/claude-command.js +1 -1
  21. package/dist/commands/claude-command.js.map +1 -1
  22. package/dist/commands/claude-statusline-command.js +1 -1
  23. package/dist/commands/claude-usage-command.js +1 -1
  24. package/dist/commands/command.js +1 -1
  25. package/dist/commands/connection-command.js +1 -1
  26. package/dist/commands/databases.js +1 -1
  27. package/dist/commands/delivery-command.js +1 -1
  28. package/dist/commands/describe.js +1 -1
  29. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  30. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  31. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  32. package/dist/commands/engage-campaign-pull-command.js +1 -1
  33. package/dist/commands/engage-campaign-push-command.js +1 -1
  34. package/dist/commands/engage-campaign-validate-command.js +1 -1
  35. package/dist/commands/engage-command.js +1 -1
  36. package/dist/commands/engage-template-pull-command.js +1 -1
  37. package/dist/commands/engage-template-push-command.js +1 -1
  38. package/dist/commands/engage-template-validate-command.js +1 -1
  39. package/dist/commands/job-command.js +1 -1
  40. package/dist/commands/journey-command.js +1 -1
  41. package/dist/commands/journey-validate-command.js +1 -1
  42. package/dist/commands/llm-command.js +1 -1
  43. package/dist/commands/mcp-command.js +1 -1
  44. package/dist/commands/parent-segment-command.js +1 -1
  45. package/dist/commands/policy-command.js +1 -1
  46. package/dist/commands/profile-command.js +1 -1
  47. package/dist/commands/profiles-command.js +1 -1
  48. package/dist/commands/query-command.js +1 -1
  49. package/dist/commands/schedule-command.js +1 -1
  50. package/dist/commands/segment-command.js +1 -1
  51. package/dist/commands/segment-create-command.js +1 -1
  52. package/dist/commands/segment-fields-command.js +1 -1
  53. package/dist/commands/segment-move-command.js +1 -1
  54. package/dist/commands/segment-pull-command.js +1 -1
  55. package/dist/commands/segment-push-command.js +1 -1
  56. package/dist/commands/segment-update-command.js +1 -1
  57. package/dist/commands/segment-use-command.js +1 -1
  58. package/dist/commands/segment-validate-command.js +1 -1
  59. package/dist/commands/segments.js +1 -1
  60. package/dist/commands/show.js +1 -1
  61. package/dist/commands/status-command.js +1 -1
  62. package/dist/commands/table-deleted.js +1 -1
  63. package/dist/commands/tables.js +1 -1
  64. package/dist/commands/unset-command.js +1 -1
  65. package/dist/commands/upgrade-command.js +1 -1
  66. package/dist/commands/use-command.js +1 -1
  67. package/dist/commands/user-command.js +1 -1
  68. package/dist/commands/work-command.js +1 -1
  69. package/dist/commands/workflow-command.js +1 -1
  70. package/dist/core/auth.js +1 -1
  71. package/dist/core/command-output.js +1 -1
  72. package/dist/core/config.js +1 -1
  73. package/dist/core/connection-cache.js +1 -1
  74. package/dist/core/constants.js +1 -1
  75. package/dist/core/credential-cache.js +1 -1
  76. package/dist/core/global-context.js +1 -1
  77. package/dist/core/keychain.js +1 -1
  78. package/dist/core/oauth-keychain.js +1 -1
  79. package/dist/core/oauth.js +1 -1
  80. package/dist/core/profile.js +1 -1
  81. package/dist/core/project-config.js +1 -1
  82. package/dist/core/session.js +1 -1
  83. package/dist/core/site-mismatch.js +1 -1
  84. package/dist/core/user-cache.js +1 -1
  85. package/dist/core/version.js +1 -1
  86. package/dist/index.js +1 -1
  87. package/dist/mcp/server.js +1 -1
  88. package/dist/mcp/tools/index.js +1 -1
  89. package/dist/mcp/tools/tdx-run.js +1 -1
  90. package/dist/mcp/tools/tdx-search.js +1 -1
  91. package/dist/mcp/tools/work-create-item.js +1 -1
  92. package/dist/mcp/utils.js +1 -1
  93. package/dist/proxy/claude-usage-tracker.js +1 -1
  94. package/dist/proxy/passthrough-server.js +1 -1
  95. package/dist/proxy/sse-usage-parser.js +1 -1
  96. package/dist/sdk/agent/agent-config.js +1 -1
  97. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  98. package/dist/sdk/agent/agent-yaml.js +1 -1
  99. package/dist/sdk/agent/test/evaluator.js +1 -1
  100. package/dist/sdk/agent/test/executor.js +1 -1
  101. package/dist/sdk/agent/test/index.js +1 -1
  102. package/dist/sdk/agent/test/output.js +1 -1
  103. package/dist/sdk/agent/test/parser.js +1 -1
  104. package/dist/sdk/agent/tool-target-registry.js +1 -1
  105. package/dist/sdk/api.js +1 -1
  106. package/dist/sdk/auth-token.d.ts +23 -0
  107. package/dist/sdk/auth-token.d.ts.map +1 -0
  108. package/dist/sdk/auth-token.js +1 -0
  109. package/dist/sdk/auth-token.js.map +1 -0
  110. package/dist/sdk/cas/cas-api-client.js +1 -1
  111. package/dist/sdk/cas/cas-audience-schema.d.ts +2 -0
  112. package/dist/sdk/cas/cas-audience-schema.d.ts.map +1 -1
  113. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  114. package/dist/sdk/cas/cas-audience-schema.js.map +1 -1
  115. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  116. package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -1
  117. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  118. package/dist/sdk/cas/cas-audience-yaml.js.map +1 -1
  119. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  120. package/dist/sdk/cas/index.js +1 -1
  121. package/dist/sdk/cas/pull-workflow.js +1 -1
  122. package/dist/sdk/cas/push-workflow.d.ts.map +1 -1
  123. package/dist/sdk/cas/push-workflow.js +1 -1
  124. package/dist/sdk/cas/push-workflow.js.map +1 -1
  125. package/dist/sdk/cas/types.d.ts +2 -0
  126. package/dist/sdk/cas/types.d.ts.map +1 -1
  127. package/dist/sdk/cas/validate-files.js +1 -1
  128. package/dist/sdk/client/cdp-api-client.js +1 -1
  129. package/dist/sdk/client/delivery-api-client.js +1 -1
  130. package/dist/sdk/client/endpoints.js +1 -1
  131. package/dist/sdk/client/engage-api-client.js +1 -1
  132. package/dist/sdk/client/http-client.js +1 -1
  133. package/dist/sdk/client/llm-api-client.js +1 -1
  134. package/dist/sdk/client/oauth-refresh.js +1 -1
  135. package/dist/sdk/client/rate-limiter.js +1 -1
  136. package/dist/sdk/client/td-api-client.js +1 -1
  137. package/dist/sdk/client/trino-api-client.js +1 -1
  138. package/dist/sdk/client/workflow-client.js +1 -1
  139. package/dist/sdk/connection-validator.js +1 -1
  140. package/dist/sdk/connection.js +1 -1
  141. package/dist/sdk/delivery.js +1 -1
  142. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  143. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  144. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  145. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  146. package/dist/sdk/engage/campaign-pull.js +1 -1
  147. package/dist/sdk/engage/campaign-push.js +1 -1
  148. package/dist/sdk/engage/campaign-validator.js +1 -1
  149. package/dist/sdk/engage/campaign-yaml.js +1 -1
  150. package/dist/sdk/engage/template-pull.js +1 -1
  151. package/dist/sdk/engage/template-push.js +1 -1
  152. package/dist/sdk/engage/template-validator.js +1 -1
  153. package/dist/sdk/engage/template-yaml.js +1 -1
  154. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  155. package/dist/sdk/engage/types/campaign-def.js +1 -1
  156. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  157. package/dist/sdk/engage/types/template-schema.js +1 -1
  158. package/dist/sdk/engage.js +1 -1
  159. package/dist/sdk/errors.js +1 -1
  160. package/dist/sdk/index.js +1 -1
  161. package/dist/sdk/io/index.js +1 -1
  162. package/dist/sdk/io/node-filesystem.js +1 -1
  163. package/dist/sdk/job.js +1 -1
  164. package/dist/sdk/journey.js +1 -1
  165. package/dist/sdk/llm/chat-cache.js +1 -1
  166. package/dist/sdk/llm/index.js +1 -1
  167. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  168. package/dist/sdk/llm/model-factors.js +1 -1
  169. package/dist/sdk/llm/user-settings.js +1 -1
  170. package/dist/sdk/personalization.js +1 -1
  171. package/dist/sdk/policy.js +1 -1
  172. package/dist/sdk/query/deleted-table-validation.js +1 -1
  173. package/dist/sdk/query/index.js +1 -1
  174. package/dist/sdk/query/sql-parser.js +1 -1
  175. package/dist/sdk/realtime.js +1 -1
  176. package/dist/sdk/schedule.js +1 -1
  177. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  178. package/dist/sdk/segment/fields-display.js +1 -1
  179. package/dist/sdk/segment/file-discovery.js +1 -1
  180. package/dist/sdk/segment/journey-utils.js +1 -1
  181. package/dist/sdk/segment/journey-validator.js +1 -1
  182. package/dist/sdk/segment/journey-yaml.js +1 -1
  183. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  184. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  185. package/dist/sdk/segment/pull-workflow.js +1 -1
  186. package/dist/sdk/segment/push-recovery.js +1 -1
  187. package/dist/sdk/segment/push-workflow.js +1 -1
  188. package/dist/sdk/segment/resolution-context.js +1 -1
  189. package/dist/sdk/segment/segment-path-parser.js +1 -1
  190. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  191. package/dist/sdk/segment/segment-validator.js +1 -1
  192. package/dist/sdk/segment/target-resolution.js +1 -1
  193. package/dist/sdk/segment/tdx-config.js +1 -1
  194. package/dist/sdk/segment/types/activation-schema.js +1 -1
  195. package/dist/sdk/segment/types/journey-def.js +1 -1
  196. package/dist/sdk/segment/types/journey-schema.js +1 -1
  197. package/dist/sdk/segment/types/segment-def.js +1 -1
  198. package/dist/sdk/segment/types/segment-schema.js +1 -1
  199. package/dist/sdk/segment/validate-files.js +1 -1
  200. package/dist/sdk/segment/yaml-validator.js +1 -1
  201. package/dist/sdk/segment.js +1 -1
  202. package/dist/sdk/types/cas.d.ts +4 -0
  203. package/dist/sdk/types/cas.d.ts.map +1 -1
  204. package/dist/sdk/types/index.js +1 -1
  205. package/dist/sdk/types/progress.js +1 -1
  206. package/dist/sdk/types/workspace.js +1 -1
  207. package/dist/sdk/user.js +1 -1
  208. package/dist/sdk/util/format-detector.js +1 -1
  209. package/dist/sdk/util/formatters.js +1 -1
  210. package/dist/sdk/util/index.js +1 -1
  211. package/dist/sdk/util/paginate.js +1 -1
  212. package/dist/sdk/util/tree-formatter.js +1 -1
  213. package/dist/sdk/util/tree-search.js +1 -1
  214. package/dist/sdk/workflow/archive-validation.js +1 -1
  215. package/dist/sdk/workflow/clone-workflow.js +1 -1
  216. package/dist/sdk/workflow/index.js +1 -1
  217. package/dist/sdk/workflow/pull-workflow.js +1 -1
  218. package/dist/sdk/workflow/push-workflow.js +1 -1
  219. package/dist/sdk/workflow/task-graph.js +1 -1
  220. package/dist/sdk/workflow/tdx-config.js +1 -1
  221. package/dist/sdk/workflow/workflow-utils.js +1 -1
  222. package/dist/sdk/workspace/access-tracker.js +1 -1
  223. package/dist/sdk/workspace/frontmatter.js +1 -1
  224. package/dist/sdk/workspace/git.js +1 -1
  225. package/dist/sdk/workspace/index.js +1 -1
  226. package/dist/sdk/workspace/templates.js +1 -1
  227. package/dist/sdk/workspace/weekly.js +1 -1
  228. package/dist/sdk/workspace/wikilinks.js +1 -1
  229. package/dist/test-utils/command-runner.js +1 -1
  230. package/dist/test-utils/factories.js +1 -1
  231. package/dist/test-utils/fixtures.js +1 -1
  232. package/dist/test-utils/http-mock.js +1 -1
  233. package/dist/test-utils/index.js +1 -1
  234. package/dist/utils/async.js +1 -1
  235. package/dist/utils/claude-code-state.js +1 -1
  236. package/dist/utils/colors.js +1 -1
  237. package/dist/utils/diff.js +1 -1
  238. package/dist/utils/file-permissions.js +1 -1
  239. package/dist/utils/file-reader.js +1 -1
  240. package/dist/utils/github-releases.js +1 -1
  241. package/dist/utils/global-cache.js +1 -1
  242. package/dist/utils/json-loader.js +1 -1
  243. package/dist/utils/local-cache.js +1 -1
  244. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  245. package/dist/utils/logger/formatters/index.js +1 -1
  246. package/dist/utils/logger/handlers/console-handler.js +1 -1
  247. package/dist/utils/logger/handlers/file-handler.js +1 -1
  248. package/dist/utils/logger/handlers/index.js +1 -1
  249. package/dist/utils/logger/handlers/null-handler.js +1 -1
  250. package/dist/utils/logger/index.js +1 -1
  251. package/dist/utils/logger/logger.js +1 -1
  252. package/dist/utils/logger/types.js +1 -1
  253. package/dist/utils/option-validation.js +1 -1
  254. package/dist/utils/process.js +1 -1
  255. package/dist/utils/prompt.js +1 -1
  256. package/dist/utils/proxy-fetch.js +1 -1
  257. package/dist/utils/spinner.js +1 -1
  258. package/dist/utils/sse-parser.js +1 -1
  259. package/dist/utils/string-utils.js +1 -1
  260. package/dist/utils/table-ref-parser.js +1 -1
  261. package/dist/utils/tdx-logger.js +1 -1
  262. package/dist/utils/version-check.js +1 -1
  263. package/package.json +1 -1
@@ -1 +1 @@
1
- const a34_0x5c22ff=a34_0x335d;(function(_0x63fb7b,_0x131e06){const _0x28b9b4=a34_0x335d,_0x49f845=_0x63fb7b();while(!![]){try{const _0x107c6c=-parseInt(_0x28b9b4(0x2cf))/0x1*(parseInt(_0x28b9b4(0x25a))/0x2)+-parseInt(_0x28b9b4(0x37a))/0x3+-parseInt(_0x28b9b4(0x29a))/0x4*(parseInt(_0x28b9b4(0x346))/0x5)+-parseInt(_0x28b9b4(0x2ce))/0x6*(parseInt(_0x28b9b4(0x32e))/0x7)+-parseInt(_0x28b9b4(0x361))/0x8*(parseInt(_0x28b9b4(0x234))/0x9)+-parseInt(_0x28b9b4(0x30c))/0xa*(parseInt(_0x28b9b4(0x283))/0xb)+-parseInt(_0x28b9b4(0x2ed))/0xc*(-parseInt(_0x28b9b4(0x316))/0xd);if(_0x107c6c===_0x131e06)break;else _0x49f845['push'](_0x49f845['shift']());}catch(_0x2b80c4){_0x49f845['push'](_0x49f845['shift']());}}}(a34_0x139b,0x8be33));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a34_0x46e5f8 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a34_0x2ac66a from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a34_0x5c22ff(0x20c),LEGACY_PARENT_SEGMENT_DIR=a34_0x5c22ff(0x1d2);function openBrowser(_0x33ebf4){const _0x1fce7d=a34_0x5c22ff,_0x3eca67=process[_0x1fce7d(0x20d)],_0x4a490b=_0x3eca67===_0x1fce7d(0x26e)?_0x1fce7d(0x2fb):_0x3eca67==='win32'?_0x1fce7d(0x2f7):'xdg-open';spawn(_0x4a490b,[_0x33ebf4],{'detached':!![],'stdio':_0x1fce7d(0x34a)})['unref']();}function migrateLegacyDirectory(){const _0x1a6d0d=a34_0x5c22ff;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x4883bd=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x4883bd[_0x1a6d0d(0x2f5)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a34_0x2ac66a[_0x1a6d0d(0x2a5)](_0x1a6d0d(0x363)+LEGACY_PARENT_SEGMENT_DIR+_0x1a6d0d(0x2c6)+PARENT_SEGMENT_DIR+'/\x20directories\x20exist.')),console[_0x1a6d0d(0x17f)](a34_0x2ac66a['dim']('\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x1a6d0d(0x2ff))),![];console[_0x1a6d0d(0x17f)](a34_0x2ac66a[_0x1a6d0d(0x2a5)](_0x1a6d0d(0x2f8)+LEGACY_PARENT_SEGMENT_DIR+_0x1a6d0d(0x1e6)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console['error'](a34_0x2ac66a[_0x1a6d0d(0x232)]('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x18b60c){const _0x205986=_0x18b60c instanceof Error?_0x18b60c['message']:String(_0x18b60c);return console['error'](a34_0x2ac66a['red']('✘\x20Failed\x20to\x20rename\x20directory:\x20'+_0x205986+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a34_0x5c22ff(0x195)](_0x41ac08){const _0x10c8eb=a34_0x5c22ff;return migrateLegacyDirectory(),super[_0x10c8eb(0x195)](_0x41ac08);}}function resolveYamlFile(_0x11e67e){const _0x1371d6=a34_0x5c22ff;if(_0x11e67e['endsWith'](_0x1371d6(0x2a1))||_0x11e67e[_0x1371d6(0x33e)](_0x1371d6(0x26b)))return _0x11e67e;return a34_0x46e5f8[_0x1371d6(0x2f1)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x11e67e)+_0x1371d6(0x2a1));}function formatProgressMessage(_0x38273b){const _0x3a4f84=a34_0x5c22ff,_0x10d403=_0x38273b[_0x3a4f84(0x308)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x10d403){const [,_0x43a291,_0xdef284,_0x1ecea4='']=_0x10d403;return a34_0x2ac66a[_0x3a4f84(0x1da)](_0x43a291+':')+'\x20'+_0xdef284+a34_0x2ac66a[_0x3a4f84(0x1da)](_0x1ecea4);}return a34_0x2ac66a[_0x3a4f84(0x1da)](_0x38273b);}function showFileNotFoundError(_0x5a14e8,_0x348d07){const _0x2ac037=a34_0x5c22ff;console[_0x2ac037(0x17f)](a34_0x2ac66a[_0x2ac037(0x35a)](_0x2ac037(0x333)+_0x5a14e8+'\x0a')),console['error'](a34_0x2ac66a[_0x2ac037(0x1c0)](_0x2ac037(0x2d0)+_0x348d07+_0x2ac037(0x306)));}function displayRealtimeValidation(_0x32bc25){const _0x17df19=a34_0x5c22ff;if(!_0x32bc25[_0x17df19(0x1e2)])return;const _0x2f8257=_0x32bc25['realtime'],_0x41d8c7=_0x2f8257[_0x17df19(0x1b4)]?a34_0x2ac66a['green']('⚡\x20Enabled'):a34_0x2ac66a[_0x17df19(0x2a5)]('⚡\x20Not\x20enabled');console['error']('\x0a'+a34_0x2ac66a[_0x17df19(0x1da)](_0x17df19(0x24c))+'\x20'+_0x41d8c7);if(_0x2f8257['events']&&_0x2f8257[_0x17df19(0x32a)][_0x17df19(0x396)]>0x0){console[_0x17df19(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x17df19(0x1da)](_0x17df19(0x349))+'\x20'+_0x2f8257['events'][_0x17df19(0x396)]+_0x17df19(0x2e3));for(const _0x15918e of _0x2f8257['events']){const _0x1dd8b5=_0x15918e[_0x17df19(0x2c5)]===![]?a34_0x2ac66a[_0x17df19(0x35a)]('✘'):a34_0x2ac66a['green']('✔');console[_0x17df19(0x17f)]('\x20\x20\x20\x20'+_0x1dd8b5+'\x20'+_0x15918e['name']),_0x15918e['sourceTableError']&&console[_0x17df19(0x17f)](_0x17df19(0x399)+a34_0x2ac66a['red'](_0x15918e['sourceTableError']));}}if(_0x2f8257[_0x17df19(0x258)]&&_0x2f8257['attributes'][_0x17df19(0x396)]>0x0){console[_0x17df19(0x17f)]('\x20\x20'+a34_0x2ac66a['dim'](_0x17df19(0x275))+'\x20'+_0x2f8257['attributes'][_0x17df19(0x396)]+_0x17df19(0x2e3));for(const _0x966036 of _0x2f8257['attributes']){const _0x458d4b=_0x966036[_0x17df19(0x192)]?a34_0x2ac66a['green']('✔'):a34_0x2ac66a[_0x17df19(0x35a)]('✘');console[_0x17df19(0x17f)](_0x17df19(0x246)+_0x458d4b+'\x20'+_0x966036[_0x17df19(0x297)]+'\x20'+a34_0x2ac66a['dim']('('+_0x966036[_0x17df19(0x37c)]+')'));}}if(_0x2f8257['idStitching']){const _0x3291d6=_0x2f8257[_0x17df19(0x310)][_0x17df19(0x248)]?.[_0x17df19(0x396)]?_0x17df19(0x34f)+_0x2f8257[_0x17df19(0x310)][_0x17df19(0x248)]['join'](',\x20')+']':'';console[_0x17df19(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x17df19(0x1da)](_0x17df19(0x225))+'\x20'+_0x2f8257['idStitching'][_0x17df19(0x2b6)]+_0x3291d6);}if(_0x2f8257[_0x17df19(0x338)]&&_0x2f8257['personalizationServices']['length']>0x0){console[_0x17df19(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x17df19(0x1da)](_0x17df19(0x22b))+'\x20'+_0x2f8257[_0x17df19(0x338)]['length']+_0x17df19(0x313)+(_0x2f8257[_0x17df19(0x338)]['length']!==0x1?'s':''));for(const _0x30efbc of _0x2f8257[_0x17df19(0x338)]){console['error'](_0x17df19(0x1b1)+_0x30efbc['name']);}}}function showParentSegmentNotSetError(_0x13689b){const _0x4ea8cd=a34_0x5c22ff;console[_0x4ea8cd(0x17f)](a34_0x2ac66a['yellow']('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a')),console[_0x4ea8cd(0x17f)](_0x13689b);}export class ParentSegmentListCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x2d5);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x250);async[a34_0x5c22ff(0x388)](_0xb62331){const _0x4f0412=a34_0x5c22ff,{options:_0x3dc9de,args:_0x149d3b,tdx:_0x4d199e}=_0xb62331,_0x4f440f=_0x149d3b[0x0];_0x3dc9de[_0x4f0412(0x374)]&&(console[_0x4f0412(0x17f)](_0x4f0412(0x365)+_0x3dc9de[_0x4f0412(0x19f)]),_0x4f440f&&console[_0x4f0412(0x17f)](_0x4f0412(0x334)+_0x4f440f));const _0x17ee5d=await withSpinner(_0x4f440f?'Listing\x20parent\x20segments\x20matching\x20\x27'+_0x4f440f+_0x4f0412(0x31f):_0x4f0412(0x1a1),()=>_0x4d199e[_0x4f0412(0x28c)]['listParents'](),{'verbose':_0x3dc9de['verbose']});let _0x19aee6=_0x17ee5d[_0x4f0412(0x253)];if(_0x4f440f){const _0x4d4137=_0x4f440f[_0x4f0412(0x249)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x4f0412(0x249)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x10d144=new RegExp('^'+_0x4d4137+'$','i');_0x19aee6=_0x19aee6[_0x4f0412(0x266)](_0x3014ff=>_0x10d144[_0x4f0412(0x212)](_0x3014ff[_0x4f0412(0x258)]['name']));}_0x19aee6[_0x4f0412(0x2fd)]((_0x403358,_0x21ba5e)=>_0x403358['attributes'][_0x4f0412(0x297)][_0x4f0412(0x26a)](_0x21ba5e[_0x4f0412(0x258)][_0x4f0412(0x297)])),console['error'](_0x4f0412(0x25d)+_0x19aee6[_0x4f0412(0x396)]+_0x4f0412(0x309)+(_0x19aee6[_0x4f0412(0x396)]!==0x1?'s':''));const _0x5e74aa=_0x40a589=>{const _0x383f04=_0x4f0412;return getConsoleNextUrl(_0x3dc9de[_0x383f04(0x19f)],_0x383f04(0x286)+_0x40a589);};if(_0x3dc9de[_0x4f0412(0x247)]===_0x4f0412(0x34c)||_0x3dc9de[_0x4f0412(0x247)]===_0x4f0412(0x1c4)){const _0x4010cf=_0x19aee6['map'](_0x2a479f=>({..._0x2a479f,'url':_0x5e74aa(_0x2a479f['id'])}));await handleSDKOutput(_0x4010cf,_0x3dc9de);}else{if(_0x19aee6['length']===0x0)_0x4f440f?console[_0x4f0412(0x383)](_0x4f0412(0x393)+_0x4f440f):console['log'](_0x4f0412(0x322));else for(const _0x3662db of _0x19aee6){const _0x3324aa=_0x3662db[_0x4f0412(0x258)][_0x4f0412(0x2c4)]?a34_0x2ac66a[_0x4f0412(0x1da)]('\x20('+formatRows(_0x3662db[_0x4f0412(0x258)][_0x4f0412(0x2c4)])+')'):'',_0x29b65b=hyperlink(_0x3662db['attributes'][_0x4f0412(0x297)],_0x5e74aa(_0x3662db['id']));console[_0x4f0412(0x383)]('👥\x20'+_0x29b65b+_0x3324aa);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x208);['description']=a34_0x5c22ff(0x2b5);async[a34_0x5c22ff(0x388)](_0x483bed){const _0x15b7bf=a34_0x5c22ff,{options:_0x11021c,args:_0x5af488,tdx:_0x3d4f41}=_0x483bed;console[_0x15b7bf(0x17f)](_0x15b7bf(0x1d5)+_0x15b7bf(0x38a)+_0x15b7bf(0x21d));const _0x4535f0=_0x11021c;if(_0x5af488[_0x15b7bf(0x396)]===0x0)return console[_0x15b7bf(0x17f)](a34_0x2ac66a[_0x15b7bf(0x35a)]('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x15b7bf(0x17f)](_0x15b7bf(0x2e9)),0x1;const _0x57eb52=_0x5af488[0x0];if(!_0x4535f0[_0x15b7bf(0x381)]||!_0x4535f0[_0x15b7bf(0x222)])return console['error'](_0x15b7bf(0x1ea)),console[_0x15b7bf(0x17f)](_0x15b7bf(0x2e9)),0x1;_0x4535f0['verbose']&&(console[_0x15b7bf(0x17f)](_0x15b7bf(0x365)+_0x4535f0[_0x15b7bf(0x19f)]),console[_0x15b7bf(0x17f)](_0x15b7bf(0x1c5)+_0x57eb52),console[_0x15b7bf(0x17f)](_0x15b7bf(0x18c)+_0x4535f0[_0x15b7bf(0x381)]),console[_0x15b7bf(0x17f)](_0x15b7bf(0x305)+_0x4535f0[_0x15b7bf(0x222)]));const _0x979034=await loadJSONFromOptions(_0x4535f0[_0x15b7bf(0x258)],_0x4535f0[_0x15b7bf(0x1a9)]),_0x16f383=await loadJSONFromOptions(_0x4535f0['behaviors'],_0x4535f0[_0x15b7bf(0x352)]),_0x54021b=await loadJSONFromOptions(_0x4535f0[_0x15b7bf(0x1aa)],_0x4535f0[_0x15b7bf(0x379)]),_0x1f77ba={'name':_0x57eb52,'description':_0x4535f0[_0x15b7bf(0x205)],'scheduleType':_0x4535f0[_0x15b7bf(0x28d)],'scheduleOption':_0x4535f0[_0x15b7bf(0x27c)],'timezone':_0x4535f0['timezone'],'master':{'parentDatabaseName':_0x4535f0[_0x15b7bf(0x381)],'parentTableName':_0x4535f0[_0x15b7bf(0x222)]},'attributes':_0x979034,'behaviors':_0x16f383,'customerGroup':_0x54021b},_0x27daad=await withSpinner(_0x15b7bf(0x2db)+_0x57eb52+_0x15b7bf(0x31f),()=>_0x3d4f41[_0x15b7bf(0x28c)][_0x15b7bf(0x375)](_0x1f77ba),{'verbose':_0x11021c['verbose']}),_0x555a39=_0x27daad[_0x15b7bf(0x253)];return console['error'](_0x15b7bf(0x344)+_0x555a39['name']+_0x15b7bf(0x35c)+_0x555a39['id']),await handleSDKOutput([_0x555a39],_0x11021c),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a34_0x5c22ff(0x297)]='segment:parent:update';['description']=a34_0x5c22ff(0x187);async[a34_0x5c22ff(0x388)](_0x21bfba){const _0xaa7291=a34_0x5c22ff,{options:_0x131499,args:_0x5a6362,tdx:_0x23e444}=_0x21bfba;console[_0xaa7291(0x17f)](_0xaa7291(0x37f)+_0xaa7291(0x38a)+_0xaa7291(0x21d));const _0x1e8dab=_0x131499;if(_0x5a6362[_0xaa7291(0x396)]===0x0)return console[_0xaa7291(0x17f)](a34_0x2ac66a[_0xaa7291(0x35a)](_0xaa7291(0x2a8))),console[_0xaa7291(0x17f)](_0xaa7291(0x32c)),0x1;const _0x4a359b=_0x5a6362[0x0];_0x1e8dab[_0xaa7291(0x374)]&&(console[_0xaa7291(0x17f)](_0xaa7291(0x365)+_0x1e8dab[_0xaa7291(0x19f)]),console[_0xaa7291(0x17f)](_0xaa7291(0x188)+_0x4a359b));const _0x436955=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x4a359b+_0xaa7291(0x31f),()=>_0x23e444['segment'][_0xaa7291(0x18f)](_0x4a359b),{'verbose':_0x1e8dab['verbose']}),_0x543b6a=_0x436955[_0xaa7291(0x253)],_0x5e7203=await loadJSONFromOptions(_0x1e8dab['addAttributes'],_0x1e8dab[_0xaa7291(0x21e)]),_0x4d035d=await loadJSONFromOptions(_0x1e8dab[_0xaa7291(0x378)],_0x1e8dab[_0xaa7291(0x227)]),_0xa334a9={'name':_0x543b6a['name'],'description':_0x1e8dab[_0xaa7291(0x205)]!==undefined?_0x1e8dab['description']:_0x543b6a[_0xaa7291(0x205)],'scheduleType':_0x1e8dab[_0xaa7291(0x28d)]!==undefined?_0x1e8dab[_0xaa7291(0x28d)]:_0x543b6a['scheduleType'],'scheduleOption':_0x1e8dab[_0xaa7291(0x27c)]!==undefined?_0x1e8dab[_0xaa7291(0x27c)]:_0x543b6a[_0xaa7291(0x27c)],'timezone':_0x1e8dab[_0xaa7291(0x2d1)]!==undefined?_0x1e8dab[_0xaa7291(0x2d1)]:_0x543b6a[_0xaa7291(0x2d1)],'master':_0x543b6a[_0xaa7291(0x25b)],'attributes':_0x5e7203?[..._0x543b6a['attributes']||[],..._0x5e7203]:_0x543b6a['attributes'],'behaviors':_0x4d035d?[..._0x543b6a[_0xaa7291(0x29b)]||[],..._0x4d035d]:_0x543b6a[_0xaa7291(0x29b)],'customerGroup':_0x543b6a[_0xaa7291(0x1aa)]},_0x4345b0=await withSpinner(_0xaa7291(0x261)+_0x4a359b+_0xaa7291(0x31f),()=>_0x23e444['segment'][_0xaa7291(0x1b9)](_0x4a359b,_0xa334a9),{'verbose':_0x1e8dab[_0xaa7291(0x374)]}),_0x4d7f27=_0x4345b0[_0xaa7291(0x253)];return console['error']('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x4d7f27[_0xaa7291(0x297)]+'\x27'),await handleSDKOutput([_0x4d7f27],_0x1e8dab),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a34_0x5c22ff(0x297)]='segment:parent:pull';[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x357);async[a34_0x5c22ff(0x388)](_0x54d985){const _0x527bbc=a34_0x5c22ff,{options:_0x6cca11,args:_0x5203ba,tdx:_0x14663c}=_0x54d985,_0x47449e=_0x6cca11,_0x151d70=_0x5203ba[0x0]||_0x6cca11[_0x527bbc(0x1a6)];if(!_0x151d70)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment'),0x1;if(_0x47449e[_0x527bbc(0x1fc)]&&_0x47449e[_0x527bbc(0x271)])return console[_0x527bbc(0x17f)](a34_0x2ac66a['red'](_0x527bbc(0x317))),console['error'](a34_0x2ac66a[_0x527bbc(0x1da)](_0x527bbc(0x1e8))),console[_0x527bbc(0x17f)](a34_0x2ac66a[_0x527bbc(0x1da)]('using\x20the\x20default\x20path:\x20'+PARENT_SEGMENT_DIR+'/{name}.yml\x0a')),console['error'](a34_0x2ac66a['cyan'](_0x527bbc(0x29d))),0x1;const _0x2c275e=_0x47449e[_0x527bbc(0x271)]||a34_0x46e5f8[_0x527bbc(0x2f1)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x151d70)+_0x527bbc(0x2a1));_0x47449e['verbose']&&(console[_0x527bbc(0x17f)](_0x527bbc(0x365)+_0x47449e[_0x527bbc(0x19f)]),console[_0x527bbc(0x17f)]('Parent\x20segment:\x20'+_0x151d70),console[_0x527bbc(0x17f)](_0x527bbc(0x1a8)+_0x2c275e));const _0x1b981c=await withSpinner(_0x527bbc(0x318)+_0x151d70+'\x27...',()=>_0x14663c[_0x527bbc(0x28c)][_0x527bbc(0x38e)](_0x151d70),{'verbose':_0x47449e[_0x527bbc(0x374)]}),_0x5ab7d=_0x1b981c['data'];if(existsSync(_0x2c275e)){const _0x25970d=readFileSync(_0x2c275e,_0x527bbc(0x238)),_0x1f2f42=generateDiff(_0x25970d,_0x5ab7d);if(!hasChanges(_0x1f2f42))console[_0x527bbc(0x17f)](a34_0x2ac66a[_0x527bbc(0x232)]('✔')+_0x527bbc(0x1a5)+a34_0x2ac66a['cyan'](_0x2c275e)+'\x20is\x20already\x20up\x20to\x20date');else{console[_0x527bbc(0x17f)]('\x0aChanges\x20to\x20\x27'+_0x2c275e+'\x27:'),console[_0x527bbc(0x17f)]('─'['repeat'](0x3c)),console[_0x527bbc(0x17f)](formatDiffWithColors(_0x1f2f42)),console[_0x527bbc(0x17f)]('─'[_0x527bbc(0x2cb)](0x3c));if(!_0x47449e['yes']){if(!isInteractive())return console['error'](a34_0x2ac66a[_0x527bbc(0x35a)](_0x527bbc(0x19b)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x527bbc(0x17f)](a34_0x2ac66a[_0x527bbc(0x1da)](_0x527bbc(0x323))),0x1;const _0xaf48ea=await confirmKey(_0x527bbc(0x278)+_0x2c275e+'\x27?');if(!_0xaf48ea)return console[_0x527bbc(0x17f)](a34_0x2ac66a[_0x527bbc(0x2a5)](_0x527bbc(0x1c1))),0x1;}writeFileSync(_0x2c275e,_0x5ab7d,_0x527bbc(0x238)),console[_0x527bbc(0x17f)](a34_0x2ac66a[_0x527bbc(0x232)]('✔')+_0x527bbc(0x260)+a34_0x2ac66a[_0x527bbc(0x1c0)](_0x2c275e));}}else{const _0x56747f=a34_0x46e5f8['dirname'](_0x2c275e);!existsSync(_0x56747f)&&mkdirSync(_0x56747f,{'recursive':!![]}),writeFileSync(_0x2c275e,_0x5ab7d,_0x527bbc(0x238)),console[_0x527bbc(0x17f)](a34_0x2ac66a[_0x527bbc(0x232)]('✔')+_0x527bbc(0x260)+a34_0x2ac66a['cyan'](_0x2c275e));}return saveSessionContext({'parent_segment':_0x151d70},_0x47449e['session']),console[_0x527bbc(0x17f)](a34_0x2ac66a['green']('✔')+_0x527bbc(0x267)+a34_0x2ac66a['dim']('parent_segment')+_0x527bbc(0x20b)+a34_0x2ac66a['cyan'](_0x151d70)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x1d4);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x282);async['execute'](_0x3bd1c1){const _0x300c87=a34_0x5c22ff,{options:_0x1633e8,args:_0x55c861,tdx:_0x2e5658}=_0x3bd1c1,_0x43b7ed=_0x1633e8,_0x1728cf=_0x55c861[0x0]||_0x1633e8['parentSegment'];if(!_0x1728cf)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a'+_0x300c87(0x1f8)),0x1;const _0x127993=resolveYamlFile(_0x1728cf);if(!existsSync(_0x127993))return showFileNotFoundError(_0x127993,_0x1728cf),0x1;_0x43b7ed[_0x300c87(0x374)]&&(console[_0x300c87(0x17f)](_0x300c87(0x365)+_0x43b7ed[_0x300c87(0x19f)]),console[_0x300c87(0x17f)]('YAML\x20file:\x20'+_0x127993));let _0x588abe;try{_0x588abe=readFileSync(_0x127993,_0x300c87(0x238));}catch(_0x154250){const _0x48860a=_0x154250 instanceof Error?_0x154250[_0x300c87(0x367)]:String(_0x154250);return console['error'](_0x300c87(0x2ef)+_0x48860a),0x1;}const _0xf669e4=await withSpinner('Analyzing\x20changes...',()=>_0x2e5658['segment'][_0x300c87(0x23a)](_0x588abe),{'verbose':_0x43b7ed[_0x300c87(0x374)]}),_0x50ee67=_0xf669e4[_0x300c87(0x253)],{isNew:_0x3713e5,name:_0x5d5555,hasChanges:_0x25a153,diffFormatted:_0x1c3f80}=_0x50ee67;if(!_0x25a153)return console[_0x300c87(0x17f)](_0x300c87(0x23d)+_0x5d5555+_0x300c87(0x2e1)),0x0;_0x3713e5?console[_0x300c87(0x17f)](_0x300c87(0x31c)+_0x5d5555+'\x27:'):console[_0x300c87(0x17f)](_0x300c87(0x1a4)+_0x5d5555+'\x27:');console['error']('─'[_0x300c87(0x2cb)](0x3c)),console[_0x300c87(0x17f)](_0x1c3f80),console[_0x300c87(0x17f)]('─'['repeat'](0x3c));const _0x545cd8=_0x3713e5?_0x300c87(0x280)+_0x5d5555+'\x27?':_0x300c87(0x18e)+_0x5d5555+'\x27?';if(!_0x43b7ed[_0x300c87(0x324)]){if(!isInteractive())return console[_0x300c87(0x17f)](a34_0x2ac66a[_0x300c87(0x35a)](_0x300c87(0x19b)),_0x300c87(0x218)),console[_0x300c87(0x17f)](a34_0x2ac66a[_0x300c87(0x1da)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xa2b8be=await confirmKey(_0x545cd8);if(!_0xa2b8be)return console[_0x300c87(0x17f)](a34_0x2ac66a[_0x300c87(0x2a5)]('Aborted.')),0x1;}const _0x5f1fe2=_0x3713e5?_0x300c87(0x32b):_0x300c87(0x1fb),_0x565654=await withSpinner(_0x5f1fe2+_0x300c87(0x21b)+_0x5d5555+_0x300c87(0x31f),()=>_0x50ee67[_0x300c87(0x1b8)](),{'verbose':_0x43b7ed[_0x300c87(0x374)]}),_0x637c06=_0x565654['data'],_0x3d8deb=getConsoleNextUrl(_0x43b7ed['site'],_0x300c87(0x286)+_0x637c06['id']),_0xa3635c=_0x3713e5?_0x300c87(0x36b):_0x300c87(0x36c);return console[_0x300c87(0x17f)]('✔\x20'+_0xa3635c+_0x300c87(0x21b)+_0x637c06[_0x300c87(0x297)]+'\x27'),console['error']('\x20\x20'+_0x3d8deb),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{['name']='segment:parent:validate';[a34_0x5c22ff(0x205)]='Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics';async[a34_0x5c22ff(0x388)](_0x46f18a){const _0x3359ac=a34_0x5c22ff,{options:_0x3c0cf5,args:_0x168f7f,tdx:_0xf8334}=_0x46f18a,_0x443c40=_0x3c0cf5,_0x26cc4e=_0x168f7f[0x0]||_0x3c0cf5[_0x3359ac(0x1a6)];if(!_0x26cc4e)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a'+_0x3359ac(0x1c8)+_0x3359ac(0x386)+'\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a'+_0x3359ac(0x1ee)+_0x3359ac(0x358)),0x1;const _0x1941a3=resolveYamlFile(_0x26cc4e);if(!existsSync(_0x1941a3))return showFileNotFoundError(_0x1941a3,_0x26cc4e),0x1;_0x443c40['verbose']&&(console[_0x3359ac(0x17f)](_0x3359ac(0x365)+_0x443c40[_0x3359ac(0x19f)]),console[_0x3359ac(0x17f)](_0x3359ac(0x392)+_0x1941a3));let _0x4d4b2e;try{_0x4d4b2e=readFileSync(_0x1941a3,_0x3359ac(0x238));}catch(_0x28ea46){const _0x3516e6=_0x28ea46 instanceof Error?_0x28ea46[_0x3359ac(0x367)]:String(_0x28ea46);return console['error'](_0x3359ac(0x2ef)+_0x3516e6),0x1;}const _0x39e0a8=createCommandSpinner(a34_0x2ac66a[_0x3359ac(0x1da)](_0x3359ac(0x2d6)),{'verbose':_0x443c40[_0x3359ac(0x374)]});_0x39e0a8['start']();const _0x1f6ebe={'onProgress':_0x20b95d=>{_0x39e0a8['text']=formatProgressMessage(_0x20b95d);}};if(_0x443c40[_0x3359ac(0x25b)])_0x1f6ebe[_0x3359ac(0x25b)]=!![];if(_0x443c40[_0x3359ac(0x38f)])_0x1f6ebe[_0x3359ac(0x38f)]=!![];_0x443c40[_0x3359ac(0x1ed)]&&(_0x1f6ebe[_0x3359ac(0x1ed)]=_0x443c40[_0x3359ac(0x1ed)]);_0x443c40[_0x3359ac(0x20f)]&&(_0x1f6ebe['behavior']=_0x443c40[_0x3359ac(0x20f)]);if(_0x443c40['interval'])_0x1f6ebe['interval']=_0x443c40[_0x3359ac(0x2b3)];let _0x2f33b6;try{_0x2f33b6=await _0xf8334[_0x3359ac(0x28c)]['validateParentYaml'](_0x4d4b2e,_0x1f6ebe),_0x39e0a8[_0x3359ac(0x2b0)]();}catch(_0x18d771){_0x39e0a8[_0x3359ac(0x2b0)]();throw _0x18d771;}const _0x564a02=_0x443c40[_0x3359ac(0x2b3)]||_0x3359ac(0x2ac);return this[_0x3359ac(0x1a0)](_0x2f33b6,_0x1f6ebe,_0x1941a3,_0x564a02),_0x2f33b6[_0x3359ac(0x219)]?0x0:0x1;}[a34_0x5c22ff(0x1a0)](_0xbbe04b,_0x4b0281,_0x502d08,_0x30e096){const _0x3fe1ad=a34_0x5c22ff;console[_0x3fe1ad(0x17f)]('\x0a'+a34_0x2ac66a[_0x3fe1ad(0x27e)]('Validate:')+'\x20'+_0xbbe04b[_0x3fe1ad(0x297)]),console[_0x3fe1ad(0x17f)]('═'[_0x3fe1ad(0x2cb)](0x3c)),this['displayMasterInfo'](_0xbbe04b);if(typeof _0x4b0281[_0x3fe1ad(0x1ed)]===_0x3fe1ad(0x2a0)){this[_0x3fe1ad(0x37e)](_0xbbe04b),this[_0x3fe1ad(0x2c1)](_0xbbe04b),this['displayPreviewHints'](_0x502d08,_0x30e096,_0x3fe1ad(0x1ed),_0x4b0281[_0x3fe1ad(0x1ed)]);return;}if(_0x4b0281[_0x3fe1ad(0x1ed)]===!![]){this['displayAttributesStats'](_0xbbe04b),this[_0x3fe1ad(0x2c1)](_0xbbe04b),this[_0x3fe1ad(0x1d6)](_0x502d08,_0x30e096,_0x3fe1ad(0x258));return;}if(typeof _0x4b0281['behavior']===_0x3fe1ad(0x2a0)){this[_0x3fe1ad(0x30e)](_0xbbe04b,_0x30e096),this['displaySummary'](_0xbbe04b),this[_0x3fe1ad(0x1d6)](_0x502d08,_0x30e096,_0x3fe1ad(0x20f),_0x4b0281[_0x3fe1ad(0x20f)]);return;}if(_0x4b0281[_0x3fe1ad(0x20f)]===!![]){this[_0x3fe1ad(0x30e)](_0xbbe04b,_0x30e096),this[_0x3fe1ad(0x2c1)](_0xbbe04b),this[_0x3fe1ad(0x1d6)](_0x502d08,_0x30e096,_0x3fe1ad(0x29b));return;}this[_0x3fe1ad(0x37e)](_0xbbe04b),this[_0x3fe1ad(0x30e)](_0xbbe04b,_0x30e096),this[_0x3fe1ad(0x17c)](_0xbbe04b),this[_0x3fe1ad(0x2c1)](_0xbbe04b),this[_0x3fe1ad(0x1d6)](_0x502d08,_0x30e096,'all');}[a34_0x5c22ff(0x17c)](_0x4f5f9e){displayRealtimeValidation(_0x4f5f9e);}[a34_0x5c22ff(0x1d6)](_0x10c2a1,_0x1bbb2e,_0xf2936e,_0x185420){const _0x98f80a=a34_0x5c22ff;console[_0x98f80a(0x17f)]('\x0a'+a34_0x2ac66a[_0x98f80a(0x1da)](_0x98f80a(0x2fa)));const _0x57e30d=_0x1bbb2e!==_0x98f80a(0x2ac)?'\x20--interval\x20'+_0x1bbb2e:'';if(_0xf2936e===_0x98f80a(0x1ed)&&_0x185420)console['error']('\x20\x20'+a34_0x2ac66a['dim'](_0x98f80a(0x1fe)+_0x10c2a1+_0x98f80a(0x347)+_0x185420+'\x22'+_0x57e30d));else{if(_0xf2936e==='behavior'&&_0x185420)console['error']('\x20\x20'+a34_0x2ac66a['dim']('tdx\x20ps\x20preview\x20'+_0x10c2a1+'\x20--behavior\x20\x22'+_0x185420+'\x22'+_0x57e30d));else(_0xf2936e==='attributes'||_0xf2936e===_0x98f80a(0x211))&&console[_0x98f80a(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x98f80a(0x1da)](_0x98f80a(0x1fe)+_0x10c2a1+_0x98f80a(0x328)+_0x57e30d));}(_0xf2936e===_0x98f80a(0x29b)||_0xf2936e===_0x98f80a(0x211))&&console[_0x98f80a(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x98f80a(0x1da)](_0x98f80a(0x1fe)+_0x10c2a1+_0x98f80a(0x256)+_0x57e30d)),_0xf2936e==='all'&&console[_0x98f80a(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x98f80a(0x1da)]('tdx\x20ps\x20preview\x20'+_0x10c2a1+_0x98f80a(0x262)+_0x57e30d));}[a34_0x5c22ff(0x1e0)](_0x3053ea){const _0x269ba6=a34_0x5c22ff,{master:_0xe65261}=_0x3053ea,_0x3f80e2=_0xe65261[_0x269ba6(0x269)]?a34_0x2ac66a[_0x269ba6(0x232)]('✔'):a34_0x2ac66a[_0x269ba6(0x35a)]('✘');console[_0x269ba6(0x17f)]('\x0a'+a34_0x2ac66a[_0x269ba6(0x1da)](_0x269ba6(0x29e))),console[_0x269ba6(0x17f)](_0x3f80e2+'\x20'+a34_0x2ac66a['bold'](_0xe65261['database']+'.'+_0xe65261[_0x269ba6(0x222)])),_0xe65261[_0x269ba6(0x269)]?_0xe65261[_0x269ba6(0x329)]!==undefined&&console[_0x269ba6(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x269ba6(0x1da)](_0x269ba6(0x2eb))+'\x20'+a34_0x2ac66a['cyan'](formatRows(_0xe65261['rowCount']))):console[_0x269ba6(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x269ba6(0x35a)](_0x269ba6(0x28e))+'\x20'+_0xe65261[_0x269ba6(0x17e)]);}[a34_0x5c22ff(0x37e)](_0x525559){const _0x55e474=a34_0x5c22ff;if(_0x525559['attributes']['length']===0x0)return;console[_0x55e474(0x17f)]('\x0a'+a34_0x2ac66a[_0x55e474(0x1da)](_0x55e474(0x285)));for(const _0x2c8666 of _0x525559[_0x55e474(0x258)]){const _0x4e754c=_0x2c8666[_0x55e474(0x269)]?a34_0x2ac66a[_0x55e474(0x232)]('✔'):a34_0x2ac66a['red']('✘');let _0x5a19a8='';if(_0x2c8666[_0x55e474(0x269)]&&_0x2c8666[_0x55e474(0x38c)]!==undefined&&_0x2c8666[_0x55e474(0x19e)]!==undefined){const _0xf426ee=_0x2c8666[_0x55e474(0x19e)][_0x55e474(0x389)](0x1),_0x343004=_0x2c8666[_0x55e474(0x19e)]>=0x50?a34_0x2ac66a[_0x55e474(0x232)]:_0x2c8666[_0x55e474(0x19e)]>=0x32?a34_0x2ac66a[_0x55e474(0x2a5)]:a34_0x2ac66a[_0x55e474(0x35a)];_0x5a19a8='\x20'+a34_0x2ac66a['dim']('Coverage:')+'\x20'+_0x343004(_0xf426ee+'%')+'\x20('+formatRows(_0x2c8666['matchedCount'])+_0x55e474(0x2d8);}console[_0x55e474(0x17f)](_0x4e754c+'\x20'+a34_0x2ac66a[_0x55e474(0x27e)](_0x2c8666[_0x55e474(0x297)])+_0x5a19a8),console[_0x55e474(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x55e474(0x1da)](_0x55e474(0x294))+'\x20'+a34_0x2ac66a['bold'](_0x2c8666[_0x55e474(0x381)]+'.'+_0x2c8666['table']));const _0x3aa2fc=_0x2c8666['joinKey']===_0x2c8666[_0x55e474(0x1d8)]?a34_0x2ac66a['dim'](_0x55e474(0x1de))+'\x20'+_0x2c8666[_0x55e474(0x18b)]:a34_0x2ac66a['dim'](_0x55e474(0x1b6))+'\x20'+_0x2c8666['joinKey']+_0x55e474(0x20b)+_0x2c8666[_0x55e474(0x1d8)];console[_0x55e474(0x17f)]('\x20\x20'+_0x3aa2fc),console[_0x55e474(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x55e474(0x1da)]('Columns:')),this[_0x55e474(0x39a)](_0x2c8666[_0x55e474(0x384)]),!_0x2c8666['schemaValid']&&console['error']('\x20\x20'+a34_0x2ac66a[_0x55e474(0x35a)](_0x55e474(0x28e))+'\x20'+_0x2c8666[_0x55e474(0x17e)]);}}[a34_0x5c22ff(0x30e)](_0x5adb36,_0x4fc29b){const _0x14e7b1=a34_0x5c22ff;if(_0x5adb36[_0x14e7b1(0x29b)][_0x14e7b1(0x396)]===0x0)return;console[_0x14e7b1(0x17f)]('\x0a'+a34_0x2ac66a[_0x14e7b1(0x1da)](_0x14e7b1(0x185))+'\x20'+a34_0x2ac66a[_0x14e7b1(0x1da)]('('+_0x4fc29b+')'));for(const _0x1a7312 of _0x5adb36[_0x14e7b1(0x29b)]){const _0x47dddd=_0x1a7312[_0x14e7b1(0x269)]?a34_0x2ac66a['green']('✔'):a34_0x2ac66a[_0x14e7b1(0x35a)]('✘');let _0x536338='';if(_0x1a7312[_0x14e7b1(0x269)]&&_0x1a7312[_0x14e7b1(0x299)]!==undefined&&_0x1a7312['totalEvents']!==undefined){const _0x2028d5=_0x1a7312[_0x14e7b1(0x226)]?.[_0x14e7b1(0x389)](0x1)||'?',_0x152612=(_0x1a7312[_0x14e7b1(0x226)]??0x0)>=0x32?a34_0x2ac66a['green']:(_0x1a7312['customerPercent']??0x0)>=0x14?a34_0x2ac66a[_0x14e7b1(0x2a5)]:a34_0x2ac66a[_0x14e7b1(0x35a)];_0x536338='\x20'+a34_0x2ac66a['dim'](_0x14e7b1(0x274))+'\x20'+_0x152612(formatRows(_0x1a7312[_0x14e7b1(0x299)]))+'\x20('+_0x2028d5+_0x14e7b1(0x38b)+a34_0x2ac66a['dim'](_0x14e7b1(0x349))+'\x20'+a34_0x2ac66a[_0x14e7b1(0x1c0)](formatRows(_0x1a7312[_0x14e7b1(0x22c)]));}console['error'](_0x47dddd+'\x20'+a34_0x2ac66a[_0x14e7b1(0x27e)](_0x1a7312[_0x14e7b1(0x297)])+_0x536338),console['error']('\x20\x20'+a34_0x2ac66a['dim'](_0x14e7b1(0x294))+'\x20'+a34_0x2ac66a[_0x14e7b1(0x27e)](_0x1a7312[_0x14e7b1(0x381)]+'.'+_0x1a7312[_0x14e7b1(0x222)]));const _0x21f1e9=_0x1a7312['joinKey']===_0x1a7312[_0x14e7b1(0x1d8)]?a34_0x2ac66a[_0x14e7b1(0x1da)]('Join\x20on:')+'\x20'+_0x1a7312['joinKey']:a34_0x2ac66a[_0x14e7b1(0x1da)]('Join:')+'\x20'+_0x1a7312['joinKey']+_0x14e7b1(0x20b)+_0x1a7312[_0x14e7b1(0x1d8)];console[_0x14e7b1(0x17f)]('\x20\x20'+_0x21f1e9),console[_0x14e7b1(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x14e7b1(0x1da)](_0x14e7b1(0x325))),this[_0x14e7b1(0x39a)](_0x1a7312['columns']),!_0x1a7312[_0x14e7b1(0x269)]&&console['error']('\x20\x20'+a34_0x2ac66a[_0x14e7b1(0x35a)](_0x14e7b1(0x28e))+'\x20'+_0x1a7312[_0x14e7b1(0x17e)]);}}[a34_0x5c22ff(0x39a)](_0x203b6a){const _0x3ee853=a34_0x5c22ff;for(const _0x5e4470 of _0x203b6a){_0x5e4470[_0x3ee853(0x277)]===_0x5e4470[_0x3ee853(0x191)]||_0x5e4470['column']==='*'?console[_0x3ee853(0x17f)](_0x3ee853(0x1b1)+_0x5e4470[_0x3ee853(0x277)]):console[_0x3ee853(0x17f)](_0x3ee853(0x1b1)+_0x5e4470[_0x3ee853(0x277)]+'\x20'+a34_0x2ac66a[_0x3ee853(0x1da)]('('+_0x5e4470[_0x3ee853(0x191)]+')'));}}[a34_0x5c22ff(0x2c1)](_0x44a3d9){const _0x82e371=a34_0x5c22ff;console[_0x82e371(0x17f)]('─'[_0x82e371(0x2cb)](0x3c));if(_0x44a3d9['errors'][_0x82e371(0x396)]>0x0){console[_0x82e371(0x17f)]('\x0a'+a34_0x2ac66a[_0x82e371(0x35a)]('Errors:'));for(const _0x2cf0d5 of _0x44a3d9[_0x82e371(0x2aa)]){console[_0x82e371(0x17f)]('\x20\x20'+a34_0x2ac66a['red']('•')+'\x20'+_0x2cf0d5);}}_0x44a3d9[_0x82e371(0x219)]&&console[_0x82e371(0x17f)]('\x0a'+a34_0x2ac66a[_0x82e371(0x232)]('✔')+_0x82e371(0x32d));}}function a34_0x335d(_0x1d223a,_0x3857ff){_0x1d223a=_0x1d223a-0x173;const _0x139bf2=a34_0x139b();let _0x335d63=_0x139bf2[_0x1d223a];return _0x335d63;}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x33a);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x326);async['execute'](_0x1dfe28){const _0x1241f1=a34_0x5c22ff,{options:_0x363753,args:_0x43a4dc,tdx:_0x57859e}=_0x1dfe28,_0x40d67c=_0x363753,_0x2e09c9=_0x43a4dc[0x0]||_0x363753[_0x1241f1(0x1a6)];if(!_0x2e09c9)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a'+_0x1241f1(0x296)+_0x1241f1(0x385)+_0x1241f1(0x2bf)+_0x1241f1(0x24e)+_0x1241f1(0x21c)+'\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a'+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x40d67c[_0x1241f1(0x25b)]&&!_0x40d67c[_0x1241f1(0x1ed)]&&!_0x40d67c['behavior']&&!_0x40d67c[_0x1241f1(0x38f)])return console[_0x1241f1(0x17f)](a34_0x2ac66a['red']('Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a')),console['error'](_0x1241f1(0x28a)),console[_0x1241f1(0x17f)](_0x1241f1(0x348)),console[_0x1241f1(0x17f)](_0x1241f1(0x31e)),console[_0x1241f1(0x17f)](_0x1241f1(0x2da)),console[_0x1241f1(0x17f)](_0x1241f1(0x26f)),console[_0x1241f1(0x17f)](_0x1241f1(0x368)),0x1;const _0x2eec4c=resolveYamlFile(_0x2e09c9);if(!existsSync(_0x2eec4c))return showFileNotFoundError(_0x2eec4c,_0x2e09c9),0x1;_0x40d67c[_0x1241f1(0x374)]&&(console[_0x1241f1(0x17f)](_0x1241f1(0x365)+_0x40d67c[_0x1241f1(0x19f)]),console[_0x1241f1(0x17f)]('YAML\x20file:\x20'+_0x2eec4c));let _0x4ce8ee;try{_0x4ce8ee=readFileSync(_0x2eec4c,_0x1241f1(0x238));}catch(_0x1faee8){const _0x46c685=_0x1faee8 instanceof Error?_0x1faee8[_0x1241f1(0x367)]:String(_0x1faee8);return console[_0x1241f1(0x17f)](_0x1241f1(0x2ef)+_0x46c685),0x1;}let _0x3c90c5;try{_0x3c90c5=parseDef(_0x4ce8ee);}catch(_0x575b98){const _0x2d6dd3=_0x575b98 instanceof Error?_0x575b98[_0x1241f1(0x367)]:String(_0x575b98);return console[_0x1241f1(0x17f)](a34_0x2ac66a['red'](_0x1241f1(0x207)+_0x2d6dd3)),0x1;}if(_0x40d67c[_0x1241f1(0x1ed)]===!![]||_0x40d67c[_0x1241f1(0x1ed)]===''){const _0x5a27fe=_0x3c90c5[_0x1241f1(0x258)]?.['map'](_0x2808a8=>_0x2808a8[_0x1241f1(0x297)])||[];if(_0x5a27fe[_0x1241f1(0x396)]===0x0)console['error'](a34_0x2ac66a['red'](_0x1241f1(0x241)));else{console['error'](a34_0x2ac66a[_0x1241f1(0x35a)](_0x1241f1(0x18d))),console[_0x1241f1(0x17f)]('Available\x20attributes:');for(const _0x196a0 of _0x5a27fe){console['error']('\x20\x20'+a34_0x2ac66a[_0x1241f1(0x1c0)](_0x196a0));}console['error'](_0x1241f1(0x1be)+_0x2e09c9+_0x1241f1(0x347)+_0x5a27fe[0x0]+'\x22');}return 0x1;}if(_0x40d67c[_0x1241f1(0x20f)]===!![]||_0x40d67c[_0x1241f1(0x20f)]===''){const _0x176336=_0x3c90c5[_0x1241f1(0x29b)]?.[_0x1241f1(0x22e)](_0x22a110=>_0x22a110[_0x1241f1(0x297)])||[];if(_0x176336[_0x1241f1(0x396)]===0x0)console[_0x1241f1(0x17f)](a34_0x2ac66a[_0x1241f1(0x35a)]('Error:\x20No\x20behaviors\x20defined\x20in\x20configuration'));else{console[_0x1241f1(0x17f)](a34_0x2ac66a['red']('Error:\x20--behavior\x20requires\x20a\x20name\x0a')),console[_0x1241f1(0x17f)](_0x1241f1(0x22f));for(const _0x5ccd1c of _0x176336){console[_0x1241f1(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x1241f1(0x1c0)](_0x5ccd1c));}console['error']('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x2e09c9+_0x1241f1(0x229)+_0x176336[0x0]+'\x22');}return 0x1;}const _0x11fdfc=createCommandSpinner(a34_0x2ac66a['dim'](_0x1241f1(0x21f)),{'verbose':_0x40d67c['verbose']});_0x11fdfc[_0x1241f1(0x2f7)]();const _0x2d649a={'onProgress':_0xba2a7=>{const _0x3c3285=_0x1241f1;_0x11fdfc[_0x3c3285(0x2a9)]=formatProgressMessage(_0xba2a7);}};if(_0x40d67c[_0x1241f1(0x25b)])_0x2d649a[_0x1241f1(0x25b)]=!![];if(_0x40d67c['attribute']&&typeof _0x40d67c[_0x1241f1(0x1ed)]==='string')_0x2d649a['attribute']=_0x40d67c[_0x1241f1(0x1ed)];if(_0x40d67c[_0x1241f1(0x20f)]&&typeof _0x40d67c[_0x1241f1(0x20f)]===_0x1241f1(0x2a0))_0x2d649a[_0x1241f1(0x20f)]=_0x40d67c[_0x1241f1(0x20f)];if(_0x40d67c[_0x1241f1(0x38f)])_0x2d649a[_0x1241f1(0x38f)]=!![];if(_0x40d67c['interval'])_0x2d649a[_0x1241f1(0x2b3)]=_0x40d67c['interval'];let _0x2893f4;try{_0x2893f4=await _0x57859e[_0x1241f1(0x28c)][_0x1241f1(0x1f6)](_0x4ce8ee,_0x2d649a),_0x11fdfc[_0x1241f1(0x2b0)]();}catch(_0x6f3857){_0x11fdfc[_0x1241f1(0x2b0)]();throw _0x6f3857;}return await this[_0x1241f1(0x1c7)](_0x2893f4,{'master':_0x40d67c['master'],'attribute':typeof _0x40d67c[_0x1241f1(0x1ed)]===_0x1241f1(0x2a0)?_0x40d67c[_0x1241f1(0x1ed)]:undefined,'behavior':typeof _0x40d67c['behavior']==='string'?_0x40d67c[_0x1241f1(0x20f)]:undefined,'enriched':_0x40d67c['enriched']}),_0x2893f4[_0x1241f1(0x219)]?0x0:0x1;}async[a34_0x5c22ff(0x1c7)](_0x2b4c5f,_0x188f86){const _0x4e97fd=a34_0x5c22ff;console['error']('\x0a'+a34_0x2ac66a['bold'](_0x4e97fd(0x1c3))+'\x20'+_0x2b4c5f[_0x4e97fd(0x297)]),console[_0x4e97fd(0x17f)]('═'[_0x4e97fd(0x2cb)](0x3c));if(_0x188f86[_0x4e97fd(0x25b)]&&_0x2b4c5f['sampleData']){const _0x28f4d3=a34_0x2ac66a[_0x4e97fd(0x1da)](_0x4e97fd(0x179))+'\x20'+a34_0x2ac66a[_0x4e97fd(0x27e)](_0x2b4c5f['master'][_0x4e97fd(0x381)]+'.'+_0x2b4c5f[_0x4e97fd(0x25b)][_0x4e97fd(0x222)]);await this['displaySampleData'](_0x28f4d3,_0x2b4c5f['sampleData']);}else{if(_0x188f86[_0x4e97fd(0x1ed)]&&_0x2b4c5f[_0x4e97fd(0x177)]){const _0x448981=a34_0x2ac66a[_0x4e97fd(0x1da)](_0x4e97fd(0x2a6))+'\x20'+a34_0x2ac66a['bold'](_0x188f86[_0x4e97fd(0x1ed)]);await this[_0x4e97fd(0x360)](_0x448981,_0x2b4c5f['sampleData']);}else{if(_0x188f86['behavior']&&_0x2b4c5f['sampleData']){const _0x717fca=a34_0x2ac66a['dim']('Behavior:')+'\x20'+a34_0x2ac66a[_0x4e97fd(0x27e)](_0x188f86['behavior']);await this['displaySampleData'](_0x717fca,_0x2b4c5f[_0x4e97fd(0x177)]);}else{if(_0x188f86[_0x4e97fd(0x38f)]&&_0x2b4c5f[_0x4e97fd(0x177)]){const _0x4a4b91=a34_0x2ac66a['dim'](_0x4e97fd(0x1ec))+'\x20'+a34_0x2ac66a[_0x4e97fd(0x27e)](_0x4e97fd(0x34b));await this[_0x4e97fd(0x360)](_0x4a4b91,_0x2b4c5f[_0x4e97fd(0x177)]);}else!_0x2b4c5f[_0x4e97fd(0x177)]&&console[_0x4e97fd(0x17f)](_0x4e97fd(0x290));}}}if(_0x2b4c5f[_0x4e97fd(0x2aa)][_0x4e97fd(0x396)]>0x0){console[_0x4e97fd(0x17f)]('─'[_0x4e97fd(0x2cb)](0x3c)),console[_0x4e97fd(0x17f)]('\x0a'+a34_0x2ac66a['red'](_0x4e97fd(0x31a)));for(const _0x41bca2 of _0x2b4c5f[_0x4e97fd(0x2aa)]){console['error']('\x20\x20'+a34_0x2ac66a['red']('•')+'\x20'+_0x41bca2);}}}async[a34_0x5c22ff(0x360)](_0x1ce405,_0x3ec938){const _0xc2ac41=a34_0x5c22ff;if(_0x3ec938[_0xc2ac41(0x396)]===0x0){console[_0xc2ac41(0x17f)]('\x0a'+_0x1ce405),console[_0xc2ac41(0x17f)](_0xc2ac41(0x2e8));return;}console[_0xc2ac41(0x17f)]('\x0a'+_0x1ce405);const _0x175968=Object[_0xc2ac41(0x36d)](_0x3ec938[0x0])[_0xc2ac41(0x22e)](_0x50440a=>({'name':_0x50440a,'type':typeof _0x3ec938[0x0][_0x50440a]===_0xc2ac41(0x293)?_0xc2ac41(0x2b2):_0xc2ac41(0x36e)})),_0x41a164={'queryId':_0xc2ac41(0x37b),'columns':_0x175968,'data':_0x3ec938,'stats':{'state':_0xc2ac41(0x312),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x3ec938[_0xc2ac41(0x396)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0xa81da3=formatAsTable(_0x41a164,_0x3ec938[_0xc2ac41(0x396)],!![]);await writeOutput(_0xa81da3,undefined,_0xc2ac41(0x222));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x2f4);['description']='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async[a34_0x5c22ff(0x388)](_0x169e2c){const _0x4ff1e9=a34_0x5c22ff,{options:_0x3977f2,args:_0x8f870e,tdx:_0x6de05d}=_0x169e2c,_0x1476f7=_0x3977f2,_0x54014d=_0x8f870e[0x0]||_0x3977f2[_0x4ff1e9(0x1a6)];if(!_0x54014d)return showParentSegmentNotSetError(_0x4ff1e9(0x2fe)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x117fe4=resolveYamlFile(_0x54014d);if(existsSync(_0x117fe4)){_0x1476f7['verbose']&&console['error'](_0x4ff1e9(0x304)+_0x117fe4);let _0xdf585;try{_0xdf585=readFileSync(_0x117fe4,'utf-8');}catch(_0x584c58){const _0x3097b0=_0x584c58 instanceof Error?_0x584c58['message']:String(_0x584c58);return console['error']('Error\x20reading\x20file:\x20'+_0x3097b0),0x1;}const _0x376331=await withSpinner(_0x4ff1e9(0x289),()=>_0x6de05d[_0x4ff1e9(0x28c)][_0x4ff1e9(0x23a)](_0xdf585),{'verbose':_0x1476f7[_0x4ff1e9(0x374)]}),_0x3b57c8=_0x376331['data'],{isNew:_0x301cb8,name:_0x149386,hasChanges:_0x113875,diffFormatted:_0x52a89f}=_0x3b57c8;if(_0x113875){_0x301cb8?console['error'](_0x4ff1e9(0x31c)+_0x149386+'\x27:'):console[_0x4ff1e9(0x17f)](_0x4ff1e9(0x1a4)+_0x149386+'\x27:');console['error']('─'['repeat'](0x3c)),console[_0x4ff1e9(0x17f)](_0x52a89f),console[_0x4ff1e9(0x17f)]('─'[_0x4ff1e9(0x2cb)](0x3c));const _0x5820ba=_0x301cb8?_0x4ff1e9(0x280)+_0x149386+_0x4ff1e9(0x2b8):_0x4ff1e9(0x18e)+_0x149386+_0x4ff1e9(0x2b8);if(!_0x1476f7[_0x4ff1e9(0x324)]){if(!isInteractive())return console['error'](a34_0x2ac66a[_0x4ff1e9(0x35a)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x4ff1e9(0x17f)](a34_0x2ac66a[_0x4ff1e9(0x1da)](_0x4ff1e9(0x323))),0x1;const _0x184dca=await confirmKey(_0x5820ba);if(!_0x184dca)return console[_0x4ff1e9(0x17f)](a34_0x2ac66a['yellow'](_0x4ff1e9(0x1c1))),0x1;}const _0x5ab188=_0x301cb8?_0x4ff1e9(0x32b):'Updating';await withSpinner(_0x5ab188+_0x4ff1e9(0x21b)+_0x149386+'\x27...',()=>_0x3b57c8[_0x4ff1e9(0x1b8)](),{'verbose':_0x1476f7[_0x4ff1e9(0x374)]});const _0x38bea8=_0x301cb8?_0x4ff1e9(0x36b):'Updated';console[_0x4ff1e9(0x17f)]('✔\x20'+_0x38bea8+_0x4ff1e9(0x21b)+_0x149386+'\x27');}else console[_0x4ff1e9(0x17f)]('✔\x20No\x20changes\x20-\x20\x27'+_0x149386+'\x27\x20is\x20up\x20to\x20date');}const _0x532c08=await withSpinner(_0x4ff1e9(0x372)+_0x54014d+_0x4ff1e9(0x31f),()=>_0x6de05d[_0x4ff1e9(0x28c)][_0x4ff1e9(0x1dc)](_0x54014d),{'verbose':_0x1476f7[_0x4ff1e9(0x374)]}),_0x925b46=_0x532c08[_0x4ff1e9(0x253)],_0x1af947=getConsoleUrl(_0x1476f7[_0x4ff1e9(0x19f)],_0x4ff1e9(0x1cd)+_0x925b46[_0x4ff1e9(0x390)]+_0x4ff1e9(0x209)+_0x925b46['workflowSessionId']+_0x4ff1e9(0x268)+_0x925b46['workflowAttemptId']);return console[_0x4ff1e9(0x17f)](_0x4ff1e9(0x1e3)),console[_0x4ff1e9(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x4ff1e9(0x1da)]('Audience\x20ID:')+'\x20'+_0x925b46[_0x4ff1e9(0x2ab)]),console[_0x4ff1e9(0x17f)]('\x20\x20'+a34_0x2ac66a['dim'](_0x4ff1e9(0x37d))+'\x20'+_0x925b46[_0x4ff1e9(0x228)]),console['error']('\x20\x20'+a34_0x2ac66a[_0x4ff1e9(0x1da)](_0x4ff1e9(0x1d3))+'\x20'+_0x925b46[_0x4ff1e9(0x1c6)]),console[_0x4ff1e9(0x17f)]('\x20\x20'+a34_0x2ac66a[_0x4ff1e9(0x1da)](_0x4ff1e9(0x2a2))+'\x20'+_0x925b46[_0x4ff1e9(0x33f)]),console['error']('\x20\x20'+_0x1af947),console[_0x4ff1e9(0x17f)]('\x0a'+a34_0x2ac66a[_0x4ff1e9(0x1da)](_0x4ff1e9(0x2bc))+_0x4ff1e9(0x35f)+_0x925b46[_0x4ff1e9(0x33f)]+_0x4ff1e9(0x336)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x281);[a34_0x5c22ff(0x205)]='List\x20available\x20fields\x20for\x20segmentation';async[a34_0x5c22ff(0x388)](_0x3a64bf){const _0x410110=a34_0x5c22ff,{options:_0x19ea88,args:_0xec180b,tdx:_0x2c89ef}=_0x3a64bf,_0x3a2266=_0xec180b[0x0]||_0x19ea88[_0x410110(0x1a6)];if(!_0x3a2266)return showParentSegmentNotSetError(_0x410110(0x287)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment'),0x1;_0x19ea88['verbose']&&(console[_0x410110(0x17f)](_0x410110(0x365)+_0x19ea88[_0x410110(0x19f)]),console[_0x410110(0x17f)](_0x410110(0x188)+_0x3a2266));const _0x120fb2=await withSpinner(_0x410110(0x1df)+_0x3a2266+_0x410110(0x31f),()=>_0x2c89ef['segment'][_0x410110(0x371)](_0x3a2266),{'verbose':_0x19ea88['verbose']}),_0xb492a7=_0x120fb2[_0x410110(0x253)];console[_0x410110(0x17f)](_0x410110(0x25d)+_0xb492a7[_0x410110(0x396)]+_0x410110(0x342)+(_0xb492a7[_0x410110(0x396)]!==0x1?'s':''));if(_0x19ea88[_0x410110(0x34c)]||_0x19ea88['jsonl'])return await handleSDKOutput(_0xb492a7,_0x19ea88),0x0;return displayFieldsHumanReadable(_0xb492a7,_0x3a2266),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x1f9);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x242);async['execute'](_0x5dbce8){const _0x22841d=a34_0x5c22ff,{options:_0x2249cd,args:_0x5d6b58,tdx:_0x4d7d38}=_0x5dbce8,_0x2d27c6=_0x2249cd,_0x36e8c1=_0x5d6b58[0x0]||_0x2249cd[_0x22841d(0x1a6)];if(!_0x36e8c1)return showParentSegmentNotSetError(_0x22841d(0x2cc)+_0x22841d(0x30f)+'Options:\x0a'+'\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser'),0x1;_0x2249cd[_0x22841d(0x374)]&&(console['error']('Site:\x20'+_0x2249cd[_0x22841d(0x19f)]),console[_0x22841d(0x17f)](_0x22841d(0x188)+_0x36e8c1));const _0x231fa9=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x36e8c1+_0x22841d(0x31f),()=>_0x4d7d38[_0x22841d(0x28c)][_0x22841d(0x18f)](_0x36e8c1),{'verbose':_0x2249cd[_0x22841d(0x374)]}),_0xda3f58=_0x231fa9[_0x22841d(0x253)];if(_0x2d27c6['web']){const _0x1c2ecf=getConsoleNextUrl(_0x2d27c6['site'],_0x22841d(0x286)+_0xda3f58['id']);return console[_0x22841d(0x17f)](a34_0x2ac66a['green']('✔')+_0x22841d(0x288)+a34_0x2ac66a['cyan'](_0x1c2ecf)),openBrowser(_0x1c2ecf),0x0;}return await handleSingleObjectOutput(_0xda3f58,_0x2249cd),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a34_0x5c22ff(0x297)]='segment:parent:desc';['description']=a34_0x5c22ff(0x27a);async[a34_0x5c22ff(0x388)](_0x11cebc){const _0x18b8a7=a34_0x5c22ff,{options:_0xbb5274,args:_0x468194,tdx:_0xfe47fd}=_0x11cebc,_0x263f7f=_0xbb5274,_0x9f0067=_0x468194[0x0]||_0xbb5274['parentSegment'];if(!_0x9f0067)return showParentSegmentNotSetError(_0x18b8a7(0x30b)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a'+_0x18b8a7(0x386)+'\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path'),0x1;_0xbb5274['verbose']&&(console[_0x18b8a7(0x17f)](_0x18b8a7(0x365)+_0xbb5274[_0x18b8a7(0x19f)]),console['error'](_0x18b8a7(0x188)+_0x9f0067));const _0x4f7f0e=await withSpinner(_0x18b8a7(0x2e7)+_0x9f0067+_0x18b8a7(0x31f),()=>_0xfe47fd[_0x18b8a7(0x28c)][_0x18b8a7(0x236)](_0x9f0067),{'verbose':_0xbb5274[_0x18b8a7(0x374)]}),_0x18fc3e=_0x4f7f0e[_0x18b8a7(0x253)],_0x1c010d=_0xfe47fd['segment'][_0x18b8a7(0x319)](_0x18fc3e);if(_0x263f7f['output']){const _0x3d60d7=await this[_0x18b8a7(0x1dd)](_0x11cebc,_0x9f0067,_0x18fc3e,_0x1c010d),_0x2470d7=this[_0x18b8a7(0x259)](_0x3d60d7);writeFileSync(_0x263f7f['output'],_0x2470d7);const _0x5ce440=_0x3d60d7['customers'][_0x18b8a7(0x384)][_0x18b8a7(0x396)]+_0x3d60d7[_0x18b8a7(0x29b)][_0x18b8a7(0x2c9)]((_0x23cd5f,_0x5a3c1c)=>_0x23cd5f+_0x5a3c1c['columns']['length'],0x0),_0x47d960=_0x3d60d7[_0x18b8a7(0x29b)][_0x18b8a7(0x266)](_0x574ab0=>_0x574ab0[_0x18b8a7(0x384)]['length']===0x0)[_0x18b8a7(0x396)];return console[_0x18b8a7(0x383)](_0x18b8a7(0x307)+_0x263f7f[_0x18b8a7(0x271)]),console[_0x18b8a7(0x383)]('\x20\x20Database:\x20'+_0x1c010d),console[_0x18b8a7(0x383)](_0x18b8a7(0x24f)+_0x3d60d7[_0x18b8a7(0x29b)]['length']+'\x20behaviors'),console[_0x18b8a7(0x383)](_0x18b8a7(0x184)+_0x5ce440+_0x18b8a7(0x2bb)),_0x47d960>0x0&&console[_0x18b8a7(0x383)](_0x18b8a7(0x2ca)+_0x47d960+_0x18b8a7(0x198)),0x0;}console[_0x18b8a7(0x17f)]('\x0a'+a34_0x2ac66a['bold'](_0x18b8a7(0x1b7))+'\x20'+a34_0x2ac66a[_0x18b8a7(0x1c0)](_0x1c010d));const _0x239c8a=await withSpinner(_0x18b8a7(0x183),()=>_0xfe47fd[_0x18b8a7(0x28c)][_0x18b8a7(0x1f1)](_0x18fc3e),{'verbose':_0xbb5274[_0x18b8a7(0x374)]});console['error']('\x0a'+a34_0x2ac66a[_0x18b8a7(0x27e)](_0x18b8a7(0x19d))+'\x20'+a34_0x2ac66a[_0x18b8a7(0x1da)]('('+_0x1c010d+_0x18b8a7(0x2e0)));const _0x15a27c=await executeSchemaQuery(_0x239c8a[_0x18b8a7(0x253)],_0xfe47fd,_0xbb5274);await handleQueryOutput(_0x15a27c,_0xbb5274);const _0x33b53a=await withSpinner(_0x18b8a7(0x2d2),()=>_0xfe47fd['segment'][_0x18b8a7(0x303)](_0x18fc3e),{'verbose':_0xbb5274[_0x18b8a7(0x374)]});for(const _0xda8f8b of _0x33b53a['data']){const _0x1f3036=_0x18b8a7(0x1bc)+_0xda8f8b[_0x18b8a7(0x176)]()[_0x18b8a7(0x249)](/\s+/g,'_'),_0x2089f5=_0x18b8a7(0x2d9)+_0x1c010d+'.'+_0x1f3036;console[_0x18b8a7(0x17f)]('\x0a'+a34_0x2ac66a[_0x18b8a7(0x27e)](_0xda8f8b)+'\x20'+a34_0x2ac66a[_0x18b8a7(0x1da)]('('+_0x1c010d+'.'+_0x1f3036+')'));try{const _0x206688=await executeSchemaQuery(_0x2089f5,_0xfe47fd,_0xbb5274);await handleQueryOutput(_0x206688,_0xbb5274);}catch{console['error'](a34_0x2ac66a[_0x18b8a7(0x2a5)](_0x18b8a7(0x1d1)));}}return 0x0;}async['collectSchema'](_0x23a9a4,_0x4ad00e,_0x325d91,_0x3ce4f6){const _0x197dca=a34_0x5c22ff,{options:_0x133637,tdx:_0x2b02e9}=_0x23a9a4,_0x1d5c40=await withSpinner(_0x197dca(0x183),()=>_0x2b02e9['segment'][_0x197dca(0x1f1)](_0x325d91),{'verbose':_0x133637[_0x197dca(0x374)]}),_0x56e356=await executeSchemaQuery(_0x1d5c40[_0x197dca(0x253)],_0x2b02e9,_0x133637),_0x267876=_0x56e356['data'][_0x197dca(0x22e)](_0x2bce73=>({'name':_0x2bce73[_0x197dca(0x23b)],'type':_0x2bce73[_0x197dca(0x354)]})),_0x5e7489=await withSpinner(_0x197dca(0x2d2),()=>_0x2b02e9[_0x197dca(0x28c)][_0x197dca(0x303)](_0x325d91),{'verbose':_0x133637['verbose']}),_0x47c141=[];for(const _0x2edd9d of _0x5e7489[_0x197dca(0x253)]){const _0x3f433a=_0x197dca(0x1bc)+_0x2edd9d[_0x197dca(0x176)]()[_0x197dca(0x249)](/\s+/g,'_'),_0x5bd0c5=_0x197dca(0x2d9)+_0x3ce4f6+'.'+_0x3f433a;let _0x374a2e=[];try{const _0x39899b=await executeSchemaQuery(_0x5bd0c5,_0x2b02e9,_0x133637);_0x374a2e=_0x39899b[_0x197dca(0x253)][_0x197dca(0x22e)](_0x286dcc=>({'name':_0x286dcc[_0x197dca(0x23b)],'type':_0x286dcc['column_type']}));}catch{}_0x47c141[_0x197dca(0x1a7)]({'table':_0x3f433a,'columns':_0x374a2e});}return{'database':_0x3ce4f6,'parent_segment':_0x4ad00e,'parent_id':_0x325d91,'customers':{'table':_0x197dca(0x19d),'columns':_0x267876},'behaviors':_0x47c141};}[a34_0x5c22ff(0x259)](_0x17e266){const _0x52435f=a34_0x5c22ff,_0x1a2143=_0x1c113c=>{const _0x25df52=a34_0x335d;if(_0x1c113c['length']===0x0)return'[]';const _0x260b88=_0x1c113c['map'](_0xe292d5=>_0x25df52(0x24b)+_0xe292d5[_0x25df52(0x297)]+_0x25df52(0x2bd)+_0xe292d5[_0x25df52(0x37c)]+_0x25df52(0x2f6));return'[\x0a'+_0x260b88['join'](',\x0a')+_0x25df52(0x284);},_0x6c3b8f=_0x17e266[_0x52435f(0x29b)]['map'](_0x48aed4=>{const _0x4f7d56=_0x52435f;return _0x4f7d56(0x373)+_0x48aed4[_0x4f7d56(0x222)]+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20'+_0x1a2143(_0x48aed4['columns'])[_0x4f7d56(0x249)](/^/gm,'\x20\x20')[_0x4f7d56(0x231)]()+_0x4f7d56(0x2be);})[_0x52435f(0x2f1)](',\x0a');return _0x52435f(0x340)+_0x17e266[_0x52435f(0x381)]+_0x52435f(0x173)+_0x17e266['parent_segment']+_0x52435f(0x2b4)+_0x17e266[_0x52435f(0x213)]+_0x52435f(0x1fa)+_0x17e266['customers'][_0x52435f(0x222)]+'\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20'+_0x1a2143(_0x17e266[_0x52435f(0x19d)][_0x52435f(0x384)])[_0x52435f(0x249)](/^/gm,'\x20\x20')[_0x52435f(0x231)]()+_0x52435f(0x2ee)+_0x6c3b8f+_0x52435f(0x35e);}}export class ParentSegmentSQLCommand extends BaseCommand{['name']=a34_0x5c22ff(0x174);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x2d7);async[a34_0x5c22ff(0x388)](_0x4bf9f8){const _0x202a57=a34_0x5c22ff,{options:_0x4bb4ad,args:_0x2f8b75,tdx:_0x5552dc}=_0x4bf9f8,_0x2b7254=_0x2f8b75[0x0]||_0x4bb4ad[_0x202a57(0x1a6)];if(!_0x2b7254)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a'+_0x202a57(0x339)),0x1;_0x4bb4ad['verbose']&&(console[_0x202a57(0x17f)]('Site:\x20'+_0x4bb4ad[_0x202a57(0x19f)]),console[_0x202a57(0x17f)]('Parent\x20segment:\x20'+_0x2b7254));const _0x273ab5=await withSpinner(_0x202a57(0x2e7)+_0x2b7254+_0x202a57(0x31f),()=>_0x5552dc[_0x202a57(0x28c)]['resolveParentId'](_0x2b7254),{'verbose':_0x4bb4ad[_0x202a57(0x374)]}),_0x584abe=_0x273ab5['data'],_0x44d448=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x2b7254+'\x27...',()=>_0x5552dc['segment'][_0x202a57(0x1f1)](_0x584abe),{'verbose':_0x4bb4ad[_0x202a57(0x374)]}),_0x11ec5c=_0x44d448[_0x202a57(0x253)];return _0x4bb4ad[_0x202a57(0x247)]===_0x202a57(0x34c)||_0x4bb4ad[_0x202a57(0x247)]==='jsonl'?await handleSDKOutput([{'sql':_0x11ec5c}],_0x4bb4ad):console['log'](_0x11ec5c),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a34_0x5c22ff(0x297)]='segment:parent:show';[a34_0x5c22ff(0x205)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a34_0x5c22ff(0x388)](_0x214a31){const _0x206a50=a34_0x5c22ff,{options:_0x1d048c,args:_0x51cff5,tdx:_0x45957b}=_0x214a31,_0x25da1c=_0x51cff5[0x0]||_0x1d048c['parentSegment'];if(!_0x25da1c)return showParentSegmentNotSetError(_0x206a50(0x1a3)+_0x206a50(0x230)),0x1;_0x1d048c[_0x206a50(0x374)]&&(console['error'](_0x206a50(0x365)+_0x1d048c[_0x206a50(0x19f)]),console[_0x206a50(0x17f)](_0x206a50(0x188)+_0x25da1c));const _0x7aac8b=await withSpinner(_0x206a50(0x2e7)+_0x25da1c+_0x206a50(0x31f),()=>_0x45957b[_0x206a50(0x28c)][_0x206a50(0x236)](_0x25da1c),{'verbose':_0x1d048c[_0x206a50(0x374)]}),_0x547a3b=_0x7aac8b[_0x206a50(0x253)],_0x27a09e=await withSpinner(_0x206a50(0x353)+_0x25da1c+_0x206a50(0x31f),()=>_0x45957b[_0x206a50(0x28c)][_0x206a50(0x1f1)](_0x547a3b),{'verbose':_0x1d048c[_0x206a50(0x374)]});let _0x104fad=_0x27a09e['data'];const _0x4ea44f=resolveLimit(_0x1d048c['limit'],DEFAULT_DISPLAY_LIMIT),_0x1d7d6c=/\bLIMIT\s+\d+/i[_0x206a50(0x212)](_0x104fad);!_0x1d7d6c&&(_0x104fad=_0x104fad['trim']()['replace'](/;+$/,''),_0x104fad=_0x206a50(0x221)+_0x104fad+_0x206a50(0x370)+_0x4ea44f);_0x1d048c['verbose']&&console[_0x206a50(0x17f)]('SQL\x20query:\x0a'+_0x104fad);const _0x366bc0=await withProgressSpinner('Executing\x20parent\x20segment\x20query...',async _0x5bcd70=>{const _0x452a94=_0x206a50,_0x444e6e=await _0x45957b[_0x452a94(0x1db)]['execute'](_0x104fad,{'catalog':'td','schema':_0x452a94(0x2c8),'onJobId':_0x243438=>{_0x5bcd70['setJobId'](_0x243438);}});return _0x444e6e;},{'verbose':_0x1d048c[_0x206a50(0x374)]}),_0x1d4aae=_0x366bc0[_0x206a50(0x253)],_0x341e2c=_0x1d4aae[_0x206a50(0x345)]?_0x206a50(0x2ec)+_0x1d4aae[_0x206a50(0x345)]+']':'';return console[_0x206a50(0x17f)]('✔\x20Query\x20completed:\x20Processed\x20'+_0x1d4aae['stats'][_0x206a50(0x292)][_0x206a50(0x1d0)]()+_0x206a50(0x182)+(_0x206a50(0x17d)+formatElapsed(_0x1d4aae[_0x206a50(0x2b7)]['elapsedTimeMillis'])+_0x341e2c)),await handleQueryOutput(_0x1d4aae,_0x1d048c),0x0;}}export class PSRtListCommand extends BaseCommand{[a34_0x5c22ff(0x297)]='ps:rt:list';[a34_0x5c22ff(0x205)]='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async['execute'](_0x1b5053){const _0x202753=a34_0x5c22ff,{options:_0x41e847,args:_0x9c6263,tdx:_0x33dbf8}=_0x1b5053,_0x5b42ff=_0x9c6263[0x0],_0x3d07d5=await withSpinner(_0x5b42ff?_0x202753(0x38d)+_0x5b42ff+_0x202753(0x31f):_0x202753(0x196),()=>_0x33dbf8[_0x202753(0x1e2)][_0x202753(0x197)](),{'verbose':_0x41e847[_0x202753(0x374)]});let _0x42b983=_0x3d07d5[_0x202753(0x253)][_0x202753(0x266)](_0x5e90a1=>_0x5e90a1['realtime_enabled']);if(_0x5b42ff){const _0x366940=_0x5b42ff['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x202753(0x249)](/\*/g,'.*')[_0x202753(0x249)](/\?/g,'.'),_0x275262=new RegExp('^'+_0x366940+'$','i');_0x42b983=_0x42b983[_0x202753(0x266)](_0x18082d=>_0x275262[_0x202753(0x212)](_0x18082d[_0x202753(0x297)]));}_0x42b983[_0x202753(0x2fd)]((_0x5ca2ef,_0x1655a0)=>_0x5ca2ef[_0x202753(0x297)][_0x202753(0x26a)](_0x1655a0[_0x202753(0x297)])),console[_0x202753(0x17f)]('✔\x20Found\x20'+_0x42b983['length']+'\x20RT-enabled\x20parent\x20segment'+(_0x42b983['length']!==0x1?'s':''));const _0x22b76f=_0x55d818=>{const _0x2dd1e3=_0x202753;return getConsoleNextUrl(_0x41e847[_0x2dd1e3(0x19f)],_0x2dd1e3(0x286)+_0x55d818);};if(_0x41e847[_0x202753(0x247)]===_0x202753(0x34c)||_0x41e847['format']==='jsonl'){const _0x55f347=_0x42b983[_0x202753(0x22e)](_0x4c5bf4=>({..._0x4c5bf4,'url':_0x22b76f(_0x4c5bf4['id'])}));await handleSDKOutput(_0x55f347,_0x41e847);}else{if(_0x42b983[_0x202753(0x396)]===0x0)console[_0x202753(0x383)]('No\x20RT-enabled\x20parent\x20segments\x20found');else for(const _0x2baff5 of _0x42b983){const _0x32593c=_0x2baff5[_0x202753(0x2c4)]?a34_0x2ac66a['dim']('\x20('+formatRows(_0x2baff5['population'])+')'):'',_0x7a1f59=hyperlink(_0x2baff5[_0x202753(0x297)],_0x22b76f(_0x2baff5['id']));console[_0x202753(0x383)]('⚡\x20'+_0x7a1f59+_0x32593c);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x25e);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x362);async['execute'](_0x23264d){const _0x2cd0a2=a34_0x5c22ff,{options:_0x9066db,args:_0x41cb8e,tdx:_0x3a1efe}=_0x23264d,_0x38f46d=_0x41cb8e[0x0]||_0x9066db[_0x2cd0a2(0x1a6)];if(!_0x38f46d)return showParentSegmentNotSetError(_0x2cd0a2(0x34e)+_0x2cd0a2(0x1d7)),0x1;const _0xb47714=resolveYamlFile(_0x38f46d);if(!existsSync(_0xb47714))return showFileNotFoundError(_0xb47714,_0x38f46d),0x1;let _0x32a3b8;try{_0x32a3b8=readFileSync(_0xb47714,_0x2cd0a2(0x238));}catch(_0x5c9482){const _0x594b85=_0x5c9482 instanceof Error?_0x5c9482[_0x2cd0a2(0x367)]:String(_0x5c9482);return console[_0x2cd0a2(0x17f)](_0x2cd0a2(0x2ef)+_0x594b85),0x1;}const _0x3e1362=createCommandSpinner(a34_0x2ac66a['dim'](_0x2cd0a2(0x244)),{'verbose':_0x9066db[_0x2cd0a2(0x374)]});_0x3e1362[_0x2cd0a2(0x2f7)]();const _0x1f76dc={'realtime':!![],'onProgress':_0x1d87f6=>{const _0x143ee1=_0x2cd0a2;_0x3e1362[_0x143ee1(0x2a9)]=formatProgressMessage(_0x1d87f6);}};let _0x4bda3a;try{_0x4bda3a=await _0x3a1efe[_0x2cd0a2(0x28c)]['validateParentYaml'](_0x32a3b8,_0x1f76dc),_0x3e1362[_0x2cd0a2(0x2b0)]();}catch(_0x4df1e0){_0x3e1362[_0x2cd0a2(0x2b0)]();throw _0x4df1e0;}console['error']('\x0a'+a34_0x2ac66a[_0x2cd0a2(0x27e)](_0x2cd0a2(0x382))+'\x20'+_0x4bda3a[_0x2cd0a2(0x297)]),console[_0x2cd0a2(0x17f)]('═'['repeat'](0x3c)),displayRealtimeValidation(_0x4bda3a),console[_0x2cd0a2(0x17f)]('─'['repeat'](0x3c));if(_0x4bda3a['errors']['length']>0x0){console[_0x2cd0a2(0x17f)]('\x0a'+a34_0x2ac66a['red'](_0x2cd0a2(0x31a)));for(const _0x245584 of _0x4bda3a[_0x2cd0a2(0x2aa)]){console[_0x2cd0a2(0x17f)]('\x20\x20'+a34_0x2ac66a['red']('•')+'\x20'+_0x245584);}}return _0x4bda3a[_0x2cd0a2(0x219)]&&console[_0x2cd0a2(0x17f)]('\x0a'+a34_0x2ac66a[_0x2cd0a2(0x232)]('✔')+_0x2cd0a2(0x255)),_0x4bda3a[_0x2cd0a2(0x219)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x1f2);[a34_0x5c22ff(0x205)]='List\x20RT\x20journeys';async[a34_0x5c22ff(0x388)](_0x4db020){const _0x54fdad=a34_0x5c22ff,{options:_0x368d9c,args:_0x311f0d,tdx:_0x181458}=_0x4db020,_0x3e0055=_0x311f0d[0x0]||_0x368d9c[_0x54fdad(0x1a6)];if(!_0x3e0055)return showParentSegmentNotSetError(_0x54fdad(0x180)+_0x54fdad(0x359)),0x1;_0x368d9c['verbose']&&(console[_0x54fdad(0x17f)](_0x54fdad(0x365)+_0x368d9c[_0x54fdad(0x19f)]),console[_0x54fdad(0x17f)]('Parent\x20segment:\x20'+_0x3e0055));const _0x4787dc=await withSpinner(_0x54fdad(0x2e7)+_0x3e0055+'\x27...',()=>_0x181458[_0x54fdad(0x28c)][_0x54fdad(0x236)](_0x3e0055),{'verbose':_0x368d9c[_0x54fdad(0x374)]}),_0x222251=_0x4787dc['data'],_0x3a630d=await withSpinner(_0x54fdad(0x237)+_0x3e0055+_0x54fdad(0x31f),()=>_0x181458[_0x54fdad(0x1e2)][_0x54fdad(0x2ad)](_0x222251),{'verbose':_0x368d9c[_0x54fdad(0x374)]}),_0x51a72c=_0x3a630d[_0x54fdad(0x253)];console[_0x54fdad(0x17f)]('✔\x20Found\x20'+_0x51a72c[_0x54fdad(0x396)]+_0x54fdad(0x245)+(_0x51a72c[_0x54fdad(0x396)]!==0x1?'s':''));if(_0x368d9c['format']===_0x54fdad(0x34c)||_0x368d9c['format']==='jsonl')await handleSDKOutput(_0x51a72c,_0x368d9c);else{if(_0x51a72c[_0x54fdad(0x396)]===0x0)console['log'](_0x54fdad(0x1e1));else for(const _0x547c6f of _0x51a72c){const _0x9738f3=_0x547c6f['state']===_0x54fdad(0x39b)?'🚀':'📝',_0x1c9d6e=_0x547c6f[_0x54fdad(0x394)]?a34_0x2ac66a['yellow'](_0x54fdad(0x31d)):'',_0x207f51=a34_0x2ac66a[_0x54fdad(0x1da)]('\x20('+_0x547c6f['stageCount']+'\x20stage'+(_0x547c6f[_0x54fdad(0x1cc)]!==0x1?'s':'')+')');console[_0x54fdad(0x383)](_0x9738f3+'\x20'+_0x547c6f[_0x54fdad(0x297)]+_0x1c9d6e+_0x207f51);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x1bb);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x24d);async[a34_0x5c22ff(0x388)](_0x45f5a8){const _0x8099c8=a34_0x5c22ff,{options:_0x60749e,args:_0x4f1ada,tdx:_0x3304ac}=_0x45f5a8,_0x19d6e0=_0x4f1ada[0x0];if(!_0x19d6e0)return console[_0x8099c8(0x17f)](a34_0x2ac66a[_0x8099c8(0x35a)](_0x8099c8(0x2e2))),console[_0x8099c8(0x17f)](_0x8099c8(0x270)),console['error'](a34_0x2ac66a[_0x8099c8(0x1da)](_0x8099c8(0x380))),0x1;_0x60749e['verbose']&&(console[_0x8099c8(0x17f)]('Site:\x20'+_0x60749e['site']),console[_0x8099c8(0x17f)](_0x8099c8(0x251)+_0x19d6e0));const _0x155537=await withSpinner('Pausing\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x19d6e0+_0x8099c8(0x31f),()=>_0x3304ac[_0x8099c8(0x1e2)][_0x8099c8(0x331)](_0x19d6e0),{'verbose':_0x60749e[_0x8099c8(0x374)]}),_0x29f79c=_0x155537[_0x8099c8(0x253)];console[_0x8099c8(0x17f)](_0x8099c8(0x2c2)+_0x29f79c[_0x8099c8(0x297)]+'\x27');if(_0x60749e['format']===_0x8099c8(0x34c)||_0x60749e[_0x8099c8(0x247)]==='jsonl')await handleSDKOutput([_0x29f79c],_0x60749e);else{const _0x9318c2=_0x29f79c[_0x8099c8(0x397)]===_0x8099c8(0x39b)?'🚀':'📝',_0x41ff94=_0x29f79c[_0x8099c8(0x394)]?a34_0x2ac66a[_0x8099c8(0x2a5)](_0x8099c8(0x31d)):'';console[_0x8099c8(0x383)](_0x9318c2+'\x20'+_0x29f79c[_0x8099c8(0x297)]+_0x41ff94);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{['name']='ps:rt:jn:resume';['description']=a34_0x5c22ff(0x23c);async['execute'](_0x41bc54){const _0x3c6a44=a34_0x5c22ff,{options:_0x37b876,args:_0x13af35,tdx:_0x5a7e27}=_0x41bc54,_0x26ed2f=_0x13af35[0x0];if(!_0x26ed2f)return console[_0x3c6a44(0x17f)](a34_0x2ac66a[_0x3c6a44(0x35a)](_0x3c6a44(0x2e2))),console[_0x3c6a44(0x17f)](_0x3c6a44(0x32f)),console[_0x3c6a44(0x17f)](a34_0x2ac66a[_0x3c6a44(0x1da)](_0x3c6a44(0x380))),0x1;_0x37b876[_0x3c6a44(0x374)]&&(console['error'](_0x3c6a44(0x365)+_0x37b876[_0x3c6a44(0x19f)]),console[_0x3c6a44(0x17f)]('RT\x20Journey\x20ID:\x20'+_0x26ed2f));const _0xeacbdb=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x26ed2f+_0x3c6a44(0x31f),()=>_0x5a7e27['realtime'][_0x3c6a44(0x321)](_0x26ed2f),{'verbose':_0x37b876[_0x3c6a44(0x374)]}),_0x1fa905=_0xeacbdb[_0x3c6a44(0x253)];console[_0x3c6a44(0x17f)]('✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x1fa905[_0x3c6a44(0x297)]+'\x27');if(_0x37b876[_0x3c6a44(0x247)]==='json'||_0x37b876[_0x3c6a44(0x247)]==='jsonl')await handleSDKOutput([_0x1fa905],_0x37b876);else{const _0x8707c2=_0x1fa905[_0x3c6a44(0x397)]===_0x3c6a44(0x39b)?'🚀':'📝',_0x39d29a=_0x1fa905[_0x3c6a44(0x394)]?a34_0x2ac66a[_0x3c6a44(0x2a5)](_0x3c6a44(0x31d)):'';console['log'](_0x8707c2+'\x20'+_0x1fa905[_0x3c6a44(0x297)]+_0x39d29a);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x175);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x1e4);async[a34_0x5c22ff(0x388)](_0x1e10e1){const _0xb586e6=a34_0x5c22ff,{options:_0x22ade9,args:_0x34bf3c,tdx:_0x5db0c7}=_0x1e10e1,_0x60bdc1=_0x34bf3c[0x0]||_0x22ade9[_0xb586e6(0x1a6)];if(!_0x60bdc1)return showParentSegmentNotSetError(_0xb586e6(0x366)+_0xb586e6(0x206)),0x1;_0x22ade9[_0xb586e6(0x374)]&&(console[_0xb586e6(0x17f)](_0xb586e6(0x365)+_0x22ade9[_0xb586e6(0x19f)]),console[_0xb586e6(0x17f)](_0xb586e6(0x188)+_0x60bdc1));const _0xa0d0f6=await withSpinner(_0xb586e6(0x2e7)+_0x60bdc1+_0xb586e6(0x31f),()=>_0x5db0c7['segment']['resolveParentId'](_0x60bdc1),{'verbose':_0x22ade9['verbose']}),_0x149c08=_0xa0d0f6[_0xb586e6(0x253)],_0x321580=await withSpinner(_0xb586e6(0x320)+_0x60bdc1+_0xb586e6(0x31f),()=>_0x5db0c7[_0xb586e6(0x1e2)][_0xb586e6(0x254)](_0x149c08),{'verbose':_0x22ade9['verbose']}),_0x1ac948=_0x321580[_0xb586e6(0x253)];return console['error'](_0xb586e6(0x2c7)),_0x22ade9[_0xb586e6(0x247)]===_0xb586e6(0x34c)||_0x22ade9[_0xb586e6(0x247)]===_0xb586e6(0x1c4)?await handleSDKOutput([_0x1ac948],_0x22ade9):(console[_0xb586e6(0x383)](_0xb586e6(0x204)+_0x1ac948['id']),console[_0xb586e6(0x383)](_0xb586e6(0x240)+_0x1ac948['audienceId']),console[_0xb586e6(0x383)](_0xb586e6(0x26d)+_0x1ac948[_0xb586e6(0x2dd)]),console['log']('eventKind:\x20'+_0x1ac948[_0xb586e6(0x1ad)]),console[_0xb586e6(0x383)](_0xb586e6(0x265)+_0x1ac948[_0xb586e6(0x228)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x23e);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x201);async[a34_0x5c22ff(0x388)](_0x2aaebf){const _0x2f3c8b=a34_0x5c22ff,{options:_0x3db11d,args:_0x35f2a8,tdx:_0xa347c3}=_0x2aaebf,_0x14d53d=_0x35f2a8[0x0]||_0x3db11d[_0x2f3c8b(0x1a6)];if(!_0x14d53d)return showParentSegmentNotSetError(_0x2f3c8b(0x216)+_0x2f3c8b(0x217)),0x1;const _0x5aa825=await withSpinner(_0x2f3c8b(0x2e7)+_0x14d53d+_0x2f3c8b(0x31f),()=>_0xa347c3[_0x2f3c8b(0x28c)][_0x2f3c8b(0x236)](_0x14d53d),{'verbose':_0x3db11d[_0x2f3c8b(0x374)]}),_0x506f36=_0x5aa825[_0x2f3c8b(0x253)],_0x2f48d9=await withSpinner('Listing\x20personalization\x20services\x20for\x20\x27'+_0x14d53d+_0x2f3c8b(0x31f),()=>_0xa347c3[_0x2f3c8b(0x17a)][_0x2f3c8b(0x197)](_0x506f36),{'verbose':_0x3db11d['verbose']}),_0xf21c68=_0x2f48d9[_0x2f3c8b(0x253)];console[_0x2f3c8b(0x17f)](_0x2f3c8b(0x25d)+_0xf21c68[_0x2f3c8b(0x396)]+_0x2f3c8b(0x22a)+(_0xf21c68[_0x2f3c8b(0x396)]!==0x1?'s':''));if(_0x3db11d[_0x2f3c8b(0x247)]===_0x2f3c8b(0x34c)||_0x3db11d['format']==='jsonl')await handleSDKOutput(_0xf21c68,_0x3db11d);else{if(_0xf21c68['length']===0x0)console[_0x2f3c8b(0x383)](_0x2f3c8b(0x1a2)),console[_0x2f3c8b(0x17f)](a34_0x2ac66a[_0x2f3c8b(0x1c0)](_0x2f3c8b(0x199)));else for(const _0x67dad8 of _0xf21c68){console[_0x2f3c8b(0x383)](a34_0x2ac66a[_0x2f3c8b(0x27e)](_0x67dad8[_0x2f3c8b(0x297)])+'\x20'+a34_0x2ac66a[_0x2f3c8b(0x1da)](_0x2f3c8b(0x332)+_0x67dad8['id']+')'));_0x67dad8[_0x2f3c8b(0x205)]&&console[_0x2f3c8b(0x383)]('\x20\x20'+a34_0x2ac66a[_0x2f3c8b(0x1da)](_0x67dad8[_0x2f3c8b(0x205)]));if(_0x67dad8['tokens']&&_0x67dad8[_0x2f3c8b(0x343)][_0x2f3c8b(0x396)]>0x0)for(const _0x433a05 of _0x67dad8['tokens']){const _0x1ac201=_0x433a05[_0x2f3c8b(0x1ef)]?.['length']?_0x433a05[_0x2f3c8b(0x1ef)]['join'](',\x20'):_0x2f3c8b(0x190);console[_0x2f3c8b(0x383)]('\x20\x20'+a34_0x2ac66a[_0x2f3c8b(0x1c0)]('token:')+'\x20'+_0x433a05[_0x2f3c8b(0x297)]+'\x20'+a34_0x2ac66a['dim']('(id:\x20'+_0x433a05['id']+')')),console[_0x2f3c8b(0x383)]('\x20\x20\x20\x20'+a34_0x2ac66a[_0x2f3c8b(0x1da)](_0x2f3c8b(0x1f7))+'\x20'+_0x1ac201);}else console[_0x2f3c8b(0x383)]('\x20\x20'+a34_0x2ac66a[_0x2f3c8b(0x1da)](_0x2f3c8b(0x2ea)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']=a34_0x5c22ff(0x2b1);['description']=a34_0x5c22ff(0x2e4);async[a34_0x5c22ff(0x388)](_0x27e75d){const _0x1cc3cc=a34_0x5c22ff,{options:_0x1b7315,args:_0x4ca856,tdx:_0x2473ef}=_0x27e75d,_0x1f9dad=_0x1b7315,_0x34762e=_0x4ca856[0x0],_0x10913e=_0x4ca856[0x1]||_0x1b7315['parentSegment'];if(!_0x34762e)return console[_0x1cc3cc(0x17f)](_0x1cc3cc(0x2f9)),console[_0x1cc3cc(0x17f)](_0x1cc3cc(0x273)),console[_0x1cc3cc(0x17f)](_0x1cc3cc(0x1ca)),0x1;if(!_0x10913e)return showParentSegmentNotSetError(_0x1cc3cc(0x1eb)+_0x1cc3cc(0x1ca)),0x1;const _0x414560=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x10913e+'\x27...',()=>_0x2473ef[_0x1cc3cc(0x28c)][_0x1cc3cc(0x236)](_0x10913e),{'verbose':_0x1b7315[_0x1cc3cc(0x374)]}),_0x39e6bc=_0x414560[_0x1cc3cc(0x253)],_0x2990c4={'name':_0x34762e,'description':_0x1f9dad[_0x1cc3cc(0x205)],'public':_0x1f9dad[_0x1cc3cc(0x257)]},_0x239b20=await withSpinner(_0x1cc3cc(0x1ba)+_0x34762e+_0x1cc3cc(0x31f),()=>_0x2473ef['personalization']['create'](_0x39e6bc,_0x2990c4),{'verbose':_0x1b7315[_0x1cc3cc(0x374)]}),_0x5165e1=_0x239b20[_0x1cc3cc(0x253)];return console[_0x1cc3cc(0x17f)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0x5165e1['name']+_0x1cc3cc(0x35c)+_0x5165e1['id']),await handleSDKOutput([_0x5165e1],_0x1b7315),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x193);['description']=a34_0x5c22ff(0x27b);async['execute'](_0x47eca1){const _0x68ecfd=a34_0x5c22ff,{options:_0x29350f,args:_0x34b213,tdx:_0x56adec}=_0x47eca1,_0x38cf71=_0x34b213[0x0],_0x132795=_0x34b213[0x1]||_0x29350f[_0x68ecfd(0x1a6)];if(!_0x38cf71)return console['error'](_0x68ecfd(0x2c3)),console['error'](_0x68ecfd(0x28b)),console[_0x68ecfd(0x17f)](_0x68ecfd(0x351)),0x1;if(!_0x132795)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a'+_0x68ecfd(0x351)),0x1;const _0x334633=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x132795+_0x68ecfd(0x31f),()=>_0x56adec[_0x68ecfd(0x28c)][_0x68ecfd(0x236)](_0x132795),{'verbose':_0x29350f[_0x68ecfd(0x374)]}),_0x355984=_0x334633[_0x68ecfd(0x253)],_0x9f521d=await withSpinner(_0x68ecfd(0x272)+_0x38cf71+_0x68ecfd(0x31f),()=>_0x56adec[_0x68ecfd(0x17a)]['get'](_0x355984,_0x38cf71),{'verbose':_0x29350f[_0x68ecfd(0x374)]}),_0x381b31=_0x9f521d['data'];if(_0x29350f[_0x68ecfd(0x34c)]||_0x29350f[_0x68ecfd(0x1c4)])await handleSDKOutput([_0x381b31],_0x29350f);else{console[_0x68ecfd(0x383)](a34_0x2ac66a[_0x68ecfd(0x27e)](_0x381b31[_0x68ecfd(0x297)])+'\x20'+a34_0x2ac66a[_0x68ecfd(0x1da)](_0x68ecfd(0x332)+_0x381b31['id']+')'));_0x381b31[_0x68ecfd(0x205)]&&console[_0x68ecfd(0x383)]('\x20\x20'+a34_0x2ac66a[_0x68ecfd(0x1da)](_0x381b31[_0x68ecfd(0x205)]));console['log']('\x20\x20'+a34_0x2ac66a[_0x68ecfd(0x1c0)]('public:')+'\x20'+(_0x381b31[_0x68ecfd(0x257)]?_0x68ecfd(0x324):'no'));if(_0x381b31[_0x68ecfd(0x343)]&&_0x381b31['tokens'][_0x68ecfd(0x396)]>0x0)for(const _0x5788ea of _0x381b31[_0x68ecfd(0x343)]){const _0x32dab2=_0x5788ea[_0x68ecfd(0x1ef)]?.[_0x68ecfd(0x396)]?_0x5788ea[_0x68ecfd(0x1ef)][_0x68ecfd(0x2f1)](',\x20'):_0x68ecfd(0x190);console[_0x68ecfd(0x383)]('\x20\x20'+a34_0x2ac66a[_0x68ecfd(0x1c0)](_0x68ecfd(0x302))+'\x20'+_0x5788ea[_0x68ecfd(0x297)]+'\x20'+a34_0x2ac66a[_0x68ecfd(0x1da)](_0x68ecfd(0x332)+_0x5788ea['id']+')')),console['log']('\x20\x20\x20\x20'+a34_0x2ac66a['dim'](_0x68ecfd(0x1f7))+'\x20'+_0x32dab2);}else console[_0x68ecfd(0x383)]('\x20\x20'+a34_0x2ac66a[_0x68ecfd(0x1da)]('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{['name']=a34_0x5c22ff(0x1ff);['description']=a34_0x5c22ff(0x18a);async['execute'](_0x2e77c9){const _0x2087b1=a34_0x5c22ff,{options:_0x24f6cf,args:_0x500841,tdx:_0x38f73b}=_0x2e77c9,_0x4d5e62=_0x500841[0x0],_0x4f7fc8=_0x500841[0x1]||_0x24f6cf[_0x2087b1(0x1a6)];if(!_0x4d5e62)return console['error'](_0x2087b1(0x2c3)),console[_0x2087b1(0x17f)](_0x2087b1(0x311)),console['error'](_0x2087b1(0x1d9)),0x1;if(!_0x4f7fc8)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a'+_0x2087b1(0x1d9)),0x1;const _0x1b3de8=await withSpinner(_0x2087b1(0x2e7)+_0x4f7fc8+_0x2087b1(0x31f),()=>_0x38f73b['segment'][_0x2087b1(0x236)](_0x4f7fc8),{'verbose':_0x24f6cf[_0x2087b1(0x374)]}),_0x2d235b=_0x1b3de8[_0x2087b1(0x253)];return await withSpinner(_0x2087b1(0x1b2)+_0x4d5e62+_0x2087b1(0x31f),()=>_0x38f73b[_0x2087b1(0x17a)][_0x2087b1(0x27d)](_0x2d235b,_0x4d5e62),{'verbose':_0x24f6cf[_0x2087b1(0x374)]}),console[_0x2087b1(0x17f)]('✔\x20Deleted\x20personalization\x20service\x20\x27'+_0x4d5e62+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{['name']=a34_0x5c22ff(0x36a);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x30a);async[a34_0x5c22ff(0x388)](_0x4a2089){const _0x440ddb=a34_0x5c22ff,{options:_0x24c596,args:_0xb1ba77,tdx:_0x3f4975}=_0x4a2089,_0x3d316a=_0x24c596,_0x55ad89=_0xb1ba77[0x0],_0x10a61f=_0xb1ba77[0x1]||_0x24c596[_0x440ddb(0x1a6)];if(!_0x55ad89)return console[_0x440ddb(0x17f)](_0x440ddb(0x2c3)),console['error'](_0x440ddb(0x2f2)),console[_0x440ddb(0x17f)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x3d316a[_0x440ddb(0x297)])return console[_0x440ddb(0x17f)](_0x440ddb(0x330)),console[_0x440ddb(0x17f)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),0x1;if(!_0x10a61f)return showParentSegmentNotSetError(_0x440ddb(0x276)+_0x440ddb(0x291)),0x1;const _0x416915=await withSpinner(_0x440ddb(0x2e7)+_0x10a61f+_0x440ddb(0x31f),()=>_0x3f4975['segment'][_0x440ddb(0x236)](_0x10a61f),{'verbose':_0x24c596[_0x440ddb(0x374)]}),_0x24ef4e=_0x416915[_0x440ddb(0x253)],_0x57f75e={'name':_0x3d316a[_0x440ddb(0x297)]};_0x3d316a['description']!==undefined&&(_0x57f75e['description']=_0x3d316a[_0x440ddb(0x205)]);const _0x5e740a=await withSpinner('Updating\x20personalization\x20service\x20\x27'+_0x55ad89+_0x440ddb(0x31f),()=>_0x3f4975[_0x440ddb(0x17a)][_0x440ddb(0x2e6)](_0x24ef4e,_0x55ad89,_0x57f75e),{'verbose':_0x24c596[_0x440ddb(0x374)]}),_0x167fc0=_0x5e740a[_0x440ddb(0x253)];return console['error'](_0x440ddb(0x337)+_0x167fc0[_0x440ddb(0x297)]+'\x27'),await handleSDKOutput([_0x167fc0],_0x24c596),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x25f);['description']=a34_0x5c22ff(0x2ae);async['execute'](_0x594676){const _0x6bf252=a34_0x5c22ff,{options:_0x2fe571,args:_0x20bd6b,tdx:_0xaf2d3b}=_0x594676,_0x523b2e=_0x2fe571,_0x5771c0=_0x20bd6b[0x0],_0x4c99b1=_0x20bd6b[0x1],_0xec1b2e=_0x20bd6b[0x2]||_0x2fe571['parentSegment'];if(!_0x5771c0)return console[_0x6bf252(0x17f)](_0x6bf252(0x2df)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x4c99b1)return console['error'](_0x6bf252(0x2c3)),console[_0x6bf252(0x17f)](_0x6bf252(0x1f4)),console[_0x6bf252(0x17f)](_0x6bf252(0x2d4)),0x1;if(!_0xec1b2e)return showParentSegmentNotSetError(_0x6bf252(0x2f0)+_0x6bf252(0x2d4)),0x1;const _0x38e686=await withSpinner(_0x6bf252(0x2e7)+_0xec1b2e+_0x6bf252(0x31f),()=>_0xaf2d3b['segment']['resolveParentId'](_0xec1b2e),{'verbose':_0x2fe571[_0x6bf252(0x374)]}),_0x4e70e5=_0x38e686['data'],_0x3f5858={'name':_0x5771c0};_0x523b2e['allowedIps']&&(_0x3f5858[_0x6bf252(0x1ef)]=_0x523b2e[_0x6bf252(0x1ef)][_0x6bf252(0x224)](',')[_0x6bf252(0x22e)](_0x4544bd=>_0x4544bd[_0x6bf252(0x231)]()));_0x523b2e[_0x6bf252(0x205)]&&(_0x3f5858['description']=_0x523b2e[_0x6bf252(0x205)]);const _0x57f504=await withSpinner(_0x6bf252(0x2de)+_0x5771c0+_0x6bf252(0x2dc)+_0x4c99b1+_0x6bf252(0x31f),()=>_0xaf2d3b['personalization'][_0x6bf252(0x20a)](_0x4e70e5,_0x4c99b1,_0x3f5858),{'verbose':_0x2fe571[_0x6bf252(0x374)]}),_0x316293=_0x57f504[_0x6bf252(0x253)];return console[_0x6bf252(0x17f)](_0x6bf252(0x2a4)+_0x316293[_0x6bf252(0x297)]+_0x6bf252(0x35c)+_0x316293['id']),_0x316293[_0x6bf252(0x1ac)]&&(console[_0x6bf252(0x17f)](a34_0x2ac66a[_0x6bf252(0x2a5)](_0x6bf252(0x35b))),console['error'](a34_0x2ac66a[_0x6bf252(0x1c0)](_0x316293['value'])),console['error']('')),await handleSDKOutput([_0x316293],_0x2fe571),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{['name']=a34_0x5c22ff(0x33d);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x178);async[a34_0x5c22ff(0x388)](_0x75ea8b){const _0x420954=a34_0x5c22ff,{options:_0x1121db,args:_0x583a53,tdx:_0x4e86ca}=_0x75ea8b,_0x289053=_0x583a53[0x0],_0x378297=_0x583a53[0x1]||_0x1121db[_0x420954(0x1a6)];if(!_0x289053)return console['error'](_0x420954(0x2fc)),console[_0x420954(0x17f)](_0x420954(0x264)),console[_0x420954(0x17f)](_0x420954(0x263)),0x1;if(!_0x378297)return showParentSegmentNotSetError(_0x420954(0x1f3)+_0x420954(0x263)),0x1;const _0x434a81=await withSpinner(_0x420954(0x2e7)+_0x378297+_0x420954(0x31f),()=>_0x4e86ca[_0x420954(0x28c)][_0x420954(0x236)](_0x378297),{'verbose':_0x1121db[_0x420954(0x374)]}),_0x33466b=_0x434a81[_0x420954(0x253)],_0x4c86b1=await withSpinner(_0x420954(0x1ab),()=>_0x4e86ca['personalization'][_0x420954(0x197)](_0x33466b),{'verbose':_0x1121db[_0x420954(0x374)]}),_0x581e2e=_0x4c86b1[_0x420954(0x253)];let _0x474536;for(const _0xe561a7 of _0x581e2e){if(_0xe561a7[_0x420954(0x343)]?.[_0x420954(0x27f)](_0x5b7978=>_0x5b7978['id']===_0x289053)){_0x474536=_0xe561a7['id'];break;}}if(!_0x474536)return console['error'](_0x420954(0x1cf)+_0x289053+_0x420954(0x355)),0x1;const _0x164e71=await withSpinner(_0x420954(0x298)+_0x289053+_0x420954(0x31f),()=>_0x4e86ca[_0x420954(0x17a)][_0x420954(0x1e9)](_0x33466b,_0x474536,_0x289053),{'verbose':_0x1121db['verbose']}),_0x5f47dd=_0x164e71[_0x420954(0x253)];return console['error'](_0x420954(0x1af)+(_0x5f47dd[_0x420954(0x297)]||_0x289053)+'\x27'),await handleSDKOutput([_0x5f47dd],_0x1121db),0x0;}}export class PSPzListCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x387);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x239);async[a34_0x5c22ff(0x388)](_0x216f23){const _0x13098b=a34_0x5c22ff,{options:_0x58709f,args:_0x1788e1,tdx:_0x2c5339}=_0x216f23,_0x2b02c1=_0x1788e1[0x0]||_0x58709f[_0x13098b(0x1a6)];if(!_0x2b02c1)return showParentSegmentNotSetError(_0x13098b(0x315)+_0x13098b(0x215)),0x1;const _0x29b00c=await withSpinner(_0x13098b(0x2e7)+_0x2b02c1+_0x13098b(0x31f),()=>_0x2c5339['segment'][_0x13098b(0x236)](_0x2b02c1),{'verbose':_0x58709f['verbose']}),_0x28ebf0=_0x29b00c[_0x13098b(0x253)],_0x117eb3=await withSpinner(_0x13098b(0x214)+_0x2b02c1+_0x13098b(0x31f),()=>_0x2c5339[_0x13098b(0x17a)][_0x13098b(0x29c)](_0x28ebf0),{'verbose':_0x58709f[_0x13098b(0x374)]}),_0x419e0d=_0x117eb3[_0x13098b(0x253)];console['error'](_0x13098b(0x25d)+_0x419e0d[_0x13098b(0x396)]+_0x13098b(0x1f0)+(_0x419e0d['length']!==0x1?'s':''));if(_0x58709f['format']==='json'||_0x58709f['format']===_0x13098b(0x1c4))await handleSDKOutput(_0x419e0d,_0x58709f);else{if(_0x419e0d[_0x13098b(0x396)]===0x0)console[_0x13098b(0x383)](_0x13098b(0x335));else for(const _0x4b9c49 of _0x419e0d){console[_0x13098b(0x383)](a34_0x2ac66a[_0x13098b(0x27e)](_0x4b9c49[_0x13098b(0x297)])+'\x20'+a34_0x2ac66a[_0x13098b(0x1da)](_0x13098b(0x332)+_0x4b9c49['id']+')'));_0x4b9c49[_0x13098b(0x205)]&&console[_0x13098b(0x383)]('\x20\x20'+a34_0x2ac66a[_0x13098b(0x1da)](_0x4b9c49[_0x13098b(0x205)]));const _0x555915=_0x4b9c49[_0x13098b(0x2ba)]?.['length']||0x0;console[_0x13098b(0x383)]('\x20\x20'+a34_0x2ac66a[_0x13098b(0x1c0)]('sections:')+'\x20'+_0x555915);if(_0x4b9c49[_0x13098b(0x2ba)]&&_0x4b9c49[_0x13098b(0x2ba)][_0x13098b(0x396)]>0x0)for(const _0x546e6b of _0x4b9c49[_0x13098b(0x2ba)]){console['log']('\x20\x20\x20\x20-\x20'+_0x546e6b[_0x13098b(0x297)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a34_0x5c22ff(0x297)]='ps:pz:show';[a34_0x5c22ff(0x205)]='Show\x20a\x20specific\x20realtime\x20personalization';async[a34_0x5c22ff(0x388)](_0x2eedb0){const _0x53f8f3=a34_0x5c22ff,{options:_0x597ce4,args:_0x4187a4,tdx:_0x4ea6f}=_0x2eedb0,_0xa80c21=_0x4187a4[0x0];if(!_0xa80c21)return console['error'](_0x53f8f3(0x1ce)),console['error'](_0x53f8f3(0x36f)),0x1;const _0x1d11c6=await withSpinner(_0x53f8f3(0x2af)+_0xa80c21+_0x53f8f3(0x31f),()=>_0x4ea6f[_0x53f8f3(0x17a)][_0x53f8f3(0x279)](_0xa80c21),{'verbose':_0x597ce4[_0x53f8f3(0x374)]}),_0x3c57bb=_0x1d11c6[_0x53f8f3(0x253)];console['error'](_0x53f8f3(0x17b)+_0x3c57bb[_0x53f8f3(0x297)]+'\x27');if(_0x597ce4[_0x53f8f3(0x247)]===_0x53f8f3(0x34c)||_0x597ce4[_0x53f8f3(0x247)]===_0x53f8f3(0x1c4))await handleSDKOutput([_0x3c57bb],_0x597ce4);else{console[_0x53f8f3(0x383)](a34_0x2ac66a[_0x53f8f3(0x27e)](_0x3c57bb[_0x53f8f3(0x297)])+'\x20'+a34_0x2ac66a['dim']('(id:\x20'+_0x3c57bb['id']+')'));_0x3c57bb['description']&&console['log']('\x20\x20'+a34_0x2ac66a[_0x53f8f3(0x1da)](_0x3c57bb[_0x53f8f3(0x205)]));_0x3c57bb[_0x53f8f3(0x2ab)]&&console[_0x53f8f3(0x383)]('\x20\x20'+a34_0x2ac66a[_0x53f8f3(0x1c0)]('audienceId:')+'\x20'+_0x3c57bb['audienceId']);console[_0x53f8f3(0x383)]('\x20\x20'+a34_0x2ac66a[_0x53f8f3(0x1c0)]('created:')+'\x20'+_0x3c57bb[_0x53f8f3(0x210)]),console[_0x53f8f3(0x383)]('\x20\x20'+a34_0x2ac66a[_0x53f8f3(0x1c0)](_0x53f8f3(0x314))+'\x20'+_0x3c57bb[_0x53f8f3(0x189)]);const _0x13a6e1=_0x3c57bb['sections']?.[_0x53f8f3(0x396)]||0x0;console[_0x53f8f3(0x383)]('\x20\x20'+a34_0x2ac66a['cyan'](_0x53f8f3(0x202))+'\x20'+_0x13a6e1);if(_0x3c57bb['sections']&&_0x3c57bb[_0x53f8f3(0x2ba)][_0x53f8f3(0x396)]>0x0)for(const _0x255cf1 of _0x3c57bb[_0x53f8f3(0x2ba)]){console[_0x53f8f3(0x383)](_0x53f8f3(0x246)+a34_0x2ac66a[_0x53f8f3(0x27e)](_0x255cf1[_0x53f8f3(0x297)])+'\x20'+a34_0x2ac66a['dim'](_0x53f8f3(0x332)+_0x255cf1['id']+')')),_0x255cf1[_0x53f8f3(0x350)]&&(console[_0x53f8f3(0x383)](_0x53f8f3(0x399)+a34_0x2ac66a[_0x53f8f3(0x1c0)]('entryCriteria:')+'\x20'+_0x255cf1['entryCriteria'][_0x53f8f3(0x297)]),_0x255cf1[_0x53f8f3(0x350)][_0x53f8f3(0x1b3)]?.[_0x53f8f3(0x186)]&&console[_0x53f8f3(0x383)](_0x53f8f3(0x1fd)+a34_0x2ac66a[_0x53f8f3(0x1c0)]('keyEventId:')+'\x20'+_0x255cf1[_0x53f8f3(0x350)][_0x53f8f3(0x1b3)][_0x53f8f3(0x186)])),_0x255cf1[_0x53f8f3(0x181)]&&console[_0x53f8f3(0x383)](_0x53f8f3(0x399)+a34_0x2ac66a[_0x53f8f3(0x1c0)](_0x53f8f3(0x1e7))+'\x20'+JSON[_0x53f8f3(0x1c2)](_0x255cf1[_0x53f8f3(0x181)])),_0x255cf1[_0x53f8f3(0x33c)]&&console[_0x53f8f3(0x383)](_0x53f8f3(0x399)+a34_0x2ac66a[_0x53f8f3(0x1c0)]('includeSensitive:')+_0x53f8f3(0x1ae));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{['name']=a34_0x5c22ff(0x28f);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x25c);async[a34_0x5c22ff(0x388)](_0x43c520){const _0x5da46a=a34_0x5c22ff,{options:_0xef998c,args:_0x2a7d97,tdx:_0x19bcb4}=_0x43c520,_0x252a13=_0x2a7d97[0x0];if(!_0x252a13)return console[_0x5da46a(0x17f)](_0x5da46a(0x1ce)),console[_0x5da46a(0x17f)](_0x5da46a(0x2cd)),0x1;return await withSpinner(_0x5da46a(0x200)+_0x252a13+_0x5da46a(0x31f),()=>_0x19bcb4[_0x5da46a(0x17a)][_0x5da46a(0x2a3)](_0x252a13),{'verbose':_0xef998c[_0x5da46a(0x374)]}),console[_0x5da46a(0x17f)](_0x5da46a(0x194)+_0x252a13+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x21a);[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x30d);async[a34_0x5c22ff(0x388)](_0x15f2fb){const _0x3f987a=a34_0x5c22ff,{options:_0x384bee,tdx:_0x12a3ae}=_0x15f2fb,_0x41e1ba=_0x384bee;let _0x78d880;if(_0x41e1ba[_0x3f987a(0x356)]){_0x78d880=await loadJSON(_0x41e1ba[_0x3f987a(0x356)],!![]);if(!_0x78d880[_0x3f987a(0x29f)]?.[_0x3f987a(0x341)])return console[_0x3f987a(0x17f)](_0x3f987a(0x300)),console[_0x3f987a(0x17f)](_0x3f987a(0x1e5)),console[_0x3f987a(0x17f)](_0x3f987a(0x19a)),0x1;}else{if(!_0x41e1ba[_0x3f987a(0x297)])return console[_0x3f987a(0x17f)](_0x3f987a(0x376)),console['error'](_0x3f987a(0x34d)),console[_0x3f987a(0x17f)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x41e1ba[_0x3f987a(0x205)]===undefined)return console[_0x3f987a(0x17f)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console['error']('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0x3f987a(0x17f)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x41e1ba['folderId']===undefined)return console[_0x3f987a(0x17f)](_0x3f987a(0x31b)),console[_0x3f987a(0x17f)](_0x3f987a(0x398)),0x1;let _0x3e369e=_0x41e1ba[_0x3f987a(0x2ab)];if(!_0x3e369e&&_0x384bee['parentSegment']){const _0x1ddbb6=await withSpinner(_0x3f987a(0x2e7)+_0x384bee['parentSegment']+_0x3f987a(0x31f),()=>_0x12a3ae[_0x3f987a(0x28c)][_0x3f987a(0x236)](_0x384bee['parentSegment']),{'verbose':_0x384bee['verbose']});_0x3e369e=_0x1ddbb6[_0x3f987a(0x253)];}let _0x3d3ab5;_0x41e1ba[_0x3f987a(0x2ba)]&&(_0x3d3ab5=await loadJSON(_0x41e1ba[_0x3f987a(0x2ba)],![]));const _0x598417=_0x41e1ba[_0x3f987a(0x377)]===_0x3f987a(0x235)?null:{'id':_0x41e1ba['folderId'],'type':_0x3f987a(0x2c0)};_0x78d880={'attributes':{'name':_0x41e1ba[_0x3f987a(0x297)],'description':_0x41e1ba[_0x3f987a(0x205)]||null,..._0x3e369e!==undefined&&{'audienceId':_0x3e369e},..._0x3d3ab5!==undefined&&{'sections':_0x3d3ab5}},'relationships':{'parentFolder':{'data':_0x598417}}};}const _0x58987d=await withSpinner(_0x3f987a(0x19c)+(_0x78d880[_0x3f987a(0x258)]?.[_0x3f987a(0x297)]??'')+_0x3f987a(0x31f),()=>_0x12a3ae[_0x3f987a(0x17a)]['createPersonalization'](_0x78d880),{'verbose':_0x384bee[_0x3f987a(0x374)]}),_0xbf17b8=_0x58987d['data'];return console['error'](_0x3f987a(0x2e5)+_0xbf17b8['name']+_0x3f987a(0x35c)+_0xbf17b8['id']),await handleSDKOutput([_0xbf17b8],_0x384bee),0x0;}}function a34_0x139b(){const _0x2c748d=['behavior','createdAt','all','test','parent_id','Listing\x20personalizations\x20for\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20for\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20(requires\x20context)\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20for\x20specific\x20parent\x20segment','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','allValid','ps:pz:create','\x20parent\x20segment\x20\x27','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','addAttributesFile','Fetching\x20sample\x20data...','Next\x20steps:','SELECT\x20*\x20FROM\x20(\x0a','table','page_view','split','ID\x20Stitching:','customerPercent','addBehaviorsFile','status','\x20--behavior\x20\x22','\x20personalization\x20service','Personalization:','totalEvents','td_client_id','map','Available\x20behaviors:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','trim','green','user_id','7263gJtyHX','null','resolveParentId','Listing\x20RT\x20journeys\x20for\x20\x27','utf-8','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','pushParentYaml','column_name','Resume\x20activations\x20in\x20an\x20RT\x20journey','✔\x20No\x20changes\x20-\x20\x27','ps:pz:service:list','\x20Added\x20RT\x202.0\x20template\x20section','audienceId:\x20','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Show\x20parent\x20segment\x20details','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','Validating\x20RT\x20configuration...','\x20RT\x20journey','\x20\x20\x20\x20','format','stitchingKeys','replace','My\x20Service','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','RT\x202.0:','Pause\x20activations\x20in\x20an\x20RT\x20journey','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','\x20\x20Tables:\x201\x20customers\x20+\x20','List\x20parent\x20segments','RT\x20Journey\x20ID:\x20','\x20service(s)\x20configured','data','getCurrentConfigVersion','\x20RT\x20configuration\x20is\x20valid','\x20--behavior\x20\x22<name>\x22','public','attributes','formatSchemaJson','6SCTrxq','master','Delete\x20a\x20realtime\x20personalization','✔\x20Found\x20','ps:rt:validate','ps:pz:service:token:create','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','Updating\x20parent\x20segment\x20\x27','\x20--enriched','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','status:\x20','filter','\x20Context\x20set:\x20','/attempt/','schemaValid','localeCompare','.yaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','identifier:\x20','darwin','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','output','Fetching\x20personalization\x20service\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','Customers:','Attributes:','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','label','Overwrite\x20\x27','getPersonalization','Show\x20parent\x20segment\x20schema\x20(column\x20types)','Show\x20personalization\x20service\x20details','scheduleOption','delete','bold','some','Create\x20parent\x20segment\x20\x27','segment:parent:fields','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','27610RYIIpH','\x0a\x20\x20\x20\x20]','Attributes','/app/dw/parentSegments/','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','\x20Opening\x20','Analyzing\x20changes...','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','segment','scheduleType','Error:','ps:pz:delete','\x0aNo\x20sample\x20data\x20available','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','processedRows','number','Source:','ps:pz:patch','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','name','Deleting\x20token\x20\x27','customersWithEvents','4YwENmx','behaviors','listPersonalizations','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','Master\x20Table','relationships','string','.yml','Attempt:','deletePersonalization','✔\x20Created\x20token\x20\x27','yellow','Attribute:','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Error:\x20Parent\x20segment\x20name\x20is\x20required','text','errors','audienceId','-1d','listJourneys','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Getting\x20personalization\x20\x27','stop','ps:pz:service:create','double','interval','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','primaryKey','stats','\x27\x20and\x20run\x20workflow?','\x20\x201.\x20Edit\x20','sections','\x20total','To\x20cancel:','\x22,\x20\x22type\x22:\x20\x22','\x0a\x20\x20\x20\x20}','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','folder-segment','displaySummary','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','Error:\x20Service\x20ID\x20is\x20required','population','sourceTableValid','/\x20and\x20','✔\x20Retrieved\x20RT\x20configuration\x20version','information_schema','reduce','\x20\x20Note:\x20','repeat','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','12upssoy','55471njZUlP','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','timezone','Fetching\x20behavior\x20list...','\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','segment:parent:list','Validating\x20configuration...','Get\x20SQL\x20query\x20for\x20parent\x20segment','\x20rows)','SELECT\x20*\x20FROM\x20','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','Creating\x20parent\x20segment\x20\x27','\x27\x20for\x20service\x20\x27','identifier','Creating\x20token\x20\x27','Error:\x20Token\x20name\x20is\x20required','.customers)','\x27\x20is\x20already\x20up\x20to\x20date','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','\x20configured','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','✔\x20Created\x20personalization\x20\x27','patch','Resolving\x20parent\x20segment\x20\x27','\x20\x20No\x20sample\x20data\x20available','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','no\x20tokens\x20configured','Rows:','\x20[Job\x20ID:\x20','593340UTCdqV','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','Error\x20reading\x20file:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','join','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','\x27\x20(id:\x20','segment:parent:run','isDirectory','\x22\x20}','start','\x0a⚠️\x20\x20Migrating:\x20','Error:\x20Service\x20name\x20is\x20required','To\x20view\x20sample\x20data:','open','Error:\x20Token\x20ID\x20is\x20required','sort','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','/\x20directory.\x0a','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','token:','getBehaviorNames','Found\x20YAML\x20file:\x20','Table:\x20','`\x20to\x20download\x20the\x20configuration\x20first','Schema\x20saved\x20to\x20','match','\x20parent\x20segment','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20(requires\x20context)\x0a','350Armrob','Create\x20a\x20realtime\x20personalization\x20entity','displayBehaviorsStats','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','idStitching','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','FINISHED','\x20service','updated:','Usage:\x20tdx\x20ps\x20pz\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20(requires\x20context)\x0a','1027ZrYWce','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Fetching\x20parent\x20segment\x20\x27','getOutputDatabaseName','Errors:','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','\x0aNew\x20parent\x20segment\x20\x27','\x20(paused)','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','\x27...','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','resumeJourney','No\x20parent\x20segments\x20found','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','yes','Columns:','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','indexOf','\x20--attribute\x20\x22<name>\x22','rowCount','events','Creating','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','\x20Configuration\x20is\x20valid','3390877ZzijFV','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','Error:\x20--name\x20is\x20required','pauseJourney','(id:\x20','Error:\x20File\x20not\x20found:\x20','Pattern:\x20','No\x20personalizations\x20configured','\x20kill','✔\x20Updated\x20personalization\x20service\x20\x27','personalizationServices','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','segment:parent:preview','<database>.<table>','includeSensitive','ps:pz:service:token:delete','endsWith','workflowAttemptId','{\x0a\x20\x20\x22database\x22:\x20\x22','parentFolder','\x20field','tokens','✔\x20Created\x20parent\x20segment\x20\x27','jobId','5463935NKtvsZ','\x20--attribute\x20\x22','Options:','Events:','ignore','Master\x20+\x20Attributes','json','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a','\x20+\x20[','entryCriteria','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','behaviorsFile','Fetching\x20SQL\x20for\x20\x27','column_type','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','file','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment','red','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','\x27\x20with\x20ID:\x20','single','\x0a\x20\x20]\x0a}\x0a','\x20tdx\x20wf\x20attempt\x20','displaySampleData','4768AeeAaG','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','\x0a⚠️\x20\x20Both\x20','last_page_viewed','Site:\x20','Usage:\x20tdx\x20ps\x20rt\x20configuration_versions\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20(requires\x20context)\x0a','message','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','Patching\x20personalization\x20\x27','ps:pz:service:update','Created','Updated','keys','varchar','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','listFields','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','verbose','createParent','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','folderId','addBehaviors','customerGroupFile','1608996EKsqDu','preview','type','Status:','displayAttributesStats','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','database','RT\x202.0\x20Validate:','log','columns','Options\x20(one\x20required):\x0a','Options:\x0a','ps:pz:list','execute','toFixed','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','%)\x20','matchedCount','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','pullParentYaml','enriched','workflowId','\x20to\x20push\x20the\x20configuration','YAML\x20file:\x20','No\x20parent\x20segments\x20match\x20pattern:\x20','paused','\x20Added\x20personalization\x20template\x20to\x20','length','state','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','\x20\x20\x20\x20\x20\x20','displayColumns','launched','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','segment:parent:sql','ps:rt:configuration_versions','toLowerCase','sampleData','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','Master:','personalization','✔\x20Found\x20personalization\x20\x27','displayRealtimeInfo','in\x20','schemaError','error','Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a','payload','\x20rows\x20','Fetching\x20customers\x20schema...','\x20\x20Columns:\x20','Behaviors','keyEventId','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Parent\x20segment:\x20','updatedAt','Delete\x20a\x20personalization\x20service','joinKey','Database:\x20','Error:\x20--attribute\x20requires\x20a\x20name\x0a','Apply\x20changes\x20to\x20\x27','getParentFull','any','column','valid','ps:pz:service:show','✔\x20Deleted\x20personalization\x20\x27','run','Listing\x20RT-enabled\x20parent\x20segments...','list','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','\x20\x20\x22relationships\x22:\x20{\x20\x22parentFolder\x22:\x20{\x20\x22data\x22:\x20{\x20\x22id\x22:\x20\x22<id>\x22,\x20\x22type\x22:\x20\x22folder-segment\x22\x20}\x20}\x20}','\x0aError:','Creating\x20personalization\x20\x27','customers','coveragePercent','site','displayValidateResults','Listing\x20parent\x20segments...','No\x20personalization\x20services\x20configured','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x20No\x20changes\x20-\x20','parentSegment','push','Output\x20file:\x20','attributesFile','customerGroup','Finding\x20service\x20for\x20token...','value','eventKind','\x20true','✔\x20Deleted\x20token\x20\x27','true','\x20\x20\x20\x20-\x20','Deleting\x20personalization\x20service\x20\x27','keyEventCriteria','enabled','Personalization\x20service\x20description','Join:','Output\x20Database:','apply','updateParent','Creating\x20personalization\x20service\x20\x27','ps:rt:jn:pause','behavior_','patchPersonalization','\x0aUsage:\x20tdx\x20ps\x20preview\x20','tdx\x20ps\x20push\x20','cyan','Aborted.','stringify','Preview:','jsonl','Name:\x20','workflowSessionId','displayPreviewResults','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20init\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20for\x20specific\x20parent\x20segment','stageCount','/app/workflows/','Error:\x20Personalization\x20ID\x20is\x20required','Error:\x20Token\x20\x27','toLocaleString','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','parent_segment','Session:','segment:parent:push','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','displayPreviewHints','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment','foreignKey','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','dim','query','runParent','collectSchema','Join\x20on:','Listing\x20fields\x20for\x20\x27','displayMasterInfo','No\x20RT\x20journeys\x20found','realtime','\x0a✔\x20Workflow\x20started','Get\x20current\x20RT\x20configuration\x20version\x20status','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','/\x20→\x20','payload:','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','deleteToken','Error:\x20--database\x20and\x20--table\x20are\x20required','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','Enriched:','attribute','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','allowedIps','\x20personalization','getParentSQL','ps:rt:jn:list','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','personalization_services','previewParentYaml','allowed\x20IPs:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','segment:parent:view','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','Updating','use','\x20\x20\x20\x20\x20\x20\x20\x20','tdx\x20ps\x20preview\x20','ps:pz:service:delete','Deleting\x20personalization\x20\x27','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','sections:','\x20\x202.\x20Run\x20','id:\x20','description','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20configuration_versions\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20for\x20specific\x20parent\x20segment','Error\x20parsing\x20YAML:\x20','segment:parent:create','/sessions/','createToken','\x20=\x20','parent_segments','platform','realtime:'];a34_0x139b=function(){return _0x2c748d;};return a34_0x139b();}export class PSPzPatchCommand extends BaseCommand{[a34_0x5c22ff(0x297)]=a34_0x5c22ff(0x295);[a34_0x5c22ff(0x205)]='Update\x20a\x20realtime\x20personalization\x20entity';async[a34_0x5c22ff(0x388)](_0x2b29d7){const _0x304488=a34_0x5c22ff,{options:_0x133900,args:_0x4ffb5d}=_0x2b29d7,_0x17b9d1=_0x133900,_0x46def1=_0x4ffb5d[0x0];if(!_0x46def1)return console[_0x304488(0x17f)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x304488(0x17f)](_0x304488(0x301)),console['error'](_0x304488(0x26c)),0x1;let _0x54f445;if(_0x17b9d1[_0x304488(0x356)])_0x54f445=await loadJSON(_0x17b9d1[_0x304488(0x356)],!![]);else{if(!_0x17b9d1[_0x304488(0x297)])return console['error'](_0x304488(0x376)),console[_0x304488(0x17f)](_0x304488(0x301)),0x1;if(_0x17b9d1[_0x304488(0x205)]===undefined)return console[_0x304488(0x17f)](_0x304488(0x2a7)),console[_0x304488(0x17f)](_0x304488(0x301)),0x1;let _0x2a2662;_0x17b9d1['sections']&&(_0x2a2662=await loadJSON(_0x17b9d1[_0x304488(0x2ba)],![])),_0x54f445={'attributes':{'name':_0x17b9d1[_0x304488(0x297)],'description':_0x17b9d1[_0x304488(0x205)]||null,..._0x2a2662!==undefined&&{'sections':_0x2a2662}}};}const {tdx:_0x58acf4}=_0x2b29d7,_0x346fa7=await withSpinner(_0x304488(0x369)+_0x46def1+'\x27...',()=>_0x58acf4[_0x304488(0x17a)][_0x304488(0x1bd)](_0x46def1,_0x54f445),{'verbose':_0x133900[_0x304488(0x374)]}),_0x47d91e=_0x346fa7[_0x304488(0x253)];return console[_0x304488(0x17f)]('✔\x20Updated\x20personalization\x20\x27'+_0x47d91e['name']+_0x304488(0x2f3)+_0x47d91e['id']+')'),await handleSDKOutput([_0x47d91e],_0x133900),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']='ps:pz:init';[a34_0x5c22ff(0x205)]=a34_0x5c22ff(0x243);async['execute'](_0x4e2993){const _0x426a22=a34_0x5c22ff,{options:_0x579a51,args:_0x40f499}=_0x4e2993,_0x47d9b4=_0x40f499[0x0]||_0x579a51[_0x426a22(0x1a6)];if(!_0x47d9b4)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a'+_0x426a22(0x1cb)),0x1;const _0x2631c2=resolveYamlFile(_0x47d9b4);if(!existsSync(_0x2631c2))return showFileNotFoundError(_0x2631c2,_0x47d9b4),0x1;let _0x410366;try{_0x410366=readFileSync(_0x2631c2,_0x426a22(0x238));}catch(_0x50b985){const _0x185a1d=_0x50b985 instanceof Error?_0x50b985[_0x426a22(0x367)]:String(_0x50b985);return console['error']('Error\x20reading\x20file:\x20'+_0x185a1d),0x1;}let _0x4fd9e2;try{_0x4fd9e2=parseDef(_0x410366);}catch(_0x35d264){const _0x54fb58=_0x35d264 instanceof Error?_0x35d264['message']:String(_0x35d264);return console[_0x426a22(0x17f)](a34_0x2ac66a['red']('Error\x20parsing\x20YAML:\x20'+_0x54fb58)),0x1;}if(_0x4fd9e2[_0x426a22(0x1f5)]&&_0x4fd9e2['personalization_services'][_0x426a22(0x396)]>0x0)return console[_0x426a22(0x17f)](a34_0x2ac66a[_0x426a22(0x2a5)](_0x426a22(0x1c9)+_0x2631c2)),console['error'](a34_0x2ac66a[_0x426a22(0x1da)](_0x426a22(0x2d3)+_0x4fd9e2[_0x426a22(0x1f5)][_0x426a22(0x396)]+_0x426a22(0x252))),0x1;!_0x4fd9e2[_0x426a22(0x1e2)]&&(_0x4fd9e2[_0x426a22(0x1e2)]={'events':[{'name':_0x426a22(0x223),'source_table':_0x426a22(0x33b)}],'attributes':[{'name':_0x426a22(0x364),'type':_0x426a22(0x35d)}],'id_stitching':{'primary_key':_0x4fd9e2[_0x426a22(0x25b)][_0x426a22(0x222)]===_0x426a22(0x19d)?_0x426a22(0x22d):_0x426a22(0x233)}});_0x4fd9e2['personalization_services']=[{'name':_0x426a22(0x24a),'description':_0x426a22(0x1b5),'trigger_event':_0x426a22(0x223),'sections':[{'name':'Default','criteria':_0x426a22(0x1b0),'attributes':['last_page_viewed']}]}];const _0x3552f8=serializeDef(_0x4fd9e2);return writeFileSync(_0x2631c2,_0x3552f8,_0x426a22(0x238)),console[_0x426a22(0x17f)](a34_0x2ac66a[_0x426a22(0x232)]('✔')+_0x426a22(0x395)+a34_0x2ac66a[_0x426a22(0x1c0)](_0x2631c2)),(!_0x4fd9e2[_0x426a22(0x1e2)]||_0x410366[_0x426a22(0x327)](_0x426a22(0x20e))===-0x1)&&console[_0x426a22(0x17f)](a34_0x2ac66a['green']('✔')+_0x426a22(0x23f)),console[_0x426a22(0x17f)]('\x0a'+a34_0x2ac66a[_0x426a22(0x1da)](_0x426a22(0x220))),console[_0x426a22(0x17f)](_0x426a22(0x2b9)+_0x2631c2+'\x20to\x20configure\x20your\x20personalization\x20service'),console[_0x426a22(0x17f)](_0x426a22(0x203)+a34_0x2ac66a[_0x426a22(0x1da)](_0x426a22(0x1bf)+_0x47d9b4)+_0x426a22(0x391)),0x0;}}
1
+ const a34_0xe3eda6=a34_0xff01;(function(_0x1dc2e4,_0x2dec79){const _0x4973e3=a34_0xff01,_0x4546c5=_0x1dc2e4();while(!![]){try{const _0xee8b7d=-parseInt(_0x4973e3(0x2d8))/0x1*(parseInt(_0x4973e3(0x2a3))/0x2)+-parseInt(_0x4973e3(0x227))/0x3+-parseInt(_0x4973e3(0x141))/0x4*(-parseInt(_0x4973e3(0x18e))/0x5)+parseInt(_0x4973e3(0x280))/0x6*(parseInt(_0x4973e3(0x19e))/0x7)+parseInt(_0x4973e3(0x183))/0x8+parseInt(_0x4973e3(0x1e5))/0x9+parseInt(_0x4973e3(0x287))/0xa;if(_0xee8b7d===_0x2dec79)break;else _0x4546c5['push'](_0x4546c5['shift']());}catch(_0x16c2b7){_0x4546c5['push'](_0x4546c5['shift']());}}}(a34_0x5674,0x3735a));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a34_0x1183fe from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{withSpinner,withProgressSpinner,createCommandSpinner,formatElapsed}from'../utils/spinner.js';function a34_0xff01(_0x27bd76,_0x96457c){_0x27bd76=_0x27bd76-0xf9;const _0x5674e5=a34_0x5674();let _0xff014a=_0x5674e5[_0x27bd76];return _0xff014a;}import{loadJSONFromOptions,loadJSON}from'../utils/json-loader.js';import{generateDiff,formatDiffWithColors,hasChanges}from'../utils/diff.js';import{getConsoleUrl,getConsoleNextUrl}from'../sdk/client/endpoints.js';import{formatRows,formatAsTable,hyperlink}from'../sdk/util/formatters.js';import{parseDef,serializeDef}from'../sdk/segment/parent-segment-yaml.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';import a34_0x427111 from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a34_0xe3eda6(0x136),LEGACY_PARENT_SEGMENT_DIR=a34_0xe3eda6(0x2cc);function openBrowser(_0x30698a){const _0x29b10c=a34_0xe3eda6,_0x222c85=process['platform'],_0x2d22ed=_0x222c85===_0x29b10c(0x2b1)?_0x29b10c(0x2d3):_0x222c85===_0x29b10c(0x115)?'start':_0x29b10c(0x182);spawn(_0x2d22ed,[_0x30698a],{'detached':!![],'stdio':_0x29b10c(0x2ba)})[_0x29b10c(0x158)]();}function migrateLegacyDirectory(){const _0x4ebe8e=a34_0xe3eda6;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x48f897=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x48f897['isDirectory']())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a34_0x427111['yellow'](_0x4ebe8e(0x301)+LEGACY_PARENT_SEGMENT_DIR+_0x4ebe8e(0x281)+PARENT_SEGMENT_DIR+'/\x20directories\x20exist.')),console['error'](a34_0x427111[_0x4ebe8e(0x18c)](_0x4ebe8e(0x28e)+LEGACY_PARENT_SEGMENT_DIR+_0x4ebe8e(0x140))),![];console[_0x4ebe8e(0x113)](a34_0x427111[_0x4ebe8e(0x1ce)](_0x4ebe8e(0x2c0)+LEGACY_PARENT_SEGMENT_DIR+_0x4ebe8e(0x1ee)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x4ebe8e(0x113)](a34_0x427111['green']('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x33dc91){const _0x43e6e6=_0x33dc91 instanceof Error?_0x33dc91[_0x4ebe8e(0x23b)]:String(_0x33dc91);return console['error'](a34_0x427111['red']('✘\x20Failed\x20to\x20rename\x20directory:\x20'+_0x43e6e6+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a34_0xe3eda6(0x240)](_0x328edd){return migrateLegacyDirectory(),super['run'](_0x328edd);}}function resolveYamlFile(_0x277521){const _0x24fba1=a34_0xe3eda6;if(_0x277521[_0x24fba1(0x147)](_0x24fba1(0x1ca))||_0x277521[_0x24fba1(0x147)](_0x24fba1(0x1ba)))return _0x277521;return a34_0x1183fe[_0x24fba1(0x14a)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x277521)+_0x24fba1(0x1ca));}function formatProgressMessage(_0x17700c){const _0x3f2a2e=a34_0xe3eda6,_0x9cd2cd=_0x17700c[_0x3f2a2e(0x296)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x9cd2cd){const [,_0x373ade,_0x478215,_0x4f040a='']=_0x9cd2cd;return a34_0x427111[_0x3f2a2e(0x18c)](_0x373ade+':')+'\x20'+_0x478215+a34_0x427111[_0x3f2a2e(0x18c)](_0x4f040a);}return a34_0x427111[_0x3f2a2e(0x18c)](_0x17700c);}function showFileNotFoundError(_0x4c30a6,_0x41521c){const _0x4fa354=a34_0xe3eda6;console[_0x4fa354(0x113)](a34_0x427111[_0x4fa354(0x129)](_0x4fa354(0x171)+_0x4c30a6+'\x0a')),console[_0x4fa354(0x113)](a34_0x427111['cyan'](_0x4fa354(0x20e)+_0x41521c+_0x4fa354(0x1d1)));}function displayRealtimeValidation(_0x5ef34d){const _0x4cccd4=a34_0xe3eda6;if(!_0x5ef34d[_0x4cccd4(0x2d6)])return;const _0x59540e=_0x5ef34d[_0x4cccd4(0x2d6)],_0x30b99e=_0x59540e[_0x4cccd4(0x2fa)]?a34_0x427111[_0x4cccd4(0x276)](_0x4cccd4(0x192)):a34_0x427111['yellow'](_0x4cccd4(0x126));console[_0x4cccd4(0x113)]('\x0a'+a34_0x427111[_0x4cccd4(0x18c)]('RT\x202.0:')+'\x20'+_0x30b99e);if(_0x59540e[_0x4cccd4(0x2dc)]&&_0x59540e[_0x4cccd4(0x2dc)][_0x4cccd4(0x13f)]>0x0){console['error']('\x20\x20'+a34_0x427111[_0x4cccd4(0x18c)](_0x4cccd4(0x236))+'\x20'+_0x59540e[_0x4cccd4(0x2dc)][_0x4cccd4(0x13f)]+_0x4cccd4(0x1c1));for(const _0x4e9056 of _0x59540e[_0x4cccd4(0x2dc)]){const _0x40ef46=_0x4e9056[_0x4cccd4(0x27b)]===![]?a34_0x427111[_0x4cccd4(0x129)]('✘'):a34_0x427111['green']('✔');console['error'](_0x4cccd4(0x10b)+_0x40ef46+'\x20'+_0x4e9056[_0x4cccd4(0x205)]),_0x4e9056['sourceTableError']&&console[_0x4cccd4(0x113)](_0x4cccd4(0x16f)+a34_0x427111['red'](_0x4e9056[_0x4cccd4(0x12c)]));}}if(_0x59540e[_0x4cccd4(0x2ec)]&&_0x59540e['attributes'][_0x4cccd4(0x13f)]>0x0){console['error']('\x20\x20'+a34_0x427111[_0x4cccd4(0x18c)](_0x4cccd4(0x2f7))+'\x20'+_0x59540e[_0x4cccd4(0x2ec)][_0x4cccd4(0x13f)]+_0x4cccd4(0x1c1));for(const _0x39872a of _0x59540e[_0x4cccd4(0x2ec)]){const _0x586391=_0x39872a[_0x4cccd4(0x283)]?a34_0x427111[_0x4cccd4(0x276)]('✔'):a34_0x427111['red']('✘');console[_0x4cccd4(0x113)](_0x4cccd4(0x10b)+_0x586391+'\x20'+_0x39872a[_0x4cccd4(0x205)]+'\x20'+a34_0x427111[_0x4cccd4(0x18c)]('('+_0x39872a[_0x4cccd4(0x2bd)]+')'));}}if(_0x59540e[_0x4cccd4(0x2c4)]){const _0x35192e=_0x59540e['idStitching'][_0x4cccd4(0x202)]?.[_0x4cccd4(0x13f)]?_0x4cccd4(0x111)+_0x59540e[_0x4cccd4(0x2c4)][_0x4cccd4(0x202)]['join'](',\x20')+']':'';console[_0x4cccd4(0x113)]('\x20\x20'+a34_0x427111[_0x4cccd4(0x18c)]('ID\x20Stitching:')+'\x20'+_0x59540e[_0x4cccd4(0x2c4)]['primaryKey']+_0x35192e);}if(_0x59540e['personalizationServices']&&_0x59540e[_0x4cccd4(0x304)][_0x4cccd4(0x13f)]>0x0){console[_0x4cccd4(0x113)]('\x20\x20'+a34_0x427111[_0x4cccd4(0x18c)](_0x4cccd4(0x103))+'\x20'+_0x59540e['personalizationServices']['length']+_0x4cccd4(0x181)+(_0x59540e[_0x4cccd4(0x304)]['length']!==0x1?'s':''));for(const _0x4cb54a of _0x59540e[_0x4cccd4(0x304)]){console[_0x4cccd4(0x113)]('\x20\x20\x20\x20-\x20'+_0x4cb54a[_0x4cccd4(0x205)]);}}}function showParentSegmentNotSetError(_0x23e689){const _0x49b6e7=a34_0xe3eda6;console[_0x49b6e7(0x113)](a34_0x427111['yellow'](_0x49b6e7(0xfc))),console[_0x49b6e7(0x113)](_0x23e689);}export class ParentSegmentListCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='segment:parent:list';['description']=a34_0xe3eda6(0x290);async[a34_0xe3eda6(0x116)](_0x3485c6){const _0x4e0397=a34_0xe3eda6,{options:_0x5813a2,args:_0x4d65d4,tdx:_0x2f3840}=_0x3485c6,_0xff2e21=_0x4d65d4[0x0];_0x5813a2['verbose']&&(console[_0x4e0397(0x113)](_0x4e0397(0x1f7)+_0x5813a2[_0x4e0397(0x28f)]),_0xff2e21&&console['error'](_0x4e0397(0x155)+_0xff2e21));const _0x125df3=await withSpinner(_0xff2e21?_0x4e0397(0xff)+_0xff2e21+_0x4e0397(0x217):_0x4e0397(0x101),()=>_0x2f3840[_0x4e0397(0x159)][_0x4e0397(0x1b0)](),{'verbose':_0x5813a2[_0x4e0397(0x235)]});let _0x19a195=_0x125df3['data'];if(_0xff2e21){const _0x4cbf8e=_0xff2e21['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x4e0397(0x195)](/\*/g,'.*')[_0x4e0397(0x195)](/\?/g,'.'),_0x203c47=new RegExp('^'+_0x4cbf8e+'$','i');_0x19a195=_0x19a195[_0x4e0397(0x21c)](_0x976311=>_0x203c47[_0x4e0397(0x100)](_0x976311[_0x4e0397(0x2ec)][_0x4e0397(0x205)]));}_0x19a195[_0x4e0397(0x299)]((_0x1e9802,_0x16c660)=>_0x1e9802[_0x4e0397(0x2ec)][_0x4e0397(0x205)][_0x4e0397(0x2cb)](_0x16c660['attributes'][_0x4e0397(0x205)])),console[_0x4e0397(0x113)]('✔\x20Found\x20'+_0x19a195[_0x4e0397(0x13f)]+_0x4e0397(0x2fb)+(_0x19a195['length']!==0x1?'s':''));const _0x3f2f9b=_0x10bcf7=>{const _0x66b6de=_0x4e0397;return getConsoleNextUrl(_0x5813a2[_0x66b6de(0x28f)],_0x66b6de(0x17d)+_0x10bcf7);};if(_0x5813a2[_0x4e0397(0x19d)]===_0x4e0397(0x273)||_0x5813a2[_0x4e0397(0x19d)]===_0x4e0397(0x131)){const _0x35d484=_0x19a195[_0x4e0397(0x269)](_0x478d5e=>({..._0x478d5e,'url':_0x3f2f9b(_0x478d5e['id'])}));await handleSDKOutput(_0x35d484,_0x5813a2);}else{if(_0x19a195[_0x4e0397(0x13f)]===0x0)_0xff2e21?console[_0x4e0397(0x17c)](_0x4e0397(0x2d1)+_0xff2e21):console['log']('No\x20parent\x20segments\x20found');else for(const _0x47f62f of _0x19a195){const _0x2b8a46=_0x47f62f[_0x4e0397(0x2ec)][_0x4e0397(0x23e)]?a34_0x427111[_0x4e0397(0x18c)]('\x20('+formatRows(_0x47f62f[_0x4e0397(0x2ec)]['population'])+')'):'',_0x538c69=hyperlink(_0x47f62f[_0x4e0397(0x2ec)][_0x4e0397(0x205)],_0x3f2f9b(_0x47f62f['id']));console[_0x4e0397(0x17c)]('👥\x20'+_0x538c69+_0x2b8a46);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x145);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x2df);async[a34_0xe3eda6(0x116)](_0x4d1857){const _0x173878=a34_0xe3eda6,{options:_0x16373b,args:_0x17aa5f,tdx:_0x2d24ad}=_0x4d1857;console[_0x173878(0x113)](_0x173878(0x21f)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x173878(0x22e));const _0x2cef4e=_0x16373b;if(_0x17aa5f[_0x173878(0x13f)]===0x0)return console[_0x173878(0x113)](a34_0x427111[_0x173878(0x129)](_0x173878(0x208))),console[_0x173878(0x113)](_0x173878(0x29b)),0x1;const _0xdc3d24=_0x17aa5f[0x0];if(!_0x2cef4e[_0x173878(0x2a7)]||!_0x2cef4e[_0x173878(0x152)])return console[_0x173878(0x113)](_0x173878(0x2f8)),console[_0x173878(0x113)](_0x173878(0x29b)),0x1;_0x2cef4e[_0x173878(0x235)]&&(console[_0x173878(0x113)](_0x173878(0x1f7)+_0x2cef4e[_0x173878(0x28f)]),console[_0x173878(0x113)]('Name:\x20'+_0xdc3d24),console[_0x173878(0x113)](_0x173878(0x15b)+_0x2cef4e['database']),console[_0x173878(0x113)]('Table:\x20'+_0x2cef4e[_0x173878(0x152)]));const _0x57aa59=await loadJSONFromOptions(_0x2cef4e[_0x173878(0x2ec)],_0x2cef4e[_0x173878(0x1ac)]),_0x56e107=await loadJSONFromOptions(_0x2cef4e[_0x173878(0x2c9)],_0x2cef4e[_0x173878(0x245)]),_0x471b3e=await loadJSONFromOptions(_0x2cef4e[_0x173878(0x1d8)],_0x2cef4e[_0x173878(0x25e)]),_0x2d292d={'name':_0xdc3d24,'description':_0x2cef4e['description'],'scheduleType':_0x2cef4e[_0x173878(0x221)],'scheduleOption':_0x2cef4e[_0x173878(0x197)],'timezone':_0x2cef4e[_0x173878(0x190)],'master':{'parentDatabaseName':_0x2cef4e[_0x173878(0x2a7)],'parentTableName':_0x2cef4e[_0x173878(0x152)]},'attributes':_0x57aa59,'behaviors':_0x56e107,'customerGroup':_0x471b3e},_0x5b28a2=await withSpinner(_0x173878(0x2ee)+_0xdc3d24+_0x173878(0x217),()=>_0x2d24ad[_0x173878(0x159)][_0x173878(0x2e3)](_0x2d292d),{'verbose':_0x16373b['verbose']}),_0x1c686f=_0x5b28a2['data'];return console['error'](_0x173878(0x2d9)+_0x1c686f[_0x173878(0x205)]+_0x173878(0x14d)+_0x1c686f['id']),await handleSDKOutput([_0x1c686f],_0x16373b),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a34_0xe3eda6(0x177);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x239);async[a34_0xe3eda6(0x116)](_0x25733b){const _0x5ef5e7=a34_0xe3eda6,{options:_0x4708ba,args:_0xd45873,tdx:_0x44397a}=_0x25733b;console[_0x5ef5e7(0x113)](_0x5ef5e7(0x133)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x5ef5e7(0x22e));const _0x3f6cd2=_0x4708ba;if(_0xd45873[_0x5ef5e7(0x13f)]===0x0)return console['error'](a34_0x427111[_0x5ef5e7(0x129)](_0x5ef5e7(0x208))),console['error'](_0x5ef5e7(0x303)),0x1;const _0x2f0bc6=_0xd45873[0x0];_0x3f6cd2[_0x5ef5e7(0x235)]&&(console[_0x5ef5e7(0x113)](_0x5ef5e7(0x1f7)+_0x3f6cd2[_0x5ef5e7(0x28f)]),console[_0x5ef5e7(0x113)](_0x5ef5e7(0x2f5)+_0x2f0bc6));const _0x39a553=await withSpinner(_0x5ef5e7(0x167)+_0x2f0bc6+_0x5ef5e7(0x217),()=>_0x44397a['segment'][_0x5ef5e7(0x2ed)](_0x2f0bc6),{'verbose':_0x3f6cd2['verbose']}),_0x2311b5=_0x39a553[_0x5ef5e7(0x209)],_0x188b75=await loadJSONFromOptions(_0x3f6cd2[_0x5ef5e7(0x1fa)],_0x3f6cd2['addAttributesFile']),_0xf68fb7=await loadJSONFromOptions(_0x3f6cd2[_0x5ef5e7(0x305)],_0x3f6cd2[_0x5ef5e7(0x157)]),_0x46e37e={'name':_0x2311b5['name'],'description':_0x3f6cd2[_0x5ef5e7(0x16d)]!==undefined?_0x3f6cd2['description']:_0x2311b5[_0x5ef5e7(0x16d)],'scheduleType':_0x3f6cd2[_0x5ef5e7(0x221)]!==undefined?_0x3f6cd2[_0x5ef5e7(0x221)]:_0x2311b5['scheduleType'],'scheduleOption':_0x3f6cd2[_0x5ef5e7(0x197)]!==undefined?_0x3f6cd2[_0x5ef5e7(0x197)]:_0x2311b5['scheduleOption'],'timezone':_0x3f6cd2[_0x5ef5e7(0x190)]!==undefined?_0x3f6cd2['timezone']:_0x2311b5[_0x5ef5e7(0x190)],'master':_0x2311b5['master'],'attributes':_0x188b75?[..._0x2311b5[_0x5ef5e7(0x2ec)]||[],..._0x188b75]:_0x2311b5[_0x5ef5e7(0x2ec)],'behaviors':_0xf68fb7?[..._0x2311b5['behaviors']||[],..._0xf68fb7]:_0x2311b5['behaviors'],'customerGroup':_0x2311b5[_0x5ef5e7(0x1d8)]},_0x579389=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x2f0bc6+_0x5ef5e7(0x217),()=>_0x44397a[_0x5ef5e7(0x159)][_0x5ef5e7(0x1e7)](_0x2f0bc6,_0x46e37e),{'verbose':_0x3f6cd2['verbose']}),_0x2c24b5=_0x579389[_0x5ef5e7(0x209)];return console[_0x5ef5e7(0x113)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x2c24b5[_0x5ef5e7(0x205)]+'\x27'),await handleSDKOutput([_0x2c24b5],_0x3f6cd2),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x1a0);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x151);async['execute'](_0x579434){const _0x557ccc=a34_0xe3eda6,{options:_0x465ad8,args:_0x5b66e7,tdx:_0x104776}=_0x579434,_0x1e874f=_0x465ad8,_0x213a12=_0x5b66e7[0x0]||_0x465ad8['parentSegment'];if(!_0x213a12)return showParentSegmentNotSetError(_0x557ccc(0x2bb)+_0x557ccc(0x2ab)),0x1;if(_0x1e874f[_0x557ccc(0xfe)]&&_0x1e874f[_0x557ccc(0x27c)])return console['error'](a34_0x427111[_0x557ccc(0x129)](_0x557ccc(0x176))),console[_0x557ccc(0x113)](a34_0x427111['dim']('The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires')),console['error'](a34_0x427111['dim'](_0x557ccc(0x308)+PARENT_SEGMENT_DIR+_0x557ccc(0x1d3))),console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x23f)](_0x557ccc(0x275))),0x1;const _0x4d9095=_0x1e874f[_0x557ccc(0x27c)]||a34_0x1183fe[_0x557ccc(0x14a)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x213a12)+_0x557ccc(0x1ca));_0x1e874f[_0x557ccc(0x235)]&&(console['error'](_0x557ccc(0x1f7)+_0x1e874f['site']),console[_0x557ccc(0x113)](_0x557ccc(0x2f5)+_0x213a12),console[_0x557ccc(0x113)](_0x557ccc(0x2c5)+_0x4d9095));const _0x165494=await withSpinner(_0x557ccc(0x259)+_0x213a12+_0x557ccc(0x217),()=>_0x104776[_0x557ccc(0x159)][_0x557ccc(0x2d2)](_0x213a12),{'verbose':_0x1e874f[_0x557ccc(0x235)]}),_0x2b9a40=_0x165494[_0x557ccc(0x209)];if(existsSync(_0x4d9095)){const _0x1085af=readFileSync(_0x4d9095,_0x557ccc(0x2e4)),_0x224fcd=generateDiff(_0x1085af,_0x2b9a40);if(!hasChanges(_0x224fcd))console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x276)]('✔')+'\x20No\x20changes\x20-\x20'+a34_0x427111[_0x557ccc(0x23f)](_0x4d9095)+_0x557ccc(0x29d));else{console['error'](_0x557ccc(0xfa)+_0x4d9095+'\x27:'),console[_0x557ccc(0x113)]('─'[_0x557ccc(0x2fe)](0x3c)),console[_0x557ccc(0x113)](formatDiffWithColors(_0x224fcd)),console[_0x557ccc(0x113)]('─'[_0x557ccc(0x2fe)](0x3c));if(!_0x1e874f['yes']){if(!isInteractive())return console['error'](a34_0x427111[_0x557ccc(0x129)](_0x557ccc(0x1cb)),_0x557ccc(0x186)),console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x18c)](_0x557ccc(0x241))),0x1;const _0x121f2b=await confirmKey(_0x557ccc(0x237)+_0x4d9095+'\x27?');if(!_0x121f2b)return console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x1ce)](_0x557ccc(0x104))),0x1;}writeFileSync(_0x4d9095,_0x2b9a40,'utf-8'),console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x276)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a34_0x427111['cyan'](_0x4d9095));}}else{const _0x25fffb=a34_0x1183fe['dirname'](_0x4d9095);!existsSync(_0x25fffb)&&mkdirSync(_0x25fffb,{'recursive':!![]}),writeFileSync(_0x4d9095,_0x2b9a40,_0x557ccc(0x2e4)),console[_0x557ccc(0x113)](a34_0x427111[_0x557ccc(0x276)]('✔')+_0x557ccc(0x253)+a34_0x427111[_0x557ccc(0x23f)](_0x4d9095));}return saveSessionContext({'parent_segment':_0x213a12},_0x1e874f[_0x557ccc(0x112)]),console[_0x557ccc(0x113)](a34_0x427111['green']('✔')+'\x20Context\x20set:\x20'+a34_0x427111[_0x557ccc(0x18c)]('parent_segment')+_0x557ccc(0x27d)+a34_0x427111['cyan'](_0x213a12)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x225);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x13d);async['execute'](_0x1f29fe){const _0x12cd9c=a34_0xe3eda6,{options:_0x59b7ee,args:_0x4a9fcd,tdx:_0x158483}=_0x1f29fe,_0x1181c7=_0x59b7ee,_0x1141a1=_0x4a9fcd[0x0]||_0x59b7ee[_0x12cd9c(0x119)];if(!_0x1141a1)return showParentSegmentNotSetError(_0x12cd9c(0x2a4)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment'),0x1;const _0x2602ca=resolveYamlFile(_0x1141a1);if(!existsSync(_0x2602ca))return showFileNotFoundError(_0x2602ca,_0x1141a1),0x1;_0x1181c7['verbose']&&(console[_0x12cd9c(0x113)](_0x12cd9c(0x1f7)+_0x1181c7['site']),console['error'](_0x12cd9c(0x29f)+_0x2602ca));let _0xb1bd95;try{_0xb1bd95=readFileSync(_0x2602ca,_0x12cd9c(0x2e4));}catch(_0x483648){const _0xa74716=_0x483648 instanceof Error?_0x483648['message']:String(_0x483648);return console[_0x12cd9c(0x113)]('Error\x20reading\x20file:\x20'+_0xa74716),0x1;}const _0x51d197=await withSpinner(_0x12cd9c(0x1e9),()=>_0x158483['segment']['pushParentYaml'](_0xb1bd95),{'verbose':_0x1181c7['verbose']}),_0x35761e=_0x51d197['data'],{isNew:_0x14949c,name:_0x13675f,hasChanges:_0x1eb2e1,diffFormatted:_0x5d21f7}=_0x35761e;if(!_0x1eb2e1)return console['error'](_0x12cd9c(0x10d)+_0x13675f+_0x12cd9c(0x1f4)),0x0;_0x14949c?console[_0x12cd9c(0x113)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x13675f+'\x27:'):console['error'](_0x12cd9c(0x180)+_0x13675f+'\x27:');console[_0x12cd9c(0x113)]('─'['repeat'](0x3c)),console['error'](_0x5d21f7),console[_0x12cd9c(0x113)]('─'[_0x12cd9c(0x2fe)](0x3c));const _0x436ffc=_0x14949c?_0x12cd9c(0x250)+_0x13675f+'\x27?':_0x12cd9c(0x163)+_0x13675f+'\x27?';if(!_0x1181c7[_0x12cd9c(0x15c)]){if(!isInteractive())return console['error'](a34_0x427111[_0x12cd9c(0x129)](_0x12cd9c(0x1cb)),_0x12cd9c(0x186)),console[_0x12cd9c(0x113)](a34_0x427111[_0x12cd9c(0x18c)](_0x12cd9c(0x241))),0x1;const _0x491370=await confirmKey(_0x436ffc);if(!_0x491370)return console[_0x12cd9c(0x113)](a34_0x427111[_0x12cd9c(0x1ce)]('Aborted.')),0x1;}const _0x3836fa=_0x14949c?_0x12cd9c(0x2ea):_0x12cd9c(0x224),_0x2fc555=await withSpinner(_0x3836fa+_0x12cd9c(0x161)+_0x13675f+_0x12cd9c(0x217),()=>_0x35761e[_0x12cd9c(0x11b)](),{'verbose':_0x1181c7[_0x12cd9c(0x235)]}),_0x40cd8a=_0x2fc555['data'],_0x403f92=getConsoleNextUrl(_0x1181c7[_0x12cd9c(0x28f)],_0x12cd9c(0x17d)+_0x40cd8a['id']),_0xc130b5=_0x14949c?_0x12cd9c(0x2f3):'Updated';return console['error']('✔\x20'+_0xc130b5+_0x12cd9c(0x161)+_0x40cd8a[_0x12cd9c(0x205)]+'\x27'),console[_0x12cd9c(0x113)]('\x20\x20'+_0x403f92),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x14b);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x2c8);async['execute'](_0x435725){const _0x2150cc=a34_0xe3eda6,{options:_0xc9d864,args:_0x1fffe5,tdx:_0x3d750c}=_0x435725,_0xfe5536=_0xc9d864,_0x4a4485=_0x1fffe5[0x0]||_0xc9d864['parentSegment'];if(!_0x4a4485)return showParentSegmentNotSetError(_0x2150cc(0x12a)+_0x2150cc(0x1a5)+_0x2150cc(0x207)+_0x2150cc(0x1fe)+_0x2150cc(0x110)+_0x2150cc(0x30b)),0x1;const _0x449829=resolveYamlFile(_0x4a4485);if(!existsSync(_0x449829))return showFileNotFoundError(_0x449829,_0x4a4485),0x1;_0xfe5536[_0x2150cc(0x235)]&&(console[_0x2150cc(0x113)](_0x2150cc(0x1f7)+_0xfe5536['site']),console[_0x2150cc(0x113)](_0x2150cc(0x29f)+_0x449829));let _0x468217;try{_0x468217=readFileSync(_0x449829,_0x2150cc(0x2e4));}catch(_0x206322){const _0x310644=_0x206322 instanceof Error?_0x206322[_0x2150cc(0x23b)]:String(_0x206322);return console['error'](_0x2150cc(0x10f)+_0x310644),0x1;}const _0x50ebff=createCommandSpinner(a34_0x427111[_0x2150cc(0x18c)](_0x2150cc(0x1a1)),{'verbose':_0xfe5536['verbose']});_0x50ebff[_0x2150cc(0x1d6)]();const _0x41447c={'onProgress':_0x303490=>{const _0x20a387=_0x2150cc;_0x50ebff[_0x20a387(0x2f0)]=formatProgressMessage(_0x303490);}};if(_0xfe5536[_0x2150cc(0x2ff)])_0x41447c[_0x2150cc(0x2ff)]=!![];if(_0xfe5536['enriched'])_0x41447c[_0x2150cc(0x2c7)]=!![];_0xfe5536[_0x2150cc(0x2a9)]&&(_0x41447c[_0x2150cc(0x2a9)]=_0xfe5536[_0x2150cc(0x2a9)]);_0xfe5536[_0x2150cc(0x22a)]&&(_0x41447c[_0x2150cc(0x22a)]=_0xfe5536[_0x2150cc(0x22a)]);if(_0xfe5536[_0x2150cc(0x210)])_0x41447c[_0x2150cc(0x210)]=_0xfe5536[_0x2150cc(0x210)];let _0x47d822;try{_0x47d822=await _0x3d750c['segment']['validateParentYaml'](_0x468217,_0x41447c),_0x50ebff[_0x2150cc(0x154)]();}catch(_0x4429fc){_0x50ebff[_0x2150cc(0x154)]();throw _0x4429fc;}const _0x22f65a=_0xfe5536[_0x2150cc(0x210)]||'-1d';return this[_0x2150cc(0x302)](_0x47d822,_0x41447c,_0x449829,_0x22f65a),_0x47d822[_0x2150cc(0x2cf)]?0x0:0x1;}[a34_0xe3eda6(0x302)](_0x1903e0,_0x9c74bf,_0x17698e,_0x364ead){const _0x427134=a34_0xe3eda6;console[_0x427134(0x113)]('\x0a'+a34_0x427111[_0x427134(0x260)](_0x427134(0x21d))+'\x20'+_0x1903e0[_0x427134(0x205)]),console[_0x427134(0x113)]('═'[_0x427134(0x2fe)](0x3c)),this[_0x427134(0x2d4)](_0x1903e0);if(typeof _0x9c74bf[_0x427134(0x2a9)]===_0x427134(0x150)){this[_0x427134(0x199)](_0x1903e0),this[_0x427134(0x106)](_0x1903e0),this[_0x427134(0x1e3)](_0x17698e,_0x364ead,_0x427134(0x2a9),_0x9c74bf['attribute']);return;}if(_0x9c74bf[_0x427134(0x2a9)]===!![]){this[_0x427134(0x199)](_0x1903e0),this['displaySummary'](_0x1903e0),this[_0x427134(0x1e3)](_0x17698e,_0x364ead,_0x427134(0x2ec));return;}if(typeof _0x9c74bf[_0x427134(0x22a)]===_0x427134(0x150)){this[_0x427134(0x203)](_0x1903e0,_0x364ead),this['displaySummary'](_0x1903e0),this[_0x427134(0x1e3)](_0x17698e,_0x364ead,'behavior',_0x9c74bf[_0x427134(0x22a)]);return;}if(_0x9c74bf[_0x427134(0x22a)]===!![]){this[_0x427134(0x203)](_0x1903e0,_0x364ead),this[_0x427134(0x106)](_0x1903e0),this[_0x427134(0x1e3)](_0x17698e,_0x364ead,_0x427134(0x2c9));return;}this['displayAttributesStats'](_0x1903e0),this[_0x427134(0x203)](_0x1903e0,_0x364ead),this[_0x427134(0x1c7)](_0x1903e0),this[_0x427134(0x106)](_0x1903e0),this[_0x427134(0x1e3)](_0x17698e,_0x364ead,_0x427134(0x114));}['displayRealtimeInfo'](_0x711522){displayRealtimeValidation(_0x711522);}[a34_0xe3eda6(0x1e3)](_0x292329,_0x434fef,_0x5caa86,_0x450577){const _0x4539e5=a34_0xe3eda6;console[_0x4539e5(0x113)]('\x0a'+a34_0x427111[_0x4539e5(0x18c)](_0x4539e5(0x1c5)));const _0x264688=_0x434fef!=='-1d'?_0x4539e5(0x228)+_0x434fef:'';if(_0x5caa86===_0x4539e5(0x2a9)&&_0x450577)console[_0x4539e5(0x113)]('\x20\x20'+a34_0x427111[_0x4539e5(0x18c)](_0x4539e5(0x19c)+_0x292329+_0x4539e5(0x1be)+_0x450577+'\x22'+_0x264688));else{if(_0x5caa86==='behavior'&&_0x450577)console[_0x4539e5(0x113)]('\x20\x20'+a34_0x427111['dim'](_0x4539e5(0x19c)+_0x292329+_0x4539e5(0x2dd)+_0x450577+'\x22'+_0x264688));else(_0x5caa86==='attributes'||_0x5caa86===_0x4539e5(0x114))&&console[_0x4539e5(0x113)]('\x20\x20'+a34_0x427111['dim'](_0x4539e5(0x19c)+_0x292329+_0x4539e5(0x25b)+_0x264688));}(_0x5caa86===_0x4539e5(0x2c9)||_0x5caa86===_0x4539e5(0x114))&&console['error']('\x20\x20'+a34_0x427111[_0x4539e5(0x18c)](_0x4539e5(0x19c)+_0x292329+_0x4539e5(0x2b5)+_0x264688)),_0x5caa86===_0x4539e5(0x114)&&console[_0x4539e5(0x113)]('\x20\x20'+a34_0x427111[_0x4539e5(0x18c)](_0x4539e5(0x19c)+_0x292329+_0x4539e5(0x1e4)+_0x264688));}['displayMasterInfo'](_0x9741a9){const _0x46cc6b=a34_0xe3eda6,{master:_0x1db52e}=_0x9741a9,_0x3705ab=_0x1db52e['schemaValid']?a34_0x427111[_0x46cc6b(0x276)]('✔'):a34_0x427111[_0x46cc6b(0x129)]('✘');console[_0x46cc6b(0x113)]('\x0a'+a34_0x427111[_0x46cc6b(0x18c)]('Master\x20Table')),console[_0x46cc6b(0x113)](_0x3705ab+'\x20'+a34_0x427111[_0x46cc6b(0x260)](_0x1db52e[_0x46cc6b(0x2a7)]+'.'+_0x1db52e[_0x46cc6b(0x152)])),_0x1db52e[_0x46cc6b(0x2ac)]?_0x1db52e[_0x46cc6b(0x173)]!==undefined&&console[_0x46cc6b(0x113)]('\x20\x20'+a34_0x427111['dim'](_0x46cc6b(0x27f))+'\x20'+a34_0x427111[_0x46cc6b(0x23f)](formatRows(_0x1db52e[_0x46cc6b(0x173)]))):console['error']('\x20\x20'+a34_0x427111[_0x46cc6b(0x129)]('Error:')+'\x20'+_0x1db52e[_0x46cc6b(0x2d0)]);}[a34_0xe3eda6(0x199)](_0x20d825){const _0x3d461b=a34_0xe3eda6;if(_0x20d825[_0x3d461b(0x2ec)]['length']===0x0)return;console[_0x3d461b(0x113)]('\x0a'+a34_0x427111[_0x3d461b(0x18c)]('Attributes'));for(const _0x39c2ad of _0x20d825[_0x3d461b(0x2ec)]){const _0x33c50b=_0x39c2ad['schemaValid']?a34_0x427111[_0x3d461b(0x276)]('✔'):a34_0x427111[_0x3d461b(0x129)]('✘');let _0x4a8310='';if(_0x39c2ad[_0x3d461b(0x2ac)]&&_0x39c2ad[_0x3d461b(0x1bb)]!==undefined&&_0x39c2ad[_0x3d461b(0x20a)]!==undefined){const _0x1ee5e3=_0x39c2ad['coveragePercent'][_0x3d461b(0x22c)](0x1),_0x59bd6c=_0x39c2ad['coveragePercent']>=0x50?a34_0x427111['green']:_0x39c2ad[_0x3d461b(0x20a)]>=0x32?a34_0x427111[_0x3d461b(0x1ce)]:a34_0x427111[_0x3d461b(0x129)];_0x4a8310='\x20'+a34_0x427111[_0x3d461b(0x18c)](_0x3d461b(0x2b3))+'\x20'+_0x59bd6c(_0x1ee5e3+'%')+'\x20('+formatRows(_0x39c2ad[_0x3d461b(0x1bb)])+_0x3d461b(0x174);}console[_0x3d461b(0x113)](_0x33c50b+'\x20'+a34_0x427111[_0x3d461b(0x260)](_0x39c2ad[_0x3d461b(0x205)])+_0x4a8310),console['error']('\x20\x20'+a34_0x427111[_0x3d461b(0x18c)](_0x3d461b(0x27a))+'\x20'+a34_0x427111[_0x3d461b(0x260)](_0x39c2ad[_0x3d461b(0x2a7)]+'.'+_0x39c2ad[_0x3d461b(0x152)]));const _0x338a37=_0x39c2ad[_0x3d461b(0x22f)]===_0x39c2ad[_0x3d461b(0x307)]?a34_0x427111[_0x3d461b(0x18c)](_0x3d461b(0x21b))+'\x20'+_0x39c2ad[_0x3d461b(0x22f)]:a34_0x427111[_0x3d461b(0x18c)](_0x3d461b(0x26b))+'\x20'+_0x39c2ad['joinKey']+_0x3d461b(0x27d)+_0x39c2ad[_0x3d461b(0x307)];console[_0x3d461b(0x113)]('\x20\x20'+_0x338a37),console[_0x3d461b(0x113)]('\x20\x20'+a34_0x427111['dim'](_0x3d461b(0x15f))),this['displayColumns'](_0x39c2ad[_0x3d461b(0x12d)]),!_0x39c2ad['schemaValid']&&console[_0x3d461b(0x113)]('\x20\x20'+a34_0x427111[_0x3d461b(0x129)](_0x3d461b(0x17f))+'\x20'+_0x39c2ad[_0x3d461b(0x2d0)]);}}[a34_0xe3eda6(0x203)](_0x40428e,_0x4ce863){const _0x7e1bf3=a34_0xe3eda6;if(_0x40428e[_0x7e1bf3(0x2c9)]['length']===0x0)return;console[_0x7e1bf3(0x113)]('\x0a'+a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x153))+'\x20'+a34_0x427111['dim']('('+_0x4ce863+')'));for(const _0x35154d of _0x40428e[_0x7e1bf3(0x2c9)]){const _0x3a1f4a=_0x35154d['schemaValid']?a34_0x427111['green']('✔'):a34_0x427111[_0x7e1bf3(0x129)]('✘');let _0x4ecd5e='';if(_0x35154d['schemaValid']&&_0x35154d[_0x7e1bf3(0x21a)]!==undefined&&_0x35154d[_0x7e1bf3(0x294)]!==undefined){const _0x2f243f=_0x35154d['customerPercent']?.['toFixed'](0x1)||'?',_0x3a6574=(_0x35154d[_0x7e1bf3(0x15a)]??0x0)>=0x32?a34_0x427111['green']:(_0x35154d[_0x7e1bf3(0x15a)]??0x0)>=0x14?a34_0x427111[_0x7e1bf3(0x1ce)]:a34_0x427111[_0x7e1bf3(0x129)];_0x4ecd5e='\x20'+a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x204))+'\x20'+_0x3a6574(formatRows(_0x35154d[_0x7e1bf3(0x21a)]))+'\x20('+_0x2f243f+_0x7e1bf3(0x23d)+a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x236))+'\x20'+a34_0x427111[_0x7e1bf3(0x23f)](formatRows(_0x35154d[_0x7e1bf3(0x294)]));}console[_0x7e1bf3(0x113)](_0x3a1f4a+'\x20'+a34_0x427111['bold'](_0x35154d[_0x7e1bf3(0x205)])+_0x4ecd5e),console[_0x7e1bf3(0x113)]('\x20\x20'+a34_0x427111['dim'](_0x7e1bf3(0x27a))+'\x20'+a34_0x427111[_0x7e1bf3(0x260)](_0x35154d[_0x7e1bf3(0x2a7)]+'.'+_0x35154d[_0x7e1bf3(0x152)]));const _0xdf4d=_0x35154d[_0x7e1bf3(0x22f)]===_0x35154d[_0x7e1bf3(0x307)]?a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x21b))+'\x20'+_0x35154d[_0x7e1bf3(0x22f)]:a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x26b))+'\x20'+_0x35154d[_0x7e1bf3(0x22f)]+_0x7e1bf3(0x27d)+_0x35154d[_0x7e1bf3(0x307)];console[_0x7e1bf3(0x113)]('\x20\x20'+_0xdf4d),console[_0x7e1bf3(0x113)]('\x20\x20'+a34_0x427111[_0x7e1bf3(0x18c)](_0x7e1bf3(0x15f))),this[_0x7e1bf3(0x194)](_0x35154d[_0x7e1bf3(0x12d)]),!_0x35154d[_0x7e1bf3(0x2ac)]&&console[_0x7e1bf3(0x113)]('\x20\x20'+a34_0x427111['red'](_0x7e1bf3(0x17f))+'\x20'+_0x35154d[_0x7e1bf3(0x2d0)]);}}[a34_0xe3eda6(0x194)](_0x41d6a4){const _0x4b5d39=a34_0xe3eda6;for(const _0x3df97c of _0x41d6a4){_0x3df97c[_0x4b5d39(0x285)]===_0x3df97c[_0x4b5d39(0x28c)]||_0x3df97c[_0x4b5d39(0x28c)]==='*'?console[_0x4b5d39(0x113)](_0x4b5d39(0x189)+_0x3df97c[_0x4b5d39(0x285)]):console[_0x4b5d39(0x113)](_0x4b5d39(0x189)+_0x3df97c[_0x4b5d39(0x285)]+'\x20'+a34_0x427111[_0x4b5d39(0x18c)]('('+_0x3df97c['column']+')'));}}[a34_0xe3eda6(0x106)](_0xde6f67){const _0x969517=a34_0xe3eda6;console[_0x969517(0x113)]('─'[_0x969517(0x2fe)](0x3c));if(_0xde6f67[_0x969517(0x2ca)][_0x969517(0x13f)]>0x0){console[_0x969517(0x113)]('\x0a'+a34_0x427111[_0x969517(0x129)]('Errors:'));for(const _0x4dbb5c of _0xde6f67[_0x969517(0x2ca)]){console[_0x969517(0x113)]('\x20\x20'+a34_0x427111[_0x969517(0x129)]('•')+'\x20'+_0x4dbb5c);}}_0xde6f67[_0x969517(0x2cf)]&&console['error']('\x0a'+a34_0x427111['green']('✔')+_0x969517(0x271));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x1a2);['description']=a34_0xe3eda6(0x268);async[a34_0xe3eda6(0x116)](_0x4768d1){const _0x6d20c6=a34_0xe3eda6,{options:_0x5adf45,args:_0x316383,tdx:_0x31a470}=_0x4768d1,_0x3f434a=_0x5adf45,_0x23dfd6=_0x316383[0x0]||_0x5adf45[_0x6d20c6(0x119)];if(!_0x23dfd6)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a'+_0x6d20c6(0x25f)+_0x6d20c6(0x26e)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+'\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a'+_0x6d20c6(0x149)+_0x6d20c6(0x30b)),0x1;if(!_0x3f434a[_0x6d20c6(0x2ff)]&&!_0x3f434a[_0x6d20c6(0x2a9)]&&!_0x3f434a[_0x6d20c6(0x22a)]&&!_0x3f434a[_0x6d20c6(0x2c7)])return console[_0x6d20c6(0x113)](a34_0x427111['red']('Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a')),console[_0x6d20c6(0x113)](_0x6d20c6(0x2af)),console[_0x6d20c6(0x113)]('Options:'),console[_0x6d20c6(0x113)](_0x6d20c6(0x1c6)),console['error']('\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute'),console[_0x6d20c6(0x113)](_0x6d20c6(0x165)),console[_0x6d20c6(0x113)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0xf3afa7=resolveYamlFile(_0x23dfd6);if(!existsSync(_0xf3afa7))return showFileNotFoundError(_0xf3afa7,_0x23dfd6),0x1;_0x3f434a[_0x6d20c6(0x235)]&&(console['error'](_0x6d20c6(0x1f7)+_0x3f434a[_0x6d20c6(0x28f)]),console[_0x6d20c6(0x113)]('YAML\x20file:\x20'+_0xf3afa7));let _0x4b4791;try{_0x4b4791=readFileSync(_0xf3afa7,_0x6d20c6(0x2e4));}catch(_0x42832a){const _0x363153=_0x42832a instanceof Error?_0x42832a['message']:String(_0x42832a);return console[_0x6d20c6(0x113)](_0x6d20c6(0x10f)+_0x363153),0x1;}let _0x2157fe;try{_0x2157fe=parseDef(_0x4b4791);}catch(_0x41cfdc){const _0x5d4508=_0x41cfdc instanceof Error?_0x41cfdc[_0x6d20c6(0x23b)]:String(_0x41cfdc);return console[_0x6d20c6(0x113)](a34_0x427111[_0x6d20c6(0x129)]('Error\x20parsing\x20YAML:\x20'+_0x5d4508)),0x1;}if(_0x3f434a[_0x6d20c6(0x2a9)]===!![]||_0x3f434a['attribute']===''){const _0x56a480=_0x2157fe[_0x6d20c6(0x2ec)]?.['map'](_0x55c313=>_0x55c313['name'])||[];if(_0x56a480[_0x6d20c6(0x13f)]===0x0)console[_0x6d20c6(0x113)](a34_0x427111[_0x6d20c6(0x129)](_0x6d20c6(0x2e2)));else{console[_0x6d20c6(0x113)](a34_0x427111['red']('Error:\x20--attribute\x20requires\x20a\x20name\x0a')),console[_0x6d20c6(0x113)](_0x6d20c6(0x24a));for(const _0x251c6d of _0x56a480){console[_0x6d20c6(0x113)]('\x20\x20'+a34_0x427111['cyan'](_0x251c6d));}console['error'](_0x6d20c6(0x12f)+_0x23dfd6+_0x6d20c6(0x1be)+_0x56a480[0x0]+'\x22');}return 0x1;}if(_0x3f434a[_0x6d20c6(0x22a)]===!![]||_0x3f434a[_0x6d20c6(0x22a)]===''){const _0x226433=_0x2157fe[_0x6d20c6(0x2c9)]?.[_0x6d20c6(0x269)](_0x1fddaa=>_0x1fddaa[_0x6d20c6(0x205)])||[];if(_0x226433[_0x6d20c6(0x13f)]===0x0)console[_0x6d20c6(0x113)](a34_0x427111['red'](_0x6d20c6(0x2e7)));else{console['error'](a34_0x427111[_0x6d20c6(0x129)](_0x6d20c6(0x19f))),console[_0x6d20c6(0x113)](_0x6d20c6(0x231));for(const _0x5c9897 of _0x226433){console[_0x6d20c6(0x113)]('\x20\x20'+a34_0x427111[_0x6d20c6(0x23f)](_0x5c9897));}console[_0x6d20c6(0x113)](_0x6d20c6(0x12f)+_0x23dfd6+_0x6d20c6(0x2dd)+_0x226433[0x0]+'\x22');}return 0x1;}const _0x231ed3=createCommandSpinner(a34_0x427111['dim'](_0x6d20c6(0x144)),{'verbose':_0x3f434a['verbose']});_0x231ed3[_0x6d20c6(0x1d6)]();const _0x35c9a9={'onProgress':_0x219818=>{const _0x8bc523=_0x6d20c6;_0x231ed3[_0x8bc523(0x2f0)]=formatProgressMessage(_0x219818);}};if(_0x3f434a['master'])_0x35c9a9[_0x6d20c6(0x2ff)]=!![];if(_0x3f434a[_0x6d20c6(0x2a9)]&&typeof _0x3f434a[_0x6d20c6(0x2a9)]===_0x6d20c6(0x150))_0x35c9a9[_0x6d20c6(0x2a9)]=_0x3f434a[_0x6d20c6(0x2a9)];if(_0x3f434a['behavior']&&typeof _0x3f434a[_0x6d20c6(0x22a)]===_0x6d20c6(0x150))_0x35c9a9[_0x6d20c6(0x22a)]=_0x3f434a['behavior'];if(_0x3f434a['enriched'])_0x35c9a9['enriched']=!![];if(_0x3f434a[_0x6d20c6(0x210)])_0x35c9a9['interval']=_0x3f434a[_0x6d20c6(0x210)];let _0x407c0b;try{_0x407c0b=await _0x31a470[_0x6d20c6(0x159)]['previewParentYaml'](_0x4b4791,_0x35c9a9),_0x231ed3[_0x6d20c6(0x154)]();}catch(_0x23821e){_0x231ed3[_0x6d20c6(0x154)]();throw _0x23821e;}return await this[_0x6d20c6(0x223)](_0x407c0b,{'master':_0x3f434a['master'],'attribute':typeof _0x3f434a[_0x6d20c6(0x2a9)]===_0x6d20c6(0x150)?_0x3f434a[_0x6d20c6(0x2a9)]:undefined,'behavior':typeof _0x3f434a[_0x6d20c6(0x22a)]==='string'?_0x3f434a[_0x6d20c6(0x22a)]:undefined,'enriched':_0x3f434a['enriched']}),_0x407c0b[_0x6d20c6(0x2cf)]?0x0:0x1;}async[a34_0xe3eda6(0x223)](_0x2be7ef,_0x1ba72a){const _0x192e68=a34_0xe3eda6;console[_0x192e68(0x113)]('\x0a'+a34_0x427111['bold'](_0x192e68(0x1b2))+'\x20'+_0x2be7ef[_0x192e68(0x205)]),console[_0x192e68(0x113)]('═'[_0x192e68(0x2fe)](0x3c));if(_0x1ba72a[_0x192e68(0x2ff)]&&_0x2be7ef[_0x192e68(0x266)]){const _0x4aba6d=a34_0x427111['dim'](_0x192e68(0x20c))+'\x20'+a34_0x427111[_0x192e68(0x260)](_0x2be7ef['master'][_0x192e68(0x2a7)]+'.'+_0x2be7ef[_0x192e68(0x2ff)][_0x192e68(0x152)]);await this[_0x192e68(0x1de)](_0x4aba6d,_0x2be7ef[_0x192e68(0x266)]);}else{if(_0x1ba72a[_0x192e68(0x2a9)]&&_0x2be7ef['sampleData']){const _0x419d25=a34_0x427111['dim'](_0x192e68(0x20b))+'\x20'+a34_0x427111['bold'](_0x1ba72a[_0x192e68(0x2a9)]);await this[_0x192e68(0x1de)](_0x419d25,_0x2be7ef['sampleData']);}else{if(_0x1ba72a[_0x192e68(0x22a)]&&_0x2be7ef[_0x192e68(0x266)]){const _0x2156cb=a34_0x427111[_0x192e68(0x18c)]('Behavior:')+'\x20'+a34_0x427111[_0x192e68(0x260)](_0x1ba72a[_0x192e68(0x22a)]);await this[_0x192e68(0x1de)](_0x2156cb,_0x2be7ef[_0x192e68(0x266)]);}else{if(_0x1ba72a[_0x192e68(0x2c7)]&&_0x2be7ef[_0x192e68(0x266)]){const _0x4325ba=a34_0x427111['dim'](_0x192e68(0x211))+'\x20'+a34_0x427111[_0x192e68(0x260)]('Master\x20+\x20Attributes');await this[_0x192e68(0x1de)](_0x4325ba,_0x2be7ef[_0x192e68(0x266)]);}else!_0x2be7ef[_0x192e68(0x266)]&&console[_0x192e68(0x113)]('\x0aNo\x20sample\x20data\x20available');}}}if(_0x2be7ef[_0x192e68(0x2ca)]['length']>0x0){console[_0x192e68(0x113)]('─'[_0x192e68(0x2fe)](0x3c)),console['error']('\x0a'+a34_0x427111[_0x192e68(0x129)](_0x192e68(0x2b0)));for(const _0x162397 of _0x2be7ef[_0x192e68(0x2ca)]){console[_0x192e68(0x113)]('\x20\x20'+a34_0x427111['red']('•')+'\x20'+_0x162397);}}}async[a34_0xe3eda6(0x1de)](_0x54b753,_0x1a1bca){const _0x3a7ca8=a34_0xe3eda6;if(_0x1a1bca[_0x3a7ca8(0x13f)]===0x0){console['error']('\x0a'+_0x54b753),console['error'](_0x3a7ca8(0x28a));return;}console[_0x3a7ca8(0x113)]('\x0a'+_0x54b753);const _0xe76c7a=Object[_0x3a7ca8(0x200)](_0x1a1bca[0x0])[_0x3a7ca8(0x269)](_0x5539ac=>({'name':_0x5539ac,'type':typeof _0x1a1bca[0x0][_0x5539ac]===_0x3a7ca8(0x19b)?_0x3a7ca8(0x185):_0x3a7ca8(0x212)})),_0x3ddf53={'queryId':'preview','columns':_0xe76c7a,'data':_0x1a1bca,'stats':{'state':_0x3a7ca8(0x29e),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1a1bca['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x2509b4=formatAsTable(_0x3ddf53,_0x1a1bca[_0x3a7ca8(0x13f)],!![]);await writeOutput(_0x2509b4,undefined,_0x3a7ca8(0x152));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x10c);[a34_0xe3eda6(0x16d)]='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async[a34_0xe3eda6(0x116)](_0x3b3dd5){const _0x4364e4=a34_0xe3eda6,{options:_0x21185e,args:_0x547427,tdx:_0x5d1d7d}=_0x3b3dd5,_0x5db585=_0x21185e,_0x4176fa=_0x547427[0x0]||_0x21185e[_0x4364e4(0x119)];if(!_0x4176fa)return showParentSegmentNotSetError(_0x4364e4(0x1a8)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x45c3bb=resolveYamlFile(_0x4176fa);if(existsSync(_0x45c3bb)){_0x5db585[_0x4364e4(0x235)]&&console[_0x4364e4(0x113)](_0x4364e4(0x274)+_0x45c3bb);let _0x2edad2;try{_0x2edad2=readFileSync(_0x45c3bb,'utf-8');}catch(_0x3641a4){const _0x37bdc9=_0x3641a4 instanceof Error?_0x3641a4[_0x4364e4(0x23b)]:String(_0x3641a4);return console[_0x4364e4(0x113)]('Error\x20reading\x20file:\x20'+_0x37bdc9),0x1;}const _0x5257e8=await withSpinner(_0x4364e4(0x1e9),()=>_0x5d1d7d['segment'][_0x4364e4(0x142)](_0x2edad2),{'verbose':_0x5db585['verbose']}),_0x41f5c3=_0x5257e8['data'],{isNew:_0x4e58e0,name:_0x19573c,hasChanges:_0x3a815a,diffFormatted:_0x258a05}=_0x41f5c3;if(_0x3a815a){_0x4e58e0?console[_0x4364e4(0x113)](_0x4364e4(0x20f)+_0x19573c+'\x27:'):console[_0x4364e4(0x113)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x19573c+'\x27:');console[_0x4364e4(0x113)]('─'[_0x4364e4(0x2fe)](0x3c)),console[_0x4364e4(0x113)](_0x258a05),console[_0x4364e4(0x113)]('─'[_0x4364e4(0x2fe)](0x3c));const _0x321435=_0x4e58e0?_0x4364e4(0x250)+_0x19573c+_0x4364e4(0x249):_0x4364e4(0x163)+_0x19573c+_0x4364e4(0x249);if(!_0x5db585[_0x4364e4(0x15c)]){if(!isInteractive())return console[_0x4364e4(0x113)](a34_0x427111[_0x4364e4(0x129)](_0x4364e4(0x1cb)),_0x4364e4(0x186)),console[_0x4364e4(0x113)](a34_0x427111[_0x4364e4(0x18c)](_0x4364e4(0x241))),0x1;const _0x5e7434=await confirmKey(_0x321435);if(!_0x5e7434)return console[_0x4364e4(0x113)](a34_0x427111[_0x4364e4(0x1ce)](_0x4364e4(0x104))),0x1;}const _0x49ec71=_0x4e58e0?_0x4364e4(0x2ea):_0x4364e4(0x224);await withSpinner(_0x49ec71+_0x4364e4(0x161)+_0x19573c+_0x4364e4(0x217),()=>_0x41f5c3[_0x4364e4(0x11b)](),{'verbose':_0x5db585['verbose']});const _0x2e27f2=_0x4e58e0?'Created':_0x4364e4(0x306);console['error']('✔\x20'+_0x2e27f2+_0x4364e4(0x161)+_0x19573c+'\x27');}else console[_0x4364e4(0x113)](_0x4364e4(0x10d)+_0x19573c+_0x4364e4(0x1cc));}const _0x12b537=await withSpinner(_0x4364e4(0x18d)+_0x4176fa+_0x4364e4(0x217),()=>_0x5d1d7d[_0x4364e4(0x159)][_0x4364e4(0x30a)](_0x4176fa),{'verbose':_0x5db585['verbose']}),_0x29e682=_0x12b537[_0x4364e4(0x209)],_0x156186=getConsoleUrl(_0x5db585['site'],_0x4364e4(0x1aa)+_0x29e682['workflowId']+'/sessions/'+_0x29e682['workflowSessionId']+_0x4364e4(0x22b)+_0x29e682[_0x4364e4(0x30c)]);return console[_0x4364e4(0x113)](_0x4364e4(0x178)),console[_0x4364e4(0x113)]('\x20\x20'+a34_0x427111[_0x4364e4(0x18c)](_0x4364e4(0x13a))+'\x20'+_0x29e682[_0x4364e4(0x13b)]),console[_0x4364e4(0x113)]('\x20\x20'+a34_0x427111[_0x4364e4(0x18c)](_0x4364e4(0x191))+'\x20'+_0x29e682[_0x4364e4(0x10a)]),console[_0x4364e4(0x113)]('\x20\x20'+a34_0x427111[_0x4364e4(0x18c)]('Session:')+'\x20'+_0x29e682['workflowSessionId']),console[_0x4364e4(0x113)]('\x20\x20'+a34_0x427111[_0x4364e4(0x18c)](_0x4364e4(0x263))+'\x20'+_0x29e682[_0x4364e4(0x30c)]),console['error']('\x20\x20'+_0x156186),console[_0x4364e4(0x113)]('\x0a'+a34_0x427111[_0x4364e4(0x18c)]('To\x20cancel:')+_0x4364e4(0x15d)+_0x29e682[_0x4364e4(0x30c)]+_0x4364e4(0x2e9)),0x0;}}function a34_0x5674(){const _0x42677c=['ps:rt:jn:list','relationships','database','Get\x20current\x20RT\x20configuration\x20version\x20status','attribute','sections:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','schemaValid','sections','allowed\x20IPs:','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','Errors:','darwin','Error:\x20Personalization\x20ID\x20is\x20required','Coverage:','keyEventId:','\x20--behavior\x20\x22<name>\x22','null','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Error:\x20Service\x20name\x20is\x20required','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','ignore','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','\x20personalization','type','segment:parent:show','segment:parent:desc','\x0a⚠️\x20\x20Migrating:\x20','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x20\x20Tables:\x201\x20customers\x20+\x20','✔\x20Retrieved\x20RT\x20configuration\x20version','idStitching','Output\x20file:\x20','ps:rt:jn:pause','enriched','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','behaviors','errors','localeCompare','parent_segment','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','Output\x20Database:','allValid','schemaError','No\x20parent\x20segments\x20match\x20pattern:\x20','pullParentYaml','open','displayMasterInfo','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','realtime','RT\x202.0\x20Validate:','26xUIlPh','✔\x20Created\x20parent\x20segment\x20\x27','Error:\x20Token\x20name\x20is\x20required','ps:pz:init','events','\x20--behavior\x20\x22','No\x20RT-enabled\x20parent\x20segments\x20found','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','jobId','\x20\x20\x20\x20\x20\x20\x20\x20','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','createParent','utf-8','\x20(paused)','Error:\x20Token\x20ID\x20is\x20required','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','getPersonalization','\x20kill','Creating','toLocaleString','attributes','getParentFull','Creating\x20parent\x20segment\x20\x27','stringify','text','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','Created','✔\x20Created\x20personalization\x20\x27','Parent\x20segment:\x20','No\x20personalization\x20services\x20configured','Attributes:','Error:\x20--database\x20and\x20--table\x20are\x20required','collectSchema','enabled','\x20parent\x20segment','ps:pz:service:token:create','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','repeat','master','ps:pz:service:list','\x0a⚠️\x20\x20Both\x20','displayValidateResults','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','personalizationServices','addBehaviors','Updated','foreignKey','using\x20the\x20default\x20path:\x20','Get\x20SQL\x20query\x20for\x20parent\x20segment','runParent','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','workflowAttemptId','RT\x20Journey\x20ID:\x20','\x0aChanges\x20to\x20\x27','launched','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','segment:parent:view','use','Listing\x20parent\x20segments\x20matching\x20\x27','test','Listing\x20parent\x20segments...','✔\x20Deleted\x20personalization\x20service\x20\x27','Personalization:','Aborted.','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','displaySummary','value','Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a','toLowerCase','status','\x20\x20\x20\x20','segment:parent:run','✔\x20No\x20changes\x20-\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','Error\x20reading\x20file:\x20','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','\x20+\x20[','session','error','all','win32','execute','Listing\x20personalization\x20services\x20for\x20\x27','processedRows','parentSegment','entryCriteria','apply','\x20rows\x20','personalization','Getting\x20personalization\x20\x27','Create\x20a\x20realtime\x20personalization\x20entity','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','SELECT\x20*\x20FROM\x20','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','tdx\x20ps\x20push\x20','Next\x20steps:','⚡\x20Not\x20enabled','\x20[Job\x20ID:\x20','\x22\x20}','red','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','formatSchemaJson','sourceTableError','columns','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','\x0aUsage:\x20tdx\x20ps\x20preview\x20','createToken','jsonl','deleteToken','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','parent_segments','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','payload','\x20\x20\x20','Audience\x20ID:','audienceId','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','Listing\x20RT-enabled\x20parent\x20segments...','length','/\x20directory.\x0a','450348YjQunR','pushParentYaml','ps:pz:service:update','Fetching\x20sample\x20data...','segment:parent:create','Listing\x20personalizations\x20for\x20\x27','endsWith','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','join','segment:parent:validate','(id:\x20','\x27\x20with\x20ID:\x20','\x22,\x20\x22type\x22:\x20\x22','✔\x20Query\x20completed:\x20Processed\x20','string','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','table','Behaviors','stop','Pattern:\x20','deletePersonalization','addBehaviorsFile','unref','segment','customerPercent','Database:\x20','yes','\x20tdx\x20wf\x20attempt\x20','getParentSQL','Columns:','token:','\x20parent\x20segment\x20\x27','Error:\x20Service\x20ID\x20is\x20required','Apply\x20changes\x20to\x20\x27','Listing\x20RT\x20journeys\x20for\x20\x27','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','list','Fetching\x20current\x20configuration\x20for\x20\x27','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','getOutputDatabaseName','reduce','\x20Opening\x20','description','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','\x20\x20\x20\x20\x20\x20','audienceId:','Error:\x20File\x20not\x20found:\x20','Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a','rowCount','\x20rows)','tokens','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','segment:parent:update','\x0a✔\x20Workflow\x20started','\x0a\x20\x20]\x0a}\x0a','updated:','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','log','/app/dw/parentSegments/','Finding\x20service\x20for\x20token...','Error:','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x20service','xdg-open','684960aQXtUp','allowedIps','double','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','Show\x20a\x20specific\x20realtime\x20personalization','\x20\x20\x20\x20-\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','dim','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','5JPPFWa','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','timezone','Status:','⚡\x20Enabled','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','displayColumns','replace','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20init\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20for\x20specific\x20parent\x20segment','scheduleOption','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','displayAttributesStats','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','number','tdx\x20ps\x20preview\x20','format','7aBeKYA','Error:\x20--behavior\x20requires\x20a\x20name\x0a','segment:parent:pull','Validating\x20configuration...','segment:parent:preview','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','push','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','ps:rt:configuration_versions','Fetching\x20customers\x20schema...','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','Error:\x20--name\x20is\x20required','/app/workflows/','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','attributesFile','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','✔\x20Updated\x20personalization\x20\x27','ps:pz:service:token:delete','listParents','Listing\x20fields\x20for\x20\x27','Preview:','getBehaviorNames','ps:rt:validate','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','some','Creating\x20token\x20\x27','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','.yaml','matchedCount','behavior_','personalization_services','\x20--attribute\x20\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20for\x20specific\x20parent\x20segment','realtime_enabled','\x20configured','Deleting\x20personalization\x20service\x20\x27','includeSensitive','file','To\x20view\x20sample\x20data:','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','displayRealtimeInfo','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','.yml','\x0aError:','\x27\x20is\x20up\x20to\x20date','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','yellow','folderId','Deleting\x20token\x20\x27','`\x20to\x20download\x20the\x20configuration\x20first','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a','/{name}.yml\x0a','\x20total','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','start','✔\x20Created\x20token\x20\x27','customerGroup','paused','no\x20tokens\x20configured','ps:rt:jn:resume','Creating\x20personalization\x20service\x20\x27','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','displaySampleData','\x20true','status:\x20','keyEventCriteria','ps:pz:service:delete','displayPreviewHints','\x20--enriched','2071008wbeKMb','last_page_viewed','updateParent','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','Analyzing\x20changes...','\x20Added\x20RT\x202.0\x20template\x20section','identifier','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20for\x20specific\x20parent\x20segment','web','/\x20→\x20','eventKind','single','Patching\x20personalization\x20\x27','identifier:\x20','Schema\x20saved\x20to\x20','\x27\x20is\x20already\x20up\x20to\x20date','created:','Delete\x20a\x20realtime\x20personalization','Site:\x20','eventKind:\x20','create','addAttributes','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','elapsedTimeMillis','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','stageCount','keys','split','stitchingKeys','displayBehaviorsStats','Customers:','name','public:','Options:\x0a','Error:\x20Parent\x20segment\x20name\x20is\x20required','data','coveragePercent','Attribute:','Master:','page_view','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','\x0aNew\x20parent\x20segment\x20\x27','interval','Enriched:','varchar','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','updatedAt','{\x0a\x20\x20\x22database\x22:\x20\x22','Fetching\x20SQL\x20for\x20\x27','\x27...','\x20\x20Columns:\x20','customers','customersWithEvents','Join\x20on:','filter','Validate:','✔\x20Found\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','✔\x20Updated\x20personalization\x20service\x20\x27','scheduleType','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','displayPreviewResults','Updating','segment:parent:push','Default','308616yNNfbr','\x20--interval\x20','Delete\x20a\x20personalization\x20service','behavior','/attempt/','toFixed','any','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','joinKey','Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a','Available\x20behaviors:','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','Validating\x20RT\x20configuration...','parent_id','verbose','Events:','Overwrite\x20\x27','✔\x20Deleted\x20personalization\x20\x27','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x27\x20for\x20service\x20\x27','message','td_client_id','%)\x20','population','cyan','run','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','column_type','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20configuration_versions\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20for\x20specific\x20parent\x20segment','segment:parent:sql','behaviorsFile','Fetching\x20behavior\x20list...','delete','\x20stage','\x27\x20and\x20run\x20workflow?','Available\x20attributes:','Show\x20parent\x20segment\x20details','public','Update\x20a\x20realtime\x20personalization\x20entity','Pause\x20activations\x20in\x20an\x20RT\x20journey','listJourneys','Create\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','\x20\x202.\x20Run\x20','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','segment:parent:fields','Resolving\x20parent\x20segment\x20\x27','payload:','get','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','Fetching\x20parent\x20segment\x20\x27','\x20behaviors','\x20--attribute\x20\x22<name>\x22','ps:pz:list','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','customerGroupFile','Options\x20(one\x20required):\x0a','bold','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','No\x20RT\x20journeys\x20found','Attempt:','.customers)','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','sampleData','resolveParentId','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','map','\x20\x20Database:\x20','Join:','Creating\x20personalization\x20\x27','trim','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','\x20Configuration\x20is\x20valid','user_id','json','Found\x20YAML\x20file:\x20','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','green','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','column_name','Usage:\x20tdx\x20ps\x20rt\x20configuration_versions\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20(requires\x20context)\x0a','Source:','sourceTableValid','output','\x20=\x20','true','Rows:','62904AbDvOG','/\x20and\x20','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','valid','id:\x20','label','folder-segment','2995770bIfqqj','<database>.<table>','validateParentYaml','\x20\x20No\x20sample\x20data\x20available','List\x20available\x20fields\x20for\x20segmentation','column','✔\x20Deleted\x20token\x20\x27','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','site','List\x20parent\x20segments','SELECT\x20*\x20FROM\x20(\x0a','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','state','totalEvents','Error:\x20Token\x20\x27','match','\x5c$&','\x20Added\x20personalization\x20template\x20to\x20','sort','ps:pz:service:show','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment','\x20is\x20already\x20up\x20to\x20date','FINISHED','YAML\x20file:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','parentFolder','keyEventId','31490VMskbJ','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a'];a34_0x5674=function(){return _0x42677c;};return a34_0x5674();}export class ParentSegmentFieldsCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x254);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x28b);async[a34_0xe3eda6(0x116)](_0x33e20e){const _0x319b61=a34_0xe3eda6,{options:_0x3d81d6,args:_0x3644e8,tdx:_0x5617ce}=_0x33e20e,_0x2e46ee=_0x3644e8[0x0]||_0x3d81d6[_0x319b61(0x119)];if(!_0x2e46ee)return showParentSegmentNotSetError(_0x319b61(0x282)+_0x319b61(0x134)),0x1;_0x3d81d6['verbose']&&(console['error'](_0x319b61(0x1f7)+_0x3d81d6[_0x319b61(0x28f)]),console[_0x319b61(0x113)](_0x319b61(0x2f5)+_0x2e46ee));const _0x4a354c=await withSpinner(_0x319b61(0x1b1)+_0x2e46ee+_0x319b61(0x217),()=>_0x5617ce[_0x319b61(0x159)]['listFields'](_0x2e46ee),{'verbose':_0x3d81d6[_0x319b61(0x235)]}),_0x1e544d=_0x4a354c[_0x319b61(0x209)];console[_0x319b61(0x113)](_0x319b61(0x21e)+_0x1e544d[_0x319b61(0x13f)]+'\x20field'+(_0x1e544d[_0x319b61(0x13f)]!==0x1?'s':''));if(_0x3d81d6[_0x319b61(0x273)]||_0x3d81d6[_0x319b61(0x131)])return await handleSDKOutput(_0x1e544d,_0x3d81d6),0x0;return displayFieldsHumanReadable(_0x1e544d,_0x2e46ee),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0xfd);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x24b);async['execute'](_0x4cf8e6){const _0x2cfaa4=a34_0xe3eda6,{options:_0xe886d5,args:_0x1d9f73,tdx:_0x36ea36}=_0x4cf8e6,_0x4159d3=_0xe886d5,_0x470083=_0x1d9f73[0x0]||_0xe886d5[_0x2cfaa4(0x119)];if(!_0x470083)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a'+_0x2cfaa4(0x18a)+_0x2cfaa4(0x207)+_0x2cfaa4(0x18b)),0x1;_0xe886d5[_0x2cfaa4(0x235)]&&(console['error'](_0x2cfaa4(0x1f7)+_0xe886d5[_0x2cfaa4(0x28f)]),console[_0x2cfaa4(0x113)](_0x2cfaa4(0x2f5)+_0x470083));const _0x3cb1d5=await withSpinner(_0x2cfaa4(0x259)+_0x470083+_0x2cfaa4(0x217),()=>_0x36ea36[_0x2cfaa4(0x159)][_0x2cfaa4(0x2ed)](_0x470083),{'verbose':_0xe886d5[_0x2cfaa4(0x235)]}),_0x580456=_0x3cb1d5[_0x2cfaa4(0x209)];if(_0x4159d3[_0x2cfaa4(0x1ed)]){const _0x3995bb=getConsoleNextUrl(_0x4159d3['site'],'/app/dw/parentSegments/'+_0x580456['id']);return console[_0x2cfaa4(0x113)](a34_0x427111[_0x2cfaa4(0x276)]('✔')+_0x2cfaa4(0x16c)+a34_0x427111['cyan'](_0x3995bb)),openBrowser(_0x3995bb),0x0;}return await handleSingleObjectOutput(_0x580456,_0xe886d5),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2bf);[a34_0xe3eda6(0x16d)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async[a34_0xe3eda6(0x116)](_0x5743d5){const _0x1606e8=a34_0xe3eda6,{options:_0x493378,args:_0x40ee45,tdx:_0x1d611a}=_0x5743d5,_0x67e97a=_0x493378,_0x27fe0b=_0x40ee45[0x0]||_0x493378['parentSegment'];if(!_0x27fe0b)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20(requires\x20context)\x0a'+_0x1606e8(0x1d2)+_0x1606e8(0x207)+'\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path'),0x1;_0x493378[_0x1606e8(0x235)]&&(console[_0x1606e8(0x113)]('Site:\x20'+_0x493378[_0x1606e8(0x28f)]),console[_0x1606e8(0x113)]('Parent\x20segment:\x20'+_0x27fe0b));const _0x54bda6=await withSpinner(_0x1606e8(0x255)+_0x27fe0b+_0x1606e8(0x217),()=>_0x1d611a[_0x1606e8(0x159)][_0x1606e8(0x267)](_0x27fe0b),{'verbose':_0x493378[_0x1606e8(0x235)]}),_0x1721e8=_0x54bda6[_0x1606e8(0x209)],_0x5e4522=_0x1d611a[_0x1606e8(0x159)][_0x1606e8(0x16a)](_0x1721e8);if(_0x67e97a[_0x1606e8(0x27c)]){const _0x3d655d=await this[_0x1606e8(0x2f9)](_0x5743d5,_0x27fe0b,_0x1721e8,_0x5e4522),_0x2da307=this[_0x1606e8(0x12b)](_0x3d655d);writeFileSync(_0x67e97a[_0x1606e8(0x27c)],_0x2da307);const _0x5b38b5=_0x3d655d[_0x1606e8(0x219)]['columns'][_0x1606e8(0x13f)]+_0x3d655d[_0x1606e8(0x2c9)][_0x1606e8(0x16b)]((_0x1e9063,_0x1b05cd)=>_0x1e9063+_0x1b05cd[_0x1606e8(0x12d)][_0x1606e8(0x13f)],0x0),_0x16f2bb=_0x3d655d[_0x1606e8(0x2c9)][_0x1606e8(0x21c)](_0x4bab45=>_0x4bab45[_0x1606e8(0x12d)]['length']===0x0)['length'];return console['log'](_0x1606e8(0x1f3)+_0x67e97a['output']),console[_0x1606e8(0x17c)](_0x1606e8(0x26a)+_0x5e4522),console[_0x1606e8(0x17c)](_0x1606e8(0x2c2)+_0x3d655d['behaviors']['length']+_0x1606e8(0x25a)),console[_0x1606e8(0x17c)](_0x1606e8(0x218)+_0x5b38b5+_0x1606e8(0x1d4)),_0x16f2bb>0x0&&console[_0x1606e8(0x17c)]('\x20\x20Note:\x20'+_0x16f2bb+_0x1606e8(0x277)),0x0;}console[_0x1606e8(0x113)]('\x0a'+a34_0x427111[_0x1606e8(0x260)](_0x1606e8(0x2ce))+'\x20'+a34_0x427111[_0x1606e8(0x23f)](_0x5e4522));const _0x3e5c58=await withSpinner(_0x1606e8(0x1a7),()=>_0x1d611a[_0x1606e8(0x159)][_0x1606e8(0x15e)](_0x1721e8),{'verbose':_0x493378[_0x1606e8(0x235)]});console['error']('\x0a'+a34_0x427111[_0x1606e8(0x260)](_0x1606e8(0x219))+'\x20'+a34_0x427111['dim']('('+_0x5e4522+_0x1606e8(0x264)));const _0x1f1fc1=await executeSchemaQuery(_0x3e5c58[_0x1606e8(0x209)],_0x1d611a,_0x493378);await handleQueryOutput(_0x1f1fc1,_0x493378);const _0x41ca42=await withSpinner(_0x1606e8(0x246),()=>_0x1d611a['segment'][_0x1606e8(0x1b3)](_0x1721e8),{'verbose':_0x493378[_0x1606e8(0x235)]});for(const _0x1df34b of _0x41ca42[_0x1606e8(0x209)]){const _0x1974c0='behavior_'+_0x1df34b[_0x1606e8(0x109)]()[_0x1606e8(0x195)](/\s+/g,'_'),_0x13457b=_0x1606e8(0x122)+_0x5e4522+'.'+_0x1974c0;console[_0x1606e8(0x113)]('\x0a'+a34_0x427111['bold'](_0x1df34b)+'\x20'+a34_0x427111[_0x1606e8(0x18c)]('('+_0x5e4522+'.'+_0x1974c0+')'));try{const _0x5aab2b=await executeSchemaQuery(_0x13457b,_0x1d611a,_0x493378);await handleQueryOutput(_0x5aab2b,_0x493378);}catch{console['error'](a34_0x427111[_0x1606e8(0x1ce)](_0x1606e8(0x26f)));}}return 0x0;}async[a34_0xe3eda6(0x2f9)](_0x554494,_0x44de02,_0x4cdcba,_0x59b41d){const _0x16acb9=a34_0xe3eda6,{options:_0x1a26cd,tdx:_0x2ca079}=_0x554494,_0x1ba682=await withSpinner(_0x16acb9(0x1a7),()=>_0x2ca079['segment'][_0x16acb9(0x15e)](_0x4cdcba),{'verbose':_0x1a26cd['verbose']}),_0x4cf711=await executeSchemaQuery(_0x1ba682[_0x16acb9(0x209)],_0x2ca079,_0x1a26cd),_0x361bd2=_0x4cf711[_0x16acb9(0x209)][_0x16acb9(0x269)](_0x4392c6=>({'name':_0x4392c6['column_name'],'type':_0x4392c6[_0x16acb9(0x242)]})),_0x390434=await withSpinner(_0x16acb9(0x246),()=>_0x2ca079[_0x16acb9(0x159)]['getBehaviorNames'](_0x4cdcba),{'verbose':_0x1a26cd[_0x16acb9(0x235)]}),_0x415093=[];for(const _0x4a75b1 of _0x390434[_0x16acb9(0x209)]){const _0x1e62bb=_0x16acb9(0x1bc)+_0x4a75b1[_0x16acb9(0x109)]()['replace'](/\s+/g,'_'),_0x424478=_0x16acb9(0x122)+_0x59b41d+'.'+_0x1e62bb;let _0x2fab86=[];try{const _0x561074=await executeSchemaQuery(_0x424478,_0x2ca079,_0x1a26cd);_0x2fab86=_0x561074[_0x16acb9(0x209)][_0x16acb9(0x269)](_0x72f392=>({'name':_0x72f392[_0x16acb9(0x278)],'type':_0x72f392['column_type']}));}catch{}_0x415093[_0x16acb9(0x1a4)]({'table':_0x1e62bb,'columns':_0x2fab86});}return{'database':_0x59b41d,'parent_segment':_0x44de02,'parent_id':_0x4cdcba,'customers':{'table':_0x16acb9(0x219),'columns':_0x361bd2},'behaviors':_0x415093};}['formatSchemaJson'](_0xcaa501){const _0x5b4064=a34_0xe3eda6,_0x12ee54=_0x44a0b3=>{const _0x34d400=a34_0xff01;if(_0x44a0b3['length']===0x0)return'[]';const _0x45f148=_0x44a0b3[_0x34d400(0x269)](_0x17e589=>_0x34d400(0x123)+_0x17e589[_0x34d400(0x205)]+_0x34d400(0x14e)+_0x17e589['type']+_0x34d400(0x128));return'[\x0a'+_0x45f148[_0x34d400(0x14a)](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x1c8b2e=_0xcaa501['behaviors'][_0x5b4064(0x269)](_0x4da69f=>{const _0x5eeb9a=_0x5b4064;return _0x5eeb9a(0x198)+_0x4da69f['table']+_0x5eeb9a(0x213)+_0x12ee54(_0x4da69f[_0x5eeb9a(0x12d)])['replace'](/^/gm,'\x20\x20')['trim']()+'\x0a\x20\x20\x20\x20}';})[_0x5b4064(0x14a)](',\x0a');return _0x5b4064(0x215)+_0xcaa501[_0x5b4064(0x2a7)]+_0x5b4064(0x169)+_0xcaa501['parent_segment']+_0x5b4064(0x137)+_0xcaa501[_0x5b4064(0x234)]+_0x5b4064(0x1e8)+_0xcaa501[_0x5b4064(0x219)][_0x5b4064(0x152)]+_0x5b4064(0x1a3)+_0x12ee54(_0xcaa501['customers'][_0x5b4064(0x12d)])['replace'](/^/gm,'\x20\x20')[_0x5b4064(0x26d)]()+'\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a'+_0x1c8b2e+_0x5b4064(0x179);}}export class ParentSegmentSQLCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x244);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x309);async[a34_0xe3eda6(0x116)](_0x135ad7){const _0x106002=a34_0xe3eda6,{options:_0x23d8a4,args:_0x98a0fb,tdx:_0x5541c7}=_0x135ad7,_0x1f3491=_0x98a0fb[0x0]||_0x23d8a4[_0x106002(0x119)];if(!_0x1f3491)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a'+_0x106002(0x1ab)),0x1;_0x23d8a4['verbose']&&(console['error'](_0x106002(0x1f7)+_0x23d8a4[_0x106002(0x28f)]),console[_0x106002(0x113)]('Parent\x20segment:\x20'+_0x1f3491));const _0x3811c9=await withSpinner(_0x106002(0x255)+_0x1f3491+_0x106002(0x217),()=>_0x5541c7['segment'][_0x106002(0x267)](_0x1f3491),{'verbose':_0x23d8a4[_0x106002(0x235)]}),_0x392f24=_0x3811c9[_0x106002(0x209)],_0x416526=await withSpinner(_0x106002(0x216)+_0x1f3491+_0x106002(0x217),()=>_0x5541c7[_0x106002(0x159)]['getParentSQL'](_0x392f24),{'verbose':_0x23d8a4[_0x106002(0x235)]}),_0x32327e=_0x416526['data'];return _0x23d8a4[_0x106002(0x19d)]===_0x106002(0x273)||_0x23d8a4[_0x106002(0x19d)]===_0x106002(0x131)?await handleSDKOutput([{'sql':_0x32327e}],_0x23d8a4):console[_0x106002(0x17c)](_0x32327e),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2be);['description']=a34_0xe3eda6(0x1fc);async[a34_0xe3eda6(0x116)](_0xcd93d3){const _0x1b0a9e=a34_0xe3eda6,{options:_0xa15367,args:_0x9089e2,tdx:_0x1136c7}=_0xcd93d3,_0x255126=_0x9089e2[0x0]||_0xa15367['parentSegment'];if(!_0x255126)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a'+_0x1b0a9e(0x1c8)),0x1;_0xa15367[_0x1b0a9e(0x235)]&&(console[_0x1b0a9e(0x113)](_0x1b0a9e(0x1f7)+_0xa15367['site']),console[_0x1b0a9e(0x113)](_0x1b0a9e(0x2f5)+_0x255126));const _0x4be923=await withSpinner(_0x1b0a9e(0x255)+_0x255126+_0x1b0a9e(0x217),()=>_0x1136c7[_0x1b0a9e(0x159)]['resolveParentId'](_0x255126),{'verbose':_0xa15367[_0x1b0a9e(0x235)]}),_0x42a416=_0x4be923[_0x1b0a9e(0x209)],_0x3f9947=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x255126+_0x1b0a9e(0x217),()=>_0x1136c7[_0x1b0a9e(0x159)]['getParentSQL'](_0x42a416),{'verbose':_0xa15367[_0x1b0a9e(0x235)]});let _0x1faab0=_0x3f9947[_0x1b0a9e(0x209)];const _0x49b58b=resolveLimit(_0xa15367['limit'],DEFAULT_DISPLAY_LIMIT),_0x3ccb4d=/\bLIMIT\s+\d+/i['test'](_0x1faab0);!_0x3ccb4d&&(_0x1faab0=_0x1faab0['trim']()[_0x1b0a9e(0x195)](/;+$/,''),_0x1faab0=_0x1b0a9e(0x291)+_0x1faab0+_0x1b0a9e(0x1d5)+_0x49b58b);_0xa15367['verbose']&&console['error']('SQL\x20query:\x0a'+_0x1faab0);const _0x250087=await withProgressSpinner('Executing\x20parent\x20segment\x20query...',async _0x44f35a=>{const _0x3f5ff1=_0x1b0a9e,_0x44fff6=await _0x1136c7['query'][_0x3f5ff1(0x116)](_0x1faab0,{'catalog':'td','schema':'information_schema','onJobId':_0x2d6f4d=>{_0x44f35a['setJobId'](_0x2d6f4d);}});return _0x44fff6;},{'verbose':_0xa15367[_0x1b0a9e(0x235)]}),_0xf416bf=_0x250087[_0x1b0a9e(0x209)],_0x1bc1f9=_0xf416bf[_0x1b0a9e(0x2e0)]?_0x1b0a9e(0x127)+_0xf416bf['jobId']+']':'';return console['error'](_0x1b0a9e(0x14f)+_0xf416bf['stats'][_0x1b0a9e(0x118)][_0x1b0a9e(0x2eb)]()+_0x1b0a9e(0x11c)+('in\x20'+formatElapsed(_0xf416bf['stats'][_0x1b0a9e(0x1fd)])+_0x1bc1f9)),await handleQueryOutput(_0xf416bf,_0xa15367),0x0;}}export class PSRtListCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:rt:list';[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x168);async[a34_0xe3eda6(0x116)](_0x372896){const _0xd403fa=a34_0xe3eda6,{options:_0x1bbb5a,args:_0x152af1,tdx:_0x4fd7ef}=_0x372896,_0xad390f=_0x152af1[0x0],_0x2fbb92=await withSpinner(_0xad390f?_0xd403fa(0x105)+_0xad390f+_0xd403fa(0x217):_0xd403fa(0x13e),()=>_0x4fd7ef[_0xd403fa(0x2d6)][_0xd403fa(0x166)](),{'verbose':_0x1bbb5a[_0xd403fa(0x235)]});let _0xca9077=_0x2fbb92[_0xd403fa(0x209)]['filter'](_0x4a849f=>_0x4a849f[_0xd403fa(0x1c0)]);if(_0xad390f){const _0x3e954c=_0xad390f[_0xd403fa(0x195)](/[.+^${}()|[\]\\]/g,_0xd403fa(0x297))[_0xd403fa(0x195)](/\*/g,'.*')[_0xd403fa(0x195)](/\?/g,'.'),_0xad3285=new RegExp('^'+_0x3e954c+'$','i');_0xca9077=_0xca9077[_0xd403fa(0x21c)](_0x2d7c33=>_0xad3285[_0xd403fa(0x100)](_0x2d7c33[_0xd403fa(0x205)]));}_0xca9077[_0xd403fa(0x299)]((_0x23607e,_0x778d4d)=>_0x23607e[_0xd403fa(0x205)][_0xd403fa(0x2cb)](_0x778d4d[_0xd403fa(0x205)])),console[_0xd403fa(0x113)](_0xd403fa(0x21e)+_0xca9077[_0xd403fa(0x13f)]+'\x20RT-enabled\x20parent\x20segment'+(_0xca9077[_0xd403fa(0x13f)]!==0x1?'s':''));const _0x3cd487=_0x422ef3=>{const _0xa7750c=_0xd403fa;return getConsoleNextUrl(_0x1bbb5a[_0xa7750c(0x28f)],_0xa7750c(0x17d)+_0x422ef3);};if(_0x1bbb5a['format']==='json'||_0x1bbb5a[_0xd403fa(0x19d)]==='jsonl'){const _0x1f1438=_0xca9077[_0xd403fa(0x269)](_0x375853=>({..._0x375853,'url':_0x3cd487(_0x375853['id'])}));await handleSDKOutput(_0x1f1438,_0x1bbb5a);}else{if(_0xca9077['length']===0x0)console[_0xd403fa(0x17c)](_0xd403fa(0x2de));else for(const _0x475e03 of _0xca9077){const _0x4b873d=_0x475e03[_0xd403fa(0x23e)]?a34_0x427111['dim']('\x20('+formatRows(_0x475e03[_0xd403fa(0x23e)])+')'):'',_0x6b8528=hyperlink(_0x475e03[_0xd403fa(0x205)],_0x3cd487(_0x475e03['id']));console['log']('⚡\x20'+_0x6b8528+_0x4b873d);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']=a34_0xe3eda6(0x1b4);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x13c);async[a34_0xe3eda6(0x116)](_0x20880){const _0x393d90=a34_0xe3eda6,{options:_0x523c40,args:_0x1302f0,tdx:_0x3f193f}=_0x20880,_0x8c87c8=_0x1302f0[0x0]||_0x523c40[_0x393d90(0x119)];if(!_0x8c87c8)return showParentSegmentNotSetError(_0x393d90(0x108)+_0x393d90(0x1fb)),0x1;const _0x53ffb5=resolveYamlFile(_0x8c87c8);if(!existsSync(_0x53ffb5))return showFileNotFoundError(_0x53ffb5,_0x8c87c8),0x1;let _0x29265f;try{_0x29265f=readFileSync(_0x53ffb5,'utf-8');}catch(_0x144a54){const _0x5425ea=_0x144a54 instanceof Error?_0x144a54[_0x393d90(0x23b)]:String(_0x144a54);return console[_0x393d90(0x113)](_0x393d90(0x10f)+_0x5425ea),0x1;}const _0x52e1e9=createCommandSpinner(a34_0x427111[_0x393d90(0x18c)](_0x393d90(0x233)),{'verbose':_0x523c40[_0x393d90(0x235)]});_0x52e1e9['start']();const _0x2c2497={'realtime':!![],'onProgress':_0x432d8d=>{const _0xb21012=_0x393d90;_0x52e1e9[_0xb21012(0x2f0)]=formatProgressMessage(_0x432d8d);}};let _0x232880;try{_0x232880=await _0x3f193f[_0x393d90(0x159)][_0x393d90(0x289)](_0x29265f,_0x2c2497),_0x52e1e9['stop']();}catch(_0x155e80){_0x52e1e9[_0x393d90(0x154)]();throw _0x155e80;}console[_0x393d90(0x113)]('\x0a'+a34_0x427111[_0x393d90(0x260)](_0x393d90(0x2d7))+'\x20'+_0x232880[_0x393d90(0x205)]),console['error']('═'['repeat'](0x3c)),displayRealtimeValidation(_0x232880),console[_0x393d90(0x113)]('─'['repeat'](0x3c));if(_0x232880[_0x393d90(0x2ca)]['length']>0x0){console[_0x393d90(0x113)]('\x0a'+a34_0x427111[_0x393d90(0x129)](_0x393d90(0x2b0)));for(const _0x9e47af of _0x232880[_0x393d90(0x2ca)]){console['error']('\x20\x20'+a34_0x427111[_0x393d90(0x129)]('•')+'\x20'+_0x9e47af);}}return _0x232880['allValid']&&console[_0x393d90(0x113)]('\x0a'+a34_0x427111[_0x393d90(0x276)]('✔')+'\x20RT\x20configuration\x20is\x20valid'),_0x232880[_0x393d90(0x2cf)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2a5);['description']='List\x20RT\x20journeys';async['execute'](_0x544e9b){const _0x232add=a34_0xe3eda6,{options:_0xd30073,args:_0x1bee13,tdx:_0x297949}=_0x544e9b,_0x41d68d=_0x1bee13[0x0]||_0xd30073[_0x232add(0x119)];if(!_0x41d68d)return showParentSegmentNotSetError(_0x232add(0x172)+_0x232add(0x29c)),0x1;_0xd30073[_0x232add(0x235)]&&(console[_0x232add(0x113)](_0x232add(0x1f7)+_0xd30073[_0x232add(0x28f)]),console[_0x232add(0x113)]('Parent\x20segment:\x20'+_0x41d68d));const _0x4fe0b1=await withSpinner(_0x232add(0x255)+_0x41d68d+_0x232add(0x217),()=>_0x297949[_0x232add(0x159)][_0x232add(0x267)](_0x41d68d),{'verbose':_0xd30073[_0x232add(0x235)]}),_0x3141e6=_0x4fe0b1['data'],_0x4b73e3=await withSpinner(_0x232add(0x164)+_0x41d68d+_0x232add(0x217),()=>_0x297949[_0x232add(0x2d6)][_0x232add(0x24f)](_0x3141e6),{'verbose':_0xd30073['verbose']}),_0x2eb7a9=_0x4b73e3['data'];console[_0x232add(0x113)](_0x232add(0x21e)+_0x2eb7a9[_0x232add(0x13f)]+'\x20RT\x20journey'+(_0x2eb7a9['length']!==0x1?'s':''));if(_0xd30073[_0x232add(0x19d)]===_0x232add(0x273)||_0xd30073[_0x232add(0x19d)]===_0x232add(0x131))await handleSDKOutput(_0x2eb7a9,_0xd30073);else{if(_0x2eb7a9[_0x232add(0x13f)]===0x0)console[_0x232add(0x17c)](_0x232add(0x262));else for(const _0x21db9b of _0x2eb7a9){const _0x1625d3=_0x21db9b[_0x232add(0x293)]===_0x232add(0xfb)?'🚀':'📝',_0x1a707a=_0x21db9b[_0x232add(0x1d9)]?a34_0x427111['yellow'](_0x232add(0x2e5)):'',_0x526c05=a34_0x427111[_0x232add(0x18c)]('\x20('+_0x21db9b[_0x232add(0x1ff)]+_0x232add(0x248)+(_0x21db9b[_0x232add(0x1ff)]!==0x1?'s':'')+')');console[_0x232add(0x17c)](_0x1625d3+'\x20'+_0x21db9b[_0x232add(0x205)]+_0x1a707a+_0x526c05);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2c6);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x24e);async[a34_0xe3eda6(0x116)](_0x25cba5){const _0x1fdf2a=a34_0xe3eda6,{options:_0x566859,args:_0xf3113f,tdx:_0x47c258}=_0x25cba5,_0x159f88=_0xf3113f[0x0];if(!_0x159f88)return console[_0x1fdf2a(0x113)](a34_0x427111['red'](_0x1fdf2a(0x1c9))),console[_0x1fdf2a(0x113)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console['error'](a34_0x427111['dim']('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x566859[_0x1fdf2a(0x235)]&&(console[_0x1fdf2a(0x113)]('Site:\x20'+_0x566859[_0x1fdf2a(0x28f)]),console[_0x1fdf2a(0x113)](_0x1fdf2a(0xf9)+_0x159f88));const _0x333999=await withSpinner(_0x1fdf2a(0x292)+_0x159f88+'\x27...',()=>_0x47c258['realtime']['pauseJourney'](_0x159f88),{'verbose':_0x566859[_0x1fdf2a(0x235)]}),_0x1a1a66=_0x333999['data'];console[_0x1fdf2a(0x113)](_0x1fdf2a(0x2b9)+_0x1a1a66[_0x1fdf2a(0x205)]+'\x27');if(_0x566859[_0x1fdf2a(0x19d)]===_0x1fdf2a(0x273)||_0x566859['format']===_0x1fdf2a(0x131))await handleSDKOutput([_0x1a1a66],_0x566859);else{const _0x1378e9=_0x1a1a66[_0x1fdf2a(0x293)]===_0x1fdf2a(0xfb)?'🚀':'📝',_0x543b57=_0x1a1a66[_0x1fdf2a(0x1d9)]?a34_0x427111[_0x1fdf2a(0x1ce)](_0x1fdf2a(0x2e5)):'';console[_0x1fdf2a(0x17c)](_0x1378e9+'\x20'+_0x1a1a66[_0x1fdf2a(0x205)]+_0x543b57);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{['name']=a34_0xe3eda6(0x1db);[a34_0xe3eda6(0x16d)]='Resume\x20activations\x20in\x20an\x20RT\x20journey';async[a34_0xe3eda6(0x116)](_0x4f4a2e){const _0x5301e6=a34_0xe3eda6,{options:_0xb12cb0,args:_0x5ac7fa,tdx:_0x14b928}=_0x4f4a2e,_0x13030e=_0x5ac7fa[0x0];if(!_0x13030e)return console['error'](a34_0x427111['red'](_0x5301e6(0x1c9))),console[_0x5301e6(0x113)](_0x5301e6(0x1b9)),console[_0x5301e6(0x113)](a34_0x427111[_0x5301e6(0x18c)](_0x5301e6(0x1ad))),0x1;_0xb12cb0[_0x5301e6(0x235)]&&(console['error'](_0x5301e6(0x1f7)+_0xb12cb0[_0x5301e6(0x28f)]),console[_0x5301e6(0x113)](_0x5301e6(0xf9)+_0x13030e));const _0x3fc7de=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x13030e+_0x5301e6(0x217),()=>_0x14b928[_0x5301e6(0x2d6)]['resumeJourney'](_0x13030e),{'verbose':_0xb12cb0['verbose']}),_0x3beaf7=_0x3fc7de[_0x5301e6(0x209)];console[_0x5301e6(0x113)](_0x5301e6(0x222)+_0x3beaf7[_0x5301e6(0x205)]+'\x27');if(_0xb12cb0[_0x5301e6(0x19d)]===_0x5301e6(0x273)||_0xb12cb0[_0x5301e6(0x19d)]==='jsonl')await handleSDKOutput([_0x3beaf7],_0xb12cb0);else{const _0x5a8ca7=_0x3beaf7[_0x5301e6(0x293)]===_0x5301e6(0xfb)?'🚀':'📝',_0x5657ce=_0x3beaf7[_0x5301e6(0x1d9)]?a34_0x427111[_0x5301e6(0x1ce)](_0x5301e6(0x2e5)):'';console[_0x5301e6(0x17c)](_0x5a8ca7+'\x20'+_0x3beaf7[_0x5301e6(0x205)]+_0x5657ce);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a34_0xe3eda6(0x1a6);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x2a8);async[a34_0xe3eda6(0x116)](_0x5e87fa){const _0x1297a1=a34_0xe3eda6,{options:_0x1848e8,args:_0x413c25,tdx:_0x23980a}=_0x5e87fa,_0x46bcb9=_0x413c25[0x0]||_0x1848e8[_0x1297a1(0x119)];if(!_0x46bcb9)return showParentSegmentNotSetError(_0x1297a1(0x279)+_0x1297a1(0x243)),0x1;_0x1848e8[_0x1297a1(0x235)]&&(console[_0x1297a1(0x113)](_0x1297a1(0x1f7)+_0x1848e8[_0x1297a1(0x28f)]),console[_0x1297a1(0x113)](_0x1297a1(0x2f5)+_0x46bcb9));const _0x3b504c=await withSpinner(_0x1297a1(0x255)+_0x46bcb9+_0x1297a1(0x217),()=>_0x23980a[_0x1297a1(0x159)][_0x1297a1(0x267)](_0x46bcb9),{'verbose':_0x1848e8[_0x1297a1(0x235)]}),_0x15de0d=_0x3b504c[_0x1297a1(0x209)],_0x579536=await withSpinner(_0x1297a1(0x18f)+_0x46bcb9+_0x1297a1(0x217),()=>_0x23980a['realtime']['getCurrentConfigVersion'](_0x15de0d),{'verbose':_0x1848e8[_0x1297a1(0x235)]}),_0x1d6a54=_0x579536['data'];return console['error'](_0x1297a1(0x2c3)),_0x1848e8['format']==='json'||_0x1848e8[_0x1297a1(0x19d)]===_0x1297a1(0x131)?await handleSDKOutput([_0x1d6a54],_0x1848e8):(console[_0x1297a1(0x17c)](_0x1297a1(0x284)+_0x1d6a54['id']),console['log']('audienceId:\x20'+_0x1d6a54['audienceId']),console[_0x1297a1(0x17c)](_0x1297a1(0x1f2)+_0x1d6a54[_0x1297a1(0x1eb)]),console[_0x1297a1(0x17c)](_0x1297a1(0x1f8)+_0x1d6a54[_0x1297a1(0x1ef)]),console[_0x1297a1(0x17c)](_0x1297a1(0x1e0)+_0x1d6a54[_0x1297a1(0x10a)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x300);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x2cd);async['execute'](_0xbbc8cb){const _0x571e68=a34_0xe3eda6,{options:_0x1af48a,args:_0x2a381d,tdx:_0xa88d5}=_0xbbc8cb,_0x558b6c=_0x2a381d[0x0]||_0x1af48a[_0x571e68(0x119)];if(!_0x558b6c)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20(requires\x20context)\x0a'+_0x571e68(0x1bf)),0x1;const _0x13ada1=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x558b6c+'\x27...',()=>_0xa88d5[_0x571e68(0x159)][_0x571e68(0x267)](_0x558b6c),{'verbose':_0x1af48a['verbose']}),_0xb0ec24=_0x13ada1['data'],_0x3fcd6b=await withSpinner(_0x571e68(0x117)+_0x558b6c+'\x27...',()=>_0xa88d5[_0x571e68(0x11d)][_0x571e68(0x166)](_0xb0ec24),{'verbose':_0x1af48a[_0x571e68(0x235)]}),_0x3e9d67=_0x3fcd6b[_0x571e68(0x209)];console[_0x571e68(0x113)](_0x571e68(0x21e)+_0x3e9d67[_0x571e68(0x13f)]+'\x20personalization\x20service'+(_0x3e9d67[_0x571e68(0x13f)]!==0x1?'s':''));if(_0x1af48a[_0x571e68(0x19d)]===_0x571e68(0x273)||_0x1af48a[_0x571e68(0x19d)]===_0x571e68(0x131))await handleSDKOutput(_0x3e9d67,_0x1af48a);else{if(_0x3e9d67[_0x571e68(0x13f)]===0x0)console[_0x571e68(0x17c)](_0x571e68(0x2f6)),console['error'](a34_0x427111[_0x571e68(0x23f)]('\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML'));else for(const _0xba45a2 of _0x3e9d67){console['log'](a34_0x427111['bold'](_0xba45a2['name'])+'\x20'+a34_0x427111[_0x571e68(0x18c)](_0x571e68(0x14c)+_0xba45a2['id']+')'));_0xba45a2[_0x571e68(0x16d)]&&console['log']('\x20\x20'+a34_0x427111['dim'](_0xba45a2[_0x571e68(0x16d)]));if(_0xba45a2[_0x571e68(0x175)]&&_0xba45a2['tokens'][_0x571e68(0x13f)]>0x0)for(const _0x329b1a of _0xba45a2['tokens']){const _0x1817b6=_0x329b1a['allowedIps']?.[_0x571e68(0x13f)]?_0x329b1a[_0x571e68(0x184)]['join'](',\x20'):_0x571e68(0x22d);console['log']('\x20\x20'+a34_0x427111[_0x571e68(0x23f)](_0x571e68(0x160))+'\x20'+_0x329b1a[_0x571e68(0x205)]+'\x20'+a34_0x427111[_0x571e68(0x18c)](_0x571e68(0x14c)+_0x329b1a['id']+')')),console[_0x571e68(0x17c)](_0x571e68(0x10b)+a34_0x427111[_0x571e68(0x18c)](_0x571e68(0x2ae))+'\x20'+_0x1817b6);}else console[_0x571e68(0x17c)]('\x20\x20'+a34_0x427111[_0x571e68(0x18c)](_0x571e68(0x1da)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:pz:service:create';[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x1dd);async[a34_0xe3eda6(0x116)](_0x1152de){const _0x1f6fd7=a34_0xe3eda6,{options:_0x6851b8,args:_0x41b95f,tdx:_0x454fbf}=_0x1152de,_0x466260=_0x6851b8,_0x4c8e16=_0x41b95f[0x0],_0x2956ac=_0x41b95f[0x1]||_0x6851b8[_0x1f6fd7(0x119)];if(!_0x4c8e16)return console[_0x1f6fd7(0x113)](_0x1f6fd7(0x2b8)),console[_0x1f6fd7(0x113)](_0x1f6fd7(0x120)),console[_0x1f6fd7(0x113)](_0x1f6fd7(0x2f2)),0x1;if(!_0x2956ac)return showParentSegmentNotSetError(_0x1f6fd7(0x2a0)+_0x1f6fd7(0x2f2)),0x1;const _0x5969d3=await withSpinner(_0x1f6fd7(0x255)+_0x2956ac+_0x1f6fd7(0x217),()=>_0x454fbf[_0x1f6fd7(0x159)]['resolveParentId'](_0x2956ac),{'verbose':_0x6851b8[_0x1f6fd7(0x235)]}),_0x29378f=_0x5969d3['data'],_0x45c3e8={'name':_0x4c8e16,'description':_0x466260[_0x1f6fd7(0x16d)],'public':_0x466260[_0x1f6fd7(0x24c)]},_0x3c3cc9=await withSpinner(_0x1f6fd7(0x1dc)+_0x4c8e16+'\x27...',()=>_0x454fbf['personalization'][_0x1f6fd7(0x1f9)](_0x29378f,_0x45c3e8),{'verbose':_0x6851b8[_0x1f6fd7(0x235)]}),_0x5c1088=_0x3c3cc9[_0x1f6fd7(0x209)];return console[_0x1f6fd7(0x113)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0x5c1088[_0x1f6fd7(0x205)]+'\x27\x20with\x20ID:\x20'+_0x5c1088['id']),await handleSDKOutput([_0x5c1088],_0x6851b8),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x29a);[a34_0xe3eda6(0x16d)]='Show\x20personalization\x20service\x20details';async[a34_0xe3eda6(0x116)](_0x5dd798){const _0x299254=a34_0xe3eda6,{options:_0x2d5d3c,args:_0x42a5b5,tdx:_0x51d88f}=_0x5dd798,_0x5bae75=_0x42a5b5[0x0],_0x5de407=_0x42a5b5[0x1]||_0x2d5d3c['parentSegment'];if(!_0x5bae75)return console['error'](_0x299254(0x162)),console[_0x299254(0x113)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console[_0x299254(0x113)](_0x299254(0x148)),0x1;if(!_0x5de407)return showParentSegmentNotSetError(_0x299254(0x232)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x1b2190=await withSpinner(_0x299254(0x255)+_0x5de407+'\x27...',()=>_0x51d88f['segment'][_0x299254(0x267)](_0x5de407),{'verbose':_0x2d5d3c[_0x299254(0x235)]}),_0x5eb408=_0x1b2190[_0x299254(0x209)],_0x2f4b95=await withSpinner('Fetching\x20personalization\x20service\x20\x27'+_0x5bae75+_0x299254(0x217),()=>_0x51d88f[_0x299254(0x11d)][_0x299254(0x257)](_0x5eb408,_0x5bae75),{'verbose':_0x2d5d3c[_0x299254(0x235)]}),_0x1794e5=_0x2f4b95['data'];if(_0x2d5d3c['json']||_0x2d5d3c[_0x299254(0x131)])await handleSDKOutput([_0x1794e5],_0x2d5d3c);else{console[_0x299254(0x17c)](a34_0x427111[_0x299254(0x260)](_0x1794e5[_0x299254(0x205)])+'\x20'+a34_0x427111[_0x299254(0x18c)](_0x299254(0x14c)+_0x1794e5['id']+')'));_0x1794e5[_0x299254(0x16d)]&&console[_0x299254(0x17c)]('\x20\x20'+a34_0x427111['dim'](_0x1794e5['description']));console[_0x299254(0x17c)]('\x20\x20'+a34_0x427111[_0x299254(0x23f)](_0x299254(0x206))+'\x20'+(_0x1794e5[_0x299254(0x24c)]?_0x299254(0x15c):'no'));if(_0x1794e5[_0x299254(0x175)]&&_0x1794e5[_0x299254(0x175)]['length']>0x0)for(const _0x231126 of _0x1794e5[_0x299254(0x175)]){const _0x5696b3=_0x231126[_0x299254(0x184)]?.[_0x299254(0x13f)]?_0x231126['allowedIps'][_0x299254(0x14a)](',\x20'):'any';console[_0x299254(0x17c)]('\x20\x20'+a34_0x427111[_0x299254(0x23f)]('token:')+'\x20'+_0x231126[_0x299254(0x205)]+'\x20'+a34_0x427111[_0x299254(0x18c)](_0x299254(0x14c)+_0x231126['id']+')')),console[_0x299254(0x17c)]('\x20\x20\x20\x20'+a34_0x427111[_0x299254(0x18c)](_0x299254(0x2ae))+'\x20'+_0x5696b3);}else console[_0x299254(0x17c)]('\x20\x20'+a34_0x427111[_0x299254(0x18c)]('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x1e2);['description']=a34_0xe3eda6(0x229);async[a34_0xe3eda6(0x116)](_0x5621c9){const _0x2cbeaf=a34_0xe3eda6,{options:_0x25641d,args:_0x2e6fd2,tdx:_0x2b6dcb}=_0x5621c9,_0x39b5d7=_0x2e6fd2[0x0],_0x47d641=_0x2e6fd2[0x1]||_0x25641d[_0x2cbeaf(0x119)];if(!_0x39b5d7)return console['error']('Error:\x20Service\x20ID\x20is\x20required'),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]'),console[_0x2cbeaf(0x113)](_0x2cbeaf(0x261)),0x1;if(!_0x47d641)return showParentSegmentNotSetError(_0x2cbeaf(0x2fd)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x39e1c6=await withSpinner(_0x2cbeaf(0x255)+_0x47d641+_0x2cbeaf(0x217),()=>_0x2b6dcb[_0x2cbeaf(0x159)][_0x2cbeaf(0x267)](_0x47d641),{'verbose':_0x25641d[_0x2cbeaf(0x235)]}),_0x2c4dad=_0x39e1c6['data'];return await withSpinner(_0x2cbeaf(0x1c2)+_0x39b5d7+_0x2cbeaf(0x217),()=>_0x2b6dcb[_0x2cbeaf(0x11d)][_0x2cbeaf(0x247)](_0x2c4dad,_0x39b5d7),{'verbose':_0x25641d['verbose']}),console[_0x2cbeaf(0x113)](_0x2cbeaf(0x102)+_0x39b5d7+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x143);['description']='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async[a34_0xe3eda6(0x116)](_0x47606e){const _0x346a4d=a34_0xe3eda6,{options:_0x5c2ad7,args:_0x4ac5a6,tdx:_0x45289d}=_0x47606e,_0x28dac1=_0x5c2ad7,_0x9bae12=_0x4ac5a6[0x0],_0x5ad1d1=_0x4ac5a6[0x1]||_0x5c2ad7[_0x346a4d(0x119)];if(!_0x9bae12)return console[_0x346a4d(0x113)](_0x346a4d(0x162)),console[_0x346a4d(0x113)](_0x346a4d(0x1b5)),console[_0x346a4d(0x113)](_0x346a4d(0x1cd)),0x1;if(!_0x28dac1[_0x346a4d(0x205)])return console[_0x346a4d(0x113)](_0x346a4d(0x1a9)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),0x1;if(!_0x5ad1d1)return showParentSegmentNotSetError(_0x346a4d(0x258)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x8ac946=await withSpinner(_0x346a4d(0x255)+_0x5ad1d1+_0x346a4d(0x217),()=>_0x45289d['segment'][_0x346a4d(0x267)](_0x5ad1d1),{'verbose':_0x5c2ad7['verbose']}),_0x2d3ab7=_0x8ac946['data'],_0x3686a4={'name':_0x28dac1[_0x346a4d(0x205)]};_0x28dac1[_0x346a4d(0x16d)]!==undefined&&(_0x3686a4['description']=_0x28dac1[_0x346a4d(0x16d)]);const _0x2858fc=await withSpinner('Updating\x20personalization\x20service\x20\x27'+_0x9bae12+'\x27...',()=>_0x45289d[_0x346a4d(0x11d)]['patch'](_0x2d3ab7,_0x9bae12,_0x3686a4),{'verbose':_0x5c2ad7[_0x346a4d(0x235)]}),_0x3601ef=_0x2858fc[_0x346a4d(0x209)];return console[_0x346a4d(0x113)](_0x346a4d(0x220)+_0x3601ef[_0x346a4d(0x205)]+'\x27'),await handleSDKOutput([_0x3601ef],_0x5c2ad7),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2fc);[a34_0xe3eda6(0x16d)]='Create\x20a\x20token\x20for\x20a\x20personalization\x20service';async[a34_0xe3eda6(0x116)](_0xd1760a){const _0x37d84e=a34_0xe3eda6,{options:_0x5b6db8,args:_0x145dcb,tdx:_0x29e4bf}=_0xd1760a,_0x311f23=_0x5b6db8,_0x4de745=_0x145dcb[0x0],_0x4f4eef=_0x145dcb[0x1],_0x1fd070=_0x145dcb[0x2]||_0x5b6db8[_0x37d84e(0x119)];if(!_0x4de745)return console['error'](_0x37d84e(0x2da)),console[_0x37d84e(0x113)](_0x37d84e(0x10e)),console['error'](_0x37d84e(0x251)),0x1;if(!_0x4f4eef)return console[_0x37d84e(0x113)](_0x37d84e(0x162)),console[_0x37d84e(0x113)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x37d84e(0x113)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x1fd070)return showParentSegmentNotSetError(_0x37d84e(0x16e)+_0x37d84e(0x251)),0x1;const _0x5196a0=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1fd070+'\x27...',()=>_0x29e4bf['segment'][_0x37d84e(0x267)](_0x1fd070),{'verbose':_0x5b6db8['verbose']}),_0x20b3e7=_0x5196a0[_0x37d84e(0x209)],_0x29914f={'name':_0x4de745};_0x311f23['allowedIps']&&(_0x29914f[_0x37d84e(0x184)]=_0x311f23[_0x37d84e(0x184)][_0x37d84e(0x201)](',')[_0x37d84e(0x269)](_0x2415bf=>_0x2415bf[_0x37d84e(0x26d)]()));_0x311f23['description']&&(_0x29914f['description']=_0x311f23[_0x37d84e(0x16d)]);const _0x13bd5b=await withSpinner(_0x37d84e(0x1b8)+_0x4de745+_0x37d84e(0x23a)+_0x4f4eef+_0x37d84e(0x217),()=>_0x29e4bf[_0x37d84e(0x11d)][_0x37d84e(0x130)](_0x20b3e7,_0x4f4eef,_0x29914f),{'verbose':_0x5b6db8[_0x37d84e(0x235)]}),_0x3f9ddd=_0x13bd5b[_0x37d84e(0x209)];return console['error'](_0x37d84e(0x1d7)+_0x3f9ddd[_0x37d84e(0x205)]+'\x27\x20with\x20ID:\x20'+_0x3f9ddd['id']),_0x3f9ddd['value']&&(console[_0x37d84e(0x113)](a34_0x427111[_0x37d84e(0x1ce)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0x37d84e(0x113)](a34_0x427111[_0x37d84e(0x23f)](_0x3f9ddd[_0x37d84e(0x107)])),console[_0x37d84e(0x113)]('')),await handleSDKOutput([_0x3f9ddd],_0x5b6db8),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{['name']=a34_0xe3eda6(0x1af);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x19a);async[a34_0xe3eda6(0x116)](_0x103975){const _0x5307f4=a34_0xe3eda6,{options:_0x2d6276,args:_0x352173,tdx:_0x71d2d8}=_0x103975,_0x1429ea=_0x352173[0x0],_0x104ec0=_0x352173[0x1]||_0x2d6276['parentSegment'];if(!_0x1429ea)return console['error'](_0x5307f4(0x2e6)),console[_0x5307f4(0x113)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console[_0x5307f4(0x113)](_0x5307f4(0x135)),0x1;if(!_0x104ec0)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a'+_0x5307f4(0x135)),0x1;const _0xcc6c7=await withSpinner(_0x5307f4(0x255)+_0x104ec0+_0x5307f4(0x217),()=>_0x71d2d8[_0x5307f4(0x159)]['resolveParentId'](_0x104ec0),{'verbose':_0x2d6276[_0x5307f4(0x235)]}),_0x330a06=_0xcc6c7['data'],_0x43af43=await withSpinner(_0x5307f4(0x17e),()=>_0x71d2d8[_0x5307f4(0x11d)]['list'](_0x330a06),{'verbose':_0x2d6276[_0x5307f4(0x235)]}),_0x5a0ff9=_0x43af43['data'];let _0x21c9c6;for(const _0x3946b6 of _0x5a0ff9){if(_0x3946b6['tokens']?.[_0x5307f4(0x1b7)](_0x137863=>_0x137863['id']===_0x1429ea)){_0x21c9c6=_0x3946b6['id'];break;}}if(!_0x21c9c6)return console[_0x5307f4(0x113)](_0x5307f4(0x295)+_0x1429ea+_0x5307f4(0x121)),0x1;const _0x50ba82=await withSpinner(_0x5307f4(0x1d0)+_0x1429ea+_0x5307f4(0x217),()=>_0x71d2d8[_0x5307f4(0x11d)][_0x5307f4(0x132)](_0x330a06,_0x21c9c6,_0x1429ea),{'verbose':_0x2d6276[_0x5307f4(0x235)]}),_0xa111=_0x50ba82['data'];return console[_0x5307f4(0x113)](_0x5307f4(0x28d)+(_0xa111[_0x5307f4(0x205)]||_0x1429ea)+'\x27'),await handleSDKOutput([_0xa111],_0x2d6276),0x0;}}export class PSPzListCommand extends BaseCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x25c);['description']=a34_0xe3eda6(0x2c1);async['execute'](_0x4a4693){const _0x16769a=a34_0xe3eda6,{options:_0x5a6e16,args:_0x4fdd68,tdx:_0xf9535b}=_0x4a4693,_0x5ee8b3=_0x4fdd68[0x0]||_0x5a6e16[_0x16769a(0x119)];if(!_0x5ee8b3)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20(requires\x20context)\x0a'+_0x16769a(0x1ec)),0x1;const _0x1d108e=await withSpinner(_0x16769a(0x255)+_0x5ee8b3+_0x16769a(0x217),()=>_0xf9535b[_0x16769a(0x159)][_0x16769a(0x267)](_0x5ee8b3),{'verbose':_0x5a6e16[_0x16769a(0x235)]}),_0x2e06fe=_0x1d108e[_0x16769a(0x209)],_0x36c118=await withSpinner(_0x16769a(0x146)+_0x5ee8b3+_0x16769a(0x217),()=>_0xf9535b[_0x16769a(0x11d)]['listPersonalizations'](_0x2e06fe),{'verbose':_0x5a6e16['verbose']}),_0x57925c=_0x36c118[_0x16769a(0x209)];console[_0x16769a(0x113)](_0x16769a(0x21e)+_0x57925c['length']+_0x16769a(0x2bc)+(_0x57925c['length']!==0x1?'s':''));if(_0x5a6e16[_0x16769a(0x19d)]===_0x16769a(0x273)||_0x5a6e16[_0x16769a(0x19d)]==='jsonl')await handleSDKOutput(_0x57925c,_0x5a6e16);else{if(_0x57925c[_0x16769a(0x13f)]===0x0)console['log']('No\x20personalizations\x20configured');else for(const _0x41782c of _0x57925c){console[_0x16769a(0x17c)](a34_0x427111[_0x16769a(0x260)](_0x41782c[_0x16769a(0x205)])+'\x20'+a34_0x427111[_0x16769a(0x18c)](_0x16769a(0x14c)+_0x41782c['id']+')'));_0x41782c['description']&&console['log']('\x20\x20'+a34_0x427111[_0x16769a(0x18c)](_0x41782c[_0x16769a(0x16d)]));const _0x5477c4=_0x41782c[_0x16769a(0x2ad)]?.[_0x16769a(0x13f)]||0x0;console[_0x16769a(0x17c)]('\x20\x20'+a34_0x427111[_0x16769a(0x23f)](_0x16769a(0x2aa))+'\x20'+_0x5477c4);if(_0x41782c[_0x16769a(0x2ad)]&&_0x41782c[_0x16769a(0x2ad)]['length']>0x0)for(const _0xc78a08 of _0x41782c[_0x16769a(0x2ad)]){console[_0x16769a(0x17c)](_0x16769a(0x189)+_0xc78a08[_0x16769a(0x205)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:pz:show';[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x188);async[a34_0xe3eda6(0x116)](_0xd80a68){const _0x36aa2f=a34_0xe3eda6,{options:_0x36a785,args:_0x5d7871,tdx:_0x336fa3}=_0xd80a68,_0x1283de=_0x5d7871[0x0];if(!_0x1283de)return console['error'](_0x36aa2f(0x2b2)),console[_0x36aa2f(0x113)](_0x36aa2f(0x2d5)),0x1;const _0x2981f9=await withSpinner(_0x36aa2f(0x11e)+_0x1283de+_0x36aa2f(0x217),()=>_0x336fa3[_0x36aa2f(0x11d)][_0x36aa2f(0x2e8)](_0x1283de),{'verbose':_0x36a785[_0x36aa2f(0x235)]}),_0x4af6bc=_0x2981f9[_0x36aa2f(0x209)];console[_0x36aa2f(0x113)]('✔\x20Found\x20personalization\x20\x27'+_0x4af6bc[_0x36aa2f(0x205)]+'\x27');if(_0x36a785['format']===_0x36aa2f(0x273)||_0x36a785[_0x36aa2f(0x19d)]===_0x36aa2f(0x131))await handleSDKOutput([_0x4af6bc],_0x36a785);else{console[_0x36aa2f(0x17c)](a34_0x427111[_0x36aa2f(0x260)](_0x4af6bc['name'])+'\x20'+a34_0x427111[_0x36aa2f(0x18c)](_0x36aa2f(0x14c)+_0x4af6bc['id']+')'));_0x4af6bc[_0x36aa2f(0x16d)]&&console[_0x36aa2f(0x17c)]('\x20\x20'+a34_0x427111[_0x36aa2f(0x18c)](_0x4af6bc[_0x36aa2f(0x16d)]));_0x4af6bc[_0x36aa2f(0x13b)]&&console[_0x36aa2f(0x17c)]('\x20\x20'+a34_0x427111[_0x36aa2f(0x23f)](_0x36aa2f(0x170))+'\x20'+_0x4af6bc[_0x36aa2f(0x13b)]);console['log']('\x20\x20'+a34_0x427111[_0x36aa2f(0x23f)](_0x36aa2f(0x1f5))+'\x20'+_0x4af6bc['createdAt']),console[_0x36aa2f(0x17c)]('\x20\x20'+a34_0x427111[_0x36aa2f(0x23f)](_0x36aa2f(0x17a))+'\x20'+_0x4af6bc[_0x36aa2f(0x214)]);const _0x5f3c47=_0x4af6bc[_0x36aa2f(0x2ad)]?.[_0x36aa2f(0x13f)]||0x0;console[_0x36aa2f(0x17c)]('\x20\x20'+a34_0x427111[_0x36aa2f(0x23f)]('sections:')+'\x20'+_0x5f3c47);if(_0x4af6bc[_0x36aa2f(0x2ad)]&&_0x4af6bc['sections'][_0x36aa2f(0x13f)]>0x0)for(const _0x514d6c of _0x4af6bc['sections']){console['log'](_0x36aa2f(0x10b)+a34_0x427111['bold'](_0x514d6c[_0x36aa2f(0x205)])+'\x20'+a34_0x427111[_0x36aa2f(0x18c)]('(id:\x20'+_0x514d6c['id']+')')),_0x514d6c[_0x36aa2f(0x11a)]&&(console[_0x36aa2f(0x17c)](_0x36aa2f(0x16f)+a34_0x427111[_0x36aa2f(0x23f)]('entryCriteria:')+'\x20'+_0x514d6c[_0x36aa2f(0x11a)][_0x36aa2f(0x205)]),_0x514d6c[_0x36aa2f(0x11a)][_0x36aa2f(0x1e1)]?.[_0x36aa2f(0x2a2)]&&console[_0x36aa2f(0x17c)](_0x36aa2f(0x2e1)+a34_0x427111[_0x36aa2f(0x23f)](_0x36aa2f(0x2b4))+'\x20'+_0x514d6c[_0x36aa2f(0x11a)][_0x36aa2f(0x1e1)][_0x36aa2f(0x2a2)])),_0x514d6c[_0x36aa2f(0x138)]&&console[_0x36aa2f(0x17c)](_0x36aa2f(0x16f)+a34_0x427111[_0x36aa2f(0x23f)](_0x36aa2f(0x256))+'\x20'+JSON[_0x36aa2f(0x2ef)](_0x514d6c[_0x36aa2f(0x138)])),_0x514d6c[_0x36aa2f(0x1c3)]&&console[_0x36aa2f(0x17c)](_0x36aa2f(0x16f)+a34_0x427111['cyan']('includeSensitive:')+_0x36aa2f(0x1df));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:pz:delete';['description']=a34_0xe3eda6(0x1f6);async[a34_0xe3eda6(0x116)](_0x4904c3){const _0x4b8565=a34_0xe3eda6,{options:_0x52b003,args:_0x570b45,tdx:_0x141c90}=_0x4904c3,_0x17b463=_0x570b45[0x0];if(!_0x17b463)return console['error'](_0x4b8565(0x2b2)),console[_0x4b8565(0x113)](_0x4b8565(0x265)),0x1;return await withSpinner('Deleting\x20personalization\x20\x27'+_0x17b463+_0x4b8565(0x217),()=>_0x141c90['personalization'][_0x4b8565(0x156)](_0x17b463),{'verbose':_0x52b003[_0x4b8565(0x235)]}),console[_0x4b8565(0x113)](_0x4b8565(0x238)+_0x17b463+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:pz:create';[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x11f);async[a34_0xe3eda6(0x116)](_0x24f7af){const _0x4786b1=a34_0xe3eda6,{options:_0x4ab5d0,tdx:_0xd89b67}=_0x24f7af,_0x4b12ad=_0x4ab5d0;let _0x3b30e3;if(_0x4b12ad[_0x4786b1(0x1c4)]){_0x3b30e3=await loadJSON(_0x4b12ad['file'],!![]);if(!_0x3b30e3[_0x4786b1(0x2a6)]?.[_0x4786b1(0x2a1)])return console[_0x4786b1(0x113)](_0x4786b1(0x12e)),console[_0x4786b1(0x113)](_0x4786b1(0x193)),console[_0x4786b1(0x113)]('\x20\x20\x22relationships\x22:\x20{\x20\x22parentFolder\x22:\x20{\x20\x22data\x22:\x20{\x20\x22id\x22:\x20\x22<id>\x22,\x20\x22type\x22:\x20\x22folder-segment\x22\x20}\x20}\x20}'),0x1;}else{if(!_0x4b12ad[_0x4786b1(0x205)])return console['error'](_0x4786b1(0x2f1)),console[_0x4786b1(0x113)](_0x4786b1(0x17b)),console['error'](_0x4786b1(0x187)),0x1;if(_0x4b12ad[_0x4786b1(0x16d)]===undefined)return console[_0x4786b1(0x113)](_0x4786b1(0x2b7)),console[_0x4786b1(0x113)](_0x4786b1(0x17b)),console[_0x4786b1(0x113)](_0x4786b1(0x187)),0x1;if(_0x4b12ad[_0x4786b1(0x1cf)]===undefined)return console[_0x4786b1(0x113)](_0x4786b1(0x270)),console[_0x4786b1(0x113)]('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x1052bb=_0x4b12ad[_0x4786b1(0x13b)];if(!_0x1052bb&&_0x4ab5d0[_0x4786b1(0x119)]){const _0x50acc4=await withSpinner(_0x4786b1(0x255)+_0x4ab5d0['parentSegment']+_0x4786b1(0x217),()=>_0xd89b67['segment'][_0x4786b1(0x267)](_0x4ab5d0[_0x4786b1(0x119)]),{'verbose':_0x4ab5d0[_0x4786b1(0x235)]});_0x1052bb=_0x50acc4['data'];}let _0x2f5096;_0x4b12ad[_0x4786b1(0x2ad)]&&(_0x2f5096=await loadJSON(_0x4b12ad[_0x4786b1(0x2ad)],![]));const _0x6c8f07=_0x4b12ad[_0x4786b1(0x1cf)]===_0x4786b1(0x2b6)?null:{'id':_0x4b12ad[_0x4786b1(0x1cf)],'type':_0x4786b1(0x286)};_0x3b30e3={'attributes':{'name':_0x4b12ad['name'],'description':_0x4b12ad[_0x4786b1(0x16d)]||null,..._0x1052bb!==undefined&&{'audienceId':_0x1052bb},..._0x2f5096!==undefined&&{'sections':_0x2f5096}},'relationships':{'parentFolder':{'data':_0x6c8f07}}};}const _0x14fcc6=await withSpinner(_0x4786b1(0x26c)+(_0x3b30e3[_0x4786b1(0x2ec)]?.[_0x4786b1(0x205)]??'')+_0x4786b1(0x217),()=>_0xd89b67[_0x4786b1(0x11d)]['createPersonalization'](_0x3b30e3),{'verbose':_0x4ab5d0[_0x4786b1(0x235)]}),_0x8a2ee0=_0x14fcc6[_0x4786b1(0x209)];return console[_0x4786b1(0x113)](_0x4786b1(0x2f4)+_0x8a2ee0[_0x4786b1(0x205)]+_0x4786b1(0x14d)+_0x8a2ee0['id']),await handleSDKOutput([_0x8a2ee0],_0x4ab5d0),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a34_0xe3eda6(0x205)]='ps:pz:patch';[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x24d);async[a34_0xe3eda6(0x116)](_0x23e969){const _0x5f392f=a34_0xe3eda6,{options:_0x519a46,args:_0x4dbb83}=_0x23e969,_0x2f69f1=_0x519a46,_0x36d26b=_0x4dbb83[0x0];if(!_0x36d26b)return console[_0x5f392f(0x113)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x5f392f(0x113)](_0x5f392f(0x1b6)),console[_0x5f392f(0x113)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>'),0x1;let _0x2db3e6;if(_0x2f69f1[_0x5f392f(0x1c4)])_0x2db3e6=await loadJSON(_0x2f69f1[_0x5f392f(0x1c4)],!![]);else{if(!_0x2f69f1[_0x5f392f(0x205)])return console[_0x5f392f(0x113)](_0x5f392f(0x2f1)),console[_0x5f392f(0x113)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;if(_0x2f69f1[_0x5f392f(0x16d)]===undefined)return console['error']('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x5f392f(0x113)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x1f7e9c;_0x2f69f1['sections']&&(_0x1f7e9c=await loadJSON(_0x2f69f1[_0x5f392f(0x2ad)],![])),_0x2db3e6={'attributes':{'name':_0x2f69f1[_0x5f392f(0x205)],'description':_0x2f69f1[_0x5f392f(0x16d)]||null,..._0x1f7e9c!==undefined&&{'sections':_0x1f7e9c}}};}const {tdx:_0x1abffb}=_0x23e969,_0x3d551e=await withSpinner(_0x5f392f(0x1f1)+_0x36d26b+_0x5f392f(0x217),()=>_0x1abffb[_0x5f392f(0x11d)]['patchPersonalization'](_0x36d26b,_0x2db3e6),{'verbose':_0x519a46[_0x5f392f(0x235)]}),_0x39bea4=_0x3d551e['data'];return console[_0x5f392f(0x113)](_0x5f392f(0x1ae)+_0x39bea4['name']+'\x27\x20(id:\x20'+_0x39bea4['id']+')'),await handleSDKOutput([_0x39bea4],_0x519a46),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a34_0xe3eda6(0x205)]=a34_0xe3eda6(0x2db);[a34_0xe3eda6(0x16d)]=a34_0xe3eda6(0x25d);async['execute'](_0x1e5351){const _0x4d382e=a34_0xe3eda6,{options:_0xe36990,args:_0x2b2f7c}=_0x1e5351,_0xe9d589=_0x2b2f7c[0x0]||_0xe36990['parentSegment'];if(!_0xe9d589)return showParentSegmentNotSetError(_0x4d382e(0x230)+_0x4d382e(0x196)),0x1;const _0x5273d9=resolveYamlFile(_0xe9d589);if(!existsSync(_0x5273d9))return showFileNotFoundError(_0x5273d9,_0xe9d589),0x1;let _0x1fa78d;try{_0x1fa78d=readFileSync(_0x5273d9,_0x4d382e(0x2e4));}catch(_0x410ae4){const _0xc94053=_0x410ae4 instanceof Error?_0x410ae4[_0x4d382e(0x23b)]:String(_0x410ae4);return console[_0x4d382e(0x113)]('Error\x20reading\x20file:\x20'+_0xc94053),0x1;}let _0x3b15f3;try{_0x3b15f3=parseDef(_0x1fa78d);}catch(_0x25eed8){const _0x1fbff7=_0x25eed8 instanceof Error?_0x25eed8['message']:String(_0x25eed8);return console[_0x4d382e(0x113)](a34_0x427111[_0x4d382e(0x129)]('Error\x20parsing\x20YAML:\x20'+_0x1fbff7)),0x1;}if(_0x3b15f3[_0x4d382e(0x1bd)]&&_0x3b15f3['personalization_services'][_0x4d382e(0x13f)]>0x0)return console['error'](a34_0x427111[_0x4d382e(0x1ce)]('⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20'+_0x5273d9)),console[_0x4d382e(0x113)](a34_0x427111['dim'](_0x4d382e(0x139)+_0x3b15f3[_0x4d382e(0x1bd)][_0x4d382e(0x13f)]+'\x20service(s)\x20configured')),0x1;!_0x3b15f3['realtime']&&(_0x3b15f3[_0x4d382e(0x2d6)]={'events':[{'name':_0x4d382e(0x20d),'source_table':_0x4d382e(0x288)}],'attributes':[{'name':_0x4d382e(0x1e6),'type':_0x4d382e(0x1f0)}],'id_stitching':{'primary_key':_0x3b15f3[_0x4d382e(0x2ff)]['table']===_0x4d382e(0x219)?_0x4d382e(0x23c):_0x4d382e(0x272)}});_0x3b15f3[_0x4d382e(0x1bd)]=[{'name':'My\x20Service','description':'Personalization\x20service\x20description','trigger_event':_0x4d382e(0x20d),'sections':[{'name':_0x4d382e(0x226),'criteria':_0x4d382e(0x27e),'attributes':[_0x4d382e(0x1e6)]}]}];const _0xfca570=serializeDef(_0x3b15f3);return writeFileSync(_0x5273d9,_0xfca570,_0x4d382e(0x2e4)),console[_0x4d382e(0x113)](a34_0x427111[_0x4d382e(0x276)]('✔')+_0x4d382e(0x298)+a34_0x427111[_0x4d382e(0x23f)](_0x5273d9)),(!_0x3b15f3['realtime']||_0x1fa78d['indexOf']('realtime:')===-0x1)&&console['error'](a34_0x427111[_0x4d382e(0x276)]('✔')+_0x4d382e(0x1ea)),console[_0x4d382e(0x113)]('\x0a'+a34_0x427111[_0x4d382e(0x18c)](_0x4d382e(0x125))),console[_0x4d382e(0x113)]('\x20\x201.\x20Edit\x20'+_0x5273d9+'\x20to\x20configure\x20your\x20personalization\x20service'),console[_0x4d382e(0x113)](_0x4d382e(0x252)+a34_0x427111['dim'](_0x4d382e(0x124)+_0xe9d589)+'\x20to\x20push\x20the\x20configuration'),0x0;}}