@treasuredata/tdx 2026.4.1 → 2026.4.3

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 (219) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-pull-command.js +1 -1
  43. package/dist/commands/segment-push-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segment-validate-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/status-command.js +1 -1
  50. package/dist/commands/tables.js +1 -1
  51. package/dist/commands/unset-command.js +1 -1
  52. package/dist/commands/upgrade-command.js +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/user-command.js +1 -1
  55. package/dist/commands/work-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/oauth-keychain.js +1 -1
  66. package/dist/core/oauth.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/core/version.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/mcp/server.js +1 -1
  74. package/dist/mcp/tools/index.js +1 -1
  75. package/dist/mcp/tools/tdx-run.js +1 -1
  76. package/dist/mcp/tools/tdx-search.js +1 -1
  77. package/dist/mcp/tools/work-create-item.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/frontmatter.js +1 -1
  182. package/dist/sdk/workspace/git.js +1 -1
  183. package/dist/sdk/workspace/index.js +1 -1
  184. package/dist/sdk/workspace/templates.js +1 -1
  185. package/dist/sdk/workspace/weekly.js +1 -1
  186. package/dist/sdk/workspace/wikilinks.js +1 -1
  187. package/dist/test-utils/command-runner.js +1 -1
  188. package/dist/test-utils/factories.js +1 -1
  189. package/dist/test-utils/fixtures.js +1 -1
  190. package/dist/test-utils/http-mock.js +1 -1
  191. package/dist/test-utils/index.js +1 -1
  192. package/dist/utils/async.js +1 -1
  193. package/dist/utils/colors.js +1 -1
  194. package/dist/utils/diff.js +1 -1
  195. package/dist/utils/file-permissions.js +1 -1
  196. package/dist/utils/file-reader.js +1 -1
  197. package/dist/utils/github-releases.js +1 -1
  198. package/dist/utils/global-cache.js +1 -1
  199. package/dist/utils/json-loader.js +1 -1
  200. package/dist/utils/local-cache.js +1 -1
  201. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  202. package/dist/utils/logger/formatters/index.js +1 -1
  203. package/dist/utils/logger/handlers/console-handler.js +1 -1
  204. package/dist/utils/logger/handlers/file-handler.js +1 -1
  205. package/dist/utils/logger/handlers/index.js +1 -1
  206. package/dist/utils/logger/handlers/null-handler.js +1 -1
  207. package/dist/utils/logger/index.js +1 -1
  208. package/dist/utils/logger/logger.js +1 -1
  209. package/dist/utils/logger/types.js +1 -1
  210. package/dist/utils/option-validation.js +1 -1
  211. package/dist/utils/process.js +1 -1
  212. package/dist/utils/prompt.js +1 -1
  213. package/dist/utils/spinner.js +1 -1
  214. package/dist/utils/sse-parser.js +1 -1
  215. package/dist/utils/string-utils.js +1 -1
  216. package/dist/utils/table-ref-parser.js +1 -1
  217. package/dist/utils/tdx-logger.js +1 -1
  218. package/dist/utils/version-check.js +1 -1
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- const a31_0x1949a9=a31_0x51b0;(function(_0x576b86,_0x5d5d57){const _0x1efc12=a31_0x51b0,_0x55994a=_0x576b86();while(!![]){try{const _0x5366d8=-parseInt(_0x1efc12(0x391))/0x1*(-parseInt(_0x1efc12(0x22d))/0x2)+parseInt(_0x1efc12(0x2db))/0x3+-parseInt(_0x1efc12(0x3d0))/0x4+parseInt(_0x1efc12(0x374))/0x5*(-parseInt(_0x1efc12(0x25e))/0x6)+-parseInt(_0x1efc12(0x3d1))/0x7+parseInt(_0x1efc12(0x3aa))/0x8*(parseInt(_0x1efc12(0x39e))/0x9)+-parseInt(_0x1efc12(0x2ae))/0xa;if(_0x5366d8===_0x5d5d57)break;else _0x55994a['push'](_0x55994a['shift']());}catch(_0x4db4a6){_0x55994a['push'](_0x55994a['shift']());}}}(a31_0x5aa2,0x98224));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x4b81ea 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_0x5cfd3b 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_0x1949a9(0x34d),LEGACY_PARENT_SEGMENT_DIR='parent_segment';function openBrowser(_0x29a4dc){const _0x5708d9=a31_0x1949a9,_0x54193f=process[_0x5708d9(0x3cc)],_0x1ddbb6=_0x54193f===_0x5708d9(0x327)?_0x5708d9(0x1e9):_0x54193f==='win32'?_0x5708d9(0x285):_0x5708d9(0x38a);spawn(_0x1ddbb6,[_0x29a4dc],{'detached':!![],'stdio':_0x5708d9(0x3c5)})[_0x5708d9(0x32a)]();}function migrateLegacyDirectory(){const _0x5b469a=a31_0x1949a9;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x67bc66=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x67bc66[_0x5b469a(0x3d4)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x5b469a(0x1ce)](a31_0x5cfd3b[_0x5b469a(0x245)](_0x5b469a(0x345)+LEGACY_PARENT_SEGMENT_DIR+_0x5b469a(0x2d6)+PARENT_SEGMENT_DIR+_0x5b469a(0x244))),console[_0x5b469a(0x1ce)](a31_0x5cfd3b['dim'](_0x5b469a(0x37f)+LEGACY_PARENT_SEGMENT_DIR+'/\x20directory.\x0a')),![];console[_0x5b469a(0x1ce)](a31_0x5cfd3b['yellow']('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+'/\x20→\x20'+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x5b469a(0x1ce)](a31_0x5cfd3b['green'](_0x5b469a(0x21c)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x43abb3){const _0x538f74=_0x43abb3 instanceof Error?_0x43abb3[_0x5b469a(0x364)]:String(_0x43abb3);return console[_0x5b469a(0x1ce)](a31_0x5cfd3b[_0x5b469a(0x3cb)](_0x5b469a(0x277)+_0x538f74+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x1949a9(0x3b7)](_0x5cd4fe){const _0x53de0f=a31_0x1949a9;return migrateLegacyDirectory(),super[_0x53de0f(0x3b7)](_0x5cd4fe);}}function resolveYamlFile(_0x10334e){const _0x43070c=a31_0x1949a9;if(_0x10334e[_0x43070c(0x226)](_0x43070c(0x2dc))||_0x10334e[_0x43070c(0x226)](_0x43070c(0x3b2)))return _0x10334e;return a31_0x4b81ea['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x10334e)+_0x43070c(0x2dc));}function formatProgressMessage(_0x52d423){const _0x212e06=a31_0x1949a9,_0x2e6031=_0x52d423[_0x212e06(0x257)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x2e6031){const [,_0x2449be,_0x5d390e,_0x1a131f='']=_0x2e6031;return a31_0x5cfd3b['dim'](_0x2449be+':')+'\x20'+_0x5d390e+a31_0x5cfd3b[_0x212e06(0x333)](_0x1a131f);}return a31_0x5cfd3b[_0x212e06(0x333)](_0x52d423);}function showFileNotFoundError(_0x49b9c0,_0x2c2b32){const _0x6805e9=a31_0x1949a9;console[_0x6805e9(0x1ce)](a31_0x5cfd3b[_0x6805e9(0x3cb)]('Error:\x20File\x20not\x20found:\x20'+_0x49b9c0+'\x0a')),console['error'](a31_0x5cfd3b['cyan'](_0x6805e9(0x384)+_0x2c2b32+_0x6805e9(0x26d)));}function displayRealtimeValidation(_0xaf4255){const _0x9f6696=a31_0x1949a9;if(!_0xaf4255[_0x9f6696(0x26f)])return;const _0x4c9bc7=_0xaf4255[_0x9f6696(0x26f)],_0x1e25a5=_0x4c9bc7[_0x9f6696(0x1df)]?a31_0x5cfd3b[_0x9f6696(0x208)](_0x9f6696(0x296)):a31_0x5cfd3b[_0x9f6696(0x245)](_0x9f6696(0x25f));console[_0x9f6696(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x9f6696(0x333)](_0x9f6696(0x3d7))+'\x20'+_0x1e25a5);if(_0x4c9bc7['events']&&_0x4c9bc7['events']['length']>0x0){console[_0x9f6696(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x9f6696(0x333)]('Events:')+'\x20'+_0x4c9bc7['events']['length']+'\x20configured');for(const _0x146a49 of _0x4c9bc7[_0x9f6696(0x3b5)]){const _0x5ab1d9=_0x146a49[_0x9f6696(0x224)]===![]?a31_0x5cfd3b[_0x9f6696(0x3cb)]('✘'):a31_0x5cfd3b[_0x9f6696(0x208)]('✔');console[_0x9f6696(0x1ce)](_0x9f6696(0x22c)+_0x5ab1d9+'\x20'+_0x146a49[_0x9f6696(0x21d)]),_0x146a49[_0x9f6696(0x253)]&&console['error'](_0x9f6696(0x306)+a31_0x5cfd3b['red'](_0x146a49[_0x9f6696(0x253)]));}}if(_0x4c9bc7[_0x9f6696(0x398)]&&_0x4c9bc7['attributes'][_0x9f6696(0x2d4)]>0x0){console[_0x9f6696(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x9f6696(0x333)](_0x9f6696(0x395))+'\x20'+_0x4c9bc7[_0x9f6696(0x398)]['length']+_0x9f6696(0x3c6));for(const _0x31b031 of _0x4c9bc7[_0x9f6696(0x398)]){const _0x4933f6=_0x31b031['valid']?a31_0x5cfd3b[_0x9f6696(0x208)]('✔'):a31_0x5cfd3b[_0x9f6696(0x3cb)]('✘');console['error']('\x20\x20\x20\x20'+_0x4933f6+'\x20'+_0x31b031[_0x9f6696(0x21d)]+'\x20'+a31_0x5cfd3b['dim']('('+_0x31b031[_0x9f6696(0x357)]+')'));}}if(_0x4c9bc7[_0x9f6696(0x231)]){const _0x3e33f0=_0x4c9bc7[_0x9f6696(0x231)][_0x9f6696(0x1f8)]?.[_0x9f6696(0x2d4)]?'\x20+\x20['+_0x4c9bc7[_0x9f6696(0x231)][_0x9f6696(0x1f8)][_0x9f6696(0x2fb)](',\x20')+']':'';console['error']('\x20\x20'+a31_0x5cfd3b['dim'](_0x9f6696(0x366))+'\x20'+_0x4c9bc7[_0x9f6696(0x231)][_0x9f6696(0x2c1)]+_0x3e33f0);}if(_0x4c9bc7[_0x9f6696(0x262)]&&_0x4c9bc7[_0x9f6696(0x262)][_0x9f6696(0x2d4)]>0x0){console[_0x9f6696(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x9f6696(0x333)](_0x9f6696(0x3a4))+'\x20'+_0x4c9bc7['personalizationServices'][_0x9f6696(0x2d4)]+'\x20service'+(_0x4c9bc7[_0x9f6696(0x262)][_0x9f6696(0x2d4)]!==0x1?'s':''));for(const _0x59ac80 of _0x4c9bc7[_0x9f6696(0x262)]){console[_0x9f6696(0x1ce)]('\x20\x20\x20\x20-\x20'+_0x59ac80[_0x9f6696(0x21d)]);}}}function showParentSegmentNotSetError(_0x736771){const _0x1a4b44=a31_0x1949a9;console[_0x1a4b44(0x1ce)](a31_0x5cfd3b[_0x1a4b44(0x245)](_0x1a4b44(0x38f))),console[_0x1a4b44(0x1ce)](_0x736771);}export class ParentSegmentListCommand extends BaseCommand{['name']='segment:parent:list';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x324);async[a31_0x1949a9(0x2fa)](_0x3393a9){const _0xfdf8ec=a31_0x1949a9,{options:_0x341ecc,args:_0x57a194,tdx:_0x13f243}=_0x3393a9,_0x467f6d=_0x57a194[0x0];_0x341ecc['verbose']&&(console[_0xfdf8ec(0x1ce)](_0xfdf8ec(0x239)+_0x341ecc[_0xfdf8ec(0x1ed)]),_0x467f6d&&console[_0xfdf8ec(0x1ce)](_0xfdf8ec(0x3c7)+_0x467f6d));const _0x2d31ac=await withSpinner(_0x467f6d?_0xfdf8ec(0x351)+_0x467f6d+_0xfdf8ec(0x385):'Listing\x20parent\x20segments...',()=>_0x13f243[_0xfdf8ec(0x2f0)][_0xfdf8ec(0x234)](),{'verbose':_0x341ecc['verbose']});let _0x1eed4d=_0x2d31ac[_0xfdf8ec(0x218)];if(_0x467f6d){const _0x361a49=_0x467f6d[_0xfdf8ec(0x275)](/[.+^${}()|[\]\\]/g,_0xfdf8ec(0x37a))[_0xfdf8ec(0x275)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x4551ea=new RegExp('^'+_0x361a49+'$','i');_0x1eed4d=_0x1eed4d['filter'](_0x5d2185=>_0x4551ea[_0xfdf8ec(0x23c)](_0x5d2185[_0xfdf8ec(0x398)][_0xfdf8ec(0x21d)]));}_0x1eed4d['sort']((_0x1e529e,_0x5004e1)=>_0x1e529e['attributes'][_0xfdf8ec(0x21d)][_0xfdf8ec(0x25c)](_0x5004e1[_0xfdf8ec(0x398)][_0xfdf8ec(0x21d)])),console['error'](_0xfdf8ec(0x387)+_0x1eed4d[_0xfdf8ec(0x2d4)]+_0xfdf8ec(0x2f2)+(_0x1eed4d['length']!==0x1?'s':''));const _0x3a65f3=_0xcbec7b=>{const _0x4ce926=_0xfdf8ec;return getConsoleNextUrl(_0x341ecc['site'],_0x4ce926(0x375)+_0xcbec7b);};if(_0x341ecc[_0xfdf8ec(0x2ba)]==='json'||_0x341ecc[_0xfdf8ec(0x2ba)]==='jsonl'){const _0xf77a2d=_0x1eed4d[_0xfdf8ec(0x22e)](_0x2691e3=>({..._0x2691e3,'url':_0x3a65f3(_0x2691e3['id'])}));await handleSDKOutput(_0xf77a2d,_0x341ecc);}else{if(_0x1eed4d[_0xfdf8ec(0x2d4)]===0x0)_0x467f6d?console[_0xfdf8ec(0x36f)](_0xfdf8ec(0x1e6)+_0x467f6d):console['log']('No\x20parent\x20segments\x20found');else for(const _0x48452a of _0x1eed4d){const _0x2e8589=_0x48452a[_0xfdf8ec(0x398)][_0xfdf8ec(0x3da)]?a31_0x5cfd3b[_0xfdf8ec(0x333)]('\x20('+formatRows(_0x48452a['attributes']['population'])+')'):'',_0x3bc26c=hyperlink(_0x48452a['attributes'][_0xfdf8ec(0x21d)],_0x3a65f3(_0x48452a['id']));console[_0xfdf8ec(0x36f)](_0xfdf8ec(0x305)+_0x3bc26c+_0x2e8589);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x2fd);['description']=a31_0x1949a9(0x24d);async[a31_0x1949a9(0x2fa)](_0x4e5eef){const _0x323bcc=a31_0x1949a9,{options:_0xf1f9c4,args:_0x365fca,tdx:_0x55696d}=_0x4e5eef;console['error'](_0x323bcc(0x29a)+_0x323bcc(0x204)+_0x323bcc(0x24b));const _0x41ff04=_0xf1f9c4;if(_0x365fca['length']===0x0)return console[_0x323bcc(0x1ce)](a31_0x5cfd3b['red'](_0x323bcc(0x200))),console[_0x323bcc(0x1ce)](_0x323bcc(0x238)),0x1;const _0x1271d8=_0x365fca[0x0];if(!_0x41ff04[_0x323bcc(0x381)]||!_0x41ff04[_0x323bcc(0x1dc)])return console[_0x323bcc(0x1ce)](_0x323bcc(0x1ec)),console[_0x323bcc(0x1ce)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x41ff04[_0x323bcc(0x265)]&&(console[_0x323bcc(0x1ce)](_0x323bcc(0x239)+_0x41ff04['site']),console[_0x323bcc(0x1ce)]('Name:\x20'+_0x1271d8),console['error']('Database:\x20'+_0x41ff04['database']),console[_0x323bcc(0x1ce)](_0x323bcc(0x25a)+_0x41ff04[_0x323bcc(0x1dc)]));const _0x50e1ad=await loadJSONFromOptions(_0x41ff04['attributes'],_0x41ff04['attributesFile']),_0x17c013=await loadJSONFromOptions(_0x41ff04[_0x323bcc(0x334)],_0x41ff04['behaviorsFile']),_0x42a045=await loadJSONFromOptions(_0x41ff04[_0x323bcc(0x256)],_0x41ff04[_0x323bcc(0x35b)]),_0x5a45a7={'name':_0x1271d8,'description':_0x41ff04['description'],'scheduleType':_0x41ff04[_0x323bcc(0x1d6)],'scheduleOption':_0x41ff04[_0x323bcc(0x20d)],'timezone':_0x41ff04[_0x323bcc(0x376)],'master':{'parentDatabaseName':_0x41ff04['database'],'parentTableName':_0x41ff04[_0x323bcc(0x1dc)]},'attributes':_0x50e1ad,'behaviors':_0x17c013,'customerGroup':_0x42a045},_0x2eaab3=await withSpinner('Creating\x20parent\x20segment\x20\x27'+_0x1271d8+'\x27...',()=>_0x55696d[_0x323bcc(0x2f0)][_0x323bcc(0x38c)](_0x5a45a7),{'verbose':_0xf1f9c4[_0x323bcc(0x265)]}),_0x3e43ac=_0x2eaab3[_0x323bcc(0x218)];return console['error'](_0x323bcc(0x2e4)+_0x3e43ac[_0x323bcc(0x21d)]+_0x323bcc(0x302)+_0x3e43ac['id']),await handleSDKOutput([_0x3e43ac],_0xf1f9c4),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x24c);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x352);async[a31_0x1949a9(0x2fa)](_0x377abc){const _0x1cc7e5=a31_0x1949a9,{options:_0x1c5f7c,args:_0x10bd9d,tdx:_0x371739}=_0x377abc;console[_0x1cc7e5(0x1ce)](_0x1cc7e5(0x3ba)+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x1cc7e5(0x24b));const _0x324a71=_0x1c5f7c;if(_0x10bd9d[_0x1cc7e5(0x2d4)]===0x0)return console[_0x1cc7e5(0x1ce)](a31_0x5cfd3b[_0x1cc7e5(0x3cb)](_0x1cc7e5(0x200))),console[_0x1cc7e5(0x1ce)](_0x1cc7e5(0x310)),0x1;const _0x376fcf=_0x10bd9d[0x0];_0x324a71[_0x1cc7e5(0x265)]&&(console[_0x1cc7e5(0x1ce)](_0x1cc7e5(0x239)+_0x324a71[_0x1cc7e5(0x1ed)]),console[_0x1cc7e5(0x1ce)](_0x1cc7e5(0x235)+_0x376fcf));const _0x176aee=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x376fcf+_0x1cc7e5(0x385),()=>_0x371739['segment'][_0x1cc7e5(0x360)](_0x376fcf),{'verbose':_0x324a71[_0x1cc7e5(0x265)]}),_0xe4a0b5=_0x176aee['data'],_0x196d17=await loadJSONFromOptions(_0x324a71[_0x1cc7e5(0x29e)],_0x324a71[_0x1cc7e5(0x33e)]),_0x2a0781=await loadJSONFromOptions(_0x324a71[_0x1cc7e5(0x266)],_0x324a71['addBehaviorsFile']),_0x5c886a={'name':_0xe4a0b5[_0x1cc7e5(0x21d)],'description':_0x324a71[_0x1cc7e5(0x237)]!==undefined?_0x324a71[_0x1cc7e5(0x237)]:_0xe4a0b5['description'],'scheduleType':_0x324a71[_0x1cc7e5(0x1d6)]!==undefined?_0x324a71[_0x1cc7e5(0x1d6)]:_0xe4a0b5['scheduleType'],'scheduleOption':_0x324a71[_0x1cc7e5(0x20d)]!==undefined?_0x324a71[_0x1cc7e5(0x20d)]:_0xe4a0b5[_0x1cc7e5(0x20d)],'timezone':_0x324a71[_0x1cc7e5(0x376)]!==undefined?_0x324a71[_0x1cc7e5(0x376)]:_0xe4a0b5['timezone'],'master':_0xe4a0b5[_0x1cc7e5(0x222)],'attributes':_0x196d17?[..._0xe4a0b5[_0x1cc7e5(0x398)]||[],..._0x196d17]:_0xe4a0b5[_0x1cc7e5(0x398)],'behaviors':_0x2a0781?[..._0xe4a0b5[_0x1cc7e5(0x334)]||[],..._0x2a0781]:_0xe4a0b5[_0x1cc7e5(0x334)],'customerGroup':_0xe4a0b5[_0x1cc7e5(0x256)]},_0x5af791=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x376fcf+_0x1cc7e5(0x385),()=>_0x371739[_0x1cc7e5(0x2f0)][_0x1cc7e5(0x2f9)](_0x376fcf,_0x5c886a),{'verbose':_0x324a71[_0x1cc7e5(0x265)]}),_0x557e2e=_0x5af791[_0x1cc7e5(0x218)];return console[_0x1cc7e5(0x1ce)](_0x1cc7e5(0x3a3)+_0x557e2e[_0x1cc7e5(0x21d)]+'\x27'),await handleSDKOutput([_0x557e2e],_0x324a71),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x3b8);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x291);async[a31_0x1949a9(0x2fa)](_0x149513){const _0x5bd02d=a31_0x1949a9,{options:_0x21f663,args:_0x4ad43f,tdx:_0x3bc0ec}=_0x149513,_0x4b8d06=_0x21f663,_0x507089=_0x4ad43f[0x0]||_0x21f663[_0x5bd02d(0x246)];if(!_0x507089)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment'),0x1;if(_0x4b8d06[_0x5bd02d(0x240)]&&_0x4b8d06[_0x5bd02d(0x2fc)])return console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x3cb)](_0x5bd02d(0x250))),console[_0x5bd02d(0x1ce)](a31_0x5cfd3b['dim'](_0x5bd02d(0x2ed))),console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x333)]('using\x20the\x20default\x20path:\x20'+PARENT_SEGMENT_DIR+'/{name}.yml\x0a')),console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x282)](_0x5bd02d(0x2a5))),0x1;const _0x5e22d6=_0x4b8d06[_0x5bd02d(0x2fc)]||a31_0x4b81ea[_0x5bd02d(0x2fb)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x507089)+'.yml');_0x4b8d06[_0x5bd02d(0x265)]&&(console[_0x5bd02d(0x1ce)](_0x5bd02d(0x239)+_0x4b8d06[_0x5bd02d(0x1ed)]),console[_0x5bd02d(0x1ce)](_0x5bd02d(0x235)+_0x507089),console[_0x5bd02d(0x1ce)]('Output\x20file:\x20'+_0x5e22d6));const _0x1e650e=await withSpinner(_0x5bd02d(0x212)+_0x507089+_0x5bd02d(0x385),()=>_0x3bc0ec[_0x5bd02d(0x2f0)][_0x5bd02d(0x37b)](_0x507089),{'verbose':_0x4b8d06['verbose']}),_0x1b5026=_0x1e650e[_0x5bd02d(0x218)];if(existsSync(_0x5e22d6)){const _0x414262=readFileSync(_0x5e22d6,'utf-8'),_0x413d3e=generateDiff(_0x414262,_0x1b5026);if(!hasChanges(_0x413d3e))console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x208)]('✔')+_0x5bd02d(0x311)+a31_0x5cfd3b[_0x5bd02d(0x282)](_0x5e22d6)+_0x5bd02d(0x2b1));else{console[_0x5bd02d(0x1ce)](_0x5bd02d(0x3c9)+_0x5e22d6+'\x27:'),console[_0x5bd02d(0x1ce)]('─'[_0x5bd02d(0x32c)](0x3c)),console['error'](formatDiffWithColors(_0x413d3e)),console[_0x5bd02d(0x1ce)]('─'['repeat'](0x3c));if(!_0x4b8d06[_0x5bd02d(0x38e)]){if(!isInteractive())return console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x3cb)]('\x0aError:'),_0x5bd02d(0x1d2)),console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x333)](_0x5bd02d(0x339))),0x1;const _0x5c952c=await confirmKey('Overwrite\x20\x27'+_0x5e22d6+'\x27?');if(!_0x5c952c)return console[_0x5bd02d(0x1ce)](a31_0x5cfd3b[_0x5bd02d(0x245)](_0x5bd02d(0x372))),0x1;}writeFileSync(_0x5e22d6,_0x1b5026,_0x5bd02d(0x1ff)),console[_0x5bd02d(0x1ce)](a31_0x5cfd3b['green']('✔')+_0x5bd02d(0x2a1)+a31_0x5cfd3b[_0x5bd02d(0x282)](_0x5e22d6));}}else{const _0x36bb66=a31_0x4b81ea[_0x5bd02d(0x2b9)](_0x5e22d6);!existsSync(_0x36bb66)&&mkdirSync(_0x36bb66,{'recursive':!![]}),writeFileSync(_0x5e22d6,_0x1b5026,_0x5bd02d(0x1ff)),console['error'](a31_0x5cfd3b[_0x5bd02d(0x208)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x5cfd3b['cyan'](_0x5e22d6));}return saveSessionContext({'parent_segment':_0x507089},_0x4b8d06['session']),console['error'](a31_0x5cfd3b['green']('✔')+_0x5bd02d(0x297)+a31_0x5cfd3b[_0x5bd02d(0x333)](_0x5bd02d(0x304))+_0x5bd02d(0x350)+a31_0x5cfd3b[_0x5bd02d(0x282)](_0x507089)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]='segment:parent:push';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x2d3);async[a31_0x1949a9(0x2fa)](_0x1b940d){const _0x56d2a3=a31_0x1949a9,{options:_0x17b53d,args:_0x5d169e,tdx:_0x155c6e}=_0x1b940d,_0x48a735=_0x17b53d,_0x26715a=_0x5d169e[0x0]||_0x17b53d[_0x56d2a3(0x246)];if(!_0x26715a)return showParentSegmentNotSetError(_0x56d2a3(0x30a)+_0x56d2a3(0x255)),0x1;const _0xca1987=resolveYamlFile(_0x26715a);if(!existsSync(_0xca1987))return showFileNotFoundError(_0xca1987,_0x26715a),0x1;_0x48a735['verbose']&&(console[_0x56d2a3(0x1ce)]('Site:\x20'+_0x48a735[_0x56d2a3(0x1ed)]),console[_0x56d2a3(0x1ce)](_0x56d2a3(0x330)+_0xca1987));let _0xb404de;try{_0xb404de=readFileSync(_0xca1987,'utf-8');}catch(_0x1bc835){const _0x51d831=_0x1bc835 instanceof Error?_0x1bc835[_0x56d2a3(0x364)]:String(_0x1bc835);return console['error'](_0x56d2a3(0x332)+_0x51d831),0x1;}const _0x342d6e=await withSpinner(_0x56d2a3(0x33a),()=>_0x155c6e[_0x56d2a3(0x2f0)][_0x56d2a3(0x223)](_0xb404de),{'verbose':_0x48a735[_0x56d2a3(0x265)]}),_0x32f683=_0x342d6e[_0x56d2a3(0x218)],{isNew:_0x4bc3ac,name:_0x1fa55d,hasChanges:_0x4366ad,diffFormatted:_0x183b4d}=_0x32f683;if(!_0x4366ad)return console[_0x56d2a3(0x1ce)](_0x56d2a3(0x313)+_0x1fa55d+_0x56d2a3(0x39c)),0x0;_0x4bc3ac?console[_0x56d2a3(0x1ce)](_0x56d2a3(0x39d)+_0x1fa55d+'\x27:'):console[_0x56d2a3(0x1ce)](_0x56d2a3(0x39b)+_0x1fa55d+'\x27:');console[_0x56d2a3(0x1ce)]('─'[_0x56d2a3(0x32c)](0x3c)),console['error'](_0x183b4d),console[_0x56d2a3(0x1ce)]('─'[_0x56d2a3(0x32c)](0x3c));const _0x1663e6=_0x4bc3ac?_0x56d2a3(0x236)+_0x1fa55d+'\x27?':_0x56d2a3(0x3b1)+_0x1fa55d+'\x27?';if(!_0x48a735['yes']){if(!isInteractive())return console['error'](a31_0x5cfd3b[_0x56d2a3(0x3cb)](_0x56d2a3(0x318)),_0x56d2a3(0x1d2)),console['error'](a31_0x5cfd3b['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3cce42=await confirmKey(_0x1663e6);if(!_0x3cce42)return console[_0x56d2a3(0x1ce)](a31_0x5cfd3b[_0x56d2a3(0x245)](_0x56d2a3(0x372))),0x1;}const _0x2f7e40=_0x4bc3ac?'Creating':_0x56d2a3(0x1f0),_0x29e060=await withSpinner(_0x2f7e40+_0x56d2a3(0x3a9)+_0x1fa55d+'\x27...',()=>_0x32f683[_0x56d2a3(0x3a7)](),{'verbose':_0x48a735['verbose']}),_0x54847d=_0x29e060[_0x56d2a3(0x218)],_0x2701b4=getConsoleNextUrl(_0x48a735[_0x56d2a3(0x1ed)],'/app/dw/parentSegments/'+_0x54847d['id']),_0x581ddd=_0x4bc3ac?'Created':_0x56d2a3(0x283);return console[_0x56d2a3(0x1ce)]('✔\x20'+_0x581ddd+_0x56d2a3(0x3a9)+_0x54847d[_0x56d2a3(0x21d)]+'\x27'),console[_0x56d2a3(0x1ce)]('\x20\x20'+_0x2701b4),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x326);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x20c);async[a31_0x1949a9(0x2fa)](_0x3b6d9d){const _0x52bf60=a31_0x1949a9,{options:_0x1a8239,args:_0x4e46f3,tdx:_0x4534b8}=_0x3b6d9d,_0x4e8b2c=_0x1a8239,_0x1ed957=_0x4e46f3[0x0]||_0x1a8239[_0x52bf60(0x246)];if(!_0x1ed957)return showParentSegmentNotSetError(_0x52bf60(0x243)+_0x52bf60(0x2a0)+_0x52bf60(0x2b5)+'\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a'+_0x52bf60(0x32d)+_0x52bf60(0x2af)),0x1;const _0x30a53d=resolveYamlFile(_0x1ed957);if(!existsSync(_0x30a53d))return showFileNotFoundError(_0x30a53d,_0x1ed957),0x1;_0x4e8b2c[_0x52bf60(0x265)]&&(console['error'](_0x52bf60(0x239)+_0x4e8b2c['site']),console[_0x52bf60(0x1ce)](_0x52bf60(0x330)+_0x30a53d));let _0xa3e778;try{_0xa3e778=readFileSync(_0x30a53d,'utf-8');}catch(_0x545dae){const _0x2dc1f6=_0x545dae instanceof Error?_0x545dae[_0x52bf60(0x364)]:String(_0x545dae);return console[_0x52bf60(0x1ce)]('Error\x20reading\x20file:\x20'+_0x2dc1f6),0x1;}const _0x793f22=createCommandSpinner(a31_0x5cfd3b[_0x52bf60(0x333)](_0x52bf60(0x3b3)),{'verbose':_0x4e8b2c[_0x52bf60(0x265)]});_0x793f22[_0x52bf60(0x285)]();const _0x145bea={'onProgress':_0x572e94=>{const _0x2ce75f=_0x52bf60;_0x793f22[_0x2ce75f(0x2ff)]=formatProgressMessage(_0x572e94);}};if(_0x4e8b2c[_0x52bf60(0x222)])_0x145bea[_0x52bf60(0x222)]=!![];if(_0x4e8b2c['enriched'])_0x145bea[_0x52bf60(0x2d9)]=!![];_0x4e8b2c[_0x52bf60(0x3d3)]&&(_0x145bea[_0x52bf60(0x3d3)]=_0x4e8b2c[_0x52bf60(0x3d3)]);_0x4e8b2c['behavior']&&(_0x145bea[_0x52bf60(0x2c2)]=_0x4e8b2c[_0x52bf60(0x2c2)]);if(_0x4e8b2c[_0x52bf60(0x2bf)])_0x145bea[_0x52bf60(0x2bf)]=_0x4e8b2c[_0x52bf60(0x2bf)];let _0x10da60;try{_0x10da60=await _0x4534b8[_0x52bf60(0x2f0)][_0x52bf60(0x258)](_0xa3e778,_0x145bea),_0x793f22[_0x52bf60(0x3a0)]();}catch(_0x272685){_0x793f22[_0x52bf60(0x3a0)]();throw _0x272685;}const _0x5af827=_0x4e8b2c[_0x52bf60(0x2bf)]||_0x52bf60(0x1cf);return this['displayValidateResults'](_0x10da60,_0x145bea,_0x30a53d,_0x5af827),_0x10da60[_0x52bf60(0x1f4)]?0x0:0x1;}[a31_0x1949a9(0x3db)](_0x28c7ee,_0x50da4a,_0x15648e,_0x2d69e5){const _0x33349d=a31_0x1949a9;console[_0x33349d(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x33349d(0x393)](_0x33349d(0x272))+'\x20'+_0x28c7ee[_0x33349d(0x21d)]),console[_0x33349d(0x1ce)]('═'['repeat'](0x3c)),this['displayMasterInfo'](_0x28c7ee);if(typeof _0x50da4a['attribute']===_0x33349d(0x2cb)){this['displayAttributesStats'](_0x28c7ee),this[_0x33349d(0x26e)](_0x28c7ee),this[_0x33349d(0x242)](_0x15648e,_0x2d69e5,_0x33349d(0x3d3),_0x50da4a[_0x33349d(0x3d3)]);return;}if(_0x50da4a[_0x33349d(0x3d3)]===!![]){this[_0x33349d(0x309)](_0x28c7ee),this[_0x33349d(0x26e)](_0x28c7ee),this[_0x33349d(0x242)](_0x15648e,_0x2d69e5,_0x33349d(0x398));return;}if(typeof _0x50da4a[_0x33349d(0x2c2)]===_0x33349d(0x2cb)){this[_0x33349d(0x202)](_0x28c7ee,_0x2d69e5),this[_0x33349d(0x26e)](_0x28c7ee),this['displayPreviewHints'](_0x15648e,_0x2d69e5,_0x33349d(0x2c2),_0x50da4a[_0x33349d(0x2c2)]);return;}if(_0x50da4a[_0x33349d(0x2c2)]===!![]){this[_0x33349d(0x202)](_0x28c7ee,_0x2d69e5),this[_0x33349d(0x26e)](_0x28c7ee),this[_0x33349d(0x242)](_0x15648e,_0x2d69e5,_0x33349d(0x334));return;}this[_0x33349d(0x309)](_0x28c7ee),this[_0x33349d(0x202)](_0x28c7ee,_0x2d69e5),this[_0x33349d(0x2ef)](_0x28c7ee),this[_0x33349d(0x26e)](_0x28c7ee),this['displayPreviewHints'](_0x15648e,_0x2d69e5,_0x33349d(0x3a1));}[a31_0x1949a9(0x2ef)](_0x4fd8f7){displayRealtimeValidation(_0x4fd8f7);}[a31_0x1949a9(0x242)](_0x5bd135,_0x18551a,_0x3c9a17,_0x3f06cd){const _0x886ea1=a31_0x1949a9;console['error']('\x0a'+a31_0x5cfd3b['dim'](_0x886ea1(0x249)));const _0x9e0fd3=_0x18551a!==_0x886ea1(0x1cf)?_0x886ea1(0x2bd)+_0x18551a:'';if(_0x3c9a17===_0x886ea1(0x3d3)&&_0x3f06cd)console[_0x886ea1(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x886ea1(0x3bc)+_0x5bd135+'\x20--attribute\x20\x22'+_0x3f06cd+'\x22'+_0x9e0fd3));else{if(_0x3c9a17===_0x886ea1(0x2c2)&&_0x3f06cd)console[_0x886ea1(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x886ea1(0x333)]('tdx\x20ps\x20preview\x20'+_0x5bd135+'\x20--behavior\x20\x22'+_0x3f06cd+'\x22'+_0x9e0fd3));else(_0x3c9a17==='attributes'||_0x3c9a17===_0x886ea1(0x3a1))&&console[_0x886ea1(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim']('tdx\x20ps\x20preview\x20'+_0x5bd135+'\x20--attribute\x20\x22<name>\x22'+_0x9e0fd3));}(_0x3c9a17===_0x886ea1(0x334)||_0x3c9a17===_0x886ea1(0x3a1))&&console['error']('\x20\x20'+a31_0x5cfd3b[_0x886ea1(0x333)]('tdx\x20ps\x20preview\x20'+_0x5bd135+_0x886ea1(0x331)+_0x9e0fd3)),_0x3c9a17===_0x886ea1(0x3a1)&&console[_0x886ea1(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x886ea1(0x3bc)+_0x5bd135+_0x886ea1(0x26a)+_0x9e0fd3));}[a31_0x1949a9(0x30c)](_0xf9b1e2){const _0x17861f=a31_0x1949a9,{master:_0x39693e}=_0xf9b1e2,_0x422f59=_0x39693e[_0x17861f(0x329)]?a31_0x5cfd3b['green']('✔'):a31_0x5cfd3b['red']('✘');console[_0x17861f(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x17861f(0x333)](_0x17861f(0x368))),console[_0x17861f(0x1ce)](_0x422f59+'\x20'+a31_0x5cfd3b['bold'](_0x39693e['database']+'.'+_0x39693e['table'])),_0x39693e['schemaValid']?_0x39693e[_0x17861f(0x365)]!==undefined&&console[_0x17861f(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim']('Rows:')+'\x20'+a31_0x5cfd3b[_0x17861f(0x282)](formatRows(_0x39693e[_0x17861f(0x365)]))):console[_0x17861f(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x17861f(0x3cb)]('Error:')+'\x20'+_0x39693e[_0x17861f(0x2e8)]);}['displayAttributesStats'](_0x2b843b){const _0x8c0c0=a31_0x1949a9;if(_0x2b843b['attributes'][_0x8c0c0(0x2d4)]===0x0)return;console[_0x8c0c0(0x1ce)]('\x0a'+a31_0x5cfd3b['dim'](_0x8c0c0(0x251)));for(const _0x4cfd85 of _0x2b843b[_0x8c0c0(0x398)]){const _0x248b78=_0x4cfd85[_0x8c0c0(0x329)]?a31_0x5cfd3b[_0x8c0c0(0x208)]('✔'):a31_0x5cfd3b[_0x8c0c0(0x3cb)]('✘');let _0x10dc54='';if(_0x4cfd85[_0x8c0c0(0x329)]&&_0x4cfd85[_0x8c0c0(0x254)]!==undefined&&_0x4cfd85[_0x8c0c0(0x2c3)]!==undefined){const _0x2e1c27=_0x4cfd85['coveragePercent'][_0x8c0c0(0x2a2)](0x1),_0x1305c6=_0x4cfd85['coveragePercent']>=0x50?a31_0x5cfd3b[_0x8c0c0(0x208)]:_0x4cfd85[_0x8c0c0(0x2c3)]>=0x32?a31_0x5cfd3b[_0x8c0c0(0x245)]:a31_0x5cfd3b[_0x8c0c0(0x3cb)];_0x10dc54='\x20'+a31_0x5cfd3b['dim'](_0x8c0c0(0x389))+'\x20'+_0x1305c6(_0x2e1c27+'%')+'\x20('+formatRows(_0x4cfd85[_0x8c0c0(0x254)])+_0x8c0c0(0x298);}console[_0x8c0c0(0x1ce)](_0x248b78+'\x20'+a31_0x5cfd3b[_0x8c0c0(0x393)](_0x4cfd85[_0x8c0c0(0x21d)])+_0x10dc54),console[_0x8c0c0(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x8c0c0(0x333)](_0x8c0c0(0x3de))+'\x20'+a31_0x5cfd3b[_0x8c0c0(0x393)](_0x4cfd85[_0x8c0c0(0x381)]+'.'+_0x4cfd85[_0x8c0c0(0x1dc)]));const _0x2b601a=_0x4cfd85['joinKey']===_0x4cfd85[_0x8c0c0(0x3b6)]?a31_0x5cfd3b[_0x8c0c0(0x333)](_0x8c0c0(0x1f3))+'\x20'+_0x4cfd85['joinKey']:a31_0x5cfd3b[_0x8c0c0(0x333)]('Join:')+'\x20'+_0x4cfd85[_0x8c0c0(0x342)]+_0x8c0c0(0x350)+_0x4cfd85['foreignKey'];console[_0x8c0c0(0x1ce)]('\x20\x20'+_0x2b601a),console[_0x8c0c0(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x8c0c0(0x333)]('Columns:')),this[_0x8c0c0(0x2cc)](_0x4cfd85[_0x8c0c0(0x335)]),!_0x4cfd85[_0x8c0c0(0x329)]&&console[_0x8c0c0(0x1ce)]('\x20\x20'+a31_0x5cfd3b['red'](_0x8c0c0(0x3ce))+'\x20'+_0x4cfd85[_0x8c0c0(0x2e8)]);}}[a31_0x1949a9(0x202)](_0x569b11,_0x5b5321){const _0x1453d9=a31_0x1949a9;if(_0x569b11[_0x1453d9(0x334)][_0x1453d9(0x2d4)]===0x0)return;console[_0x1453d9(0x1ce)]('\x0a'+a31_0x5cfd3b['dim'](_0x1453d9(0x2cf))+'\x20'+a31_0x5cfd3b[_0x1453d9(0x333)]('('+_0x5b5321+')'));for(const _0x34b34c of _0x569b11[_0x1453d9(0x334)]){const _0x50e3a3=_0x34b34c[_0x1453d9(0x329)]?a31_0x5cfd3b[_0x1453d9(0x208)]('✔'):a31_0x5cfd3b[_0x1453d9(0x3cb)]('✘');let _0x5f553b='';if(_0x34b34c[_0x1453d9(0x329)]&&_0x34b34c[_0x1453d9(0x3bd)]!==undefined&&_0x34b34c[_0x1453d9(0x2b6)]!==undefined){const _0x3ef6ee=_0x34b34c[_0x1453d9(0x2ec)]?.['toFixed'](0x1)||'?',_0xcebefd=(_0x34b34c[_0x1453d9(0x2ec)]??0x0)>=0x32?a31_0x5cfd3b[_0x1453d9(0x208)]:(_0x34b34c[_0x1453d9(0x2ec)]??0x0)>=0x14?a31_0x5cfd3b['yellow']:a31_0x5cfd3b[_0x1453d9(0x3cb)];_0x5f553b='\x20'+a31_0x5cfd3b[_0x1453d9(0x333)](_0x1453d9(0x1ea))+'\x20'+_0xcebefd(formatRows(_0x34b34c[_0x1453d9(0x3bd)]))+'\x20('+_0x3ef6ee+_0x1453d9(0x3dc)+a31_0x5cfd3b[_0x1453d9(0x333)](_0x1453d9(0x247))+'\x20'+a31_0x5cfd3b[_0x1453d9(0x282)](formatRows(_0x34b34c[_0x1453d9(0x2b6)]));}console[_0x1453d9(0x1ce)](_0x50e3a3+'\x20'+a31_0x5cfd3b['bold'](_0x34b34c[_0x1453d9(0x21d)])+_0x5f553b),console[_0x1453d9(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x1453d9(0x3de))+'\x20'+a31_0x5cfd3b[_0x1453d9(0x393)](_0x34b34c['database']+'.'+_0x34b34c[_0x1453d9(0x1dc)]));const _0x5d354a=_0x34b34c['joinKey']===_0x34b34c[_0x1453d9(0x3b6)]?a31_0x5cfd3b[_0x1453d9(0x333)](_0x1453d9(0x1f3))+'\x20'+_0x34b34c[_0x1453d9(0x342)]:a31_0x5cfd3b['dim'](_0x1453d9(0x2eb))+'\x20'+_0x34b34c[_0x1453d9(0x342)]+_0x1453d9(0x350)+_0x34b34c[_0x1453d9(0x3b6)];console[_0x1453d9(0x1ce)]('\x20\x20'+_0x5d354a),console[_0x1453d9(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x1453d9(0x333)]('Columns:')),this[_0x1453d9(0x2cc)](_0x34b34c[_0x1453d9(0x335)]),!_0x34b34c[_0x1453d9(0x329)]&&console[_0x1453d9(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x1453d9(0x3cb)](_0x1453d9(0x3ce))+'\x20'+_0x34b34c[_0x1453d9(0x2e8)]);}}[a31_0x1949a9(0x2cc)](_0x5016ab){const _0x11ad3f=a31_0x1949a9;for(const _0x8524d8 of _0x5016ab){_0x8524d8[_0x11ad3f(0x354)]===_0x8524d8[_0x11ad3f(0x274)]||_0x8524d8[_0x11ad3f(0x274)]==='*'?console[_0x11ad3f(0x1ce)]('\x20\x20\x20\x20-\x20'+_0x8524d8[_0x11ad3f(0x354)]):console['error']('\x20\x20\x20\x20-\x20'+_0x8524d8[_0x11ad3f(0x354)]+'\x20'+a31_0x5cfd3b[_0x11ad3f(0x333)]('('+_0x8524d8[_0x11ad3f(0x274)]+')'));}}[a31_0x1949a9(0x26e)](_0x59e6f8){const _0x591389=a31_0x1949a9;console[_0x591389(0x1ce)]('─'[_0x591389(0x32c)](0x3c));if(_0x59e6f8[_0x591389(0x1fc)]['length']>0x0){console['error']('\x0a'+a31_0x5cfd3b['red'](_0x591389(0x2ac)));for(const _0x5b1980 of _0x59e6f8[_0x591389(0x1fc)]){console[_0x591389(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x591389(0x3cb)]('•')+'\x20'+_0x5b1980);}}_0x59e6f8[_0x591389(0x1f4)]&&console[_0x591389(0x1ce)]('\x0a'+a31_0x5cfd3b['green']('✔')+_0x591389(0x2ee));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x33c);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x373);async[a31_0x1949a9(0x2fa)](_0x549e41){const _0x2e0406=a31_0x1949a9,{options:_0x370b8a,args:_0x4bfdbb,tdx:_0x17a476}=_0x549e41,_0x3946af=_0x370b8a,_0x4435f9=_0x4bfdbb[0x0]||_0x370b8a[_0x2e0406(0x246)];if(!_0x4435f9)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'+_0x2e0406(0x2a7)+_0x2e0406(0x39f)+'\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'+'\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a'+_0x2e0406(0x3a5)+_0x2e0406(0x2af)),0x1;if(!_0x3946af[_0x2e0406(0x222)]&&!_0x3946af['attribute']&&!_0x3946af['behavior']&&!_0x3946af[_0x2e0406(0x2d9)])return console[_0x2e0406(0x1ce)](a31_0x5cfd3b[_0x2e0406(0x3cb)](_0x2e0406(0x219))),console[_0x2e0406(0x1ce)]('Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a'),console[_0x2e0406(0x1ce)](_0x2e0406(0x2b7)),console[_0x2e0406(0x1ce)](_0x2e0406(0x22b)),console['error'](_0x2e0406(0x392)),console[_0x2e0406(0x1ce)](_0x2e0406(0x38d)),console['error']('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x33f425=resolveYamlFile(_0x4435f9);if(!existsSync(_0x33f425))return showFileNotFoundError(_0x33f425,_0x4435f9),0x1;_0x3946af['verbose']&&(console[_0x2e0406(0x1ce)](_0x2e0406(0x239)+_0x3946af[_0x2e0406(0x1ed)]),console[_0x2e0406(0x1ce)]('YAML\x20file:\x20'+_0x33f425));let _0x22d1de;try{_0x22d1de=readFileSync(_0x33f425,'utf-8');}catch(_0x5bf426){const _0x153011=_0x5bf426 instanceof Error?_0x5bf426[_0x2e0406(0x364)]:String(_0x5bf426);return console[_0x2e0406(0x1ce)](_0x2e0406(0x332)+_0x153011),0x1;}let _0x374cf2;try{_0x374cf2=parseDef(_0x22d1de);}catch(_0x3144f1){const _0x186b6f=_0x3144f1 instanceof Error?_0x3144f1[_0x2e0406(0x364)]:String(_0x3144f1);return console[_0x2e0406(0x1ce)](a31_0x5cfd3b[_0x2e0406(0x3cb)](_0x2e0406(0x26b)+_0x186b6f)),0x1;}if(_0x3946af[_0x2e0406(0x3d3)]===!![]||_0x3946af[_0x2e0406(0x3d3)]===''){const _0x4cbc4c=_0x374cf2[_0x2e0406(0x398)]?.[_0x2e0406(0x22e)](_0x3ca097=>_0x3ca097['name'])||[];if(_0x4cbc4c[_0x2e0406(0x2d4)]===0x0)console[_0x2e0406(0x1ce)](a31_0x5cfd3b['red']('Error:\x20No\x20attributes\x20defined\x20in\x20configuration'));else{console[_0x2e0406(0x1ce)](a31_0x5cfd3b[_0x2e0406(0x3cb)](_0x2e0406(0x390))),console[_0x2e0406(0x1ce)](_0x2e0406(0x2f8));for(const _0x34892c of _0x4cbc4c){console[_0x2e0406(0x1ce)]('\x20\x20'+a31_0x5cfd3b['cyan'](_0x34892c));}console[_0x2e0406(0x1ce)](_0x2e0406(0x260)+_0x4435f9+_0x2e0406(0x377)+_0x4cbc4c[0x0]+'\x22');}return 0x1;}if(_0x3946af[_0x2e0406(0x2c2)]===!![]||_0x3946af[_0x2e0406(0x2c2)]===''){const _0x2a78ae=_0x374cf2['behaviors']?.['map'](_0xb2f39d=>_0xb2f39d[_0x2e0406(0x21d)])||[];if(_0x2a78ae[_0x2e0406(0x2d4)]===0x0)console[_0x2e0406(0x1ce)](a31_0x5cfd3b[_0x2e0406(0x3cb)](_0x2e0406(0x30d)));else{console[_0x2e0406(0x1ce)](a31_0x5cfd3b[_0x2e0406(0x3cb)](_0x2e0406(0x3ae))),console[_0x2e0406(0x1ce)](_0x2e0406(0x1fb));for(const _0x2d147b of _0x2a78ae){console[_0x2e0406(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x2e0406(0x282)](_0x2d147b));}console[_0x2e0406(0x1ce)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x4435f9+_0x2e0406(0x2ca)+_0x2a78ae[0x0]+'\x22');}return 0x1;}const _0x34c047=createCommandSpinner(a31_0x5cfd3b[_0x2e0406(0x333)](_0x2e0406(0x241)),{'verbose':_0x3946af[_0x2e0406(0x265)]});_0x34c047[_0x2e0406(0x285)]();const _0x1c6622={'onProgress':_0x3bc1d2=>{const _0xa0926=_0x2e0406;_0x34c047[_0xa0926(0x2ff)]=formatProgressMessage(_0x3bc1d2);}};if(_0x3946af[_0x2e0406(0x222)])_0x1c6622[_0x2e0406(0x222)]=!![];if(_0x3946af[_0x2e0406(0x3d3)]&&typeof _0x3946af[_0x2e0406(0x3d3)]===_0x2e0406(0x2cb))_0x1c6622['attribute']=_0x3946af[_0x2e0406(0x3d3)];if(_0x3946af[_0x2e0406(0x2c2)]&&typeof _0x3946af[_0x2e0406(0x2c2)]===_0x2e0406(0x2cb))_0x1c6622[_0x2e0406(0x2c2)]=_0x3946af[_0x2e0406(0x2c2)];if(_0x3946af[_0x2e0406(0x2d9)])_0x1c6622[_0x2e0406(0x2d9)]=!![];if(_0x3946af['interval'])_0x1c6622[_0x2e0406(0x2bf)]=_0x3946af[_0x2e0406(0x2bf)];let _0x178a58;try{_0x178a58=await _0x17a476['segment'][_0x2e0406(0x1f2)](_0x22d1de,_0x1c6622),_0x34c047['stop']();}catch(_0x241676){_0x34c047[_0x2e0406(0x3a0)]();throw _0x241676;}return await this[_0x2e0406(0x31a)](_0x178a58,{'master':_0x3946af[_0x2e0406(0x222)],'attribute':typeof _0x3946af['attribute']===_0x2e0406(0x2cb)?_0x3946af[_0x2e0406(0x3d3)]:undefined,'behavior':typeof _0x3946af['behavior']===_0x2e0406(0x2cb)?_0x3946af[_0x2e0406(0x2c2)]:undefined,'enriched':_0x3946af['enriched']}),_0x178a58[_0x2e0406(0x1f4)]?0x0:0x1;}async[a31_0x1949a9(0x31a)](_0x5a0e4c,_0x57796c){const _0x168ad1=a31_0x1949a9;console[_0x168ad1(0x1ce)]('\x0a'+a31_0x5cfd3b['bold'](_0x168ad1(0x210))+'\x20'+_0x5a0e4c[_0x168ad1(0x21d)]),console['error']('═'[_0x168ad1(0x32c)](0x3c));if(_0x57796c[_0x168ad1(0x222)]&&_0x5a0e4c['sampleData']){const _0x2d80d3=a31_0x5cfd3b[_0x168ad1(0x333)](_0x168ad1(0x289))+'\x20'+a31_0x5cfd3b[_0x168ad1(0x393)](_0x5a0e4c['master'][_0x168ad1(0x381)]+'.'+_0x5a0e4c[_0x168ad1(0x222)]['table']);await this[_0x168ad1(0x1e2)](_0x2d80d3,_0x5a0e4c[_0x168ad1(0x314)]);}else{if(_0x57796c['attribute']&&_0x5a0e4c[_0x168ad1(0x314)]){const _0x258305=a31_0x5cfd3b[_0x168ad1(0x333)](_0x168ad1(0x32e))+'\x20'+a31_0x5cfd3b['bold'](_0x57796c[_0x168ad1(0x3d3)]);await this[_0x168ad1(0x1e2)](_0x258305,_0x5a0e4c[_0x168ad1(0x314)]);}else{if(_0x57796c[_0x168ad1(0x2c2)]&&_0x5a0e4c[_0x168ad1(0x314)]){const _0x46c92e=a31_0x5cfd3b[_0x168ad1(0x333)]('Behavior:')+'\x20'+a31_0x5cfd3b[_0x168ad1(0x393)](_0x57796c[_0x168ad1(0x2c2)]);await this[_0x168ad1(0x1e2)](_0x46c92e,_0x5a0e4c[_0x168ad1(0x314)]);}else{if(_0x57796c[_0x168ad1(0x2d9)]&&_0x5a0e4c['sampleData']){const _0x3b841=a31_0x5cfd3b[_0x168ad1(0x333)](_0x168ad1(0x2b4))+'\x20'+a31_0x5cfd3b['bold'](_0x168ad1(0x33d));await this['displaySampleData'](_0x3b841,_0x5a0e4c[_0x168ad1(0x314)]);}else!_0x5a0e4c[_0x168ad1(0x314)]&&console[_0x168ad1(0x1ce)](_0x168ad1(0x3d8));}}}if(_0x5a0e4c[_0x168ad1(0x1fc)][_0x168ad1(0x2d4)]>0x0){console[_0x168ad1(0x1ce)]('─'[_0x168ad1(0x32c)](0x3c)),console[_0x168ad1(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x168ad1(0x3cb)](_0x168ad1(0x2ac)));for(const _0x4fcddd of _0x5a0e4c[_0x168ad1(0x1fc)]){console['error']('\x20\x20'+a31_0x5cfd3b[_0x168ad1(0x3cb)]('•')+'\x20'+_0x4fcddd);}}}async[a31_0x1949a9(0x1e2)](_0x40d75f,_0x43476f){const _0x46f7d5=a31_0x1949a9;if(_0x43476f[_0x46f7d5(0x2d4)]===0x0){console[_0x46f7d5(0x1ce)]('\x0a'+_0x40d75f),console['error'](_0x46f7d5(0x34f));return;}console['error']('\x0a'+_0x40d75f);const _0x2a9997=Object[_0x46f7d5(0x28a)](_0x43476f[0x0])[_0x46f7d5(0x22e)](_0x290d95=>({'name':_0x290d95,'type':typeof _0x43476f[0x0][_0x290d95]===_0x46f7d5(0x31f)?'double':_0x46f7d5(0x233)})),_0x19edc7={'queryId':_0x46f7d5(0x3bb),'columns':_0x2a9997,'data':_0x43476f,'stats':{'state':_0x46f7d5(0x1e4),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x43476f[_0x46f7d5(0x2d4)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0xdf07d1=formatAsTable(_0x19edc7,_0x43476f[_0x46f7d5(0x2d4)],!![]);await writeOutput(_0xdf07d1,undefined,_0x46f7d5(0x1dc));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x2d0);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x2f5);async[a31_0x1949a9(0x2fa)](_0x106699){const _0x301749=a31_0x1949a9,{options:_0x3829c8,args:_0x286286,tdx:_0x1a0f3b}=_0x106699,_0x359def=_0x3829c8,_0x11b02a=_0x286286[0x0]||_0x3829c8[_0x301749(0x246)];if(!_0x11b02a)return showParentSegmentNotSetError(_0x301749(0x292)+_0x301749(0x30e)),0x1;const _0x2739ff=resolveYamlFile(_0x11b02a);if(existsSync(_0x2739ff)){_0x359def[_0x301749(0x265)]&&console['error'](_0x301749(0x287)+_0x2739ff);let _0x275649;try{_0x275649=readFileSync(_0x2739ff,'utf-8');}catch(_0x101080){const _0xe194a=_0x101080 instanceof Error?_0x101080[_0x301749(0x364)]:String(_0x101080);return console[_0x301749(0x1ce)](_0x301749(0x332)+_0xe194a),0x1;}const _0x547a0e=await withSpinner(_0x301749(0x33a),()=>_0x1a0f3b[_0x301749(0x2f0)][_0x301749(0x223)](_0x275649),{'verbose':_0x359def[_0x301749(0x265)]}),_0x4b1110=_0x547a0e['data'],{isNew:_0x52c9c5,name:_0x4b6c0f,hasChanges:_0x2eceba,diffFormatted:_0x5cbc94}=_0x4b1110;if(_0x2eceba){_0x52c9c5?console['error'](_0x301749(0x39d)+_0x4b6c0f+'\x27:'):console[_0x301749(0x1ce)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x4b6c0f+'\x27:');console[_0x301749(0x1ce)]('─'[_0x301749(0x32c)](0x3c)),console['error'](_0x5cbc94),console[_0x301749(0x1ce)]('─'[_0x301749(0x32c)](0x3c));const _0x146927=_0x52c9c5?_0x301749(0x236)+_0x4b6c0f+_0x301749(0x217):_0x301749(0x3b1)+_0x4b6c0f+_0x301749(0x217);if(!_0x359def[_0x301749(0x38e)]){if(!isInteractive())return console['error'](a31_0x5cfd3b[_0x301749(0x3cb)](_0x301749(0x318)),_0x301749(0x1d2)),console[_0x301749(0x1ce)](a31_0x5cfd3b[_0x301749(0x333)](_0x301749(0x339))),0x1;const _0x204b21=await confirmKey(_0x146927);if(!_0x204b21)return console[_0x301749(0x1ce)](a31_0x5cfd3b['yellow'](_0x301749(0x372))),0x1;}const _0x525c17=_0x52c9c5?_0x301749(0x307):_0x301749(0x1f0);await withSpinner(_0x525c17+_0x301749(0x3a9)+_0x4b6c0f+_0x301749(0x385),()=>_0x4b1110[_0x301749(0x3a7)](),{'verbose':_0x359def[_0x301749(0x265)]});const _0xc2564c=_0x52c9c5?_0x301749(0x356):_0x301749(0x283);console[_0x301749(0x1ce)]('✔\x20'+_0xc2564c+_0x301749(0x3a9)+_0x4b6c0f+'\x27');}else console[_0x301749(0x1ce)](_0x301749(0x313)+_0x4b6c0f+_0x301749(0x396));}const _0x5186e1=await withSpinner(_0x301749(0x2be)+_0x11b02a+_0x301749(0x385),()=>_0x1a0f3b[_0x301749(0x2f0)][_0x301749(0x3dd)](_0x11b02a),{'verbose':_0x359def[_0x301749(0x265)]}),_0x223334=_0x5186e1['data'],_0x28148b=getConsoleUrl(_0x359def[_0x301749(0x1ed)],_0x301749(0x31b)+_0x223334[_0x301749(0x27c)]+_0x301749(0x37c)+_0x223334['workflowSessionId']+_0x301749(0x2a6)+_0x223334[_0x301749(0x399)]);return console['error'](_0x301749(0x2ab)),console[_0x301749(0x1ce)]('\x20\x20'+a31_0x5cfd3b[_0x301749(0x333)](_0x301749(0x362))+'\x20'+_0x223334[_0x301749(0x21b)]),console['error']('\x20\x20'+a31_0x5cfd3b['dim'](_0x301749(0x1d0))+'\x20'+_0x223334[_0x301749(0x1ee)]),console[_0x301749(0x1ce)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x301749(0x34b))+'\x20'+_0x223334[_0x301749(0x2c5)]),console['error']('\x20\x20'+a31_0x5cfd3b['dim'](_0x301749(0x1f9))+'\x20'+_0x223334[_0x301749(0x399)]),console[_0x301749(0x1ce)]('\x20\x20'+_0x28148b),console[_0x301749(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x301749(0x333)]('To\x20cancel:')+_0x301749(0x2f7)+_0x223334[_0x301749(0x399)]+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x1949a9(0x21d)]='segment:parent:fields';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x28b);async[a31_0x1949a9(0x2fa)](_0x485bfe){const _0x42fac1=a31_0x1949a9,{options:_0x1382d2,args:_0x4f733f,tdx:_0x2f4c8b}=_0x485bfe,_0x4f7dec=_0x4f733f[0x0]||_0x1382d2[_0x42fac1(0x246)];if(!_0x4f7dec)return showParentSegmentNotSetError(_0x42fac1(0x24a)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment'),0x1;_0x1382d2[_0x42fac1(0x265)]&&(console[_0x42fac1(0x1ce)]('Site:\x20'+_0x1382d2[_0x42fac1(0x1ed)]),console[_0x42fac1(0x1ce)]('Parent\x20segment:\x20'+_0x4f7dec));const _0x1e963d=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x4f7dec+_0x42fac1(0x385),()=>_0x2f4c8b[_0x42fac1(0x2f0)]['listFields'](_0x4f7dec),{'verbose':_0x1382d2[_0x42fac1(0x265)]}),_0x5c6c2d=_0x1e963d[_0x42fac1(0x218)];console[_0x42fac1(0x1ce)](_0x42fac1(0x387)+_0x5c6c2d['length']+_0x42fac1(0x2f4)+(_0x5c6c2d['length']!==0x1?'s':''));if(_0x1382d2[_0x42fac1(0x290)]||_0x1382d2[_0x42fac1(0x315)])return await handleSDKOutput(_0x5c6c2d,_0x1382d2),0x0;return displayFieldsHumanReadable(_0x5c6c2d,_0x4f7dec),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x1949a9(0x21d)]='segment:parent:view';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x2da);async[a31_0x1949a9(0x2fa)](_0x1d7062){const _0x28b353=a31_0x1949a9,{options:_0x216e63,args:_0x53dfd6,tdx:_0xbfe0d5}=_0x1d7062,_0x254d95=_0x216e63,_0x5de1de=_0x53dfd6[0x0]||_0x216e63[_0x28b353(0x246)];if(!_0x5de1de)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a'+_0x28b353(0x2b5)+_0x28b353(0x316)),0x1;_0x216e63['verbose']&&(console['error'](_0x28b353(0x239)+_0x216e63[_0x28b353(0x1ed)]),console['error'](_0x28b353(0x235)+_0x5de1de));const _0x1529e0=await withSpinner(_0x28b353(0x212)+_0x5de1de+'\x27...',()=>_0xbfe0d5[_0x28b353(0x2f0)][_0x28b353(0x360)](_0x5de1de),{'verbose':_0x216e63[_0x28b353(0x265)]}),_0xf20c32=_0x1529e0[_0x28b353(0x218)];if(_0x254d95[_0x28b353(0x1fd)]){const _0x30986a=getConsoleNextUrl(_0x254d95[_0x28b353(0x1ed)],_0x28b353(0x375)+_0xf20c32['id']);return console['error'](a31_0x5cfd3b[_0x28b353(0x208)]('✔')+'\x20Opening\x20'+a31_0x5cfd3b[_0x28b353(0x282)](_0x30986a)),openBrowser(_0x30986a),0x0;}return await handleSingleObjectOutput(_0xf20c32,_0x216e63),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{['name']=a31_0x1949a9(0x3d5);['description']='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async['execute'](_0xce9b18){const _0x6238a7=a31_0x1949a9,{options:_0x20a455,args:_0x5e2982,tdx:_0x110032}=_0xce9b18,_0x267857=_0x20a455,_0x3e3557=_0x5e2982[0x0]||_0x20a455[_0x6238a7(0x246)];if(!_0x3e3557)return showParentSegmentNotSetError(_0x6238a7(0x3b4)+_0x6238a7(0x2d5)+_0x6238a7(0x2b5)+_0x6238a7(0x3b0)),0x1;_0x20a455[_0x6238a7(0x265)]&&(console['error'](_0x6238a7(0x239)+_0x20a455[_0x6238a7(0x1ed)]),console[_0x6238a7(0x1ce)](_0x6238a7(0x235)+_0x3e3557));const _0x468d8a=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3e3557+_0x6238a7(0x385),()=>_0x110032[_0x6238a7(0x2f0)]['resolveParentId'](_0x3e3557),{'verbose':_0x20a455[_0x6238a7(0x265)]}),_0x48c073=_0x468d8a['data'],_0x6ea3c0=_0x110032[_0x6238a7(0x2f0)]['getOutputDatabaseName'](_0x48c073);if(_0x267857[_0x6238a7(0x2fc)]){const _0x5d4ff7=await this[_0x6238a7(0x276)](_0xce9b18,_0x3e3557,_0x48c073,_0x6ea3c0),_0x4ce093=this[_0x6238a7(0x28f)](_0x5d4ff7);writeFileSync(_0x267857[_0x6238a7(0x2fc)],_0x4ce093);const _0x50583d=_0x5d4ff7[_0x6238a7(0x344)][_0x6238a7(0x335)]['length']+_0x5d4ff7[_0x6238a7(0x334)][_0x6238a7(0x207)]((_0x43c9ff,_0x2fee39)=>_0x43c9ff+_0x2fee39[_0x6238a7(0x335)]['length'],0x0),_0x3d9360=_0x5d4ff7[_0x6238a7(0x334)]['filter'](_0x573cd3=>_0x573cd3['columns']['length']===0x0)['length'];return console[_0x6238a7(0x36f)](_0x6238a7(0x29b)+_0x267857[_0x6238a7(0x2fc)]),console[_0x6238a7(0x36f)]('\x20\x20Database:\x20'+_0x6ea3c0),console[_0x6238a7(0x36f)]('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0x5d4ff7[_0x6238a7(0x334)]['length']+_0x6238a7(0x295)),console['log'](_0x6238a7(0x1cb)+_0x50583d+_0x6238a7(0x3be)),_0x3d9360>0x0&&console[_0x6238a7(0x36f)](_0x6238a7(0x1e3)+_0x3d9360+_0x6238a7(0x394)),0x0;}console['error']('\x0a'+a31_0x5cfd3b[_0x6238a7(0x393)]('Output\x20Database:')+'\x20'+a31_0x5cfd3b[_0x6238a7(0x282)](_0x6ea3c0));const _0x17c749=await withSpinner(_0x6238a7(0x3c8),()=>_0x110032[_0x6238a7(0x2f0)][_0x6238a7(0x323)](_0x48c073),{'verbose':_0x20a455['verbose']});console[_0x6238a7(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x6238a7(0x393)](_0x6238a7(0x344))+'\x20'+a31_0x5cfd3b['dim']('('+_0x6ea3c0+_0x6238a7(0x300)));const _0x57c17c=await executeSchemaQuery(_0x17c749[_0x6238a7(0x218)],_0x110032,_0x20a455);await handleQueryOutput(_0x57c17c,_0x20a455);const _0x2a9a83=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x110032[_0x6238a7(0x2f0)][_0x6238a7(0x34c)](_0x48c073),{'verbose':_0x20a455[_0x6238a7(0x265)]});for(const _0x658158 of _0x2a9a83['data']){const _0xee4607=_0x6238a7(0x3cd)+_0x658158[_0x6238a7(0x2a4)]()[_0x6238a7(0x275)](/\s+/g,'_'),_0x5d8b9e=_0x6238a7(0x36d)+_0x6ea3c0+'.'+_0xee4607;console[_0x6238a7(0x1ce)]('\x0a'+a31_0x5cfd3b['bold'](_0x658158)+'\x20'+a31_0x5cfd3b[_0x6238a7(0x333)]('('+_0x6ea3c0+'.'+_0xee4607+')'));try{const _0xd98c77=await executeSchemaQuery(_0x5d8b9e,_0x110032,_0x20a455);await handleQueryOutput(_0xd98c77,_0x20a455);}catch{console[_0x6238a7(0x1ce)](a31_0x5cfd3b[_0x6238a7(0x245)](_0x6238a7(0x1d9)));}}return 0x0;}async[a31_0x1949a9(0x276)](_0x332910,_0x5690d0,_0x176f75,_0x1f55d2){const _0x153e08=a31_0x1949a9,{options:_0x50b44e,tdx:_0x3cb6de}=_0x332910,_0x3294cb=await withSpinner(_0x153e08(0x3c8),()=>_0x3cb6de['segment'][_0x153e08(0x323)](_0x176f75),{'verbose':_0x50b44e[_0x153e08(0x265)]}),_0x427dc0=await executeSchemaQuery(_0x3294cb[_0x153e08(0x218)],_0x3cb6de,_0x50b44e),_0x15d051=_0x427dc0['data'][_0x153e08(0x22e)](_0x530381=>({'name':_0x530381[_0x153e08(0x269)],'type':_0x530381['column_type']})),_0x4ea177=await withSpinner(_0x153e08(0x321),()=>_0x3cb6de[_0x153e08(0x2f0)][_0x153e08(0x34c)](_0x176f75),{'verbose':_0x50b44e[_0x153e08(0x265)]}),_0x2bf115=[];for(const _0x50bd78 of _0x4ea177[_0x153e08(0x218)]){const _0x417cc3=_0x153e08(0x3cd)+_0x50bd78[_0x153e08(0x2a4)]()['replace'](/\s+/g,'_'),_0x47bcf6=_0x153e08(0x36d)+_0x1f55d2+'.'+_0x417cc3;let _0x47528b=[];try{const _0x16b4e6=await executeSchemaQuery(_0x47bcf6,_0x3cb6de,_0x50b44e);_0x47528b=_0x16b4e6[_0x153e08(0x218)]['map'](_0x26bee1=>({'name':_0x26bee1[_0x153e08(0x269)],'type':_0x26bee1[_0x153e08(0x1ef)]}));}catch{}_0x2bf115[_0x153e08(0x273)]({'table':_0x417cc3,'columns':_0x47528b});}return{'database':_0x1f55d2,'parent_segment':_0x5690d0,'parent_id':_0x176f75,'customers':{'table':_0x153e08(0x344),'columns':_0x15d051},'behaviors':_0x2bf115};}[a31_0x1949a9(0x28f)](_0x411d55){const _0x155c77=a31_0x1949a9,_0x48b53b=_0x57870f=>{const _0x6b554=a31_0x51b0;if(_0x57870f[_0x6b554(0x2d4)]===0x0)return'[]';const _0xb57200=_0x57870f['map'](_0x4a853c=>_0x6b554(0x2a8)+_0x4a853c[_0x6b554(0x21d)]+_0x6b554(0x3c4)+_0x4a853c['type']+'\x22\x20}');return'[\x0a'+_0xb57200['join'](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x530028=_0x411d55[_0x155c77(0x334)]['map'](_0x31e10d=>{const _0x281cdb=_0x155c77;return _0x281cdb(0x328)+_0x31e10d['table']+_0x281cdb(0x347)+_0x48b53b(_0x31e10d[_0x281cdb(0x335)])[_0x281cdb(0x275)](/^/gm,'\x20\x20')['trim']()+'\x0a\x20\x20\x20\x20}';})[_0x155c77(0x2fb)](',\x0a');return _0x155c77(0x388)+_0x411d55[_0x155c77(0x381)]+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x411d55[_0x155c77(0x304)]+_0x155c77(0x27b)+_0x411d55[_0x155c77(0x2b2)]+_0x155c77(0x370)+_0x411d55[_0x155c77(0x344)][_0x155c77(0x1dc)]+_0x155c77(0x2e2)+_0x48b53b(_0x411d55[_0x155c77(0x344)]['columns'])[_0x155c77(0x275)](/^/gm,'\x20\x20')[_0x155c77(0x30b)]()+_0x155c77(0x33b)+_0x530028+_0x155c77(0x2aa);}}export class ParentSegmentSQLCommand extends BaseCommand{['name']='segment:parent:sql';['description']=a31_0x1949a9(0x259);async[a31_0x1949a9(0x2fa)](_0x2fde9f){const _0x3659b8=a31_0x1949a9,{options:_0x36af69,args:_0x42ab51,tdx:_0x49bb32}=_0x2fde9f,_0x46dc05=_0x42ab51[0x0]||_0x36af69[_0x3659b8(0x246)];if(!_0x46dc05)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a'+_0x3659b8(0x3c2)),0x1;_0x36af69['verbose']&&(console[_0x3659b8(0x1ce)]('Site:\x20'+_0x36af69[_0x3659b8(0x1ed)]),console[_0x3659b8(0x1ce)](_0x3659b8(0x235)+_0x46dc05));const _0x2f9b48=await withSpinner(_0x3659b8(0x35c)+_0x46dc05+'\x27...',()=>_0x49bb32[_0x3659b8(0x2f0)]['resolveParentId'](_0x46dc05),{'verbose':_0x36af69['verbose']}),_0x2a8e6a=_0x2f9b48['data'],_0x5f3126=await withSpinner(_0x3659b8(0x3d2)+_0x46dc05+'\x27...',()=>_0x49bb32['segment'][_0x3659b8(0x323)](_0x2a8e6a),{'verbose':_0x36af69['verbose']}),_0x557dc8=_0x5f3126[_0x3659b8(0x218)];return _0x36af69[_0x3659b8(0x2ba)]==='json'||_0x36af69[_0x3659b8(0x2ba)]===_0x3659b8(0x315)?await handleSDKOutput([{'sql':_0x557dc8}],_0x36af69):console[_0x3659b8(0x36f)](_0x557dc8),0x0;}}function a31_0x5aa2(){const _0x5e5513=['ps:pz:delete','cyan','Updated','stageCount','start','Default','Found\x20YAML\x20file:\x20','single','Master:','keys','List\x20available\x20fields\x20for\x20segmentation','Show\x20personalization\x20service\x20details','token:','createToken','formatSchemaJson','json','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','elapsedTimeMillis','allowed\x20IPs:','\x20behaviors','⚡\x20Enabled','\x20Context\x20set:\x20','\x20rows)','\x20rows\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','Schema\x20saved\x20to\x20','page_view','deleteToken','addAttributes','createPersonalization','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','toFixed','keyEventId','toLowerCase','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','/attempt/','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','\x20personalization','\x0a\x20\x20]\x0a}\x0a','\x0a✔\x20Workflow\x20started','Errors:','stats','2932900OGYNMU','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Error:\x20Service\x20name\x20is\x20required','\x20is\x20already\x20up\x20to\x20date','parent_id','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','Enriched:','Options:\x0a','totalEvents','Options:','✔\x20Query\x20completed:\x20Processed\x20','dirname','format','id:\x20','RT\x202.0\x20Validate:','\x20--interval\x20','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','interval','✔\x20Updated\x20personalization\x20service\x20\x27','primaryKey','behavior','coveragePercent','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','workflowSessionId','ps:pz:show','ps:pz:service:token:create','\x20\x20\x20\x20\x20\x20\x20\x20','✔\x20Retrieved\x20RT\x20configuration\x20version','\x20--behavior\x20\x22','string','displayColumns','launched','ps:pz:service:update','Behaviors','segment:parent:run','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','information_schema','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','length','\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','/\x20and\x20','ps:pz:service:delete','allowedIps','enriched','Show\x20parent\x20segment\x20details','2257899koaRkg','.yml','split','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','Listing\x20RT\x20journeys\x20for\x20\x27','✔\x20Updated\x20personalization\x20\x27','\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','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','Resume\x20activations\x20in\x20an\x20RT\x20journey','✔\x20Created\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','Delete\x20a\x20realtime\x20personalization','\x27\x20for\x20service\x20\x27','schemaError','pauseJourney','tokens','Join:','customerPercent','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','\x20Configuration\x20is\x20valid','displayRealtimeInfo','segment','resumeJourney','\x20parent\x20segment','Deleting\x20personalization\x20\x27','\x20field','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','\x20tdx\x20wf\x20attempt\x20','Available\x20attributes:','updateParent','execute','join','output','segment:parent:create','filter','text','.customers)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','\x27\x20with\x20ID:\x20','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','parent_segment','👥\x20','\x20\x20\x20\x20\x20\x20','Creating','deletePersonalization','displayAttributesStats','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','trim','displayMasterInfo','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','\x20No\x20changes\x20-\x20','\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','✔\x20No\x20changes\x20-\x20\x27','sampleData','jsonl','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','SELECT\x20*\x20FROM\x20(\x0a','\x0aError:','\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','displayPreviewResults','/app/workflows/','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','keyEventId:','state','number','some','Fetching\x20behavior\x20list...','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','getParentSQL','List\x20parent\x20segments','Delete\x20a\x20personalization\x20service','segment:parent:validate','darwin','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','schemaValid','unref','getCurrentConfigVersion','repeat','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','Attribute:','file','YAML\x20file:\x20','\x20--behavior\x20\x22<name>\x22','Error\x20reading\x20file:\x20','dim','behaviors','columns','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','limit','\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','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Analyzing\x20changes...','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','segment:parent:preview','Master\x20+\x20Attributes','addAttributesFile','\x20Added\x20RT\x202.0\x20template\x20section','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','ps:pz:service:show','joinKey','✔\x20Found\x20personalization\x20\x27','customers','\x0a⚠️\x20\x20Both\x20','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','public:','List\x20personalization\x20services\x20for\x20a\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','Session:','getBehaviorNames','parent_segments','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','\x20\x20No\x20sample\x20data\x20available','\x20=\x20','Listing\x20parent\x20segments\x20matching\x20\x27','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Deleting\x20token\x20\x27','label','includeSensitive:','Created','type','\x20\x20\x20\x20-\x20','updatedAt','personalization','customerGroupFile','Resolving\x20parent\x20segment\x20\x27','segment:parent:show','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x20\x202.\x20Run\x20','getParentFull','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Audience\x20ID:','No\x20RT-enabled\x20parent\x20segments\x20found','message','rowCount','ID\x20Stitching:','eventKind:\x20','Master\x20Table','indexOf','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','No\x20RT\x20journeys\x20found','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','SELECT\x20*\x20FROM\x20','identifier','log','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','\x20\x20\x20','Aborted.','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','5CmzmSo','/app/dw/parentSegments/','timezone','\x20--attribute\x20\x22','getPersonalization','payload:','\x5c$&','pullParentYaml','/sessions/','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','paused','database','\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','\x20RT\x20journey','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','\x27...','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','✔\x20Found\x20','{\x0a\x20\x20\x22database\x22:\x20\x22','Coverage:','xdg-open','Get\x20current\x20RT\x20configuration\x20version\x20status','createParent','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','yes','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','Error:\x20--attribute\x20requires\x20a\x20name\x0a','486023IsfmGW','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','bold','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','Attributes:','\x27\x20is\x20up\x20to\x20date','relationships','attributes','workflowAttemptId','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x27\x20is\x20already\x20up\x20to\x20date','\x0aNew\x20parent\x20segment\x20\x27','7739217xDjmcB','Options\x20(one\x20required):\x0a','stop','all','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','✔\x20Updated\x20parent\x20segment\x20\x27','Personalization:','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','folderId','apply','toLocaleString','\x20parent\x20segment\x20\x27','8vJahCc','\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}','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','ps:pz:service:list','Error:\x20--behavior\x20requires\x20a\x20name\x0a','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','Apply\x20changes\x20to\x20\x27','.yaml','Validating\x20configuration...','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','events','foreignKey','run','segment:parent:pull','sections:','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','preview','tdx\x20ps\x20preview\x20','customersWithEvents','\x20total','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','ps:pz:list','status:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','\x22,\x20\x22type\x22:\x20\x22','ignore','\x20configured','Pattern:\x20','Fetching\x20customers\x20schema...','\x0aChanges\x20to\x20\x27','last_page_viewed','red','platform','behavior_','Error:','user_id','911408pXXCYs','3266067MWBvZd','Fetching\x20SQL\x20for\x20\x27','attribute','isDirectory','segment:parent:desc','ps:pz:patch','RT\x202.0:','\x0aNo\x20sample\x20data\x20available','audienceId:\x20','population','displayValidateResults','%)\x20','runParent','Source:','\x20\x20Columns:\x20','ps:pz:service:token:delete','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','error','-1d','Status:','✔\x20Created\x20personalization\x20\x27','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20(paused)','includeSensitive','Show\x20a\x20specific\x20realtime\x20personalization','scheduleType','entryCriteria','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','\x20service(s)\x20configured','public','table','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','enabled','resolveParentId','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','displaySampleData','\x20\x20Note:\x20','FINISHED','Validating\x20RT\x20configuration...','No\x20parent\x20segments\x20match\x20pattern:\x20','stringify','query','open','Customers:','value','Error:\x20--database\x20and\x20--table\x20are\x20required','site','status','column_type','Updating','\x20to\x20configure\x20your\x20personalization\x20service','previewParentYaml','Join\x20on:','allValid','folder-segment','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','keyEventCriteria','stitchingKeys','Attempt:','Listing\x20personalizations\x20for\x20\x27','Available\x20behaviors:','errors','web','payload','utf-8','Error:\x20Parent\x20segment\x20name\x20is\x20required','td_client_id','displayBehaviorsStats','any','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','Executing\x20parent\x20segment\x20query...','ps:rt:configuration_versions','reduce','green','✔\x20Deleted\x20personalization\x20service\x20\x27','\x20to\x20push\x20the\x20configuration','ps:rt:jn:resume','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','scheduleOption','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','My\x20Service','Preview:','sections','Fetching\x20parent\x20segment\x20\x27','Getting\x20personalization\x20\x27','✔\x20Created\x20token\x20\x27','\x20Added\x20personalization\x20template\x20to\x20','Update\x20a\x20realtime\x20personalization\x20entity','\x27\x20and\x20run\x20workflow?','data','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','Error:\x20Token\x20\x27','audienceId','✔\x20Renamed\x20directory\x20to\x20','name','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','\x20stage','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','Fetching\x20personalization\x20service\x20\x27','master','pushParentYaml','sourceTableValid','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','endsWith','parentFolder','\x20true','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','\x20RT\x20configuration\x20is\x20valid','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','\x20\x20\x20\x20','4TSZrgX','map','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','createdAt','idStitching','personalization_services','varchar','listParents','Parent\x20segment:\x20','Create\x20parent\x20segment\x20\x27','description','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Site:\x20','entryCriteria:','list','test','Listing\x20personalization\x20services\x20for\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','\x20\x201.\x20Edit\x20','use','Fetching\x20sample\x20data...','displayPreviewHints','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','/\x20directories\x20exist.','yellow','parentSegment','Events:','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','To\x20view\x20sample\x20data:','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','segment:parent:update','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','null','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','Attributes','no\x20tokens\x20configured','sourceTableError','matchedCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','customerGroup','match','validateParentYaml','Get\x20SQL\x20query\x20for\x20parent\x20segment','Table:\x20','sort','localeCompare','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','5842374yXJiKd','⚡\x20Not\x20enabled','\x0aUsage:\x20tdx\x20ps\x20preview\x20','ps:rt:list','personalizationServices','Error:\x20Service\x20ID\x20is\x20required','updated:','verbose','addBehaviors','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','Error:\x20--name\x20is\x20required','column_name','\x20--enriched','Error\x20parsing\x20YAML:\x20','Patching\x20personalization\x20\x27','`\x20to\x20download\x20the\x20configuration\x20first','displaySummary','realtime','create','Creating\x20token\x20\x27','Validate:','push','column','replace','collectSchema','✘\x20Failed\x20to\x20rename\x20directory:\x20','List\x20RT\x20journeys','jobId','Updating\x20personalization\x20service\x20\x27','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','workflowId','\x20[Job\x20ID:\x20','\x27\x20(id:\x20','ps:pz:create','(id:\x20'];a31_0x5aa2=function(){return _0x5e5513;};return a31_0x5aa2();}function a31_0x51b0(_0x22024e,_0x2b8881){_0x22024e=_0x22024e-0x1cb;const _0x5aa232=a31_0x5aa2();let _0x51b089=_0x5aa232[_0x22024e];return _0x51b089;}export class ParentSegmentShowCommand extends BaseCommand{['name']=a31_0x1949a9(0x35d);[a31_0x1949a9(0x237)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0x1949a9(0x2fa)](_0x598b95){const _0x1ecb7e=a31_0x1949a9,{options:_0x44d8d2,args:_0x33b0d5,tdx:_0x3f82ae}=_0x598b95,_0x26bec4=_0x33b0d5[0x0]||_0x44d8d2['parentSegment'];if(!_0x26bec4)return showParentSegmentNotSetError(_0x1ecb7e(0x30f)+_0x1ecb7e(0x229)),0x1;_0x44d8d2[_0x1ecb7e(0x265)]&&(console[_0x1ecb7e(0x1ce)](_0x1ecb7e(0x239)+_0x44d8d2[_0x1ecb7e(0x1ed)]),console[_0x1ecb7e(0x1ce)](_0x1ecb7e(0x235)+_0x26bec4));const _0x5ded67=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x26bec4+_0x1ecb7e(0x385),()=>_0x3f82ae['segment'][_0x1ecb7e(0x1e0)](_0x26bec4),{'verbose':_0x44d8d2[_0x1ecb7e(0x265)]}),_0xecb3ba=_0x5ded67[_0x1ecb7e(0x218)],_0xbf939b=await withSpinner(_0x1ecb7e(0x3d2)+_0x26bec4+'\x27...',()=>_0x3f82ae[_0x1ecb7e(0x2f0)][_0x1ecb7e(0x323)](_0xecb3ba),{'verbose':_0x44d8d2[_0x1ecb7e(0x265)]});let _0x2febe2=_0xbf939b[_0x1ecb7e(0x218)];const _0x390718=resolveLimit(_0x44d8d2[_0x1ecb7e(0x337)],DEFAULT_DISPLAY_LIMIT),_0xe81114=/\bLIMIT\s+\d+/i['test'](_0x2febe2);!_0xe81114&&(_0x2febe2=_0x2febe2[_0x1ecb7e(0x30b)]()[_0x1ecb7e(0x275)](/;+$/,''),_0x2febe2=_0x1ecb7e(0x317)+_0x2febe2+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x390718);_0x44d8d2[_0x1ecb7e(0x265)]&&console[_0x1ecb7e(0x1ce)]('SQL\x20query:\x0a'+_0x2febe2);const _0x296b0f=await withProgressSpinner(_0x1ecb7e(0x205),async _0x25d06f=>{const _0x30aee5=_0x1ecb7e,_0x472d3e=await _0x3f82ae[_0x30aee5(0x1e8)][_0x30aee5(0x2fa)](_0x2febe2,{'catalog':'td','schema':_0x30aee5(0x2d2),'onJobId':_0x486bca=>{_0x25d06f['setJobId'](_0x486bca);}});return _0x472d3e;},{'verbose':_0x44d8d2[_0x1ecb7e(0x265)]}),_0x38206c=_0x296b0f[_0x1ecb7e(0x218)],_0x3a5eb5=_0x38206c['jobId']?_0x1ecb7e(0x27d)+_0x38206c[_0x1ecb7e(0x279)]+']':'';return console[_0x1ecb7e(0x1ce)](_0x1ecb7e(0x2b8)+_0x38206c[_0x1ecb7e(0x2ad)]['processedRows'][_0x1ecb7e(0x3a8)]()+_0x1ecb7e(0x299)+('in\x20'+formatElapsed(_0x38206c[_0x1ecb7e(0x2ad)][_0x1ecb7e(0x293)])+_0x3a5eb5)),await handleQueryOutput(_0x38206c,_0x44d8d2),0x0;}}export class PSRtListCommand extends BaseCommand{['name']=a31_0x1949a9(0x261);[a31_0x1949a9(0x237)]='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a31_0x1949a9(0x2fa)](_0x3c4ffa){const _0x1c95fb=a31_0x1949a9,{options:_0x29f2f4,args:_0x1340da,tdx:_0x4bcb21}=_0x3c4ffa,_0x12fe55=_0x1340da[0x0],_0x4e73c0=await withSpinner(_0x12fe55?_0x1c95fb(0x2f6)+_0x12fe55+_0x1c95fb(0x385):'Listing\x20RT-enabled\x20parent\x20segments...',()=>_0x4bcb21[_0x1c95fb(0x26f)][_0x1c95fb(0x23b)](),{'verbose':_0x29f2f4[_0x1c95fb(0x265)]});let _0x2f7b59=_0x4e73c0['data'][_0x1c95fb(0x2fe)](_0x5e646f=>_0x5e646f['realtime_enabled']);if(_0x12fe55){const _0x2d8f6c=_0x12fe55[_0x1c95fb(0x275)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x1c95fb(0x275)](/\?/g,'.'),_0x3b12a6=new RegExp('^'+_0x2d8f6c+'$','i');_0x2f7b59=_0x2f7b59[_0x1c95fb(0x2fe)](_0x1ea34e=>_0x3b12a6['test'](_0x1ea34e[_0x1c95fb(0x21d)]));}_0x2f7b59[_0x1c95fb(0x25b)]((_0x5eb078,_0x19e162)=>_0x5eb078[_0x1c95fb(0x21d)][_0x1c95fb(0x25c)](_0x19e162[_0x1c95fb(0x21d)])),console[_0x1c95fb(0x1ce)](_0x1c95fb(0x387)+_0x2f7b59[_0x1c95fb(0x2d4)]+'\x20RT-enabled\x20parent\x20segment'+(_0x2f7b59[_0x1c95fb(0x2d4)]!==0x1?'s':''));const _0x341b09=_0x4a79ac=>{const _0x4cdbb5=_0x1c95fb;return getConsoleNextUrl(_0x29f2f4[_0x4cdbb5(0x1ed)],_0x4cdbb5(0x375)+_0x4a79ac);};if(_0x29f2f4['format']===_0x1c95fb(0x290)||_0x29f2f4[_0x1c95fb(0x2ba)]===_0x1c95fb(0x315)){const _0x43bc4d=_0x2f7b59[_0x1c95fb(0x22e)](_0x206890=>({..._0x206890,'url':_0x341b09(_0x206890['id'])}));await handleSDKOutput(_0x43bc4d,_0x29f2f4);}else{if(_0x2f7b59['length']===0x0)console[_0x1c95fb(0x36f)](_0x1c95fb(0x363));else for(const _0x47d117 of _0x2f7b59){const _0x208300=_0x47d117[_0x1c95fb(0x3da)]?a31_0x5cfd3b[_0x1c95fb(0x333)]('\x20('+formatRows(_0x47d117[_0x1c95fb(0x3da)])+')'):'',_0x482799=hyperlink(_0x47d117[_0x1c95fb(0x21d)],_0x341b09(_0x47d117['id']));console[_0x1c95fb(0x36f)]('⚡\x20'+_0x482799+_0x208300);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x1949a9(0x21d)]='ps:rt:validate';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x361);async[a31_0x1949a9(0x2fa)](_0x2a3297){const _0x51d72f=a31_0x1949a9,{options:_0x11cb5a,args:_0x31c56a,tdx:_0x50874b}=_0x2a3297,_0x5499f7=_0x31c56a[0x0]||_0x11cb5a[_0x51d72f(0x246)];if(!_0x5499f7)return showParentSegmentNotSetError(_0x51d72f(0x36a)+_0x51d72f(0x312)),0x1;const _0x2d5765=resolveYamlFile(_0x5499f7);if(!existsSync(_0x2d5765))return showFileNotFoundError(_0x2d5765,_0x5499f7),0x1;let _0x320c88;try{_0x320c88=readFileSync(_0x2d5765,_0x51d72f(0x1ff));}catch(_0x2f76d4){const _0x3ccdaa=_0x2f76d4 instanceof Error?_0x2f76d4[_0x51d72f(0x364)]:String(_0x2f76d4);return console['error'](_0x51d72f(0x332)+_0x3ccdaa),0x1;}const _0x16b2c4=createCommandSpinner(a31_0x5cfd3b[_0x51d72f(0x333)](_0x51d72f(0x1e5)),{'verbose':_0x11cb5a[_0x51d72f(0x265)]});_0x16b2c4[_0x51d72f(0x285)]();const _0x3b2989={'realtime':!![],'onProgress':_0xf02140=>{const _0xafc70a=_0x51d72f;_0x16b2c4[_0xafc70a(0x2ff)]=formatProgressMessage(_0xf02140);}};let _0x404e7e;try{_0x404e7e=await _0x50874b[_0x51d72f(0x2f0)][_0x51d72f(0x258)](_0x320c88,_0x3b2989),_0x16b2c4[_0x51d72f(0x3a0)]();}catch(_0x48938e){_0x16b2c4[_0x51d72f(0x3a0)]();throw _0x48938e;}console[_0x51d72f(0x1ce)]('\x0a'+a31_0x5cfd3b[_0x51d72f(0x393)](_0x51d72f(0x2bc))+'\x20'+_0x404e7e['name']),console['error']('═'[_0x51d72f(0x32c)](0x3c)),displayRealtimeValidation(_0x404e7e),console[_0x51d72f(0x1ce)]('─'['repeat'](0x3c));if(_0x404e7e[_0x51d72f(0x1fc)][_0x51d72f(0x2d4)]>0x0){console[_0x51d72f(0x1ce)]('\x0a'+a31_0x5cfd3b['red'](_0x51d72f(0x2ac)));for(const _0x1f8c15 of _0x404e7e[_0x51d72f(0x1fc)]){console['error']('\x20\x20'+a31_0x5cfd3b['red']('•')+'\x20'+_0x1f8c15);}}return _0x404e7e[_0x51d72f(0x1f4)]&&console[_0x51d72f(0x1ce)]('\x0a'+a31_0x5cfd3b['green']('✔')+_0x51d72f(0x22a)),_0x404e7e[_0x51d72f(0x1f4)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a31_0x1949a9(0x21d)]='ps:rt:jn:list';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x278);async[a31_0x1949a9(0x2fa)](_0x5d1b4a){const _0x13a7a3=a31_0x1949a9,{options:_0x874a88,args:_0x3ddd49,tdx:_0x11ea0a}=_0x5d1b4a,_0x2432a5=_0x3ddd49[0x0]||_0x874a88[_0x13a7a3(0x246)];if(!_0x2432a5)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'+_0x13a7a3(0x319)),0x1;_0x874a88['verbose']&&(console[_0x13a7a3(0x1ce)](_0x13a7a3(0x239)+_0x874a88['site']),console['error'](_0x13a7a3(0x235)+_0x2432a5));const _0x9dd1e8=await withSpinner(_0x13a7a3(0x35c)+_0x2432a5+_0x13a7a3(0x385),()=>_0x11ea0a['segment'][_0x13a7a3(0x1e0)](_0x2432a5),{'verbose':_0x874a88['verbose']}),_0x47a0e6=_0x9dd1e8['data'],_0x15e3b9=await withSpinner(_0x13a7a3(0x2df)+_0x2432a5+_0x13a7a3(0x385),()=>_0x11ea0a[_0x13a7a3(0x26f)]['listJourneys'](_0x47a0e6),{'verbose':_0x874a88[_0x13a7a3(0x265)]}),_0x260679=_0x15e3b9[_0x13a7a3(0x218)];console[_0x13a7a3(0x1ce)]('✔\x20Found\x20'+_0x260679[_0x13a7a3(0x2d4)]+_0x13a7a3(0x383)+(_0x260679['length']!==0x1?'s':''));if(_0x874a88[_0x13a7a3(0x2ba)]===_0x13a7a3(0x290)||_0x874a88[_0x13a7a3(0x2ba)]===_0x13a7a3(0x315))await handleSDKOutput(_0x260679,_0x874a88);else{if(_0x260679['length']===0x0)console['log'](_0x13a7a3(0x36b));else for(const _0x3e297a of _0x260679){const _0x22851e=_0x3e297a['state']===_0x13a7a3(0x2cd)?'🚀':'📝',_0x126828=_0x3e297a['paused']?a31_0x5cfd3b[_0x13a7a3(0x245)](_0x13a7a3(0x1d3)):'',_0x19d603=a31_0x5cfd3b[_0x13a7a3(0x333)]('\x20('+_0x3e297a['stageCount']+_0x13a7a3(0x21f)+(_0x3e297a[_0x13a7a3(0x284)]!==0x1?'s':'')+')');console['log'](_0x22851e+'\x20'+_0x3e297a[_0x13a7a3(0x21d)]+_0x126828+_0x19d603);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x1949a9(0x21d)]='ps:rt:jn:pause';[a31_0x1949a9(0x237)]='Pause\x20activations\x20in\x20an\x20RT\x20journey';async['execute'](_0x119859){const _0x33604b=a31_0x1949a9,{options:_0x409cf0,args:_0x1234b7,tdx:_0x50e932}=_0x119859,_0x4581b9=_0x1234b7[0x0];if(!_0x4581b9)return console[_0x33604b(0x1ce)](a31_0x5cfd3b['red'](_0x33604b(0x1e1))),console[_0x33604b(0x1ce)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console[_0x33604b(0x1ce)](a31_0x5cfd3b[_0x33604b(0x333)](_0x33604b(0x303))),0x1;_0x409cf0['verbose']&&(console['error']('Site:\x20'+_0x409cf0[_0x33604b(0x1ed)]),console['error']('RT\x20Journey\x20ID:\x20'+_0x4581b9));const _0x161d2f=await withSpinner(_0x33604b(0x1dd)+_0x4581b9+_0x33604b(0x385),()=>_0x50e932['realtime'][_0x33604b(0x2e9)](_0x4581b9),{'verbose':_0x409cf0[_0x33604b(0x265)]}),_0x1f4cc1=_0x161d2f[_0x33604b(0x218)];console[_0x33604b(0x1ce)](_0x33604b(0x39a)+_0x1f4cc1[_0x33604b(0x21d)]+'\x27');if(_0x409cf0[_0x33604b(0x2ba)]===_0x33604b(0x290)||_0x409cf0[_0x33604b(0x2ba)]===_0x33604b(0x315))await handleSDKOutput([_0x1f4cc1],_0x409cf0);else{const _0x194e40=_0x1f4cc1[_0x33604b(0x31e)]===_0x33604b(0x2cd)?'🚀':'📝',_0x50a781=_0x1f4cc1['paused']?a31_0x5cfd3b[_0x33604b(0x245)](_0x33604b(0x1d3)):'';console[_0x33604b(0x36f)](_0x194e40+'\x20'+_0x1f4cc1[_0x33604b(0x21d)]+_0x50a781);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x20b);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x2e3);async[a31_0x1949a9(0x2fa)](_0x3850a1){const _0x44d756=a31_0x1949a9,{options:_0x163422,args:_0x350af7,tdx:_0x43d54d}=_0x3850a1,_0x46047d=_0x350af7[0x0];if(!_0x46047d)return console[_0x44d756(0x1ce)](a31_0x5cfd3b[_0x44d756(0x3cb)](_0x44d756(0x1e1))),console[_0x44d756(0x1ce)](_0x44d756(0x322)),console[_0x44d756(0x1ce)](a31_0x5cfd3b['dim']('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x163422[_0x44d756(0x265)]&&(console[_0x44d756(0x1ce)]('Site:\x20'+_0x163422['site']),console[_0x44d756(0x1ce)]('RT\x20Journey\x20ID:\x20'+_0x46047d));const _0x1435df=await withSpinner(_0x44d756(0x2d1)+_0x46047d+'\x27...',()=>_0x43d54d[_0x44d756(0x26f)][_0x44d756(0x2f1)](_0x46047d),{'verbose':_0x163422[_0x44d756(0x265)]}),_0x4a942a=_0x1435df[_0x44d756(0x218)];console[_0x44d756(0x1ce)](_0x44d756(0x3af)+_0x4a942a['name']+'\x27');if(_0x163422[_0x44d756(0x2ba)]===_0x44d756(0x290)||_0x163422[_0x44d756(0x2ba)]===_0x44d756(0x315))await handleSDKOutput([_0x4a942a],_0x163422);else{const _0x3fbe4f=_0x4a942a[_0x44d756(0x31e)]===_0x44d756(0x2cd)?'🚀':'📝',_0x3a5068=_0x4a942a[_0x44d756(0x380)]?a31_0x5cfd3b[_0x44d756(0x245)]('\x20(paused)'):'';console['log'](_0x3fbe4f+'\x20'+_0x4a942a['name']+_0x3a5068);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x206);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x38b);async[a31_0x1949a9(0x2fa)](_0x9f16ce){const _0x4943b9=a31_0x1949a9,{options:_0x1509f1,args:_0x114c36,tdx:_0x2bba07}=_0x9f16ce,_0x39b9f5=_0x114c36[0x0]||_0x1509f1[_0x4943b9(0x246)];if(!_0x39b9f5)return showParentSegmentNotSetError(_0x4943b9(0x34a)+_0x4943b9(0x2e1)),0x1;_0x1509f1[_0x4943b9(0x265)]&&(console[_0x4943b9(0x1ce)]('Site:\x20'+_0x1509f1[_0x4943b9(0x1ed)]),console[_0x4943b9(0x1ce)](_0x4943b9(0x235)+_0x39b9f5));const _0x363b96=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x39b9f5+_0x4943b9(0x385),()=>_0x2bba07[_0x4943b9(0x2f0)]['resolveParentId'](_0x39b9f5),{'verbose':_0x1509f1['verbose']}),_0x4ed04f=_0x363b96[_0x4943b9(0x218)],_0x1f3a4a=await withSpinner(_0x4943b9(0x37e)+_0x39b9f5+_0x4943b9(0x385),()=>_0x2bba07[_0x4943b9(0x26f)][_0x4943b9(0x32b)](_0x4ed04f),{'verbose':_0x1509f1[_0x4943b9(0x265)]}),_0x247f89=_0x1f3a4a[_0x4943b9(0x218)];return console[_0x4943b9(0x1ce)](_0x4943b9(0x2c9)),_0x1509f1[_0x4943b9(0x2ba)]===_0x4943b9(0x290)||_0x1509f1[_0x4943b9(0x2ba)]===_0x4943b9(0x315)?await handleSDKOutput([_0x247f89],_0x1509f1):(console['log'](_0x4943b9(0x2bb)+_0x247f89['id']),console[_0x4943b9(0x36f)](_0x4943b9(0x3d9)+_0x247f89[_0x4943b9(0x21b)]),console['log']('identifier:\x20'+_0x247f89[_0x4943b9(0x36e)]),console[_0x4943b9(0x36f)](_0x4943b9(0x367)+_0x247f89['eventKind']),console['log'](_0x4943b9(0x3c1)+_0x247f89[_0x4943b9(0x1ee)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x3ad);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x349);async['execute'](_0x783b42){const _0x3a41cc=a31_0x1949a9,{options:_0x329a99,args:_0x294bbe,tdx:_0x30cf2c}=_0x783b42,_0x51987e=_0x294bbe[0x0]||_0x329a99[_0x3a41cc(0x246)];if(!_0x51987e)return showParentSegmentNotSetError(_0x3a41cc(0x1f6)+_0x3a41cc(0x338)),0x1;const _0x41b685=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x51987e+_0x3a41cc(0x385),()=>_0x30cf2c[_0x3a41cc(0x2f0)][_0x3a41cc(0x1e0)](_0x51987e),{'verbose':_0x329a99[_0x3a41cc(0x265)]}),_0x2139c8=_0x41b685[_0x3a41cc(0x218)],_0x436cd1=await withSpinner(_0x3a41cc(0x23d)+_0x51987e+'\x27...',()=>_0x30cf2c[_0x3a41cc(0x35a)][_0x3a41cc(0x23b)](_0x2139c8),{'verbose':_0x329a99[_0x3a41cc(0x265)]}),_0x9aa2a1=_0x436cd1[_0x3a41cc(0x218)];console[_0x3a41cc(0x1ce)]('✔\x20Found\x20'+_0x9aa2a1['length']+'\x20personalization\x20service'+(_0x9aa2a1[_0x3a41cc(0x2d4)]!==0x1?'s':''));if(_0x329a99[_0x3a41cc(0x2ba)]===_0x3a41cc(0x290)||_0x329a99[_0x3a41cc(0x2ba)]===_0x3a41cc(0x315))await handleSDKOutput(_0x9aa2a1,_0x329a99);else{if(_0x9aa2a1[_0x3a41cc(0x2d4)]===0x0)console[_0x3a41cc(0x36f)]('No\x20personalization\x20services\x20configured'),console[_0x3a41cc(0x1ce)](a31_0x5cfd3b[_0x3a41cc(0x282)]('\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML'));else for(const _0x80b67 of _0x9aa2a1){console['log'](a31_0x5cfd3b[_0x3a41cc(0x393)](_0x80b67[_0x3a41cc(0x21d)])+'\x20'+a31_0x5cfd3b['dim']('(id:\x20'+_0x80b67['id']+')'));_0x80b67[_0x3a41cc(0x237)]&&console[_0x3a41cc(0x36f)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x80b67[_0x3a41cc(0x237)]));if(_0x80b67['tokens']&&_0x80b67[_0x3a41cc(0x2ea)][_0x3a41cc(0x2d4)]>0x0)for(const _0x209f53 of _0x80b67[_0x3a41cc(0x2ea)]){const _0x2a186a=_0x209f53[_0x3a41cc(0x2d8)]?.['length']?_0x209f53[_0x3a41cc(0x2d8)][_0x3a41cc(0x2fb)](',\x20'):_0x3a41cc(0x203);console['log']('\x20\x20'+a31_0x5cfd3b[_0x3a41cc(0x282)](_0x3a41cc(0x28d))+'\x20'+_0x209f53[_0x3a41cc(0x21d)]+'\x20'+a31_0x5cfd3b[_0x3a41cc(0x333)](_0x3a41cc(0x280)+_0x209f53['id']+')')),console[_0x3a41cc(0x36f)](_0x3a41cc(0x22c)+a31_0x5cfd3b[_0x3a41cc(0x333)](_0x3a41cc(0x294))+'\x20'+_0x2a186a);}else console['log']('\x20\x20'+a31_0x5cfd3b[_0x3a41cc(0x333)](_0x3a41cc(0x252)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']='ps:pz:service:create';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x3c3);async[a31_0x1949a9(0x2fa)](_0x2ddfae){const _0x3fe513=a31_0x1949a9,{options:_0x587caa,args:_0x135757,tdx:_0x3a2b6c}=_0x2ddfae,_0x51b485=_0x587caa,_0x3b57b0=_0x135757[0x0],_0x57c1dc=_0x135757[0x1]||_0x587caa[_0x3fe513(0x246)];if(!_0x3b57b0)return console[_0x3fe513(0x1ce)](_0x3fe513(0x2b0)),console[_0x3fe513(0x1ce)](_0x3fe513(0x336)),console[_0x3fe513(0x1ce)](_0x3fe513(0x34e)),0x1;if(!_0x57c1dc)return showParentSegmentNotSetError(_0x3fe513(0x3a2)+_0x3fe513(0x34e)),0x1;const _0x58a757=await withSpinner(_0x3fe513(0x35c)+_0x57c1dc+_0x3fe513(0x385),()=>_0x3a2b6c[_0x3fe513(0x2f0)][_0x3fe513(0x1e0)](_0x57c1dc),{'verbose':_0x587caa[_0x3fe513(0x265)]}),_0x2a7f51=_0x58a757[_0x3fe513(0x218)],_0x1a44b8={'name':_0x3b57b0,'description':_0x51b485[_0x3fe513(0x237)],'public':_0x51b485[_0x3fe513(0x1db)]},_0x6819a8=await withSpinner('Creating\x20personalization\x20service\x20\x27'+_0x3b57b0+_0x3fe513(0x385),()=>_0x3a2b6c[_0x3fe513(0x35a)][_0x3fe513(0x270)](_0x2a7f51,_0x1a44b8),{'verbose':_0x587caa[_0x3fe513(0x265)]}),_0x152de2=_0x6819a8[_0x3fe513(0x218)];return console[_0x3fe513(0x1ce)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0x152de2[_0x3fe513(0x21d)]+_0x3fe513(0x302)+_0x152de2['id']),await handleSDKOutput([_0x152de2],_0x587caa),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x341);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x28c);async[a31_0x1949a9(0x2fa)](_0x457b18){const _0x4d7a53=a31_0x1949a9,{options:_0x3d406d,args:_0x3c2112,tdx:_0x58af15}=_0x457b18,_0x9b89e9=_0x3c2112[0x0],_0x36d168=_0x3c2112[0x1]||_0x3d406d['parentSegment'];if(!_0x9b89e9)return console['error'](_0x4d7a53(0x263)),console[_0x4d7a53(0x1ce)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console['error'](_0x4d7a53(0x225)),0x1;if(!_0x36d168)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x28f635=await withSpinner(_0x4d7a53(0x35c)+_0x36d168+_0x4d7a53(0x385),()=>_0x58af15[_0x4d7a53(0x2f0)][_0x4d7a53(0x1e0)](_0x36d168),{'verbose':_0x3d406d['verbose']}),_0x410c3b=_0x28f635[_0x4d7a53(0x218)],_0x4c5713=await withSpinner(_0x4d7a53(0x221)+_0x9b89e9+_0x4d7a53(0x385),()=>_0x58af15[_0x4d7a53(0x35a)]['get'](_0x410c3b,_0x9b89e9),{'verbose':_0x3d406d['verbose']}),_0x2f1429=_0x4c5713[_0x4d7a53(0x218)];if(_0x3d406d[_0x4d7a53(0x290)]||_0x3d406d[_0x4d7a53(0x315)])await handleSDKOutput([_0x2f1429],_0x3d406d);else{console[_0x4d7a53(0x36f)](a31_0x5cfd3b[_0x4d7a53(0x393)](_0x2f1429[_0x4d7a53(0x21d)])+'\x20'+a31_0x5cfd3b[_0x4d7a53(0x333)](_0x4d7a53(0x280)+_0x2f1429['id']+')'));_0x2f1429[_0x4d7a53(0x237)]&&console[_0x4d7a53(0x36f)]('\x20\x20'+a31_0x5cfd3b['dim'](_0x2f1429[_0x4d7a53(0x237)]));console[_0x4d7a53(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x4d7a53(0x282)](_0x4d7a53(0x348))+'\x20'+(_0x2f1429[_0x4d7a53(0x1db)]?_0x4d7a53(0x38e):'no'));if(_0x2f1429[_0x4d7a53(0x2ea)]&&_0x2f1429['tokens']['length']>0x0)for(const _0x197237 of _0x2f1429[_0x4d7a53(0x2ea)]){const _0x4548bf=_0x197237[_0x4d7a53(0x2d8)]?.[_0x4d7a53(0x2d4)]?_0x197237[_0x4d7a53(0x2d8)][_0x4d7a53(0x2fb)](',\x20'):_0x4d7a53(0x203);console[_0x4d7a53(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x4d7a53(0x282)](_0x4d7a53(0x28d))+'\x20'+_0x197237['name']+'\x20'+a31_0x5cfd3b[_0x4d7a53(0x333)]('(id:\x20'+_0x197237['id']+')')),console[_0x4d7a53(0x36f)](_0x4d7a53(0x22c)+a31_0x5cfd3b[_0x4d7a53(0x333)](_0x4d7a53(0x294))+'\x20'+_0x4548bf);}else console[_0x4d7a53(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x4d7a53(0x333)]('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x2d7);['description']=a31_0x1949a9(0x325);async[a31_0x1949a9(0x2fa)](_0x43fcf8){const _0x4ec101=a31_0x1949a9,{options:_0x1fcf0f,args:_0x134dfc,tdx:_0x59ee76}=_0x43fcf8,_0x346d33=_0x134dfc[0x0],_0x3fadd2=_0x134dfc[0x1]||_0x1fcf0f[_0x4ec101(0x246)];if(!_0x346d33)return console[_0x4ec101(0x1ce)](_0x4ec101(0x263)),console[_0x4ec101(0x1ce)](_0x4ec101(0x23e)),console[_0x4ec101(0x1ce)](_0x4ec101(0x36c)),0x1;if(!_0x3fadd2)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a'+_0x4ec101(0x36c)),0x1;const _0x4e5efc=await withSpinner(_0x4ec101(0x35c)+_0x3fadd2+_0x4ec101(0x385),()=>_0x59ee76['segment'][_0x4ec101(0x1e0)](_0x3fadd2),{'verbose':_0x1fcf0f[_0x4ec101(0x265)]}),_0x316f9f=_0x4e5efc['data'];return await withSpinner('Deleting\x20personalization\x20service\x20\x27'+_0x346d33+_0x4ec101(0x385),()=>_0x59ee76[_0x4ec101(0x35a)]['delete'](_0x316f9f,_0x346d33),{'verbose':_0x1fcf0f[_0x4ec101(0x265)]}),console['error'](_0x4ec101(0x209)+_0x346d33+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x2ce);['description']='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async[a31_0x1949a9(0x2fa)](_0x42159c){const _0x27d78c=a31_0x1949a9,{options:_0x1c8fd9,args:_0x3072ee,tdx:_0x59bea4}=_0x42159c,_0x136361=_0x1c8fd9,_0x14be20=_0x3072ee[0x0],_0x53c54d=_0x3072ee[0x1]||_0x1c8fd9[_0x27d78c(0x246)];if(!_0x14be20)return console['error'](_0x27d78c(0x263)),console['error'](_0x27d78c(0x386)),console['error'](_0x27d78c(0x25d)),0x1;if(!_0x136361[_0x27d78c(0x21d)])return console[_0x27d78c(0x1ce)](_0x27d78c(0x268)),console[_0x27d78c(0x1ce)](_0x27d78c(0x386)),0x1;if(!_0x53c54d)return showParentSegmentNotSetError(_0x27d78c(0x2de)+_0x27d78c(0x25d)),0x1;const _0x21907b=await withSpinner(_0x27d78c(0x35c)+_0x53c54d+'\x27...',()=>_0x59bea4[_0x27d78c(0x2f0)][_0x27d78c(0x1e0)](_0x53c54d),{'verbose':_0x1c8fd9[_0x27d78c(0x265)]}),_0x1da0d8=_0x21907b[_0x27d78c(0x218)],_0x53d62e={'name':_0x136361[_0x27d78c(0x21d)]};_0x136361['description']!==undefined&&(_0x53d62e[_0x27d78c(0x237)]=_0x136361[_0x27d78c(0x237)]);const _0x179989=await withSpinner(_0x27d78c(0x27a)+_0x14be20+_0x27d78c(0x385),()=>_0x59bea4[_0x27d78c(0x35a)]['patch'](_0x1da0d8,_0x14be20,_0x53d62e),{'verbose':_0x1c8fd9['verbose']}),_0x197703=_0x179989['data'];return console[_0x27d78c(0x1ce)](_0x27d78c(0x2c0)+_0x197703[_0x27d78c(0x21d)]+'\x27'),await handleSDKOutput([_0x197703],_0x1c8fd9),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x2c7);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x220);async[a31_0x1949a9(0x2fa)](_0x5d1856){const _0x4cd844=a31_0x1949a9,{options:_0x5d4620,args:_0x52fb8d,tdx:_0x3d9b90}=_0x5d1856,_0x591917=_0x5d4620,_0x172b10=_0x52fb8d[0x0],_0x45913b=_0x52fb8d[0x1],_0x37268d=_0x52fb8d[0x2]||_0x5d4620[_0x4cd844(0x246)];if(!_0x172b10)return console[_0x4cd844(0x1ce)]('Error:\x20Token\x20name\x20is\x20required'),console[_0x4cd844(0x1ce)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x4cd844(0x1ce)](_0x4cd844(0x301)),0x1;if(!_0x45913b)return console[_0x4cd844(0x1ce)](_0x4cd844(0x263)),console[_0x4cd844(0x1ce)](_0x4cd844(0x1d8)),console[_0x4cd844(0x1ce)](_0x4cd844(0x301)),0x1;if(!_0x37268d)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x1d0bc=await withSpinner(_0x4cd844(0x35c)+_0x37268d+_0x4cd844(0x385),()=>_0x3d9b90[_0x4cd844(0x2f0)][_0x4cd844(0x1e0)](_0x37268d),{'verbose':_0x5d4620[_0x4cd844(0x265)]}),_0x43b538=_0x1d0bc[_0x4cd844(0x218)],_0x5dc8bc={'name':_0x172b10};_0x591917[_0x4cd844(0x2d8)]&&(_0x5dc8bc[_0x4cd844(0x2d8)]=_0x591917[_0x4cd844(0x2d8)][_0x4cd844(0x2dd)](',')[_0x4cd844(0x22e)](_0x321815=>_0x321815[_0x4cd844(0x30b)]()));_0x591917[_0x4cd844(0x237)]&&(_0x5dc8bc[_0x4cd844(0x237)]=_0x591917[_0x4cd844(0x237)]);const _0x53ca0b=await withSpinner(_0x4cd844(0x271)+_0x172b10+_0x4cd844(0x2e7)+_0x45913b+_0x4cd844(0x385),()=>_0x3d9b90[_0x4cd844(0x35a)][_0x4cd844(0x28e)](_0x43b538,_0x45913b,_0x5dc8bc),{'verbose':_0x5d4620[_0x4cd844(0x265)]}),_0x192e50=_0x53ca0b['data'];return console[_0x4cd844(0x1ce)](_0x4cd844(0x214)+_0x192e50['name']+_0x4cd844(0x302)+_0x192e50['id']),_0x192e50[_0x4cd844(0x1eb)]&&(console['error'](a31_0x5cfd3b[_0x4cd844(0x245)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0x4cd844(0x1ce)](a31_0x5cfd3b['cyan'](_0x192e50[_0x4cd844(0x1eb)])),console['error']('')),await handleSDKOutput([_0x192e50],_0x5d4620),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x1cc);[a31_0x1949a9(0x237)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async['execute'](_0x49b409){const _0x2fe742=a31_0x1949a9,{options:_0x5cbb37,args:_0x52d4e9,tdx:_0x271795}=_0x49b409,_0x29aacc=_0x52d4e9[0x0],_0x322c77=_0x52d4e9[0x1]||_0x5cbb37[_0x2fe742(0x246)];if(!_0x29aacc)return console[_0x2fe742(0x1ce)]('Error:\x20Token\x20ID\x20is\x20required'),console[_0x2fe742(0x1ce)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console[_0x2fe742(0x1ce)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x322c77)return showParentSegmentNotSetError(_0x2fe742(0x1de)+_0x2fe742(0x267)),0x1;const _0x3ab01a=await withSpinner(_0x2fe742(0x35c)+_0x322c77+_0x2fe742(0x385),()=>_0x271795[_0x2fe742(0x2f0)][_0x2fe742(0x1e0)](_0x322c77),{'verbose':_0x5cbb37[_0x2fe742(0x265)]}),_0x32d77f=_0x3ab01a[_0x2fe742(0x218)],_0x2bf21b=await withSpinner('Finding\x20service\x20for\x20token...',()=>_0x271795[_0x2fe742(0x35a)][_0x2fe742(0x23b)](_0x32d77f),{'verbose':_0x5cbb37[_0x2fe742(0x265)]}),_0x452962=_0x2bf21b[_0x2fe742(0x218)];let _0xa5fc3b;for(const _0x4783b2 of _0x452962){if(_0x4783b2[_0x2fe742(0x2ea)]?.[_0x2fe742(0x320)](_0x40a04b=>_0x40a04b['id']===_0x29aacc)){_0xa5fc3b=_0x4783b2['id'];break;}}if(!_0xa5fc3b)return console[_0x2fe742(0x1ce)](_0x2fe742(0x21a)+_0x29aacc+_0x2fe742(0x3bf)),0x1;const _0x43ddf1=await withSpinner(_0x2fe742(0x353)+_0x29aacc+'\x27...',()=>_0x271795[_0x2fe742(0x35a)][_0x2fe742(0x29d)](_0x32d77f,_0xa5fc3b,_0x29aacc),{'verbose':_0x5cbb37[_0x2fe742(0x265)]}),_0x1c6435=_0x43ddf1[_0x2fe742(0x218)];return console[_0x2fe742(0x1ce)]('✔\x20Deleted\x20token\x20\x27'+(_0x1c6435['name']||_0x29aacc)+'\x27'),await handleSDKOutput([_0x1c6435],_0x5cbb37),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x3c0);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x35e);async[a31_0x1949a9(0x2fa)](_0x1e5e13){const _0x365942=a31_0x1949a9,{options:_0x1682f4,args:_0x3b86b1,tdx:_0x581e67}=_0x1e5e13,_0x4ca5dc=_0x3b86b1[0x0]||_0x1682f4[_0x365942(0x246)];if(!_0x4ca5dc)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20(requires\x20context)\x0a'+'\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'),0x1;const _0x2e50a5=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x4ca5dc+_0x365942(0x385),()=>_0x581e67['segment'][_0x365942(0x1e0)](_0x4ca5dc),{'verbose':_0x1682f4['verbose']}),_0x4d06b3=_0x2e50a5['data'],_0x5b2fb9=await withSpinner(_0x365942(0x1fa)+_0x4ca5dc+_0x365942(0x385),()=>_0x581e67[_0x365942(0x35a)]['listPersonalizations'](_0x4d06b3),{'verbose':_0x1682f4['verbose']}),_0x5ea664=_0x5b2fb9[_0x365942(0x218)];console[_0x365942(0x1ce)](_0x365942(0x387)+_0x5ea664[_0x365942(0x2d4)]+_0x365942(0x2a9)+(_0x5ea664[_0x365942(0x2d4)]!==0x1?'s':''));if(_0x1682f4[_0x365942(0x2ba)]===_0x365942(0x290)||_0x1682f4[_0x365942(0x2ba)]===_0x365942(0x315))await handleSDKOutput(_0x5ea664,_0x1682f4);else{if(_0x5ea664['length']===0x0)console[_0x365942(0x36f)]('No\x20personalizations\x20configured');else for(const _0xe20610 of _0x5ea664){console[_0x365942(0x36f)](a31_0x5cfd3b[_0x365942(0x393)](_0xe20610[_0x365942(0x21d)])+'\x20'+a31_0x5cfd3b[_0x365942(0x333)](_0x365942(0x280)+_0xe20610['id']+')'));_0xe20610[_0x365942(0x237)]&&console[_0x365942(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x365942(0x333)](_0xe20610[_0x365942(0x237)]));const _0x2a9466=_0xe20610['sections']?.[_0x365942(0x2d4)]||0x0;console[_0x365942(0x36f)]('\x20\x20'+a31_0x5cfd3b['cyan'](_0x365942(0x3b9))+'\x20'+_0x2a9466);if(_0xe20610[_0x365942(0x211)]&&_0xe20610['sections'][_0x365942(0x2d4)]>0x0)for(const _0x4c155c of _0xe20610['sections']){console[_0x365942(0x36f)](_0x365942(0x358)+_0x4c155c[_0x365942(0x21d)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{['name']=a31_0x1949a9(0x2c6);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x1d5);async['execute'](_0x3b3455){const _0x38048e=a31_0x1949a9,{options:_0x145935,args:_0x536e83,tdx:_0x5b5720}=_0x3b3455,_0xd5f47=_0x536e83[0x0];if(!_0xd5f47)return console[_0x38048e(0x1ce)]('Error:\x20Personalization\x20ID\x20is\x20required'),console['error'](_0x38048e(0x22f)),0x1;const _0x5849d7=await withSpinner(_0x38048e(0x213)+_0xd5f47+_0x38048e(0x385),()=>_0x5b5720[_0x38048e(0x35a)][_0x38048e(0x378)](_0xd5f47),{'verbose':_0x145935[_0x38048e(0x265)]}),_0x451c9f=_0x5849d7[_0x38048e(0x218)];console['error'](_0x38048e(0x343)+_0x451c9f['name']+'\x27');if(_0x145935['format']===_0x38048e(0x290)||_0x145935[_0x38048e(0x2ba)]===_0x38048e(0x315))await handleSDKOutput([_0x451c9f],_0x145935);else{console[_0x38048e(0x36f)](a31_0x5cfd3b[_0x38048e(0x393)](_0x451c9f[_0x38048e(0x21d)])+'\x20'+a31_0x5cfd3b[_0x38048e(0x333)](_0x38048e(0x280)+_0x451c9f['id']+')'));_0x451c9f[_0x38048e(0x237)]&&console[_0x38048e(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x38048e(0x333)](_0x451c9f[_0x38048e(0x237)]));_0x451c9f[_0x38048e(0x21b)]&&console[_0x38048e(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x38048e(0x282)]('audienceId:')+'\x20'+_0x451c9f[_0x38048e(0x21b)]);console[_0x38048e(0x36f)]('\x20\x20'+a31_0x5cfd3b[_0x38048e(0x282)]('created:')+'\x20'+_0x451c9f[_0x38048e(0x230)]),console['log']('\x20\x20'+a31_0x5cfd3b['cyan'](_0x38048e(0x264))+'\x20'+_0x451c9f[_0x38048e(0x359)]);const _0x94c833=_0x451c9f[_0x38048e(0x211)]?.[_0x38048e(0x2d4)]||0x0;console['log']('\x20\x20'+a31_0x5cfd3b['cyan']('sections:')+'\x20'+_0x94c833);if(_0x451c9f[_0x38048e(0x211)]&&_0x451c9f[_0x38048e(0x211)][_0x38048e(0x2d4)]>0x0)for(const _0x21702f of _0x451c9f['sections']){console[_0x38048e(0x36f)](_0x38048e(0x22c)+a31_0x5cfd3b[_0x38048e(0x393)](_0x21702f[_0x38048e(0x21d)])+'\x20'+a31_0x5cfd3b[_0x38048e(0x333)](_0x38048e(0x280)+_0x21702f['id']+')')),_0x21702f[_0x38048e(0x1d7)]&&(console['log'](_0x38048e(0x306)+a31_0x5cfd3b[_0x38048e(0x282)](_0x38048e(0x23a))+'\x20'+_0x21702f[_0x38048e(0x1d7)][_0x38048e(0x21d)]),_0x21702f[_0x38048e(0x1d7)][_0x38048e(0x1f7)]?.[_0x38048e(0x2a3)]&&console[_0x38048e(0x36f)](_0x38048e(0x2c8)+a31_0x5cfd3b['cyan'](_0x38048e(0x31d))+'\x20'+_0x21702f[_0x38048e(0x1d7)]['keyEventCriteria'][_0x38048e(0x2a3)])),_0x21702f[_0x38048e(0x1fe)]&&console['log'](_0x38048e(0x306)+a31_0x5cfd3b[_0x38048e(0x282)](_0x38048e(0x379))+'\x20'+JSON[_0x38048e(0x1e7)](_0x21702f[_0x38048e(0x1fe)])),_0x21702f[_0x38048e(0x1d4)]&&console[_0x38048e(0x36f)](_0x38048e(0x306)+a31_0x5cfd3b[_0x38048e(0x282)](_0x38048e(0x355))+_0x38048e(0x228));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x281);['description']=a31_0x1949a9(0x2e6);async['execute'](_0x3683ce){const _0x39fd51=a31_0x1949a9,{options:_0x132405,args:_0x455d73,tdx:_0x168df2}=_0x3683ce,_0x2b2f3c=_0x455d73[0x0];if(!_0x2b2f3c)return console[_0x39fd51(0x1ce)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x39fd51(0x1ce)](_0x39fd51(0x2e5)),0x1;return await withSpinner(_0x39fd51(0x2f3)+_0x2b2f3c+_0x39fd51(0x385),()=>_0x168df2[_0x39fd51(0x35a)][_0x39fd51(0x308)](_0x2b2f3c),{'verbose':_0x132405['verbose']}),console[_0x39fd51(0x1ce)]('✔\x20Deleted\x20personalization\x20\x27'+_0x2b2f3c+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x1949a9(0x21d)]=a31_0x1949a9(0x27f);[a31_0x1949a9(0x237)]='Create\x20a\x20realtime\x20personalization\x20entity';async[a31_0x1949a9(0x2fa)](_0x4cf7b6){const _0x3e4960=a31_0x1949a9,{options:_0x56645c,tdx:_0x520fba}=_0x4cf7b6,_0x4dcabb=_0x56645c;let _0x4255c6;if(_0x4dcabb[_0x3e4960(0x32f)]){_0x4255c6=await loadJSON(_0x4dcabb[_0x3e4960(0x32f)],!![]);if(!_0x4255c6[_0x3e4960(0x397)]?.[_0x3e4960(0x227)])return console[_0x3e4960(0x1ce)](_0x3e4960(0x2b3)),console[_0x3e4960(0x1ce)]('Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:'),console[_0x3e4960(0x1ce)](_0x3e4960(0x3ab)),0x1;}else{if(!_0x4dcabb[_0x3e4960(0x21d)])return console[_0x3e4960(0x1ce)](_0x3e4960(0x346)),console['error'](_0x3e4960(0x20e)),console[_0x3e4960(0x1ce)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x4dcabb[_0x3e4960(0x237)]===undefined)return console[_0x3e4960(0x1ce)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x3e4960(0x1ce)](_0x3e4960(0x20e)),console[_0x3e4960(0x1ce)](_0x3e4960(0x37d)),0x1;if(_0x4dcabb[_0x3e4960(0x3a6)]===undefined)return console[_0x3e4960(0x1ce)](_0x3e4960(0x248)),console[_0x3e4960(0x1ce)](_0x3e4960(0x2c4)),0x1;let _0x23e7de=_0x4dcabb[_0x3e4960(0x21b)];if(!_0x23e7de&&_0x56645c['parentSegment']){const _0x167874=await withSpinner(_0x3e4960(0x35c)+_0x56645c[_0x3e4960(0x246)]+'\x27...',()=>_0x520fba['segment'][_0x3e4960(0x1e0)](_0x56645c[_0x3e4960(0x246)]),{'verbose':_0x56645c[_0x3e4960(0x265)]});_0x23e7de=_0x167874['data'];}let _0x368e69;_0x4dcabb[_0x3e4960(0x211)]&&(_0x368e69=await loadJSON(_0x4dcabb[_0x3e4960(0x211)],![]));const _0x20f886=_0x4dcabb['folderId']===_0x3e4960(0x24f)?null:{'id':_0x4dcabb[_0x3e4960(0x3a6)],'type':_0x3e4960(0x1f5)};_0x4255c6={'attributes':{'name':_0x4dcabb[_0x3e4960(0x21d)],'description':_0x4dcabb[_0x3e4960(0x237)]||null,..._0x23e7de!==undefined&&{'audienceId':_0x23e7de},..._0x368e69!==undefined&&{'sections':_0x368e69}},'relationships':{'parentFolder':{'data':_0x20f886}}};}const _0x2b07e9=await withSpinner('Creating\x20personalization\x20\x27'+(_0x4255c6[_0x3e4960(0x398)]?.['name']??'')+_0x3e4960(0x385),()=>_0x520fba[_0x3e4960(0x35a)][_0x3e4960(0x29f)](_0x4255c6),{'verbose':_0x56645c[_0x3e4960(0x265)]}),_0x5c7087=_0x2b07e9[_0x3e4960(0x218)];return console[_0x3e4960(0x1ce)](_0x3e4960(0x1d1)+_0x5c7087[_0x3e4960(0x21d)]+_0x3e4960(0x302)+_0x5c7087['id']),await handleSDKOutput([_0x5c7087],_0x56645c),0x0;}}export class PSPzPatchCommand extends BaseCommand{['name']=a31_0x1949a9(0x3d6);[a31_0x1949a9(0x237)]=a31_0x1949a9(0x216);async[a31_0x1949a9(0x2fa)](_0xa2b5a3){const _0x4b6e25=a31_0x1949a9,{options:_0x40554c,args:_0x214fec}=_0xa2b5a3,_0x2e276e=_0x40554c,_0x4d524c=_0x214fec[0x0];if(!_0x4d524c)return console['error']('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x4b6e25(0x1ce)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0x4b6e25(0x1ce)](_0x4b6e25(0x21e)),0x1;let _0x47af1a;if(_0x2e276e['file'])_0x47af1a=await loadJSON(_0x2e276e[_0x4b6e25(0x32f)],!![]);else{if(!_0x2e276e[_0x4b6e25(0x21d)])return console[_0x4b6e25(0x1ce)](_0x4b6e25(0x346)),console[_0x4b6e25(0x1ce)](_0x4b6e25(0x31c)),0x1;if(_0x2e276e[_0x4b6e25(0x237)]===undefined)return console[_0x4b6e25(0x1ce)](_0x4b6e25(0x340)),console[_0x4b6e25(0x1ce)](_0x4b6e25(0x31c)),0x1;let _0x51f7cd;_0x2e276e[_0x4b6e25(0x211)]&&(_0x51f7cd=await loadJSON(_0x2e276e[_0x4b6e25(0x211)],![])),_0x47af1a={'attributes':{'name':_0x2e276e[_0x4b6e25(0x21d)],'description':_0x2e276e[_0x4b6e25(0x237)]||null,..._0x51f7cd!==undefined&&{'sections':_0x51f7cd}}};}const {tdx:_0x28053a}=_0xa2b5a3,_0x269142=await withSpinner(_0x4b6e25(0x26c)+_0x4d524c+'\x27...',()=>_0x28053a[_0x4b6e25(0x35a)]['patchPersonalization'](_0x4d524c,_0x47af1a),{'verbose':_0x40554c[_0x4b6e25(0x265)]}),_0x46819d=_0x269142[_0x4b6e25(0x218)];return console[_0x4b6e25(0x1ce)](_0x4b6e25(0x2e0)+_0x46819d[_0x4b6e25(0x21d)]+_0x4b6e25(0x27e)+_0x46819d['id']+')'),await handleSDKOutput([_0x46819d],_0x40554c),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']='ps:pz:init';[a31_0x1949a9(0x237)]=a31_0x1949a9(0x3ac);async['execute'](_0x482d70){const _0x7ebe4e=a31_0x1949a9,{options:_0x4bb532,args:_0x4c5512}=_0x482d70,_0x58ddc5=_0x4c5512[0x0]||_0x4bb532[_0x7ebe4e(0x246)];if(!_0x58ddc5)return showParentSegmentNotSetError(_0x7ebe4e(0x1cd)+_0x7ebe4e(0x382)),0x1;const _0x1b7f18=resolveYamlFile(_0x58ddc5);if(!existsSync(_0x1b7f18))return showFileNotFoundError(_0x1b7f18,_0x58ddc5),0x1;let _0x187c67;try{_0x187c67=readFileSync(_0x1b7f18,_0x7ebe4e(0x1ff));}catch(_0x25b80a){const _0x546b68=_0x25b80a instanceof Error?_0x25b80a[_0x7ebe4e(0x364)]:String(_0x25b80a);return console[_0x7ebe4e(0x1ce)](_0x7ebe4e(0x332)+_0x546b68),0x1;}let _0x85e986;try{_0x85e986=parseDef(_0x187c67);}catch(_0x119703){const _0x19adcb=_0x119703 instanceof Error?_0x119703[_0x7ebe4e(0x364)]:String(_0x119703);return console['error'](a31_0x5cfd3b[_0x7ebe4e(0x3cb)](_0x7ebe4e(0x26b)+_0x19adcb)),0x1;}if(_0x85e986['personalization_services']&&_0x85e986[_0x7ebe4e(0x232)][_0x7ebe4e(0x2d4)]>0x0)return console[_0x7ebe4e(0x1ce)](a31_0x5cfd3b[_0x7ebe4e(0x245)](_0x7ebe4e(0x24e)+_0x1b7f18)),console[_0x7ebe4e(0x1ce)](a31_0x5cfd3b[_0x7ebe4e(0x333)](_0x7ebe4e(0x371)+_0x85e986['personalization_services'][_0x7ebe4e(0x2d4)]+_0x7ebe4e(0x1da))),0x1;!_0x85e986[_0x7ebe4e(0x26f)]&&(_0x85e986[_0x7ebe4e(0x26f)]={'events':[{'name':_0x7ebe4e(0x29c),'source_table':'<database>.<table>'}],'attributes':[{'name':_0x7ebe4e(0x3ca),'type':_0x7ebe4e(0x288)}],'id_stitching':{'primary_key':_0x85e986[_0x7ebe4e(0x222)][_0x7ebe4e(0x1dc)]===_0x7ebe4e(0x344)?_0x7ebe4e(0x201):_0x7ebe4e(0x3cf)}});_0x85e986[_0x7ebe4e(0x232)]=[{'name':_0x7ebe4e(0x20f),'description':'Personalization\x20service\x20description','trigger_event':_0x7ebe4e(0x29c),'sections':[{'name':_0x7ebe4e(0x286),'criteria':'true','attributes':['last_page_viewed']}]}];const _0x234ab9=serializeDef(_0x85e986);return writeFileSync(_0x1b7f18,_0x234ab9,_0x7ebe4e(0x1ff)),console['error'](a31_0x5cfd3b[_0x7ebe4e(0x208)]('✔')+_0x7ebe4e(0x215)+a31_0x5cfd3b['cyan'](_0x1b7f18)),(!_0x85e986[_0x7ebe4e(0x26f)]||_0x187c67[_0x7ebe4e(0x369)]('realtime:')===-0x1)&&console[_0x7ebe4e(0x1ce)](a31_0x5cfd3b[_0x7ebe4e(0x208)]('✔')+_0x7ebe4e(0x33f)),console['error']('\x0a'+a31_0x5cfd3b[_0x7ebe4e(0x333)]('Next\x20steps:')),console[_0x7ebe4e(0x1ce)](_0x7ebe4e(0x23f)+_0x1b7f18+_0x7ebe4e(0x1f1)),console[_0x7ebe4e(0x1ce)](_0x7ebe4e(0x35f)+a31_0x5cfd3b[_0x7ebe4e(0x333)]('tdx\x20ps\x20push\x20'+_0x58ddc5)+_0x7ebe4e(0x20a)),0x0;}}
1
+ const a31_0x3a88a7=a31_0x2b70;(function(_0x4ffd49,_0x57b42d){const _0x45f8bb=a31_0x2b70,_0x484ded=_0x4ffd49();while(!![]){try{const _0x263b24=parseInt(_0x45f8bb(0x162))/0x1*(-parseInt(_0x45f8bb(0x237))/0x2)+-parseInt(_0x45f8bb(0x28d))/0x3+-parseInt(_0x45f8bb(0x22a))/0x4+-parseInt(_0x45f8bb(0x16e))/0x5+-parseInt(_0x45f8bb(0xd7))/0x6*(parseInt(_0x45f8bb(0x194))/0x7)+parseInt(_0x45f8bb(0x1b3))/0x8+-parseInt(_0x45f8bb(0x1fa))/0x9*(-parseInt(_0x45f8bb(0x1d3))/0xa);if(_0x263b24===_0x57b42d)break;else _0x484ded['push'](_0x484ded['shift']());}catch(_0x584e41){_0x484ded['push'](_0x484ded['shift']());}}}(a31_0x547b,0x5eb0d));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x323afe 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_0x3024fb 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_0x3a88a7(0x22b),LEGACY_PARENT_SEGMENT_DIR=a31_0x3a88a7(0x13c);function openBrowser(_0x286f6a){const _0x171d8d=a31_0x3a88a7,_0x4d29a0=process[_0x171d8d(0x281)],_0x190bc8=_0x4d29a0===_0x171d8d(0x2d8)?_0x171d8d(0xd2):_0x4d29a0===_0x171d8d(0x20e)?_0x171d8d(0x2e8):_0x171d8d(0x19e);spawn(_0x190bc8,[_0x286f6a],{'detached':!![],'stdio':_0x171d8d(0x24b)})['unref']();}function migrateLegacyDirectory(){const _0x6eb2f4=a31_0x3a88a7;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x1e0c56=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x1e0c56[_0x6eb2f4(0x135)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console['error'](a31_0x3024fb['yellow'](_0x6eb2f4(0x2da)+LEGACY_PARENT_SEGMENT_DIR+_0x6eb2f4(0x150)+PARENT_SEGMENT_DIR+_0x6eb2f4(0x167))),console[_0x6eb2f4(0xfc)](a31_0x3024fb[_0x6eb2f4(0x179)](_0x6eb2f4(0x12f)+LEGACY_PARENT_SEGMENT_DIR+_0x6eb2f4(0x19d))),![];console[_0x6eb2f4(0xfc)](a31_0x3024fb[_0x6eb2f4(0x16b)]('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x6eb2f4(0x244)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x6eb2f4(0xfc)](a31_0x3024fb['green'](_0x6eb2f4(0x251)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x470e13){const _0x14da1d=_0x470e13 instanceof Error?_0x470e13[_0x6eb2f4(0x120)]:String(_0x470e13);return console[_0x6eb2f4(0xfc)](a31_0x3024fb[_0x6eb2f4(0xe9)]('✘\x20Failed\x20to\x20rename\x20directory:\x20'+_0x14da1d+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x3a88a7(0x1bf)](_0x19f5b7){const _0x2fbbd8=a31_0x3a88a7;return migrateLegacyDirectory(),super[_0x2fbbd8(0x1bf)](_0x19f5b7);}}function resolveYamlFile(_0x122153){const _0x35a2f2=a31_0x3a88a7;if(_0x122153[_0x35a2f2(0x161)](_0x35a2f2(0x11c))||_0x122153[_0x35a2f2(0x161)](_0x35a2f2(0x1d1)))return _0x122153;return a31_0x323afe[_0x35a2f2(0x1ee)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x122153)+_0x35a2f2(0x11c));}function formatProgressMessage(_0x15bf23){const _0x22ee68=a31_0x3a88a7,_0x36525c=_0x15bf23[_0x22ee68(0x182)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x36525c){const [,_0x557110,_0x508ac3,_0x4e1b72='']=_0x36525c;return a31_0x3024fb[_0x22ee68(0x179)](_0x557110+':')+'\x20'+_0x508ac3+a31_0x3024fb['dim'](_0x4e1b72);}return a31_0x3024fb['dim'](_0x15bf23);}function showFileNotFoundError(_0x7282db,_0x5d3528){const _0x15ece1=a31_0x3a88a7;console[_0x15ece1(0xfc)](a31_0x3024fb[_0x15ece1(0xe9)](_0x15ece1(0x212)+_0x7282db+'\x0a')),console[_0x15ece1(0xfc)](a31_0x3024fb[_0x15ece1(0x2d6)](_0x15ece1(0x27a)+_0x5d3528+_0x15ece1(0x252)));}function displayRealtimeValidation(_0x16315e){const _0x254196=a31_0x3a88a7;if(!_0x16315e[_0x254196(0x229)])return;const _0x2a616f=_0x16315e['realtime'],_0x34bb31=_0x2a616f['enabled']?a31_0x3024fb[_0x254196(0x20f)]('⚡\x20Enabled'):a31_0x3024fb['yellow']('⚡\x20Not\x20enabled');console['error']('\x0a'+a31_0x3024fb[_0x254196(0x179)](_0x254196(0x232))+'\x20'+_0x34bb31);if(_0x2a616f[_0x254196(0x1a4)]&&_0x2a616f[_0x254196(0x1a4)][_0x254196(0x2d7)]>0x0){console[_0x254196(0xfc)]('\x20\x20'+a31_0x3024fb['dim'](_0x254196(0x199))+'\x20'+_0x2a616f[_0x254196(0x1a4)][_0x254196(0x2d7)]+_0x254196(0x28f));for(const _0x58dec8 of _0x2a616f[_0x254196(0x1a4)]){const _0x5cc7e0=_0x58dec8[_0x254196(0x1d6)]===![]?a31_0x3024fb[_0x254196(0xe9)]('✘'):a31_0x3024fb[_0x254196(0x20f)]('✔');console[_0x254196(0xfc)](_0x254196(0xfa)+_0x5cc7e0+'\x20'+_0x58dec8[_0x254196(0x12c)]),_0x58dec8[_0x254196(0x1f1)]&&console[_0x254196(0xfc)]('\x20\x20\x20\x20\x20\x20'+a31_0x3024fb[_0x254196(0xe9)](_0x58dec8[_0x254196(0x1f1)]));}}if(_0x2a616f[_0x254196(0x1cd)]&&_0x2a616f[_0x254196(0x1cd)][_0x254196(0x2d7)]>0x0){console[_0x254196(0xfc)]('\x20\x20'+a31_0x3024fb['dim'](_0x254196(0x1a7))+'\x20'+_0x2a616f['attributes'][_0x254196(0x2d7)]+_0x254196(0x28f));for(const _0xf715d8 of _0x2a616f[_0x254196(0x1cd)]){const _0x57d895=_0xf715d8[_0x254196(0x275)]?a31_0x3024fb[_0x254196(0x20f)]('✔'):a31_0x3024fb[_0x254196(0xe9)]('✘');console[_0x254196(0xfc)](_0x254196(0xfa)+_0x57d895+'\x20'+_0xf715d8['name']+'\x20'+a31_0x3024fb['dim']('('+_0xf715d8['type']+')'));}}if(_0x2a616f[_0x254196(0x26b)]){const _0x1f3cc0=_0x2a616f['idStitching'][_0x254196(0x245)]?.[_0x254196(0x2d7)]?_0x254196(0x12b)+_0x2a616f[_0x254196(0x26b)][_0x254196(0x245)][_0x254196(0x1ee)](',\x20')+']':'';console[_0x254196(0xfc)]('\x20\x20'+a31_0x3024fb['dim'](_0x254196(0x280))+'\x20'+_0x2a616f[_0x254196(0x26b)][_0x254196(0x2df)]+_0x1f3cc0);}if(_0x2a616f['personalizationServices']&&_0x2a616f['personalizationServices'][_0x254196(0x2d7)]>0x0){console[_0x254196(0xfc)]('\x20\x20'+a31_0x3024fb['dim'](_0x254196(0x2e7))+'\x20'+_0x2a616f[_0x254196(0x1b1)][_0x254196(0x2d7)]+_0x254196(0x22d)+(_0x2a616f[_0x254196(0x1b1)][_0x254196(0x2d7)]!==0x1?'s':''));for(const _0x343501 of _0x2a616f[_0x254196(0x1b1)]){console[_0x254196(0xfc)](_0x254196(0x25b)+_0x343501[_0x254196(0x12c)]);}}}function showParentSegmentNotSetError(_0x343100){const _0x1acff4=a31_0x3a88a7;console[_0x1acff4(0xfc)](a31_0x3024fb['yellow'](_0x1acff4(0x2e9))),console[_0x1acff4(0xfc)](_0x343100);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0xe4);['description']=a31_0x3a88a7(0x1b0);async[a31_0x3a88a7(0xcf)](_0x4293df){const _0x4284b9=a31_0x3a88a7,{options:_0x517980,args:_0x51d531,tdx:_0x5f16a8}=_0x4293df,_0x4a2b92=_0x51d531[0x0];_0x517980[_0x4284b9(0x26a)]&&(console[_0x4284b9(0xfc)]('Site:\x20'+_0x517980['site']),_0x4a2b92&&console['error'](_0x4284b9(0x174)+_0x4a2b92));const _0x293511=await withSpinner(_0x4a2b92?_0x4284b9(0x210)+_0x4a2b92+_0x4284b9(0x108):_0x4284b9(0x138),()=>_0x5f16a8[_0x4284b9(0x1e5)][_0x4284b9(0x1f4)](),{'verbose':_0x517980[_0x4284b9(0x26a)]});let _0x25218c=_0x293511['data'];if(_0x4a2b92){const _0x4f6a51=_0x4a2b92['replace'](/[.+^${}()|[\]\\]/g,_0x4284b9(0x29c))[_0x4284b9(0x111)](/\*/g,'.*')[_0x4284b9(0x111)](/\?/g,'.'),_0x348ae4=new RegExp('^'+_0x4f6a51+'$','i');_0x25218c=_0x25218c[_0x4284b9(0x19c)](_0x9125b2=>_0x348ae4[_0x4284b9(0x128)](_0x9125b2[_0x4284b9(0x1cd)][_0x4284b9(0x12c)]));}_0x25218c[_0x4284b9(0x1e8)]((_0x45217c,_0x15fdc1)=>_0x45217c[_0x4284b9(0x1cd)][_0x4284b9(0x12c)][_0x4284b9(0x163)](_0x15fdc1[_0x4284b9(0x1cd)]['name'])),console[_0x4284b9(0xfc)](_0x4284b9(0x1d7)+_0x25218c[_0x4284b9(0x2d7)]+'\x20parent\x20segment'+(_0x25218c['length']!==0x1?'s':''));const _0x49928=_0x1c741f=>{const _0x181a31=_0x4284b9;return getConsoleNextUrl(_0x517980[_0x181a31(0x16a)],'/app/dw/parentSegments/'+_0x1c741f);};if(_0x517980[_0x4284b9(0x1b2)]==='json'||_0x517980['format']===_0x4284b9(0x213)){const _0x34daf5=_0x25218c['map'](_0x483852=>({..._0x483852,'url':_0x49928(_0x483852['id'])}));await handleSDKOutput(_0x34daf5,_0x517980);}else{if(_0x25218c[_0x4284b9(0x2d7)]===0x0)_0x4a2b92?console['log'](_0x4284b9(0x2a1)+_0x4a2b92):console[_0x4284b9(0x21c)]('No\x20parent\x20segments\x20found');else for(const _0x4b29fb of _0x25218c){const _0x15b5c1=_0x4b29fb[_0x4284b9(0x1cd)][_0x4284b9(0x15d)]?a31_0x3024fb[_0x4284b9(0x179)]('\x20('+formatRows(_0x4b29fb[_0x4284b9(0x1cd)]['population'])+')'):'',_0x14badf=hyperlink(_0x4b29fb[_0x4284b9(0x1cd)][_0x4284b9(0x12c)],_0x49928(_0x4b29fb['id']));console[_0x4284b9(0x21c)](_0x4284b9(0x206)+_0x14badf+_0x15b5c1);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x177);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x196);async[a31_0x3a88a7(0xcf)](_0x116d97){const _0x43c6a6=a31_0x3a88a7,{options:_0x3c50be,args:_0x351056,tdx:_0x4bb615}=_0x116d97;console['error'](_0x43c6a6(0x1a8)+_0x43c6a6(0x20d)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x3c59e0=_0x3c50be;if(_0x351056[_0x43c6a6(0x2d7)]===0x0)return console[_0x43c6a6(0xfc)](a31_0x3024fb[_0x43c6a6(0xe9)]('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x43c6a6(0xfc)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;const _0x1a80e3=_0x351056[0x0];if(!_0x3c59e0['database']||!_0x3c59e0['table'])return console['error'](_0x43c6a6(0x1e3)),console[_0x43c6a6(0xfc)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x3c59e0[_0x43c6a6(0x26a)]&&(console[_0x43c6a6(0xfc)]('Site:\x20'+_0x3c59e0[_0x43c6a6(0x16a)]),console['error'](_0x43c6a6(0x154)+_0x1a80e3),console[_0x43c6a6(0xfc)]('Database:\x20'+_0x3c59e0[_0x43c6a6(0x239)]),console[_0x43c6a6(0xfc)]('Table:\x20'+_0x3c59e0[_0x43c6a6(0x1e2)]));const _0x49d64a=await loadJSONFromOptions(_0x3c59e0[_0x43c6a6(0x1cd)],_0x3c59e0[_0x43c6a6(0x14f)]),_0x1e7360=await loadJSONFromOptions(_0x3c59e0[_0x43c6a6(0xe3)],_0x3c59e0[_0x43c6a6(0x2bd)]),_0x8978dd=await loadJSONFromOptions(_0x3c59e0[_0x43c6a6(0x116)],_0x3c59e0[_0x43c6a6(0x265)]),_0x12ace0={'name':_0x1a80e3,'description':_0x3c59e0[_0x43c6a6(0x110)],'scheduleType':_0x3c59e0[_0x43c6a6(0x295)],'scheduleOption':_0x3c59e0[_0x43c6a6(0x253)],'timezone':_0x3c59e0[_0x43c6a6(0x1eb)],'master':{'parentDatabaseName':_0x3c59e0[_0x43c6a6(0x239)],'parentTableName':_0x3c59e0[_0x43c6a6(0x1e2)]},'attributes':_0x49d64a,'behaviors':_0x1e7360,'customerGroup':_0x8978dd},_0x5eb3c8=await withSpinner(_0x43c6a6(0x2cb)+_0x1a80e3+_0x43c6a6(0x108),()=>_0x4bb615[_0x43c6a6(0x1e5)]['createParent'](_0x12ace0),{'verbose':_0x3c50be[_0x43c6a6(0x26a)]}),_0x1c10d6=_0x5eb3c8[_0x43c6a6(0x1c3)];return console[_0x43c6a6(0xfc)]('✔\x20Created\x20parent\x20segment\x20\x27'+_0x1c10d6[_0x43c6a6(0x12c)]+_0x43c6a6(0x25a)+_0x1c10d6['id']),await handleSDKOutput([_0x1c10d6],_0x3c50be),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x21a);['description']=a31_0x3a88a7(0x119);async[a31_0x3a88a7(0xcf)](_0xd34d17){const _0x17f65e=a31_0x3a88a7,{options:_0x169220,args:_0x41fcdb,tdx:_0x16a129}=_0xd34d17;console[_0x17f65e(0xfc)](_0x17f65e(0xcd)+_0x17f65e(0x20d)+_0x17f65e(0x2e2));const _0x7689aa=_0x169220;if(_0x41fcdb['length']===0x0)return console[_0x17f65e(0xfc)](a31_0x3024fb['red'](_0x17f65e(0x264))),console[_0x17f65e(0xfc)](_0x17f65e(0x2d4)),0x1;const _0x3c4494=_0x41fcdb[0x0];_0x7689aa[_0x17f65e(0x26a)]&&(console[_0x17f65e(0xfc)]('Site:\x20'+_0x7689aa['site']),console[_0x17f65e(0xfc)](_0x17f65e(0x1f3)+_0x3c4494));const _0x4e56f0=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x3c4494+_0x17f65e(0x108),()=>_0x16a129[_0x17f65e(0x1e5)][_0x17f65e(0x18b)](_0x3c4494),{'verbose':_0x7689aa[_0x17f65e(0x26a)]}),_0x409e55=_0x4e56f0[_0x17f65e(0x1c3)],_0x43ff0d=await loadJSONFromOptions(_0x7689aa[_0x17f65e(0x2d3)],_0x7689aa['addAttributesFile']),_0x2fc279=await loadJSONFromOptions(_0x7689aa[_0x17f65e(0x137)],_0x7689aa[_0x17f65e(0x139)]),_0x5f0087={'name':_0x409e55[_0x17f65e(0x12c)],'description':_0x7689aa[_0x17f65e(0x110)]!==undefined?_0x7689aa['description']:_0x409e55['description'],'scheduleType':_0x7689aa[_0x17f65e(0x295)]!==undefined?_0x7689aa[_0x17f65e(0x295)]:_0x409e55[_0x17f65e(0x295)],'scheduleOption':_0x7689aa[_0x17f65e(0x253)]!==undefined?_0x7689aa[_0x17f65e(0x253)]:_0x409e55[_0x17f65e(0x253)],'timezone':_0x7689aa[_0x17f65e(0x1eb)]!==undefined?_0x7689aa[_0x17f65e(0x1eb)]:_0x409e55[_0x17f65e(0x1eb)],'master':_0x409e55[_0x17f65e(0xee)],'attributes':_0x43ff0d?[..._0x409e55[_0x17f65e(0x1cd)]||[],..._0x43ff0d]:_0x409e55[_0x17f65e(0x1cd)],'behaviors':_0x2fc279?[..._0x409e55[_0x17f65e(0xe3)]||[],..._0x2fc279]:_0x409e55[_0x17f65e(0xe3)],'customerGroup':_0x409e55[_0x17f65e(0x116)]},_0xc43b86=await withSpinner(_0x17f65e(0x24e)+_0x3c4494+_0x17f65e(0x108),()=>_0x16a129['segment'][_0x17f65e(0x2a9)](_0x3c4494,_0x5f0087),{'verbose':_0x7689aa['verbose']}),_0x1ac568=_0xc43b86['data'];return console['error'](_0x17f65e(0x10c)+_0x1ac568[_0x17f65e(0x12c)]+'\x27'),await handleSDKOutput([_0x1ac568],_0x7689aa),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x1db);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x28c);async[a31_0x3a88a7(0xcf)](_0xeebb36){const _0x145032=a31_0x3a88a7,{options:_0x27a745,args:_0x9d176c,tdx:_0x5000f5}=_0xeebb36,_0x3c9dcd=_0x27a745,_0x5f1ee0=_0x9d176c[0x0]||_0x27a745[_0x145032(0x226)];if(!_0x5f1ee0)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'+_0x145032(0x233)),0x1;if(_0x3c9dcd[_0x145032(0x2a2)]&&_0x3c9dcd['output'])return console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0xe9)](_0x145032(0x164))),console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x179)](_0x145032(0x20a))),console[_0x145032(0xfc)](a31_0x3024fb['dim'](_0x145032(0x127)+PARENT_SEGMENT_DIR+'/{name}.yml\x0a')),console[_0x145032(0xfc)](a31_0x3024fb['cyan'](_0x145032(0x1d8))),0x1;const _0x4da07e=_0x3c9dcd[_0x145032(0x14b)]||a31_0x323afe['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x5f1ee0)+'.yml');_0x3c9dcd['verbose']&&(console[_0x145032(0xfc)](_0x145032(0x14d)+_0x3c9dcd['site']),console['error']('Parent\x20segment:\x20'+_0x5f1ee0),console[_0x145032(0xfc)](_0x145032(0x145)+_0x4da07e));const _0x480733=await withSpinner(_0x145032(0x2c8)+_0x5f1ee0+_0x145032(0x108),()=>_0x5000f5[_0x145032(0x1e5)][_0x145032(0x103)](_0x5f1ee0),{'verbose':_0x3c9dcd[_0x145032(0x26a)]}),_0x43ff64=_0x480733[_0x145032(0x1c3)];if(existsSync(_0x4da07e)){const _0x2ea57a=readFileSync(_0x4da07e,_0x145032(0xf1)),_0x4893e2=generateDiff(_0x2ea57a,_0x43ff64);if(!hasChanges(_0x4893e2))console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x20f)]('✔')+_0x145032(0x1f2)+a31_0x3024fb[_0x145032(0x2d6)](_0x4da07e)+_0x145032(0xfd));else{console[_0x145032(0xfc)]('\x0aChanges\x20to\x20\x27'+_0x4da07e+'\x27:'),console[_0x145032(0xfc)]('─'[_0x145032(0xec)](0x3c)),console[_0x145032(0xfc)](formatDiffWithColors(_0x4893e2)),console[_0x145032(0xfc)]('─'[_0x145032(0xec)](0x3c));if(!_0x3c9dcd[_0x145032(0x10e)]){if(!isInteractive())return console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0xe9)](_0x145032(0x175)),_0x145032(0x26f)),console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x179)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3e254a=await confirmKey(_0x145032(0x222)+_0x4da07e+'\x27?');if(!_0x3e254a)return console[_0x145032(0xfc)](a31_0x3024fb['yellow'](_0x145032(0x21e))),0x1;}writeFileSync(_0x4da07e,_0x43ff64,'utf-8'),console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x20f)]('✔')+_0x145032(0x1c1)+a31_0x3024fb[_0x145032(0x2d6)](_0x4da07e));}}else{const _0x1c7e64=a31_0x323afe[_0x145032(0xd4)](_0x4da07e);!existsSync(_0x1c7e64)&&mkdirSync(_0x1c7e64,{'recursive':!![]}),writeFileSync(_0x4da07e,_0x43ff64,_0x145032(0xf1)),console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x20f)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x3024fb[_0x145032(0x2d6)](_0x4da07e));}return saveSessionContext({'parent_segment':_0x5f1ee0},_0x3c9dcd[_0x145032(0x267)]),console[_0x145032(0xfc)](a31_0x3024fb[_0x145032(0x20f)]('✔')+'\x20Context\x20set:\x20'+a31_0x3024fb[_0x145032(0x179)]('parent_segment')+_0x145032(0x292)+a31_0x3024fb['cyan'](_0x5f1ee0)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0xd8);['description']=a31_0x3a88a7(0x205);async[a31_0x3a88a7(0xcf)](_0x2ebccc){const _0x4028b4=a31_0x3a88a7,{options:_0x2776f7,args:_0x841edf,tdx:_0x22f064}=_0x2ebccc,_0x4fe887=_0x2776f7,_0x4fa8c0=_0x841edf[0x0]||_0x2776f7['parentSegment'];if(!_0x4fa8c0)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'+_0x4028b4(0x243)),0x1;const _0x596285=resolveYamlFile(_0x4fa8c0);if(!existsSync(_0x596285))return showFileNotFoundError(_0x596285,_0x4fa8c0),0x1;_0x4fe887['verbose']&&(console[_0x4028b4(0xfc)](_0x4028b4(0x14d)+_0x4fe887[_0x4028b4(0x16a)]),console['error'](_0x4028b4(0x2e3)+_0x596285));let _0x53b98e;try{_0x53b98e=readFileSync(_0x596285,_0x4028b4(0xf1));}catch(_0x5213c0){const _0x414389=_0x5213c0 instanceof Error?_0x5213c0[_0x4028b4(0x120)]:String(_0x5213c0);return console[_0x4028b4(0xfc)]('Error\x20reading\x20file:\x20'+_0x414389),0x1;}const _0x2a13f5=await withSpinner(_0x4028b4(0x269),()=>_0x22f064[_0x4028b4(0x1e5)]['pushParentYaml'](_0x53b98e),{'verbose':_0x4fe887[_0x4028b4(0x26a)]}),_0x4e8f7b=_0x2a13f5[_0x4028b4(0x1c3)],{isNew:_0x15280d,name:_0xb56466,hasChanges:_0x2efd32,diffFormatted:_0x4a94fc}=_0x4e8f7b;if(!_0x2efd32)return console[_0x4028b4(0xfc)](_0x4028b4(0x123)+_0xb56466+_0x4028b4(0x290)),0x0;_0x15280d?console['error'](_0x4028b4(0x109)+_0xb56466+'\x27:'):console[_0x4028b4(0xfc)](_0x4028b4(0x11a)+_0xb56466+'\x27:');console['error']('─'[_0x4028b4(0xec)](0x3c)),console[_0x4028b4(0xfc)](_0x4a94fc),console[_0x4028b4(0xfc)]('─'[_0x4028b4(0xec)](0x3c));const _0x3cccda=_0x15280d?'Create\x20parent\x20segment\x20\x27'+_0xb56466+'\x27?':_0x4028b4(0x1c4)+_0xb56466+'\x27?';if(!_0x4fe887[_0x4028b4(0x10e)]){if(!isInteractive())return console['error'](a31_0x3024fb[_0x4028b4(0xe9)](_0x4028b4(0x175)),_0x4028b4(0x26f)),console['error'](a31_0x3024fb[_0x4028b4(0x179)](_0x4028b4(0x132))),0x1;const _0x1a31fd=await confirmKey(_0x3cccda);if(!_0x1a31fd)return console[_0x4028b4(0xfc)](a31_0x3024fb[_0x4028b4(0x16b)](_0x4028b4(0x21e))),0x1;}const _0x7778c7=_0x15280d?_0x4028b4(0x2c6):_0x4028b4(0x296),_0xb30f4=await withSpinner(_0x7778c7+_0x4028b4(0x1bb)+_0xb56466+'\x27...',()=>_0x4e8f7b['apply'](),{'verbose':_0x4fe887[_0x4028b4(0x26a)]}),_0x4aaf77=_0xb30f4[_0x4028b4(0x1c3)],_0x24213d=getConsoleNextUrl(_0x4fe887[_0x4028b4(0x16a)],'/app/dw/parentSegments/'+_0x4aaf77['id']),_0x54ecb9=_0x15280d?_0x4028b4(0x24f):_0x4028b4(0x122);return console[_0x4028b4(0xfc)]('✔\x20'+_0x54ecb9+'\x20parent\x20segment\x20\x27'+_0x4aaf77['name']+'\x27'),console[_0x4028b4(0xfc)]('\x20\x20'+_0x24213d),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x225);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x2b2);async[a31_0x3a88a7(0xcf)](_0x50d0a0){const _0x175de4=a31_0x3a88a7,{options:_0x26da82,args:_0x314364,tdx:_0x119f2d}=_0x50d0a0,_0x3c5e8d=_0x26da82,_0x3c017f=_0x314364[0x0]||_0x26da82['parentSegment'];if(!_0x3c017f)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a'+_0x175de4(0x273)+_0x175de4(0x1c7)+_0x175de4(0x17d)+_0x175de4(0x29d)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;const _0x476a86=resolveYamlFile(_0x3c017f);if(!existsSync(_0x476a86))return showFileNotFoundError(_0x476a86,_0x3c017f),0x1;_0x3c5e8d[_0x175de4(0x26a)]&&(console['error'](_0x175de4(0x14d)+_0x3c5e8d['site']),console[_0x175de4(0xfc)](_0x175de4(0x2e3)+_0x476a86));let _0x1b9164;try{_0x1b9164=readFileSync(_0x476a86,'utf-8');}catch(_0x9c2c36){const _0x59c19f=_0x9c2c36 instanceof Error?_0x9c2c36[_0x175de4(0x120)]:String(_0x9c2c36);return console[_0x175de4(0xfc)](_0x175de4(0x2c3)+_0x59c19f),0x1;}const _0x48b79a=createCommandSpinner(a31_0x3024fb[_0x175de4(0x179)]('Validating\x20configuration...'),{'verbose':_0x3c5e8d['verbose']});_0x48b79a['start']();const _0x22bb0b={'onProgress':_0x42c530=>{const _0x2623c9=_0x175de4;_0x48b79a[_0x2623c9(0x19b)]=formatProgressMessage(_0x42c530);}};if(_0x3c5e8d[_0x175de4(0xee)])_0x22bb0b[_0x175de4(0xee)]=!![];if(_0x3c5e8d['enriched'])_0x22bb0b[_0x175de4(0x1f0)]=!![];_0x3c5e8d[_0x175de4(0x1ca)]&&(_0x22bb0b[_0x175de4(0x1ca)]=_0x3c5e8d['attribute']);_0x3c5e8d[_0x175de4(0x2b5)]&&(_0x22bb0b[_0x175de4(0x2b5)]=_0x3c5e8d[_0x175de4(0x2b5)]);if(_0x3c5e8d[_0x175de4(0x125)])_0x22bb0b[_0x175de4(0x125)]=_0x3c5e8d[_0x175de4(0x125)];let _0x2ff5e7;try{_0x2ff5e7=await _0x119f2d[_0x175de4(0x1e5)]['validateParentYaml'](_0x1b9164,_0x22bb0b),_0x48b79a['stop']();}catch(_0x8f4350){_0x48b79a['stop']();throw _0x8f4350;}const _0x174834=_0x3c5e8d[_0x175de4(0x125)]||'-1d';return this[_0x175de4(0x15c)](_0x2ff5e7,_0x22bb0b,_0x476a86,_0x174834),_0x2ff5e7[_0x175de4(0x160)]?0x0:0x1;}['displayValidateResults'](_0x21b827,_0x2457c1,_0x46dd33,_0x57e0e8){const _0x14a21e=a31_0x3a88a7;console[_0x14a21e(0xfc)]('\x0a'+a31_0x3024fb['bold'](_0x14a21e(0x136))+'\x20'+_0x21b827[_0x14a21e(0x12c)]),console[_0x14a21e(0xfc)]('═'[_0x14a21e(0xec)](0x3c)),this[_0x14a21e(0x286)](_0x21b827);if(typeof _0x2457c1[_0x14a21e(0x1ca)]===_0x14a21e(0x189)){this['displayAttributesStats'](_0x21b827),this[_0x14a21e(0xfb)](_0x21b827),this[_0x14a21e(0x246)](_0x46dd33,_0x57e0e8,'attribute',_0x2457c1[_0x14a21e(0x1ca)]);return;}if(_0x2457c1['attribute']===!![]){this['displayAttributesStats'](_0x21b827),this['displaySummary'](_0x21b827),this[_0x14a21e(0x246)](_0x46dd33,_0x57e0e8,_0x14a21e(0x1cd));return;}if(typeof _0x2457c1[_0x14a21e(0x2b5)]===_0x14a21e(0x189)){this[_0x14a21e(0x256)](_0x21b827,_0x57e0e8),this[_0x14a21e(0xfb)](_0x21b827),this[_0x14a21e(0x246)](_0x46dd33,_0x57e0e8,_0x14a21e(0x2b5),_0x2457c1[_0x14a21e(0x2b5)]);return;}if(_0x2457c1[_0x14a21e(0x2b5)]===!![]){this['displayBehaviorsStats'](_0x21b827,_0x57e0e8),this[_0x14a21e(0xfb)](_0x21b827),this['displayPreviewHints'](_0x46dd33,_0x57e0e8,_0x14a21e(0xe3));return;}this['displayAttributesStats'](_0x21b827),this[_0x14a21e(0x256)](_0x21b827,_0x57e0e8),this[_0x14a21e(0x1c2)](_0x21b827),this[_0x14a21e(0xfb)](_0x21b827),this[_0x14a21e(0x246)](_0x46dd33,_0x57e0e8,'all');}[a31_0x3a88a7(0x1c2)](_0x2f05e5){displayRealtimeValidation(_0x2f05e5);}[a31_0x3a88a7(0x246)](_0x4102d3,_0x3e72ce,_0x17b9d1,_0x39adcb){const _0x122b36=a31_0x3a88a7;console[_0x122b36(0xfc)]('\x0a'+a31_0x3024fb[_0x122b36(0x179)](_0x122b36(0x228)));const _0x4359ba=_0x3e72ce!==_0x122b36(0x2ca)?_0x122b36(0x106)+_0x3e72ce:'';if(_0x17b9d1==='attribute'&&_0x39adcb)console[_0x122b36(0xfc)]('\x20\x20'+a31_0x3024fb[_0x122b36(0x179)](_0x122b36(0x16f)+_0x4102d3+_0x122b36(0x1be)+_0x39adcb+'\x22'+_0x4359ba));else{if(_0x17b9d1===_0x122b36(0x2b5)&&_0x39adcb)console[_0x122b36(0xfc)]('\x20\x20'+a31_0x3024fb[_0x122b36(0x179)]('tdx\x20ps\x20preview\x20'+_0x4102d3+_0x122b36(0x18c)+_0x39adcb+'\x22'+_0x4359ba));else(_0x17b9d1===_0x122b36(0x1cd)||_0x17b9d1===_0x122b36(0x1a6))&&console[_0x122b36(0xfc)]('\x20\x20'+a31_0x3024fb[_0x122b36(0x179)](_0x122b36(0x16f)+_0x4102d3+_0x122b36(0x2ec)+_0x4359ba));}(_0x17b9d1===_0x122b36(0xe3)||_0x17b9d1===_0x122b36(0x1a6))&&console[_0x122b36(0xfc)]('\x20\x20'+a31_0x3024fb[_0x122b36(0x179)]('tdx\x20ps\x20preview\x20'+_0x4102d3+_0x122b36(0x1bc)+_0x4359ba)),_0x17b9d1==='all'&&console['error']('\x20\x20'+a31_0x3024fb[_0x122b36(0x179)](_0x122b36(0x16f)+_0x4102d3+_0x122b36(0x18a)+_0x4359ba));}[a31_0x3a88a7(0x286)](_0x2ef62a){const _0x4edfc4=a31_0x3a88a7,{master:_0x35bd86}=_0x2ef62a,_0x3a9fb7=_0x35bd86['schemaValid']?a31_0x3024fb[_0x4edfc4(0x20f)]('✔'):a31_0x3024fb[_0x4edfc4(0xe9)]('✘');console['error']('\x0a'+a31_0x3024fb['dim'](_0x4edfc4(0x2e6))),console[_0x4edfc4(0xfc)](_0x3a9fb7+'\x20'+a31_0x3024fb['bold'](_0x35bd86[_0x4edfc4(0x239)]+'.'+_0x35bd86[_0x4edfc4(0x1e2)])),_0x35bd86[_0x4edfc4(0x101)]?_0x35bd86[_0x4edfc4(0x1fe)]!==undefined&&console[_0x4edfc4(0xfc)]('\x20\x20'+a31_0x3024fb[_0x4edfc4(0x179)](_0x4edfc4(0x172))+'\x20'+a31_0x3024fb[_0x4edfc4(0x2d6)](formatRows(_0x35bd86[_0x4edfc4(0x1fe)]))):console[_0x4edfc4(0xfc)]('\x20\x20'+a31_0x3024fb[_0x4edfc4(0xe9)](_0x4edfc4(0x23b))+'\x20'+_0x35bd86[_0x4edfc4(0x2ab)]);}[a31_0x3a88a7(0x259)](_0xf2b72){const _0x34862c=a31_0x3a88a7;if(_0xf2b72[_0x34862c(0x1cd)][_0x34862c(0x2d7)]===0x0)return;console['error']('\x0a'+a31_0x3024fb['dim']('Attributes'));for(const _0x31e621 of _0xf2b72[_0x34862c(0x1cd)]){const _0x458bc6=_0x31e621['schemaValid']?a31_0x3024fb[_0x34862c(0x20f)]('✔'):a31_0x3024fb[_0x34862c(0xe9)]('✘');let _0x1afb24='';if(_0x31e621[_0x34862c(0x101)]&&_0x31e621[_0x34862c(0x2b3)]!==undefined&&_0x31e621[_0x34862c(0xce)]!==undefined){const _0x13cb22=_0x31e621['coveragePercent'][_0x34862c(0x2e1)](0x1),_0x5b6ff7=_0x31e621[_0x34862c(0xce)]>=0x50?a31_0x3024fb[_0x34862c(0x20f)]:_0x31e621[_0x34862c(0xce)]>=0x32?a31_0x3024fb['yellow']:a31_0x3024fb['red'];_0x1afb24='\x20'+a31_0x3024fb[_0x34862c(0x179)]('Coverage:')+'\x20'+_0x5b6ff7(_0x13cb22+'%')+'\x20('+formatRows(_0x31e621['matchedCount'])+_0x34862c(0x118);}console[_0x34862c(0xfc)](_0x458bc6+'\x20'+a31_0x3024fb[_0x34862c(0x223)](_0x31e621[_0x34862c(0x12c)])+_0x1afb24),console[_0x34862c(0xfc)]('\x20\x20'+a31_0x3024fb[_0x34862c(0x179)](_0x34862c(0x2a6))+'\x20'+a31_0x3024fb[_0x34862c(0x223)](_0x31e621[_0x34862c(0x239)]+'.'+_0x31e621[_0x34862c(0x1e2)]));const _0x3cdd30=_0x31e621[_0x34862c(0xf6)]===_0x31e621['foreignKey']?a31_0x3024fb['dim']('Join\x20on:')+'\x20'+_0x31e621[_0x34862c(0xf6)]:a31_0x3024fb['dim'](_0x34862c(0x13a))+'\x20'+_0x31e621[_0x34862c(0xf6)]+_0x34862c(0x292)+_0x31e621['foreignKey'];console['error']('\x20\x20'+_0x3cdd30),console[_0x34862c(0xfc)]('\x20\x20'+a31_0x3024fb['dim']('Columns:')),this[_0x34862c(0x1ff)](_0x31e621[_0x34862c(0x121)]),!_0x31e621[_0x34862c(0x101)]&&console[_0x34862c(0xfc)]('\x20\x20'+a31_0x3024fb[_0x34862c(0xe9)](_0x34862c(0x23b))+'\x20'+_0x31e621[_0x34862c(0x2ab)]);}}[a31_0x3a88a7(0x256)](_0x23ad92,_0x2b3fc1){const _0x1c7f74=a31_0x3a88a7;if(_0x23ad92[_0x1c7f74(0xe3)][_0x1c7f74(0x2d7)]===0x0)return;console['error']('\x0a'+a31_0x3024fb[_0x1c7f74(0x179)](_0x1c7f74(0x151))+'\x20'+a31_0x3024fb[_0x1c7f74(0x179)]('('+_0x2b3fc1+')'));for(const _0x3e8b0e of _0x23ad92[_0x1c7f74(0xe3)]){const _0x49c719=_0x3e8b0e[_0x1c7f74(0x101)]?a31_0x3024fb[_0x1c7f74(0x20f)]('✔'):a31_0x3024fb[_0x1c7f74(0xe9)]('✘');let _0x3ec6c1='';if(_0x3e8b0e[_0x1c7f74(0x101)]&&_0x3e8b0e[_0x1c7f74(0x170)]!==undefined&&_0x3e8b0e['totalEvents']!==undefined){const _0x29191a=_0x3e8b0e[_0x1c7f74(0xfe)]?.[_0x1c7f74(0x2e1)](0x1)||'?',_0x5cc102=(_0x3e8b0e[_0x1c7f74(0xfe)]??0x0)>=0x32?a31_0x3024fb[_0x1c7f74(0x20f)]:(_0x3e8b0e[_0x1c7f74(0xfe)]??0x0)>=0x14?a31_0x3024fb['yellow']:a31_0x3024fb[_0x1c7f74(0xe9)];_0x3ec6c1='\x20'+a31_0x3024fb['dim'](_0x1c7f74(0x2e0))+'\x20'+_0x5cc102(formatRows(_0x3e8b0e['customersWithEvents']))+'\x20('+_0x29191a+'%)\x20'+a31_0x3024fb[_0x1c7f74(0x179)]('Events:')+'\x20'+a31_0x3024fb[_0x1c7f74(0x2d6)](formatRows(_0x3e8b0e[_0x1c7f74(0x258)]));}console['error'](_0x49c719+'\x20'+a31_0x3024fb[_0x1c7f74(0x223)](_0x3e8b0e['name'])+_0x3ec6c1),console[_0x1c7f74(0xfc)]('\x20\x20'+a31_0x3024fb[_0x1c7f74(0x179)](_0x1c7f74(0x2a6))+'\x20'+a31_0x3024fb[_0x1c7f74(0x223)](_0x3e8b0e['database']+'.'+_0x3e8b0e[_0x1c7f74(0x1e2)]));const _0x1afa4b=_0x3e8b0e[_0x1c7f74(0xf6)]===_0x3e8b0e[_0x1c7f74(0x14e)]?a31_0x3024fb['dim'](_0x1c7f74(0x2d2))+'\x20'+_0x3e8b0e[_0x1c7f74(0xf6)]:a31_0x3024fb[_0x1c7f74(0x179)]('Join:')+'\x20'+_0x3e8b0e['joinKey']+_0x1c7f74(0x292)+_0x3e8b0e['foreignKey'];console['error']('\x20\x20'+_0x1afa4b),console[_0x1c7f74(0xfc)]('\x20\x20'+a31_0x3024fb[_0x1c7f74(0x179)](_0x1c7f74(0x1ae))),this[_0x1c7f74(0x1ff)](_0x3e8b0e[_0x1c7f74(0x121)]),!_0x3e8b0e[_0x1c7f74(0x101)]&&console[_0x1c7f74(0xfc)]('\x20\x20'+a31_0x3024fb['red'](_0x1c7f74(0x23b))+'\x20'+_0x3e8b0e['schemaError']);}}[a31_0x3a88a7(0x1ff)](_0x43a38e){const _0xe2176b=a31_0x3a88a7;for(const _0x2ce46e of _0x43a38e){_0x2ce46e[_0xe2176b(0x13d)]===_0x2ce46e[_0xe2176b(0x2af)]||_0x2ce46e[_0xe2176b(0x2af)]==='*'?console[_0xe2176b(0xfc)](_0xe2176b(0x25b)+_0x2ce46e[_0xe2176b(0x13d)]):console[_0xe2176b(0xfc)]('\x20\x20\x20\x20-\x20'+_0x2ce46e[_0xe2176b(0x13d)]+'\x20'+a31_0x3024fb[_0xe2176b(0x179)]('('+_0x2ce46e[_0xe2176b(0x2af)]+')'));}}[a31_0x3a88a7(0xfb)](_0x36645a){const _0x5e1985=a31_0x3a88a7;console[_0x5e1985(0xfc)]('─'['repeat'](0x3c));if(_0x36645a[_0x5e1985(0x1a1)][_0x5e1985(0x2d7)]>0x0){console[_0x5e1985(0xfc)]('\x0a'+a31_0x3024fb['red']('Errors:'));for(const _0x25ff9b of _0x36645a[_0x5e1985(0x1a1)]){console['error']('\x20\x20'+a31_0x3024fb[_0x5e1985(0xe9)]('•')+'\x20'+_0x25ff9b);}}_0x36645a[_0x5e1985(0x160)]&&console[_0x5e1985(0xfc)]('\x0a'+a31_0x3024fb[_0x5e1985(0x20f)]('✔')+_0x5e1985(0x14a));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x11d);[a31_0x3a88a7(0x110)]='Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration';async[a31_0x3a88a7(0xcf)](_0x402c18){const _0x3e0df7=a31_0x3a88a7,{options:_0x54e851,args:_0x60ea39,tdx:_0x57bafc}=_0x402c18,_0x3d1b84=_0x54e851,_0x41df70=_0x60ea39[0x0]||_0x54e851[_0x3e0df7(0x226)];if(!_0x41df70)return showParentSegmentNotSetError(_0x3e0df7(0x169)+_0x3e0df7(0x1ce)+_0x3e0df7(0x133)+_0x3e0df7(0x1d5)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+'\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a'+'\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a'+_0x3e0df7(0x26d)),0x1;if(!_0x3d1b84['master']&&!_0x3d1b84[_0x3e0df7(0x1ca)]&&!_0x3d1b84['behavior']&&!_0x3d1b84[_0x3e0df7(0x1f0)])return console['error'](a31_0x3024fb[_0x3e0df7(0xe9)]('Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a')),console['error'](_0x3e0df7(0x23f)),console[_0x3e0df7(0xfc)](_0x3e0df7(0x1df)),console[_0x3e0df7(0xfc)](_0x3e0df7(0x17e)),console[_0x3e0df7(0xfc)](_0x3e0df7(0x24a)),console[_0x3e0df7(0xfc)](_0x3e0df7(0x1ab)),console['error'](_0x3e0df7(0x23e)),0x1;const _0x59b175=resolveYamlFile(_0x41df70);if(!existsSync(_0x59b175))return showFileNotFoundError(_0x59b175,_0x41df70),0x1;_0x3d1b84[_0x3e0df7(0x26a)]&&(console[_0x3e0df7(0xfc)](_0x3e0df7(0x14d)+_0x3d1b84[_0x3e0df7(0x16a)]),console['error'](_0x3e0df7(0x2e3)+_0x59b175));let _0x2e07ae;try{_0x2e07ae=readFileSync(_0x59b175,_0x3e0df7(0xf1));}catch(_0x5d37f5){const _0x3e8f9e=_0x5d37f5 instanceof Error?_0x5d37f5[_0x3e0df7(0x120)]:String(_0x5d37f5);return console['error'](_0x3e0df7(0x2c3)+_0x3e8f9e),0x1;}let _0x52b0da;try{_0x52b0da=parseDef(_0x2e07ae);}catch(_0x16a2c0){const _0x378ae9=_0x16a2c0 instanceof Error?_0x16a2c0[_0x3e0df7(0x120)]:String(_0x16a2c0);return console[_0x3e0df7(0xfc)](a31_0x3024fb[_0x3e0df7(0xe9)]('Error\x20parsing\x20YAML:\x20'+_0x378ae9)),0x1;}if(_0x3d1b84[_0x3e0df7(0x1ca)]===!![]||_0x3d1b84[_0x3e0df7(0x1ca)]===''){const _0x34f673=_0x52b0da['attributes']?.[_0x3e0df7(0x20b)](_0x503848=>_0x503848[_0x3e0df7(0x12c)])||[];if(_0x34f673[_0x3e0df7(0x2d7)]===0x0)console[_0x3e0df7(0xfc)](a31_0x3024fb[_0x3e0df7(0xe9)](_0x3e0df7(0x209)));else{console[_0x3e0df7(0xfc)](a31_0x3024fb[_0x3e0df7(0xe9)](_0x3e0df7(0x117))),console[_0x3e0df7(0xfc)](_0x3e0df7(0x28e));for(const _0x3c922f of _0x34f673){console[_0x3e0df7(0xfc)]('\x20\x20'+a31_0x3024fb[_0x3e0df7(0x2d6)](_0x3c922f));}console[_0x3e0df7(0xfc)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x41df70+_0x3e0df7(0x1be)+_0x34f673[0x0]+'\x22');}return 0x1;}if(_0x3d1b84['behavior']===!![]||_0x3d1b84[_0x3e0df7(0x2b5)]===''){const _0x1ee61b=_0x52b0da[_0x3e0df7(0xe3)]?.[_0x3e0df7(0x20b)](_0x1f8f1c=>_0x1f8f1c[_0x3e0df7(0x12c)])||[];if(_0x1ee61b[_0x3e0df7(0x2d7)]===0x0)console[_0x3e0df7(0xfc)](a31_0x3024fb[_0x3e0df7(0xe9)]('Error:\x20No\x20behaviors\x20defined\x20in\x20configuration'));else{console[_0x3e0df7(0xfc)](a31_0x3024fb['red'](_0x3e0df7(0x29b))),console[_0x3e0df7(0xfc)](_0x3e0df7(0x1f6));for(const _0x508f86 of _0x1ee61b){console[_0x3e0df7(0xfc)]('\x20\x20'+a31_0x3024fb[_0x3e0df7(0x2d6)](_0x508f86));}console[_0x3e0df7(0xfc)](_0x3e0df7(0x204)+_0x41df70+_0x3e0df7(0x18c)+_0x1ee61b[0x0]+'\x22');}return 0x1;}const _0x4e9f36=createCommandSpinner(a31_0x3024fb[_0x3e0df7(0x179)](_0x3e0df7(0x1e4)),{'verbose':_0x3d1b84['verbose']});_0x4e9f36[_0x3e0df7(0x2e8)]();const _0x494f62={'onProgress':_0x3844a4=>{const _0x110750=_0x3e0df7;_0x4e9f36[_0x110750(0x19b)]=formatProgressMessage(_0x3844a4);}};if(_0x3d1b84[_0x3e0df7(0xee)])_0x494f62[_0x3e0df7(0xee)]=!![];if(_0x3d1b84['attribute']&&typeof _0x3d1b84['attribute']===_0x3e0df7(0x189))_0x494f62['attribute']=_0x3d1b84['attribute'];if(_0x3d1b84['behavior']&&typeof _0x3d1b84[_0x3e0df7(0x2b5)]===_0x3e0df7(0x189))_0x494f62['behavior']=_0x3d1b84[_0x3e0df7(0x2b5)];if(_0x3d1b84[_0x3e0df7(0x1f0)])_0x494f62[_0x3e0df7(0x1f0)]=!![];if(_0x3d1b84[_0x3e0df7(0x125)])_0x494f62[_0x3e0df7(0x125)]=_0x3d1b84[_0x3e0df7(0x125)];let _0x5801ce;try{_0x5801ce=await _0x57bafc[_0x3e0df7(0x1e5)]['previewParentYaml'](_0x2e07ae,_0x494f62),_0x4e9f36[_0x3e0df7(0xd0)]();}catch(_0x47bccd){_0x4e9f36['stop']();throw _0x47bccd;}return await this[_0x3e0df7(0x218)](_0x5801ce,{'master':_0x3d1b84[_0x3e0df7(0xee)],'attribute':typeof _0x3d1b84[_0x3e0df7(0x1ca)]===_0x3e0df7(0x189)?_0x3d1b84[_0x3e0df7(0x1ca)]:undefined,'behavior':typeof _0x3d1b84['behavior']===_0x3e0df7(0x189)?_0x3d1b84['behavior']:undefined,'enriched':_0x3d1b84[_0x3e0df7(0x1f0)]}),_0x5801ce[_0x3e0df7(0x160)]?0x0:0x1;}async[a31_0x3a88a7(0x218)](_0x1bcab7,_0x35d89c){const _0x3cec78=a31_0x3a88a7;console['error']('\x0a'+a31_0x3024fb[_0x3cec78(0x223)]('Preview:')+'\x20'+_0x1bcab7[_0x3cec78(0x12c)]),console[_0x3cec78(0xfc)]('═'[_0x3cec78(0xec)](0x3c));if(_0x35d89c[_0x3cec78(0xee)]&&_0x1bcab7[_0x3cec78(0x2a0)]){const _0x4cd43e=a31_0x3024fb['dim'](_0x3cec78(0x15b))+'\x20'+a31_0x3024fb[_0x3cec78(0x223)](_0x1bcab7['master']['database']+'.'+_0x1bcab7[_0x3cec78(0xee)][_0x3cec78(0x1e2)]);await this[_0x3cec78(0xdd)](_0x4cd43e,_0x1bcab7[_0x3cec78(0x2a0)]);}else{if(_0x35d89c[_0x3cec78(0x1ca)]&&_0x1bcab7[_0x3cec78(0x2a0)]){const _0x54b393=a31_0x3024fb['dim']('Attribute:')+'\x20'+a31_0x3024fb[_0x3cec78(0x223)](_0x35d89c['attribute']);await this['displaySampleData'](_0x54b393,_0x1bcab7[_0x3cec78(0x2a0)]);}else{if(_0x35d89c[_0x3cec78(0x2b5)]&&_0x1bcab7[_0x3cec78(0x2a0)]){const _0x4e56c0=a31_0x3024fb[_0x3cec78(0x179)](_0x3cec78(0x1ea))+'\x20'+a31_0x3024fb[_0x3cec78(0x223)](_0x35d89c[_0x3cec78(0x2b5)]);await this[_0x3cec78(0xdd)](_0x4e56c0,_0x1bcab7['sampleData']);}else{if(_0x35d89c['enriched']&&_0x1bcab7[_0x3cec78(0x2a0)]){const _0x166ce4=a31_0x3024fb[_0x3cec78(0x179)]('Enriched:')+'\x20'+a31_0x3024fb['bold'](_0x3cec78(0x289));await this[_0x3cec78(0xdd)](_0x166ce4,_0x1bcab7['sampleData']);}else!_0x1bcab7[_0x3cec78(0x2a0)]&&console['error'](_0x3cec78(0x173));}}}if(_0x1bcab7[_0x3cec78(0x1a1)][_0x3cec78(0x2d7)]>0x0){console['error']('─'[_0x3cec78(0xec)](0x3c)),console[_0x3cec78(0xfc)]('\x0a'+a31_0x3024fb['red'](_0x3cec78(0x23a)));for(const _0x5e09cc of _0x1bcab7[_0x3cec78(0x1a1)]){console[_0x3cec78(0xfc)]('\x20\x20'+a31_0x3024fb['red']('•')+'\x20'+_0x5e09cc);}}}async['displaySampleData'](_0x2b3679,_0x1b97d){const _0x507227=a31_0x3a88a7;if(_0x1b97d[_0x507227(0x2d7)]===0x0){console[_0x507227(0xfc)]('\x0a'+_0x2b3679),console[_0x507227(0xfc)]('\x20\x20No\x20sample\x20data\x20available');return;}console['error']('\x0a'+_0x2b3679);const _0x3d2bf5=Object['keys'](_0x1b97d[0x0])[_0x507227(0x20b)](_0x33370b=>({'name':_0x33370b,'type':typeof _0x1b97d[0x0][_0x33370b]===_0x507227(0x227)?_0x507227(0x207):'varchar'})),_0x17f015={'queryId':_0x507227(0x2f0),'columns':_0x3d2bf5,'data':_0x1b97d,'stats':{'state':_0x507227(0x17c),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1b97d[_0x507227(0x2d7)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x3adada=formatAsTable(_0x17f015,_0x1b97d[_0x507227(0x2d7)],!![]);await writeOutput(_0x3adada,undefined,_0x507227(0x1e2));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x166);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x217);async[a31_0x3a88a7(0xcf)](_0x2ad7a1){const _0x2c06d6=a31_0x3a88a7,{options:_0x2676aa,args:_0x366bcc,tdx:_0x1864f0}=_0x2ad7a1,_0x4ac9d3=_0x2676aa,_0x25e3cb=_0x366bcc[0x0]||_0x2676aa[_0x2c06d6(0x226)];if(!_0x25e3cb)return showParentSegmentNotSetError(_0x2c06d6(0xd9)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x5357e7=resolveYamlFile(_0x25e3cb);if(existsSync(_0x5357e7)){_0x4ac9d3['verbose']&&console[_0x2c06d6(0xfc)]('Found\x20YAML\x20file:\x20'+_0x5357e7);let _0x1c4ffa;try{_0x1c4ffa=readFileSync(_0x5357e7,'utf-8');}catch(_0x4091d5){const _0x261026=_0x4091d5 instanceof Error?_0x4091d5[_0x2c06d6(0x120)]:String(_0x4091d5);return console['error']('Error\x20reading\x20file:\x20'+_0x261026),0x1;}const _0x3d5a06=await withSpinner(_0x2c06d6(0x269),()=>_0x1864f0['segment'][_0x2c06d6(0xe5)](_0x1c4ffa),{'verbose':_0x4ac9d3[_0x2c06d6(0x26a)]}),_0x44fb4a=_0x3d5a06[_0x2c06d6(0x1c3)],{isNew:_0x36a83b,name:_0x5b5609,hasChanges:_0x4c179e,diffFormatted:_0x2cc4ab}=_0x44fb4a;if(_0x4c179e){_0x36a83b?console[_0x2c06d6(0xfc)](_0x2c06d6(0x109)+_0x5b5609+'\x27:'):console[_0x2c06d6(0xfc)](_0x2c06d6(0x11a)+_0x5b5609+'\x27:');console['error']('─'[_0x2c06d6(0xec)](0x3c)),console[_0x2c06d6(0xfc)](_0x2cc4ab),console[_0x2c06d6(0xfc)]('─'[_0x2c06d6(0xec)](0x3c));const _0x169bdd=_0x36a83b?_0x2c06d6(0x268)+_0x5b5609+_0x2c06d6(0x149):_0x2c06d6(0x1c4)+_0x5b5609+'\x27\x20and\x20run\x20workflow?';if(!_0x4ac9d3[_0x2c06d6(0x10e)]){if(!isInteractive())return console[_0x2c06d6(0xfc)](a31_0x3024fb[_0x2c06d6(0xe9)]('\x0aError:'),_0x2c06d6(0x26f)),console[_0x2c06d6(0xfc)](a31_0x3024fb[_0x2c06d6(0x179)](_0x2c06d6(0x132))),0x1;const _0x3a9f16=await confirmKey(_0x169bdd);if(!_0x3a9f16)return console[_0x2c06d6(0xfc)](a31_0x3024fb[_0x2c06d6(0x16b)](_0x2c06d6(0x21e))),0x1;}const _0x2a3657=_0x36a83b?_0x2c06d6(0x2c6):_0x2c06d6(0x296);await withSpinner(_0x2a3657+_0x2c06d6(0x1bb)+_0x5b5609+_0x2c06d6(0x108),()=>_0x44fb4a['apply'](),{'verbose':_0x4ac9d3['verbose']});const _0x25c86b=_0x36a83b?_0x2c06d6(0x24f):_0x2c06d6(0x122);console[_0x2c06d6(0xfc)]('✔\x20'+_0x25c86b+'\x20parent\x20segment\x20\x27'+_0x5b5609+'\x27');}else console[_0x2c06d6(0xfc)]('✔\x20No\x20changes\x20-\x20\x27'+_0x5b5609+_0x2c06d6(0x240));}const _0x5ccd6a=await withSpinner(_0x2c06d6(0x257)+_0x25e3cb+_0x2c06d6(0x108),()=>_0x1864f0[_0x2c06d6(0x1e5)][_0x2c06d6(0xd3)](_0x25e3cb),{'verbose':_0x4ac9d3['verbose']}),_0x5570ac=_0x5ccd6a[_0x2c06d6(0x1c3)],_0x104351=getConsoleUrl(_0x4ac9d3['site'],_0x2c06d6(0x193)+_0x5570ac[_0x2c06d6(0x13b)]+_0x2c06d6(0x1ac)+_0x5570ac[_0x2c06d6(0x18f)]+_0x2c06d6(0x107)+_0x5570ac['workflowAttemptId']);return console['error'](_0x2c06d6(0x14c)),console[_0x2c06d6(0xfc)]('\x20\x20'+a31_0x3024fb[_0x2c06d6(0x179)]('Audience\x20ID:')+'\x20'+_0x5570ac[_0x2c06d6(0x1fd)]),console[_0x2c06d6(0xfc)]('\x20\x20'+a31_0x3024fb[_0x2c06d6(0x179)](_0x2c06d6(0x2ed))+'\x20'+_0x5570ac['status']),console[_0x2c06d6(0xfc)]('\x20\x20'+a31_0x3024fb[_0x2c06d6(0x179)](_0x2c06d6(0x208))+'\x20'+_0x5570ac[_0x2c06d6(0x18f)]),console[_0x2c06d6(0xfc)]('\x20\x20'+a31_0x3024fb['dim'](_0x2c06d6(0x16d))+'\x20'+_0x5570ac[_0x2c06d6(0x2b6)]),console['error']('\x20\x20'+_0x104351),console[_0x2c06d6(0xfc)]('\x0a'+a31_0x3024fb[_0x2c06d6(0x179)](_0x2c06d6(0xe2))+_0x2c06d6(0x180)+_0x5570ac['workflowAttemptId']+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x1f7);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x241);async[a31_0x3a88a7(0xcf)](_0x49a925){const _0x3fac89=a31_0x3a88a7,{options:_0x5c3567,args:_0x44ce5a,tdx:_0xafaf6d}=_0x49a925,_0x30ad75=_0x44ce5a[0x0]||_0x5c3567[_0x3fac89(0x226)];if(!_0x30ad75)return showParentSegmentNotSetError(_0x3fac89(0x197)+_0x3fac89(0xed)),0x1;_0x5c3567[_0x3fac89(0x26a)]&&(console[_0x3fac89(0xfc)](_0x3fac89(0x14d)+_0x5c3567[_0x3fac89(0x16a)]),console[_0x3fac89(0xfc)]('Parent\x20segment:\x20'+_0x30ad75));const _0x327476=await withSpinner(_0x3fac89(0x1e9)+_0x30ad75+'\x27...',()=>_0xafaf6d[_0x3fac89(0x1e5)][_0x3fac89(0x293)](_0x30ad75),{'verbose':_0x5c3567[_0x3fac89(0x26a)]}),_0x2e620c=_0x327476[_0x3fac89(0x1c3)];console[_0x3fac89(0xfc)](_0x3fac89(0x1d7)+_0x2e620c[_0x3fac89(0x2d7)]+'\x20field'+(_0x2e620c['length']!==0x1?'s':''));if(_0x5c3567[_0x3fac89(0x1d9)]||_0x5c3567[_0x3fac89(0x213)])return await handleSDKOutput(_0x2e620c,_0x5c3567),0x0;return displayFieldsHumanReadable(_0x2e620c,_0x30ad75),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]='segment:parent:view';['description']='Show\x20parent\x20segment\x20details';async[a31_0x3a88a7(0xcf)](_0x1ddd6e){const _0xd876d8=a31_0x3a88a7,{options:_0x52e204,args:_0x49e49f,tdx:_0x2f77d4}=_0x1ddd6e,_0x1f178c=_0x52e204,_0x8a52d1=_0x49e49f[0x0]||_0x52e204['parentSegment'];if(!_0x8a52d1)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a'+'Options:\x0a'+_0xd876d8(0x271)),0x1;_0x52e204[_0xd876d8(0x26a)]&&(console[_0xd876d8(0xfc)](_0xd876d8(0x14d)+_0x52e204['site']),console[_0xd876d8(0xfc)]('Parent\x20segment:\x20'+_0x8a52d1));const _0x548901=await withSpinner(_0xd876d8(0x2c8)+_0x8a52d1+_0xd876d8(0x108),()=>_0x2f77d4[_0xd876d8(0x1e5)][_0xd876d8(0x18b)](_0x8a52d1),{'verbose':_0x52e204[_0xd876d8(0x26a)]}),_0x2da3c5=_0x548901[_0xd876d8(0x1c3)];if(_0x1f178c[_0xd876d8(0x158)]){const _0x4b3f17=getConsoleNextUrl(_0x1f178c['site'],_0xd876d8(0x283)+_0x2da3c5['id']);return console[_0xd876d8(0xfc)](a31_0x3024fb[_0xd876d8(0x20f)]('✔')+_0xd876d8(0x18e)+a31_0x3024fb[_0xd876d8(0x2d6)](_0x4b3f17)),openBrowser(_0x4b3f17),0x0;}return await handleSingleObjectOutput(_0x2da3c5,_0x52e204),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{['name']=a31_0x3a88a7(0xdc);[a31_0x3a88a7(0x110)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async['execute'](_0x4166d1){const _0xd9d819=a31_0x3a88a7,{options:_0x14db7c,args:_0x190f66,tdx:_0x17a64b}=_0x4166d1,_0x20c9a3=_0x14db7c,_0x25196e=_0x190f66[0x0]||_0x14db7c[_0xd9d819(0x226)];if(!_0x25196e)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'+_0xd9d819(0x1b7)+_0xd9d819(0x1c7)+_0xd9d819(0x231)),0x1;_0x14db7c[_0xd9d819(0x26a)]&&(console[_0xd9d819(0xfc)]('Site:\x20'+_0x14db7c['site']),console['error'](_0xd9d819(0x1f3)+_0x25196e));const _0x45daec=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x25196e+_0xd9d819(0x108),()=>_0x17a64b['segment'][_0xd9d819(0x2c9)](_0x25196e),{'verbose':_0x14db7c[_0xd9d819(0x26a)]}),_0x4cc2fd=_0x45daec['data'],_0x41e36a=_0x17a64b['segment'][_0xd9d819(0x279)](_0x4cc2fd);if(_0x20c9a3[_0xd9d819(0x14b)]){const _0x3cadd3=await this['collectSchema'](_0x4166d1,_0x25196e,_0x4cc2fd,_0x41e36a),_0x1df894=this[_0xd9d819(0x152)](_0x3cadd3);writeFileSync(_0x20c9a3[_0xd9d819(0x14b)],_0x1df894);const _0x139dce=_0x3cadd3[_0xd9d819(0x1e1)][_0xd9d819(0x121)][_0xd9d819(0x2d7)]+_0x3cadd3[_0xd9d819(0xe3)][_0xd9d819(0x2ae)]((_0x21fcc7,_0x1c69f6)=>_0x21fcc7+_0x1c69f6[_0xd9d819(0x121)][_0xd9d819(0x2d7)],0x0),_0x3966b9=_0x3cadd3[_0xd9d819(0xe3)][_0xd9d819(0x19c)](_0x4a31dc=>_0x4a31dc[_0xd9d819(0x121)][_0xd9d819(0x2d7)]===0x0)[_0xd9d819(0x2d7)];return console[_0xd9d819(0x21c)]('Schema\x20saved\x20to\x20'+_0x20c9a3[_0xd9d819(0x14b)]),console['log'](_0xd9d819(0x1ef)+_0x41e36a),console[_0xd9d819(0x21c)]('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0x3cadd3[_0xd9d819(0xe3)][_0xd9d819(0x2d7)]+_0xd9d819(0x15e)),console['log']('\x20\x20Columns:\x20'+_0x139dce+_0xd9d819(0x294)),_0x3966b9>0x0&&console[_0xd9d819(0x21c)](_0xd9d819(0x2c7)+_0x3966b9+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console[_0xd9d819(0xfc)]('\x0a'+a31_0x3024fb[_0xd9d819(0x223)](_0xd9d819(0x21f))+'\x20'+a31_0x3024fb[_0xd9d819(0x2d6)](_0x41e36a));const _0x1ac776=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x17a64b[_0xd9d819(0x1e5)][_0xd9d819(0x276)](_0x4cc2fd),{'verbose':_0x14db7c[_0xd9d819(0x26a)]});console['error']('\x0a'+a31_0x3024fb['bold'](_0xd9d819(0x1e1))+'\x20'+a31_0x3024fb[_0xd9d819(0x179)]('('+_0x41e36a+_0xd9d819(0x2c0)));const _0x501ebe=await executeSchemaQuery(_0x1ac776[_0xd9d819(0x1c3)],_0x17a64b,_0x14db7c);await handleQueryOutput(_0x501ebe,_0x14db7c);const _0x359973=await withSpinner(_0xd9d819(0x2a5),()=>_0x17a64b['segment']['getBehaviorNames'](_0x4cc2fd),{'verbose':_0x14db7c[_0xd9d819(0x26a)]});for(const _0x2b2836 of _0x359973[_0xd9d819(0x1c3)]){const _0x436102=_0xd9d819(0x112)+_0x2b2836[_0xd9d819(0x168)]()[_0xd9d819(0x111)](/\s+/g,'_'),_0x1ddfa8=_0xd9d819(0xd5)+_0x41e36a+'.'+_0x436102;console[_0xd9d819(0xfc)]('\x0a'+a31_0x3024fb[_0xd9d819(0x223)](_0x2b2836)+'\x20'+a31_0x3024fb['dim']('('+_0x41e36a+'.'+_0x436102+')'));try{const _0x686f88=await executeSchemaQuery(_0x1ddfa8,_0x17a64b,_0x14db7c);await handleQueryOutput(_0x686f88,_0x14db7c);}catch{console[_0xd9d819(0xfc)](a31_0x3024fb[_0xd9d819(0x16b)](_0xd9d819(0xf7)));}}return 0x0;}async['collectSchema'](_0x2f7a5a,_0x5b5ec9,_0x27ce59,_0x427f50){const _0xf3b163=a31_0x3a88a7,{options:_0x39e27b,tdx:_0x58072e}=_0x2f7a5a,_0x279189=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x58072e['segment'][_0xf3b163(0x276)](_0x27ce59),{'verbose':_0x39e27b[_0xf3b163(0x26a)]}),_0x2dfd1f=await executeSchemaQuery(_0x279189['data'],_0x58072e,_0x39e27b),_0x11e9b9=_0x2dfd1f[_0xf3b163(0x1c3)][_0xf3b163(0x20b)](_0x4602d2=>({'name':_0x4602d2['column_name'],'type':_0x4602d2[_0xf3b163(0x250)]})),_0x46e588=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x58072e[_0xf3b163(0x1e5)][_0xf3b163(0x2de)](_0x27ce59),{'verbose':_0x39e27b[_0xf3b163(0x26a)]}),_0xc97144=[];for(const _0x4b8496 of _0x46e588['data']){const _0x504b63=_0xf3b163(0x112)+_0x4b8496[_0xf3b163(0x168)]()[_0xf3b163(0x111)](/\s+/g,'_'),_0x8209fd='SELECT\x20*\x20FROM\x20'+_0x427f50+'.'+_0x504b63;let _0x7d73c2=[];try{const _0x336955=await executeSchemaQuery(_0x8209fd,_0x58072e,_0x39e27b);_0x7d73c2=_0x336955[_0xf3b163(0x1c3)][_0xf3b163(0x20b)](_0x19941b=>({'name':_0x19941b[_0xf3b163(0x2ba)],'type':_0x19941b[_0xf3b163(0x250)]}));}catch{}_0xc97144[_0xf3b163(0x11b)]({'table':_0x504b63,'columns':_0x7d73c2});}return{'database':_0x427f50,'parent_segment':_0x5b5ec9,'parent_id':_0x27ce59,'customers':{'table':'customers','columns':_0x11e9b9},'behaviors':_0xc97144};}['formatSchemaJson'](_0x32fdeb){const _0x3ae812=a31_0x3a88a7,_0x16ba75=_0x964f43=>{const _0x161ada=a31_0x2b70;if(_0x964f43[_0x161ada(0x2d7)]===0x0)return'[]';const _0x524646=_0x964f43['map'](_0x35b167=>_0x161ada(0x28b)+_0x35b167[_0x161ada(0x12c)]+'\x22,\x20\x22type\x22:\x20\x22'+_0x35b167[_0x161ada(0x2b1)]+_0x161ada(0x143));return'[\x0a'+_0x524646[_0x161ada(0x1ee)](',\x0a')+'\x0a\x20\x20\x20\x20]';},_0x48a5ec=_0x32fdeb[_0x3ae812(0xe3)][_0x3ae812(0x20b)](_0xab1445=>{const _0x46a94c=_0x3ae812;return _0x46a94c(0x1a9)+_0xab1445[_0x46a94c(0x1e2)]+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20'+_0x16ba75(_0xab1445[_0x46a94c(0x121)])[_0x46a94c(0x111)](/^/gm,'\x20\x20')['trim']()+_0x46a94c(0x190);})[_0x3ae812(0x1ee)](',\x0a');return _0x3ae812(0xf3)+_0x32fdeb[_0x3ae812(0x239)]+_0x3ae812(0x254)+_0x32fdeb['parent_segment']+_0x3ae812(0x23d)+_0x32fdeb[_0x3ae812(0x23c)]+_0x3ae812(0x1e6)+_0x32fdeb['customers']['table']+_0x3ae812(0x22f)+_0x16ba75(_0x32fdeb[_0x3ae812(0x1e1)][_0x3ae812(0x121)])[_0x3ae812(0x111)](/^/gm,'\x20\x20')['trim']()+'\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a'+_0x48a5ec+'\x0a\x20\x20]\x0a}\x0a';}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x203);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x1b9);async[a31_0x3a88a7(0xcf)](_0x38332e){const _0x37fbbe=a31_0x3a88a7,{options:_0x435efb,args:_0x211135,tdx:_0xb7619}=_0x38332e,_0x12fc36=_0x211135[0x0]||_0x435efb[_0x37fbbe(0x226)];if(!_0x12fc36)return showParentSegmentNotSetError(_0x37fbbe(0xdf)+_0x37fbbe(0x216)),0x1;_0x435efb[_0x37fbbe(0x26a)]&&(console[_0x37fbbe(0xfc)](_0x37fbbe(0x14d)+_0x435efb[_0x37fbbe(0x16a)]),console[_0x37fbbe(0xfc)](_0x37fbbe(0x1f3)+_0x12fc36));const _0x58c778=await withSpinner(_0x37fbbe(0xf4)+_0x12fc36+_0x37fbbe(0x108),()=>_0xb7619[_0x37fbbe(0x1e5)][_0x37fbbe(0x2c9)](_0x12fc36),{'verbose':_0x435efb[_0x37fbbe(0x26a)]}),_0x5c05f9=_0x58c778['data'],_0x369296=await withSpinner(_0x37fbbe(0x171)+_0x12fc36+_0x37fbbe(0x108),()=>_0xb7619[_0x37fbbe(0x1e5)]['getParentSQL'](_0x5c05f9),{'verbose':_0x435efb[_0x37fbbe(0x26a)]}),_0x2181ec=_0x369296[_0x37fbbe(0x1c3)];return _0x435efb['format']==='json'||_0x435efb[_0x37fbbe(0x1b2)]===_0x37fbbe(0x213)?await handleSDKOutput([{'sql':_0x2181ec}],_0x435efb):console[_0x37fbbe(0x21c)](_0x2181ec),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']=a31_0x3a88a7(0xe7);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x1ad);async[a31_0x3a88a7(0xcf)](_0x3ee9b5){const _0x181b21=a31_0x3a88a7,{options:_0xd68e43,args:_0x2a4685,tdx:_0x467c5d}=_0x3ee9b5,_0xacb366=_0x2a4685[0x0]||_0xd68e43[_0x181b21(0x226)];if(!_0xacb366)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;_0xd68e43['verbose']&&(console['error'](_0x181b21(0x14d)+_0xd68e43[_0x181b21(0x16a)]),console[_0x181b21(0xfc)](_0x181b21(0x1f3)+_0xacb366));const _0xab2258=await withSpinner(_0x181b21(0xf4)+_0xacb366+'\x27...',()=>_0x467c5d[_0x181b21(0x1e5)][_0x181b21(0x2c9)](_0xacb366),{'verbose':_0xd68e43['verbose']}),_0x2d6585=_0xab2258[_0x181b21(0x1c3)],_0xaf70be=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0xacb366+_0x181b21(0x108),()=>_0x467c5d['segment'][_0x181b21(0x276)](_0x2d6585),{'verbose':_0xd68e43[_0x181b21(0x26a)]});let _0x43af47=_0xaf70be[_0x181b21(0x1c3)];const _0x4f1d82=resolveLimit(_0xd68e43[_0x181b21(0x28a)],DEFAULT_DISPLAY_LIMIT),_0x5d98ca=/\bLIMIT\s+\d+/i['test'](_0x43af47);!_0x5d98ca&&(_0x43af47=_0x43af47['trim']()['replace'](/;+$/,''),_0x43af47='SELECT\x20*\x20FROM\x20(\x0a'+_0x43af47+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x4f1d82);_0xd68e43[_0x181b21(0x26a)]&&console['error'](_0x181b21(0x2be)+_0x43af47);const _0x2a843d=await withProgressSpinner(_0x181b21(0x2a8),async _0x4af888=>{const _0x32575d=_0x181b21,_0x2c7049=await _0x467c5d[_0x32575d(0xdb)]['execute'](_0x43af47,{'catalog':'td','schema':_0x32575d(0x25e),'onJobId':_0x48a6b2=>{const _0x1a8b70=_0x32575d;_0x4af888[_0x1a8b70(0x11e)](_0x48a6b2);}});return _0x2c7049;},{'verbose':_0xd68e43[_0x181b21(0x26a)]}),_0x321800=_0x2a843d[_0x181b21(0x1c3)],_0xa2ff3=_0x321800[_0x181b21(0x211)]?_0x181b21(0x105)+_0x321800[_0x181b21(0x211)]+']':'';return console['error']('✔\x20Query\x20completed:\x20Processed\x20'+_0x321800[_0x181b21(0xe6)][_0x181b21(0x16c)]['toLocaleString']()+_0x181b21(0x255)+(_0x181b21(0x27d)+formatElapsed(_0x321800['stats'][_0x181b21(0x2cd)])+_0xa2ff3)),await handleQueryOutput(_0x321800,_0xd68e43),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x2a4);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x2b4);async[a31_0x3a88a7(0xcf)](_0x1a72b2){const _0x340a23=a31_0x3a88a7,{options:_0x5929c9,args:_0x1936c5,tdx:_0x31f7b}=_0x1a72b2,_0x40607e=_0x1936c5[0x0],_0x245ce6=await withSpinner(_0x40607e?_0x340a23(0x2ad)+_0x40607e+_0x340a23(0x108):_0x340a23(0x15a),()=>_0x31f7b[_0x340a23(0x229)][_0x340a23(0x2dd)](),{'verbose':_0x5929c9[_0x340a23(0x26a)]});let _0x299977=_0x245ce6['data'][_0x340a23(0x19c)](_0x2f8cb1=>_0x2f8cb1[_0x340a23(0xff)]);if(_0x40607e){const _0x5b7ed1=_0x40607e[_0x340a23(0x111)](/[.+^${}()|[\]\\]/g,_0x340a23(0x29c))[_0x340a23(0x111)](/\*/g,'.*')[_0x340a23(0x111)](/\?/g,'.'),_0x236b5b=new RegExp('^'+_0x5b7ed1+'$','i');_0x299977=_0x299977[_0x340a23(0x19c)](_0x272412=>_0x236b5b['test'](_0x272412['name']));}_0x299977[_0x340a23(0x1e8)]((_0x410d8d,_0x4d596b)=>_0x410d8d['name'][_0x340a23(0x163)](_0x4d596b[_0x340a23(0x12c)])),console[_0x340a23(0xfc)]('✔\x20Found\x20'+_0x299977['length']+_0x340a23(0x270)+(_0x299977['length']!==0x1?'s':''));const _0x4293d9=_0x48bc95=>{const _0x3a9018=_0x340a23;return getConsoleNextUrl(_0x5929c9[_0x3a9018(0x16a)],'/app/dw/parentSegments/'+_0x48bc95);};if(_0x5929c9[_0x340a23(0x1b2)]==='json'||_0x5929c9['format']==='jsonl'){const _0x5cf196=_0x299977[_0x340a23(0x20b)](_0x1b155f=>({..._0x1b155f,'url':_0x4293d9(_0x1b155f['id'])}));await handleSDKOutput(_0x5cf196,_0x5929c9);}else{if(_0x299977['length']===0x0)console['log'](_0x340a23(0x1a2));else for(const _0x162b36 of _0x299977){const _0x4c5e67=_0x162b36[_0x340a23(0x15d)]?a31_0x3024fb[_0x340a23(0x179)]('\x20('+formatRows(_0x162b36['population'])+')'):'',_0x51d565=hyperlink(_0x162b36[_0x340a23(0x12c)],_0x4293d9(_0x162b36['id']));console[_0x340a23(0x21c)]('⚡\x20'+_0x51d565+_0x4c5e67);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x2bf);['description']=a31_0x3a88a7(0x2aa);async['execute'](_0x101bfe){const _0x34888d=a31_0x3a88a7,{options:_0x3bc522,args:_0x49b9bd,tdx:_0x1cc1bf}=_0x101bfe,_0x1ac0e4=_0x49b9bd[0x0]||_0x3bc522['parentSegment'];if(!_0x1ac0e4)return showParentSegmentNotSetError(_0x34888d(0x17a)+_0x34888d(0x13f)),0x1;const _0x30fb5a=resolveYamlFile(_0x1ac0e4);if(!existsSync(_0x30fb5a))return showFileNotFoundError(_0x30fb5a,_0x1ac0e4),0x1;let _0x22afa3;try{_0x22afa3=readFileSync(_0x30fb5a,_0x34888d(0xf1));}catch(_0x2e32c9){const _0x46e542=_0x2e32c9 instanceof Error?_0x2e32c9['message']:String(_0x2e32c9);return console[_0x34888d(0xfc)](_0x34888d(0x2c3)+_0x46e542),0x1;}const _0xe03eab=createCommandSpinner(a31_0x3024fb[_0x34888d(0x179)](_0x34888d(0x11f)),{'verbose':_0x3bc522[_0x34888d(0x26a)]});_0xe03eab[_0x34888d(0x2e8)]();const _0x207d46={'realtime':!![],'onProgress':_0x1bd508=>{_0xe03eab['text']=formatProgressMessage(_0x1bd508);}};let _0x4fe05d;try{_0x4fe05d=await _0x1cc1bf['segment'][_0x34888d(0x29f)](_0x22afa3,_0x207d46),_0xe03eab[_0x34888d(0xd0)]();}catch(_0x227b7c){_0xe03eab[_0x34888d(0xd0)]();throw _0x227b7c;}console[_0x34888d(0xfc)]('\x0a'+a31_0x3024fb[_0x34888d(0x223)](_0x34888d(0x10d))+'\x20'+_0x4fe05d['name']),console[_0x34888d(0xfc)]('═'[_0x34888d(0xec)](0x3c)),displayRealtimeValidation(_0x4fe05d),console['error']('─'[_0x34888d(0xec)](0x3c));if(_0x4fe05d[_0x34888d(0x1a1)][_0x34888d(0x2d7)]>0x0){console['error']('\x0a'+a31_0x3024fb['red']('Errors:'));for(const _0x5a94fc of _0x4fe05d[_0x34888d(0x1a1)]){console[_0x34888d(0xfc)]('\x20\x20'+a31_0x3024fb[_0x34888d(0xe9)]('•')+'\x20'+_0x5a94fc);}}return _0x4fe05d['allValid']&&console['error']('\x0a'+a31_0x3024fb['green']('✔')+_0x34888d(0x234)),_0x4fe05d['allValid']?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0x3a88a7(0x192);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x1c9);async['execute'](_0x2111d7){const _0x12bbad=a31_0x3a88a7,{options:_0x3d5451,args:_0x566d7e,tdx:_0x295ee4}=_0x2111d7,_0x13a495=_0x566d7e[0x0]||_0x3d5451[_0x12bbad(0x226)];if(!_0x13a495)return showParentSegmentNotSetError(_0x12bbad(0x113)+_0x12bbad(0x178)),0x1;_0x3d5451[_0x12bbad(0x26a)]&&(console[_0x12bbad(0xfc)]('Site:\x20'+_0x3d5451[_0x12bbad(0x16a)]),console[_0x12bbad(0xfc)](_0x12bbad(0x1f3)+_0x13a495));const _0x862868=await withSpinner(_0x12bbad(0xf4)+_0x13a495+_0x12bbad(0x108),()=>_0x295ee4[_0x12bbad(0x1e5)][_0x12bbad(0x2c9)](_0x13a495),{'verbose':_0x3d5451['verbose']}),_0x754c18=_0x862868[_0x12bbad(0x1c3)],_0x5453ab=await withSpinner('Listing\x20RT\x20journeys\x20for\x20\x27'+_0x13a495+_0x12bbad(0x108),()=>_0x295ee4[_0x12bbad(0x229)][_0x12bbad(0x266)](_0x754c18),{'verbose':_0x3d5451['verbose']}),_0x1f414f=_0x5453ab[_0x12bbad(0x1c3)];console[_0x12bbad(0xfc)]('✔\x20Found\x20'+_0x1f414f[_0x12bbad(0x2d7)]+_0x12bbad(0x22c)+(_0x1f414f[_0x12bbad(0x2d7)]!==0x1?'s':''));if(_0x3d5451['format']===_0x12bbad(0x1d9)||_0x3d5451[_0x12bbad(0x1b2)]==='jsonl')await handleSDKOutput(_0x1f414f,_0x3d5451);else{if(_0x1f414f['length']===0x0)console['log'](_0x12bbad(0x12d));else for(const _0x1ac3ac of _0x1f414f){const _0x34ed80=_0x1ac3ac[_0x12bbad(0x27b)]===_0x12bbad(0x1fc)?'🚀':'📝',_0x579a78=_0x1ac3ac[_0x12bbad(0xf9)]?a31_0x3024fb['yellow'](_0x12bbad(0x2bb)):'',_0x37a27b=a31_0x3024fb[_0x12bbad(0x179)]('\x20('+_0x1ac3ac[_0x12bbad(0x2db)]+'\x20stage'+(_0x1ac3ac[_0x12bbad(0x2db)]!==0x1?'s':'')+')');console['log'](_0x34ed80+'\x20'+_0x1ac3ac['name']+_0x579a78+_0x37a27b);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{['name']='ps:rt:jn:pause';[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x1b5);async[a31_0x3a88a7(0xcf)](_0xe8a69a){const _0x2f6d0b=a31_0x3a88a7,{options:_0x2a7923,args:_0x3c0c16,tdx:_0x54bf78}=_0xe8a69a,_0x4457c8=_0x3c0c16[0x0];if(!_0x4457c8)return console['error'](a31_0x3024fb['red'](_0x2f6d0b(0x1e0))),console[_0x2f6d0b(0xfc)](_0x2f6d0b(0xe0)),console[_0x2f6d0b(0xfc)](a31_0x3024fb[_0x2f6d0b(0x179)](_0x2f6d0b(0x1ec))),0x1;_0x2a7923[_0x2f6d0b(0x26a)]&&(console['error'](_0x2f6d0b(0x14d)+_0x2a7923[_0x2f6d0b(0x16a)]),console[_0x2f6d0b(0xfc)](_0x2f6d0b(0x184)+_0x4457c8));const _0x26681f=await withSpinner(_0x2f6d0b(0x1f9)+_0x4457c8+_0x2f6d0b(0x108),()=>_0x54bf78[_0x2f6d0b(0x229)][_0x2f6d0b(0x2c5)](_0x4457c8),{'verbose':_0x2a7923[_0x2f6d0b(0x26a)]}),_0x24859a=_0x26681f['data'];console['error'](_0x2f6d0b(0xda)+_0x24859a[_0x2f6d0b(0x12c)]+'\x27');if(_0x2a7923[_0x2f6d0b(0x1b2)]===_0x2f6d0b(0x1d9)||_0x2a7923[_0x2f6d0b(0x1b2)]===_0x2f6d0b(0x213))await handleSDKOutput([_0x24859a],_0x2a7923);else{const _0x48086d=_0x24859a[_0x2f6d0b(0x27b)]==='launched'?'🚀':'📝',_0x220518=_0x24859a[_0x2f6d0b(0xf9)]?a31_0x3024fb[_0x2f6d0b(0x16b)]('\x20(paused)'):'';console[_0x2f6d0b(0x21c)](_0x48086d+'\x20'+_0x24859a[_0x2f6d0b(0x12c)]+_0x220518);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{['name']=a31_0x3a88a7(0x1f8);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x102);async['execute'](_0x4c910a){const _0x68ed5e=a31_0x3a88a7,{options:_0x524fee,args:_0x4bcca6,tdx:_0x5cabc6}=_0x4c910a,_0x193a7a=_0x4bcca6[0x0];if(!_0x193a7a)return console[_0x68ed5e(0xfc)](a31_0x3024fb['red'](_0x68ed5e(0x1e0))),console[_0x68ed5e(0xfc)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a'),console['error'](a31_0x3024fb[_0x68ed5e(0x179)]('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x524fee[_0x68ed5e(0x26a)]&&(console[_0x68ed5e(0xfc)](_0x68ed5e(0x14d)+_0x524fee[_0x68ed5e(0x16a)]),console['error'](_0x68ed5e(0x184)+_0x193a7a));const _0x3d2ed8=await withSpinner(_0x68ed5e(0x219)+_0x193a7a+_0x68ed5e(0x108),()=>_0x5cabc6['realtime'][_0x68ed5e(0x235)](_0x193a7a),{'verbose':_0x524fee[_0x68ed5e(0x26a)]}),_0x1dd6b6=_0x3d2ed8[_0x68ed5e(0x1c3)];console[_0x68ed5e(0xfc)](_0x68ed5e(0x144)+_0x1dd6b6[_0x68ed5e(0x12c)]+'\x27');if(_0x524fee[_0x68ed5e(0x1b2)]==='json'||_0x524fee['format']===_0x68ed5e(0x213))await handleSDKOutput([_0x1dd6b6],_0x524fee);else{const _0x2b87ac=_0x1dd6b6[_0x68ed5e(0x27b)]==='launched'?'🚀':'📝',_0x179f40=_0x1dd6b6[_0x68ed5e(0xf9)]?a31_0x3024fb[_0x68ed5e(0x16b)](_0x68ed5e(0x2bb)):'';console[_0x68ed5e(0x21c)](_0x2b87ac+'\x20'+_0x1dd6b6['name']+_0x179f40);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0xe8);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x27c);async[a31_0x3a88a7(0xcf)](_0x26808c){const _0x1e5ff1=a31_0x3a88a7,{options:_0x179e0d,args:_0x548de1,tdx:_0x518d4e}=_0x26808c,_0x2d3bde=_0x548de1[0x0]||_0x179e0d[_0x1e5ff1(0x226)];if(!_0x2d3bde)return showParentSegmentNotSetError(_0x1e5ff1(0x2b9)+_0x1e5ff1(0x25d)),0x1;_0x179e0d[_0x1e5ff1(0x26a)]&&(console[_0x1e5ff1(0xfc)](_0x1e5ff1(0x14d)+_0x179e0d[_0x1e5ff1(0x16a)]),console['error'](_0x1e5ff1(0x1f3)+_0x2d3bde));const _0x3b1572=await withSpinner(_0x1e5ff1(0xf4)+_0x2d3bde+_0x1e5ff1(0x108),()=>_0x518d4e[_0x1e5ff1(0x1e5)]['resolveParentId'](_0x2d3bde),{'verbose':_0x179e0d[_0x1e5ff1(0x26a)]}),_0x41c079=_0x3b1572[_0x1e5ff1(0x1c3)],_0x1a2f24=await withSpinner(_0x1e5ff1(0x141)+_0x2d3bde+_0x1e5ff1(0x108),()=>_0x518d4e[_0x1e5ff1(0x229)][_0x1e5ff1(0x1c5)](_0x41c079),{'verbose':_0x179e0d[_0x1e5ff1(0x26a)]}),_0x5aaf53=_0x1a2f24[_0x1e5ff1(0x1c3)];return console['error'](_0x1e5ff1(0x24c)),_0x179e0d[_0x1e5ff1(0x1b2)]===_0x1e5ff1(0x1d9)||_0x179e0d[_0x1e5ff1(0x1b2)]==='jsonl'?await handleSDKOutput([_0x5aaf53],_0x179e0d):(console['log']('id:\x20'+_0x5aaf53['id']),console[_0x1e5ff1(0x21c)](_0x1e5ff1(0x1cb)+_0x5aaf53['audienceId']),console[_0x1e5ff1(0x21c)](_0x1e5ff1(0x12a)+_0x5aaf53[_0x1e5ff1(0x2bc)]),console[_0x1e5ff1(0x21c)]('eventKind:\x20'+_0x5aaf53[_0x1e5ff1(0x277)]),console['log'](_0x1e5ff1(0x2d9)+_0x5aaf53[_0x1e5ff1(0x2d0)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x24d);[a31_0x3a88a7(0x110)]='List\x20personalization\x20services\x20for\x20a\x20parent\x20segment';async[a31_0x3a88a7(0xcf)](_0x5eae75){const _0x3b0f69=a31_0x3a88a7,{options:_0x3e17dd,args:_0x5722ec,tdx:_0x5ddd99}=_0x5eae75,_0x22695d=_0x5722ec[0x0]||_0x3e17dd['parentSegment'];if(!_0x22695d)return showParentSegmentNotSetError(_0x3b0f69(0xf0)+_0x3b0f69(0x104)),0x1;const _0x2afaa9=await withSpinner(_0x3b0f69(0xf4)+_0x22695d+'\x27...',()=>_0x5ddd99[_0x3b0f69(0x1e5)][_0x3b0f69(0x2c9)](_0x22695d),{'verbose':_0x3e17dd[_0x3b0f69(0x26a)]}),_0x4fa967=_0x2afaa9[_0x3b0f69(0x1c3)],_0x25827e=await withSpinner(_0x3b0f69(0x26e)+_0x22695d+'\x27...',()=>_0x5ddd99['personalization']['list'](_0x4fa967),{'verbose':_0x3e17dd['verbose']}),_0x6967af=_0x25827e[_0x3b0f69(0x1c3)];console[_0x3b0f69(0xfc)](_0x3b0f69(0x1d7)+_0x6967af['length']+_0x3b0f69(0x1dd)+(_0x6967af[_0x3b0f69(0x2d7)]!==0x1?'s':''));if(_0x3e17dd[_0x3b0f69(0x1b2)]==='json'||_0x3e17dd[_0x3b0f69(0x1b2)]===_0x3b0f69(0x213))await handleSDKOutput(_0x6967af,_0x3e17dd);else{if(_0x6967af['length']===0x0)console[_0x3b0f69(0x21c)]('No\x20personalization\x20services\x20configured'),console[_0x3b0f69(0xfc)](a31_0x3024fb[_0x3b0f69(0x2d6)](_0x3b0f69(0x176)));else for(const _0x21f6ab of _0x6967af){console[_0x3b0f69(0x21c)](a31_0x3024fb[_0x3b0f69(0x223)](_0x21f6ab[_0x3b0f69(0x12c)])+'\x20'+a31_0x3024fb[_0x3b0f69(0x179)](_0x3b0f69(0x242)+_0x21f6ab['id']+')'));_0x21f6ab['description']&&console[_0x3b0f69(0x21c)]('\x20\x20'+a31_0x3024fb[_0x3b0f69(0x179)](_0x21f6ab[_0x3b0f69(0x110)]));if(_0x21f6ab[_0x3b0f69(0x201)]&&_0x21f6ab[_0x3b0f69(0x201)][_0x3b0f69(0x2d7)]>0x0)for(const _0x4572b8 of _0x21f6ab[_0x3b0f69(0x201)]){const _0x232d72=_0x4572b8[_0x3b0f69(0x1c0)]?.[_0x3b0f69(0x2d7)]?_0x4572b8[_0x3b0f69(0x1c0)][_0x3b0f69(0x1ee)](',\x20'):'any';console[_0x3b0f69(0x21c)]('\x20\x20'+a31_0x3024fb[_0x3b0f69(0x2d6)](_0x3b0f69(0x1c8))+'\x20'+_0x4572b8[_0x3b0f69(0x12c)]+'\x20'+a31_0x3024fb[_0x3b0f69(0x179)]('(id:\x20'+_0x4572b8['id']+')')),console[_0x3b0f69(0x21c)](_0x3b0f69(0xfa)+a31_0x3024fb['dim'](_0x3b0f69(0x1de))+'\x20'+_0x232d72);}else console[_0x3b0f69(0x21c)]('\x20\x20'+a31_0x3024fb[_0x3b0f69(0x179)](_0x3b0f69(0x2c1)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x298);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x134);async[a31_0x3a88a7(0xcf)](_0x332137){const _0x262deb=a31_0x3a88a7,{options:_0x514ac1,args:_0x303564,tdx:_0x1ebaaf}=_0x332137,_0x48ccfd=_0x514ac1,_0x470b7b=_0x303564[0x0],_0x47db95=_0x303564[0x1]||_0x514ac1[_0x262deb(0x226)];if(!_0x470b7b)return console['error']('Error:\x20Service\x20name\x20is\x20required'),console['error'](_0x262deb(0x15f)),console['error'](_0x262deb(0x1bd)),0x1;if(!_0x47db95)return showParentSegmentNotSetError(_0x262deb(0x2d5)+_0x262deb(0x1bd)),0x1;const _0x51bac4=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x47db95+'\x27...',()=>_0x1ebaaf['segment'][_0x262deb(0x2c9)](_0x47db95),{'verbose':_0x514ac1[_0x262deb(0x26a)]}),_0x10a6e2=_0x51bac4[_0x262deb(0x1c3)],_0x506f39={'name':_0x470b7b,'description':_0x48ccfd['description'],'public':_0x48ccfd[_0x262deb(0x100)]},_0x3d045c=await withSpinner(_0x262deb(0xf2)+_0x470b7b+_0x262deb(0x108),()=>_0x1ebaaf[_0x262deb(0x165)]['create'](_0x10a6e2,_0x506f39),{'verbose':_0x514ac1['verbose']}),_0xc84855=_0x3d045c[_0x262deb(0x1c3)];return console[_0x262deb(0xfc)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0xc84855[_0x262deb(0x12c)]+_0x262deb(0x25a)+_0xc84855['id']),await handleSDKOutput([_0xc84855],_0x514ac1),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x299);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0xde);async['execute'](_0x5dcab1){const _0x5353e0=a31_0x3a88a7,{options:_0x555f21,args:_0x5b7242,tdx:_0x33b87b}=_0x5dcab1,_0x4dcb08=_0x5b7242[0x0],_0xbfd1ad=_0x5b7242[0x1]||_0x555f21[_0x5353e0(0x226)];if(!_0x4dcb08)return console['error'](_0x5353e0(0x13e)),console[_0x5353e0(0xfc)](_0x5353e0(0x282)),console[_0x5353e0(0xfc)](_0x5353e0(0x27f)),0x1;if(!_0xbfd1ad)return showParentSegmentNotSetError(_0x5353e0(0x183)+_0x5353e0(0x27f)),0x1;const _0x1bb4b9=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xbfd1ad+_0x5353e0(0x108),()=>_0x33b87b['segment'][_0x5353e0(0x2c9)](_0xbfd1ad),{'verbose':_0x555f21[_0x5353e0(0x26a)]}),_0x4e5bcd=_0x1bb4b9[_0x5353e0(0x1c3)],_0x10fb45=await withSpinner(_0x5353e0(0x27e)+_0x4dcb08+'\x27...',()=>_0x33b87b[_0x5353e0(0x165)][_0x5353e0(0x1d4)](_0x4e5bcd,_0x4dcb08),{'verbose':_0x555f21['verbose']}),_0x199896=_0x10fb45[_0x5353e0(0x1c3)];if(_0x555f21['json']||_0x555f21[_0x5353e0(0x213)])await handleSDKOutput([_0x199896],_0x555f21);else{console['log'](a31_0x3024fb[_0x5353e0(0x223)](_0x199896['name'])+'\x20'+a31_0x3024fb['dim'](_0x5353e0(0x242)+_0x199896['id']+')'));_0x199896['description']&&console[_0x5353e0(0x21c)]('\x20\x20'+a31_0x3024fb['dim'](_0x199896[_0x5353e0(0x110)]));console[_0x5353e0(0x21c)]('\x20\x20'+a31_0x3024fb[_0x5353e0(0x2d6)](_0x5353e0(0x187))+'\x20'+(_0x199896[_0x5353e0(0x100)]?'yes':'no'));if(_0x199896[_0x5353e0(0x201)]&&_0x199896['tokens'][_0x5353e0(0x2d7)]>0x0)for(const _0x51a66a of _0x199896[_0x5353e0(0x201)]){const _0x5289c1=_0x51a66a[_0x5353e0(0x1c0)]?.[_0x5353e0(0x2d7)]?_0x51a66a[_0x5353e0(0x1c0)][_0x5353e0(0x1ee)](',\x20'):_0x5353e0(0x274);console[_0x5353e0(0x21c)]('\x20\x20'+a31_0x3024fb[_0x5353e0(0x2d6)](_0x5353e0(0x1c8))+'\x20'+_0x51a66a[_0x5353e0(0x12c)]+'\x20'+a31_0x3024fb[_0x5353e0(0x179)]('(id:\x20'+_0x51a66a['id']+')')),console[_0x5353e0(0x21c)](_0x5353e0(0xfa)+a31_0x3024fb[_0x5353e0(0x179)]('allowed\x20IPs:')+'\x20'+_0x5289c1);}else console['log']('\x20\x20'+a31_0x3024fb[_0x5353e0(0x179)](_0x5353e0(0x2c1)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x1d0);['description']='Delete\x20a\x20personalization\x20service';async[a31_0x3a88a7(0xcf)](_0x654d92){const _0x3bb778=a31_0x3a88a7,{options:_0x2b268f,args:_0x1b5803,tdx:_0x3373cb}=_0x654d92,_0x148fd0=_0x1b5803[0x0],_0x231172=_0x1b5803[0x1]||_0x2b268f[_0x3bb778(0x226)];if(!_0x148fd0)return console[_0x3bb778(0xfc)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x3bb778(0xfc)](_0x3bb778(0x1aa)),console[_0x3bb778(0xfc)](_0x3bb778(0x2a7)),0x1;if(!_0x231172)return showParentSegmentNotSetError(_0x3bb778(0x18d)+_0x3bb778(0x2a7)),0x1;const _0x57f2c9=await withSpinner(_0x3bb778(0xf4)+_0x231172+'\x27...',()=>_0x3373cb[_0x3bb778(0x1e5)][_0x3bb778(0x2c9)](_0x231172),{'verbose':_0x2b268f['verbose']}),_0x2c7126=_0x57f2c9[_0x3bb778(0x1c3)];return await withSpinner('Deleting\x20personalization\x20service\x20\x27'+_0x148fd0+'\x27...',()=>_0x3373cb[_0x3bb778(0x165)][_0x3bb778(0x142)](_0x2c7126,_0x148fd0),{'verbose':_0x2b268f['verbose']}),console[_0x3bb778(0xfc)](_0x3bb778(0x22e)+_0x148fd0+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x2ef);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x10a);async['execute'](_0x39a88f){const _0x292715=a31_0x3a88a7,{options:_0x126fae,args:_0x1934b4,tdx:_0x4848c6}=_0x39a88f,_0x16afc0=_0x126fae,_0x4c1bd8=_0x1934b4[0x0],_0x74749=_0x1934b4[0x1]||_0x126fae[_0x292715(0x226)];if(!_0x4c1bd8)return console[_0x292715(0xfc)](_0x292715(0x13e)),console[_0x292715(0xfc)](_0x292715(0x1f5)),console[_0x292715(0xfc)](_0x292715(0x1a5)),0x1;if(!_0x16afc0[_0x292715(0x12c)])return console[_0x292715(0xfc)](_0x292715(0x2d1)),console[_0x292715(0xfc)](_0x292715(0x1f5)),0x1;if(!_0x74749)return showParentSegmentNotSetError(_0x292715(0x215)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x5f32a8=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x74749+_0x292715(0x108),()=>_0x4848c6[_0x292715(0x1e5)][_0x292715(0x2c9)](_0x74749),{'verbose':_0x126fae[_0x292715(0x26a)]}),_0x20cd88=_0x5f32a8[_0x292715(0x1c3)],_0x184245={'name':_0x16afc0['name']};_0x16afc0[_0x292715(0x110)]!==undefined&&(_0x184245[_0x292715(0x110)]=_0x16afc0[_0x292715(0x110)]);const _0x1e94ac=await withSpinner(_0x292715(0x221)+_0x4c1bd8+_0x292715(0x108),()=>_0x4848c6[_0x292715(0x165)][_0x292715(0x230)](_0x20cd88,_0x4c1bd8,_0x184245),{'verbose':_0x126fae[_0x292715(0x26a)]}),_0x5ede85=_0x1e94ac[_0x292715(0x1c3)];return console[_0x292715(0xfc)](_0x292715(0x198)+_0x5ede85[_0x292715(0x12c)]+'\x27'),await handleSDKOutput([_0x5ede85],_0x126fae),0x0;}}function a31_0x547b(){const _0x2edc9e=['Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','join','\x20\x20Database:\x20','enriched','sourceTableError','\x20No\x20changes\x20-\x20','Parent\x20segment:\x20','listParents','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Available\x20behaviors:','segment:parent:fields','ps:rt:jn:resume','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','45jBkqfo','ps:pz:show','launched','audienceId','rowCount','displayColumns','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','tokens','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','segment:parent:sql','\x0aUsage:\x20tdx\x20ps\x20preview\x20','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','👥\x20','double','Session:','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','map','payload:','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','win32','green','Listing\x20parent\x20segments\x20matching\x20\x27','jobId','Error:\x20File\x20not\x20found:\x20','jsonl','ps:pz:patch','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','displayPreviewResults','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','segment:parent:update','updated:','log','\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','Aborted.','Output\x20Database:','entryCriteria:','Updating\x20personalization\x20service\x20\x27','Overwrite\x20\x27','bold','parentFolder','segment:parent:validate','parentSegment','number','To\x20view\x20sample\x20data:','realtime','2717812AmftUl','parent_segments','\x20RT\x20journey','\x20service','✔\x20Deleted\x20personalization\x20service\x20\x27','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','patch','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','RT\x202.0:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','\x20RT\x20configuration\x20is\x20valid','resumeJourney','user_id','391670VkaLtb','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','database','Errors:','Error:','parent_id','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','\x27\x20is\x20up\x20to\x20date','List\x20available\x20fields\x20for\x20segmentation','(id:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','/\x20→\x20','stitchingKeys','displayPreviewHints','page_view','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','ps:pz:init','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','ignore','✔\x20Retrieved\x20RT\x20configuration\x20version','ps:pz:service:list','Updating\x20parent\x20segment\x20\x27','Created','column_type','✔\x20Renamed\x20directory\x20to\x20','`\x20to\x20download\x20the\x20configuration\x20first','scheduleOption','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','\x20rows\x20','displayBehaviorsStats','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','totalEvents','displayAttributesStats','\x27\x20with\x20ID:\x20','\x20\x20\x20\x20-\x20','getPersonalization','\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','information_schema','\x20personalization','realtime:','✔\x20Found\x20personalization\x20\x27','patchPersonalization','\x27\x20(id:\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','customerGroupFile','listJourneys','session','Create\x20parent\x20segment\x20\x27','Analyzing\x20changes...','verbose','idStitching','audienceId:','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Listing\x20personalization\x20services\x20for\x20\x27','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20RT-enabled\x20parent\x20segment','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','any','valid','getParentSQL','eventKind','ps:pz:service:token:delete','getOutputDatabaseName','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','state','Get\x20current\x20RT\x20configuration\x20version\x20status','in\x20','Fetching\x20personalization\x20service\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','ID\x20Stitching:','platform','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','/app/dw/parentSegments/','deletePersonalization','folder-segment','displayMasterInfo','Update\x20a\x20realtime\x20personalization\x20entity','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','Master\x20+\x20Attributes','limit','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','1083804ongiJL','Available\x20attributes:','\x20configured','\x27\x20is\x20already\x20up\x20to\x20date','\x20to\x20configure\x20your\x20personalization\x20service','\x20=\x20','listFields','\x20total','scheduleType','Updating','Error:\x20Token\x20\x27','ps:pz:service:create','ps:pz:service:show','Personalization\x20service\x20description','Error:\x20--behavior\x20requires\x20a\x20name\x0a','\x5c$&','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','listPersonalizations','validateParentYaml','sampleData','No\x20parent\x20segments\x20match\x20pattern:\x20','use','\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','ps:rt:list','Fetching\x20behavior\x20list...','Source:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','Executing\x20parent\x20segment\x20query...','updateParent','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','schemaError','true','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','reduce','column','deleteToken','type','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','matchedCount','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','behavior','workflowAttemptId','\x20true','✔\x20Deleted\x20personalization\x20\x27','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','column_name','\x20(paused)','identifier','behaviorsFile','SQL\x20query:\x0a','ps:rt:validate','.customers)','no\x20tokens\x20configured','last_page_viewed','Error\x20reading\x20file:\x20','\x20\x202.\x20Run\x20','pauseJourney','Creating','\x20\x20Note:\x20','Fetching\x20parent\x20segment\x20\x27','resolveParentId','-1d','Creating\x20parent\x20segment\x20\x27','No\x20personalizations\x20configured','elapsedTimeMillis','tdx\x20ps\x20push\x20','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','status','Error:\x20--name\x20is\x20required','Join\x20on:','addAttributes','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','cyan','length','darwin','status:\x20','\x0a⚠️\x20\x20Both\x20','stageCount','includeSensitive:','list','getBehaviorNames','primaryKey','Customers:','toFixed','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','YAML\x20file:\x20','folderId','indexOf','Master\x20Table','Personalization:','start','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','relationships','personalization_services','\x20--attribute\x20\x22<name>\x22','Status:','ps:pz:create','ps:pz:service:update','preview','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','coveragePercent','execute','stop','createdAt','open','runParent','dirname','SELECT\x20*\x20FROM\x20','Default','523434DbLaya','segment:parent:push','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','query','segment:parent:desc','displaySampleData','Show\x20personalization\x20service\x20details','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','null','To\x20cancel:','behaviors','segment:parent:list','pushParentYaml','stats','segment:parent:show','ps:rt:configuration_versions','red','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','file','repeat','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','master','includeSensitive','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','utf-8','Creating\x20personalization\x20service\x20\x27','{\x0a\x20\x20\x22database\x22:\x20\x22','Resolving\x20parent\x20segment\x20\x27','Show\x20a\x20specific\x20realtime\x20personalization','joinKey','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','Delete\x20a\x20realtime\x20personalization','paused','\x20\x20\x20\x20','displaySummary','error','\x20is\x20already\x20up\x20to\x20date','customerPercent','realtime_enabled','public','schemaValid','Resume\x20activations\x20in\x20an\x20RT\x20journey','pullParentYaml','\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','\x20[Job\x20ID:\x20','\x20--interval\x20','/attempt/','\x27...','\x0aNew\x20parent\x20segment\x20\x27','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','split','✔\x20Updated\x20parent\x20segment\x20\x27','RT\x202.0\x20Validate:','yes','createToken','description','replace','behavior_','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','td_client_id','customerGroup','Error:\x20--attribute\x20requires\x20a\x20name\x0a','\x20rows)','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x0aChanges\x20to\x20apply\x20to\x20\x27','push','.yml','segment:parent:preview','setJobId','Validating\x20RT\x20configuration...','message','columns','Updated','✔\x20No\x20changes\x20-\x20\x27','✔\x20Created\x20token\x20\x27','interval','keyEventCriteria','using\x20the\x20default\x20path:\x20','test','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','identifier:\x20','\x20+\x20[','name','No\x20RT\x20journeys\x20found','Create\x20a\x20realtime\x20personalization\x20entity','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','Listing\x20personalizations\x20for\x20\x27','payload','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Options\x20(one\x20required):\x0a','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','isDirectory','Validate:','addBehaviors','Listing\x20parent\x20segments...','addBehaviorsFile','Join:','workflowId','parent_segment','label','Error:\x20Service\x20ID\x20is\x20required','\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','Error:\x20Personalization\x20ID\x20is\x20required','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','delete','\x22\x20}','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','Output\x20file:\x20','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','keyEventId:','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x27\x20and\x20run\x20workflow?','\x20Configuration\x20is\x20valid','output','\x0a✔\x20Workflow\x20started','Site:\x20','foreignKey','attributesFile','/\x20and\x20','Behaviors','formatSchemaJson','trim','Name:\x20','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','My\x20Service','single','web','keyEventId','Listing\x20RT-enabled\x20parent\x20segments...','Master:','displayValidateResults','population','\x20behaviors','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','allValid','endsWith','3tovwBl','localeCompare','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','personalization','segment:parent:run','/\x20directories\x20exist.','toLowerCase','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','site','yellow','processedRows','Attempt:','1691085jtVVxx','tdx\x20ps\x20preview\x20','customersWithEvents','Fetching\x20SQL\x20for\x20\x27','Rows:','\x0aNo\x20sample\x20data\x20available','Pattern:\x20','\x0aError:','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','segment:parent:create','\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','dim','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','Finding\x20service\x20for\x20token...','FINISHED','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','\x20tdx\x20wf\x20attempt\x20','updatedAt','match','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','RT\x20Journey\x20ID:\x20','✔\x20Updated\x20personalization\x20\x27','Deleting\x20personalization\x20\x27','public:','\x20\x20\x20\x20\x20\x20\x20\x20','string','\x20--enriched','getParentFull','\x20--behavior\x20\x22','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','\x20Opening\x20','workflowSessionId','\x0a\x20\x20\x20\x20}','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','ps:rt:jn:list','/app/workflows/','7FCnXGT','Next\x20steps:','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','✔\x20Updated\x20personalization\x20service\x20\x27','Events:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','text','filter','/\x20directory.\x0a','xdg-open','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','ps:pz:list','errors','No\x20RT-enabled\x20parent\x20segments\x20found','Creating\x20token\x20\x27','events','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','all','Attributes:','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','/sessions/','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','Columns:','entryCriteria','List\x20parent\x20segments','personalizationServices','format','5490800BaWwoL','sections','Pause\x20activations\x20in\x20an\x20RT\x20journey','value','\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','\x20Added\x20personalization\x20template\x20to\x20','Get\x20SQL\x20query\x20for\x20parent\x20segment','✔\x20Created\x20personalization\x20\x27','\x20parent\x20segment\x20\x27','\x20--behavior\x20\x22<name>\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','\x20--attribute\x20\x22','run','allowedIps','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','displayRealtimeInfo','data','Apply\x20changes\x20to\x20\x27','getCurrentConfigVersion','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','Options:\x0a','token:','List\x20RT\x20journeys','attribute','audienceId:\x20','\x20to\x20push\x20the\x20configuration','attributes','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','\x20\x20\x20','ps:pz:service:delete','.yaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','3510370qGrTkh','get','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','sourceTableValid','✔\x20Found\x20','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','json','Deleting\x20token\x20\x27','segment:parent:pull','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','\x20personalization\x20service','allowed\x20IPs:','Options:','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','customers','table','Error:\x20--database\x20and\x20--table\x20are\x20required','Fetching\x20sample\x20data...','segment','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','\x20Added\x20RT\x202.0\x20template\x20section','sort','Listing\x20fields\x20for\x20\x27','Behavior:','timezone'];a31_0x547b=function(){return _0x2edc9e;};return a31_0x547b();}export class PSPzServiceTokenCreateCommand extends BaseCommand{['name']='ps:pz:service:token:create';[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x2cf);async[a31_0x3a88a7(0xcf)](_0x1cf28b){const _0x4521cc=a31_0x3a88a7,{options:_0x730d85,args:_0xc612bc,tdx:_0x308239}=_0x1cf28b,_0x5eab58=_0x730d85,_0x2036ca=_0xc612bc[0x0],_0x55ce00=_0xc612bc[0x1],_0x14804f=_0xc612bc[0x2]||_0x730d85[_0x4521cc(0x226)];if(!_0x2036ca)return console['error']('Error:\x20Token\x20name\x20is\x20required'),console[_0x4521cc(0xfc)](_0x4521cc(0x200)),console[_0x4521cc(0xfc)](_0x4521cc(0x191)),0x1;if(!_0x55ce00)return console['error'](_0x4521cc(0x13e)),console[_0x4521cc(0xfc)](_0x4521cc(0x200)),console['error'](_0x4521cc(0x191)),0x1;if(!_0x14804f)return showParentSegmentNotSetError(_0x4521cc(0x129)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x2abba4=await withSpinner(_0x4521cc(0xf4)+_0x14804f+'\x27...',()=>_0x308239[_0x4521cc(0x1e5)][_0x4521cc(0x2c9)](_0x14804f),{'verbose':_0x730d85[_0x4521cc(0x26a)]}),_0xbfc085=_0x2abba4[_0x4521cc(0x1c3)],_0x4c5f85={'name':_0x2036ca};_0x5eab58[_0x4521cc(0x1c0)]&&(_0x4c5f85[_0x4521cc(0x1c0)]=_0x5eab58['allowedIps'][_0x4521cc(0x10b)](',')['map'](_0x453c57=>_0x453c57[_0x4521cc(0x153)]()));_0x5eab58[_0x4521cc(0x110)]&&(_0x4c5f85['description']=_0x5eab58[_0x4521cc(0x110)]);const _0x23b675=await withSpinner(_0x4521cc(0x1a3)+_0x2036ca+'\x27\x20for\x20service\x20\x27'+_0x55ce00+_0x4521cc(0x108),()=>_0x308239['personalization'][_0x4521cc(0x10f)](_0xbfc085,_0x55ce00,_0x4c5f85),{'verbose':_0x730d85[_0x4521cc(0x26a)]}),_0x5dd42c=_0x23b675[_0x4521cc(0x1c3)];return console['error'](_0x4521cc(0x124)+_0x5dd42c[_0x4521cc(0x12c)]+_0x4521cc(0x25a)+_0x5dd42c['id']),_0x5dd42c['value']&&(console['error'](a31_0x3024fb[_0x4521cc(0x16b)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0x4521cc(0xfc)](a31_0x3024fb[_0x4521cc(0x2d6)](_0x5dd42c[_0x4521cc(0x1b6)])),console[_0x4521cc(0xfc)]('')),await handleSDKOutput([_0x5dd42c],_0x730d85),0x0;}}function a31_0x2b70(_0x486c04,_0x2f1687){_0x486c04=_0x486c04-0xcd;const _0x547b24=a31_0x547b();let _0x2b70ba=_0x547b24[_0x486c04];return _0x2b70ba;}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x278);[a31_0x3a88a7(0x110)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async['execute'](_0x2b846b){const _0x29d590=a31_0x3a88a7,{options:_0xc8a166,args:_0x449310,tdx:_0x1bbe41}=_0x2b846b,_0x1e87dc=_0x449310[0x0],_0x1bd492=_0x449310[0x1]||_0xc8a166[_0x29d590(0x226)];if(!_0x1e87dc)return console[_0x29d590(0xfc)]('Error:\x20Token\x20ID\x20is\x20required'),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console[_0x29d590(0xfc)](_0x29d590(0x1d2)),0x1;if(!_0x1bd492)return showParentSegmentNotSetError(_0x29d590(0x272)+_0x29d590(0x1d2)),0x1;const _0x565811=await withSpinner(_0x29d590(0xf4)+_0x1bd492+_0x29d590(0x108),()=>_0x1bbe41[_0x29d590(0x1e5)]['resolveParentId'](_0x1bd492),{'verbose':_0xc8a166[_0x29d590(0x26a)]}),_0x285dae=_0x565811[_0x29d590(0x1c3)],_0x326907=await withSpinner(_0x29d590(0x17b),()=>_0x1bbe41['personalization']['list'](_0x285dae),{'verbose':_0xc8a166[_0x29d590(0x26a)]}),_0x5b4ee2=_0x326907[_0x29d590(0x1c3)];let _0x3d712d;for(const _0x521c3e of _0x5b4ee2){if(_0x521c3e[_0x29d590(0x201)]?.['some'](_0x18c40a=>_0x18c40a['id']===_0x1e87dc)){_0x3d712d=_0x521c3e['id'];break;}}if(!_0x3d712d)return console[_0x29d590(0xfc)](_0x29d590(0x297)+_0x1e87dc+_0x29d590(0x1dc)),0x1;const _0x81de87=await withSpinner(_0x29d590(0x1da)+_0x1e87dc+_0x29d590(0x108),()=>_0x1bbe41[_0x29d590(0x165)][_0x29d590(0x2b0)](_0x285dae,_0x3d712d,_0x1e87dc),{'verbose':_0xc8a166[_0x29d590(0x26a)]}),_0x40b3e9=_0x81de87['data'];return console[_0x29d590(0xfc)]('✔\x20Deleted\x20token\x20\x27'+(_0x40b3e9[_0x29d590(0x12c)]||_0x1e87dc)+'\x27'),await handleSDKOutput([_0x40b3e9],_0xc8a166),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x1a0);['description']=a31_0x3a88a7(0x148);async[a31_0x3a88a7(0xcf)](_0x2bae6e){const _0x19d821=a31_0x3a88a7,{options:_0x386cfc,args:_0x39f357,tdx:_0x4e9fe9}=_0x2bae6e,_0x19ed43=_0x39f357[0x0]||_0x386cfc[_0x19d821(0x226)];if(!_0x19ed43)return showParentSegmentNotSetError(_0x19d821(0x238)+_0x19d821(0x2a3)),0x1;const _0x3978a5=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x19ed43+_0x19d821(0x108),()=>_0x4e9fe9[_0x19d821(0x1e5)]['resolveParentId'](_0x19ed43),{'verbose':_0x386cfc['verbose']}),_0x56f9da=_0x3978a5[_0x19d821(0x1c3)],_0x1d33cf=await withSpinner(_0x19d821(0x130)+_0x19ed43+'\x27...',()=>_0x4e9fe9[_0x19d821(0x165)][_0x19d821(0x29e)](_0x56f9da),{'verbose':_0x386cfc[_0x19d821(0x26a)]}),_0x770569=_0x1d33cf[_0x19d821(0x1c3)];console['error'](_0x19d821(0x1d7)+_0x770569[_0x19d821(0x2d7)]+_0x19d821(0x25f)+(_0x770569[_0x19d821(0x2d7)]!==0x1?'s':''));if(_0x386cfc[_0x19d821(0x1b2)]===_0x19d821(0x1d9)||_0x386cfc[_0x19d821(0x1b2)]===_0x19d821(0x213))await handleSDKOutput(_0x770569,_0x386cfc);else{if(_0x770569['length']===0x0)console[_0x19d821(0x21c)](_0x19d821(0x2cc));else for(const _0x365495 of _0x770569){console[_0x19d821(0x21c)](a31_0x3024fb['bold'](_0x365495[_0x19d821(0x12c)])+'\x20'+a31_0x3024fb[_0x19d821(0x179)]('(id:\x20'+_0x365495['id']+')'));_0x365495[_0x19d821(0x110)]&&console['log']('\x20\x20'+a31_0x3024fb[_0x19d821(0x179)](_0x365495[_0x19d821(0x110)]));const _0x505785=_0x365495[_0x19d821(0x1b4)]?.[_0x19d821(0x2d7)]||0x0;console[_0x19d821(0x21c)]('\x20\x20'+a31_0x3024fb['cyan']('sections:')+'\x20'+_0x505785);if(_0x365495[_0x19d821(0x1b4)]&&_0x365495[_0x19d821(0x1b4)][_0x19d821(0x2d7)]>0x0)for(const _0x2e328b of _0x365495['sections']){console['log'](_0x19d821(0x25b)+_0x2e328b[_0x19d821(0x12c)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x1fb);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0xf5);async[a31_0x3a88a7(0xcf)](_0x1d2f37){const _0x59ac4b=a31_0x3a88a7,{options:_0x3a459,args:_0x5e4474,tdx:_0x42a518}=_0x1d2f37,_0x3e65d4=_0x5e4474[0x0];if(!_0x3e65d4)return console[_0x59ac4b(0xfc)](_0x59ac4b(0x140)),console[_0x59ac4b(0xfc)](_0x59ac4b(0xea)),0x1;const _0x34e0d1=await withSpinner('Getting\x20personalization\x20\x27'+_0x3e65d4+_0x59ac4b(0x108),()=>_0x42a518[_0x59ac4b(0x165)][_0x59ac4b(0x25c)](_0x3e65d4),{'verbose':_0x3a459[_0x59ac4b(0x26a)]}),_0x3c5b91=_0x34e0d1['data'];console[_0x59ac4b(0xfc)](_0x59ac4b(0x261)+_0x3c5b91[_0x59ac4b(0x12c)]+'\x27');if(_0x3a459[_0x59ac4b(0x1b2)]===_0x59ac4b(0x1d9)||_0x3a459[_0x59ac4b(0x1b2)]===_0x59ac4b(0x213))await handleSDKOutput([_0x3c5b91],_0x3a459);else{console[_0x59ac4b(0x21c)](a31_0x3024fb[_0x59ac4b(0x223)](_0x3c5b91[_0x59ac4b(0x12c)])+'\x20'+a31_0x3024fb[_0x59ac4b(0x179)](_0x59ac4b(0x242)+_0x3c5b91['id']+')'));_0x3c5b91[_0x59ac4b(0x110)]&&console[_0x59ac4b(0x21c)]('\x20\x20'+a31_0x3024fb['dim'](_0x3c5b91[_0x59ac4b(0x110)]));_0x3c5b91['audienceId']&&console[_0x59ac4b(0x21c)]('\x20\x20'+a31_0x3024fb[_0x59ac4b(0x2d6)](_0x59ac4b(0x26c))+'\x20'+_0x3c5b91[_0x59ac4b(0x1fd)]);console[_0x59ac4b(0x21c)]('\x20\x20'+a31_0x3024fb[_0x59ac4b(0x2d6)]('created:')+'\x20'+_0x3c5b91[_0x59ac4b(0xd1)]),console['log']('\x20\x20'+a31_0x3024fb[_0x59ac4b(0x2d6)](_0x59ac4b(0x21b))+'\x20'+_0x3c5b91[_0x59ac4b(0x181)]);const _0x436bed=_0x3c5b91[_0x59ac4b(0x1b4)]?.['length']||0x0;console[_0x59ac4b(0x21c)]('\x20\x20'+a31_0x3024fb[_0x59ac4b(0x2d6)]('sections:')+'\x20'+_0x436bed);if(_0x3c5b91[_0x59ac4b(0x1b4)]&&_0x3c5b91[_0x59ac4b(0x1b4)][_0x59ac4b(0x2d7)]>0x0)for(const _0x1ec6fb of _0x3c5b91['sections']){console[_0x59ac4b(0x21c)](_0x59ac4b(0xfa)+a31_0x3024fb[_0x59ac4b(0x223)](_0x1ec6fb[_0x59ac4b(0x12c)])+'\x20'+a31_0x3024fb['dim']('(id:\x20'+_0x1ec6fb['id']+')')),_0x1ec6fb[_0x59ac4b(0x1af)]&&(console['log'](_0x59ac4b(0x114)+a31_0x3024fb[_0x59ac4b(0x2d6)](_0x59ac4b(0x220))+'\x20'+_0x1ec6fb[_0x59ac4b(0x1af)][_0x59ac4b(0x12c)]),_0x1ec6fb['entryCriteria'][_0x59ac4b(0x126)]?.[_0x59ac4b(0x159)]&&console['log'](_0x59ac4b(0x188)+a31_0x3024fb['cyan'](_0x59ac4b(0x147))+'\x20'+_0x1ec6fb[_0x59ac4b(0x1af)]['keyEventCriteria'][_0x59ac4b(0x159)])),_0x1ec6fb[_0x59ac4b(0x131)]&&console['log']('\x20\x20\x20\x20\x20\x20'+a31_0x3024fb['cyan'](_0x59ac4b(0x20c))+'\x20'+JSON['stringify'](_0x1ec6fb['payload'])),_0x1ec6fb[_0x59ac4b(0xef)]&&console['log'](_0x59ac4b(0x114)+a31_0x3024fb[_0x59ac4b(0x2d6)](_0x59ac4b(0x2dc))+_0x59ac4b(0x2b7));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{['name']='ps:pz:delete';['description']=a31_0x3a88a7(0xf8);async['execute'](_0xa8a39){const _0x15df8d=a31_0x3a88a7,{options:_0x216c98,args:_0xeb1021,tdx:_0x489758}=_0xa8a39,_0x46d780=_0xeb1021[0x0];if(!_0x46d780)return console[_0x15df8d(0xfc)](_0x15df8d(0x140)),console['error'](_0x15df8d(0x288)),0x1;return await withSpinner(_0x15df8d(0x186)+_0x46d780+'\x27...',()=>_0x489758[_0x15df8d(0x165)][_0x15df8d(0x284)](_0x46d780),{'verbose':_0x216c98[_0x15df8d(0x26a)]}),console[_0x15df8d(0xfc)](_0x15df8d(0x2b8)+_0x46d780+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x2ee);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x12e);async[a31_0x3a88a7(0xcf)](_0x49487b){const _0xb93b11=a31_0x3a88a7,{options:_0x169917,tdx:_0x5b6692}=_0x49487b,_0x2aa5d9=_0x169917;let _0x2d2b7d;if(_0x2aa5d9[_0xb93b11(0xeb)]){_0x2d2b7d=await loadJSON(_0x2aa5d9[_0xb93b11(0xeb)],!![]);if(!_0x2d2b7d[_0xb93b11(0x2ea)]?.[_0xb93b11(0x224)])return console[_0xb93b11(0xfc)](_0xb93b11(0x1ed)),console[_0xb93b11(0xfc)]('Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:'),console[_0xb93b11(0xfc)]('\x20\x20\x22relationships\x22:\x20{\x20\x22parentFolder\x22:\x20{\x20\x22data\x22:\x20{\x20\x22id\x22:\x20\x22<id>\x22,\x20\x22type\x22:\x20\x22folder-segment\x22\x20}\x20}\x20}'),0x1;}else{if(!_0x2aa5d9[_0xb93b11(0x12c)])return console[_0xb93b11(0xfc)](_0xb93b11(0x155)),console['error'](_0xb93b11(0x202)),console['error'](_0xb93b11(0x19a)),0x1;if(_0x2aa5d9['description']===undefined)return console[_0xb93b11(0xfc)](_0xb93b11(0x146)),console[_0xb93b11(0xfc)](_0xb93b11(0x202)),console[_0xb93b11(0xfc)](_0xb93b11(0x19a)),0x1;if(_0x2aa5d9[_0xb93b11(0x2e4)]===undefined)return console[_0xb93b11(0xfc)](_0xb93b11(0x1c6)),console['error']('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x3b0c2e=_0x2aa5d9[_0xb93b11(0x1fd)];if(!_0x3b0c2e&&_0x169917['parentSegment']){const _0xab2f97=await withSpinner(_0xb93b11(0xf4)+_0x169917[_0xb93b11(0x226)]+'\x27...',()=>_0x5b6692[_0xb93b11(0x1e5)][_0xb93b11(0x2c9)](_0x169917['parentSegment']),{'verbose':_0x169917['verbose']});_0x3b0c2e=_0xab2f97['data'];}let _0x30ba95;_0x2aa5d9[_0xb93b11(0x1b4)]&&(_0x30ba95=await loadJSON(_0x2aa5d9[_0xb93b11(0x1b4)],![]));const _0x3e2fd5=_0x2aa5d9[_0xb93b11(0x2e4)]===_0xb93b11(0xe1)?null:{'id':_0x2aa5d9[_0xb93b11(0x2e4)],'type':_0xb93b11(0x285)};_0x2d2b7d={'attributes':{'name':_0x2aa5d9['name'],'description':_0x2aa5d9[_0xb93b11(0x110)]||null,..._0x3b0c2e!==undefined&&{'audienceId':_0x3b0c2e},..._0x30ba95!==undefined&&{'sections':_0x30ba95}},'relationships':{'parentFolder':{'data':_0x3e2fd5}}};}const _0x4e62e3=await withSpinner('Creating\x20personalization\x20\x27'+(_0x2d2b7d[_0xb93b11(0x1cd)]?.[_0xb93b11(0x12c)]??'')+'\x27...',()=>_0x5b6692[_0xb93b11(0x165)]['createPersonalization'](_0x2d2b7d),{'verbose':_0x169917['verbose']}),_0x19ef20=_0x4e62e3['data'];return console[_0xb93b11(0xfc)](_0xb93b11(0x1ba)+_0x19ef20['name']+_0xb93b11(0x25a)+_0x19ef20['id']),await handleSDKOutput([_0x19ef20],_0x169917),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x214);[a31_0x3a88a7(0x110)]=a31_0x3a88a7(0x287);async[a31_0x3a88a7(0xcf)](_0x1aff53){const _0x36c6f1=a31_0x3a88a7,{options:_0x3baf4e,args:_0x600ee3}=_0x1aff53,_0x3ff0b2=_0x3baf4e,_0xc424af=_0x600ee3[0x0];if(!_0xc424af)return console[_0x36c6f1(0xfc)](_0x36c6f1(0x140)),console[_0x36c6f1(0xfc)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console['error'](_0x36c6f1(0x19f)),0x1;let _0x5a0b48;if(_0x3ff0b2['file'])_0x5a0b48=await loadJSON(_0x3ff0b2[_0x36c6f1(0xeb)],!![]);else{if(!_0x3ff0b2['name'])return console['error'](_0x36c6f1(0x155)),console[_0x36c6f1(0xfc)](_0x36c6f1(0x17f)),0x1;if(_0x3ff0b2['description']===undefined)return console[_0x36c6f1(0xfc)](_0x36c6f1(0x146)),console[_0x36c6f1(0xfc)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x44fcf3;_0x3ff0b2[_0x36c6f1(0x1b4)]&&(_0x44fcf3=await loadJSON(_0x3ff0b2[_0x36c6f1(0x1b4)],![])),_0x5a0b48={'attributes':{'name':_0x3ff0b2[_0x36c6f1(0x12c)],'description':_0x3ff0b2[_0x36c6f1(0x110)]||null,..._0x44fcf3!==undefined&&{'sections':_0x44fcf3}}};}const {tdx:_0x3377aa}=_0x1aff53,_0x3feac8=await withSpinner('Patching\x20personalization\x20\x27'+_0xc424af+'\x27...',()=>_0x3377aa[_0x36c6f1(0x165)][_0x36c6f1(0x262)](_0xc424af,_0x5a0b48),{'verbose':_0x3baf4e[_0x36c6f1(0x26a)]}),_0x8f2403=_0x3feac8[_0x36c6f1(0x1c3)];return console[_0x36c6f1(0xfc)](_0x36c6f1(0x185)+_0x8f2403['name']+_0x36c6f1(0x263)+_0x8f2403['id']+')'),await handleSDKOutput([_0x8f2403],_0x3baf4e),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x3a88a7(0x12c)]=a31_0x3a88a7(0x249);[a31_0x3a88a7(0x110)]='Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML';async[a31_0x3a88a7(0xcf)](_0x14b1ab){const _0x2beead=a31_0x3a88a7,{options:_0x3362ce,args:_0x2451da}=_0x14b1ab,_0x404c31=_0x2451da[0x0]||_0x3362ce[_0x2beead(0x226)];if(!_0x404c31)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a'+_0x2beead(0x21d)),0x1;const _0x19838e=resolveYamlFile(_0x404c31);if(!existsSync(_0x19838e))return showFileNotFoundError(_0x19838e,_0x404c31),0x1;let _0x1814b2;try{_0x1814b2=readFileSync(_0x19838e,'utf-8');}catch(_0x1195ba){const _0x1dbe1a=_0x1195ba instanceof Error?_0x1195ba[_0x2beead(0x120)]:String(_0x1195ba);return console[_0x2beead(0xfc)](_0x2beead(0x2c3)+_0x1dbe1a),0x1;}let _0x852ff9;try{_0x852ff9=parseDef(_0x1814b2);}catch(_0x50e26c){const _0x2e34f7=_0x50e26c instanceof Error?_0x50e26c[_0x2beead(0x120)]:String(_0x50e26c);return console[_0x2beead(0xfc)](a31_0x3024fb[_0x2beead(0xe9)]('Error\x20parsing\x20YAML:\x20'+_0x2e34f7)),0x1;}if(_0x852ff9[_0x2beead(0x2eb)]&&_0x852ff9[_0x2beead(0x2eb)][_0x2beead(0x2d7)]>0x0)return console['error'](a31_0x3024fb[_0x2beead(0x16b)](_0x2beead(0x248)+_0x19838e)),console[_0x2beead(0xfc)](a31_0x3024fb['dim'](_0x2beead(0x1cf)+_0x852ff9['personalization_services'][_0x2beead(0x2d7)]+'\x20service(s)\x20configured')),0x1;!_0x852ff9[_0x2beead(0x229)]&&(_0x852ff9[_0x2beead(0x229)]={'events':[{'name':_0x2beead(0x247),'source_table':'<database>.<table>'}],'attributes':[{'name':_0x2beead(0x2c2),'type':_0x2beead(0x157)}],'id_stitching':{'primary_key':_0x852ff9[_0x2beead(0xee)][_0x2beead(0x1e2)]===_0x2beead(0x1e1)?_0x2beead(0x115):_0x2beead(0x236)}});_0x852ff9['personalization_services']=[{'name':_0x2beead(0x156),'description':_0x2beead(0x29a),'trigger_event':'page_view','sections':[{'name':_0x2beead(0xd6),'criteria':_0x2beead(0x2ac),'attributes':['last_page_viewed']}]}];const _0x5609dd=serializeDef(_0x852ff9);return writeFileSync(_0x19838e,_0x5609dd,'utf-8'),console[_0x2beead(0xfc)](a31_0x3024fb[_0x2beead(0x20f)]('✔')+_0x2beead(0x1b8)+a31_0x3024fb[_0x2beead(0x2d6)](_0x19838e)),(!_0x852ff9[_0x2beead(0x229)]||_0x1814b2[_0x2beead(0x2e5)](_0x2beead(0x260))===-0x1)&&console[_0x2beead(0xfc)](a31_0x3024fb[_0x2beead(0x20f)]('✔')+_0x2beead(0x1e7)),console[_0x2beead(0xfc)]('\x0a'+a31_0x3024fb[_0x2beead(0x179)](_0x2beead(0x195))),console['error']('\x20\x201.\x20Edit\x20'+_0x19838e+_0x2beead(0x291)),console['error'](_0x2beead(0x2c4)+a31_0x3024fb[_0x2beead(0x179)](_0x2beead(0x2ce)+_0x404c31)+_0x2beead(0x1cc)),0x0;}}