@treasuredata/tdx 2026.6.0 → 2026.6.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 (248) 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.js +1 -1
  12. package/dist/commands/cas-command.js +1 -1
  13. package/dist/commands/cas-segment-command.js +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/claude-command.js +1 -1
  16. package/dist/commands/claude-statusline-command.js +1 -1
  17. package/dist/commands/claude-usage-command.js +1 -1
  18. package/dist/commands/command.js +1 -1
  19. package/dist/commands/connection-command.js +1 -1
  20. package/dist/commands/databases.js +1 -1
  21. package/dist/commands/delivery-command.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/engage-campaign-pull-command.js +1 -1
  24. package/dist/commands/engage-campaign-push-command.js +1 -1
  25. package/dist/commands/engage-campaign-validate-command.js +1 -1
  26. package/dist/commands/engage-command.js +1 -1
  27. package/dist/commands/engage-template-pull-command.js +1 -1
  28. package/dist/commands/engage-template-push-command.js +1 -1
  29. package/dist/commands/engage-template-validate-command.js +1 -1
  30. package/dist/commands/job-command.js +1 -1
  31. package/dist/commands/journey-command.js +1 -1
  32. package/dist/commands/journey-validate-command.js +1 -1
  33. package/dist/commands/llm-command.js +1 -1
  34. package/dist/commands/mcp-command.js +1 -1
  35. package/dist/commands/parent-segment-command.js +1 -1
  36. package/dist/commands/policy-command.js +1 -1
  37. package/dist/commands/profile-command.js +1 -1
  38. package/dist/commands/profiles-command.js +1 -1
  39. package/dist/commands/query-command.js +1 -1
  40. package/dist/commands/schedule-command.js +1 -1
  41. package/dist/commands/segment-command.js +1 -1
  42. package/dist/commands/segment-create-command.js +1 -1
  43. package/dist/commands/segment-fields-command.js +1 -1
  44. package/dist/commands/segment-pull-command.js +1 -1
  45. package/dist/commands/segment-push-command.js +1 -1
  46. package/dist/commands/segment-update-command.js +1 -1
  47. package/dist/commands/segment-use-command.js +1 -1
  48. package/dist/commands/segment-validate-command.js +1 -1
  49. package/dist/commands/segments.js +1 -1
  50. package/dist/commands/show.js +1 -1
  51. package/dist/commands/status-command.js +1 -1
  52. package/dist/commands/table-deleted.js +1 -1
  53. package/dist/commands/tables.js +1 -1
  54. package/dist/commands/unset-command.js +1 -1
  55. package/dist/commands/upgrade-command.js +1 -1
  56. package/dist/commands/use-command.js +1 -1
  57. package/dist/commands/user-command.js +1 -1
  58. package/dist/commands/work-command.js +1 -1
  59. package/dist/commands/workflow-command.d.ts +2 -2
  60. package/dist/commands/workflow-command.d.ts.map +1 -1
  61. package/dist/commands/workflow-command.js +1 -1
  62. package/dist/commands/workflow-command.js.map +1 -1
  63. package/dist/core/auth.js +1 -1
  64. package/dist/core/command-output.js +1 -1
  65. package/dist/core/config.js +1 -1
  66. package/dist/core/connection-cache.js +1 -1
  67. package/dist/core/constants.js +1 -1
  68. package/dist/core/credential-cache.js +1 -1
  69. package/dist/core/global-context.js +1 -1
  70. package/dist/core/keychain.js +1 -1
  71. package/dist/core/oauth-keychain.js +1 -1
  72. package/dist/core/oauth.js +1 -1
  73. package/dist/core/profile.js +1 -1
  74. package/dist/core/project-config.js +1 -1
  75. package/dist/core/session.js +1 -1
  76. package/dist/core/user-cache.js +1 -1
  77. package/dist/core/version.js +1 -1
  78. package/dist/index.js +1 -1
  79. package/dist/mcp/server.js +1 -1
  80. package/dist/mcp/tools/index.js +1 -1
  81. package/dist/mcp/tools/tdx-run.js +1 -1
  82. package/dist/mcp/tools/tdx-search.js +1 -1
  83. package/dist/mcp/tools/work-create-item.js +1 -1
  84. package/dist/mcp/utils.js +1 -1
  85. package/dist/proxy/claude-usage-tracker.js +1 -1
  86. package/dist/proxy/passthrough-server.js +1 -1
  87. package/dist/proxy/sse-usage-parser.js +1 -1
  88. package/dist/sdk/agent/agent-config.js +1 -1
  89. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  90. package/dist/sdk/agent/agent-yaml.js +1 -1
  91. package/dist/sdk/agent/test/evaluator.js +1 -1
  92. package/dist/sdk/agent/test/executor.js +1 -1
  93. package/dist/sdk/agent/test/index.js +1 -1
  94. package/dist/sdk/agent/test/output.js +1 -1
  95. package/dist/sdk/agent/test/parser.js +1 -1
  96. package/dist/sdk/agent/tool-target-registry.js +1 -1
  97. package/dist/sdk/api.js +1 -1
  98. package/dist/sdk/cas/cas-api-client.js +1 -1
  99. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  100. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  101. package/dist/sdk/cas/index.js +1 -1
  102. package/dist/sdk/cas/pull-workflow.js +1 -1
  103. package/dist/sdk/cas/push-workflow.js +1 -1
  104. package/dist/sdk/client/cdp-api-client.js +1 -1
  105. package/dist/sdk/client/cdp-api-client.js.map +1 -1
  106. package/dist/sdk/client/delivery-api-client.js +1 -1
  107. package/dist/sdk/client/endpoints.js +1 -1
  108. package/dist/sdk/client/engage-api-client.js +1 -1
  109. package/dist/sdk/client/http-client.js +1 -1
  110. package/dist/sdk/client/llm-api-client.js +1 -1
  111. package/dist/sdk/client/oauth-refresh.js +1 -1
  112. package/dist/sdk/client/rate-limiter.js +1 -1
  113. package/dist/sdk/client/td-api-client.js +1 -1
  114. package/dist/sdk/client/trino-api-client.js +1 -1
  115. package/dist/sdk/client/workflow-client.d.ts +23 -1
  116. package/dist/sdk/client/workflow-client.d.ts.map +1 -1
  117. package/dist/sdk/client/workflow-client.js +1 -1
  118. package/dist/sdk/client/workflow-client.js.map +1 -1
  119. package/dist/sdk/connection-validator.js +1 -1
  120. package/dist/sdk/connection.js +1 -1
  121. package/dist/sdk/delivery.js +1 -1
  122. package/dist/sdk/engage/campaign-pull.js +1 -1
  123. package/dist/sdk/engage/campaign-push.js +1 -1
  124. package/dist/sdk/engage/campaign-validator.js +1 -1
  125. package/dist/sdk/engage/campaign-yaml.js +1 -1
  126. package/dist/sdk/engage/template-pull.js +1 -1
  127. package/dist/sdk/engage/template-push.js +1 -1
  128. package/dist/sdk/engage/template-validator.js +1 -1
  129. package/dist/sdk/engage/template-yaml.js +1 -1
  130. package/dist/sdk/engage/types/campaign-def.js +1 -1
  131. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  132. package/dist/sdk/engage/types/template-schema.js +1 -1
  133. package/dist/sdk/engage.js +1 -1
  134. package/dist/sdk/errors.js +1 -1
  135. package/dist/sdk/index.js +1 -1
  136. package/dist/sdk/io/index.js +1 -1
  137. package/dist/sdk/io/node-filesystem.js +1 -1
  138. package/dist/sdk/job.js +1 -1
  139. package/dist/sdk/journey.js +1 -1
  140. package/dist/sdk/llm/chat-cache.js +1 -1
  141. package/dist/sdk/llm/index.js +1 -1
  142. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  143. package/dist/sdk/llm/model-factors.d.ts +8 -4
  144. package/dist/sdk/llm/model-factors.d.ts.map +1 -1
  145. package/dist/sdk/llm/model-factors.js +1 -1
  146. package/dist/sdk/llm/model-factors.js.map +1 -1
  147. package/dist/sdk/llm/user-settings.js +1 -1
  148. package/dist/sdk/personalization.js +1 -1
  149. package/dist/sdk/policy.js +1 -1
  150. package/dist/sdk/query/deleted-table-validation.js +1 -1
  151. package/dist/sdk/query/index.js +1 -1
  152. package/dist/sdk/query/sql-parser.js +1 -1
  153. package/dist/sdk/realtime.js +1 -1
  154. package/dist/sdk/schedule.js +1 -1
  155. package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
  156. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  157. package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
  158. package/dist/sdk/segment/fields-display.js +1 -1
  159. package/dist/sdk/segment/file-discovery.js +1 -1
  160. package/dist/sdk/segment/journey-utils.js +1 -1
  161. package/dist/sdk/segment/journey-validator.js +1 -1
  162. package/dist/sdk/segment/journey-yaml.js +1 -1
  163. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  164. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  165. package/dist/sdk/segment/pull-workflow.js +1 -1
  166. package/dist/sdk/segment/push-recovery.js +1 -1
  167. package/dist/sdk/segment/push-workflow.js +1 -1
  168. package/dist/sdk/segment/resolution-context.js +1 -1
  169. package/dist/sdk/segment/segment-path-parser.js +1 -1
  170. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  171. package/dist/sdk/segment/segment-validator.js +1 -1
  172. package/dist/sdk/segment/target-resolution.js +1 -1
  173. package/dist/sdk/segment/tdx-config.js +1 -1
  174. package/dist/sdk/segment/types/activation-schema.js +1 -1
  175. package/dist/sdk/segment/types/journey-def.js +1 -1
  176. package/dist/sdk/segment/types/journey-schema.js +1 -1
  177. package/dist/sdk/segment/types/segment-def.js +1 -1
  178. package/dist/sdk/segment/types/segment-schema.js +1 -1
  179. package/dist/sdk/segment/validate-files.js +1 -1
  180. package/dist/sdk/segment/yaml-validator.js +1 -1
  181. package/dist/sdk/segment.js +1 -1
  182. package/dist/sdk/types/cdp.d.ts +4 -3
  183. package/dist/sdk/types/cdp.d.ts.map +1 -1
  184. package/dist/sdk/types/index.js +1 -1
  185. package/dist/sdk/types/progress.js +1 -1
  186. package/dist/sdk/types/workflow.d.ts +1 -1
  187. package/dist/sdk/types/workflow.d.ts.map +1 -1
  188. package/dist/sdk/types/workspace.js +1 -1
  189. package/dist/sdk/user.js +1 -1
  190. package/dist/sdk/util/format-detector.js +1 -1
  191. package/dist/sdk/util/formatters.js +1 -1
  192. package/dist/sdk/util/index.js +1 -1
  193. package/dist/sdk/util/paginate.js +1 -1
  194. package/dist/sdk/util/tree-formatter.js +1 -1
  195. package/dist/sdk/workflow/archive-validation.js +1 -1
  196. package/dist/sdk/workflow/clone-workflow.js +1 -1
  197. package/dist/sdk/workflow/index.d.ts +23 -2
  198. package/dist/sdk/workflow/index.d.ts.map +1 -1
  199. package/dist/sdk/workflow/index.js +1 -1
  200. package/dist/sdk/workflow/index.js.map +1 -1
  201. package/dist/sdk/workflow/pull-workflow.js +1 -1
  202. package/dist/sdk/workflow/push-workflow.d.ts +4 -0
  203. package/dist/sdk/workflow/push-workflow.d.ts.map +1 -1
  204. package/dist/sdk/workflow/push-workflow.js +1 -1
  205. package/dist/sdk/workflow/push-workflow.js.map +1 -1
  206. package/dist/sdk/workflow/task-graph.js +1 -1
  207. package/dist/sdk/workflow/tdx-config.js +1 -1
  208. package/dist/sdk/workflow/workflow-utils.js +1 -1
  209. package/dist/sdk/workspace/access-tracker.js +1 -1
  210. package/dist/sdk/workspace/frontmatter.js +1 -1
  211. package/dist/sdk/workspace/git.js +1 -1
  212. package/dist/sdk/workspace/index.js +1 -1
  213. package/dist/sdk/workspace/templates.js +1 -1
  214. package/dist/sdk/workspace/weekly.js +1 -1
  215. package/dist/sdk/workspace/wikilinks.js +1 -1
  216. package/dist/test-utils/command-runner.js +1 -1
  217. package/dist/test-utils/factories.js +1 -1
  218. package/dist/test-utils/fixtures.js +1 -1
  219. package/dist/test-utils/http-mock.js +1 -1
  220. package/dist/test-utils/index.js +1 -1
  221. package/dist/utils/async.js +1 -1
  222. package/dist/utils/colors.js +1 -1
  223. package/dist/utils/diff.js +1 -1
  224. package/dist/utils/file-permissions.js +1 -1
  225. package/dist/utils/file-reader.js +1 -1
  226. package/dist/utils/github-releases.js +1 -1
  227. package/dist/utils/global-cache.js +1 -1
  228. package/dist/utils/json-loader.js +1 -1
  229. package/dist/utils/local-cache.js +1 -1
  230. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  231. package/dist/utils/logger/formatters/index.js +1 -1
  232. package/dist/utils/logger/handlers/console-handler.js +1 -1
  233. package/dist/utils/logger/handlers/file-handler.js +1 -1
  234. package/dist/utils/logger/handlers/index.js +1 -1
  235. package/dist/utils/logger/handlers/null-handler.js +1 -1
  236. package/dist/utils/logger/index.js +1 -1
  237. package/dist/utils/logger/logger.js +1 -1
  238. package/dist/utils/logger/types.js +1 -1
  239. package/dist/utils/option-validation.js +1 -1
  240. package/dist/utils/process.js +1 -1
  241. package/dist/utils/prompt.js +1 -1
  242. package/dist/utils/spinner.js +1 -1
  243. package/dist/utils/sse-parser.js +1 -1
  244. package/dist/utils/string-utils.js +1 -1
  245. package/dist/utils/table-ref-parser.js +1 -1
  246. package/dist/utils/tdx-logger.js +1 -1
  247. package/dist/utils/version-check.js +1 -1
  248. package/package.json +1 -1
@@ -1 +1 @@
1
- function a31_0x5995(_0xb8d132,_0x4b64f1){_0xb8d132=_0xb8d132-0x1e9;const _0x3f6fd2=a31_0x3f6f();let _0x5995b3=_0x3f6fd2[_0xb8d132];return _0x5995b3;}const a31_0x461edb=a31_0x5995;(function(_0x509e95,_0x538dae){const _0x40dadc=a31_0x5995,_0x380442=_0x509e95();while(!![]){try{const _0x475c4b=parseInt(_0x40dadc(0x1f0))/0x1*(parseInt(_0x40dadc(0x2fa))/0x2)+-parseInt(_0x40dadc(0x218))/0x3*(parseInt(_0x40dadc(0x204))/0x4)+-parseInt(_0x40dadc(0x21a))/0x5+-parseInt(_0x40dadc(0x1ff))/0x6*(parseInt(_0x40dadc(0x311))/0x7)+-parseInt(_0x40dadc(0x1f5))/0x8*(parseInt(_0x40dadc(0x295))/0x9)+parseInt(_0x40dadc(0x3cc))/0xa+parseInt(_0x40dadc(0x242))/0xb;if(_0x475c4b===_0x538dae)break;else _0x380442['push'](_0x380442['shift']());}catch(_0x1d23cc){_0x380442['push'](_0x380442['shift']());}}}(a31_0x3f6f,0x4b718));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0xccace1 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 a31_0x4004bd 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=a31_0x461edb(0x364),LEGACY_PARENT_SEGMENT_DIR=a31_0x461edb(0x266);function openBrowser(_0x2dc45c){const _0x44a136=a31_0x461edb,_0x5bfc05=process[_0x44a136(0x200)],_0x3c6287=_0x5bfc05===_0x44a136(0x2dc)?'open':_0x5bfc05===_0x44a136(0x33d)?_0x44a136(0x283):_0x44a136(0x2e6);spawn(_0x3c6287,[_0x2dc45c],{'detached':!![],'stdio':_0x44a136(0x370)})[_0x44a136(0x30d)]();}function migrateLegacyDirectory(){const _0x49455d=a31_0x461edb;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x89fb8a=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x89fb8a[_0x49455d(0x2da)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a31_0x4004bd['yellow'](_0x49455d(0x3b5)+LEGACY_PARENT_SEGMENT_DIR+'/\x20and\x20'+PARENT_SEGMENT_DIR+_0x49455d(0x3c8))),console[_0x49455d(0x21e)](a31_0x4004bd['dim']('\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x49455d(0x35c))),![];console[_0x49455d(0x21e)](a31_0x4004bd[_0x49455d(0x3c6)]('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x49455d(0x2fb)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x49455d(0x21e)](a31_0x4004bd[_0x49455d(0x224)](_0x49455d(0x26f)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x2737fc){const _0x1bf5cb=_0x2737fc instanceof Error?_0x2737fc['message']:String(_0x2737fc);return console[_0x49455d(0x21e)](a31_0x4004bd[_0x49455d(0x328)](_0x49455d(0x2d5)+_0x1bf5cb+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x461edb(0x1f9)](_0x344aff){const _0xefafbd=a31_0x461edb;return migrateLegacyDirectory(),super[_0xefafbd(0x1f9)](_0x344aff);}}function resolveYamlFile(_0x4f74ee){const _0x1513b6=a31_0x461edb;if(_0x4f74ee[_0x1513b6(0x335)]('.yml')||_0x4f74ee[_0x1513b6(0x335)]('.yaml'))return _0x4f74ee;return a31_0xccace1[_0x1513b6(0x375)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x4f74ee)+_0x1513b6(0x36d));}function formatProgressMessage(_0x6438db){const _0x597112=a31_0x461edb,_0x5b8681=_0x6438db[_0x597112(0x27b)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x5b8681){const [,_0x588201,_0x9bfd49,_0x22022b='']=_0x5b8681;return a31_0x4004bd[_0x597112(0x32a)](_0x588201+':')+'\x20'+_0x9bfd49+a31_0x4004bd['dim'](_0x22022b);}return a31_0x4004bd[_0x597112(0x32a)](_0x6438db);}function showFileNotFoundError(_0x36c745,_0x55668d){const _0x14c025=a31_0x461edb;console[_0x14c025(0x21e)](a31_0x4004bd[_0x14c025(0x328)](_0x14c025(0x3a0)+_0x36c745+'\x0a')),console[_0x14c025(0x21e)](a31_0x4004bd['cyan']('Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20'+_0x55668d+'`\x20to\x20download\x20the\x20configuration\x20first'));}function displayRealtimeValidation(_0x4442ab){const _0x480c14=a31_0x461edb;if(!_0x4442ab[_0x480c14(0x27a)])return;const _0x2258c1=_0x4442ab['realtime'],_0x443b16=_0x2258c1[_0x480c14(0x318)]?a31_0x4004bd[_0x480c14(0x224)](_0x480c14(0x2db)):a31_0x4004bd['yellow'](_0x480c14(0x3de));console[_0x480c14(0x21e)]('\x0a'+a31_0x4004bd[_0x480c14(0x32a)]('RT\x202.0:')+'\x20'+_0x443b16);if(_0x2258c1['events']&&_0x2258c1['events'][_0x480c14(0x248)]>0x0){console['error']('\x20\x20'+a31_0x4004bd[_0x480c14(0x32a)](_0x480c14(0x26d))+'\x20'+_0x2258c1['events'][_0x480c14(0x248)]+_0x480c14(0x253));for(const _0x10f86e of _0x2258c1['events']){const _0x3aedd1=_0x10f86e[_0x480c14(0x2f3)]===![]?a31_0x4004bd[_0x480c14(0x328)]('✘'):a31_0x4004bd[_0x480c14(0x224)]('✔');console[_0x480c14(0x21e)](_0x480c14(0x2aa)+_0x3aedd1+'\x20'+_0x10f86e['name']),_0x10f86e[_0x480c14(0x38e)]&&console['error'](_0x480c14(0x332)+a31_0x4004bd[_0x480c14(0x328)](_0x10f86e[_0x480c14(0x38e)]));}}if(_0x2258c1[_0x480c14(0x3bc)]&&_0x2258c1[_0x480c14(0x3bc)][_0x480c14(0x248)]>0x0){console[_0x480c14(0x21e)]('\x20\x20'+a31_0x4004bd['dim'](_0x480c14(0x2b3))+'\x20'+_0x2258c1[_0x480c14(0x3bc)][_0x480c14(0x248)]+'\x20configured');for(const _0x63918b of _0x2258c1[_0x480c14(0x3bc)]){const _0x4d6e8e=_0x63918b[_0x480c14(0x2f9)]?a31_0x4004bd['green']('✔'):a31_0x4004bd['red']('✘');console['error'](_0x480c14(0x2aa)+_0x4d6e8e+'\x20'+_0x63918b['name']+'\x20'+a31_0x4004bd[_0x480c14(0x32a)]('('+_0x63918b['type']+')'));}}if(_0x2258c1[_0x480c14(0x361)]){const _0x5131a0=_0x2258c1[_0x480c14(0x361)][_0x480c14(0x250)]?.[_0x480c14(0x248)]?_0x480c14(0x2bb)+_0x2258c1['idStitching'][_0x480c14(0x250)][_0x480c14(0x375)](',\x20')+']':'';console['error']('\x20\x20'+a31_0x4004bd['dim']('ID\x20Stitching:')+'\x20'+_0x2258c1[_0x480c14(0x361)][_0x480c14(0x1fa)]+_0x5131a0);}if(_0x2258c1[_0x480c14(0x2d2)]&&_0x2258c1[_0x480c14(0x2d2)]['length']>0x0){console[_0x480c14(0x21e)]('\x20\x20'+a31_0x4004bd[_0x480c14(0x32a)](_0x480c14(0x38a))+'\x20'+_0x2258c1[_0x480c14(0x2d2)][_0x480c14(0x248)]+_0x480c14(0x267)+(_0x2258c1[_0x480c14(0x2d2)]['length']!==0x1?'s':''));for(const _0x3a2694 of _0x2258c1[_0x480c14(0x2d2)]){console['error']('\x20\x20\x20\x20-\x20'+_0x3a2694[_0x480c14(0x3f3)]);}}}function showParentSegmentNotSetError(_0xf84187){const _0x4a7127=a31_0x461edb;console[_0x4a7127(0x21e)](a31_0x4004bd[_0x4a7127(0x3c6)](_0x4a7127(0x3a6))),console[_0x4a7127(0x21e)](_0xf84187);}export class ParentSegmentListCommand extends BaseCommand{['name']=a31_0x461edb(0x32c);[a31_0x461edb(0x395)]=a31_0x461edb(0x2ee);async[a31_0x461edb(0x1f4)](_0x3469cc){const _0x8f4d42=a31_0x461edb,{options:_0x1fc3f8,args:_0x296917,tdx:_0x3b6816}=_0x3469cc,_0x29f90a=_0x296917[0x0];_0x1fc3f8[_0x8f4d42(0x207)]&&(console[_0x8f4d42(0x21e)](_0x8f4d42(0x377)+_0x1fc3f8[_0x8f4d42(0x2ba)]),_0x29f90a&&console['error'](_0x8f4d42(0x297)+_0x29f90a));const _0x2042ac=await withSpinner(_0x29f90a?'Listing\x20parent\x20segments\x20matching\x20\x27'+_0x29f90a+'\x27...':_0x8f4d42(0x346),()=>_0x3b6816[_0x8f4d42(0x33f)][_0x8f4d42(0x2b4)](),{'verbose':_0x1fc3f8['verbose']});let _0x2a38e6=_0x2042ac[_0x8f4d42(0x3e3)];if(_0x29f90a){const _0xf4ef7c=_0x29f90a['replace'](/[.+^${}()|[\]\\]/g,_0x8f4d42(0x302))[_0x8f4d42(0x3fb)](/\*/g,'.*')['replace'](/\?/g,'.'),_0xbae803=new RegExp('^'+_0xf4ef7c+'$','i');_0x2a38e6=_0x2a38e6[_0x8f4d42(0x225)](_0x26c2c3=>_0xbae803[_0x8f4d42(0x280)](_0x26c2c3['attributes'][_0x8f4d42(0x3f3)]));}_0x2a38e6[_0x8f4d42(0x2cb)]((_0x2a63fd,_0x594c87)=>_0x2a63fd[_0x8f4d42(0x3bc)][_0x8f4d42(0x3f3)][_0x8f4d42(0x313)](_0x594c87[_0x8f4d42(0x3bc)][_0x8f4d42(0x3f3)])),console[_0x8f4d42(0x21e)]('✔\x20Found\x20'+_0x2a38e6[_0x8f4d42(0x248)]+_0x8f4d42(0x2c5)+(_0x2a38e6[_0x8f4d42(0x248)]!==0x1?'s':''));const _0x41b176=_0x5dbec0=>{const _0x7e4aa2=_0x8f4d42;return getConsoleNextUrl(_0x1fc3f8[_0x7e4aa2(0x2ba)],_0x7e4aa2(0x23a)+_0x5dbec0);};if(_0x1fc3f8[_0x8f4d42(0x215)]==='json'||_0x1fc3f8['format']==='jsonl'){const _0x76a7b6=_0x2a38e6['map'](_0x42e9ec=>({..._0x42e9ec,'url':_0x41b176(_0x42e9ec['id'])}));await handleSDKOutput(_0x76a7b6,_0x1fc3f8);}else{if(_0x2a38e6[_0x8f4d42(0x248)]===0x0)_0x29f90a?console['log'](_0x8f4d42(0x319)+_0x29f90a):console[_0x8f4d42(0x220)](_0x8f4d42(0x245));else for(const _0x5c2b03 of _0x2a38e6){const _0x5680fc=_0x5c2b03[_0x8f4d42(0x3bc)][_0x8f4d42(0x3ed)]?a31_0x4004bd[_0x8f4d42(0x32a)]('\x20('+formatRows(_0x5c2b03[_0x8f4d42(0x3bc)][_0x8f4d42(0x3ed)])+')'):'',_0x378bb3=hyperlink(_0x5c2b03[_0x8f4d42(0x3bc)][_0x8f4d42(0x3f3)],_0x41b176(_0x5c2b03['id']));console['log'](_0x8f4d42(0x31c)+_0x378bb3+_0x5680fc);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{['name']=a31_0x461edb(0x22b);[a31_0x461edb(0x395)]=a31_0x461edb(0x345);async['execute'](_0x173de4){const _0x2bec70=a31_0x461edb,{options:_0x305aea,args:_0x4607b6,tdx:_0xc87f84}=_0x173de4;console[_0x2bec70(0x21e)](_0x2bec70(0x254)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x2bec70(0x3a8));const _0x252208=_0x305aea;if(_0x4607b6[_0x2bec70(0x248)]===0x0)return console[_0x2bec70(0x21e)](a31_0x4004bd['red'](_0x2bec70(0x3d5))),console['error'](_0x2bec70(0x3ad)),0x1;const _0x2f788c=_0x4607b6[0x0];if(!_0x252208[_0x2bec70(0x269)]||!_0x252208[_0x2bec70(0x1eb)])return console['error']('Error:\x20--database\x20and\x20--table\x20are\x20required'),console[_0x2bec70(0x21e)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x252208[_0x2bec70(0x207)]&&(console[_0x2bec70(0x21e)](_0x2bec70(0x377)+_0x252208[_0x2bec70(0x2ba)]),console[_0x2bec70(0x21e)](_0x2bec70(0x396)+_0x2f788c),console['error']('Database:\x20'+_0x252208['database']),console['error'](_0x2bec70(0x238)+_0x252208['table']));const _0x10009d=await loadJSONFromOptions(_0x252208[_0x2bec70(0x3bc)],_0x252208['attributesFile']),_0x9622bb=await loadJSONFromOptions(_0x252208['behaviors'],_0x252208[_0x2bec70(0x31e)]),_0x1f968d=await loadJSONFromOptions(_0x252208[_0x2bec70(0x292)],_0x252208[_0x2bec70(0x2ec)]),_0x3c0912={'name':_0x2f788c,'description':_0x252208[_0x2bec70(0x395)],'scheduleType':_0x252208[_0x2bec70(0x210)],'scheduleOption':_0x252208[_0x2bec70(0x3eb)],'timezone':_0x252208[_0x2bec70(0x2ab)],'master':{'parentDatabaseName':_0x252208[_0x2bec70(0x269)],'parentTableName':_0x252208[_0x2bec70(0x1eb)]},'attributes':_0x10009d,'behaviors':_0x9622bb,'customerGroup':_0x1f968d},_0x467ec9=await withSpinner('Creating\x20parent\x20segment\x20\x27'+_0x2f788c+_0x2bec70(0x3a7),()=>_0xc87f84[_0x2bec70(0x33f)][_0x2bec70(0x3d3)](_0x3c0912),{'verbose':_0x305aea[_0x2bec70(0x207)]}),_0x40d9d4=_0x467ec9[_0x2bec70(0x3e3)];return console['error'](_0x2bec70(0x2b2)+_0x40d9d4[_0x2bec70(0x3f3)]+_0x2bec70(0x382)+_0x40d9d4['id']),await handleSDKOutput([_0x40d9d4],_0x305aea),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a31_0x461edb(0x2e2);['description']=a31_0x461edb(0x374);async['execute'](_0x298b9c){const _0xb2ab06=a31_0x461edb,{options:_0x1679b5,args:_0x363134,tdx:_0x535a7e}=_0x298b9c;console[_0xb2ab06(0x21e)](_0xb2ab06(0x36e)+_0xb2ab06(0x271)+_0xb2ab06(0x3a8));const _0x61110c=_0x1679b5;if(_0x363134[_0xb2ab06(0x248)]===0x0)return console[_0xb2ab06(0x21e)](a31_0x4004bd[_0xb2ab06(0x328)](_0xb2ab06(0x3d5))),console[_0xb2ab06(0x21e)](_0xb2ab06(0x30a)),0x1;const _0x31fdfe=_0x363134[0x0];_0x61110c[_0xb2ab06(0x207)]&&(console[_0xb2ab06(0x21e)]('Site:\x20'+_0x61110c[_0xb2ab06(0x2ba)]),console[_0xb2ab06(0x21e)](_0xb2ab06(0x3e7)+_0x31fdfe));const _0x286abc=await withSpinner(_0xb2ab06(0x30f)+_0x31fdfe+_0xb2ab06(0x3a7),()=>_0x535a7e[_0xb2ab06(0x33f)][_0xb2ab06(0x3b8)](_0x31fdfe),{'verbose':_0x61110c[_0xb2ab06(0x207)]}),_0x34b6bf=_0x286abc[_0xb2ab06(0x3e3)],_0x3e1b31=await loadJSONFromOptions(_0x61110c[_0xb2ab06(0x25e)],_0x61110c[_0xb2ab06(0x3d1)]),_0x510613=await loadJSONFromOptions(_0x61110c['addBehaviors'],_0x61110c[_0xb2ab06(0x303)]),_0x128272={'name':_0x34b6bf[_0xb2ab06(0x3f3)],'description':_0x61110c[_0xb2ab06(0x395)]!==undefined?_0x61110c[_0xb2ab06(0x395)]:_0x34b6bf[_0xb2ab06(0x395)],'scheduleType':_0x61110c[_0xb2ab06(0x210)]!==undefined?_0x61110c[_0xb2ab06(0x210)]:_0x34b6bf[_0xb2ab06(0x210)],'scheduleOption':_0x61110c[_0xb2ab06(0x3eb)]!==undefined?_0x61110c[_0xb2ab06(0x3eb)]:_0x34b6bf[_0xb2ab06(0x3eb)],'timezone':_0x61110c[_0xb2ab06(0x2ab)]!==undefined?_0x61110c[_0xb2ab06(0x2ab)]:_0x34b6bf[_0xb2ab06(0x2ab)],'master':_0x34b6bf[_0xb2ab06(0x286)],'attributes':_0x3e1b31?[..._0x34b6bf[_0xb2ab06(0x3bc)]||[],..._0x3e1b31]:_0x34b6bf[_0xb2ab06(0x3bc)],'behaviors':_0x510613?[..._0x34b6bf[_0xb2ab06(0x39b)]||[],..._0x510613]:_0x34b6bf[_0xb2ab06(0x39b)],'customerGroup':_0x34b6bf['customerGroup']},_0x59456d=await withSpinner(_0xb2ab06(0x23d)+_0x31fdfe+'\x27...',()=>_0x535a7e[_0xb2ab06(0x33f)][_0xb2ab06(0x260)](_0x31fdfe,_0x128272),{'verbose':_0x61110c[_0xb2ab06(0x207)]}),_0x20857f=_0x59456d[_0xb2ab06(0x3e3)];return console[_0xb2ab06(0x21e)](_0xb2ab06(0x2e7)+_0x20857f[_0xb2ab06(0x3f3)]+'\x27'),await handleSDKOutput([_0x20857f],_0x61110c),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x29d);['description']=a31_0x461edb(0x35f);async[a31_0x461edb(0x1f4)](_0x3f66c4){const _0x36a438=a31_0x461edb,{options:_0x3aaf31,args:_0x3de8f9,tdx:_0x57f419}=_0x3f66c4,_0x1f3880=_0x3aaf31,_0x59d832=_0x3de8f9[0x0]||_0x3aaf31['parentSegment'];if(!_0x59d832)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'+_0x36a438(0x37c)),0x1;if(_0x1f3880[_0x36a438(0x341)]&&_0x1f3880['output'])return console[_0x36a438(0x21e)](a31_0x4004bd[_0x36a438(0x328)](_0x36a438(0x3db))),console[_0x36a438(0x21e)](a31_0x4004bd[_0x36a438(0x32a)](_0x36a438(0x350))),console[_0x36a438(0x21e)](a31_0x4004bd['dim']('using\x20the\x20default\x20path:\x20'+PARENT_SEGMENT_DIR+_0x36a438(0x279))),console[_0x36a438(0x21e)](a31_0x4004bd[_0x36a438(0x20e)](_0x36a438(0x368))),0x1;const _0x1913dd=_0x1f3880[_0x36a438(0x373)]||a31_0xccace1['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x59d832)+'.yml');_0x1f3880['verbose']&&(console[_0x36a438(0x21e)](_0x36a438(0x377)+_0x1f3880[_0x36a438(0x2ba)]),console[_0x36a438(0x21e)]('Parent\x20segment:\x20'+_0x59d832),console[_0x36a438(0x21e)]('Output\x20file:\x20'+_0x1913dd));const _0x43f092=await withSpinner(_0x36a438(0x234)+_0x59d832+_0x36a438(0x3a7),()=>_0x57f419[_0x36a438(0x33f)][_0x36a438(0x371)](_0x59d832),{'verbose':_0x1f3880[_0x36a438(0x207)]}),_0x58fb70=_0x43f092[_0x36a438(0x3e3)];if(existsSync(_0x1913dd)){const _0x3d231c=readFileSync(_0x1913dd,_0x36a438(0x2c4)),_0x2bd33a=generateDiff(_0x3d231c,_0x58fb70);if(!hasChanges(_0x2bd33a))console[_0x36a438(0x21e)](a31_0x4004bd['green']('✔')+'\x20No\x20changes\x20-\x20'+a31_0x4004bd[_0x36a438(0x20e)](_0x1913dd)+_0x36a438(0x232));else{console[_0x36a438(0x21e)](_0x36a438(0x233)+_0x1913dd+'\x27:'),console[_0x36a438(0x21e)]('─'[_0x36a438(0x401)](0x3c)),console[_0x36a438(0x21e)](formatDiffWithColors(_0x2bd33a)),console[_0x36a438(0x21e)]('─'[_0x36a438(0x401)](0x3c));if(!_0x1f3880[_0x36a438(0x272)]){if(!isInteractive())return console[_0x36a438(0x21e)](a31_0x4004bd[_0x36a438(0x328)]('\x0aError:'),_0x36a438(0x358)),console[_0x36a438(0x21e)](a31_0x4004bd[_0x36a438(0x32a)](_0x36a438(0x252))),0x1;const _0x11590d=await confirmKey(_0x36a438(0x389)+_0x1913dd+'\x27?');if(!_0x11590d)return console['error'](a31_0x4004bd['yellow']('Aborted.')),0x1;}writeFileSync(_0x1913dd,_0x58fb70,_0x36a438(0x2c4)),console['error'](a31_0x4004bd[_0x36a438(0x224)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x4004bd[_0x36a438(0x20e)](_0x1913dd));}}else{const _0x74bf61=a31_0xccace1[_0x36a438(0x20a)](_0x1913dd);!existsSync(_0x74bf61)&&mkdirSync(_0x74bf61,{'recursive':!![]}),writeFileSync(_0x1913dd,_0x58fb70,_0x36a438(0x2c4)),console[_0x36a438(0x21e)](a31_0x4004bd['green']('✔')+_0x36a438(0x3ab)+a31_0x4004bd[_0x36a438(0x20e)](_0x1913dd));}return saveSessionContext({'parent_segment':_0x59d832},_0x1f3880[_0x36a438(0x2f0)]),console[_0x36a438(0x21e)](a31_0x4004bd[_0x36a438(0x224)]('✔')+_0x36a438(0x25c)+a31_0x4004bd[_0x36a438(0x32a)](_0x36a438(0x266))+_0x36a438(0x2ce)+a31_0x4004bd['cyan'](_0x59d832)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{['name']='segment:parent:push';[a31_0x461edb(0x395)]=a31_0x461edb(0x26e);async['execute'](_0x414ddc){const _0x1d049c=a31_0x461edb,{options:_0x212fe7,args:_0x22889a,tdx:_0x49b24b}=_0x414ddc,_0x1101ae=_0x212fe7,_0x41d377=_0x22889a[0x0]||_0x212fe7['parentSegment'];if(!_0x41d377)return showParentSegmentNotSetError(_0x1d049c(0x35a)+_0x1d049c(0x2ff)),0x1;const _0x171d39=resolveYamlFile(_0x41d377);if(!existsSync(_0x171d39))return showFileNotFoundError(_0x171d39,_0x41d377),0x1;_0x1101ae[_0x1d049c(0x207)]&&(console[_0x1d049c(0x21e)](_0x1d049c(0x377)+_0x1101ae[_0x1d049c(0x2ba)]),console[_0x1d049c(0x21e)](_0x1d049c(0x304)+_0x171d39));let _0x48540a;try{_0x48540a=readFileSync(_0x171d39,'utf-8');}catch(_0x4ef589){const _0x5d14c7=_0x4ef589 instanceof Error?_0x4ef589[_0x1d049c(0x265)]:String(_0x4ef589);return console[_0x1d049c(0x21e)]('Error\x20reading\x20file:\x20'+_0x5d14c7),0x1;}const _0x385242=await withSpinner(_0x1d049c(0x2a7),()=>_0x49b24b[_0x1d049c(0x33f)][_0x1d049c(0x333)](_0x48540a),{'verbose':_0x1101ae[_0x1d049c(0x207)]}),_0x3a03d4=_0x385242['data'],{isNew:_0x35a3ec,name:_0x4b43a5,hasChanges:_0x32b6c1,diffFormatted:_0x55df1e}=_0x3a03d4;if(!_0x32b6c1)return console[_0x1d049c(0x21e)]('✔\x20No\x20changes\x20-\x20\x27'+_0x4b43a5+_0x1d049c(0x30b)),0x0;_0x35a3ec?console[_0x1d049c(0x21e)](_0x1d049c(0x24e)+_0x4b43a5+'\x27:'):console[_0x1d049c(0x21e)](_0x1d049c(0x3b9)+_0x4b43a5+'\x27:');console[_0x1d049c(0x21e)]('─'[_0x1d049c(0x401)](0x3c)),console['error'](_0x55df1e),console[_0x1d049c(0x21e)]('─'['repeat'](0x3c));const _0x4da6e4=_0x35a3ec?_0x1d049c(0x1ee)+_0x4b43a5+'\x27?':_0x1d049c(0x337)+_0x4b43a5+'\x27?';if(!_0x1101ae[_0x1d049c(0x272)]){if(!isInteractive())return console[_0x1d049c(0x21e)](a31_0x4004bd[_0x1d049c(0x328)](_0x1d049c(0x2c1)),_0x1d049c(0x358)),console['error'](a31_0x4004bd[_0x1d049c(0x32a)](_0x1d049c(0x252))),0x1;const _0x4c2954=await confirmKey(_0x4da6e4);if(!_0x4c2954)return console[_0x1d049c(0x21e)](a31_0x4004bd[_0x1d049c(0x3c6)](_0x1d049c(0x219))),0x1;}const _0x1e10c5=_0x35a3ec?'Creating':_0x1d049c(0x231),_0x2f8dc3=await withSpinner(_0x1e10c5+_0x1d049c(0x243)+_0x4b43a5+_0x1d049c(0x3a7),()=>_0x3a03d4[_0x1d049c(0x226)](),{'verbose':_0x1101ae[_0x1d049c(0x207)]}),_0x39a611=_0x2f8dc3[_0x1d049c(0x3e3)],_0x16e9b3=getConsoleNextUrl(_0x1101ae[_0x1d049c(0x2ba)],_0x1d049c(0x23a)+_0x39a611['id']),_0x113953=_0x35a3ec?'Created':_0x1d049c(0x2e4);return console[_0x1d049c(0x21e)]('✔\x20'+_0x113953+_0x1d049c(0x243)+_0x39a611[_0x1d049c(0x3f3)]+'\x27'),console[_0x1d049c(0x21e)]('\x20\x20'+_0x16e9b3),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x3f6);[a31_0x461edb(0x395)]=a31_0x461edb(0x388);async[a31_0x461edb(0x1f4)](_0x532fc4){const _0x331fd4=a31_0x461edb,{options:_0x4015d4,args:_0x2cd496,tdx:_0x54dec4}=_0x532fc4,_0x3cd5fa=_0x4015d4,_0x4476d8=_0x2cd496[0x0]||_0x4015d4[_0x331fd4(0x2f7)];if(!_0x4476d8)return showParentSegmentNotSetError(_0x331fd4(0x2c9)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a'+'Options:\x0a'+_0x331fd4(0x244)+_0x331fd4(0x3f5)+_0x331fd4(0x3a1)),0x1;const _0x52ad96=resolveYamlFile(_0x4476d8);if(!existsSync(_0x52ad96))return showFileNotFoundError(_0x52ad96,_0x4476d8),0x1;_0x3cd5fa[_0x331fd4(0x207)]&&(console[_0x331fd4(0x21e)](_0x331fd4(0x377)+_0x3cd5fa[_0x331fd4(0x2ba)]),console['error']('YAML\x20file:\x20'+_0x52ad96));let _0x579191;try{_0x579191=readFileSync(_0x52ad96,_0x331fd4(0x2c4));}catch(_0x3b5639){const _0x117c55=_0x3b5639 instanceof Error?_0x3b5639[_0x331fd4(0x265)]:String(_0x3b5639);return console[_0x331fd4(0x21e)](_0x331fd4(0x36f)+_0x117c55),0x1;}const _0x13683e=createCommandSpinner(a31_0x4004bd[_0x331fd4(0x32a)](_0x331fd4(0x334)),{'verbose':_0x3cd5fa['verbose']});_0x13683e[_0x331fd4(0x283)]();const _0x24af40={'onProgress':_0x32f065=>{const _0x1aea35=_0x331fd4;_0x13683e[_0x1aea35(0x264)]=formatProgressMessage(_0x32f065);}};if(_0x3cd5fa['master'])_0x24af40[_0x331fd4(0x286)]=!![];if(_0x3cd5fa['enriched'])_0x24af40['enriched']=!![];_0x3cd5fa[_0x331fd4(0x353)]&&(_0x24af40['attribute']=_0x3cd5fa['attribute']);_0x3cd5fa['behavior']&&(_0x24af40['behavior']=_0x3cd5fa[_0x331fd4(0x367)]);if(_0x3cd5fa[_0x331fd4(0x355)])_0x24af40[_0x331fd4(0x355)]=_0x3cd5fa[_0x331fd4(0x355)];let _0x101483;try{_0x101483=await _0x54dec4[_0x331fd4(0x33f)][_0x331fd4(0x262)](_0x579191,_0x24af40),_0x13683e[_0x331fd4(0x3c0)]();}catch(_0x405686){_0x13683e[_0x331fd4(0x3c0)]();throw _0x405686;}const _0xa58ede=_0x3cd5fa['interval']||'-1d';return this[_0x331fd4(0x2bd)](_0x101483,_0x24af40,_0x52ad96,_0xa58ede),_0x101483[_0x331fd4(0x404)]?0x0:0x1;}[a31_0x461edb(0x2bd)](_0x22c11a,_0x45b01a,_0x8e352c,_0x291599){const _0x4e62f2=a31_0x461edb;console[_0x4e62f2(0x21e)]('\x0a'+a31_0x4004bd[_0x4e62f2(0x316)](_0x4e62f2(0x390))+'\x20'+_0x22c11a[_0x4e62f2(0x3f3)]),console[_0x4e62f2(0x21e)]('═'[_0x4e62f2(0x401)](0x3c)),this['displayMasterInfo'](_0x22c11a);if(typeof _0x45b01a[_0x4e62f2(0x353)]==='string'){this[_0x4e62f2(0x34c)](_0x22c11a),this[_0x4e62f2(0x2f4)](_0x22c11a),this[_0x4e62f2(0x23c)](_0x8e352c,_0x291599,_0x4e62f2(0x353),_0x45b01a[_0x4e62f2(0x353)]);return;}if(_0x45b01a[_0x4e62f2(0x353)]===!![]){this[_0x4e62f2(0x34c)](_0x22c11a),this[_0x4e62f2(0x2f4)](_0x22c11a),this['displayPreviewHints'](_0x8e352c,_0x291599,_0x4e62f2(0x3bc));return;}if(typeof _0x45b01a[_0x4e62f2(0x367)]===_0x4e62f2(0x3d8)){this[_0x4e62f2(0x2df)](_0x22c11a,_0x291599),this['displaySummary'](_0x22c11a),this[_0x4e62f2(0x23c)](_0x8e352c,_0x291599,_0x4e62f2(0x367),_0x45b01a[_0x4e62f2(0x367)]);return;}if(_0x45b01a[_0x4e62f2(0x367)]===!![]){this[_0x4e62f2(0x2df)](_0x22c11a,_0x291599),this[_0x4e62f2(0x2f4)](_0x22c11a),this[_0x4e62f2(0x23c)](_0x8e352c,_0x291599,_0x4e62f2(0x39b));return;}this['displayAttributesStats'](_0x22c11a),this[_0x4e62f2(0x2df)](_0x22c11a,_0x291599),this[_0x4e62f2(0x2d9)](_0x22c11a),this[_0x4e62f2(0x2f4)](_0x22c11a),this[_0x4e62f2(0x23c)](_0x8e352c,_0x291599,'all');}['displayRealtimeInfo'](_0x1a82f6){displayRealtimeValidation(_0x1a82f6);}[a31_0x461edb(0x23c)](_0x1fd4b3,_0x3cde34,_0x4eaee3,_0x20f283){const _0x42a094=a31_0x461edb;console['error']('\x0a'+a31_0x4004bd[_0x42a094(0x32a)](_0x42a094(0x3a5)));const _0x46d374=_0x3cde34!==_0x42a094(0x380)?_0x42a094(0x312)+_0x3cde34:'';if(_0x4eaee3==='attribute'&&_0x20f283)console[_0x42a094(0x21e)]('\x20\x20'+a31_0x4004bd[_0x42a094(0x32a)](_0x42a094(0x1ea)+_0x1fd4b3+'\x20--attribute\x20\x22'+_0x20f283+'\x22'+_0x46d374));else{if(_0x4eaee3===_0x42a094(0x367)&&_0x20f283)console[_0x42a094(0x21e)]('\x20\x20'+a31_0x4004bd[_0x42a094(0x32a)](_0x42a094(0x1ea)+_0x1fd4b3+'\x20--behavior\x20\x22'+_0x20f283+'\x22'+_0x46d374));else(_0x4eaee3==='attributes'||_0x4eaee3===_0x42a094(0x2eb))&&console[_0x42a094(0x21e)]('\x20\x20'+a31_0x4004bd[_0x42a094(0x32a)](_0x42a094(0x1ea)+_0x1fd4b3+_0x42a094(0x35d)+_0x46d374));}(_0x4eaee3===_0x42a094(0x39b)||_0x4eaee3===_0x42a094(0x2eb))&&console[_0x42a094(0x21e)]('\x20\x20'+a31_0x4004bd[_0x42a094(0x32a)](_0x42a094(0x1ea)+_0x1fd4b3+_0x42a094(0x275)+_0x46d374)),_0x4eaee3===_0x42a094(0x2eb)&&console['error']('\x20\x20'+a31_0x4004bd[_0x42a094(0x32a)]('tdx\x20ps\x20preview\x20'+_0x1fd4b3+'\x20--enriched'+_0x46d374));}['displayMasterInfo'](_0x832824){const _0x4a4210=a31_0x461edb,{master:_0x474011}=_0x832824,_0x43e401=_0x474011[_0x4a4210(0x228)]?a31_0x4004bd[_0x4a4210(0x224)]('✔'):a31_0x4004bd[_0x4a4210(0x328)]('✘');console[_0x4a4210(0x21e)]('\x0a'+a31_0x4004bd[_0x4a4210(0x32a)](_0x4a4210(0x3b3))),console[_0x4a4210(0x21e)](_0x43e401+'\x20'+a31_0x4004bd['bold'](_0x474011[_0x4a4210(0x269)]+'.'+_0x474011[_0x4a4210(0x1eb)])),_0x474011[_0x4a4210(0x228)]?_0x474011[_0x4a4210(0x349)]!==undefined&&console[_0x4a4210(0x21e)]('\x20\x20'+a31_0x4004bd[_0x4a4210(0x32a)](_0x4a4210(0x3aa))+'\x20'+a31_0x4004bd['cyan'](formatRows(_0x474011[_0x4a4210(0x349)]))):console[_0x4a4210(0x21e)]('\x20\x20'+a31_0x4004bd[_0x4a4210(0x328)](_0x4a4210(0x25b))+'\x20'+_0x474011[_0x4a4210(0x29e)]);}[a31_0x461edb(0x34c)](_0x527d19){const _0x11283e=a31_0x461edb;if(_0x527d19[_0x11283e(0x3bc)][_0x11283e(0x248)]===0x0)return;console[_0x11283e(0x21e)]('\x0a'+a31_0x4004bd['dim'](_0x11283e(0x320)));for(const _0x206b83 of _0x527d19[_0x11283e(0x3bc)]){const _0x4a4d4b=_0x206b83[_0x11283e(0x228)]?a31_0x4004bd[_0x11283e(0x224)]('✔'):a31_0x4004bd[_0x11283e(0x328)]('✘');let _0x47cce5='';if(_0x206b83['schemaValid']&&_0x206b83[_0x11283e(0x3f2)]!==undefined&&_0x206b83[_0x11283e(0x288)]!==undefined){const _0x3148d6=_0x206b83[_0x11283e(0x288)][_0x11283e(0x36b)](0x1),_0x20012d=_0x206b83[_0x11283e(0x288)]>=0x50?a31_0x4004bd[_0x11283e(0x224)]:_0x206b83[_0x11283e(0x288)]>=0x32?a31_0x4004bd['yellow']:a31_0x4004bd[_0x11283e(0x328)];_0x47cce5='\x20'+a31_0x4004bd[_0x11283e(0x32a)]('Coverage:')+'\x20'+_0x20012d(_0x3148d6+'%')+'\x20('+formatRows(_0x206b83[_0x11283e(0x3f2)])+_0x11283e(0x30c);}console['error'](_0x4a4d4b+'\x20'+a31_0x4004bd[_0x11283e(0x316)](_0x206b83[_0x11283e(0x3f3)])+_0x47cce5),console[_0x11283e(0x21e)]('\x20\x20'+a31_0x4004bd[_0x11283e(0x32a)](_0x11283e(0x306))+'\x20'+a31_0x4004bd[_0x11283e(0x316)](_0x206b83[_0x11283e(0x269)]+'.'+_0x206b83[_0x11283e(0x1eb)]));const _0x425ea1=_0x206b83[_0x11283e(0x2c7)]===_0x206b83['foreignKey']?a31_0x4004bd[_0x11283e(0x32a)](_0x11283e(0x33b))+'\x20'+_0x206b83[_0x11283e(0x2c7)]:a31_0x4004bd[_0x11283e(0x32a)]('Join:')+'\x20'+_0x206b83[_0x11283e(0x2c7)]+_0x11283e(0x2ce)+_0x206b83[_0x11283e(0x2bf)];console[_0x11283e(0x21e)]('\x20\x20'+_0x425ea1),console[_0x11283e(0x21e)]('\x20\x20'+a31_0x4004bd[_0x11283e(0x32a)]('Columns:')),this[_0x11283e(0x379)](_0x206b83[_0x11283e(0x3e5)]),!_0x206b83[_0x11283e(0x228)]&&console['error']('\x20\x20'+a31_0x4004bd[_0x11283e(0x328)]('Error:')+'\x20'+_0x206b83[_0x11283e(0x29e)]);}}[a31_0x461edb(0x2df)](_0x8f7db,_0x2fd361){const _0x4bf1c1=a31_0x461edb;if(_0x8f7db['behaviors'][_0x4bf1c1(0x248)]===0x0)return;console[_0x4bf1c1(0x21e)]('\x0a'+a31_0x4004bd['dim'](_0x4bf1c1(0x2b9))+'\x20'+a31_0x4004bd['dim']('('+_0x2fd361+')'));for(const _0x2dbaf1 of _0x8f7db[_0x4bf1c1(0x39b)]){const _0x1b84a2=_0x2dbaf1[_0x4bf1c1(0x228)]?a31_0x4004bd[_0x4bf1c1(0x224)]('✔'):a31_0x4004bd[_0x4bf1c1(0x328)]('✘');let _0x395cda='';if(_0x2dbaf1[_0x4bf1c1(0x228)]&&_0x2dbaf1[_0x4bf1c1(0x25d)]!==undefined&&_0x2dbaf1[_0x4bf1c1(0x24d)]!==undefined){const _0x5332fb=_0x2dbaf1[_0x4bf1c1(0x3c2)]?.[_0x4bf1c1(0x36b)](0x1)||'?',_0x4493e1=(_0x2dbaf1[_0x4bf1c1(0x3c2)]??0x0)>=0x32?a31_0x4004bd[_0x4bf1c1(0x224)]:(_0x2dbaf1[_0x4bf1c1(0x3c2)]??0x0)>=0x14?a31_0x4004bd['yellow']:a31_0x4004bd[_0x4bf1c1(0x328)];_0x395cda='\x20'+a31_0x4004bd[_0x4bf1c1(0x32a)](_0x4bf1c1(0x3dd))+'\x20'+_0x4493e1(formatRows(_0x2dbaf1[_0x4bf1c1(0x25d)]))+'\x20('+_0x5332fb+_0x4bf1c1(0x30e)+a31_0x4004bd['dim'](_0x4bf1c1(0x26d))+'\x20'+a31_0x4004bd['cyan'](formatRows(_0x2dbaf1[_0x4bf1c1(0x24d)]));}console[_0x4bf1c1(0x21e)](_0x1b84a2+'\x20'+a31_0x4004bd[_0x4bf1c1(0x316)](_0x2dbaf1[_0x4bf1c1(0x3f3)])+_0x395cda),console[_0x4bf1c1(0x21e)]('\x20\x20'+a31_0x4004bd[_0x4bf1c1(0x32a)](_0x4bf1c1(0x306))+'\x20'+a31_0x4004bd[_0x4bf1c1(0x316)](_0x2dbaf1[_0x4bf1c1(0x269)]+'.'+_0x2dbaf1['table']));const _0x3b9922=_0x2dbaf1[_0x4bf1c1(0x2c7)]===_0x2dbaf1[_0x4bf1c1(0x2bf)]?a31_0x4004bd[_0x4bf1c1(0x32a)](_0x4bf1c1(0x33b))+'\x20'+_0x2dbaf1['joinKey']:a31_0x4004bd['dim'](_0x4bf1c1(0x255))+'\x20'+_0x2dbaf1[_0x4bf1c1(0x2c7)]+_0x4bf1c1(0x2ce)+_0x2dbaf1[_0x4bf1c1(0x2bf)];console[_0x4bf1c1(0x21e)]('\x20\x20'+_0x3b9922),console[_0x4bf1c1(0x21e)]('\x20\x20'+a31_0x4004bd[_0x4bf1c1(0x32a)]('Columns:')),this[_0x4bf1c1(0x379)](_0x2dbaf1['columns']),!_0x2dbaf1[_0x4bf1c1(0x228)]&&console[_0x4bf1c1(0x21e)]('\x20\x20'+a31_0x4004bd[_0x4bf1c1(0x328)](_0x4bf1c1(0x25b))+'\x20'+_0x2dbaf1[_0x4bf1c1(0x29e)]);}}[a31_0x461edb(0x379)](_0x2bece1){const _0x2d5d=a31_0x461edb;for(const _0x2d806a of _0x2bece1){_0x2d806a[_0x2d5d(0x38f)]===_0x2d806a[_0x2d5d(0x20f)]||_0x2d806a[_0x2d5d(0x20f)]==='*'?console['error'](_0x2d5d(0x1f2)+_0x2d806a[_0x2d5d(0x38f)]):console['error'](_0x2d5d(0x1f2)+_0x2d806a[_0x2d5d(0x38f)]+'\x20'+a31_0x4004bd[_0x2d5d(0x32a)]('('+_0x2d806a[_0x2d5d(0x20f)]+')'));}}[a31_0x461edb(0x2f4)](_0x4671d4){const _0x2c25df=a31_0x461edb;console[_0x2c25df(0x21e)]('─'[_0x2c25df(0x401)](0x3c));if(_0x4671d4[_0x2c25df(0x28b)][_0x2c25df(0x248)]>0x0){console[_0x2c25df(0x21e)]('\x0a'+a31_0x4004bd['red'](_0x2c25df(0x301)));for(const _0x48c2f5 of _0x4671d4[_0x2c25df(0x28b)]){console[_0x2c25df(0x21e)]('\x20\x20'+a31_0x4004bd['red']('•')+'\x20'+_0x48c2f5);}}_0x4671d4['allValid']&&console[_0x2c25df(0x21e)]('\x0a'+a31_0x4004bd[_0x2c25df(0x224)]('✔')+_0x2c25df(0x359));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{['name']=a31_0x461edb(0x36a);[a31_0x461edb(0x395)]=a31_0x461edb(0x3ea);async[a31_0x461edb(0x1f4)](_0x3f9b99){const _0x19b633=a31_0x461edb,{options:_0x601b39,args:_0x1b3cfb,tdx:_0x4df0ec}=_0x3f9b99,_0x171cce=_0x601b39,_0x3120be=_0x1b3cfb[0x0]||_0x601b39['parentSegment'];if(!_0x3120be)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'+_0x19b633(0x2a6)+'\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a'+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+_0x19b633(0x3f8)+_0x19b633(0x2d0)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x171cce['master']&&!_0x171cce[_0x19b633(0x353)]&&!_0x171cce[_0x19b633(0x367)]&&!_0x171cce[_0x19b633(0x273)])return console[_0x19b633(0x21e)](a31_0x4004bd[_0x19b633(0x328)](_0x19b633(0x240))),console[_0x19b633(0x21e)](_0x19b633(0x3d9)),console[_0x19b633(0x21e)]('Options:'),console[_0x19b633(0x21e)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console[_0x19b633(0x21e)](_0x19b633(0x322)),console[_0x19b633(0x21e)](_0x19b633(0x2fe)),console[_0x19b633(0x21e)](_0x19b633(0x37a)),0x1;const _0x87b281=resolveYamlFile(_0x3120be);if(!existsSync(_0x87b281))return showFileNotFoundError(_0x87b281,_0x3120be),0x1;_0x171cce[_0x19b633(0x207)]&&(console[_0x19b633(0x21e)]('Site:\x20'+_0x171cce[_0x19b633(0x2ba)]),console['error']('YAML\x20file:\x20'+_0x87b281));let _0x32314d;try{_0x32314d=readFileSync(_0x87b281,'utf-8');}catch(_0x54247a){const _0x909469=_0x54247a instanceof Error?_0x54247a[_0x19b633(0x265)]:String(_0x54247a);return console[_0x19b633(0x21e)](_0x19b633(0x36f)+_0x909469),0x1;}let _0x3660fc;try{_0x3660fc=parseDef(_0x32314d);}catch(_0x363083){const _0x378e24=_0x363083 instanceof Error?_0x363083[_0x19b633(0x265)]:String(_0x363083);return console[_0x19b633(0x21e)](a31_0x4004bd['red'](_0x19b633(0x352)+_0x378e24)),0x1;}if(_0x171cce[_0x19b633(0x353)]===!![]||_0x171cce[_0x19b633(0x353)]===''){const _0x5cdfb8=_0x3660fc[_0x19b633(0x3bc)]?.[_0x19b633(0x3cf)](_0x251bbe=>_0x251bbe[_0x19b633(0x3f3)])||[];if(_0x5cdfb8[_0x19b633(0x248)]===0x0)console[_0x19b633(0x21e)](a31_0x4004bd[_0x19b633(0x328)](_0x19b633(0x274)));else{console[_0x19b633(0x21e)](a31_0x4004bd[_0x19b633(0x328)](_0x19b633(0x2c2))),console['error'](_0x19b633(0x2be));for(const _0x575be9 of _0x5cdfb8){console[_0x19b633(0x21e)]('\x20\x20'+a31_0x4004bd[_0x19b633(0x20e)](_0x575be9));}console['error'](_0x19b633(0x21d)+_0x3120be+_0x19b633(0x38c)+_0x5cdfb8[0x0]+'\x22');}return 0x1;}if(_0x171cce[_0x19b633(0x367)]===!![]||_0x171cce[_0x19b633(0x367)]===''){const _0x5515ea=_0x3660fc['behaviors']?.[_0x19b633(0x3cf)](_0x3fb2d7=>_0x3fb2d7['name'])||[];if(_0x5515ea[_0x19b633(0x248)]===0x0)console[_0x19b633(0x21e)](a31_0x4004bd[_0x19b633(0x328)](_0x19b633(0x33c)));else{console[_0x19b633(0x21e)](a31_0x4004bd[_0x19b633(0x328)](_0x19b633(0x3f7))),console[_0x19b633(0x21e)](_0x19b633(0x28f));for(const _0x17d4ed of _0x5515ea){console[_0x19b633(0x21e)]('\x20\x20'+a31_0x4004bd[_0x19b633(0x20e)](_0x17d4ed));}console[_0x19b633(0x21e)](_0x19b633(0x21d)+_0x3120be+'\x20--behavior\x20\x22'+_0x5515ea[0x0]+'\x22');}return 0x1;}const _0x379c17=createCommandSpinner(a31_0x4004bd[_0x19b633(0x32a)]('Fetching\x20sample\x20data...'),{'verbose':_0x171cce[_0x19b633(0x207)]});_0x379c17[_0x19b633(0x283)]();const _0x193a89={'onProgress':_0x30a3f0=>{_0x379c17['text']=formatProgressMessage(_0x30a3f0);}};if(_0x171cce[_0x19b633(0x286)])_0x193a89[_0x19b633(0x286)]=!![];if(_0x171cce[_0x19b633(0x353)]&&typeof _0x171cce[_0x19b633(0x353)]===_0x19b633(0x3d8))_0x193a89[_0x19b633(0x353)]=_0x171cce[_0x19b633(0x353)];if(_0x171cce[_0x19b633(0x367)]&&typeof _0x171cce[_0x19b633(0x367)]==='string')_0x193a89[_0x19b633(0x367)]=_0x171cce[_0x19b633(0x367)];if(_0x171cce[_0x19b633(0x273)])_0x193a89[_0x19b633(0x273)]=!![];if(_0x171cce[_0x19b633(0x355)])_0x193a89[_0x19b633(0x355)]=_0x171cce[_0x19b633(0x355)];let _0x170197;try{_0x170197=await _0x4df0ec[_0x19b633(0x33f)][_0x19b633(0x1e9)](_0x32314d,_0x193a89),_0x379c17[_0x19b633(0x3c0)]();}catch(_0x599247){_0x379c17[_0x19b633(0x3c0)]();throw _0x599247;}return await this[_0x19b633(0x2a9)](_0x170197,{'master':_0x171cce[_0x19b633(0x286)],'attribute':typeof _0x171cce[_0x19b633(0x353)]===_0x19b633(0x3d8)?_0x171cce[_0x19b633(0x353)]:undefined,'behavior':typeof _0x171cce['behavior']===_0x19b633(0x3d8)?_0x171cce[_0x19b633(0x367)]:undefined,'enriched':_0x171cce['enriched']}),_0x170197[_0x19b633(0x404)]?0x0:0x1;}async['displayPreviewResults'](_0x57d9e9,_0x9a07bc){const _0x2b5413=a31_0x461edb;console[_0x2b5413(0x21e)]('\x0a'+a31_0x4004bd[_0x2b5413(0x316)]('Preview:')+'\x20'+_0x57d9e9['name']),console[_0x2b5413(0x21e)]('═'[_0x2b5413(0x401)](0x3c));if(_0x9a07bc[_0x2b5413(0x286)]&&_0x57d9e9['sampleData']){const _0x25219c=a31_0x4004bd[_0x2b5413(0x32a)]('Master:')+'\x20'+a31_0x4004bd[_0x2b5413(0x316)](_0x57d9e9[_0x2b5413(0x286)][_0x2b5413(0x269)]+'.'+_0x57d9e9['master']['table']);await this[_0x2b5413(0x20d)](_0x25219c,_0x57d9e9[_0x2b5413(0x27f)]);}else{if(_0x9a07bc['attribute']&&_0x57d9e9[_0x2b5413(0x27f)]){const _0x617cd4=a31_0x4004bd['dim'](_0x2b5413(0x327))+'\x20'+a31_0x4004bd[_0x2b5413(0x316)](_0x9a07bc[_0x2b5413(0x353)]);await this['displaySampleData'](_0x617cd4,_0x57d9e9[_0x2b5413(0x27f)]);}else{if(_0x9a07bc['behavior']&&_0x57d9e9[_0x2b5413(0x27f)]){const _0x44a547=a31_0x4004bd[_0x2b5413(0x32a)](_0x2b5413(0x2c8))+'\x20'+a31_0x4004bd[_0x2b5413(0x316)](_0x9a07bc[_0x2b5413(0x367)]);await this[_0x2b5413(0x20d)](_0x44a547,_0x57d9e9[_0x2b5413(0x27f)]);}else{if(_0x9a07bc[_0x2b5413(0x273)]&&_0x57d9e9[_0x2b5413(0x27f)]){const _0x234f67=a31_0x4004bd['dim'](_0x2b5413(0x257))+'\x20'+a31_0x4004bd[_0x2b5413(0x316)](_0x2b5413(0x2af));await this['displaySampleData'](_0x234f67,_0x57d9e9[_0x2b5413(0x27f)]);}else!_0x57d9e9[_0x2b5413(0x27f)]&&console[_0x2b5413(0x21e)](_0x2b5413(0x2fc));}}}if(_0x57d9e9[_0x2b5413(0x28b)]['length']>0x0){console[_0x2b5413(0x21e)]('─'['repeat'](0x3c)),console['error']('\x0a'+a31_0x4004bd[_0x2b5413(0x328)](_0x2b5413(0x301)));for(const _0x4482cf of _0x57d9e9[_0x2b5413(0x28b)]){console[_0x2b5413(0x21e)]('\x20\x20'+a31_0x4004bd['red']('•')+'\x20'+_0x4482cf);}}}async['displaySampleData'](_0xd759a3,_0x37679e){const _0x3cf09e=a31_0x461edb;if(_0x37679e['length']===0x0){console[_0x3cf09e(0x21e)]('\x0a'+_0xd759a3),console['error'](_0x3cf09e(0x3d6));return;}console[_0x3cf09e(0x21e)]('\x0a'+_0xd759a3);const _0x722019=Object[_0x3cf09e(0x2e0)](_0x37679e[0x0])['map'](_0x2b3d45=>({'name':_0x2b3d45,'type':typeof _0x37679e[0x0][_0x2b3d45]===_0x3cf09e(0x315)?'double':'varchar'})),_0xe43d81={'queryId':_0x3cf09e(0x2fd),'columns':_0x722019,'data':_0x37679e,'stats':{'state':_0x3cf09e(0x2b1),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x37679e[_0x3cf09e(0x248)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x169da5=formatAsTable(_0xe43d81,_0x37679e[_0x3cf09e(0x248)],!![]);await writeOutput(_0x169da5,undefined,_0x3cf09e(0x1eb));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x351);[a31_0x461edb(0x395)]=a31_0x461edb(0x397);async[a31_0x461edb(0x1f4)](_0x56e999){const _0x3efa2e=a31_0x461edb,{options:_0x412c7c,args:_0x50ad3e,tdx:_0x35647b}=_0x56e999,_0x331f93=_0x412c7c,_0x87d0fa=_0x50ad3e[0x0]||_0x412c7c['parentSegment'];if(!_0x87d0fa)return showParentSegmentNotSetError(_0x3efa2e(0x24c)+_0x3efa2e(0x39a)),0x1;const _0x32fe1c=resolveYamlFile(_0x87d0fa);if(existsSync(_0x32fe1c)){_0x331f93['verbose']&&console[_0x3efa2e(0x21e)](_0x3efa2e(0x21f)+_0x32fe1c);let _0x151acd;try{_0x151acd=readFileSync(_0x32fe1c,_0x3efa2e(0x2c4));}catch(_0x1c8555){const _0x35589d=_0x1c8555 instanceof Error?_0x1c8555[_0x3efa2e(0x265)]:String(_0x1c8555);return console[_0x3efa2e(0x21e)](_0x3efa2e(0x36f)+_0x35589d),0x1;}const _0x2609a4=await withSpinner(_0x3efa2e(0x2a7),()=>_0x35647b[_0x3efa2e(0x33f)][_0x3efa2e(0x333)](_0x151acd),{'verbose':_0x331f93[_0x3efa2e(0x207)]}),_0x12527c=_0x2609a4['data'],{isNew:_0x523917,name:_0x594243,hasChanges:_0x1312f5,diffFormatted:_0x568878}=_0x12527c;if(_0x1312f5){_0x523917?console[_0x3efa2e(0x21e)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x594243+'\x27:'):console[_0x3efa2e(0x21e)](_0x3efa2e(0x3b9)+_0x594243+'\x27:');console[_0x3efa2e(0x21e)]('─'[_0x3efa2e(0x401)](0x3c)),console[_0x3efa2e(0x21e)](_0x568878),console[_0x3efa2e(0x21e)]('─'['repeat'](0x3c));const _0x5d0ff1=_0x523917?_0x3efa2e(0x1ee)+_0x594243+_0x3efa2e(0x3df):_0x3efa2e(0x337)+_0x594243+'\x27\x20and\x20run\x20workflow?';if(!_0x331f93[_0x3efa2e(0x272)]){if(!isInteractive())return console['error'](a31_0x4004bd[_0x3efa2e(0x328)](_0x3efa2e(0x2c1)),_0x3efa2e(0x358)),console[_0x3efa2e(0x21e)](a31_0x4004bd[_0x3efa2e(0x32a)](_0x3efa2e(0x252))),0x1;const _0x389363=await confirmKey(_0x5d0ff1);if(!_0x389363)return console['error'](a31_0x4004bd[_0x3efa2e(0x3c6)](_0x3efa2e(0x219))),0x1;}const _0x5dd011=_0x523917?_0x3efa2e(0x3ff):'Updating';await withSpinner(_0x5dd011+_0x3efa2e(0x243)+_0x594243+_0x3efa2e(0x3a7),()=>_0x12527c[_0x3efa2e(0x226)](),{'verbose':_0x331f93[_0x3efa2e(0x207)]});const _0x247119=_0x523917?'Created':'Updated';console['error']('✔\x20'+_0x247119+_0x3efa2e(0x243)+_0x594243+'\x27');}else console[_0x3efa2e(0x21e)](_0x3efa2e(0x3ca)+_0x594243+_0x3efa2e(0x3fa));}const _0x33954a=await withSpinner('Running\x20parent\x20segment\x20workflow\x20for\x20\x27'+_0x87d0fa+_0x3efa2e(0x3a7),()=>_0x35647b['segment']['runParent'](_0x87d0fa),{'verbose':_0x331f93[_0x3efa2e(0x207)]}),_0x532c3b=_0x33954a['data'],_0x4404a2=getConsoleUrl(_0x331f93[_0x3efa2e(0x2ba)],_0x3efa2e(0x3e2)+_0x532c3b['workflowId']+'/sessions/'+_0x532c3b[_0x3efa2e(0x21b)]+_0x3efa2e(0x307)+_0x532c3b['workflowAttemptId']);return console[_0x3efa2e(0x21e)](_0x3efa2e(0x376)),console['error']('\x20\x20'+a31_0x4004bd['dim']('Audience\x20ID:')+'\x20'+_0x532c3b[_0x3efa2e(0x2d8)]),console[_0x3efa2e(0x21e)]('\x20\x20'+a31_0x4004bd[_0x3efa2e(0x32a)](_0x3efa2e(0x37b))+'\x20'+_0x532c3b[_0x3efa2e(0x317)]),console[_0x3efa2e(0x21e)]('\x20\x20'+a31_0x4004bd[_0x3efa2e(0x32a)](_0x3efa2e(0x1f7))+'\x20'+_0x532c3b[_0x3efa2e(0x21b)]),console[_0x3efa2e(0x21e)]('\x20\x20'+a31_0x4004bd[_0x3efa2e(0x32a)]('Attempt:')+'\x20'+_0x532c3b[_0x3efa2e(0x3e9)]),console[_0x3efa2e(0x21e)]('\x20\x20'+_0x4404a2),console[_0x3efa2e(0x21e)]('\x0a'+a31_0x4004bd[_0x3efa2e(0x32a)](_0x3efa2e(0x2c0))+_0x3efa2e(0x229)+_0x532c3b[_0x3efa2e(0x3e9)]+_0x3efa2e(0x3c9)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x2a3);['description']='List\x20available\x20fields\x20for\x20segmentation';async[a31_0x461edb(0x1f4)](_0x51fcb5){const _0x250124=a31_0x461edb,{options:_0x68be49,args:_0x4febd1,tdx:_0x42c1ea}=_0x51fcb5,_0x50b60e=_0x4febd1[0x0]||_0x68be49[_0x250124(0x2f7)];if(!_0x50b60e)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a'+_0x250124(0x3e6)),0x1;_0x68be49[_0x250124(0x207)]&&(console[_0x250124(0x21e)](_0x250124(0x377)+_0x68be49[_0x250124(0x2ba)]),console[_0x250124(0x21e)](_0x250124(0x3e7)+_0x50b60e));const _0x5e9b4c=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x50b60e+_0x250124(0x3a7),()=>_0x42c1ea[_0x250124(0x33f)][_0x250124(0x28e)](_0x50b60e),{'verbose':_0x68be49[_0x250124(0x207)]}),_0x15df4d=_0x5e9b4c['data'];console[_0x250124(0x21e)](_0x250124(0x214)+_0x15df4d['length']+_0x250124(0x386)+(_0x15df4d[_0x250124(0x248)]!==0x1?'s':''));if(_0x68be49['json']||_0x68be49[_0x250124(0x37d)])return await handleSDKOutput(_0x15df4d,_0x68be49),0x0;return displayFieldsHumanReadable(_0x15df4d,_0x50b60e),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x261);['description']=a31_0x461edb(0x211);async[a31_0x461edb(0x1f4)](_0x174fae){const _0x50fdd9=a31_0x461edb,{options:_0x4193f7,args:_0x5976bc,tdx:_0x183f77}=_0x174fae,_0x289b79=_0x4193f7,_0x3b81ff=_0x5976bc[0x0]||_0x4193f7[_0x50fdd9(0x2f7)];if(!_0x3b81ff)return showParentSegmentNotSetError(_0x50fdd9(0x37e)+_0x50fdd9(0x20c)+'Options:\x0a'+'\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser'),0x1;_0x4193f7['verbose']&&(console[_0x50fdd9(0x21e)](_0x50fdd9(0x377)+_0x4193f7[_0x50fdd9(0x2ba)]),console[_0x50fdd9(0x21e)](_0x50fdd9(0x3e7)+_0x3b81ff));const _0x1d24d=await withSpinner(_0x50fdd9(0x234)+_0x3b81ff+_0x50fdd9(0x3a7),()=>_0x183f77[_0x50fdd9(0x33f)]['getParentFull'](_0x3b81ff),{'verbose':_0x4193f7[_0x50fdd9(0x207)]}),_0xb4aa6=_0x1d24d[_0x50fdd9(0x3e3)];if(_0x289b79[_0x50fdd9(0x2b6)]){const _0x3ed5d7=getConsoleNextUrl(_0x289b79[_0x50fdd9(0x2ba)],_0x50fdd9(0x23a)+_0xb4aa6['id']);return console[_0x50fdd9(0x21e)](a31_0x4004bd[_0x50fdd9(0x224)]('✔')+_0x50fdd9(0x277)+a31_0x4004bd[_0x50fdd9(0x20e)](_0x3ed5d7)),openBrowser(_0x3ed5d7),0x0;}return await handleSingleObjectOutput(_0xb4aa6,_0x4193f7),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x1f6);[a31_0x461edb(0x395)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async[a31_0x461edb(0x1f4)](_0xa6408){const _0x513a7c=a31_0x461edb,{options:_0x10b1f9,args:_0x132126,tdx:_0xa9bc50}=_0xa6408,_0x51e55f=_0x10b1f9,_0x2c6879=_0x132126[0x0]||_0x10b1f9['parentSegment'];if(!_0x2c6879)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'+'\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'+_0x513a7c(0x356)+_0x513a7c(0x27d)),0x1;_0x10b1f9['verbose']&&(console[_0x513a7c(0x21e)](_0x513a7c(0x377)+_0x10b1f9[_0x513a7c(0x2ba)]),console[_0x513a7c(0x21e)]('Parent\x20segment:\x20'+_0x2c6879));const _0x312c26=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x2c6879+_0x513a7c(0x3a7),()=>_0xa9bc50[_0x513a7c(0x33f)][_0x513a7c(0x398)](_0x2c6879),{'verbose':_0x10b1f9[_0x513a7c(0x207)]}),_0x571c6a=_0x312c26[_0x513a7c(0x3e3)],_0x13661e=_0xa9bc50[_0x513a7c(0x33f)][_0x513a7c(0x282)](_0x571c6a);if(_0x51e55f[_0x513a7c(0x373)]){const _0x361824=await this[_0x513a7c(0x343)](_0xa6408,_0x2c6879,_0x571c6a,_0x13661e),_0xcfc003=this[_0x513a7c(0x384)](_0x361824);writeFileSync(_0x51e55f['output'],_0xcfc003);const _0x582ef1=_0x361824['customers'][_0x513a7c(0x3e5)][_0x513a7c(0x248)]+_0x361824[_0x513a7c(0x39b)][_0x513a7c(0x29f)]((_0x2dcd44,_0x49f6d0)=>_0x2dcd44+_0x49f6d0[_0x513a7c(0x3e5)][_0x513a7c(0x248)],0x0),_0x2b21e8=_0x361824[_0x513a7c(0x39b)][_0x513a7c(0x225)](_0x37ce78=>_0x37ce78[_0x513a7c(0x3e5)][_0x513a7c(0x248)]===0x0)[_0x513a7c(0x248)];return console[_0x513a7c(0x220)](_0x513a7c(0x22e)+_0x51e55f[_0x513a7c(0x373)]),console[_0x513a7c(0x220)](_0x513a7c(0x31d)+_0x13661e),console[_0x513a7c(0x220)](_0x513a7c(0x360)+_0x361824[_0x513a7c(0x39b)]['length']+_0x513a7c(0x3c1)),console[_0x513a7c(0x220)](_0x513a7c(0x213)+_0x582ef1+_0x513a7c(0x2d6)),_0x2b21e8>0x0&&console['log'](_0x513a7c(0x394)+_0x2b21e8+_0x513a7c(0x23b)),0x0;}console['error']('\x0a'+a31_0x4004bd['bold'](_0x513a7c(0x2ca))+'\x20'+a31_0x4004bd[_0x513a7c(0x20e)](_0x13661e));const _0x4d36f5=await withSpinner(_0x513a7c(0x259),()=>_0xa9bc50[_0x513a7c(0x33f)][_0x513a7c(0x2a1)](_0x571c6a),{'verbose':_0x10b1f9['verbose']});console[_0x513a7c(0x21e)]('\x0a'+a31_0x4004bd[_0x513a7c(0x316)](_0x513a7c(0x1f8))+'\x20'+a31_0x4004bd['dim']('('+_0x13661e+_0x513a7c(0x32e)));const _0x403ac9=await executeSchemaQuery(_0x4d36f5[_0x513a7c(0x3e3)],_0xa9bc50,_0x10b1f9);await handleQueryOutput(_0x403ac9,_0x10b1f9);const _0x369063=await withSpinner(_0x513a7c(0x3dc),()=>_0xa9bc50[_0x513a7c(0x33f)][_0x513a7c(0x363)](_0x571c6a),{'verbose':_0x10b1f9['verbose']});for(const _0x1cc8dd of _0x369063[_0x513a7c(0x3e3)]){const _0x58dce6='behavior_'+_0x1cc8dd[_0x513a7c(0x309)]()[_0x513a7c(0x3fb)](/\s+/g,'_'),_0x50dd9a=_0x513a7c(0x344)+_0x13661e+'.'+_0x58dce6;console[_0x513a7c(0x21e)]('\x0a'+a31_0x4004bd[_0x513a7c(0x316)](_0x1cc8dd)+'\x20'+a31_0x4004bd[_0x513a7c(0x32a)]('('+_0x13661e+'.'+_0x58dce6+')'));try{const _0x3ee8d7=await executeSchemaQuery(_0x50dd9a,_0xa9bc50,_0x10b1f9);await handleQueryOutput(_0x3ee8d7,_0x10b1f9);}catch{console[_0x513a7c(0x21e)](a31_0x4004bd[_0x513a7c(0x3c6)](_0x513a7c(0x2f6)));}}return 0x0;}async[a31_0x461edb(0x343)](_0x59d97e,_0x49383d,_0x5f3308,_0x5026a0){const _0x3f4e80=a31_0x461edb,{options:_0x3c9fb9,tdx:_0x2e39e7}=_0x59d97e,_0x2d71ed=await withSpinner(_0x3f4e80(0x259),()=>_0x2e39e7['segment'][_0x3f4e80(0x2a1)](_0x5f3308),{'verbose':_0x3c9fb9[_0x3f4e80(0x207)]}),_0x1680ef=await executeSchemaQuery(_0x2d71ed[_0x3f4e80(0x3e3)],_0x2e39e7,_0x3c9fb9),_0x248090=_0x1680ef[_0x3f4e80(0x3e3)]['map'](_0x2e8ef6=>({'name':_0x2e8ef6[_0x3f4e80(0x20b)],'type':_0x2e8ef6['column_type']})),_0x98bb17=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x2e39e7[_0x3f4e80(0x33f)]['getBehaviorNames'](_0x5f3308),{'verbose':_0x3c9fb9[_0x3f4e80(0x207)]}),_0x259718=[];for(const _0x2a1301 of _0x98bb17['data']){const _0x3a1981='behavior_'+_0x2a1301[_0x3f4e80(0x309)]()[_0x3f4e80(0x3fb)](/\s+/g,'_'),_0x202fca=_0x3f4e80(0x344)+_0x5026a0+'.'+_0x3a1981;let _0x381ec0=[];try{const _0x49b3ba=await executeSchemaQuery(_0x202fca,_0x2e39e7,_0x3c9fb9);_0x381ec0=_0x49b3ba[_0x3f4e80(0x3e3)][_0x3f4e80(0x3cf)](_0x3017bd=>({'name':_0x3017bd['column_name'],'type':_0x3017bd[_0x3f4e80(0x3fe)]}));}catch{}_0x259718['push']({'table':_0x3a1981,'columns':_0x381ec0});}return{'database':_0x5026a0,'parent_segment':_0x49383d,'parent_id':_0x5f3308,'customers':{'table':'customers','columns':_0x248090},'behaviors':_0x259718};}[a31_0x461edb(0x384)](_0x248cfb){const _0x2b333a=a31_0x461edb,_0x3b96e0=_0x2e358c=>{const _0x5a2e2a=a31_0x5995;if(_0x2e358c[_0x5a2e2a(0x248)]===0x0)return'[]';const _0x11b981=_0x2e358c[_0x5a2e2a(0x3cf)](_0xcf8fa8=>_0x5a2e2a(0x3a4)+_0xcf8fa8[_0x5a2e2a(0x3f3)]+_0x5a2e2a(0x3f9)+_0xcf8fa8[_0x5a2e2a(0x2ae)]+_0x5a2e2a(0x38d));return'[\x0a'+_0x11b981['join'](',\x0a')+_0x5a2e2a(0x391);},_0x22f893=_0x248cfb['behaviors'][_0x2b333a(0x3cf)](_0x4c09fb=>{const _0x2dac88=_0x2b333a;return _0x2dac88(0x3e4)+_0x4c09fb['table']+_0x2dac88(0x256)+_0x3b96e0(_0x4c09fb['columns'])[_0x2dac88(0x3fb)](/^/gm,'\x20\x20')[_0x2dac88(0x378)]()+_0x2dac88(0x3ec);})[_0x2b333a(0x375)](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x248cfb['database']+_0x2b333a(0x3ac)+_0x248cfb[_0x2b333a(0x266)]+'\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22'+_0x248cfb['parent_id']+_0x2b333a(0x1ec)+_0x248cfb[_0x2b333a(0x1f8)][_0x2b333a(0x1eb)]+_0x2b333a(0x36c)+_0x3b96e0(_0x248cfb['customers'][_0x2b333a(0x3e5)])[_0x2b333a(0x3fb)](/^/gm,'\x20\x20')[_0x2b333a(0x378)]()+_0x2b333a(0x3bf)+_0x22f893+'\x0a\x20\x20]\x0a}\x0a';}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x2c3);['description']=a31_0x461edb(0x1ef);async[a31_0x461edb(0x1f4)](_0x5a7e1f){const _0x517074=a31_0x461edb,{options:_0x5ec092,args:_0x19789d,tdx:_0xdc7a23}=_0x5a7e1f,_0x3dae6a=_0x19789d[0x0]||_0x5ec092[_0x517074(0x2f7)];if(!_0x3dae6a)return showParentSegmentNotSetError(_0x517074(0x2f1)+_0x517074(0x263)),0x1;_0x5ec092[_0x517074(0x207)]&&(console[_0x517074(0x21e)](_0x517074(0x377)+_0x5ec092['site']),console[_0x517074(0x21e)]('Parent\x20segment:\x20'+_0x3dae6a));const _0x4a0a4b=await withSpinner(_0x517074(0x296)+_0x3dae6a+_0x517074(0x3a7),()=>_0xdc7a23['segment']['resolveParentId'](_0x3dae6a),{'verbose':_0x5ec092[_0x517074(0x207)]}),_0x4deb8f=_0x4a0a4b[_0x517074(0x3e3)],_0x4eb946=await withSpinner(_0x517074(0x208)+_0x3dae6a+_0x517074(0x3a7),()=>_0xdc7a23[_0x517074(0x33f)]['getParentSQL'](_0x4deb8f),{'verbose':_0x5ec092[_0x517074(0x207)]}),_0x1114d5=_0x4eb946['data'];return _0x5ec092[_0x517074(0x215)]===_0x517074(0x2cd)||_0x5ec092[_0x517074(0x215)]==='jsonl'?await handleSDKOutput([{'sql':_0x1114d5}],_0x5ec092):console[_0x517074(0x220)](_0x1114d5),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']='segment:parent:show';['description']=a31_0x461edb(0x294);async[a31_0x461edb(0x1f4)](_0x358e3a){const _0xe7236c=a31_0x461edb,{options:_0x1da89e,args:_0xe503f2,tdx:_0xbc9f4c}=_0x358e3a,_0x305eba=_0xe503f2[0x0]||_0x1da89e[_0xe7236c(0x2f7)];if(!_0x305eba)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'+_0xe7236c(0x23e)),0x1;_0x1da89e[_0xe7236c(0x207)]&&(console[_0xe7236c(0x21e)](_0xe7236c(0x377)+_0x1da89e[_0xe7236c(0x2ba)]),console[_0xe7236c(0x21e)](_0xe7236c(0x3e7)+_0x305eba));const _0x493351=await withSpinner(_0xe7236c(0x296)+_0x305eba+_0xe7236c(0x3a7),()=>_0xbc9f4c[_0xe7236c(0x33f)][_0xe7236c(0x398)](_0x305eba),{'verbose':_0x1da89e[_0xe7236c(0x207)]}),_0x5f5405=_0x493351[_0xe7236c(0x3e3)],_0xd1773b=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x305eba+'\x27...',()=>_0xbc9f4c[_0xe7236c(0x33f)]['getParentSQL'](_0x5f5405),{'verbose':_0x1da89e[_0xe7236c(0x207)]});let _0x28070f=_0xd1773b[_0xe7236c(0x3e3)];const _0x3dd498=resolveLimit(_0x1da89e['limit'],DEFAULT_DISPLAY_LIMIT),_0x17023c=/\bLIMIT\s+\d+/i[_0xe7236c(0x280)](_0x28070f);!_0x17023c&&(_0x28070f=_0x28070f[_0xe7236c(0x378)]()[_0xe7236c(0x3fb)](/;+$/,''),_0x28070f='SELECT\x20*\x20FROM\x20(\x0a'+_0x28070f+_0xe7236c(0x34d)+_0x3dd498);_0x1da89e['verbose']&&console[_0xe7236c(0x21e)](_0xe7236c(0x32f)+_0x28070f);const _0x4e9215=await withProgressSpinner(_0xe7236c(0x227),async _0x1d9c7c=>{const _0x12d43f=_0xe7236c,_0x498268=await _0xbc9f4c[_0x12d43f(0x326)][_0x12d43f(0x1f4)](_0x28070f,{'catalog':'td','schema':_0x12d43f(0x24b),'onJobId':_0x472aff=>{const _0x4e2e0a=_0x12d43f;_0x1d9c7c[_0x4e2e0a(0x26a)](_0x472aff);}});return _0x498268;},{'verbose':_0x1da89e['verbose']}),_0x5d1649=_0x4e9215[_0xe7236c(0x3e3)],_0x1cd862=_0x5d1649[_0xe7236c(0x249)]?_0xe7236c(0x3cb)+_0x5d1649[_0xe7236c(0x249)]+']':'';return console[_0xe7236c(0x21e)](_0xe7236c(0x217)+_0x5d1649[_0xe7236c(0x24a)][_0xe7236c(0x3da)]['toLocaleString']()+_0xe7236c(0x221)+('in\x20'+formatElapsed(_0x5d1649[_0xe7236c(0x24a)]['elapsedTimeMillis'])+_0x1cd862)),await handleQueryOutput(_0x5d1649,_0x1da89e),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x347);[a31_0x461edb(0x395)]=a31_0x461edb(0x29a);async['execute'](_0x5ae6c6){const _0x3861b8=a31_0x461edb,{options:_0x2c2e82,args:_0xd00ec1,tdx:_0x3fac45}=_0x5ae6c6,_0x434780=_0xd00ec1[0x0],_0x9dc60f=await withSpinner(_0x434780?_0x3861b8(0x1fc)+_0x434780+_0x3861b8(0x3a7):_0x3861b8(0x3b2),()=>_0x3fac45['realtime']['list'](),{'verbose':_0x2c2e82[_0x3861b8(0x207)]});let _0x40d7f5=_0x9dc60f[_0x3861b8(0x3e3)][_0x3861b8(0x225)](_0x22c054=>_0x22c054[_0x3861b8(0x400)]);if(_0x434780){const _0x145fa3=_0x434780[_0x3861b8(0x3fb)](/[.+^${}()|[\]\\]/g,_0x3861b8(0x302))[_0x3861b8(0x3fb)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x406a8a=new RegExp('^'+_0x145fa3+'$','i');_0x40d7f5=_0x40d7f5[_0x3861b8(0x225)](_0xbdf53a=>_0x406a8a[_0x3861b8(0x280)](_0xbdf53a[_0x3861b8(0x3f3)]));}_0x40d7f5[_0x3861b8(0x2cb)]((_0x5c27ff,_0x5199a1)=>_0x5c27ff[_0x3861b8(0x3f3)][_0x3861b8(0x313)](_0x5199a1['name'])),console[_0x3861b8(0x21e)](_0x3861b8(0x214)+_0x40d7f5[_0x3861b8(0x248)]+_0x3861b8(0x222)+(_0x40d7f5['length']!==0x1?'s':''));const _0x4876a1=_0x2ee59b=>{const _0x14aa08=_0x3861b8;return getConsoleNextUrl(_0x2c2e82[_0x14aa08(0x2ba)],'/app/dw/parentSegments/'+_0x2ee59b);};if(_0x2c2e82[_0x3861b8(0x215)]===_0x3861b8(0x2cd)||_0x2c2e82[_0x3861b8(0x215)]==='jsonl'){const _0x28b7ee=_0x40d7f5[_0x3861b8(0x3cf)](_0x5a36f7=>({..._0x5a36f7,'url':_0x4876a1(_0x5a36f7['id'])}));await handleSDKOutput(_0x28b7ee,_0x2c2e82);}else{if(_0x40d7f5[_0x3861b8(0x248)]===0x0)console[_0x3861b8(0x220)](_0x3861b8(0x33a));else for(const _0x316547 of _0x40d7f5){const _0x3079b9=_0x316547[_0x3861b8(0x3ed)]?a31_0x4004bd[_0x3861b8(0x32a)]('\x20('+formatRows(_0x316547[_0x3861b8(0x3ed)])+')'):'',_0x54fb81=hyperlink(_0x316547[_0x3861b8(0x3f3)],_0x4876a1(_0x316547['id']));console[_0x3861b8(0x220)]('⚡\x20'+_0x54fb81+_0x3079b9);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x461edb(0x3f3)]='ps:rt:validate';['description']=a31_0x461edb(0x3a2);async[a31_0x461edb(0x1f4)](_0x24a39c){const _0x441a47=a31_0x461edb,{options:_0x4e3e61,args:_0x525441,tdx:_0xbc0b6c}=_0x24a39c,_0x25cfe7=_0x525441[0x0]||_0x4e3e61['parentSegment'];if(!_0x25cfe7)return showParentSegmentNotSetError(_0x441a47(0x258)+_0x441a47(0x336)),0x1;const _0x19c256=resolveYamlFile(_0x25cfe7);if(!existsSync(_0x19c256))return showFileNotFoundError(_0x19c256,_0x25cfe7),0x1;let _0x5cb5e9;try{_0x5cb5e9=readFileSync(_0x19c256,_0x441a47(0x2c4));}catch(_0xcff7b8){const _0x8ee95c=_0xcff7b8 instanceof Error?_0xcff7b8['message']:String(_0xcff7b8);return console[_0x441a47(0x21e)](_0x441a47(0x36f)+_0x8ee95c),0x1;}const _0xe3c5bb=createCommandSpinner(a31_0x4004bd['dim'](_0x441a47(0x366)),{'verbose':_0x4e3e61[_0x441a47(0x207)]});_0xe3c5bb['start']();const _0x4ad0bf={'realtime':!![],'onProgress':_0x485b7a=>{const _0x4f21ea=_0x441a47;_0xe3c5bb[_0x4f21ea(0x264)]=formatProgressMessage(_0x485b7a);}};let _0x5b9487;try{_0x5b9487=await _0xbc0b6c[_0x441a47(0x33f)]['validateParentYaml'](_0x5cb5e9,_0x4ad0bf),_0xe3c5bb[_0x441a47(0x3c0)]();}catch(_0x5a1074){_0xe3c5bb[_0x441a47(0x3c0)]();throw _0x5a1074;}console[_0x441a47(0x21e)]('\x0a'+a31_0x4004bd[_0x441a47(0x316)](_0x441a47(0x330))+'\x20'+_0x5b9487[_0x441a47(0x3f3)]),console['error']('═'[_0x441a47(0x401)](0x3c)),displayRealtimeValidation(_0x5b9487),console[_0x441a47(0x21e)]('─'[_0x441a47(0x401)](0x3c));if(_0x5b9487[_0x441a47(0x28b)][_0x441a47(0x248)]>0x0){console[_0x441a47(0x21e)]('\x0a'+a31_0x4004bd[_0x441a47(0x328)](_0x441a47(0x301)));for(const _0x2eb575 of _0x5b9487[_0x441a47(0x28b)]){console[_0x441a47(0x21e)]('\x20\x20'+a31_0x4004bd[_0x441a47(0x328)]('•')+'\x20'+_0x2eb575);}}return _0x5b9487['allValid']&&console[_0x441a47(0x21e)]('\x0a'+a31_0x4004bd[_0x441a47(0x224)]('✔')+_0x441a47(0x35e)),_0x5b9487['allValid']?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x2a8);[a31_0x461edb(0x395)]=a31_0x461edb(0x239);async[a31_0x461edb(0x1f4)](_0x221e0c){const _0x1cf9c4=a31_0x461edb,{options:_0x4d5553,args:_0x51cd38,tdx:_0x1edb7f}=_0x221e0c,_0x5c55cd=_0x51cd38[0x0]||_0x4d5553[_0x1cf9c4(0x2f7)];if(!_0x5c55cd)return showParentSegmentNotSetError(_0x1cf9c4(0x34e)+_0x1cf9c4(0x3e1)),0x1;_0x4d5553[_0x1cf9c4(0x207)]&&(console[_0x1cf9c4(0x21e)](_0x1cf9c4(0x377)+_0x4d5553['site']),console[_0x1cf9c4(0x21e)](_0x1cf9c4(0x3e7)+_0x5c55cd));const _0x3c6ab8=await withSpinner(_0x1cf9c4(0x296)+_0x5c55cd+_0x1cf9c4(0x3a7),()=>_0x1edb7f[_0x1cf9c4(0x33f)][_0x1cf9c4(0x398)](_0x5c55cd),{'verbose':_0x4d5553[_0x1cf9c4(0x207)]}),_0x5ea7ce=_0x3c6ab8[_0x1cf9c4(0x3e3)],_0x35e346=await withSpinner('Listing\x20RT\x20journeys\x20for\x20\x27'+_0x5c55cd+_0x1cf9c4(0x3a7),()=>_0x1edb7f[_0x1cf9c4(0x27a)][_0x1cf9c4(0x28c)](_0x5ea7ce),{'verbose':_0x4d5553['verbose']}),_0x168e3f=_0x35e346['data'];console[_0x1cf9c4(0x21e)](_0x1cf9c4(0x214)+_0x168e3f[_0x1cf9c4(0x248)]+'\x20RT\x20journey'+(_0x168e3f['length']!==0x1?'s':''));if(_0x4d5553[_0x1cf9c4(0x215)]===_0x1cf9c4(0x2cd)||_0x4d5553[_0x1cf9c4(0x215)]===_0x1cf9c4(0x37d))await handleSDKOutput(_0x168e3f,_0x4d5553);else{if(_0x168e3f['length']===0x0)console['log'](_0x1cf9c4(0x203));else for(const _0x183f8e of _0x168e3f){const _0x29b571=_0x183f8e[_0x1cf9c4(0x3bd)]===_0x1cf9c4(0x3b4)?'🚀':'📝',_0x5d3d5f=_0x183f8e[_0x1cf9c4(0x1f1)]?a31_0x4004bd[_0x1cf9c4(0x3c6)](_0x1cf9c4(0x381)):'',_0x3e44cb=a31_0x4004bd[_0x1cf9c4(0x32a)]('\x20('+_0x183f8e['stageCount']+'\x20stage'+(_0x183f8e[_0x1cf9c4(0x3d4)]!==0x1?'s':'')+')');console[_0x1cf9c4(0x220)](_0x29b571+'\x20'+_0x183f8e['name']+_0x5d3d5f+_0x3e44cb);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x2ed);[a31_0x461edb(0x395)]=a31_0x461edb(0x3d2);async[a31_0x461edb(0x1f4)](_0x1f2c6c){const _0x153e73=a31_0x461edb,{options:_0x11366e,args:_0x2487e8,tdx:_0x12476a}=_0x1f2c6c,_0x241739=_0x2487e8[0x0];if(!_0x241739)return console[_0x153e73(0x21e)](a31_0x4004bd['red'](_0x153e73(0x3be))),console[_0x153e73(0x21e)](_0x153e73(0x403)),console[_0x153e73(0x21e)](a31_0x4004bd[_0x153e73(0x32a)]('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x11366e[_0x153e73(0x207)]&&(console[_0x153e73(0x21e)](_0x153e73(0x377)+_0x11366e[_0x153e73(0x2ba)]),console[_0x153e73(0x21e)](_0x153e73(0x392)+_0x241739));const _0x52d3d1=await withSpinner(_0x153e73(0x2b5)+_0x241739+_0x153e73(0x3a7),()=>_0x12476a[_0x153e73(0x27a)][_0x153e73(0x3b1)](_0x241739),{'verbose':_0x11366e['verbose']}),_0x451b47=_0x52d3d1['data'];console['error'](_0x153e73(0x202)+_0x451b47[_0x153e73(0x3f3)]+'\x27');if(_0x11366e[_0x153e73(0x215)]===_0x153e73(0x2cd)||_0x11366e[_0x153e73(0x215)]===_0x153e73(0x37d))await handleSDKOutput([_0x451b47],_0x11366e);else{const _0xc95a6d=_0x451b47[_0x153e73(0x3bd)]===_0x153e73(0x3b4)?'🚀':'📝',_0x4ef765=_0x451b47[_0x153e73(0x1f1)]?a31_0x4004bd[_0x153e73(0x3c6)]('\x20(paused)'):'';console[_0x153e73(0x220)](_0xc95a6d+'\x20'+_0x451b47[_0x153e73(0x3f3)]+_0x4ef765);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x293);[a31_0x461edb(0x395)]=a31_0x461edb(0x2ef);async[a31_0x461edb(0x1f4)](_0x46dfc4){const _0x38e0c7=a31_0x461edb,{options:_0x2ee31b,args:_0x260080,tdx:_0x349391}=_0x46dfc4,_0x565c94=_0x260080[0x0];if(!_0x565c94)return console[_0x38e0c7(0x21e)](a31_0x4004bd[_0x38e0c7(0x328)](_0x38e0c7(0x3be))),console[_0x38e0c7(0x21e)](_0x38e0c7(0x32b)),console[_0x38e0c7(0x21e)](a31_0x4004bd['dim']('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x2ee31b[_0x38e0c7(0x207)]&&(console[_0x38e0c7(0x21e)](_0x38e0c7(0x377)+_0x2ee31b['site']),console[_0x38e0c7(0x21e)](_0x38e0c7(0x392)+_0x565c94));const _0x8c3e36=await withSpinner(_0x38e0c7(0x402)+_0x565c94+_0x38e0c7(0x3a7),()=>_0x349391['realtime']['resumeJourney'](_0x565c94),{'verbose':_0x2ee31b[_0x38e0c7(0x207)]}),_0x3016f=_0x8c3e36[_0x38e0c7(0x3e3)];console['error'](_0x38e0c7(0x3f4)+_0x3016f[_0x38e0c7(0x3f3)]+'\x27');if(_0x2ee31b[_0x38e0c7(0x215)]===_0x38e0c7(0x2cd)||_0x2ee31b[_0x38e0c7(0x215)]==='jsonl')await handleSDKOutput([_0x3016f],_0x2ee31b);else{const _0x1b4652=_0x3016f[_0x38e0c7(0x3bd)]===_0x38e0c7(0x3b4)?'🚀':'📝',_0x442e6a=_0x3016f['paused']?a31_0x4004bd[_0x38e0c7(0x3c6)](_0x38e0c7(0x381)):'';console[_0x38e0c7(0x220)](_0x1b4652+'\x20'+_0x3016f[_0x38e0c7(0x3f3)]+_0x442e6a);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a31_0x461edb(0x39c);['description']=a31_0x461edb(0x3d7);async['execute'](_0x278dc4){const _0x321fad=a31_0x461edb,{options:_0x66d5e7,args:_0x352f09,tdx:_0x3545b3}=_0x278dc4,_0x302ced=_0x352f09[0x0]||_0x66d5e7[_0x321fad(0x2f7)];if(!_0x302ced)return showParentSegmentNotSetError(_0x321fad(0x23f)+_0x321fad(0x2b8)),0x1;_0x66d5e7['verbose']&&(console[_0x321fad(0x21e)]('Site:\x20'+_0x66d5e7['site']),console[_0x321fad(0x21e)]('Parent\x20segment:\x20'+_0x302ced));const _0x2ac09e=await withSpinner(_0x321fad(0x296)+_0x302ced+_0x321fad(0x3a7),()=>_0x3545b3[_0x321fad(0x33f)][_0x321fad(0x398)](_0x302ced),{'verbose':_0x66d5e7[_0x321fad(0x207)]}),_0x1cdced=_0x2ac09e[_0x321fad(0x3e3)],_0x665330=await withSpinner(_0x321fad(0x216)+_0x302ced+_0x321fad(0x3a7),()=>_0x3545b3[_0x321fad(0x27a)][_0x321fad(0x3c5)](_0x1cdced),{'verbose':_0x66d5e7['verbose']}),_0x79eae8=_0x665330[_0x321fad(0x3e3)];return console[_0x321fad(0x21e)](_0x321fad(0x34f)),_0x66d5e7['format']===_0x321fad(0x2cd)||_0x66d5e7[_0x321fad(0x215)]===_0x321fad(0x37d)?await handleSDKOutput([_0x79eae8],_0x66d5e7):(console[_0x321fad(0x220)](_0x321fad(0x348)+_0x79eae8['id']),console[_0x321fad(0x220)](_0x321fad(0x28a)+_0x79eae8[_0x321fad(0x2d8)]),console[_0x321fad(0x220)]('identifier:\x20'+_0x79eae8[_0x321fad(0x29b)]),console['log'](_0x321fad(0x321)+_0x79eae8[_0x321fad(0x247)]),console['log'](_0x321fad(0x339)+_0x79eae8[_0x321fad(0x317)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{['name']='ps:pz:service:list';['description']=a31_0x461edb(0x3c4);async['execute'](_0x20b8ad){const _0x23c166=a31_0x461edb,{options:_0x7de3f4,args:_0x23aa4a,tdx:_0x42cbd9}=_0x20b8ad,_0x48edd2=_0x23aa4a[0x0]||_0x7de3f4[_0x23c166(0x2f7)];if(!_0x48edd2)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'+_0x23c166(0x205)),0x1;const _0x460269=await withSpinner(_0x23c166(0x296)+_0x48edd2+'\x27...',()=>_0x42cbd9[_0x23c166(0x33f)][_0x23c166(0x398)](_0x48edd2),{'verbose':_0x7de3f4[_0x23c166(0x207)]}),_0x2c974e=_0x460269[_0x23c166(0x3e3)],_0x5659f7=await withSpinner(_0x23c166(0x3c7)+_0x48edd2+_0x23c166(0x3a7),()=>_0x42cbd9[_0x23c166(0x399)][_0x23c166(0x290)](_0x2c974e),{'verbose':_0x7de3f4[_0x23c166(0x207)]}),_0x233564=_0x5659f7[_0x23c166(0x3e3)];console[_0x23c166(0x21e)](_0x23c166(0x214)+_0x233564[_0x23c166(0x248)]+'\x20personalization\x20service'+(_0x233564['length']!==0x1?'s':''));if(_0x7de3f4[_0x23c166(0x215)]==='json'||_0x7de3f4[_0x23c166(0x215)]==='jsonl')await handleSDKOutput(_0x233564,_0x7de3f4);else{if(_0x233564[_0x23c166(0x248)]===0x0)console[_0x23c166(0x220)]('No\x20personalization\x20services\x20configured'),console[_0x23c166(0x21e)](a31_0x4004bd[_0x23c166(0x20e)](_0x23c166(0x3d0)));else for(const _0x5f3d67 of _0x233564){console[_0x23c166(0x220)](a31_0x4004bd[_0x23c166(0x316)](_0x5f3d67[_0x23c166(0x3f3)])+'\x20'+a31_0x4004bd[_0x23c166(0x32a)](_0x23c166(0x39f)+_0x5f3d67['id']+')'));_0x5f3d67[_0x23c166(0x395)]&&console[_0x23c166(0x220)]('\x20\x20'+a31_0x4004bd[_0x23c166(0x32a)](_0x5f3d67[_0x23c166(0x395)]));if(_0x5f3d67[_0x23c166(0x3f1)]&&_0x5f3d67['tokens'][_0x23c166(0x248)]>0x0)for(const _0x162364 of _0x5f3d67['tokens']){const _0x22bcd2=_0x162364[_0x23c166(0x365)]?.[_0x23c166(0x248)]?_0x162364[_0x23c166(0x365)][_0x23c166(0x375)](',\x20'):_0x23c166(0x209);console[_0x23c166(0x220)]('\x20\x20'+a31_0x4004bd[_0x23c166(0x20e)](_0x23c166(0x2a4))+'\x20'+_0x162364[_0x23c166(0x3f3)]+'\x20'+a31_0x4004bd[_0x23c166(0x32a)]('(id:\x20'+_0x162364['id']+')')),console[_0x23c166(0x220)](_0x23c166(0x2aa)+a31_0x4004bd[_0x23c166(0x32a)](_0x23c166(0x27c))+'\x20'+_0x22bcd2);}else console[_0x23c166(0x220)]('\x20\x20'+a31_0x4004bd[_0x23c166(0x32a)](_0x23c166(0x2a5)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0x461edb(0x3f3)]='ps:pz:service:create';['description']=a31_0x461edb(0x24f);async[a31_0x461edb(0x1f4)](_0x8ee65f){const _0x1d8616=a31_0x461edb,{options:_0x4945b8,args:_0x1e28ab,tdx:_0x101f9f}=_0x8ee65f,_0x438533=_0x4945b8,_0x283e78=_0x1e28ab[0x0],_0x1e0216=_0x1e28ab[0x1]||_0x4945b8[_0x1d8616(0x2f7)];if(!_0x283e78)return console[_0x1d8616(0x21e)]('Error:\x20Service\x20name\x20is\x20required'),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]'),console[_0x1d8616(0x21e)](_0x1d8616(0x3ef)),0x1;if(!_0x1e0216)return showParentSegmentNotSetError(_0x1d8616(0x285)+_0x1d8616(0x3ef)),0x1;const _0x2e6d54=await withSpinner(_0x1d8616(0x296)+_0x1e0216+_0x1d8616(0x3a7),()=>_0x101f9f[_0x1d8616(0x33f)]['resolveParentId'](_0x1e0216),{'verbose':_0x4945b8[_0x1d8616(0x207)]}),_0x4ae2b0=_0x2e6d54[_0x1d8616(0x3e3)],_0x22157d={'name':_0x283e78,'description':_0x438533[_0x1d8616(0x395)],'public':_0x438533[_0x1d8616(0x324)]},_0x51ffa8=await withSpinner(_0x1d8616(0x1fb)+_0x283e78+_0x1d8616(0x3a7),()=>_0x101f9f[_0x1d8616(0x399)][_0x1d8616(0x2a2)](_0x4ae2b0,_0x22157d),{'verbose':_0x4945b8['verbose']}),_0x1ed231=_0x51ffa8['data'];return console['error'](_0x1d8616(0x331)+_0x1ed231['name']+'\x27\x20with\x20ID:\x20'+_0x1ed231['id']),await handleSDKOutput([_0x1ed231],_0x4945b8),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x3b0);[a31_0x461edb(0x395)]=a31_0x461edb(0x329);async['execute'](_0x46736e){const _0x2e6465=a31_0x461edb,{options:_0x43a00b,args:_0x24d715,tdx:_0x5ba6a5}=_0x46736e,_0x5b75a2=_0x24d715[0x0],_0xa8eded=_0x24d715[0x1]||_0x43a00b[_0x2e6465(0x2f7)];if(!_0x5b75a2)return console['error'](_0x2e6465(0x2f8)),console[_0x2e6465(0x21e)](_0x2e6465(0x287)),console['error'](_0x2e6465(0x2b0)),0x1;if(!_0xa8eded)return showParentSegmentNotSetError(_0x2e6465(0x387)+_0x2e6465(0x2b0)),0x1;const _0x51cd12=await withSpinner(_0x2e6465(0x296)+_0xa8eded+_0x2e6465(0x3a7),()=>_0x5ba6a5['segment']['resolveParentId'](_0xa8eded),{'verbose':_0x43a00b['verbose']}),_0x4db57f=_0x51cd12[_0x2e6465(0x3e3)],_0x48f519=await withSpinner(_0x2e6465(0x38b)+_0x5b75a2+'\x27...',()=>_0x5ba6a5[_0x2e6465(0x399)]['get'](_0x4db57f,_0x5b75a2),{'verbose':_0x43a00b[_0x2e6465(0x207)]}),_0x2fbd47=_0x48f519[_0x2e6465(0x3e3)];if(_0x43a00b[_0x2e6465(0x2cd)]||_0x43a00b[_0x2e6465(0x37d)])await handleSDKOutput([_0x2fbd47],_0x43a00b);else{console['log'](a31_0x4004bd[_0x2e6465(0x316)](_0x2fbd47[_0x2e6465(0x3f3)])+'\x20'+a31_0x4004bd[_0x2e6465(0x32a)](_0x2e6465(0x39f)+_0x2fbd47['id']+')'));_0x2fbd47['description']&&console['log']('\x20\x20'+a31_0x4004bd[_0x2e6465(0x32a)](_0x2fbd47['description']));console[_0x2e6465(0x220)]('\x20\x20'+a31_0x4004bd[_0x2e6465(0x20e)](_0x2e6465(0x201))+'\x20'+(_0x2fbd47[_0x2e6465(0x324)]?'yes':'no'));if(_0x2fbd47['tokens']&&_0x2fbd47[_0x2e6465(0x3f1)]['length']>0x0)for(const _0xb7a6a of _0x2fbd47['tokens']){const _0x30f57a=_0xb7a6a[_0x2e6465(0x365)]?.['length']?_0xb7a6a[_0x2e6465(0x365)][_0x2e6465(0x375)](',\x20'):_0x2e6465(0x209);console[_0x2e6465(0x220)]('\x20\x20'+a31_0x4004bd[_0x2e6465(0x20e)](_0x2e6465(0x2a4))+'\x20'+_0xb7a6a[_0x2e6465(0x3f3)]+'\x20'+a31_0x4004bd['dim'](_0x2e6465(0x39f)+_0xb7a6a['id']+')')),console[_0x2e6465(0x220)](_0x2e6465(0x2aa)+a31_0x4004bd[_0x2e6465(0x32a)](_0x2e6465(0x27c))+'\x20'+_0x30f57a);}else console[_0x2e6465(0x220)]('\x20\x20'+a31_0x4004bd[_0x2e6465(0x32a)]('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x3af);[a31_0x461edb(0x395)]=a31_0x461edb(0x1f3);async['execute'](_0x1c2cdf){const _0x50b613=a31_0x461edb,{options:_0x15473b,args:_0x4c6cda,tdx:_0xab82c4}=_0x1c2cdf,_0x9386de=_0x4c6cda[0x0],_0x2fb48b=_0x4c6cda[0x1]||_0x15473b[_0x50b613(0x2f7)];if(!_0x9386de)return console[_0x50b613(0x21e)](_0x50b613(0x2f8)),console['error'](_0x50b613(0x3bb)),console[_0x50b613(0x21e)](_0x50b613(0x369)),0x1;if(!_0x2fb48b)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a'+_0x50b613(0x369)),0x1;const _0x3e6f97=await withSpinner(_0x50b613(0x296)+_0x2fb48b+_0x50b613(0x3a7),()=>_0xab82c4[_0x50b613(0x33f)]['resolveParentId'](_0x2fb48b),{'verbose':_0x15473b[_0x50b613(0x207)]}),_0x2c15a0=_0x3e6f97[_0x50b613(0x3e3)];return await withSpinner(_0x50b613(0x2b7)+_0x9386de+_0x50b613(0x3a7),()=>_0xab82c4[_0x50b613(0x399)]['delete'](_0x2c15a0,_0x9386de),{'verbose':_0x15473b[_0x50b613(0x207)]}),console[_0x50b613(0x21e)]('✔\x20Deleted\x20personalization\x20service\x20\x27'+_0x9386de+'\x27'),0x0;}}function a31_0x3f6f(){const _0x4d559f=['\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','Behaviors','site','\x20+\x20[','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','displayValidateResults','Available\x20attributes:','foreignKey','To\x20cancel:','\x0aError:','Error:\x20--attribute\x20requires\x20a\x20name\x0a','segment:parent:sql','utf-8','\x20parent\x20segment','sections:','joinKey','Behavior:','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','Output\x20Database:','sort','Delete\x20a\x20realtime\x20personalization','json','\x20=\x20','split','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','\x20personalization','personalizationServices','Deleting\x20token\x20\x27','No\x20personalizations\x20configured','✘\x20Failed\x20to\x20rename\x20directory:\x20','\x20total','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','audienceId','displayRealtimeInfo','isDirectory','⚡\x20Enabled','darwin','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>]','displayBehaviorsStats','keys','\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}','segment:parent:update','last_page_viewed','Updated','listPersonalizations','xdg-open','✔\x20Updated\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','✔\x20Deleted\x20personalization\x20\x27','\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','all','customerGroupFile','ps:rt:jn:pause','List\x20parent\x20segments','Resume\x20activations\x20in\x20an\x20RT\x20journey','session','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','payload:','sourceTableValid','displaySummary','includeSensitive','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','parentSegment','Error:\x20Service\x20ID\x20is\x20required','valid','2ApLfcq','/\x20→\x20','\x0aNo\x20sample\x20data\x20available','preview','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','Error:\x20Token\x20\x27','Errors:','\x5c$&','addBehaviorsFile','YAML\x20file:\x20','folderId','Source:','/attempt/','entryCriteria','toLowerCase','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','\x27\x20is\x20already\x20up\x20to\x20date','\x20rows)','unref','%)\x20','Fetching\x20current\x20configuration\x20for\x20\x27','file','1589HOwrGS','\x20--interval\x20','localeCompare','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','number','bold','status','enabled','No\x20parent\x20segments\x20match\x20pattern:\x20','Show\x20a\x20specific\x20realtime\x20personalization','ps:pz:show','👥\x20','\x20\x20Database:\x20','behaviorsFile','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','Attributes','eventKind:\x20','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','true','public','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','query','Attribute:','red','Show\x20personalization\x20service\x20details','dim','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','segment:parent:list','page_view','.customers)','SQL\x20query:\x0a','RT\x202.0\x20Validate:','✔\x20Created\x20personalization\x20service\x20\x27','\x20\x20\x20\x20\x20\x20','pushParentYaml','Validating\x20configuration...','endsWith','\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','Apply\x20changes\x20to\x20\x27','personalization_services','status:\x20','No\x20RT-enabled\x20parent\x20segments\x20found','Join\x20on:','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','win32','updated:','segment','some','use','includeSensitive:','collectSchema','SELECT\x20*\x20FROM\x20','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Listing\x20parent\x20segments...','ps:rt:list','id:\x20','rowCount','tdx\x20ps\x20push\x20','ps:pz:service:token:delete','displayAttributesStats','\x0a)\x20AS\x20segment_query\x0aLIMIT\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','✔\x20Retrieved\x20RT\x20configuration\x20version','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','segment:parent:run','Error\x20parsing\x20YAML:\x20','attribute','✔\x20Created\x20token\x20\x27','interval','Options:\x0a','✔\x20Updated\x20personalization\x20service\x20\x27','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20Configuration\x20is\x20valid','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','✔\x20Updated\x20personalization\x20\x27','/\x20directory.\x0a','\x20--attribute\x20\x22<name>\x22','\x20RT\x20configuration\x20is\x20valid','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','\x20\x20Tables:\x201\x20customers\x20+\x20','idStitching','payload','getBehaviorNames','parent_segments','allowedIps','Validating\x20RT\x20configuration...','behavior','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','segment:parent:preview','toFixed','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','.yml','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','Error\x20reading\x20file:\x20','ignore','pullParentYaml','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','output','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','join','\x0a✔\x20Workflow\x20started','Site:\x20','trim','displayColumns','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','Status:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','jsonl','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','value','-1d','\x20(paused)','\x27\x20with\x20ID:\x20','Finding\x20service\x20for\x20token...','formatSchemaJson','single','\x20field','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','Overwrite\x20\x27','Personalization:','Fetching\x20personalization\x20service\x20\x27','\x20--attribute\x20\x22','\x22\x20}','sourceTableError','label','Validate:','\x0a\x20\x20\x20\x20]','RT\x20Journey\x20ID:\x20','keyEventId','\x20\x20Note:\x20','description','Name:\x20','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','resolveParentId','personalization','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','behaviors','ps:rt:configuration_versions','patchPersonalization','\x20\x202.\x20Run\x20','(id:\x20','Error:\x20File\x20not\x20found:\x20','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','null','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','To\x20view\x20sample\x20data:','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','\x27...','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','Rows:','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','ps:pz:init','ps:pz:service:delete','ps:pz:service:show','pauseJourney','Listing\x20RT-enabled\x20parent\x20segments...','Master\x20Table','launched','\x0a⚠️\x20\x20Both\x20','\x20to\x20push\x20the\x20configuration','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','getParentFull','\x0aChanges\x20to\x20apply\x20to\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','attributes','state','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','stop','\x20behaviors','customerPercent','ps:pz:patch','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','getCurrentConfigVersion','yellow','Listing\x20personalization\x20services\x20for\x20\x27','/\x20directories\x20exist.','\x20kill','✔\x20No\x20changes\x20-\x20\x27','\x20[Job\x20ID:\x20','3121490dOQlLZ','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','ps:pz:list','map','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','addAttributesFile','Pause\x20activations\x20in\x20an\x20RT\x20journey','createParent','stageCount','Error:\x20Parent\x20segment\x20name\x20is\x20required','\x20\x20No\x20sample\x20data\x20available','Get\x20current\x20RT\x20configuration\x20version\x20status','string','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','processedRows','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Fetching\x20behavior\x20list...','Customers:','⚡\x20Not\x20enabled','\x27\x20and\x20run\x20workflow?','Next\x20steps:','\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','/app/workflows/','data','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','columns','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','Parent\x20segment:\x20','keyEventCriteria','workflowAttemptId','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','scheduleOption','\x0a\x20\x20\x20\x20}','population','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','\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\x20patch\x20<id>\x20--file\x20<path>','tokens','matchedCount','name','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','segment:parent:validate','Error:\x20--behavior\x20requires\x20a\x20name\x0a','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','\x22,\x20\x22type\x22:\x20\x22','\x27\x20is\x20up\x20to\x20date','replace','ps:pz:create','Creating\x20token\x20\x27','column_type','Creating','realtime_enabled','repeat','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','allValid','previewParentYaml','tdx\x20ps\x20preview\x20','table','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','Create\x20parent\x20segment\x20\x27','Get\x20SQL\x20query\x20for\x20parent\x20segment','495241TePtUt','paused','\x20\x20\x20\x20-\x20','Delete\x20a\x20personalization\x20service','execute','15816qbhAYC','segment:parent:desc','Session:','customers','run','primaryKey','Creating\x20personalization\x20service\x20\x27','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','sections','createdAt','9186iqjmaU','platform','public:','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','No\x20RT\x20journeys\x20found','19340zZizPK','\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','ps:pz:service:update','verbose','Fetching\x20SQL\x20for\x20\x27','any','dirname','column_name','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','displaySampleData','cyan','column','scheduleType','Show\x20parent\x20segment\x20details','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x20\x20Columns:\x20','✔\x20Found\x20','format','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','✔\x20Query\x20completed:\x20Processed\x20','147EHTFGd','Aborted.','1894845SOmapl','workflowSessionId','Error:\x20Personalization\x20ID\x20is\x20required','\x0aUsage:\x20tdx\x20ps\x20preview\x20','error','Found\x20YAML\x20file:\x20','log','\x20rows\x20','\x20RT-enabled\x20parent\x20segment','created:','green','filter','apply','Executing\x20parent\x20segment\x20query...','schemaValid','\x20tdx\x20wf\x20attempt\x20','Creating\x20personalization\x20\x27','segment:parent:create','indexOf','td_client_id','Schema\x20saved\x20to\x20','<database>.<table>','My\x20Service','Updating','\x20is\x20already\x20up\x20to\x20date','\x0aChanges\x20to\x20\x27','Fetching\x20parent\x20segment\x20\x27','deletePersonalization','\x20\x201.\x20Edit\x20','ps:pz:service:token:create','Table:\x20','List\x20RT\x20journeys','/app/dw/parentSegments/','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','displayPreviewHints','Updating\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','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','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','Getting\x20personalization\x20\x27','9182206SOoVbg','\x20parent\x20segment\x20\x27','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','No\x20parent\x20segments\x20found','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','eventKind','length','jobId','stats','information_schema','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','totalEvents','\x0aNew\x20parent\x20segment\x20\x27','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','stitchingKeys','Deleting\x20personalization\x20\x27','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20configured','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','Join:','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','Enriched:','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','Fetching\x20customers\x20schema...','patch','Error:','\x20Context\x20set:\x20','customersWithEvents','addAttributes','\x27\x20(id:\x20','updateParent','segment:parent:view','validateParentYaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','text','message','parent_segment','\x20service','\x20\x20\x20','database','setJobId','entryCriteria:','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Events:','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','✔\x20Renamed\x20directory\x20to\x20','Listing\x20personalizations\x20for\x20\x27','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','yes','enriched','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','\x20--behavior\x20\x22<name>\x22','Update\x20a\x20realtime\x20personalization\x20entity','\x20Opening\x20','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','/{name}.yml\x0a','realtime','match','allowed\x20IPs:','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','\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','sampleData','test','Create\x20a\x20realtime\x20personalization\x20entity','getOutputDatabaseName','start','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','master','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','coveragePercent','\x20service(s)\x20configured','audienceId:\x20','errors','listJourneys','parentFolder','listFields','Available\x20behaviors:','list','user_id','customerGroup','ps:rt:jn:resume','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','1683iMMVgj','Resolving\x20parent\x20segment\x20\x27','Pattern:\x20','\x20to\x20configure\x20your\x20personalization\x20service','Error:\x20--name\x20is\x20required','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','identifier','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','segment:parent:pull','schemaError','reduce','Error:\x20Token\x20name\x20is\x20required','getParentSQL','create','segment:parent:fields','token:','no\x20tokens\x20configured','Options\x20(one\x20required):\x0a','Analyzing\x20changes...','ps:rt:jn:list','displayPreviewResults','\x20\x20\x20\x20','timezone','folder-segment','relationships','type','Master\x20+\x20Attributes','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','FINISHED','✔\x20Created\x20parent\x20segment\x20\x27','Attributes:','listParents','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','web','Deleting\x20personalization\x20service\x20\x27'];a31_0x3f6f=function(){return _0x4d559f;};return a31_0x3f6f();}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x206);['description']='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async[a31_0x461edb(0x1f4)](_0x2b66c7){const _0x28aa40=a31_0x461edb,{options:_0x1a942c,args:_0x225fb4,tdx:_0x27dcab}=_0x2b66c7,_0x2c6edf=_0x1a942c,_0x8f214d=_0x225fb4[0x0],_0x46fc5c=_0x225fb4[0x1]||_0x1a942c['parentSegment'];if(!_0x8f214d)return console[_0x28aa40(0x21e)](_0x28aa40(0x2f8)),console['error'](_0x28aa40(0x2dd)),console[_0x28aa40(0x21e)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x2c6edf[_0x28aa40(0x3f3)])return console[_0x28aa40(0x21e)](_0x28aa40(0x299)),console[_0x28aa40(0x21e)](_0x28aa40(0x2dd)),0x1;if(!_0x46fc5c)return showParentSegmentNotSetError(_0x28aa40(0x314)+_0x28aa40(0x31f)),0x1;const _0x582778=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x46fc5c+_0x28aa40(0x3a7),()=>_0x27dcab['segment'][_0x28aa40(0x398)](_0x46fc5c),{'verbose':_0x1a942c['verbose']}),_0x857818=_0x582778['data'],_0x543d55={'name':_0x2c6edf[_0x28aa40(0x3f3)]};_0x2c6edf['description']!==undefined&&(_0x543d55[_0x28aa40(0x395)]=_0x2c6edf[_0x28aa40(0x395)]);const _0x26d090=await withSpinner('Updating\x20personalization\x20service\x20\x27'+_0x8f214d+_0x28aa40(0x3a7),()=>_0x27dcab[_0x28aa40(0x399)][_0x28aa40(0x25a)](_0x857818,_0x8f214d,_0x543d55),{'verbose':_0x1a942c['verbose']}),_0x58b988=_0x26d090[_0x28aa40(0x3e3)];return console[_0x28aa40(0x21e)](_0x28aa40(0x357)+_0x58b988[_0x28aa40(0x3f3)]+'\x27'),await handleSDKOutput([_0x58b988],_0x1a942c),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{['name']=a31_0x461edb(0x237);[a31_0x461edb(0x395)]=a31_0x461edb(0x26c);async[a31_0x461edb(0x1f4)](_0x4f0309){const _0x14c338=a31_0x461edb,{options:_0x108429,args:_0x12ff74,tdx:_0x3486a7}=_0x4f0309,_0x92345d=_0x108429,_0x1333eb=_0x12ff74[0x0],_0x45c8a7=_0x12ff74[0x1],_0x110f83=_0x12ff74[0x2]||_0x108429[_0x14c338(0x2f7)];if(!_0x1333eb)return console[_0x14c338(0x21e)](_0x14c338(0x2a0)),console[_0x14c338(0x21e)](_0x14c338(0x2e8)),console[_0x14c338(0x21e)](_0x14c338(0x325)),0x1;if(!_0x45c8a7)return console['error'](_0x14c338(0x2f8)),console[_0x14c338(0x21e)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x14c338(0x21e)](_0x14c338(0x325)),0x1;if(!_0x110f83)return showParentSegmentNotSetError(_0x14c338(0x29c)+_0x14c338(0x325)),0x1;const _0x59a5ed=await withSpinner(_0x14c338(0x296)+_0x110f83+_0x14c338(0x3a7),()=>_0x3486a7['segment'][_0x14c338(0x398)](_0x110f83),{'verbose':_0x108429[_0x14c338(0x207)]}),_0x55b8cc=_0x59a5ed[_0x14c338(0x3e3)],_0x397f7e={'name':_0x1333eb};_0x92345d[_0x14c338(0x365)]&&(_0x397f7e[_0x14c338(0x365)]=_0x92345d[_0x14c338(0x365)][_0x14c338(0x2cf)](',')[_0x14c338(0x3cf)](_0x26aba1=>_0x26aba1[_0x14c338(0x378)]()));_0x92345d[_0x14c338(0x395)]&&(_0x397f7e[_0x14c338(0x395)]=_0x92345d[_0x14c338(0x395)]);const _0x26c5b6=await withSpinner(_0x14c338(0x3fd)+_0x1333eb+'\x27\x20for\x20service\x20\x27'+_0x45c8a7+_0x14c338(0x3a7),()=>_0x3486a7['personalization']['createToken'](_0x55b8cc,_0x45c8a7,_0x397f7e),{'verbose':_0x108429['verbose']}),_0x5b04d0=_0x26c5b6['data'];return console[_0x14c338(0x21e)](_0x14c338(0x354)+_0x5b04d0[_0x14c338(0x3f3)]+_0x14c338(0x382)+_0x5b04d0['id']),_0x5b04d0[_0x14c338(0x37f)]&&(console['error'](a31_0x4004bd[_0x14c338(0x3c6)](_0x14c338(0x3a9))),console['error'](a31_0x4004bd['cyan'](_0x5b04d0[_0x14c338(0x37f)])),console[_0x14c338(0x21e)]('')),await handleSDKOutput([_0x5b04d0],_0x108429),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x34b);[a31_0x461edb(0x395)]=a31_0x461edb(0x3ee);async[a31_0x461edb(0x1f4)](_0x487d9a){const _0x891607=a31_0x461edb,{options:_0x48a4b2,args:_0x4485df,tdx:_0x40fecf}=_0x487d9a,_0x15dc9e=_0x4485df[0x0],_0x55e5b4=_0x4485df[0x1]||_0x48a4b2[_0x891607(0x2f7)];if(!_0x15dc9e)return console[_0x891607(0x21e)]('Error:\x20Token\x20ID\x20is\x20required'),console[_0x891607(0x21e)](_0x891607(0x1ed)),console[_0x891607(0x21e)](_0x891607(0x2bc)),0x1;if(!_0x55e5b4)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a'+_0x891607(0x2bc)),0x1;const _0x42b4b5=await withSpinner(_0x891607(0x296)+_0x55e5b4+'\x27...',()=>_0x40fecf[_0x891607(0x33f)][_0x891607(0x398)](_0x55e5b4),{'verbose':_0x48a4b2['verbose']}),_0x154394=_0x42b4b5[_0x891607(0x3e3)],_0x465bab=await withSpinner(_0x891607(0x383),()=>_0x40fecf[_0x891607(0x399)][_0x891607(0x290)](_0x154394),{'verbose':_0x48a4b2[_0x891607(0x207)]}),_0x2c23b4=_0x465bab[_0x891607(0x3e3)];let _0x3b97dd;for(const _0xce45be of _0x2c23b4){if(_0xce45be['tokens']?.[_0x891607(0x340)](_0x70dfeb=>_0x70dfeb['id']===_0x15dc9e)){_0x3b97dd=_0xce45be['id'];break;}}if(!_0x3b97dd)return console[_0x891607(0x21e)](_0x891607(0x300)+_0x15dc9e+'\x27\x20not\x20found\x20in\x20any\x20personalization\x20service'),0x1;const _0x372e2d=await withSpinner(_0x891607(0x2d3)+_0x15dc9e+_0x891607(0x3a7),()=>_0x40fecf[_0x891607(0x399)]['deleteToken'](_0x154394,_0x3b97dd,_0x15dc9e),{'verbose':_0x48a4b2[_0x891607(0x207)]}),_0x2ce878=_0x372e2d[_0x891607(0x3e3)];return console[_0x891607(0x21e)]('✔\x20Deleted\x20token\x20\x27'+(_0x2ce878[_0x891607(0x3f3)]||_0x15dc9e)+'\x27'),await handleSDKOutput([_0x2ce878],_0x48a4b2),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x3ce);['description']='List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment';async['execute'](_0x1a0174){const _0x3e6a2f=a31_0x461edb,{options:_0xb704b1,args:_0x5b248e,tdx:_0x528686}=_0x1a0174,_0x421298=_0x5b248e[0x0]||_0xb704b1[_0x3e6a2f(0x2f7)];if(!_0x421298)return showParentSegmentNotSetError(_0x3e6a2f(0x246)+_0x3e6a2f(0x27e)),0x1;const _0x2909e5=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x421298+_0x3e6a2f(0x3a7),()=>_0x528686[_0x3e6a2f(0x33f)][_0x3e6a2f(0x398)](_0x421298),{'verbose':_0xb704b1['verbose']}),_0x3c1cae=_0x2909e5['data'],_0x49c0c5=await withSpinner(_0x3e6a2f(0x270)+_0x421298+'\x27...',()=>_0x528686['personalization'][_0x3e6a2f(0x2e5)](_0x3c1cae),{'verbose':_0xb704b1[_0x3e6a2f(0x207)]}),_0x1b4bd8=_0x49c0c5['data'];console['error'](_0x3e6a2f(0x214)+_0x1b4bd8[_0x3e6a2f(0x248)]+_0x3e6a2f(0x2d1)+(_0x1b4bd8['length']!==0x1?'s':''));if(_0xb704b1[_0x3e6a2f(0x215)]===_0x3e6a2f(0x2cd)||_0xb704b1[_0x3e6a2f(0x215)]===_0x3e6a2f(0x37d))await handleSDKOutput(_0x1b4bd8,_0xb704b1);else{if(_0x1b4bd8[_0x3e6a2f(0x248)]===0x0)console[_0x3e6a2f(0x220)](_0x3e6a2f(0x2d4));else for(const _0x591eea of _0x1b4bd8){console[_0x3e6a2f(0x220)](a31_0x4004bd[_0x3e6a2f(0x316)](_0x591eea[_0x3e6a2f(0x3f3)])+'\x20'+a31_0x4004bd[_0x3e6a2f(0x32a)](_0x3e6a2f(0x39f)+_0x591eea['id']+')'));_0x591eea[_0x3e6a2f(0x395)]&&console[_0x3e6a2f(0x220)]('\x20\x20'+a31_0x4004bd['dim'](_0x591eea['description']));const _0x5dae47=_0x591eea[_0x3e6a2f(0x1fd)]?.[_0x3e6a2f(0x248)]||0x0;console[_0x3e6a2f(0x220)]('\x20\x20'+a31_0x4004bd[_0x3e6a2f(0x20e)](_0x3e6a2f(0x2c6))+'\x20'+_0x5dae47);if(_0x591eea['sections']&&_0x591eea[_0x3e6a2f(0x1fd)][_0x3e6a2f(0x248)]>0x0)for(const _0x43a89c of _0x591eea['sections']){console['log'](_0x3e6a2f(0x1f2)+_0x43a89c[_0x3e6a2f(0x3f3)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x31b);[a31_0x461edb(0x395)]=a31_0x461edb(0x31a);async['execute'](_0x1f18e6){const _0x36f2b8=a31_0x461edb,{options:_0x14057d,args:_0x2c0c39,tdx:_0x1816e5}=_0x1f18e6,_0x144ff2=_0x2c0c39[0x0];if(!_0x144ff2)return console['error'](_0x36f2b8(0x21c)),console[_0x36f2b8(0x21e)]('Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>'),0x1;const _0x4e1a87=await withSpinner(_0x36f2b8(0x241)+_0x144ff2+_0x36f2b8(0x3a7),()=>_0x1816e5[_0x36f2b8(0x399)]['getPersonalization'](_0x144ff2),{'verbose':_0x14057d[_0x36f2b8(0x207)]}),_0x6f36d4=_0x4e1a87[_0x36f2b8(0x3e3)];console['error']('✔\x20Found\x20personalization\x20\x27'+_0x6f36d4[_0x36f2b8(0x3f3)]+'\x27');if(_0x14057d[_0x36f2b8(0x215)]===_0x36f2b8(0x2cd)||_0x14057d[_0x36f2b8(0x215)]===_0x36f2b8(0x37d))await handleSDKOutput([_0x6f36d4],_0x14057d);else{console['log'](a31_0x4004bd['bold'](_0x6f36d4[_0x36f2b8(0x3f3)])+'\x20'+a31_0x4004bd[_0x36f2b8(0x32a)](_0x36f2b8(0x39f)+_0x6f36d4['id']+')'));_0x6f36d4[_0x36f2b8(0x395)]&&console[_0x36f2b8(0x220)]('\x20\x20'+a31_0x4004bd[_0x36f2b8(0x32a)](_0x6f36d4['description']));_0x6f36d4[_0x36f2b8(0x2d8)]&&console[_0x36f2b8(0x220)]('\x20\x20'+a31_0x4004bd['cyan']('audienceId:')+'\x20'+_0x6f36d4[_0x36f2b8(0x2d8)]);console[_0x36f2b8(0x220)]('\x20\x20'+a31_0x4004bd[_0x36f2b8(0x20e)](_0x36f2b8(0x223))+'\x20'+_0x6f36d4[_0x36f2b8(0x1fe)]),console[_0x36f2b8(0x220)]('\x20\x20'+a31_0x4004bd[_0x36f2b8(0x20e)](_0x36f2b8(0x33e))+'\x20'+_0x6f36d4['updatedAt']);const _0x43cc3b=_0x6f36d4[_0x36f2b8(0x1fd)]?.['length']||0x0;console[_0x36f2b8(0x220)]('\x20\x20'+a31_0x4004bd[_0x36f2b8(0x20e)]('sections:')+'\x20'+_0x43cc3b);if(_0x6f36d4[_0x36f2b8(0x1fd)]&&_0x6f36d4[_0x36f2b8(0x1fd)]['length']>0x0)for(const _0x5e624e of _0x6f36d4[_0x36f2b8(0x1fd)]){console[_0x36f2b8(0x220)](_0x36f2b8(0x2aa)+a31_0x4004bd[_0x36f2b8(0x316)](_0x5e624e['name'])+'\x20'+a31_0x4004bd['dim'](_0x36f2b8(0x39f)+_0x5e624e['id']+')')),_0x5e624e[_0x36f2b8(0x308)]&&(console[_0x36f2b8(0x220)]('\x20\x20\x20\x20\x20\x20'+a31_0x4004bd[_0x36f2b8(0x20e)](_0x36f2b8(0x26b))+'\x20'+_0x5e624e['entryCriteria']['name']),_0x5e624e[_0x36f2b8(0x308)][_0x36f2b8(0x3e8)]?.[_0x36f2b8(0x393)]&&console['log']('\x20\x20\x20\x20\x20\x20\x20\x20'+a31_0x4004bd[_0x36f2b8(0x20e)]('keyEventId:')+'\x20'+_0x5e624e['entryCriteria']['keyEventCriteria']['keyEventId'])),_0x5e624e['payload']&&console['log']('\x20\x20\x20\x20\x20\x20'+a31_0x4004bd[_0x36f2b8(0x20e)](_0x36f2b8(0x2f2))+'\x20'+JSON['stringify'](_0x5e624e[_0x36f2b8(0x362)])),_0x5e624e[_0x36f2b8(0x2f5)]&&console['log'](_0x36f2b8(0x332)+a31_0x4004bd['cyan'](_0x36f2b8(0x342))+'\x20true');}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x461edb(0x3f3)]='ps:pz:delete';[a31_0x461edb(0x395)]=a31_0x461edb(0x2cc);async[a31_0x461edb(0x1f4)](_0x8a6011){const _0x1a8ff1=a31_0x461edb,{options:_0x2573cd,args:_0x537727,tdx:_0x29a876}=_0x8a6011,_0x23c420=_0x537727[0x0];if(!_0x23c420)return console['error'](_0x1a8ff1(0x21c)),console[_0x1a8ff1(0x21e)](_0x1a8ff1(0x3ba)),0x1;return await withSpinner(_0x1a8ff1(0x251)+_0x23c420+_0x1a8ff1(0x3a7),()=>_0x29a876[_0x1a8ff1(0x399)][_0x1a8ff1(0x235)](_0x23c420),{'verbose':_0x2573cd['verbose']}),console['error'](_0x1a8ff1(0x2e9)+_0x23c420+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{['name']=a31_0x461edb(0x3fc);[a31_0x461edb(0x395)]=a31_0x461edb(0x281);async['execute'](_0x4434fc){const _0x378d11=a31_0x461edb,{options:_0x3060aa,tdx:_0x2da644}=_0x4434fc,_0x317b11=_0x3060aa;let _0x3ca196;if(_0x317b11[_0x378d11(0x310)]){_0x3ca196=await loadJSON(_0x317b11[_0x378d11(0x310)],!![]);if(!_0x3ca196[_0x378d11(0x2ad)]?.[_0x378d11(0x28d)])return console['error']('Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.'),console[_0x378d11(0x21e)]('Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:'),console['error'](_0x378d11(0x2e1)),0x1;}else{if(!_0x317b11[_0x378d11(0x3f3)])return console[_0x378d11(0x21e)](_0x378d11(0x3b7)),console[_0x378d11(0x21e)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console['error'](_0x378d11(0x212)),0x1;if(_0x317b11[_0x378d11(0x395)]===undefined)return console[_0x378d11(0x21e)](_0x378d11(0x284)),console[_0x378d11(0x21e)](_0x378d11(0x278)),console[_0x378d11(0x21e)](_0x378d11(0x212)),0x1;if(_0x317b11[_0x378d11(0x305)]===undefined)return console[_0x378d11(0x21e)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console['error'](_0x378d11(0x2d7)),0x1;let _0x57f8c5=_0x317b11[_0x378d11(0x2d8)];if(!_0x57f8c5&&_0x3060aa[_0x378d11(0x2f7)]){const _0x5638a9=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3060aa[_0x378d11(0x2f7)]+_0x378d11(0x3a7),()=>_0x2da644[_0x378d11(0x33f)][_0x378d11(0x398)](_0x3060aa['parentSegment']),{'verbose':_0x3060aa[_0x378d11(0x207)]});_0x57f8c5=_0x5638a9[_0x378d11(0x3e3)];}let _0x58bd5c;_0x317b11['sections']&&(_0x58bd5c=await loadJSON(_0x317b11[_0x378d11(0x1fd)],![]));const _0x17a684=_0x317b11[_0x378d11(0x305)]===_0x378d11(0x3a3)?null:{'id':_0x317b11[_0x378d11(0x305)],'type':_0x378d11(0x2ac)};_0x3ca196={'attributes':{'name':_0x317b11['name'],'description':_0x317b11['description']||null,..._0x57f8c5!==undefined&&{'audienceId':_0x57f8c5},..._0x58bd5c!==undefined&&{'sections':_0x58bd5c}},'relationships':{'parentFolder':{'data':_0x17a684}}};}const _0x22537a=await withSpinner(_0x378d11(0x22a)+(_0x3ca196[_0x378d11(0x3bc)]?.['name']??'')+_0x378d11(0x3a7),()=>_0x2da644['personalization']['createPersonalization'](_0x3ca196),{'verbose':_0x3060aa[_0x378d11(0x207)]}),_0x34b8b5=_0x22537a['data'];return console['error']('✔\x20Created\x20personalization\x20\x27'+_0x34b8b5[_0x378d11(0x3f3)]+_0x378d11(0x382)+_0x34b8b5['id']),await handleSDKOutput([_0x34b8b5],_0x3060aa),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x3c3);[a31_0x461edb(0x395)]=a31_0x461edb(0x276);async[a31_0x461edb(0x1f4)](_0x358e41){const _0x36671c=a31_0x461edb,{options:_0xb7709a,args:_0x5d9cf5}=_0x358e41,_0x341f9c=_0xb7709a,_0x2faa4c=_0x5d9cf5[0x0];if(!_0x2faa4c)return console[_0x36671c(0x21e)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x36671c(0x21e)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0x36671c(0x21e)](_0x36671c(0x3f0)),0x1;let _0x3ce648;if(_0x341f9c[_0x36671c(0x310)])_0x3ce648=await loadJSON(_0x341f9c[_0x36671c(0x310)],!![]);else{if(!_0x341f9c['name'])return console[_0x36671c(0x21e)](_0x36671c(0x3b7)),console[_0x36671c(0x21e)](_0x36671c(0x2de)),0x1;if(_0x341f9c[_0x36671c(0x395)]===undefined)return console['error'](_0x36671c(0x284)),console['error'](_0x36671c(0x2de)),0x1;let _0x42b59a;_0x341f9c[_0x36671c(0x1fd)]&&(_0x42b59a=await loadJSON(_0x341f9c[_0x36671c(0x1fd)],![])),_0x3ce648={'attributes':{'name':_0x341f9c[_0x36671c(0x3f3)],'description':_0x341f9c[_0x36671c(0x395)]||null,..._0x42b59a!==undefined&&{'sections':_0x42b59a}}};}const {tdx:_0x45ae95}=_0x358e41,_0x34b559=await withSpinner('Patching\x20personalization\x20\x27'+_0x2faa4c+_0x36671c(0x3a7),()=>_0x45ae95[_0x36671c(0x399)][_0x36671c(0x39d)](_0x2faa4c,_0x3ce648),{'verbose':_0xb7709a[_0x36671c(0x207)]}),_0x2df49e=_0x34b559[_0x36671c(0x3e3)];return console[_0x36671c(0x21e)](_0x36671c(0x35b)+_0x2df49e[_0x36671c(0x3f3)]+_0x36671c(0x25f)+_0x2df49e['id']+')'),await handleSDKOutput([_0x2df49e],_0xb7709a),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x461edb(0x3f3)]=a31_0x461edb(0x3ae);[a31_0x461edb(0x395)]=a31_0x461edb(0x372);async['execute'](_0x3b51d6){const _0x2e1233=a31_0x461edb,{options:_0x5580ef,args:_0x34190b}=_0x3b51d6,_0x36c6be=_0x34190b[0x0]||_0x5580ef[_0x2e1233(0x2f7)];if(!_0x36c6be)return showParentSegmentNotSetError(_0x2e1233(0x3cd)+_0x2e1233(0x2ea)),0x1;const _0x1945e2=resolveYamlFile(_0x36c6be);if(!existsSync(_0x1945e2))return showFileNotFoundError(_0x1945e2,_0x36c6be),0x1;let _0x361b5d;try{_0x361b5d=readFileSync(_0x1945e2,'utf-8');}catch(_0x3b7073){const _0x51f75b=_0x3b7073 instanceof Error?_0x3b7073[_0x2e1233(0x265)]:String(_0x3b7073);return console[_0x2e1233(0x21e)](_0x2e1233(0x36f)+_0x51f75b),0x1;}let _0x3391a5;try{_0x3391a5=parseDef(_0x361b5d);}catch(_0x1e8e57){const _0x1583c9=_0x1e8e57 instanceof Error?_0x1e8e57[_0x2e1233(0x265)]:String(_0x1e8e57);return console[_0x2e1233(0x21e)](a31_0x4004bd['red'](_0x2e1233(0x352)+_0x1583c9)),0x1;}if(_0x3391a5['personalization_services']&&_0x3391a5[_0x2e1233(0x338)][_0x2e1233(0x248)]>0x0)return console[_0x2e1233(0x21e)](a31_0x4004bd['yellow']('⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20'+_0x1945e2)),console['error'](a31_0x4004bd[_0x2e1233(0x32a)](_0x2e1233(0x268)+_0x3391a5[_0x2e1233(0x338)][_0x2e1233(0x248)]+_0x2e1233(0x289))),0x1;!_0x3391a5[_0x2e1233(0x27a)]&&(_0x3391a5[_0x2e1233(0x27a)]={'events':[{'name':_0x2e1233(0x32d),'source_table':_0x2e1233(0x22f)}],'attributes':[{'name':_0x2e1233(0x2e3),'type':_0x2e1233(0x385)}],'id_stitching':{'primary_key':_0x3391a5[_0x2e1233(0x286)]['table']===_0x2e1233(0x1f8)?_0x2e1233(0x22d):_0x2e1233(0x291)}});_0x3391a5[_0x2e1233(0x338)]=[{'name':_0x2e1233(0x230),'description':'Personalization\x20service\x20description','trigger_event':_0x2e1233(0x32d),'sections':[{'name':'Default','criteria':_0x2e1233(0x323),'attributes':['last_page_viewed']}]}];const _0x2c47ce=serializeDef(_0x3391a5);return writeFileSync(_0x1945e2,_0x2c47ce,_0x2e1233(0x2c4)),console[_0x2e1233(0x21e)](a31_0x4004bd[_0x2e1233(0x224)]('✔')+'\x20Added\x20personalization\x20template\x20to\x20'+a31_0x4004bd[_0x2e1233(0x20e)](_0x1945e2)),(!_0x3391a5['realtime']||_0x361b5d[_0x2e1233(0x22c)]('realtime:')===-0x1)&&console['error'](a31_0x4004bd[_0x2e1233(0x224)]('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console['error']('\x0a'+a31_0x4004bd['dim'](_0x2e1233(0x3e0))),console[_0x2e1233(0x21e)](_0x2e1233(0x236)+_0x1945e2+_0x2e1233(0x298)),console['error'](_0x2e1233(0x39e)+a31_0x4004bd[_0x2e1233(0x32a)](_0x2e1233(0x34a)+_0x36c6be)+_0x2e1233(0x3b6)),0x0;}}
1
+ const a31_0x4797a6=a31_0x21b4;(function(_0x2c7f23,_0x317d73){const _0x31e2de=a31_0x21b4,_0x48ecd9=_0x2c7f23();while(!![]){try{const _0x463b07=-parseInt(_0x31e2de(0x15b))/0x1*(parseInt(_0x31e2de(0x319))/0x2)+-parseInt(_0x31e2de(0x255))/0x3+parseInt(_0x31e2de(0x149))/0x4*(parseInt(_0x31e2de(0x113))/0x5)+parseInt(_0x31e2de(0x2a0))/0x6+-parseInt(_0x31e2de(0x259))/0x7+-parseInt(_0x31e2de(0x2b3))/0x8+parseInt(_0x31e2de(0x18a))/0x9*(parseInt(_0x31e2de(0x2c9))/0xa);if(_0x463b07===_0x317d73)break;else _0x48ecd9['push'](_0x48ecd9['shift']());}catch(_0x7b3f1b){_0x48ecd9['push'](_0x48ecd9['shift']());}}}(a31_0xbd54,0x8c00f));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x1da727 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 a31_0x12b51f 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='parent_segments',LEGACY_PARENT_SEGMENT_DIR=a31_0x4797a6(0x2c2);function openBrowser(_0x45bf7e){const _0x2f6f04=a31_0x4797a6,_0x5b954f=process['platform'],_0x5db65f=_0x5b954f==='darwin'?'open':_0x5b954f===_0x2f6f04(0x2c7)?'start':_0x2f6f04(0x146);spawn(_0x5db65f,[_0x45bf7e],{'detached':!![],'stdio':_0x2f6f04(0x1bd)})['unref']();}function migrateLegacyDirectory(){const _0x3392e1=a31_0x4797a6;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x1c3f44=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x1c3f44['isDirectory']())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x3392e1(0x306)](a31_0x12b51f[_0x3392e1(0x215)](_0x3392e1(0x103)+LEGACY_PARENT_SEGMENT_DIR+_0x3392e1(0x227)+PARENT_SEGMENT_DIR+_0x3392e1(0x1ae))),console[_0x3392e1(0x306)](a31_0x12b51f[_0x3392e1(0x2dc)](_0x3392e1(0x178)+LEGACY_PARENT_SEGMENT_DIR+_0x3392e1(0x16d))),![];console[_0x3392e1(0x306)](a31_0x12b51f[_0x3392e1(0x215)](_0x3392e1(0x265)+LEGACY_PARENT_SEGMENT_DIR+_0x3392e1(0x270)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x3392e1(0x306)](a31_0x12b51f['green']('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x4fb8e2){const _0x1a81c8=_0x4fb8e2 instanceof Error?_0x4fb8e2['message']:String(_0x4fb8e2);return console[_0x3392e1(0x306)](a31_0x12b51f['red']('✘\x20Failed\x20to\x20rename\x20directory:\x20'+_0x1a81c8+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x4797a6(0x197)](_0x2ae570){const _0x1ac420=a31_0x4797a6;return migrateLegacyDirectory(),super[_0x1ac420(0x197)](_0x2ae570);}}function resolveYamlFile(_0x1624bc){const _0x49630b=a31_0x4797a6;if(_0x1624bc['endsWith'](_0x49630b(0x1fd))||_0x1624bc[_0x49630b(0x250)](_0x49630b(0x156)))return _0x1624bc;return a31_0x1da727['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x1624bc)+_0x49630b(0x1fd));}function formatProgressMessage(_0x1964bc){const _0x509b76=a31_0x4797a6,_0x19d07e=_0x1964bc[_0x509b76(0x2cf)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x19d07e){const [,_0x1db6a7,_0x2c5f8d,_0x156384='']=_0x19d07e;return a31_0x12b51f[_0x509b76(0x2dc)](_0x1db6a7+':')+'\x20'+_0x2c5f8d+a31_0x12b51f['dim'](_0x156384);}return a31_0x12b51f[_0x509b76(0x2dc)](_0x1964bc);}function showFileNotFoundError(_0x4c595e,_0x501a5c){const _0x3cbb14=a31_0x4797a6;console['error'](a31_0x12b51f['red'](_0x3cbb14(0x21d)+_0x4c595e+'\x0a')),console[_0x3cbb14(0x306)](a31_0x12b51f[_0x3cbb14(0x137)](_0x3cbb14(0x157)+_0x501a5c+_0x3cbb14(0x2c3)));}function displayRealtimeValidation(_0x4b0a13){const _0x147a4a=a31_0x4797a6;if(!_0x4b0a13[_0x147a4a(0x20f)])return;const _0x5547b2=_0x4b0a13[_0x147a4a(0x20f)],_0x4ceb86=_0x5547b2[_0x147a4a(0x309)]?a31_0x12b51f[_0x147a4a(0x2db)]('⚡\x20Enabled'):a31_0x12b51f[_0x147a4a(0x215)]('⚡\x20Not\x20enabled');console[_0x147a4a(0x306)]('\x0a'+a31_0x12b51f[_0x147a4a(0x2dc)]('RT\x202.0:')+'\x20'+_0x4ceb86);if(_0x5547b2[_0x147a4a(0x2b8)]&&_0x5547b2['events'][_0x147a4a(0x16c)]>0x0){console[_0x147a4a(0x306)]('\x20\x20'+a31_0x12b51f[_0x147a4a(0x2dc)](_0x147a4a(0x237))+'\x20'+_0x5547b2[_0x147a4a(0x2b8)][_0x147a4a(0x16c)]+'\x20configured');for(const _0x1f20ab of _0x5547b2[_0x147a4a(0x2b8)]){const _0x2ce73f=_0x1f20ab[_0x147a4a(0x2ed)]===![]?a31_0x12b51f[_0x147a4a(0x315)]('✘'):a31_0x12b51f[_0x147a4a(0x2db)]('✔');console[_0x147a4a(0x306)](_0x147a4a(0x10b)+_0x2ce73f+'\x20'+_0x1f20ab[_0x147a4a(0x15c)]),_0x1f20ab[_0x147a4a(0x230)]&&console[_0x147a4a(0x306)](_0x147a4a(0x1a5)+a31_0x12b51f[_0x147a4a(0x315)](_0x1f20ab['sourceTableError']));}}if(_0x5547b2[_0x147a4a(0x2b7)]&&_0x5547b2[_0x147a4a(0x2b7)][_0x147a4a(0x16c)]>0x0){console['error']('\x20\x20'+a31_0x12b51f[_0x147a4a(0x2dc)]('Attributes:')+'\x20'+_0x5547b2[_0x147a4a(0x2b7)][_0x147a4a(0x16c)]+'\x20configured');for(const _0x310f75 of _0x5547b2[_0x147a4a(0x2b7)]){const _0x4ac703=_0x310f75[_0x147a4a(0x226)]?a31_0x12b51f[_0x147a4a(0x2db)]('✔'):a31_0x12b51f[_0x147a4a(0x315)]('✘');console[_0x147a4a(0x306)](_0x147a4a(0x10b)+_0x4ac703+'\x20'+_0x310f75['name']+'\x20'+a31_0x12b51f[_0x147a4a(0x2dc)]('('+_0x310f75[_0x147a4a(0x279)]+')'));}}if(_0x5547b2['idStitching']){const _0x5e056b=_0x5547b2[_0x147a4a(0x21b)][_0x147a4a(0x2f7)]?.[_0x147a4a(0x16c)]?'\x20+\x20['+_0x5547b2[_0x147a4a(0x21b)][_0x147a4a(0x2f7)][_0x147a4a(0x13f)](',\x20')+']':'';console[_0x147a4a(0x306)]('\x20\x20'+a31_0x12b51f[_0x147a4a(0x2dc)](_0x147a4a(0x28a))+'\x20'+_0x5547b2[_0x147a4a(0x21b)]['primaryKey']+_0x5e056b);}if(_0x5547b2[_0x147a4a(0x2b6)]&&_0x5547b2[_0x147a4a(0x2b6)][_0x147a4a(0x16c)]>0x0){console['error']('\x20\x20'+a31_0x12b51f[_0x147a4a(0x2dc)](_0x147a4a(0x121))+'\x20'+_0x5547b2[_0x147a4a(0x2b6)][_0x147a4a(0x16c)]+_0x147a4a(0x228)+(_0x5547b2[_0x147a4a(0x2b6)][_0x147a4a(0x16c)]!==0x1?'s':''));for(const _0x126994 of _0x5547b2['personalizationServices']){console[_0x147a4a(0x306)](_0x147a4a(0x24a)+_0x126994[_0x147a4a(0x15c)]);}}}function showParentSegmentNotSetError(_0x54b28a){const _0x22ae83=a31_0x4797a6;console[_0x22ae83(0x306)](a31_0x12b51f['yellow'](_0x22ae83(0x23e))),console[_0x22ae83(0x306)](_0x54b28a);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x299);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x1ad);async[a31_0x4797a6(0x152)](_0x20a683){const _0x27eccf=a31_0x4797a6,{options:_0xc023f4,args:_0x4df42f,tdx:_0x48cba8}=_0x20a683,_0x40ca71=_0x4df42f[0x0];_0xc023f4[_0x27eccf(0x282)]&&(console[_0x27eccf(0x306)](_0x27eccf(0x31b)+_0xc023f4[_0x27eccf(0x1c2)]),_0x40ca71&&console[_0x27eccf(0x306)]('Pattern:\x20'+_0x40ca71));const _0x1ffa43=await withSpinner(_0x40ca71?_0x27eccf(0x118)+_0x40ca71+_0x27eccf(0x131):'Listing\x20parent\x20segments...',()=>_0x48cba8[_0x27eccf(0x14c)][_0x27eccf(0x1c5)](),{'verbose':_0xc023f4[_0x27eccf(0x282)]});let _0x57bb90=_0x1ffa43[_0x27eccf(0x2a4)];if(_0x40ca71){const _0xb7ae1e=_0x40ca71[_0x27eccf(0x19b)](/[.+^${}()|[\]\\]/g,_0x27eccf(0x198))[_0x27eccf(0x19b)](/\*/g,'.*')[_0x27eccf(0x19b)](/\?/g,'.'),_0x582c71=new RegExp('^'+_0xb7ae1e+'$','i');_0x57bb90=_0x57bb90[_0x27eccf(0x19c)](_0x376d16=>_0x582c71[_0x27eccf(0x208)](_0x376d16[_0x27eccf(0x2b7)][_0x27eccf(0x15c)]));}_0x57bb90[_0x27eccf(0x2e8)]((_0x79cd48,_0x1e8d6e)=>_0x79cd48[_0x27eccf(0x2b7)]['name'][_0x27eccf(0x1cf)](_0x1e8d6e[_0x27eccf(0x2b7)][_0x27eccf(0x15c)])),console[_0x27eccf(0x306)](_0x27eccf(0x150)+_0x57bb90['length']+_0x27eccf(0x26c)+(_0x57bb90['length']!==0x1?'s':''));const _0x1f1c93=_0x5b1ec5=>{const _0x1f0ef1=_0x27eccf;return getConsoleNextUrl(_0xc023f4[_0x1f0ef1(0x1c2)],'/app/dw/parentSegments/'+_0x5b1ec5);};if(_0xc023f4[_0x27eccf(0x1b6)]===_0x27eccf(0x1bf)||_0xc023f4[_0x27eccf(0x1b6)]===_0x27eccf(0x1bc)){const _0x48a6ea=_0x57bb90[_0x27eccf(0x1d5)](_0x35fb45=>({..._0x35fb45,'url':_0x1f1c93(_0x35fb45['id'])}));await handleSDKOutput(_0x48a6ea,_0xc023f4);}else{if(_0x57bb90[_0x27eccf(0x16c)]===0x0)_0x40ca71?console[_0x27eccf(0x225)](_0x27eccf(0x123)+_0x40ca71):console[_0x27eccf(0x225)](_0x27eccf(0x1f3));else for(const _0x29d57d of _0x57bb90){const _0x46db24=_0x29d57d[_0x27eccf(0x2b7)][_0x27eccf(0x169)]?a31_0x12b51f[_0x27eccf(0x2dc)]('\x20('+formatRows(_0x29d57d['attributes'][_0x27eccf(0x169)])+')'):'',_0x44e076=hyperlink(_0x29d57d[_0x27eccf(0x2b7)][_0x27eccf(0x15c)],_0x1f1c93(_0x29d57d['id']));console['log'](_0x27eccf(0x143)+_0x44e076+_0x46db24);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x4797a6(0x15c)]='segment:parent:create';['description']=a31_0x4797a6(0x1a7);async[a31_0x4797a6(0x152)](_0x379b67){const _0x185544=a31_0x4797a6,{options:_0x1160fc,args:_0x1d629f,tdx:_0x11fe77}=_0x379b67;console[_0x185544(0x306)](_0x185544(0x308)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x109f7a=_0x1160fc;if(_0x1d629f['length']===0x0)return console[_0x185544(0x306)](a31_0x12b51f[_0x185544(0x315)](_0x185544(0x17e))),console[_0x185544(0x306)](_0x185544(0x2c6)),0x1;const _0x30c995=_0x1d629f[0x0];if(!_0x109f7a[_0x185544(0x247)]||!_0x109f7a[_0x185544(0x262)])return console[_0x185544(0x306)](_0x185544(0x154)),console['error'](_0x185544(0x2c6)),0x1;_0x109f7a[_0x185544(0x282)]&&(console['error'](_0x185544(0x31b)+_0x109f7a['site']),console[_0x185544(0x306)](_0x185544(0x2be)+_0x30c995),console[_0x185544(0x306)](_0x185544(0x23d)+_0x109f7a[_0x185544(0x247)]),console[_0x185544(0x306)](_0x185544(0x22d)+_0x109f7a['table']));const _0x455065=await loadJSONFromOptions(_0x109f7a[_0x185544(0x2b7)],_0x109f7a[_0x185544(0x244)]),_0x1e0181=await loadJSONFromOptions(_0x109f7a[_0x185544(0x275)],_0x109f7a['behaviorsFile']),_0x51edc4=await loadJSONFromOptions(_0x109f7a[_0x185544(0x311)],_0x109f7a[_0x185544(0x241)]),_0x352123={'name':_0x30c995,'description':_0x109f7a[_0x185544(0x2eb)],'scheduleType':_0x109f7a[_0x185544(0x1ec)],'scheduleOption':_0x109f7a[_0x185544(0x1c9)],'timezone':_0x109f7a[_0x185544(0x176)],'master':{'parentDatabaseName':_0x109f7a['database'],'parentTableName':_0x109f7a[_0x185544(0x262)]},'attributes':_0x455065,'behaviors':_0x1e0181,'customerGroup':_0x51edc4},_0x35f7f5=await withSpinner('Creating\x20parent\x20segment\x20\x27'+_0x30c995+_0x185544(0x131),()=>_0x11fe77[_0x185544(0x14c)][_0x185544(0x1e6)](_0x352123),{'verbose':_0x1160fc[_0x185544(0x282)]}),_0x5befb0=_0x35f7f5[_0x185544(0x2a4)];return console[_0x185544(0x306)](_0x185544(0x2e5)+_0x5befb0[_0x185544(0x15c)]+_0x185544(0x19e)+_0x5befb0['id']),await handleSDKOutput([_0x5befb0],_0x1160fc),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x4797a6(0x15c)]='segment:parent:update';[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x13b);async['execute'](_0x19c54f){const _0x40797e=a31_0x4797a6,{options:_0x5346ba,args:_0x47bc53,tdx:_0x2fd9cc}=_0x19c54f;console[_0x40797e(0x306)](_0x40797e(0x192)+_0x40797e(0x274)+_0x40797e(0x135));const _0x195572=_0x5346ba;if(_0x47bc53['length']===0x0)return console[_0x40797e(0x306)](a31_0x12b51f[_0x40797e(0x315)]('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x40797e(0x306)](_0x40797e(0x1e8)),0x1;const _0x3dbf78=_0x47bc53[0x0];_0x195572[_0x40797e(0x282)]&&(console['error'](_0x40797e(0x31b)+_0x195572[_0x40797e(0x1c2)]),console['error'](_0x40797e(0x1b3)+_0x3dbf78));const _0x21f2a2=await withSpinner(_0x40797e(0x204)+_0x3dbf78+_0x40797e(0x131),()=>_0x2fd9cc[_0x40797e(0x14c)][_0x40797e(0x10d)](_0x3dbf78),{'verbose':_0x195572[_0x40797e(0x282)]}),_0x3e41a4=_0x21f2a2[_0x40797e(0x2a4)],_0x13004b=await loadJSONFromOptions(_0x195572['addAttributes'],_0x195572[_0x40797e(0x2cc)]),_0x5024f5=await loadJSONFromOptions(_0x195572[_0x40797e(0x164)],_0x195572[_0x40797e(0x133)]),_0x346fc5={'name':_0x3e41a4[_0x40797e(0x15c)],'description':_0x195572['description']!==undefined?_0x195572[_0x40797e(0x2eb)]:_0x3e41a4[_0x40797e(0x2eb)],'scheduleType':_0x195572[_0x40797e(0x1ec)]!==undefined?_0x195572[_0x40797e(0x1ec)]:_0x3e41a4[_0x40797e(0x1ec)],'scheduleOption':_0x195572['scheduleOption']!==undefined?_0x195572[_0x40797e(0x1c9)]:_0x3e41a4[_0x40797e(0x1c9)],'timezone':_0x195572[_0x40797e(0x176)]!==undefined?_0x195572[_0x40797e(0x176)]:_0x3e41a4[_0x40797e(0x176)],'master':_0x3e41a4[_0x40797e(0x2fe)],'attributes':_0x13004b?[..._0x3e41a4[_0x40797e(0x2b7)]||[],..._0x13004b]:_0x3e41a4[_0x40797e(0x2b7)],'behaviors':_0x5024f5?[..._0x3e41a4['behaviors']||[],..._0x5024f5]:_0x3e41a4[_0x40797e(0x275)],'customerGroup':_0x3e41a4[_0x40797e(0x311)]},_0x23c8f0=await withSpinner(_0x40797e(0x1f8)+_0x3dbf78+'\x27...',()=>_0x2fd9cc[_0x40797e(0x14c)]['updateParent'](_0x3dbf78,_0x346fc5),{'verbose':_0x195572[_0x40797e(0x282)]}),_0x4ad40c=_0x23c8f0[_0x40797e(0x2a4)];return console[_0x40797e(0x306)](_0x40797e(0x289)+_0x4ad40c[_0x40797e(0x15c)]+'\x27'),await handleSDKOutput([_0x4ad40c],_0x195572),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x2ba);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x318);async[a31_0x4797a6(0x152)](_0x3e20bc){const _0x368d19=a31_0x4797a6,{options:_0x7d16b5,args:_0x316f63,tdx:_0x59de2}=_0x3e20bc,_0x16906c=_0x7d16b5,_0x3f6406=_0x316f63[0x0]||_0x7d16b5[_0x368d19(0x13d)];if(!_0x3f6406)return showParentSegmentNotSetError(_0x368d19(0x2d7)+_0x368d19(0x188)),0x1;if(_0x16906c[_0x368d19(0x18c)]&&_0x16906c['output'])return console[_0x368d19(0x306)](a31_0x12b51f[_0x368d19(0x315)](_0x368d19(0x23c))),console[_0x368d19(0x306)](a31_0x12b51f[_0x368d19(0x2dc)](_0x368d19(0x1bb))),console[_0x368d19(0x306)](a31_0x12b51f[_0x368d19(0x2dc)](_0x368d19(0x109)+PARENT_SEGMENT_DIR+_0x368d19(0x126))),console[_0x368d19(0x306)](a31_0x12b51f[_0x368d19(0x137)](_0x368d19(0x28b))),0x1;const _0x148fdb=_0x16906c[_0x368d19(0x29c)]||a31_0x1da727['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x3f6406)+_0x368d19(0x1fd));_0x16906c[_0x368d19(0x282)]&&(console[_0x368d19(0x306)](_0x368d19(0x31b)+_0x16906c[_0x368d19(0x1c2)]),console['error']('Parent\x20segment:\x20'+_0x3f6406),console[_0x368d19(0x306)](_0x368d19(0x24f)+_0x148fdb));const _0x15f294=await withSpinner(_0x368d19(0x2a2)+_0x3f6406+'\x27...',()=>_0x59de2[_0x368d19(0x14c)]['pullParentYaml'](_0x3f6406),{'verbose':_0x16906c['verbose']}),_0x5c1fc1=_0x15f294[_0x368d19(0x2a4)];if(existsSync(_0x148fdb)){const _0x1db1fe=readFileSync(_0x148fdb,_0x368d19(0x1aa)),_0x1e2919=generateDiff(_0x1db1fe,_0x5c1fc1);if(!hasChanges(_0x1e2919))console[_0x368d19(0x306)](a31_0x12b51f[_0x368d19(0x2db)]('✔')+_0x368d19(0x22e)+a31_0x12b51f['cyan'](_0x148fdb)+'\x20is\x20already\x20up\x20to\x20date');else{console[_0x368d19(0x306)]('\x0aChanges\x20to\x20\x27'+_0x148fdb+'\x27:'),console['error']('─'['repeat'](0x3c)),console[_0x368d19(0x306)](formatDiffWithColors(_0x1e2919)),console[_0x368d19(0x306)]('─'[_0x368d19(0x112)](0x3c));if(!_0x16906c['yes']){if(!isInteractive())return console[_0x368d19(0x306)](a31_0x12b51f[_0x368d19(0x315)](_0x368d19(0x312)),_0x368d19(0x11e)),console[_0x368d19(0x306)](a31_0x12b51f[_0x368d19(0x2dc)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3d9e73=await confirmKey(_0x368d19(0x221)+_0x148fdb+'\x27?');if(!_0x3d9e73)return console[_0x368d19(0x306)](a31_0x12b51f[_0x368d19(0x215)]('Aborted.')),0x1;}writeFileSync(_0x148fdb,_0x5c1fc1,_0x368d19(0x1aa)),console['error'](a31_0x12b51f[_0x368d19(0x2db)]('✔')+_0x368d19(0x12a)+a31_0x12b51f['cyan'](_0x148fdb));}}else{const _0x51c514=a31_0x1da727[_0x368d19(0x2b0)](_0x148fdb);!existsSync(_0x51c514)&&mkdirSync(_0x51c514,{'recursive':!![]}),writeFileSync(_0x148fdb,_0x5c1fc1,_0x368d19(0x1aa)),console[_0x368d19(0x306)](a31_0x12b51f['green']('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x12b51f[_0x368d19(0x137)](_0x148fdb));}return saveSessionContext({'parent_segment':_0x3f6406},_0x16906c['session']),console[_0x368d19(0x306)](a31_0x12b51f[_0x368d19(0x2db)]('✔')+'\x20Context\x20set:\x20'+a31_0x12b51f['dim'](_0x368d19(0x2c2))+_0x368d19(0x1f4)+a31_0x12b51f['cyan'](_0x3f6406)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x4797a6(0x15c)]='segment:parent:push';[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x281);async[a31_0x4797a6(0x152)](_0x34cf57){const _0x5c4e95=a31_0x4797a6,{options:_0x54e236,args:_0x503c4c,tdx:_0x33316f}=_0x34cf57,_0x4059a5=_0x54e236,_0x10440c=_0x503c4c[0x0]||_0x54e236[_0x5c4e95(0x13d)];if(!_0x10440c)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'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment'),0x1;const _0x270266=resolveYamlFile(_0x10440c);if(!existsSync(_0x270266))return showFileNotFoundError(_0x270266,_0x10440c),0x1;_0x4059a5['verbose']&&(console[_0x5c4e95(0x306)](_0x5c4e95(0x31b)+_0x4059a5[_0x5c4e95(0x1c2)]),console[_0x5c4e95(0x306)](_0x5c4e95(0x212)+_0x270266));let _0x323a30;try{_0x323a30=readFileSync(_0x270266,_0x5c4e95(0x1aa));}catch(_0x3924b4){const _0x1123d4=_0x3924b4 instanceof Error?_0x3924b4['message']:String(_0x3924b4);return console[_0x5c4e95(0x306)](_0x5c4e95(0x251)+_0x1123d4),0x1;}const _0x51d3a5=await withSpinner(_0x5c4e95(0x1d1),()=>_0x33316f[_0x5c4e95(0x14c)]['pushParentYaml'](_0x323a30),{'verbose':_0x4059a5['verbose']}),_0x4b838a=_0x51d3a5['data'],{isNew:_0x2ecf4a,name:_0x16f6bc,hasChanges:_0xc921a8,diffFormatted:_0x96beb1}=_0x4b838a;if(!_0xc921a8)return console[_0x5c4e95(0x306)](_0x5c4e95(0x249)+_0x16f6bc+_0x5c4e95(0x1d2)),0x0;_0x2ecf4a?console['error'](_0x5c4e95(0x29a)+_0x16f6bc+'\x27:'):console['error'](_0x5c4e95(0x116)+_0x16f6bc+'\x27:');console[_0x5c4e95(0x306)]('─'[_0x5c4e95(0x112)](0x3c)),console['error'](_0x96beb1),console[_0x5c4e95(0x306)]('─'['repeat'](0x3c));const _0x2e8fce=_0x2ecf4a?_0x5c4e95(0x170)+_0x16f6bc+'\x27?':_0x5c4e95(0x11a)+_0x16f6bc+'\x27?';if(!_0x4059a5['yes']){if(!isInteractive())return console['error'](a31_0x12b51f[_0x5c4e95(0x315)](_0x5c4e95(0x312)),_0x5c4e95(0x11e)),console[_0x5c4e95(0x306)](a31_0x12b51f[_0x5c4e95(0x2dc)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x56167c=await confirmKey(_0x2e8fce);if(!_0x56167c)return console['error'](a31_0x12b51f[_0x5c4e95(0x215)](_0x5c4e95(0x1a6))),0x1;}const _0x5b3252=_0x2ecf4a?_0x5c4e95(0x1d7):_0x5c4e95(0x18d),_0x4ad4f8=await withSpinner(_0x5b3252+_0x5c4e95(0x1c1)+_0x16f6bc+_0x5c4e95(0x131),()=>_0x4b838a[_0x5c4e95(0x30b)](),{'verbose':_0x4059a5[_0x5c4e95(0x282)]}),_0x3e1d62=_0x4ad4f8[_0x5c4e95(0x2a4)],_0x53d495=getConsoleNextUrl(_0x4059a5[_0x5c4e95(0x1c2)],_0x5c4e95(0x180)+_0x3e1d62['id']),_0xee4d96=_0x2ecf4a?_0x5c4e95(0x202):_0x5c4e95(0x30f);return console[_0x5c4e95(0x306)]('✔\x20'+_0xee4d96+'\x20parent\x20segment\x20\x27'+_0x3e1d62['name']+'\x27'),console['error']('\x20\x20'+_0x53d495),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{['name']=a31_0x4797a6(0x1f0);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x10a);async['execute'](_0x29b24a){const _0x10372f=a31_0x4797a6,{options:_0xfb5975,args:_0x29093f,tdx:_0x495354}=_0x29b24a,_0x16839c=_0xfb5975,_0x5040e2=_0x29093f[0x0]||_0xfb5975['parentSegment'];if(!_0x5040e2)return showParentSegmentNotSetError(_0x10372f(0x1d8)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a'+_0x10372f(0x211)+_0x10372f(0x222)+_0x10372f(0x2fb)+_0x10372f(0x175)),0x1;const _0x422556=resolveYamlFile(_0x5040e2);if(!existsSync(_0x422556))return showFileNotFoundError(_0x422556,_0x5040e2),0x1;_0x16839c[_0x10372f(0x282)]&&(console[_0x10372f(0x306)]('Site:\x20'+_0x16839c[_0x10372f(0x1c2)]),console['error'](_0x10372f(0x212)+_0x422556));let _0x30ae3d;try{_0x30ae3d=readFileSync(_0x422556,_0x10372f(0x1aa));}catch(_0x13857d){const _0x52fe2c=_0x13857d instanceof Error?_0x13857d[_0x10372f(0x182)]:String(_0x13857d);return console[_0x10372f(0x306)](_0x10372f(0x251)+_0x52fe2c),0x1;}const _0x3af96e=createCommandSpinner(a31_0x12b51f[_0x10372f(0x2dc)](_0x10372f(0x2ca)),{'verbose':_0x16839c['verbose']});_0x3af96e[_0x10372f(0x151)]();const _0x4076ab={'onProgress':_0x66a7e8=>{const _0x43da5d=_0x10372f;_0x3af96e[_0x43da5d(0x159)]=formatProgressMessage(_0x66a7e8);}};if(_0x16839c['master'])_0x4076ab[_0x10372f(0x2fe)]=!![];if(_0x16839c[_0x10372f(0x117)])_0x4076ab[_0x10372f(0x117)]=!![];_0x16839c['attribute']&&(_0x4076ab[_0x10372f(0x27a)]=_0x16839c['attribute']);_0x16839c[_0x10372f(0x1ba)]&&(_0x4076ab[_0x10372f(0x1ba)]=_0x16839c[_0x10372f(0x1ba)]);if(_0x16839c[_0x10372f(0x24d)])_0x4076ab[_0x10372f(0x24d)]=_0x16839c['interval'];let _0x44ef79;try{_0x44ef79=await _0x495354[_0x10372f(0x14c)][_0x10372f(0x218)](_0x30ae3d,_0x4076ab),_0x3af96e['stop']();}catch(_0xc61418){_0x3af96e[_0x10372f(0x2bc)]();throw _0xc61418;}const _0x3dfbfe=_0x16839c[_0x10372f(0x24d)]||_0x10372f(0x163);return this['displayValidateResults'](_0x44ef79,_0x4076ab,_0x422556,_0x3dfbfe),_0x44ef79[_0x10372f(0x191)]?0x0:0x1;}[a31_0x4797a6(0x17d)](_0x11f45b,_0x260161,_0x4f9146,_0xcb4b30){const _0x5c08ab=a31_0x4797a6;console[_0x5c08ab(0x306)]('\x0a'+a31_0x12b51f[_0x5c08ab(0x287)](_0x5c08ab(0x269))+'\x20'+_0x11f45b[_0x5c08ab(0x15c)]),console[_0x5c08ab(0x306)]('═'[_0x5c08ab(0x112)](0x3c)),this[_0x5c08ab(0x273)](_0x11f45b);if(typeof _0x260161['attribute']==='string'){this[_0x5c08ab(0x194)](_0x11f45b),this[_0x5c08ab(0x1a1)](_0x11f45b),this[_0x5c08ab(0x243)](_0x4f9146,_0xcb4b30,_0x5c08ab(0x27a),_0x260161['attribute']);return;}if(_0x260161[_0x5c08ab(0x27a)]===!![]){this[_0x5c08ab(0x194)](_0x11f45b),this[_0x5c08ab(0x1a1)](_0x11f45b),this[_0x5c08ab(0x243)](_0x4f9146,_0xcb4b30,_0x5c08ab(0x2b7));return;}if(typeof _0x260161[_0x5c08ab(0x1ba)]===_0x5c08ab(0x12d)){this[_0x5c08ab(0x1f5)](_0x11f45b,_0xcb4b30),this[_0x5c08ab(0x1a1)](_0x11f45b),this[_0x5c08ab(0x243)](_0x4f9146,_0xcb4b30,_0x5c08ab(0x1ba),_0x260161[_0x5c08ab(0x1ba)]);return;}if(_0x260161[_0x5c08ab(0x1ba)]===!![]){this[_0x5c08ab(0x1f5)](_0x11f45b,_0xcb4b30),this[_0x5c08ab(0x1a1)](_0x11f45b),this[_0x5c08ab(0x243)](_0x4f9146,_0xcb4b30,_0x5c08ab(0x275));return;}this[_0x5c08ab(0x194)](_0x11f45b),this['displayBehaviorsStats'](_0x11f45b,_0xcb4b30),this[_0x5c08ab(0x172)](_0x11f45b),this[_0x5c08ab(0x1a1)](_0x11f45b),this['displayPreviewHints'](_0x4f9146,_0xcb4b30,_0x5c08ab(0x195));}[a31_0x4797a6(0x172)](_0x533b14){displayRealtimeValidation(_0x533b14);}[a31_0x4797a6(0x243)](_0x1301d6,_0x11615f,_0x46f9e2,_0x468c1e){const _0x3a8207=a31_0x4797a6;console['error']('\x0a'+a31_0x12b51f['dim']('To\x20view\x20sample\x20data:'));const _0x47b145=_0x11615f!==_0x3a8207(0x163)?_0x3a8207(0x29e)+_0x11615f:'';if(_0x46f9e2===_0x3a8207(0x27a)&&_0x468c1e)console[_0x3a8207(0x306)]('\x20\x20'+a31_0x12b51f['dim'](_0x3a8207(0x266)+_0x1301d6+_0x3a8207(0x2f0)+_0x468c1e+'\x22'+_0x47b145));else{if(_0x46f9e2==='behavior'&&_0x468c1e)console[_0x3a8207(0x306)]('\x20\x20'+a31_0x12b51f['dim']('tdx\x20ps\x20preview\x20'+_0x1301d6+_0x3a8207(0x210)+_0x468c1e+'\x22'+_0x47b145));else(_0x46f9e2===_0x3a8207(0x2b7)||_0x46f9e2===_0x3a8207(0x195))&&console[_0x3a8207(0x306)]('\x20\x20'+a31_0x12b51f[_0x3a8207(0x2dc)](_0x3a8207(0x266)+_0x1301d6+'\x20--attribute\x20\x22<name>\x22'+_0x47b145));}(_0x46f9e2===_0x3a8207(0x275)||_0x46f9e2==='all')&&console[_0x3a8207(0x306)]('\x20\x20'+a31_0x12b51f['dim'](_0x3a8207(0x266)+_0x1301d6+_0x3a8207(0x27f)+_0x47b145)),_0x46f9e2==='all'&&console['error']('\x20\x20'+a31_0x12b51f[_0x3a8207(0x2dc)]('tdx\x20ps\x20preview\x20'+_0x1301d6+_0x3a8207(0x25a)+_0x47b145));}[a31_0x4797a6(0x273)](_0x576f57){const _0x26507a=a31_0x4797a6,{master:_0xf53af0}=_0x576f57,_0x114660=_0xf53af0[_0x26507a(0x2f3)]?a31_0x12b51f[_0x26507a(0x2db)]('✔'):a31_0x12b51f[_0x26507a(0x315)]('✘');console['error']('\x0a'+a31_0x12b51f[_0x26507a(0x2dc)](_0x26507a(0x165))),console[_0x26507a(0x306)](_0x114660+'\x20'+a31_0x12b51f[_0x26507a(0x287)](_0xf53af0[_0x26507a(0x247)]+'.'+_0xf53af0[_0x26507a(0x262)])),_0xf53af0[_0x26507a(0x2f3)]?_0xf53af0[_0x26507a(0x20a)]!==undefined&&console[_0x26507a(0x306)]('\x20\x20'+a31_0x12b51f[_0x26507a(0x2dc)]('Rows:')+'\x20'+a31_0x12b51f[_0x26507a(0x137)](formatRows(_0xf53af0[_0x26507a(0x20a)]))):console['error']('\x20\x20'+a31_0x12b51f['red'](_0x26507a(0x2a7))+'\x20'+_0xf53af0[_0x26507a(0x110)]);}[a31_0x4797a6(0x194)](_0x56069b){const _0x37fe3f=a31_0x4797a6;if(_0x56069b['attributes'][_0x37fe3f(0x16c)]===0x0)return;console[_0x37fe3f(0x306)]('\x0a'+a31_0x12b51f[_0x37fe3f(0x2dc)](_0x37fe3f(0x21f)));for(const _0x530c80 of _0x56069b['attributes']){const _0x1ea174=_0x530c80[_0x37fe3f(0x2f3)]?a31_0x12b51f['green']('✔'):a31_0x12b51f[_0x37fe3f(0x315)]('✘');let _0x3e3ba4='';if(_0x530c80[_0x37fe3f(0x2f3)]&&_0x530c80['matchedCount']!==undefined&&_0x530c80[_0x37fe3f(0x1e5)]!==undefined){const _0x1ffa9f=_0x530c80[_0x37fe3f(0x1e5)][_0x37fe3f(0x231)](0x1),_0x12538d=_0x530c80[_0x37fe3f(0x1e5)]>=0x50?a31_0x12b51f[_0x37fe3f(0x2db)]:_0x530c80['coveragePercent']>=0x32?a31_0x12b51f[_0x37fe3f(0x215)]:a31_0x12b51f[_0x37fe3f(0x315)];_0x3e3ba4='\x20'+a31_0x12b51f[_0x37fe3f(0x2dc)](_0x37fe3f(0x11d))+'\x20'+_0x12538d(_0x1ffa9f+'%')+'\x20('+formatRows(_0x530c80[_0x37fe3f(0x288)])+_0x37fe3f(0x2d8);}console[_0x37fe3f(0x306)](_0x1ea174+'\x20'+a31_0x12b51f[_0x37fe3f(0x287)](_0x530c80[_0x37fe3f(0x15c)])+_0x3e3ba4),console[_0x37fe3f(0x306)]('\x20\x20'+a31_0x12b51f[_0x37fe3f(0x2dc)](_0x37fe3f(0x12b))+'\x20'+a31_0x12b51f[_0x37fe3f(0x287)](_0x530c80[_0x37fe3f(0x247)]+'.'+_0x530c80['table']));const _0x5d50d3=_0x530c80['joinKey']===_0x530c80[_0x37fe3f(0x1ce)]?a31_0x12b51f[_0x37fe3f(0x2dc)]('Join\x20on:')+'\x20'+_0x530c80[_0x37fe3f(0x16b)]:a31_0x12b51f['dim'](_0x37fe3f(0x254))+'\x20'+_0x530c80[_0x37fe3f(0x16b)]+_0x37fe3f(0x1f4)+_0x530c80[_0x37fe3f(0x1ce)];console[_0x37fe3f(0x306)]('\x20\x20'+_0x5d50d3),console[_0x37fe3f(0x306)]('\x20\x20'+a31_0x12b51f[_0x37fe3f(0x2dc)]('Columns:')),this[_0x37fe3f(0x141)](_0x530c80[_0x37fe3f(0x207)]),!_0x530c80[_0x37fe3f(0x2f3)]&&console[_0x37fe3f(0x306)]('\x20\x20'+a31_0x12b51f[_0x37fe3f(0x315)](_0x37fe3f(0x2a7))+'\x20'+_0x530c80[_0x37fe3f(0x110)]);}}[a31_0x4797a6(0x1f5)](_0x403cb9,_0x581b3f){const _0x4f9a5b=a31_0x4797a6;if(_0x403cb9[_0x4f9a5b(0x275)][_0x4f9a5b(0x16c)]===0x0)return;console['error']('\x0a'+a31_0x12b51f[_0x4f9a5b(0x2dc)](_0x4f9a5b(0x2ea))+'\x20'+a31_0x12b51f[_0x4f9a5b(0x2dc)]('('+_0x581b3f+')'));for(const _0x4ed74b of _0x403cb9['behaviors']){const _0x2e9a98=_0x4ed74b[_0x4f9a5b(0x2f3)]?a31_0x12b51f[_0x4f9a5b(0x2db)]('✔'):a31_0x12b51f[_0x4f9a5b(0x315)]('✘');let _0x24bf92='';if(_0x4ed74b[_0x4f9a5b(0x2f3)]&&_0x4ed74b[_0x4f9a5b(0x130)]!==undefined&&_0x4ed74b[_0x4f9a5b(0x2fd)]!==undefined){const _0x5559c8=_0x4ed74b[_0x4f9a5b(0x2a5)]?.['toFixed'](0x1)||'?',_0x5eefa2=(_0x4ed74b['customerPercent']??0x0)>=0x32?a31_0x12b51f['green']:(_0x4ed74b[_0x4f9a5b(0x2a5)]??0x0)>=0x14?a31_0x12b51f[_0x4f9a5b(0x215)]:a31_0x12b51f[_0x4f9a5b(0x315)];_0x24bf92='\x20'+a31_0x12b51f[_0x4f9a5b(0x2dc)](_0x4f9a5b(0x30a))+'\x20'+_0x5eefa2(formatRows(_0x4ed74b['customersWithEvents']))+'\x20('+_0x5559c8+_0x4f9a5b(0x238)+a31_0x12b51f[_0x4f9a5b(0x2dc)](_0x4f9a5b(0x237))+'\x20'+a31_0x12b51f['cyan'](formatRows(_0x4ed74b[_0x4f9a5b(0x2fd)]));}console[_0x4f9a5b(0x306)](_0x2e9a98+'\x20'+a31_0x12b51f[_0x4f9a5b(0x287)](_0x4ed74b['name'])+_0x24bf92),console[_0x4f9a5b(0x306)]('\x20\x20'+a31_0x12b51f[_0x4f9a5b(0x2dc)](_0x4f9a5b(0x12b))+'\x20'+a31_0x12b51f[_0x4f9a5b(0x287)](_0x4ed74b['database']+'.'+_0x4ed74b[_0x4f9a5b(0x262)]));const _0x119e8e=_0x4ed74b[_0x4f9a5b(0x16b)]===_0x4ed74b[_0x4f9a5b(0x1ce)]?a31_0x12b51f[_0x4f9a5b(0x2dc)](_0x4f9a5b(0x1e9))+'\x20'+_0x4ed74b[_0x4f9a5b(0x16b)]:a31_0x12b51f[_0x4f9a5b(0x2dc)]('Join:')+'\x20'+_0x4ed74b[_0x4f9a5b(0x16b)]+_0x4f9a5b(0x1f4)+_0x4ed74b[_0x4f9a5b(0x1ce)];console[_0x4f9a5b(0x306)]('\x20\x20'+_0x119e8e),console[_0x4f9a5b(0x306)]('\x20\x20'+a31_0x12b51f[_0x4f9a5b(0x2dc)]('Columns:')),this[_0x4f9a5b(0x141)](_0x4ed74b[_0x4f9a5b(0x207)]),!_0x4ed74b[_0x4f9a5b(0x2f3)]&&console[_0x4f9a5b(0x306)]('\x20\x20'+a31_0x12b51f[_0x4f9a5b(0x315)](_0x4f9a5b(0x2a7))+'\x20'+_0x4ed74b[_0x4f9a5b(0x110)]);}}[a31_0x4797a6(0x141)](_0x49339f){const _0x934d96=a31_0x4797a6;for(const _0x4cea6c of _0x49339f){_0x4cea6c[_0x934d96(0x115)]===_0x4cea6c[_0x934d96(0x206)]||_0x4cea6c[_0x934d96(0x206)]==='*'?console[_0x934d96(0x306)](_0x934d96(0x24a)+_0x4cea6c[_0x934d96(0x115)]):console[_0x934d96(0x306)](_0x934d96(0x24a)+_0x4cea6c[_0x934d96(0x115)]+'\x20'+a31_0x12b51f[_0x934d96(0x2dc)]('('+_0x4cea6c[_0x934d96(0x206)]+')'));}}[a31_0x4797a6(0x1a1)](_0x169281){const _0x456338=a31_0x4797a6;console[_0x456338(0x306)]('─'['repeat'](0x3c));if(_0x169281[_0x456338(0x128)][_0x456338(0x16c)]>0x0){console[_0x456338(0x306)]('\x0a'+a31_0x12b51f['red'](_0x456338(0x1b7)));for(const _0x39caa0 of _0x169281[_0x456338(0x128)]){console[_0x456338(0x306)]('\x20\x20'+a31_0x12b51f[_0x456338(0x315)]('•')+'\x20'+_0x39caa0);}}_0x169281[_0x456338(0x191)]&&console[_0x456338(0x306)]('\x0a'+a31_0x12b51f[_0x456338(0x2db)]('✔')+_0x456338(0x303));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{['name']=a31_0x4797a6(0x1d4);['description']='Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration';async[a31_0x4797a6(0x152)](_0xff2537){const _0x488f83=a31_0x4797a6,{options:_0x1ea913,args:_0x5818b5,tdx:_0x462f82}=_0xff2537,_0x3a88da=_0x1ea913,_0x522da6=_0x5818b5[0x0]||_0x1ea913[_0x488f83(0x13d)];if(!_0x522da6)return showParentSegmentNotSetError(_0x488f83(0x2e4)+_0x488f83(0x253)+_0x488f83(0x1a4)+_0x488f83(0x2d5)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+_0x488f83(0x1fe)+'\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a'+_0x488f83(0x175)),0x1;if(!_0x3a88da[_0x488f83(0x2fe)]&&!_0x3a88da[_0x488f83(0x27a)]&&!_0x3a88da[_0x488f83(0x1ba)]&&!_0x3a88da['enriched'])return console[_0x488f83(0x306)](a31_0x12b51f[_0x488f83(0x315)]('Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a')),console[_0x488f83(0x306)]('Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a'),console[_0x488f83(0x306)](_0x488f83(0x267)),console[_0x488f83(0x306)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console[_0x488f83(0x306)](_0x488f83(0x2f5)),console[_0x488f83(0x306)](_0x488f83(0x242)),console[_0x488f83(0x306)](_0x488f83(0x1f6)),0x1;const _0x214bf9=resolveYamlFile(_0x522da6);if(!existsSync(_0x214bf9))return showFileNotFoundError(_0x214bf9,_0x522da6),0x1;_0x3a88da[_0x488f83(0x282)]&&(console['error'](_0x488f83(0x31b)+_0x3a88da[_0x488f83(0x1c2)]),console[_0x488f83(0x306)](_0x488f83(0x212)+_0x214bf9));let _0x21a94b;try{_0x21a94b=readFileSync(_0x214bf9,_0x488f83(0x1aa));}catch(_0x33b905){const _0x5bbe58=_0x33b905 instanceof Error?_0x33b905[_0x488f83(0x182)]:String(_0x33b905);return console[_0x488f83(0x306)](_0x488f83(0x251)+_0x5bbe58),0x1;}let _0x5ae5a0;try{_0x5ae5a0=parseDef(_0x21a94b);}catch(_0x3c75f2){const _0x58a06b=_0x3c75f2 instanceof Error?_0x3c75f2[_0x488f83(0x182)]:String(_0x3c75f2);return console[_0x488f83(0x306)](a31_0x12b51f['red'](_0x488f83(0x15a)+_0x58a06b)),0x1;}if(_0x3a88da[_0x488f83(0x27a)]===!![]||_0x3a88da[_0x488f83(0x27a)]===''){const _0x44c888=_0x5ae5a0[_0x488f83(0x2b7)]?.[_0x488f83(0x1d5)](_0xbe44de=>_0xbe44de['name'])||[];if(_0x44c888[_0x488f83(0x16c)]===0x0)console['error'](a31_0x12b51f[_0x488f83(0x315)](_0x488f83(0x153)));else{console[_0x488f83(0x306)](a31_0x12b51f[_0x488f83(0x315)](_0x488f83(0x2cd))),console[_0x488f83(0x306)](_0x488f83(0x2e6));for(const _0x1bd139 of _0x44c888){console['error']('\x20\x20'+a31_0x12b51f[_0x488f83(0x137)](_0x1bd139));}console[_0x488f83(0x306)](_0x488f83(0x18f)+_0x522da6+'\x20--attribute\x20\x22'+_0x44c888[0x0]+'\x22');}return 0x1;}if(_0x3a88da[_0x488f83(0x1ba)]===!![]||_0x3a88da[_0x488f83(0x1ba)]===''){const _0x5bee87=_0x5ae5a0[_0x488f83(0x275)]?.[_0x488f83(0x1d5)](_0x5f4b6c=>_0x5f4b6c['name'])||[];if(_0x5bee87[_0x488f83(0x16c)]===0x0)console[_0x488f83(0x306)](a31_0x12b51f[_0x488f83(0x315)](_0x488f83(0x12e)));else{console[_0x488f83(0x306)](a31_0x12b51f[_0x488f83(0x315)](_0x488f83(0x1b5))),console[_0x488f83(0x306)](_0x488f83(0x2de));for(const _0xba992e of _0x5bee87){console[_0x488f83(0x306)]('\x20\x20'+a31_0x12b51f[_0x488f83(0x137)](_0xba992e));}console[_0x488f83(0x306)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x522da6+_0x488f83(0x210)+_0x5bee87[0x0]+'\x22');}return 0x1;}const _0xfd826f=createCommandSpinner(a31_0x12b51f[_0x488f83(0x2dc)](_0x488f83(0x1df)),{'verbose':_0x3a88da['verbose']});_0xfd826f['start']();const _0x5e706b={'onProgress':_0x113a74=>{const _0x1a87a7=_0x488f83;_0xfd826f[_0x1a87a7(0x159)]=formatProgressMessage(_0x113a74);}};if(_0x3a88da[_0x488f83(0x2fe)])_0x5e706b[_0x488f83(0x2fe)]=!![];if(_0x3a88da[_0x488f83(0x27a)]&&typeof _0x3a88da[_0x488f83(0x27a)]===_0x488f83(0x12d))_0x5e706b[_0x488f83(0x27a)]=_0x3a88da[_0x488f83(0x27a)];if(_0x3a88da['behavior']&&typeof _0x3a88da[_0x488f83(0x1ba)]===_0x488f83(0x12d))_0x5e706b[_0x488f83(0x1ba)]=_0x3a88da['behavior'];if(_0x3a88da[_0x488f83(0x117)])_0x5e706b['enriched']=!![];if(_0x3a88da['interval'])_0x5e706b[_0x488f83(0x24d)]=_0x3a88da[_0x488f83(0x24d)];let _0x2da5c6;try{_0x2da5c6=await _0x462f82['segment'][_0x488f83(0x2d6)](_0x21a94b,_0x5e706b),_0xfd826f[_0x488f83(0x2bc)]();}catch(_0x2ccd60){_0xfd826f['stop']();throw _0x2ccd60;}return await this['displayPreviewResults'](_0x2da5c6,{'master':_0x3a88da[_0x488f83(0x2fe)],'attribute':typeof _0x3a88da[_0x488f83(0x27a)]===_0x488f83(0x12d)?_0x3a88da['attribute']:undefined,'behavior':typeof _0x3a88da[_0x488f83(0x1ba)]===_0x488f83(0x12d)?_0x3a88da[_0x488f83(0x1ba)]:undefined,'enriched':_0x3a88da[_0x488f83(0x117)]}),_0x2da5c6[_0x488f83(0x191)]?0x0:0x1;}async[a31_0x4797a6(0x119)](_0x476258,_0x496b1d){const _0x1c66df=a31_0x4797a6;console['error']('\x0a'+a31_0x12b51f[_0x1c66df(0x287)](_0x1c66df(0x1e2))+'\x20'+_0x476258[_0x1c66df(0x15c)]),console[_0x1c66df(0x306)]('═'[_0x1c66df(0x112)](0x3c));if(_0x496b1d[_0x1c66df(0x2fe)]&&_0x476258[_0x1c66df(0x25f)]){const _0x21d2ac=a31_0x12b51f['dim']('Master:')+'\x20'+a31_0x12b51f[_0x1c66df(0x287)](_0x476258[_0x1c66df(0x2fe)][_0x1c66df(0x247)]+'.'+_0x476258[_0x1c66df(0x2fe)]['table']);await this[_0x1c66df(0x2a6)](_0x21d2ac,_0x476258[_0x1c66df(0x25f)]);}else{if(_0x496b1d[_0x1c66df(0x27a)]&&_0x476258['sampleData']){const _0x47cfdd=a31_0x12b51f[_0x1c66df(0x2dc)]('Attribute:')+'\x20'+a31_0x12b51f['bold'](_0x496b1d[_0x1c66df(0x27a)]);await this[_0x1c66df(0x2a6)](_0x47cfdd,_0x476258[_0x1c66df(0x25f)]);}else{if(_0x496b1d[_0x1c66df(0x1ba)]&&_0x476258[_0x1c66df(0x25f)]){const _0x547e0f=a31_0x12b51f[_0x1c66df(0x2dc)]('Behavior:')+'\x20'+a31_0x12b51f[_0x1c66df(0x287)](_0x496b1d[_0x1c66df(0x1ba)]);await this[_0x1c66df(0x2a6)](_0x547e0f,_0x476258[_0x1c66df(0x25f)]);}else{if(_0x496b1d['enriched']&&_0x476258[_0x1c66df(0x25f)]){const _0x1449f2=a31_0x12b51f[_0x1c66df(0x2dc)]('Enriched:')+'\x20'+a31_0x12b51f['bold'](_0x1c66df(0x1e0));await this[_0x1c66df(0x2a6)](_0x1449f2,_0x476258[_0x1c66df(0x25f)]);}else!_0x476258[_0x1c66df(0x25f)]&&console['error'](_0x1c66df(0x2ac));}}}if(_0x476258[_0x1c66df(0x128)][_0x1c66df(0x16c)]>0x0){console['error']('─'[_0x1c66df(0x112)](0x3c)),console[_0x1c66df(0x306)]('\x0a'+a31_0x12b51f[_0x1c66df(0x315)](_0x1c66df(0x1b7)));for(const _0x5267f8 of _0x476258[_0x1c66df(0x128)]){console[_0x1c66df(0x306)]('\x20\x20'+a31_0x12b51f[_0x1c66df(0x315)]('•')+'\x20'+_0x5267f8);}}}async['displaySampleData'](_0x5c8376,_0xfd7a6c){const _0x13430b=a31_0x4797a6;if(_0xfd7a6c[_0x13430b(0x16c)]===0x0){console[_0x13430b(0x306)]('\x0a'+_0x5c8376),console[_0x13430b(0x306)](_0x13430b(0x23b));return;}console[_0x13430b(0x306)]('\x0a'+_0x5c8376);const _0x1e6c93=Object['keys'](_0xfd7a6c[0x0])[_0x13430b(0x1d5)](_0x5089c7=>({'name':_0x5089c7,'type':typeof _0xfd7a6c[0x0][_0x5089c7]===_0x13430b(0x2a1)?_0x13430b(0x263):_0x13430b(0x173)})),_0x14a9f1={'queryId':_0x13430b(0x13a),'columns':_0x1e6c93,'data':_0xfd7a6c,'stats':{'state':_0x13430b(0x272),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0xfd7a6c[_0x13430b(0x16c)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x30ba2b=formatAsTable(_0x14a9f1,_0xfd7a6c[_0x13430b(0x16c)],!![]);await writeOutput(_0x30ba2b,undefined,_0x13430b(0x262));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x161);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x132);async[a31_0x4797a6(0x152)](_0x45befe){const _0x46b09a=a31_0x4797a6,{options:_0x437dcc,args:_0x59042e,tdx:_0x361e04}=_0x45befe,_0x100c99=_0x437dcc,_0x1be823=_0x59042e[0x0]||_0x437dcc[_0x46b09a(0x13d)];if(!_0x1be823)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x58bdce=resolveYamlFile(_0x1be823);if(existsSync(_0x58bdce)){_0x100c99['verbose']&&console[_0x46b09a(0x306)](_0x46b09a(0x26d)+_0x58bdce);let _0x444015;try{_0x444015=readFileSync(_0x58bdce,_0x46b09a(0x1aa));}catch(_0x5470a6){const _0xf787b9=_0x5470a6 instanceof Error?_0x5470a6['message']:String(_0x5470a6);return console[_0x46b09a(0x306)](_0x46b09a(0x251)+_0xf787b9),0x1;}const _0x57f7d2=await withSpinner(_0x46b09a(0x1d1),()=>_0x361e04[_0x46b09a(0x14c)][_0x46b09a(0x2af)](_0x444015),{'verbose':_0x100c99[_0x46b09a(0x282)]}),_0x5119e4=_0x57f7d2['data'],{isNew:_0x4fc9bd,name:_0x2a2283,hasChanges:_0x338908,diffFormatted:_0x56f98e}=_0x5119e4;if(_0x338908){_0x4fc9bd?console[_0x46b09a(0x306)](_0x46b09a(0x29a)+_0x2a2283+'\x27:'):console['error']('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x2a2283+'\x27:');console[_0x46b09a(0x306)]('─'[_0x46b09a(0x112)](0x3c)),console['error'](_0x56f98e),console[_0x46b09a(0x306)]('─'['repeat'](0x3c));const _0x2edacf=_0x4fc9bd?_0x46b09a(0x170)+_0x2a2283+'\x27\x20and\x20run\x20workflow?':_0x46b09a(0x11a)+_0x2a2283+_0x46b09a(0x298);if(!_0x100c99[_0x46b09a(0x1fc)]){if(!isInteractive())return console[_0x46b09a(0x306)](a31_0x12b51f['red'](_0x46b09a(0x312)),_0x46b09a(0x11e)),console[_0x46b09a(0x306)](a31_0x12b51f[_0x46b09a(0x2dc)](_0x46b09a(0x2c1))),0x1;const _0x301fbd=await confirmKey(_0x2edacf);if(!_0x301fbd)return console['error'](a31_0x12b51f[_0x46b09a(0x215)](_0x46b09a(0x1a6))),0x1;}const _0xf46ab9=_0x4fc9bd?_0x46b09a(0x1d7):_0x46b09a(0x18d);await withSpinner(_0xf46ab9+_0x46b09a(0x1c1)+_0x2a2283+_0x46b09a(0x131),()=>_0x5119e4['apply'](),{'verbose':_0x100c99['verbose']});const _0x3222b4=_0x4fc9bd?_0x46b09a(0x202):'Updated';console[_0x46b09a(0x306)]('✔\x20'+_0x3222b4+'\x20parent\x20segment\x20\x27'+_0x2a2283+'\x27');}else console['error'](_0x46b09a(0x249)+_0x2a2283+_0x46b09a(0x2d2));}const _0x144457=await withSpinner(_0x46b09a(0x30e)+_0x1be823+_0x46b09a(0x131),()=>_0x361e04[_0x46b09a(0x14c)][_0x46b09a(0x17a)](_0x1be823),{'verbose':_0x100c99[_0x46b09a(0x282)]}),_0x1977a0=_0x144457['data'],_0x1957d7=getConsoleUrl(_0x100c99['site'],'/app/workflows/'+_0x1977a0['workflowId']+_0x46b09a(0x26e)+_0x1977a0['workflowSessionId']+_0x46b09a(0x16e)+_0x1977a0[_0x46b09a(0x260)]);return console['error']('\x0a✔\x20Workflow\x20started'),console['error']('\x20\x20'+a31_0x12b51f[_0x46b09a(0x2dc)](_0x46b09a(0x2da))+'\x20'+_0x1977a0[_0x46b09a(0x108)]),console[_0x46b09a(0x306)]('\x20\x20'+a31_0x12b51f[_0x46b09a(0x2dc)](_0x46b09a(0x224))+'\x20'+_0x1977a0[_0x46b09a(0x301)]),console[_0x46b09a(0x306)]('\x20\x20'+a31_0x12b51f[_0x46b09a(0x2dc)](_0x46b09a(0x2c8))+'\x20'+_0x1977a0['workflowSessionId']),console['error']('\x20\x20'+a31_0x12b51f['dim'](_0x46b09a(0x1fb))+'\x20'+_0x1977a0[_0x46b09a(0x260)]),console['error']('\x20\x20'+_0x1957d7),console[_0x46b09a(0x306)]('\x0a'+a31_0x12b51f['dim'](_0x46b09a(0x22f))+'\x20tdx\x20wf\x20attempt\x20'+_0x1977a0[_0x46b09a(0x260)]+_0x46b09a(0x14e)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x4797a6(0x15c)]='segment:parent:fields';[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x245);async[a31_0x4797a6(0x152)](_0x4f6381){const _0x4883bc=a31_0x4797a6,{options:_0x5ec12f,args:_0x57a8cc,tdx:_0x443857}=_0x4f6381,_0x2586bd=_0x57a8cc[0x0]||_0x5ec12f[_0x4883bc(0x13d)];if(!_0x2586bd)return showParentSegmentNotSetError(_0x4883bc(0x302)+_0x4883bc(0x2e9)),0x1;_0x5ec12f[_0x4883bc(0x282)]&&(console['error'](_0x4883bc(0x31b)+_0x5ec12f[_0x4883bc(0x1c2)]),console[_0x4883bc(0x306)](_0x4883bc(0x1b3)+_0x2586bd));const _0x53399e=await withSpinner(_0x4883bc(0x314)+_0x2586bd+_0x4883bc(0x131),()=>_0x443857[_0x4883bc(0x14c)][_0x4883bc(0x229)](_0x2586bd),{'verbose':_0x5ec12f['verbose']}),_0x2f2234=_0x53399e['data'];console[_0x4883bc(0x306)]('✔\x20Found\x20'+_0x2f2234['length']+_0x4883bc(0x256)+(_0x2f2234[_0x4883bc(0x16c)]!==0x1?'s':''));if(_0x5ec12f[_0x4883bc(0x1bf)]||_0x5ec12f[_0x4883bc(0x1bc)])return await handleSDKOutput(_0x2f2234,_0x5ec12f),0x0;return displayFieldsHumanReadable(_0x2f2234,_0x2586bd),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x2df);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x2bf);async[a31_0x4797a6(0x152)](_0x26a438){const _0x1d2ec3=a31_0x4797a6,{options:_0x74393b,args:_0x227d88,tdx:_0x3de7cc}=_0x26a438,_0x2d9294=_0x74393b,_0x3b543d=_0x227d88[0x0]||_0x74393b[_0x1d2ec3(0x13d)];if(!_0x3b543d)return showParentSegmentNotSetError(_0x1d2ec3(0x158)+_0x1d2ec3(0x114)+_0x1d2ec3(0x211)+_0x1d2ec3(0x1dc)),0x1;_0x74393b[_0x1d2ec3(0x282)]&&(console[_0x1d2ec3(0x306)](_0x1d2ec3(0x31b)+_0x74393b['site']),console[_0x1d2ec3(0x306)](_0x1d2ec3(0x1b3)+_0x3b543d));const _0x7fc918=await withSpinner(_0x1d2ec3(0x2a2)+_0x3b543d+'\x27...',()=>_0x3de7cc[_0x1d2ec3(0x14c)][_0x1d2ec3(0x10d)](_0x3b543d),{'verbose':_0x74393b[_0x1d2ec3(0x282)]}),_0x1db76a=_0x7fc918[_0x1d2ec3(0x2a4)];if(_0x2d9294[_0x1d2ec3(0x184)]){const _0x1f3406=getConsoleNextUrl(_0x2d9294[_0x1d2ec3(0x1c2)],_0x1d2ec3(0x180)+_0x1db76a['id']);return console[_0x1d2ec3(0x306)](a31_0x12b51f[_0x1d2ec3(0x2db)]('✔')+_0x1d2ec3(0x2b2)+a31_0x12b51f[_0x1d2ec3(0x137)](_0x1f3406)),openBrowser(_0x1f3406),0x0;}return await handleSingleObjectOutput(_0x1db76a,_0x74393b),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x4797a6(0x15c)]='segment:parent:desc';[a31_0x4797a6(0x2eb)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async['execute'](_0x547012){const _0x530a1d=a31_0x4797a6,{options:_0x402f98,args:_0x59dacb,tdx:_0x4c8c9a}=_0x547012,_0x19c7d8=_0x402f98,_0x100e61=_0x59dacb[0x0]||_0x402f98[_0x530a1d(0x13d)];if(!_0x100e61)return showParentSegmentNotSetError(_0x530a1d(0x280)+_0x530a1d(0x177)+'Options:\x0a'+_0x530a1d(0x2b1)),0x1;_0x402f98[_0x530a1d(0x282)]&&(console[_0x530a1d(0x306)](_0x530a1d(0x31b)+_0x402f98['site']),console['error'](_0x530a1d(0x1b3)+_0x100e61));const _0x374d89=await withSpinner(_0x530a1d(0x2d3)+_0x100e61+_0x530a1d(0x131),()=>_0x4c8c9a['segment'][_0x530a1d(0x127)](_0x100e61),{'verbose':_0x402f98[_0x530a1d(0x282)]}),_0x5b2d4c=_0x374d89[_0x530a1d(0x2a4)],_0x5822e3=_0x4c8c9a[_0x530a1d(0x14c)][_0x530a1d(0x2a8)](_0x5b2d4c);if(_0x19c7d8[_0x530a1d(0x29c)]){const _0x5224a8=await this[_0x530a1d(0x25c)](_0x547012,_0x100e61,_0x5b2d4c,_0x5822e3),_0x1fbe0a=this[_0x530a1d(0x220)](_0x5224a8);writeFileSync(_0x19c7d8[_0x530a1d(0x29c)],_0x1fbe0a);const _0x328ecd=_0x5224a8[_0x530a1d(0x2e2)]['columns'][_0x530a1d(0x16c)]+_0x5224a8[_0x530a1d(0x275)][_0x530a1d(0x20b)]((_0x3c990c,_0x1e7093)=>_0x3c990c+_0x1e7093[_0x530a1d(0x207)][_0x530a1d(0x16c)],0x0),_0x5be78c=_0x5224a8[_0x530a1d(0x275)][_0x530a1d(0x19c)](_0x46ae85=>_0x46ae85[_0x530a1d(0x207)][_0x530a1d(0x16c)]===0x0)['length'];return console['log'](_0x530a1d(0x1a3)+_0x19c7d8['output']),console[_0x530a1d(0x225)]('\x20\x20Database:\x20'+_0x5822e3),console[_0x530a1d(0x225)]('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0x5224a8[_0x530a1d(0x275)][_0x530a1d(0x16c)]+'\x20behaviors'),console[_0x530a1d(0x225)]('\x20\x20Columns:\x20'+_0x328ecd+'\x20total'),_0x5be78c>0x0&&console[_0x530a1d(0x225)](_0x530a1d(0x1ef)+_0x5be78c+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console['error']('\x0a'+a31_0x12b51f[_0x530a1d(0x287)](_0x530a1d(0x2b9))+'\x20'+a31_0x12b51f[_0x530a1d(0x137)](_0x5822e3));const _0x11c1d9=await withSpinner(_0x530a1d(0x11c),()=>_0x4c8c9a[_0x530a1d(0x14c)][_0x530a1d(0x187)](_0x5b2d4c),{'verbose':_0x402f98[_0x530a1d(0x282)]});console[_0x530a1d(0x306)]('\x0a'+a31_0x12b51f[_0x530a1d(0x287)](_0x530a1d(0x2e2))+'\x20'+a31_0x12b51f[_0x530a1d(0x2dc)]('('+_0x5822e3+_0x530a1d(0x18e)));const _0x5ad157=await executeSchemaQuery(_0x11c1d9[_0x530a1d(0x2a4)],_0x4c8c9a,_0x402f98);await handleQueryOutput(_0x5ad157,_0x402f98);const _0x5a358e=await withSpinner(_0x530a1d(0x22c),()=>_0x4c8c9a['segment'][_0x530a1d(0x15d)](_0x5b2d4c),{'verbose':_0x402f98[_0x530a1d(0x282)]});for(const _0x4a28ec of _0x5a358e['data']){const _0x7736b1='behavior_'+_0x4a28ec[_0x530a1d(0x140)]()[_0x530a1d(0x19b)](/\s+/g,'_'),_0x3fabde=_0x530a1d(0x1d6)+_0x5822e3+'.'+_0x7736b1;console[_0x530a1d(0x306)]('\x0a'+a31_0x12b51f[_0x530a1d(0x287)](_0x4a28ec)+'\x20'+a31_0x12b51f[_0x530a1d(0x2dc)]('('+_0x5822e3+'.'+_0x7736b1+')'));try{const _0x6a2368=await executeSchemaQuery(_0x3fabde,_0x4c8c9a,_0x402f98);await handleQueryOutput(_0x6a2368,_0x402f98);}catch{console[_0x530a1d(0x306)](a31_0x12b51f[_0x530a1d(0x215)](_0x530a1d(0x26f)));}}return 0x0;}async[a31_0x4797a6(0x25c)](_0x388e4c,_0x3f1a25,_0x6091b3,_0x1cf531){const _0x52a8d3=a31_0x4797a6,{options:_0x6d18f1,tdx:_0x53e3e5}=_0x388e4c,_0x3d83e5=await withSpinner(_0x52a8d3(0x11c),()=>_0x53e3e5[_0x52a8d3(0x14c)]['getParentSQL'](_0x6091b3),{'verbose':_0x6d18f1[_0x52a8d3(0x282)]}),_0x25bb19=await executeSchemaQuery(_0x3d83e5['data'],_0x53e3e5,_0x6d18f1),_0x23e6af=_0x25bb19[_0x52a8d3(0x2a4)]['map'](_0x21b34e=>({'name':_0x21b34e[_0x52a8d3(0x236)],'type':_0x21b34e[_0x52a8d3(0x271)]})),_0x885622=await withSpinner(_0x52a8d3(0x22c),()=>_0x53e3e5[_0x52a8d3(0x14c)][_0x52a8d3(0x15d)](_0x6091b3),{'verbose':_0x6d18f1[_0x52a8d3(0x282)]}),_0xbc73a6=[];for(const _0x24b7f7 of _0x885622[_0x52a8d3(0x2a4)]){const _0x738d6d=_0x52a8d3(0x305)+_0x24b7f7[_0x52a8d3(0x140)]()[_0x52a8d3(0x19b)](/\s+/g,'_'),_0x13bace='SELECT\x20*\x20FROM\x20'+_0x1cf531+'.'+_0x738d6d;let _0x290036=[];try{const _0x55cb7f=await executeSchemaQuery(_0x13bace,_0x53e3e5,_0x6d18f1);_0x290036=_0x55cb7f[_0x52a8d3(0x2a4)][_0x52a8d3(0x1d5)](_0x39d450=>({'name':_0x39d450[_0x52a8d3(0x236)],'type':_0x39d450[_0x52a8d3(0x271)]}));}catch{}_0xbc73a6[_0x52a8d3(0x1e7)]({'table':_0x738d6d,'columns':_0x290036});}return{'database':_0x1cf531,'parent_segment':_0x3f1a25,'parent_id':_0x6091b3,'customers':{'table':_0x52a8d3(0x2e2),'columns':_0x23e6af},'behaviors':_0xbc73a6};}[a31_0x4797a6(0x220)](_0x2c798b){const _0x54c435=a31_0x4797a6,_0x105fcb=_0x424909=>{const _0x1781b8=a31_0x21b4;if(_0x424909['length']===0x0)return'[]';const _0x190ba2=_0x424909[_0x1781b8(0x1d5)](_0x5ac1ac=>'\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22'+_0x5ac1ac['name']+'\x22,\x20\x22type\x22:\x20\x22'+_0x5ac1ac[_0x1781b8(0x279)]+'\x22\x20}');return'[\x0a'+_0x190ba2[_0x1781b8(0x13f)](',\x0a')+_0x1781b8(0x290);},_0x1b625b=_0x2c798b[_0x54c435(0x275)]['map'](_0x32dc7d=>{const _0x55b36b=_0x54c435;return'\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x32dc7d[_0x55b36b(0x262)]+_0x55b36b(0x160)+_0x105fcb(_0x32dc7d[_0x55b36b(0x207)])[_0x55b36b(0x19b)](/^/gm,'\x20\x20')[_0x55b36b(0x16a)]()+'\x0a\x20\x20\x20\x20}';})[_0x54c435(0x13f)](',\x0a');return _0x54c435(0x2d4)+_0x2c798b[_0x54c435(0x247)]+_0x54c435(0x30c)+_0x2c798b['parent_segment']+_0x54c435(0x1e3)+_0x2c798b['parent_id']+_0x54c435(0x21a)+_0x2c798b[_0x54c435(0x2e2)][_0x54c435(0x262)]+_0x54c435(0x1e1)+_0x105fcb(_0x2c798b[_0x54c435(0x2e2)][_0x54c435(0x207)])[_0x54c435(0x19b)](/^/gm,'\x20\x20')[_0x54c435(0x16a)]()+_0x54c435(0x252)+_0x1b625b+_0x54c435(0x2d1);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x106);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x166);async['execute'](_0x239a0b){const _0x5f5b86=a31_0x4797a6,{options:_0x488edf,args:_0x346fcf,tdx:_0x1e1a0c}=_0x239a0b,_0x4be6a8=_0x346fcf[0x0]||_0x488edf[_0x5f5b86(0x13d)];if(!_0x4be6a8)return showParentSegmentNotSetError(_0x5f5b86(0x185)+_0x5f5b86(0x304)),0x1;_0x488edf[_0x5f5b86(0x282)]&&(console[_0x5f5b86(0x306)](_0x5f5b86(0x31b)+_0x488edf[_0x5f5b86(0x1c2)]),console[_0x5f5b86(0x306)](_0x5f5b86(0x1b3)+_0x4be6a8));const _0x2f3389=await withSpinner(_0x5f5b86(0x2d3)+_0x4be6a8+_0x5f5b86(0x131),()=>_0x1e1a0c['segment']['resolveParentId'](_0x4be6a8),{'verbose':_0x488edf[_0x5f5b86(0x282)]}),_0x46c7da=_0x2f3389[_0x5f5b86(0x2a4)],_0x1bf406=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x4be6a8+_0x5f5b86(0x131),()=>_0x1e1a0c[_0x5f5b86(0x14c)]['getParentSQL'](_0x46c7da),{'verbose':_0x488edf[_0x5f5b86(0x282)]}),_0x160a42=_0x1bf406['data'];return _0x488edf['format']==='json'||_0x488edf[_0x5f5b86(0x1b6)]==='jsonl'?await handleSDKOutput([{'sql':_0x160a42}],_0x488edf):console[_0x5f5b86(0x225)](_0x160a42),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x295);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x174);async[a31_0x4797a6(0x152)](_0x39b431){const _0x441421=a31_0x4797a6,{options:_0x5d8012,args:_0x35c8ae,tdx:_0xdc64c3}=_0x39b431,_0x8c4b1a=_0x35c8ae[0x0]||_0x5d8012[_0x441421(0x13d)];if(!_0x8c4b1a)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'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment'),0x1;_0x5d8012[_0x441421(0x282)]&&(console[_0x441421(0x306)]('Site:\x20'+_0x5d8012[_0x441421(0x1c2)]),console[_0x441421(0x306)](_0x441421(0x1b3)+_0x8c4b1a));const _0x4de5f0=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x8c4b1a+'\x27...',()=>_0xdc64c3[_0x441421(0x14c)]['resolveParentId'](_0x8c4b1a),{'verbose':_0x5d8012[_0x441421(0x282)]}),_0x382d81=_0x4de5f0[_0x441421(0x2a4)],_0x2a1f98=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x8c4b1a+_0x441421(0x131),()=>_0xdc64c3[_0x441421(0x14c)]['getParentSQL'](_0x382d81),{'verbose':_0x5d8012[_0x441421(0x282)]});let _0x442ad9=_0x2a1f98[_0x441421(0x2a4)];const _0x4841dd=resolveLimit(_0x5d8012[_0x441421(0x258)],DEFAULT_DISPLAY_LIMIT),_0x426873=/\bLIMIT\s+\d+/i[_0x441421(0x208)](_0x442ad9);!_0x426873&&(_0x442ad9=_0x442ad9[_0x441421(0x16a)]()[_0x441421(0x19b)](/;+$/,''),_0x442ad9=_0x441421(0x1b4)+_0x442ad9+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x4841dd);_0x5d8012[_0x441421(0x282)]&&console[_0x441421(0x306)](_0x441421(0xfe)+_0x442ad9);const _0x28c07e=await withProgressSpinner(_0x441421(0x201),async _0x520d07=>{const _0x5b4f1b=_0x441421,_0x1a163e=await _0xdc64c3[_0x5b4f1b(0x1b1)]['execute'](_0x442ad9,{'catalog':'td','schema':'information_schema','onJobId':_0xe0426b=>{_0x520d07['setJobId'](_0xe0426b);}});return _0x1a163e;},{'verbose':_0x5d8012[_0x441421(0x282)]}),_0x14f3bd=_0x28c07e[_0x441421(0x2a4)],_0x13ff48=_0x14f3bd['jobId']?'\x20[Job\x20ID:\x20'+_0x14f3bd['jobId']+']':'';return console[_0x441421(0x306)](_0x441421(0x124)+_0x14f3bd[_0x441421(0x214)][_0x441421(0x1a0)][_0x441421(0x2ec)]()+_0x441421(0x268)+(_0x441421(0x14d)+formatElapsed(_0x14f3bd[_0x441421(0x214)]['elapsedTimeMillis'])+_0x13ff48)),await handleQueryOutput(_0x14f3bd,_0x5d8012),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x2c5);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x30d);async['execute'](_0x7357e6){const _0x1cac30=a31_0x4797a6,{options:_0xb3caf5,args:_0x17f02b,tdx:_0x1a2b02}=_0x7357e6,_0x47a299=_0x17f02b[0x0],_0x5bc884=await withSpinner(_0x47a299?_0x1cac30(0x25d)+_0x47a299+_0x1cac30(0x131):_0x1cac30(0x1b9),()=>_0x1a2b02[_0x1cac30(0x20f)][_0x1cac30(0x24c)](),{'verbose':_0xb3caf5[_0x1cac30(0x282)]});let _0x1d7625=_0x5bc884[_0x1cac30(0x2a4)][_0x1cac30(0x19c)](_0x2f6260=>_0x2f6260[_0x1cac30(0x21e)]);if(_0x47a299){const _0x339e37=_0x47a299[_0x1cac30(0x19b)](/[.+^${}()|[\]\\]/g,_0x1cac30(0x198))[_0x1cac30(0x19b)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x37ca25=new RegExp('^'+_0x339e37+'$','i');_0x1d7625=_0x1d7625[_0x1cac30(0x19c)](_0x24362b=>_0x37ca25[_0x1cac30(0x208)](_0x24362b[_0x1cac30(0x15c)]));}_0x1d7625[_0x1cac30(0x2e8)]((_0x387fb5,_0x3c1a05)=>_0x387fb5['name'][_0x1cac30(0x1cf)](_0x3c1a05[_0x1cac30(0x15c)])),console[_0x1cac30(0x306)]('✔\x20Found\x20'+_0x1d7625['length']+_0x1cac30(0x23f)+(_0x1d7625[_0x1cac30(0x16c)]!==0x1?'s':''));const _0x97ec36=_0x22e724=>{const _0x59a5b4=_0x1cac30;return getConsoleNextUrl(_0xb3caf5['site'],_0x59a5b4(0x180)+_0x22e724);};if(_0xb3caf5[_0x1cac30(0x1b6)]===_0x1cac30(0x1bf)||_0xb3caf5[_0x1cac30(0x1b6)]==='jsonl'){const _0x566555=_0x1d7625[_0x1cac30(0x1d5)](_0x418993=>({..._0x418993,'url':_0x97ec36(_0x418993['id'])}));await handleSDKOutput(_0x566555,_0xb3caf5);}else{if(_0x1d7625[_0x1cac30(0x16c)]===0x0)console[_0x1cac30(0x225)](_0x1cac30(0x2f1));else for(const _0x41c867 of _0x1d7625){const _0x4cb155=_0x41c867[_0x1cac30(0x169)]?a31_0x12b51f['dim']('\x20('+formatRows(_0x41c867[_0x1cac30(0x169)])+')'):'',_0x3e6de2=hyperlink(_0x41c867[_0x1cac30(0x15c)],_0x97ec36(_0x41c867['id']));console[_0x1cac30(0x225)]('⚡\x20'+_0x3e6de2+_0x4cb155);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x2c0);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x1f9);async[a31_0x4797a6(0x152)](_0x2faa37){const _0x423829=a31_0x4797a6,{options:_0x323e57,args:_0x49f396,tdx:_0x275f13}=_0x2faa37,_0x15f308=_0x49f396[0x0]||_0x323e57[_0x423829(0x13d)];if(!_0x15f308)return showParentSegmentNotSetError(_0x423829(0x13c)+'\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'),0x1;const _0x37c71e=resolveYamlFile(_0x15f308);if(!existsSync(_0x37c71e))return showFileNotFoundError(_0x37c71e,_0x15f308),0x1;let _0x2d59e2;try{_0x2d59e2=readFileSync(_0x37c71e,_0x423829(0x1aa));}catch(_0x2a3e0e){const _0x2dd396=_0x2a3e0e instanceof Error?_0x2a3e0e['message']:String(_0x2a3e0e);return console['error'](_0x423829(0x251)+_0x2dd396),0x1;}const _0x427ee=createCommandSpinner(a31_0x12b51f[_0x423829(0x2dc)](_0x423829(0x19a)),{'verbose':_0x323e57[_0x423829(0x282)]});_0x427ee['start']();const _0x4dc889={'realtime':!![],'onProgress':_0x43ee9c=>{_0x427ee['text']=formatProgressMessage(_0x43ee9c);}};let _0x5bcd61;try{_0x5bcd61=await _0x275f13[_0x423829(0x14c)]['validateParentYaml'](_0x2d59e2,_0x4dc889),_0x427ee[_0x423829(0x2bc)]();}catch(_0x5114e1){_0x427ee['stop']();throw _0x5114e1;}console[_0x423829(0x306)]('\x0a'+a31_0x12b51f[_0x423829(0x287)](_0x423829(0x1c0))+'\x20'+_0x5bcd61[_0x423829(0x15c)]),console[_0x423829(0x306)]('═'[_0x423829(0x112)](0x3c)),displayRealtimeValidation(_0x5bcd61),console['error']('─'[_0x423829(0x112)](0x3c));if(_0x5bcd61[_0x423829(0x128)]['length']>0x0){console[_0x423829(0x306)]('\x0a'+a31_0x12b51f[_0x423829(0x315)](_0x423829(0x1b7)));for(const _0x5f007a of _0x5bcd61[_0x423829(0x128)]){console[_0x423829(0x306)]('\x20\x20'+a31_0x12b51f[_0x423829(0x315)]('•')+'\x20'+_0x5f007a);}}return _0x5bcd61[_0x423829(0x191)]&&console[_0x423829(0x306)]('\x0a'+a31_0x12b51f[_0x423829(0x2db)]('✔')+_0x423829(0x1ee)),_0x5bcd61[_0x423829(0x191)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x11f);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x1db);async[a31_0x4797a6(0x152)](_0x38f05e){const _0x20d89f=a31_0x4797a6,{options:_0x14ed26,args:_0x23fcc8,tdx:_0x3fcd18}=_0x38f05e,_0x2145f4=_0x23fcc8[0x0]||_0x14ed26['parentSegment'];if(!_0x2145f4)return showParentSegmentNotSetError('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'+'\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'),0x1;_0x14ed26['verbose']&&(console[_0x20d89f(0x306)]('Site:\x20'+_0x14ed26['site']),console[_0x20d89f(0x306)]('Parent\x20segment:\x20'+_0x2145f4));const _0x3d42b6=await withSpinner(_0x20d89f(0x2d3)+_0x2145f4+'\x27...',()=>_0x3fcd18[_0x20d89f(0x14c)]['resolveParentId'](_0x2145f4),{'verbose':_0x14ed26[_0x20d89f(0x282)]}),_0x4fdbc1=_0x3d42b6['data'],_0x49b4be=await withSpinner(_0x20d89f(0x200)+_0x2145f4+_0x20d89f(0x131),()=>_0x3fcd18[_0x20d89f(0x20f)][_0x20d89f(0x2aa)](_0x4fdbc1),{'verbose':_0x14ed26[_0x20d89f(0x282)]}),_0x1c79d7=_0x49b4be[_0x20d89f(0x2a4)];console[_0x20d89f(0x306)](_0x20d89f(0x150)+_0x1c79d7[_0x20d89f(0x16c)]+_0x20d89f(0x284)+(_0x1c79d7['length']!==0x1?'s':''));if(_0x14ed26[_0x20d89f(0x1b6)]===_0x20d89f(0x1bf)||_0x14ed26[_0x20d89f(0x1b6)]===_0x20d89f(0x1bc))await handleSDKOutput(_0x1c79d7,_0x14ed26);else{if(_0x1c79d7[_0x20d89f(0x16c)]===0x0)console[_0x20d89f(0x225)](_0x20d89f(0x134));else for(const _0x229d49 of _0x1c79d7){const _0x1319a8=_0x229d49[_0x20d89f(0x199)]==='launched'?'🚀':'📝',_0x2a1626=_0x229d49[_0x20d89f(0x1eb)]?a31_0x12b51f[_0x20d89f(0x215)](_0x20d89f(0x216)):'',_0x7445e0=a31_0x12b51f[_0x20d89f(0x2dc)]('\x20('+_0x229d49['stageCount']+_0x20d89f(0x1a2)+(_0x229d49[_0x20d89f(0x1ca)]!==0x1?'s':'')+')');console[_0x20d89f(0x225)](_0x1319a8+'\x20'+_0x229d49[_0x20d89f(0x15c)]+_0x2a1626+_0x7445e0);}}return 0x0;}}function a31_0x21b4(_0xbc01ba,_0x36b9c5){_0xbc01ba=_0xbc01ba-0xfe;const _0xbd54f9=a31_0xbd54();let _0x21b421=_0xbd54f9[_0xbc01ba];return _0x21b421;}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x203);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x234);async[a31_0x4797a6(0x152)](_0x3b03f9){const _0x239fd7=a31_0x4797a6,{options:_0x21af68,args:_0x4f3450,tdx:_0x34e42f}=_0x3b03f9,_0x111dff=_0x4f3450[0x0];if(!_0x111dff)return console['error'](a31_0x12b51f[_0x239fd7(0x315)](_0x239fd7(0x2e3))),console[_0x239fd7(0x306)](_0x239fd7(0x1b8)),console['error'](a31_0x12b51f[_0x239fd7(0x2dc)](_0x239fd7(0x286))),0x1;_0x21af68[_0x239fd7(0x282)]&&(console[_0x239fd7(0x306)]('Site:\x20'+_0x21af68[_0x239fd7(0x1c2)]),console[_0x239fd7(0x306)](_0x239fd7(0x136)+_0x111dff));const _0x419348=await withSpinner(_0x239fd7(0x29f)+_0x111dff+'\x27...',()=>_0x34e42f[_0x239fd7(0x20f)][_0x239fd7(0x223)](_0x111dff),{'verbose':_0x21af68[_0x239fd7(0x282)]}),_0x4b5753=_0x419348['data'];console[_0x239fd7(0x306)](_0x239fd7(0x293)+_0x4b5753[_0x239fd7(0x15c)]+'\x27');if(_0x21af68[_0x239fd7(0x1b6)]===_0x239fd7(0x1bf)||_0x21af68[_0x239fd7(0x1b6)]===_0x239fd7(0x1bc))await handleSDKOutput([_0x4b5753],_0x21af68);else{const _0x1cc057=_0x4b5753['state']===_0x239fd7(0x2ce)?'🚀':'📝',_0x1e453f=_0x4b5753[_0x239fd7(0x1eb)]?a31_0x12b51f['yellow'](_0x239fd7(0x216)):'';console[_0x239fd7(0x225)](_0x1cc057+'\x20'+_0x4b5753[_0x239fd7(0x15c)]+_0x1e453f);}return 0x0;}}function a31_0xbd54(){const _0x56ef72=['stringify','run','\x5c$&','state','Validating\x20RT\x20configuration...','replace','filter','✔\x20Updated\x20personalization\x20\x27','\x27\x20with\x20ID:\x20','parentFolder','processedRows','displaySummary','\x20stage','Schema\x20saved\x20to\x20','Options\x20(one\x20required):\x0a','\x20\x20\x20\x20\x20\x20','Aborted.','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','eventKind','utf-8','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','folderId','List\x20parent\x20segments','/\x20directories\x20exist.','\x20\x20\x20','Fetching\x20personalization\x20service\x20\x27','query','\x20true','Parent\x20segment:\x20','SELECT\x20*\x20FROM\x20(\x0a','Error:\x20--behavior\x20requires\x20a\x20name\x0a','format','Errors:','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','Listing\x20RT-enabled\x20parent\x20segments...','behavior','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','jsonl','ignore','some','json','RT\x202.0\x20Validate:','\x20parent\x20segment\x20\x27','site','Create\x20a\x20realtime\x20personalization\x20entity','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','listParents','single','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','scheduleOption','stageCount','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','✔\x20Created\x20personalization\x20\x27','foreignKey','localeCompare','getCurrentConfigVersion','Analyzing\x20changes...','\x27\x20is\x20already\x20up\x20to\x20date','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','segment:parent:preview','map','SELECT\x20*\x20FROM\x20','Creating','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','\x20service(s)\x20configured','\x20Added\x20RT\x202.0\x20template\x20section','List\x20RT\x20journeys','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','ps:rt:configuration_versions','No\x20personalizations\x20configured','Fetching\x20sample\x20data...','Master\x20+\x20Attributes','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','Preview:','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','coveragePercent','createParent','push','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','Join\x20on:','patch','paused','scheduleType','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','\x20RT\x20configuration\x20is\x20valid','\x20\x20Note:\x20','segment:parent:validate','updatedAt','\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','No\x20parent\x20segments\x20found','\x20=\x20','displayBehaviorsStats','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','Updating\x20parent\x20segment\x20\x27','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','ps:pz:service:list','Attempt:','yes','.yml','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','\x20personalization\x20service','Listing\x20RT\x20journeys\x20for\x20\x27','Executing\x20parent\x20segment\x20query...','Created','ps:rt:jn:pause','Fetching\x20current\x20configuration\x20for\x20\x27','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','column','columns','test','No\x20personalization\x20services\x20configured','rowCount','reduce','Updating\x20personalization\x20service\x20\x27','✔\x20Created\x20personalization\x20service\x20\x27','✔\x20Deleted\x20token\x20\x27','realtime','\x20--behavior\x20\x22','Options:\x0a','YAML\x20file:\x20','identifier','stats','yellow','\x20(paused)','value','validateParentYaml','\x20Added\x20personalization\x20template\x20to\x20','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','idStitching','Show\x20a\x20specific\x20realtime\x20personalization','Error:\x20File\x20not\x20found:\x20','realtime_enabled','Attributes','formatSchemaJson','Overwrite\x20\x27','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','pauseJourney','Status:','log','valid','/\x20and\x20','\x20service','listFields','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','identifier:\x20','Fetching\x20behavior\x20list...','Table:\x20','\x20No\x20changes\x20-\x20','To\x20cancel:','sourceTableError','toFixed','tokens','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Pause\x20activations\x20in\x20an\x20RT\x20journey','keyEventId','column_name','Events:','%)\x20','✔\x20Deleted\x20personalization\x20service\x20\x27','Error:\x20Service\x20name\x20is\x20required','\x20\x20No\x20sample\x20data\x20available','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Database:\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','\x20RT-enabled\x20parent\x20segment','personalization_services','customerGroupFile','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','displayPreviewHints','attributesFile','List\x20available\x20fields\x20for\x20segmentation','user_id','database','ps:pz:delete','✔\x20No\x20changes\x20-\x20\x27','\x20\x20\x20\x20-\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','list','interval','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','Output\x20file:\x20','endsWith','Error\x20reading\x20file:\x20','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\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','Join:','804798zaNQGL','\x20field','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','limit','6811021LiKWNq','\x20--enriched','keyEventId:','collectSchema','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','true','sampleData','workflowAttemptId','realtime:','table','double','personalization','\x0a⚠️\x20\x20Migrating:\x20','tdx\x20ps\x20preview\x20','Options:','\x20rows\x20','Validate:','\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\x20create\x20<name>\x20[parent_segment]','\x20parent\x20segment','Found\x20YAML\x20file:\x20','/sessions/','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','/\x20→\x20','column_type','FINISHED','displayMasterInfo','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','behaviors','deletePersonalization','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','audienceId:','type','attribute','Listing\x20personalization\x20services\x20for\x20\x27','Listing\x20personalizations\x20for\x20\x27','allowedIps','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','\x20--behavior\x20\x22<name>\x22','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','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','verbose','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','\x20RT\x20journey','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','bold','matchedCount','✔\x20Updated\x20parent\x20segment\x20\x27','ID\x20Stitching:','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','folder-segment','Error:\x20Token\x20\x27','✔\x20Retrieved\x20RT\x20configuration\x20version','\x20personalization','\x0a\x20\x20\x20\x20]','eventKind:\x20','created:','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','public:','segment:parent:show','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','✔\x20Deleted\x20personalization\x20\x27','\x27\x20and\x20run\x20workflow?','segment:parent:list','\x0aNew\x20parent\x20segment\x20\x27','Show\x20personalization\x20service\x20details','output','deleteToken','\x20--interval\x20','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','4800756dEdanO','number','Fetching\x20parent\x20segment\x20\x27','ps:pz:patch','data','customerPercent','displaySampleData','Error:','getOutputDatabaseName','Patching\x20personalization\x20\x27','listJourneys','token:','\x0aNo\x20sample\x20data\x20available','(id:\x20','✔\x20Updated\x20personalization\x20service\x20\x27','pushParentYaml','dirname','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','\x20Opening\x20','6331680kGgKMI','Error:\x20Service\x20ID\x20is\x20required','ps:pz:create','personalizationServices','attributes','events','Output\x20Database:','segment:parent:pull','listPersonalizations','stop','ps:pz:service:delete','Name:\x20','Show\x20parent\x20segment\x20details','ps:rt:validate','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','parent_segment','`\x20to\x20download\x20the\x20configuration\x20first','\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}','ps:rt:list','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','win32','Session:','190dWqiYB','Validating\x20configuration...','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','addAttributesFile','Error:\x20--attribute\x20requires\x20a\x20name\x0a','launched','match','delete','\x0a\x20\x20]\x0a}\x0a','\x27\x20is\x20up\x20to\x20date','Resolving\x20parent\x20segment\x20\x27','{\x0a\x20\x20\x22database\x22:\x20\x22','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','previewParentYaml','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','\x20rows)','create','Audience\x20ID:','green','dim','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','Available\x20behaviors:','segment:parent:view','ps:rt:jn:resume','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','customers','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','✔\x20Created\x20parent\x20segment\x20\x27','Available\x20attributes:','Getting\x20personalization\x20\x27','sort','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','Behaviors','description','toLocaleString','sourceTableValid','Deleting\x20personalization\x20\x27','entryCriteria','\x20--attribute\x20\x22','No\x20RT-enabled\x20parent\x20segments\x20found','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','schemaValid','td_client_id','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','ps:pz:service:token:create','stitchingKeys','\x20\x201.\x20Edit\x20','Get\x20current\x20RT\x20configuration\x20version\x20status','createToken','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','page_view','totalEvents','master','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','\x20to\x20push\x20the\x20configuration','status','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','\x20Configuration\x20is\x20valid','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','behavior_','error','patchPersonalization','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','enabled','Customers:','apply','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','Updated','Deleting\x20personalization\x20service\x20\x27','customerGroup','\x0aError:','✔\x20Found\x20personalization\x20\x27','Listing\x20fields\x20for\x20\x27','red','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','1995778gZwxlk','ps:pz:service:show','Site:\x20','null','SQL\x20query:\x0a','relationships','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','includeSensitive:','tdx\x20ps\x20push\x20','\x0a⚠️\x20\x20Both\x20','file','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','segment:parent:sql','<database>.<table>','audienceId','using\x20the\x20default\x20path:\x20','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','\x20\x20\x20\x20','ps:pz:service:create','getParentFull','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x27\x20for\x20service\x20\x27','schemaError','entryCriteria:','repeat','71530FNGrWL','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','label','\x0aChanges\x20to\x20apply\x20to\x20\x27','enriched','Listing\x20parent\x20segments\x20matching\x20\x27','displayPreviewResults','Apply\x20changes\x20to\x20\x27','updated:','Fetching\x20customers\x20schema...','Coverage:','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','ps:rt:jn:list','Personalization\x20service\x20description','Personalization:','sections:','No\x20parent\x20segments\x20match\x20pattern:\x20','✔\x20Query\x20completed:\x20Processed\x20','allowed\x20IPs:','/{name}.yml\x0a','resolveParentId','errors','Error:\x20Personalization\x20ID\x20is\x20required','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','Source:','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','string','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','sections','customersWithEvents','\x27...','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','addBehaviorsFile','No\x20RT\x20journeys\x20found','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','RT\x20Journey\x20ID:\x20','cyan','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','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','preview','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','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','parentSegment','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','join','toLowerCase','displayColumns','status:\x20','👥\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','\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','xdg-open','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','\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','64LhCXwJ','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','segment','in\x20','\x20kill','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','✔\x20Found\x20','start','execute','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Error:\x20--database\x20and\x20--table\x20are\x20required','Update\x20a\x20realtime\x20personalization\x20entity','.yaml','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','text','Error\x20parsing\x20YAML:\x20','1lCsFri','name','getBehaviorNames','public','Next\x20steps:','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','segment:parent:run','My\x20Service','-1d','addBehaviors','Master\x20Table','Get\x20SQL\x20query\x20for\x20parent\x20segment','get','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','population','trim','joinKey','length','/\x20directory.\x0a','/attempt/','Error:\x20Token\x20ID\x20is\x20required','Create\x20parent\x20segment\x20\x27','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','displayRealtimeInfo','varchar','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','timezone','\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','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','Default','runParent','Creating\x20personalization\x20\x27','no\x20tokens\x20configured','displayValidateResults','Error:\x20Parent\x20segment\x20name\x20is\x20required','split','/app/dw/parentSegments/','ps:pz:service:update','message','Finding\x20service\x20for\x20token...','web','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','any','getParentSQL','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','id:\x20','1219761pPivAL','keyEventCriteria','use','Updating','.customers)','\x0aUsage:\x20tdx\x20ps\x20preview\x20','ps:pz:init','allValid','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','last_page_viewed','displayAttributesStats','all'];a31_0xbd54=function(){return _0x56ef72;};return a31_0xbd54();}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x2e0);['description']='Resume\x20activations\x20in\x20an\x20RT\x20journey';async[a31_0x4797a6(0x152)](_0x3c554b){const _0x314db4=a31_0x4797a6,{options:_0x29aba2,args:_0x32e5e8,tdx:_0x3f03a1}=_0x3c554b,_0x4b9fdf=_0x32e5e8[0x0];if(!_0x4b9fdf)return console[_0x314db4(0x306)](a31_0x12b51f[_0x314db4(0x315)](_0x314db4(0x2e3))),console[_0x314db4(0x306)](_0x314db4(0x14f)),console['error'](a31_0x12b51f['dim'](_0x314db4(0x286))),0x1;_0x29aba2[_0x314db4(0x282)]&&(console[_0x314db4(0x306)]('Site:\x20'+_0x29aba2['site']),console[_0x314db4(0x306)](_0x314db4(0x136)+_0x4b9fdf));const _0x536623=await withSpinner(_0x314db4(0x2dd)+_0x4b9fdf+_0x314db4(0x131),()=>_0x3f03a1[_0x314db4(0x20f)]['resumeJourney'](_0x4b9fdf),{'verbose':_0x29aba2[_0x314db4(0x282)]}),_0x50abaa=_0x536623['data'];console[_0x314db4(0x306)](_0x314db4(0x1d3)+_0x50abaa[_0x314db4(0x15c)]+'\x27');if(_0x29aba2['format']===_0x314db4(0x1bf)||_0x29aba2[_0x314db4(0x1b6)]===_0x314db4(0x1bc))await handleSDKOutput([_0x50abaa],_0x29aba2);else{const _0x1312a6=_0x50abaa['state']===_0x314db4(0x2ce)?'🚀':'📝',_0x16cc29=_0x50abaa[_0x314db4(0x1eb)]?a31_0x12b51f[_0x314db4(0x215)](_0x314db4(0x216)):'';console[_0x314db4(0x225)](_0x1312a6+'\x20'+_0x50abaa[_0x314db4(0x15c)]+_0x16cc29);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a31_0x4797a6(0x1dd);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x2f9);async[a31_0x4797a6(0x152)](_0x5d539f){const _0x4ae55d=a31_0x4797a6,{options:_0x21ba2e,args:_0x5ad45c,tdx:_0x2f6605}=_0x5d539f,_0x25bd88=_0x5ad45c[0x0]||_0x21ba2e[_0x4ae55d(0x13d)];if(!_0x25bd88)return showParentSegmentNotSetError(_0x4ae55d(0x13e)+_0x4ae55d(0x145)),0x1;_0x21ba2e['verbose']&&(console[_0x4ae55d(0x306)](_0x4ae55d(0x31b)+_0x21ba2e[_0x4ae55d(0x1c2)]),console['error'](_0x4ae55d(0x1b3)+_0x25bd88));const _0x53b45b=await withSpinner(_0x4ae55d(0x2d3)+_0x25bd88+'\x27...',()=>_0x2f6605[_0x4ae55d(0x14c)][_0x4ae55d(0x127)](_0x25bd88),{'verbose':_0x21ba2e['verbose']}),_0x41cd29=_0x53b45b[_0x4ae55d(0x2a4)],_0x24101b=await withSpinner(_0x4ae55d(0x1a8)+_0x25bd88+_0x4ae55d(0x131),()=>_0x2f6605[_0x4ae55d(0x20f)][_0x4ae55d(0x1d0)](_0x41cd29),{'verbose':_0x21ba2e['verbose']}),_0x1a5aab=_0x24101b[_0x4ae55d(0x2a4)];return console['error'](_0x4ae55d(0x28e)),_0x21ba2e['format']===_0x4ae55d(0x1bf)||_0x21ba2e[_0x4ae55d(0x1b6)]===_0x4ae55d(0x1bc)?await handleSDKOutput([_0x1a5aab],_0x21ba2e):(console['log'](_0x4ae55d(0x189)+_0x1a5aab['id']),console[_0x4ae55d(0x225)]('audienceId:\x20'+_0x1a5aab[_0x4ae55d(0x108)]),console['log'](_0x4ae55d(0x22b)+_0x1a5aab[_0x4ae55d(0x213)]),console[_0x4ae55d(0x225)](_0x4ae55d(0x291)+_0x1a5aab[_0x4ae55d(0x1a9)]),console[_0x4ae55d(0x225)](_0x4ae55d(0x142)+_0x1a5aab['status'])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{['name']=a31_0x4797a6(0x1fa);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x12c);async[a31_0x4797a6(0x152)](_0x5b0765){const _0x18dc93=a31_0x4797a6,{options:_0x4c3bfb,args:_0x59c4cc,tdx:_0x1962c0}=_0x5b0765,_0x195e5d=_0x59c4cc[0x0]||_0x4c3bfb[_0x18dc93(0x13d)];if(!_0x195e5d)return showParentSegmentNotSetError(_0x18dc93(0x2f2)+_0x18dc93(0x1f2)),0x1;const _0x3ebd90=await withSpinner(_0x18dc93(0x2d3)+_0x195e5d+_0x18dc93(0x131),()=>_0x1962c0[_0x18dc93(0x14c)]['resolveParentId'](_0x195e5d),{'verbose':_0x4c3bfb[_0x18dc93(0x282)]}),_0x25a2de=_0x3ebd90[_0x18dc93(0x2a4)],_0x56af9f=await withSpinner(_0x18dc93(0x27b)+_0x195e5d+_0x18dc93(0x131),()=>_0x1962c0[_0x18dc93(0x264)]['list'](_0x25a2de),{'verbose':_0x4c3bfb[_0x18dc93(0x282)]}),_0xf2d8f5=_0x56af9f[_0x18dc93(0x2a4)];console[_0x18dc93(0x306)](_0x18dc93(0x150)+_0xf2d8f5[_0x18dc93(0x16c)]+_0x18dc93(0x1ff)+(_0xf2d8f5[_0x18dc93(0x16c)]!==0x1?'s':''));if(_0x4c3bfb[_0x18dc93(0x1b6)]===_0x18dc93(0x1bf)||_0x4c3bfb['format']===_0x18dc93(0x1bc))await handleSDKOutput(_0xf2d8f5,_0x4c3bfb);else{if(_0xf2d8f5[_0x18dc93(0x16c)]===0x0)console[_0x18dc93(0x225)](_0x18dc93(0x209)),console[_0x18dc93(0x306)](a31_0x12b51f[_0x18dc93(0x137)](_0x18dc93(0x257)));else for(const _0x17a8ab of _0xf2d8f5){console[_0x18dc93(0x225)](a31_0x12b51f[_0x18dc93(0x287)](_0x17a8ab[_0x18dc93(0x15c)])+'\x20'+a31_0x12b51f[_0x18dc93(0x2dc)]('(id:\x20'+_0x17a8ab['id']+')'));_0x17a8ab[_0x18dc93(0x2eb)]&&console[_0x18dc93(0x225)]('\x20\x20'+a31_0x12b51f[_0x18dc93(0x2dc)](_0x17a8ab['description']));if(_0x17a8ab[_0x18dc93(0x232)]&&_0x17a8ab[_0x18dc93(0x232)][_0x18dc93(0x16c)]>0x0)for(const _0x175d0e of _0x17a8ab['tokens']){const _0x10103f=_0x175d0e[_0x18dc93(0x27d)]?.['length']?_0x175d0e[_0x18dc93(0x27d)][_0x18dc93(0x13f)](',\x20'):_0x18dc93(0x186);console[_0x18dc93(0x225)]('\x20\x20'+a31_0x12b51f[_0x18dc93(0x137)](_0x18dc93(0x2ab))+'\x20'+_0x175d0e[_0x18dc93(0x15c)]+'\x20'+a31_0x12b51f[_0x18dc93(0x2dc)](_0x18dc93(0x2ad)+_0x175d0e['id']+')')),console[_0x18dc93(0x225)](_0x18dc93(0x10b)+a31_0x12b51f[_0x18dc93(0x2dc)](_0x18dc93(0x125))+'\x20'+_0x10103f);}else console[_0x18dc93(0x225)]('\x20\x20'+a31_0x12b51f['dim'](_0x18dc93(0x17c)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x10c);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x171);async[a31_0x4797a6(0x152)](_0x591921){const _0x29be4e=a31_0x4797a6,{options:_0x105a18,args:_0x21dd1a,tdx:_0x11eb6f}=_0x591921,_0x10b7a2=_0x105a18,_0x44e1b4=_0x21dd1a[0x0],_0x488c87=_0x21dd1a[0x1]||_0x105a18[_0x29be4e(0x13d)];if(!_0x44e1b4)return console[_0x29be4e(0x306)](_0x29be4e(0x23a)),console[_0x29be4e(0x306)](_0x29be4e(0x26b)),console[_0x29be4e(0x306)](_0x29be4e(0x22a)),0x1;if(!_0x488c87)return showParentSegmentNotSetError(_0x29be4e(0x1cc)+_0x29be4e(0x22a)),0x1;const _0x2619b4=await withSpinner(_0x29be4e(0x2d3)+_0x488c87+'\x27...',()=>_0x11eb6f[_0x29be4e(0x14c)]['resolveParentId'](_0x488c87),{'verbose':_0x105a18[_0x29be4e(0x282)]}),_0x52ab96=_0x2619b4[_0x29be4e(0x2a4)],_0xf4a3d8={'name':_0x44e1b4,'description':_0x10b7a2[_0x29be4e(0x2eb)],'public':_0x10b7a2[_0x29be4e(0x15e)]},_0x3c00d6=await withSpinner('Creating\x20personalization\x20service\x20\x27'+_0x44e1b4+'\x27...',()=>_0x11eb6f['personalization'][_0x29be4e(0x2d9)](_0x52ab96,_0xf4a3d8),{'verbose':_0x105a18['verbose']}),_0x556739=_0x3c00d6[_0x29be4e(0x2a4)];return console[_0x29be4e(0x306)](_0x29be4e(0x20d)+_0x556739['name']+_0x29be4e(0x19e)+_0x556739['id']),await handleSDKOutput([_0x556739],_0x105a18),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x31a);['description']=a31_0x4797a6(0x29b);async[a31_0x4797a6(0x152)](_0x195349){const _0x38d4da=a31_0x4797a6,{options:_0x4c98b4,args:_0x1792e8,tdx:_0x97bbaf}=_0x195349,_0xbd0b90=_0x1792e8[0x0],_0x233d23=_0x1792e8[0x1]||_0x4c98b4['parentSegment'];if(!_0xbd0b90)return console[_0x38d4da(0x306)](_0x38d4da(0x2b4)),console[_0x38d4da(0x306)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console[_0x38d4da(0x306)](_0x38d4da(0x317)),0x1;if(!_0x233d23)return showParentSegmentNotSetError(_0x38d4da(0x24b)+_0x38d4da(0x317)),0x1;const _0x458862=await withSpinner(_0x38d4da(0x2d3)+_0x233d23+_0x38d4da(0x131),()=>_0x97bbaf[_0x38d4da(0x14c)][_0x38d4da(0x127)](_0x233d23),{'verbose':_0x4c98b4['verbose']}),_0x375e2a=_0x458862[_0x38d4da(0x2a4)],_0x12c286=await withSpinner(_0x38d4da(0x1b0)+_0xbd0b90+_0x38d4da(0x131),()=>_0x97bbaf[_0x38d4da(0x264)][_0x38d4da(0x167)](_0x375e2a,_0xbd0b90),{'verbose':_0x4c98b4[_0x38d4da(0x282)]}),_0x2ec6c7=_0x12c286['data'];if(_0x4c98b4[_0x38d4da(0x1bf)]||_0x4c98b4[_0x38d4da(0x1bc)])await handleSDKOutput([_0x2ec6c7],_0x4c98b4);else{console['log'](a31_0x12b51f[_0x38d4da(0x287)](_0x2ec6c7[_0x38d4da(0x15c)])+'\x20'+a31_0x12b51f[_0x38d4da(0x2dc)]('(id:\x20'+_0x2ec6c7['id']+')'));_0x2ec6c7[_0x38d4da(0x2eb)]&&console[_0x38d4da(0x225)]('\x20\x20'+a31_0x12b51f['dim'](_0x2ec6c7[_0x38d4da(0x2eb)]));console[_0x38d4da(0x225)]('\x20\x20'+a31_0x12b51f[_0x38d4da(0x137)](_0x38d4da(0x294))+'\x20'+(_0x2ec6c7[_0x38d4da(0x15e)]?_0x38d4da(0x1fc):'no'));if(_0x2ec6c7['tokens']&&_0x2ec6c7[_0x38d4da(0x232)][_0x38d4da(0x16c)]>0x0)for(const _0x3d7699 of _0x2ec6c7['tokens']){const _0x599c72=_0x3d7699[_0x38d4da(0x27d)]?.[_0x38d4da(0x16c)]?_0x3d7699[_0x38d4da(0x27d)]['join'](',\x20'):'any';console['log']('\x20\x20'+a31_0x12b51f[_0x38d4da(0x137)]('token:')+'\x20'+_0x3d7699['name']+'\x20'+a31_0x12b51f['dim'](_0x38d4da(0x2ad)+_0x3d7699['id']+')')),console[_0x38d4da(0x225)]('\x20\x20\x20\x20'+a31_0x12b51f[_0x38d4da(0x2dc)](_0x38d4da(0x125))+'\x20'+_0x599c72);}else console[_0x38d4da(0x225)]('\x20\x20'+a31_0x12b51f[_0x38d4da(0x2dc)](_0x38d4da(0x17c)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{['name']=a31_0x4797a6(0x2bd);[a31_0x4797a6(0x2eb)]='Delete\x20a\x20personalization\x20service';async[a31_0x4797a6(0x152)](_0x331e61){const _0xb55c25=a31_0x4797a6,{options:_0x22edd9,args:_0xf49dd7,tdx:_0x3beacb}=_0x331e61,_0x4e2c5a=_0xf49dd7[0x0],_0x28c7a0=_0xf49dd7[0x1]||_0x22edd9[_0xb55c25(0x13d)];if(!_0x4e2c5a)return console[_0xb55c25(0x306)](_0xb55c25(0x2b4)),console[_0xb55c25(0x306)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]'),console[_0xb55c25(0x306)](_0xb55c25(0x27e)),0x1;if(!_0x28c7a0)return showParentSegmentNotSetError(_0xb55c25(0x24e)+_0xb55c25(0x27e)),0x1;const _0xf3e89=await withSpinner(_0xb55c25(0x2d3)+_0x28c7a0+'\x27...',()=>_0x3beacb['segment'][_0xb55c25(0x127)](_0x28c7a0),{'verbose':_0x22edd9['verbose']}),_0x48a564=_0xf3e89[_0xb55c25(0x2a4)];return await withSpinner(_0xb55c25(0x310)+_0x4e2c5a+_0xb55c25(0x131),()=>_0x3beacb[_0xb55c25(0x264)][_0xb55c25(0x2d0)](_0x48a564,_0x4e2c5a),{'verbose':_0x22edd9['verbose']}),console[_0xb55c25(0x306)](_0xb55c25(0x239)+_0x4e2c5a+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x181);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x1ed);async[a31_0x4797a6(0x152)](_0x21664c){const _0x518c51=a31_0x4797a6,{options:_0x15a179,args:_0x33b81d,tdx:_0x12e965}=_0x21664c,_0x125bf2=_0x15a179,_0x2e10e8=_0x33b81d[0x0],_0x1aebc6=_0x33b81d[0x1]||_0x15a179['parentSegment'];if(!_0x2e10e8)return console['error'](_0x518c51(0x2b4)),console[_0x518c51(0x306)](_0x518c51(0x2cb)),console[_0x518c51(0x306)](_0x518c51(0x138)),0x1;if(!_0x125bf2['name'])return console[_0x518c51(0x306)]('Error:\x20--name\x20is\x20required'),console[_0x518c51(0x306)](_0x518c51(0x2cb)),0x1;if(!_0x1aebc6)return showParentSegmentNotSetError(_0x518c51(0x100)+_0x518c51(0x138)),0x1;const _0x360365=await withSpinner(_0x518c51(0x2d3)+_0x1aebc6+_0x518c51(0x131),()=>_0x12e965[_0x518c51(0x14c)]['resolveParentId'](_0x1aebc6),{'verbose':_0x15a179[_0x518c51(0x282)]}),_0x512375=_0x360365['data'],_0x1a322a={'name':_0x125bf2[_0x518c51(0x15c)]};_0x125bf2[_0x518c51(0x2eb)]!==undefined&&(_0x1a322a[_0x518c51(0x2eb)]=_0x125bf2[_0x518c51(0x2eb)]);const _0x4dda2f=await withSpinner(_0x518c51(0x20c)+_0x2e10e8+'\x27...',()=>_0x12e965['personalization'][_0x518c51(0x1ea)](_0x512375,_0x2e10e8,_0x1a322a),{'verbose':_0x15a179[_0x518c51(0x282)]}),_0x5b23b1=_0x4dda2f['data'];return console[_0x518c51(0x306)](_0x518c51(0x2ae)+_0x5b23b1['name']+'\x27'),await handleSDKOutput([_0x5b23b1],_0x15a179),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x2f6);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x233);async[a31_0x4797a6(0x152)](_0x6b9e7d){const _0x542d48=a31_0x4797a6,{options:_0x3b7d77,args:_0x20600a,tdx:_0x434ae6}=_0x6b9e7d,_0x2864bc=_0x3b7d77,_0x57d27a=_0x20600a[0x0],_0x16dc2e=_0x20600a[0x1],_0x5960ad=_0x20600a[0x2]||_0x3b7d77[_0x542d48(0x13d)];if(!_0x57d27a)return console[_0x542d48(0x306)]('Error:\x20Token\x20name\x20is\x20required'),console[_0x542d48(0x306)](_0x542d48(0x2ff)),console[_0x542d48(0x306)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x16dc2e)return console[_0x542d48(0x306)](_0x542d48(0x2b4)),console[_0x542d48(0x306)](_0x542d48(0x2ff)),console[_0x542d48(0x306)](_0x542d48(0x14a)),0x1;if(!_0x5960ad)return showParentSegmentNotSetError(_0x542d48(0x1c7)+_0x542d48(0x14a)),0x1;const _0x3e72dc=await withSpinner(_0x542d48(0x2d3)+_0x5960ad+'\x27...',()=>_0x434ae6['segment'][_0x542d48(0x127)](_0x5960ad),{'verbose':_0x3b7d77[_0x542d48(0x282)]}),_0x4962f1=_0x3e72dc[_0x542d48(0x2a4)],_0x5c7e66={'name':_0x57d27a};_0x2864bc[_0x542d48(0x27d)]&&(_0x5c7e66[_0x542d48(0x27d)]=_0x2864bc[_0x542d48(0x27d)][_0x542d48(0x17f)](',')[_0x542d48(0x1d5)](_0x10b02c=>_0x10b02c[_0x542d48(0x16a)]()));_0x2864bc['description']&&(_0x5c7e66[_0x542d48(0x2eb)]=_0x2864bc[_0x542d48(0x2eb)]);const _0x478187=await withSpinner('Creating\x20token\x20\x27'+_0x57d27a+_0x542d48(0x10f)+_0x16dc2e+_0x542d48(0x131),()=>_0x434ae6[_0x542d48(0x264)][_0x542d48(0x2fa)](_0x4962f1,_0x16dc2e,_0x5c7e66),{'verbose':_0x3b7d77[_0x542d48(0x282)]}),_0x38cbe3=_0x478187[_0x542d48(0x2a4)];return console[_0x542d48(0x306)]('✔\x20Created\x20token\x20\x27'+_0x38cbe3['name']+'\x27\x20with\x20ID:\x20'+_0x38cbe3['id']),_0x38cbe3[_0x542d48(0x217)]&&(console[_0x542d48(0x306)](a31_0x12b51f[_0x542d48(0x215)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console['error'](a31_0x12b51f[_0x542d48(0x137)](_0x38cbe3[_0x542d48(0x217)])),console[_0x542d48(0x306)]('')),await handleSDKOutput([_0x38cbe3],_0x3b7d77),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x4797a6(0x15c)]='ps:pz:service:token:delete';[a31_0x4797a6(0x2eb)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async['execute'](_0x2b640b){const _0x98c921=a31_0x4797a6,{options:_0x462756,args:_0x48af96,tdx:_0x1cf7ab}=_0x2b640b,_0x577226=_0x48af96[0x0],_0x5bea3b=_0x48af96[0x1]||_0x462756[_0x98c921(0x13d)];if(!_0x577226)return console[_0x98c921(0x306)](_0x98c921(0x16f)),console[_0x98c921(0x306)](_0x98c921(0x296)),console[_0x98c921(0x306)](_0x98c921(0x316)),0x1;if(!_0x5bea3b)return showParentSegmentNotSetError(_0x98c921(0x285)+_0x98c921(0x316)),0x1;const _0x3a4e5e=await withSpinner(_0x98c921(0x2d3)+_0x5bea3b+_0x98c921(0x131),()=>_0x1cf7ab[_0x98c921(0x14c)]['resolveParentId'](_0x5bea3b),{'verbose':_0x462756[_0x98c921(0x282)]}),_0x21002f=_0x3a4e5e[_0x98c921(0x2a4)],_0x32f90a=await withSpinner(_0x98c921(0x183),()=>_0x1cf7ab[_0x98c921(0x264)][_0x98c921(0x24c)](_0x21002f),{'verbose':_0x462756['verbose']}),_0x35f1cd=_0x32f90a['data'];let _0x29079a;for(const _0x17306b of _0x35f1cd){if(_0x17306b[_0x98c921(0x232)]?.[_0x98c921(0x1be)](_0x23e775=>_0x23e775['id']===_0x577226)){_0x29079a=_0x17306b['id'];break;}}if(!_0x29079a)return console[_0x98c921(0x306)](_0x98c921(0x28d)+_0x577226+_0x98c921(0x1cb)),0x1;const _0x1b4aaa=await withSpinner('Deleting\x20token\x20\x27'+_0x577226+_0x98c921(0x131),()=>_0x1cf7ab[_0x98c921(0x264)][_0x98c921(0x29d)](_0x21002f,_0x29079a,_0x577226),{'verbose':_0x462756['verbose']}),_0x25d7c1=_0x1b4aaa[_0x98c921(0x2a4)];return console[_0x98c921(0x306)](_0x98c921(0x20e)+(_0x25d7c1[_0x98c921(0x15c)]||_0x577226)+'\x27'),await handleSDKOutput([_0x25d7c1],_0x462756),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x4797a6(0x15c)]='ps:pz:list';[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x1f7);async[a31_0x4797a6(0x152)](_0x17474d){const _0x10523c=a31_0x4797a6,{options:_0xb8ddf6,args:_0x5789d9,tdx:_0x195f29}=_0x17474d,_0xaa6f8a=_0x5789d9[0x0]||_0xb8ddf6['parentSegment'];if(!_0xaa6f8a)return showParentSegmentNotSetError(_0x10523c(0x139)+_0x10523c(0x26a)),0x1;const _0x4de0ef=await withSpinner(_0x10523c(0x2d3)+_0xaa6f8a+_0x10523c(0x131),()=>_0x195f29[_0x10523c(0x14c)][_0x10523c(0x127)](_0xaa6f8a),{'verbose':_0xb8ddf6[_0x10523c(0x282)]}),_0x4000a2=_0x4de0ef[_0x10523c(0x2a4)],_0x1a259b=await withSpinner(_0x10523c(0x27c)+_0xaa6f8a+_0x10523c(0x131),()=>_0x195f29[_0x10523c(0x264)][_0x10523c(0x2bb)](_0x4000a2),{'verbose':_0xb8ddf6[_0x10523c(0x282)]}),_0x1c1621=_0x1a259b[_0x10523c(0x2a4)];console['error'](_0x10523c(0x150)+_0x1c1621[_0x10523c(0x16c)]+_0x10523c(0x28f)+(_0x1c1621[_0x10523c(0x16c)]!==0x1?'s':''));if(_0xb8ddf6['format']===_0x10523c(0x1bf)||_0xb8ddf6['format']==='jsonl')await handleSDKOutput(_0x1c1621,_0xb8ddf6);else{if(_0x1c1621[_0x10523c(0x16c)]===0x0)console[_0x10523c(0x225)](_0x10523c(0x1de));else for(const _0x3c7bc1 of _0x1c1621){console[_0x10523c(0x225)](a31_0x12b51f[_0x10523c(0x287)](_0x3c7bc1[_0x10523c(0x15c)])+'\x20'+a31_0x12b51f[_0x10523c(0x2dc)]('(id:\x20'+_0x3c7bc1['id']+')'));_0x3c7bc1['description']&&console[_0x10523c(0x225)]('\x20\x20'+a31_0x12b51f[_0x10523c(0x2dc)](_0x3c7bc1[_0x10523c(0x2eb)]));const _0x392fa=_0x3c7bc1['sections']?.[_0x10523c(0x16c)]||0x0;console[_0x10523c(0x225)]('\x20\x20'+a31_0x12b51f[_0x10523c(0x137)](_0x10523c(0x122))+'\x20'+_0x392fa);if(_0x3c7bc1[_0x10523c(0x12f)]&&_0x3c7bc1[_0x10523c(0x12f)][_0x10523c(0x16c)]>0x0)for(const _0x3bc624 of _0x3c7bc1[_0x10523c(0x12f)]){console['log'](_0x10523c(0x24a)+_0x3bc624[_0x10523c(0x15c)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x4797a6(0x15c)]='ps:pz:show';[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x21c);async[a31_0x4797a6(0x152)](_0x29652f){const _0x16a167=a31_0x4797a6,{options:_0x99844c,args:_0x53aacd,tdx:_0x20ffec}=_0x29652f,_0x1baae5=_0x53aacd[0x0];if(!_0x1baae5)return console[_0x16a167(0x306)](_0x16a167(0x129)),console[_0x16a167(0x306)]('Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>'),0x1;const _0x439fc2=await withSpinner(_0x16a167(0x2e7)+_0x1baae5+_0x16a167(0x131),()=>_0x20ffec[_0x16a167(0x264)]['getPersonalization'](_0x1baae5),{'verbose':_0x99844c[_0x16a167(0x282)]}),_0x403aa4=_0x439fc2['data'];console[_0x16a167(0x306)](_0x16a167(0x313)+_0x403aa4['name']+'\x27');if(_0x99844c[_0x16a167(0x1b6)]===_0x16a167(0x1bf)||_0x99844c['format']===_0x16a167(0x1bc))await handleSDKOutput([_0x403aa4],_0x99844c);else{console[_0x16a167(0x225)](a31_0x12b51f[_0x16a167(0x287)](_0x403aa4[_0x16a167(0x15c)])+'\x20'+a31_0x12b51f[_0x16a167(0x2dc)](_0x16a167(0x2ad)+_0x403aa4['id']+')'));_0x403aa4[_0x16a167(0x2eb)]&&console[_0x16a167(0x225)]('\x20\x20'+a31_0x12b51f['dim'](_0x403aa4[_0x16a167(0x2eb)]));_0x403aa4[_0x16a167(0x108)]&&console['log']('\x20\x20'+a31_0x12b51f['cyan'](_0x16a167(0x278))+'\x20'+_0x403aa4[_0x16a167(0x108)]);console[_0x16a167(0x225)]('\x20\x20'+a31_0x12b51f[_0x16a167(0x137)](_0x16a167(0x292))+'\x20'+_0x403aa4['createdAt']),console[_0x16a167(0x225)]('\x20\x20'+a31_0x12b51f[_0x16a167(0x137)](_0x16a167(0x11b))+'\x20'+_0x403aa4[_0x16a167(0x1f1)]);const _0x198114=_0x403aa4[_0x16a167(0x12f)]?.['length']||0x0;console[_0x16a167(0x225)]('\x20\x20'+a31_0x12b51f['cyan'](_0x16a167(0x122))+'\x20'+_0x198114);if(_0x403aa4[_0x16a167(0x12f)]&&_0x403aa4[_0x16a167(0x12f)][_0x16a167(0x16c)]>0x0)for(const _0x196cc7 of _0x403aa4['sections']){console[_0x16a167(0x225)](_0x16a167(0x10b)+a31_0x12b51f['bold'](_0x196cc7[_0x16a167(0x15c)])+'\x20'+a31_0x12b51f['dim'](_0x16a167(0x2ad)+_0x196cc7['id']+')')),_0x196cc7[_0x16a167(0x2ef)]&&(console[_0x16a167(0x225)](_0x16a167(0x1a5)+a31_0x12b51f[_0x16a167(0x137)](_0x16a167(0x111))+'\x20'+_0x196cc7['entryCriteria']['name']),_0x196cc7[_0x16a167(0x2ef)][_0x16a167(0x18b)]?.[_0x16a167(0x235)]&&console[_0x16a167(0x225)]('\x20\x20\x20\x20\x20\x20\x20\x20'+a31_0x12b51f['cyan'](_0x16a167(0x25b))+'\x20'+_0x196cc7[_0x16a167(0x2ef)][_0x16a167(0x18b)][_0x16a167(0x235)])),_0x196cc7['payload']&&console[_0x16a167(0x225)](_0x16a167(0x1a5)+a31_0x12b51f['cyan']('payload:')+'\x20'+JSON[_0x16a167(0x196)](_0x196cc7['payload'])),_0x196cc7['includeSensitive']&&console[_0x16a167(0x225)](_0x16a167(0x1a5)+a31_0x12b51f[_0x16a167(0x137)](_0x16a167(0x101))+_0x16a167(0x1b2));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x248);['description']='Delete\x20a\x20realtime\x20personalization';async['execute'](_0x1542b0){const _0x49d072=a31_0x4797a6,{options:_0x1c2f17,args:_0x4a79ed,tdx:_0x149920}=_0x1542b0,_0x4937d6=_0x4a79ed[0x0];if(!_0x4937d6)return console[_0x49d072(0x306)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x49d072(0x306)](_0x49d072(0x283)),0x1;return await withSpinner(_0x49d072(0x2ee)+_0x4937d6+_0x49d072(0x131),()=>_0x149920[_0x49d072(0x264)][_0x49d072(0x276)](_0x4937d6),{'verbose':_0x1c2f17[_0x49d072(0x282)]}),console['error'](_0x49d072(0x297)+_0x4937d6+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x2b5);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x1c3);async[a31_0x4797a6(0x152)](_0x2ffb26){const _0x1543f6=a31_0x4797a6,{options:_0x4a89d2,tdx:_0x4bf463}=_0x2ffb26,_0x3ca2a5=_0x4a89d2;let _0x5b6109;if(_0x3ca2a5[_0x1543f6(0x104)]){_0x5b6109=await loadJSON(_0x3ca2a5[_0x1543f6(0x104)],!![]);if(!_0x5b6109[_0x1543f6(0xff)]?.[_0x1543f6(0x19f)])return console[_0x1543f6(0x306)](_0x1543f6(0x1e4)),console[_0x1543f6(0x306)](_0x1543f6(0x1c4)),console[_0x1543f6(0x306)](_0x1543f6(0x2c4)),0x1;}else{if(!_0x3ca2a5[_0x1543f6(0x15c)])return console['error']('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x1543f6(0x306)](_0x1543f6(0x2e1)),console[_0x1543f6(0x306)](_0x1543f6(0x10e)),0x1;if(_0x3ca2a5[_0x1543f6(0x2eb)]===undefined)return console[_0x1543f6(0x306)](_0x1543f6(0x1ab)),console[_0x1543f6(0x306)](_0x1543f6(0x2e1)),console[_0x1543f6(0x306)](_0x1543f6(0x10e)),0x1;if(_0x3ca2a5[_0x1543f6(0x1ac)]===undefined)return console[_0x1543f6(0x306)](_0x1543f6(0x14b)),console[_0x1543f6(0x306)](_0x1543f6(0x147)),0x1;let _0xb3501b=_0x3ca2a5[_0x1543f6(0x108)];if(!_0xb3501b&&_0x4a89d2[_0x1543f6(0x13d)]){const _0x187490=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x4a89d2[_0x1543f6(0x13d)]+_0x1543f6(0x131),()=>_0x4bf463[_0x1543f6(0x14c)]['resolveParentId'](_0x4a89d2[_0x1543f6(0x13d)]),{'verbose':_0x4a89d2[_0x1543f6(0x282)]});_0xb3501b=_0x187490[_0x1543f6(0x2a4)];}let _0x207356;_0x3ca2a5[_0x1543f6(0x12f)]&&(_0x207356=await loadJSON(_0x3ca2a5[_0x1543f6(0x12f)],![]));const _0x2c77fe=_0x3ca2a5[_0x1543f6(0x1ac)]===_0x1543f6(0x31c)?null:{'id':_0x3ca2a5[_0x1543f6(0x1ac)],'type':_0x1543f6(0x28c)};_0x5b6109={'attributes':{'name':_0x3ca2a5['name'],'description':_0x3ca2a5['description']||null,..._0xb3501b!==undefined&&{'audienceId':_0xb3501b},..._0x207356!==undefined&&{'sections':_0x207356}},'relationships':{'parentFolder':{'data':_0x2c77fe}}};}const _0x22abc6=await withSpinner(_0x1543f6(0x17b)+(_0x5b6109[_0x1543f6(0x2b7)]?.[_0x1543f6(0x15c)]??'')+_0x1543f6(0x131),()=>_0x4bf463[_0x1543f6(0x264)]['createPersonalization'](_0x5b6109),{'verbose':_0x4a89d2[_0x1543f6(0x282)]}),_0x52fd2c=_0x22abc6[_0x1543f6(0x2a4)];return console[_0x1543f6(0x306)](_0x1543f6(0x1cd)+_0x52fd2c['name']+_0x1543f6(0x19e)+_0x52fd2c['id']),await handleSDKOutput([_0x52fd2c],_0x4a89d2),0x0;}}export class PSPzPatchCommand extends BaseCommand{['name']=a31_0x4797a6(0x2a3);['description']=a31_0x4797a6(0x155);async[a31_0x4797a6(0x152)](_0x47f0bd){const _0x46ea51=a31_0x4797a6,{options:_0x364228,args:_0x3b8571}=_0x47f0bd,_0x344930=_0x364228,_0x22f0da=_0x3b8571[0x0];if(!_0x22f0da)return console[_0x46ea51(0x306)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x46ea51(0x306)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0x46ea51(0x306)](_0x46ea51(0x144)),0x1;let _0x1f3628;if(_0x344930[_0x46ea51(0x104)])_0x1f3628=await loadJSON(_0x344930[_0x46ea51(0x104)],!![]);else{if(!_0x344930[_0x46ea51(0x15c)])return console[_0x46ea51(0x306)](_0x46ea51(0x205)),console['error'](_0x46ea51(0x168)),0x1;if(_0x344930[_0x46ea51(0x2eb)]===undefined)return console[_0x46ea51(0x306)](_0x46ea51(0x1ab)),console[_0x46ea51(0x306)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x2073c3;_0x344930[_0x46ea51(0x12f)]&&(_0x2073c3=await loadJSON(_0x344930[_0x46ea51(0x12f)],![])),_0x1f3628={'attributes':{'name':_0x344930[_0x46ea51(0x15c)],'description':_0x344930[_0x46ea51(0x2eb)]||null,..._0x2073c3!==undefined&&{'sections':_0x2073c3}}};}const {tdx:_0x4f6668}=_0x47f0bd,_0x4710c3=await withSpinner(_0x46ea51(0x2a9)+_0x22f0da+'\x27...',()=>_0x4f6668[_0x46ea51(0x264)][_0x46ea51(0x307)](_0x22f0da,_0x1f3628),{'verbose':_0x364228[_0x46ea51(0x282)]}),_0x37ba36=_0x4710c3[_0x46ea51(0x2a4)];return console[_0x46ea51(0x306)](_0x46ea51(0x19d)+_0x37ba36[_0x46ea51(0x15c)]+'\x27\x20(id:\x20'+_0x37ba36['id']+')'),await handleSDKOutput([_0x37ba36],_0x364228),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x4797a6(0x15c)]=a31_0x4797a6(0x190);[a31_0x4797a6(0x2eb)]=a31_0x4797a6(0x1c8);async[a31_0x4797a6(0x152)](_0x10dba3){const _0x59f12d=a31_0x4797a6,{options:_0xbb367f,args:_0x5752c6}=_0x10dba3,_0x453587=_0x5752c6[0x0]||_0xbb367f[_0x59f12d(0x13d)];if(!_0x453587)return showParentSegmentNotSetError(_0x59f12d(0x277)+_0x59f12d(0x148)),0x1;const _0x20c329=resolveYamlFile(_0x453587);if(!existsSync(_0x20c329))return showFileNotFoundError(_0x20c329,_0x453587),0x1;let _0x234245;try{_0x234245=readFileSync(_0x20c329,_0x59f12d(0x1aa));}catch(_0x553be9){const _0x396da4=_0x553be9 instanceof Error?_0x553be9[_0x59f12d(0x182)]:String(_0x553be9);return console[_0x59f12d(0x306)](_0x59f12d(0x251)+_0x396da4),0x1;}let _0x5d364e;try{_0x5d364e=parseDef(_0x234245);}catch(_0x271227){const _0x5e6f83=_0x271227 instanceof Error?_0x271227[_0x59f12d(0x182)]:String(_0x271227);return console['error'](a31_0x12b51f['red']('Error\x20parsing\x20YAML:\x20'+_0x5e6f83)),0x1;}if(_0x5d364e[_0x59f12d(0x240)]&&_0x5d364e[_0x59f12d(0x240)][_0x59f12d(0x16c)]>0x0)return console[_0x59f12d(0x306)](a31_0x12b51f[_0x59f12d(0x215)](_0x59f12d(0x105)+_0x20c329)),console[_0x59f12d(0x306)](a31_0x12b51f[_0x59f12d(0x2dc)](_0x59f12d(0x1af)+_0x5d364e[_0x59f12d(0x240)]['length']+_0x59f12d(0x1d9))),0x1;!_0x5d364e[_0x59f12d(0x20f)]&&(_0x5d364e[_0x59f12d(0x20f)]={'events':[{'name':_0x59f12d(0x2fc),'source_table':_0x59f12d(0x107)}],'attributes':[{'name':_0x59f12d(0x193),'type':_0x59f12d(0x1c6)}],'id_stitching':{'primary_key':_0x5d364e[_0x59f12d(0x2fe)][_0x59f12d(0x262)]===_0x59f12d(0x2e2)?_0x59f12d(0x2f4):_0x59f12d(0x246)}});_0x5d364e[_0x59f12d(0x240)]=[{'name':_0x59f12d(0x162),'description':_0x59f12d(0x120),'trigger_event':_0x59f12d(0x2fc),'sections':[{'name':_0x59f12d(0x179),'criteria':_0x59f12d(0x25e),'attributes':[_0x59f12d(0x193)]}]}];const _0x2d8e07=serializeDef(_0x5d364e);return writeFileSync(_0x20c329,_0x2d8e07,_0x59f12d(0x1aa)),console[_0x59f12d(0x306)](a31_0x12b51f[_0x59f12d(0x2db)]('✔')+_0x59f12d(0x219)+a31_0x12b51f['cyan'](_0x20c329)),(!_0x5d364e[_0x59f12d(0x20f)]||_0x234245['indexOf'](_0x59f12d(0x261))===-0x1)&&console[_0x59f12d(0x306)](a31_0x12b51f[_0x59f12d(0x2db)]('✔')+_0x59f12d(0x1da)),console[_0x59f12d(0x306)]('\x0a'+a31_0x12b51f[_0x59f12d(0x2dc)](_0x59f12d(0x15f))),console[_0x59f12d(0x306)](_0x59f12d(0x2f8)+_0x20c329+'\x20to\x20configure\x20your\x20personalization\x20service'),console[_0x59f12d(0x306)]('\x20\x202.\x20Run\x20'+a31_0x12b51f[_0x59f12d(0x2dc)](_0x59f12d(0x102)+_0x453587)+_0x59f12d(0x300)),0x0;}}