@treasuredata/tdx 2026.4.11 → 2026.4.12
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.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.d.ts +1 -0
- package/dist/core/profile.d.ts.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/profile.js.map +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.d.ts +6 -0
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +2 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.d.ts.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/templates.js.map +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x1e12b4=a31_0x556b;(function(_0x50b561,_0x2955b6){const _0x188320=a31_0x556b,_0x5181d5=_0x50b561();while(!![]){try{const _0x356890=-parseInt(_0x188320(0x29c))/0x1*(parseInt(_0x188320(0xa7))/0x2)+parseInt(_0x188320(0x25f))/0x3+parseInt(_0x188320(0xe1))/0x4+parseInt(_0x188320(0xd1))/0x5*(-parseInt(_0x188320(0x186))/0x6)+-parseInt(_0x188320(0x229))/0x7*(-parseInt(_0x188320(0x1db))/0x8)+-parseInt(_0x188320(0x106))/0x9*(-parseInt(_0x188320(0x1bc))/0xa)+-parseInt(_0x188320(0x208))/0xb*(parseInt(_0x188320(0x272))/0xc);if(_0x356890===_0x2955b6)break;else _0x5181d5['push'](_0x5181d5['shift']());}catch(_0xe006be){_0x5181d5['push'](_0x5181d5['shift']());}}}(a31_0x52a9,0x9f169));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x572ad6 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_0x46217b 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_0x1e12b4(0x269),LEGACY_PARENT_SEGMENT_DIR=a31_0x1e12b4(0xf2);function openBrowser(_0x1f2dd2){const _0x2b063d=a31_0x1e12b4,_0x5ae149=process['platform'],_0x5a17db=_0x5ae149===_0x2b063d(0x1de)?_0x2b063d(0x1c9):_0x5ae149===_0x2b063d(0x184)?_0x2b063d(0x1e4):'xdg-open';spawn(_0x5a17db,[_0x1f2dd2],{'detached':!![],'stdio':_0x2b063d(0x243)})[_0x2b063d(0x1fe)]();}function migrateLegacyDirectory(){const _0x42117e=a31_0x1e12b4;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x3c0b70=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x3c0b70[_0x42117e(0xb3)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x42117e(0x9a)](a31_0x46217b[_0x42117e(0x289)](_0x42117e(0x120)+LEGACY_PARENT_SEGMENT_DIR+_0x42117e(0x1a5)+PARENT_SEGMENT_DIR+'/\x20directories\x20exist.')),console['error'](a31_0x46217b[_0x42117e(0x140)]('\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20'+LEGACY_PARENT_SEGMENT_DIR+'/\x20directory.\x0a')),![];console['error'](a31_0x46217b[_0x42117e(0x289)]('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x42117e(0x210)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x42117e(0x9a)](a31_0x46217b[_0x42117e(0x1a7)](_0x42117e(0x105)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x1e6cd4){const _0x31f3bd=_0x1e6cd4 instanceof Error?_0x1e6cd4['message']:String(_0x1e6cd4);return console['error'](a31_0x46217b[_0x42117e(0xba)](_0x42117e(0x173)+_0x31f3bd+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x1e12b4(0x1da)](_0x4f76bd){const _0x471c8d=a31_0x1e12b4;return migrateLegacyDirectory(),super[_0x471c8d(0x1da)](_0x4f76bd);}}function resolveYamlFile(_0x40cdfc){const _0x1a510c=a31_0x1e12b4;if(_0x40cdfc['endsWith'](_0x1a510c(0x14f))||_0x40cdfc[_0x1a510c(0x1d7)]('.yaml'))return _0x40cdfc;return a31_0x572ad6[_0x1a510c(0x161)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x40cdfc)+_0x1a510c(0x14f));}function formatProgressMessage(_0x4a22f9){const _0x271464=_0x4a22f9['match'](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x271464){const [,_0xf1f677,_0x201e5f,_0x55a59a='']=_0x271464;return a31_0x46217b['dim'](_0xf1f677+':')+'\x20'+_0x201e5f+a31_0x46217b['dim'](_0x55a59a);}return a31_0x46217b['dim'](_0x4a22f9);}function showFileNotFoundError(_0x15a3aa,_0x27842e){const _0xc28726=a31_0x1e12b4;console[_0xc28726(0x9a)](a31_0x46217b[_0xc28726(0xba)](_0xc28726(0x14a)+_0x15a3aa+'\x0a')),console['error'](a31_0x46217b['cyan']('Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20'+_0x27842e+'`\x20to\x20download\x20the\x20configuration\x20first'));}function displayRealtimeValidation(_0x2343cf){const _0x434e8a=a31_0x1e12b4;if(!_0x2343cf['realtime'])return;const _0x5a0ec7=_0x2343cf[_0x434e8a(0x113)],_0x33be76=_0x5a0ec7[_0x434e8a(0x16e)]?a31_0x46217b[_0x434e8a(0x1a7)]('⚡\x20Enabled'):a31_0x46217b[_0x434e8a(0x289)](_0x434e8a(0x29b));console['error']('\x0a'+a31_0x46217b['dim'](_0x434e8a(0xb0))+'\x20'+_0x33be76);if(_0x5a0ec7[_0x434e8a(0x13f)]&&_0x5a0ec7[_0x434e8a(0x13f)][_0x434e8a(0x179)]>0x0){console[_0x434e8a(0x9a)]('\x20\x20'+a31_0x46217b[_0x434e8a(0x140)](_0x434e8a(0x207))+'\x20'+_0x5a0ec7['events'][_0x434e8a(0x179)]+_0x434e8a(0x119));for(const _0x243795 of _0x5a0ec7[_0x434e8a(0x13f)]){const _0xc463ee=_0x243795['sourceTableValid']===![]?a31_0x46217b[_0x434e8a(0xba)]('✘'):a31_0x46217b[_0x434e8a(0x1a7)]('✔');console[_0x434e8a(0x9a)]('\x20\x20\x20\x20'+_0xc463ee+'\x20'+_0x243795['name']),_0x243795[_0x434e8a(0x121)]&&console['error'](_0x434e8a(0x154)+a31_0x46217b[_0x434e8a(0xba)](_0x243795[_0x434e8a(0x121)]));}}if(_0x5a0ec7[_0x434e8a(0xd9)]&&_0x5a0ec7[_0x434e8a(0xd9)]['length']>0x0){console[_0x434e8a(0x9a)]('\x20\x20'+a31_0x46217b[_0x434e8a(0x140)](_0x434e8a(0x138))+'\x20'+_0x5a0ec7['attributes']['length']+_0x434e8a(0x119));for(const _0x285d27 of _0x5a0ec7[_0x434e8a(0xd9)]){const _0xe28c07=_0x285d27[_0x434e8a(0x209)]?a31_0x46217b[_0x434e8a(0x1a7)]('✔'):a31_0x46217b[_0x434e8a(0xba)]('✘');console[_0x434e8a(0x9a)](_0x434e8a(0x131)+_0xe28c07+'\x20'+_0x285d27[_0x434e8a(0x1ef)]+'\x20'+a31_0x46217b[_0x434e8a(0x140)]('('+_0x285d27['type']+')'));}}if(_0x5a0ec7[_0x434e8a(0x85)]){const _0x4df70b=_0x5a0ec7['idStitching'][_0x434e8a(0x19d)]?.[_0x434e8a(0x179)]?_0x434e8a(0xa4)+_0x5a0ec7[_0x434e8a(0x85)][_0x434e8a(0x19d)][_0x434e8a(0x161)](',\x20')+']':'';console['error']('\x20\x20'+a31_0x46217b[_0x434e8a(0x140)](_0x434e8a(0x17c))+'\x20'+_0x5a0ec7[_0x434e8a(0x85)]['primaryKey']+_0x4df70b);}if(_0x5a0ec7[_0x434e8a(0x1d5)]&&_0x5a0ec7['personalizationServices'][_0x434e8a(0x179)]>0x0){console[_0x434e8a(0x9a)]('\x20\x20'+a31_0x46217b[_0x434e8a(0x140)](_0x434e8a(0x1f9))+'\x20'+_0x5a0ec7[_0x434e8a(0x1d5)][_0x434e8a(0x179)]+_0x434e8a(0x12d)+(_0x5a0ec7[_0x434e8a(0x1d5)]['length']!==0x1?'s':''));for(const _0x3261de of _0x5a0ec7[_0x434e8a(0x1d5)]){console[_0x434e8a(0x9a)]('\x20\x20\x20\x20-\x20'+_0x3261de[_0x434e8a(0x1ef)]);}}}function showParentSegmentNotSetError(_0x262f35){const _0x3ddaae=a31_0x1e12b4;console['error'](a31_0x46217b[_0x3ddaae(0x289)](_0x3ddaae(0xb9))),console[_0x3ddaae(0x9a)](_0x262f35);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]='segment:parent:list';[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x1be);async['execute'](_0x5f6ca3){const _0x35542e=a31_0x1e12b4,{options:_0xf02418,args:_0xdfe34b,tdx:_0x26f0ea}=_0x5f6ca3,_0x3f9380=_0xdfe34b[0x0];_0xf02418[_0x35542e(0x24c)]&&(console[_0x35542e(0x9a)](_0x35542e(0xf3)+_0xf02418[_0x35542e(0x29d)]),_0x3f9380&&console[_0x35542e(0x9a)](_0x35542e(0xa5)+_0x3f9380));const _0x543d20=await withSpinner(_0x3f9380?_0x35542e(0x1b9)+_0x3f9380+'\x27...':_0x35542e(0x1dc),()=>_0x26f0ea[_0x35542e(0x1ee)][_0x35542e(0x25e)](),{'verbose':_0xf02418['verbose']});let _0x563eb5=_0x543d20['data'];if(_0x3f9380){const _0x224479=_0x3f9380['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x35542e(0x192)](/\*/g,'.*')[_0x35542e(0x192)](/\?/g,'.'),_0x2a3234=new RegExp('^'+_0x224479+'$','i');_0x563eb5=_0x563eb5['filter'](_0x1d2cb7=>_0x2a3234[_0x35542e(0x23a)](_0x1d2cb7[_0x35542e(0xd9)][_0x35542e(0x1ef)]));}_0x563eb5[_0x35542e(0x215)]((_0x573299,_0x283f75)=>_0x573299['attributes'][_0x35542e(0x1ef)]['localeCompare'](_0x283f75['attributes']['name'])),console['error'](_0x35542e(0x1ad)+_0x563eb5['length']+'\x20parent\x20segment'+(_0x563eb5[_0x35542e(0x179)]!==0x1?'s':''));const _0x4b7099=_0x3f2347=>{const _0x587b47=_0x35542e;return getConsoleNextUrl(_0xf02418[_0x587b47(0x29d)],'/app/dw/parentSegments/'+_0x3f2347);};if(_0xf02418[_0x35542e(0xc5)]==='json'||_0xf02418[_0x35542e(0xc5)]==='jsonl'){const _0x1f2965=_0x563eb5[_0x35542e(0x16f)](_0x44f700=>({..._0x44f700,'url':_0x4b7099(_0x44f700['id'])}));await handleSDKOutput(_0x1f2965,_0xf02418);}else{if(_0x563eb5['length']===0x0)_0x3f9380?console['log']('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x3f9380):console[_0x35542e(0xc0)](_0x35542e(0x1f0));else for(const _0x419e3a of _0x563eb5){const _0x34f0f6=_0x419e3a[_0x35542e(0xd9)][_0x35542e(0x1af)]?a31_0x46217b[_0x35542e(0x140)]('\x20('+formatRows(_0x419e3a[_0x35542e(0xd9)][_0x35542e(0x1af)])+')'):'',_0x33ef3b=hyperlink(_0x419e3a[_0x35542e(0xd9)][_0x35542e(0x1ef)],_0x4b7099(_0x419e3a['id']));console['log'](_0x35542e(0xeb)+_0x33ef3b+_0x34f0f6);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x93);['description']=a31_0x1e12b4(0x22a);async['execute'](_0x484c9f){const _0x4f80aa=a31_0x1e12b4,{options:_0x209687,args:_0x59f526,tdx:_0x4e8f31}=_0x484c9f;console[_0x4f80aa(0x9a)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a'+'\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a'+_0x4f80aa(0x19e));const _0x3f5d42=_0x209687;if(_0x59f526[_0x4f80aa(0x179)]===0x0)return console[_0x4f80aa(0x9a)](a31_0x46217b[_0x4f80aa(0xba)](_0x4f80aa(0x157))),console[_0x4f80aa(0x9a)](_0x4f80aa(0x1df)),0x1;const _0x407915=_0x59f526[0x0];if(!_0x3f5d42[_0x4f80aa(0x10a)]||!_0x3f5d42['table'])return console[_0x4f80aa(0x9a)](_0x4f80aa(0x276)),console[_0x4f80aa(0x9a)](_0x4f80aa(0x1df)),0x1;_0x3f5d42[_0x4f80aa(0x24c)]&&(console[_0x4f80aa(0x9a)]('Site:\x20'+_0x3f5d42[_0x4f80aa(0x29d)]),console[_0x4f80aa(0x9a)](_0x4f80aa(0x19b)+_0x407915),console[_0x4f80aa(0x9a)](_0x4f80aa(0xa1)+_0x3f5d42[_0x4f80aa(0x10a)]),console[_0x4f80aa(0x9a)]('Table:\x20'+_0x3f5d42[_0x4f80aa(0x111)]));const _0x387c30=await loadJSONFromOptions(_0x3f5d42['attributes'],_0x3f5d42[_0x4f80aa(0x212)]),_0x47ad18=await loadJSONFromOptions(_0x3f5d42[_0x4f80aa(0xd0)],_0x3f5d42['behaviorsFile']),_0x5e20a6=await loadJSONFromOptions(_0x3f5d42[_0x4f80aa(0x1d9)],_0x3f5d42[_0x4f80aa(0x1ea)]),_0x321339={'name':_0x407915,'description':_0x3f5d42[_0x4f80aa(0x18c)],'scheduleType':_0x3f5d42[_0x4f80aa(0x28d)],'scheduleOption':_0x3f5d42[_0x4f80aa(0xee)],'timezone':_0x3f5d42['timezone'],'master':{'parentDatabaseName':_0x3f5d42[_0x4f80aa(0x10a)],'parentTableName':_0x3f5d42[_0x4f80aa(0x111)]},'attributes':_0x387c30,'behaviors':_0x47ad18,'customerGroup':_0x5e20a6},_0x11da11=await withSpinner(_0x4f80aa(0xc4)+_0x407915+'\x27...',()=>_0x4e8f31[_0x4f80aa(0x1ee)][_0x4f80aa(0x295)](_0x321339),{'verbose':_0x209687[_0x4f80aa(0x24c)]}),_0x2cbed3=_0x11da11[_0x4f80aa(0x22f)];return console[_0x4f80aa(0x9a)](_0x4f80aa(0xbc)+_0x2cbed3[_0x4f80aa(0x1ef)]+'\x27\x20with\x20ID:\x20'+_0x2cbed3['id']),await handleSDKOutput([_0x2cbed3],_0x209687),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x23b);['description']=a31_0x1e12b4(0x170);async[a31_0x1e12b4(0x26e)](_0x2e5013){const _0x21f8a2=a31_0x1e12b4,{options:_0x301bd2,args:_0x3655c,tdx:_0x2586b3}=_0x2e5013;console['error'](_0x21f8a2(0x16d)+_0x21f8a2(0x25b)+_0x21f8a2(0x19e));const _0x468e80=_0x301bd2;if(_0x3655c[_0x21f8a2(0x179)]===0x0)return console[_0x21f8a2(0x9a)](a31_0x46217b[_0x21f8a2(0xba)](_0x21f8a2(0x157))),console['error'](_0x21f8a2(0x174)),0x1;const _0x3d93b6=_0x3655c[0x0];_0x468e80[_0x21f8a2(0x24c)]&&(console['error'](_0x21f8a2(0xf3)+_0x468e80[_0x21f8a2(0x29d)]),console[_0x21f8a2(0x9a)]('Parent\x20segment:\x20'+_0x3d93b6));const _0x4517d4=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x3d93b6+_0x21f8a2(0x14d),()=>_0x2586b3[_0x21f8a2(0x1ee)]['getParentFull'](_0x3d93b6),{'verbose':_0x468e80[_0x21f8a2(0x24c)]}),_0x3c44cb=_0x4517d4[_0x21f8a2(0x22f)],_0x45dab8=await loadJSONFromOptions(_0x468e80[_0x21f8a2(0x149)],_0x468e80[_0x21f8a2(0x28f)]),_0x268ef2=await loadJSONFromOptions(_0x468e80[_0x21f8a2(0x187)],_0x468e80[_0x21f8a2(0x220)]),_0x1eceeb={'name':_0x3c44cb[_0x21f8a2(0x1ef)],'description':_0x468e80[_0x21f8a2(0x18c)]!==undefined?_0x468e80[_0x21f8a2(0x18c)]:_0x3c44cb[_0x21f8a2(0x18c)],'scheduleType':_0x468e80[_0x21f8a2(0x28d)]!==undefined?_0x468e80[_0x21f8a2(0x28d)]:_0x3c44cb[_0x21f8a2(0x28d)],'scheduleOption':_0x468e80['scheduleOption']!==undefined?_0x468e80[_0x21f8a2(0xee)]:_0x3c44cb['scheduleOption'],'timezone':_0x468e80[_0x21f8a2(0x20a)]!==undefined?_0x468e80[_0x21f8a2(0x20a)]:_0x3c44cb[_0x21f8a2(0x20a)],'master':_0x3c44cb['master'],'attributes':_0x45dab8?[..._0x3c44cb['attributes']||[],..._0x45dab8]:_0x3c44cb[_0x21f8a2(0xd9)],'behaviors':_0x268ef2?[..._0x3c44cb[_0x21f8a2(0xd0)]||[],..._0x268ef2]:_0x3c44cb[_0x21f8a2(0xd0)],'customerGroup':_0x3c44cb[_0x21f8a2(0x1d9)]},_0x45c34f=await withSpinner(_0x21f8a2(0x188)+_0x3d93b6+'\x27...',()=>_0x2586b3[_0x21f8a2(0x1ee)][_0x21f8a2(0x94)](_0x3d93b6,_0x1eceeb),{'verbose':_0x468e80[_0x21f8a2(0x24c)]}),_0x555ee7=_0x45c34f[_0x21f8a2(0x22f)];return console[_0x21f8a2(0x9a)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x555ee7['name']+'\x27'),await handleSDKOutput([_0x555ee7],_0x468e80),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']=a31_0x1e12b4(0xea);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x129);async['execute'](_0x5c845d){const _0x2a65ab=a31_0x1e12b4,{options:_0xd35458,args:_0x4bd3d2,tdx:_0x31960e}=_0x5c845d,_0x3f0cbe=_0xd35458,_0x337057=_0x4bd3d2[0x0]||_0xd35458[_0x2a65ab(0x1ce)];if(!_0x337057)return showParentSegmentNotSetError(_0x2a65ab(0x27d)+_0x2a65ab(0x1ba)),0x1;if(_0x3f0cbe[_0x2a65ab(0xb2)]&&_0x3f0cbe[_0x2a65ab(0x114)])return console[_0x2a65ab(0x9a)](a31_0x46217b[_0x2a65ab(0xba)](_0x2a65ab(0x254))),console[_0x2a65ab(0x9a)](a31_0x46217b[_0x2a65ab(0x140)](_0x2a65ab(0x283))),console['error'](a31_0x46217b[_0x2a65ab(0x140)]('using\x20the\x20default\x20path:\x20'+PARENT_SEGMENT_DIR+_0x2a65ab(0xca))),console['error'](a31_0x46217b['cyan'](_0x2a65ab(0x198))),0x1;const _0x247055=_0x3f0cbe[_0x2a65ab(0x114)]||a31_0x572ad6[_0x2a65ab(0x161)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x337057)+'.yml');_0x3f0cbe[_0x2a65ab(0x24c)]&&(console[_0x2a65ab(0x9a)](_0x2a65ab(0xf3)+_0x3f0cbe[_0x2a65ab(0x29d)]),console[_0x2a65ab(0x9a)](_0x2a65ab(0xf8)+_0x337057),console[_0x2a65ab(0x9a)](_0x2a65ab(0x29f)+_0x247055));const _0x261d67=await withSpinner(_0x2a65ab(0x17f)+_0x337057+'\x27...',()=>_0x31960e[_0x2a65ab(0x1ee)][_0x2a65ab(0x16c)](_0x337057),{'verbose':_0x3f0cbe['verbose']}),_0x2cfd87=_0x261d67[_0x2a65ab(0x22f)];if(existsSync(_0x247055)){const _0x484189=readFileSync(_0x247055,_0x2a65ab(0x288)),_0x683c91=generateDiff(_0x484189,_0x2cfd87);if(!hasChanges(_0x683c91))console[_0x2a65ab(0x9a)](a31_0x46217b['green']('✔')+_0x2a65ab(0x133)+a31_0x46217b[_0x2a65ab(0x228)](_0x247055)+'\x20is\x20already\x20up\x20to\x20date');else{console[_0x2a65ab(0x9a)](_0x2a65ab(0xde)+_0x247055+'\x27:'),console[_0x2a65ab(0x9a)]('─'['repeat'](0x3c)),console[_0x2a65ab(0x9a)](formatDiffWithColors(_0x683c91)),console['error']('─'['repeat'](0x3c));if(!_0x3f0cbe[_0x2a65ab(0x25a)]){if(!isInteractive())return console[_0x2a65ab(0x9a)](a31_0x46217b[_0x2a65ab(0xba)]('\x0aError:'),_0x2a65ab(0x155)),console['error'](a31_0x46217b['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x491f98=await confirmKey(_0x2a65ab(0xce)+_0x247055+'\x27?');if(!_0x491f98)return console['error'](a31_0x46217b['yellow'](_0x2a65ab(0x127))),0x1;}writeFileSync(_0x247055,_0x2cfd87,'utf-8'),console[_0x2a65ab(0x9a)](a31_0x46217b[_0x2a65ab(0x1a7)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x46217b['cyan'](_0x247055));}}else{const _0x48b52d=a31_0x572ad6[_0x2a65ab(0xf4)](_0x247055);!existsSync(_0x48b52d)&&mkdirSync(_0x48b52d,{'recursive':!![]}),writeFileSync(_0x247055,_0x2cfd87,_0x2a65ab(0x288)),console[_0x2a65ab(0x9a)](a31_0x46217b[_0x2a65ab(0x1a7)]('✔')+_0x2a65ab(0x1a6)+a31_0x46217b[_0x2a65ab(0x228)](_0x247055));}return saveSessionContext({'parent_segment':_0x337057},_0x3f0cbe['session']),console[_0x2a65ab(0x9a)](a31_0x46217b['green']('✔')+_0x2a65ab(0x16a)+a31_0x46217b[_0x2a65ab(0x140)](_0x2a65ab(0xf2))+_0x2a65ab(0x162)+a31_0x46217b[_0x2a65ab(0x228)](_0x337057)),0x0;}}function a31_0x52a9(){const _0xf57bb5=['json','segment:parent:preview','Updating','Available\x20behaviors:','\x20\x20\x20','token:','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','sections','addAttributes','Error:\x20File\x20not\x20found:\x20','Validating\x20configuration...','Updating\x20personalization\x20service\x20\x27','\x27...','displayPreviewHints','.yml','value','Error:','sampleData','Get\x20current\x20RT\x20configuration\x20version\x20status','\x20\x20\x20\x20\x20\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','entryCriteria:','Error:\x20Parent\x20segment\x20name\x20is\x20required','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','Listing\x20personalization\x20services\x20for\x20\x27','no\x20tokens\x20configured','✔\x20Updated\x20personalization\x20service\x20\x27','allValid','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x0aNew\x20parent\x20segment\x20\x27','ps:pz:list','Creating\x20personalization\x20\x27','join','\x20=\x20','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','Apply\x20changes\x20to\x20\x27','delete','ps:rt:configuration_versions','Error:\x20Service\x20ID\x20is\x20required','✔\x20Found\x20personalization\x20\x27','\x20\x20Note:\x20','\x20Context\x20set:\x20','Preview:','pullParentYaml','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','enabled','map','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Options:','deleteToken','✘\x20Failed\x20to\x20rename\x20directory:\x20','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','Fetching\x20sample\x20data...','column','\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','\x20service(s)\x20configured','length','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','\x20Added\x20personalization\x20template\x20to\x20','ID\x20Stitching:','displayBehaviorsStats','resolveParentId','Fetching\x20parent\x20segment\x20\x27','Listing\x20RT\x20journeys\x20for\x20\x27','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','Error:\x20--name\x20is\x20required','stringify','win32','type','48378EHvHbu','addBehaviors','Updating\x20parent\x20segment\x20\x27','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','/app/workflows/','displayRealtimeInfo','description','✔\x20Query\x20completed:\x20Processed\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a','\x20\x20Database:\x20','Schema\x20saved\x20to\x20','audienceId','replace','behavior_','No\x20RT\x20journeys\x20found','push','List\x20RT\x20journeys','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','includeSensitive:','master','Name:\x20','displayValidateResults','stitchingKeys','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','Getting\x20personalization\x20\x27','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','\x0a\x20\x20]\x0a}\x0a','segment:parent:sql','getCurrentConfigVersion','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','/\x20and\x20','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','green','✔\x20Created\x20personalization\x20service\x20\x27','string','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','✔\x20Found\x20','\x27\x20and\x20run\x20workflow?','population','Default','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','filter','tokens','To\x20view\x20sample\x20data:','ps:pz:create','YAML\x20file:\x20','workflowAttemptId','Listing\x20parent\x20segments\x20matching\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','Error:\x20Personalization\x20ID\x20is\x20required','10370iLJUyB','\x20tdx\x20wf\x20attempt\x20','List\x20parent\x20segments','Behaviors','✔\x20Retrieved\x20RT\x20configuration\x20version','✔\x20Created\x20token\x20\x27','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','Coverage:','behavior','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','\x0aNo\x20sample\x20data\x20available','keyEventId:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','open','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','entryCriteria','getParentFull','totalEvents','parentSegment','List\x20available\x20fields\x20for\x20segmentation','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','any','validateParentYaml','limit','elapsedTimeMillis','personalizationServices','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','endsWith','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','customerGroup','run','5551528iMjylq','Listing\x20parent\x20segments...','paused','darwin','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Updated','split','create','matchedCount','start','allowed\x20IPs:','file','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','listPersonalizations','Listing\x20fields\x20for\x20\x27','customerGroupFile','apply','\x20--attribute\x20\x22<name>\x22','Update\x20a\x20realtime\x20personalization\x20entity','segment','name','No\x20parent\x20segments\x20found','\x20stage','joinKey','localeCompare','✔\x20Deleted\x20token\x20\x27','\x22,\x20\x22type\x22:\x20\x22','td_client_id','trim','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','Personalization:','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','\x20--attribute\x20\x22','unref','Error\x20reading\x20file:\x20','ps:pz:patch','includeSensitive','state','errors','Error:\x20Token\x20\x27','Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Events:','11LMfRlO','valid','timezone','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','keyEventId','realtime_enabled','\x20--interval\x20','/\x20→\x20','Executing\x20parent\x20segment\x20query...','attributesFile','\x0aUsage:\x20tdx\x20ps\x20preview\x20','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','sort','.customers)','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','\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\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20for\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','rowCount','\x20Opening\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','addBehaviorsFile','toFixed','\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\x20No\x20sample\x20data\x20available','\x20(paused)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','ps:pz:service:token:create','toLocaleString','cyan','7TquLbl','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x20[Job\x20ID:\x20','Fetching\x20customers\x20schema...','displaySummary','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','data','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','✔\x20Updated\x20personalization\x20\x27','Analyzing\x20changes...','formatSchemaJson','folderId','\x27\x20with\x20ID:\x20','\x20to\x20push\x20the\x20configuration','listJourneys','realtime:','test','segment:parent:update','pauseJourney','ps:pz:show','Columns:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','getPersonalization','ps:pz:init','id:\x20','ignore','displayMasterInfo','displayAttributesStats','foreignKey','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','all','relationships','bold','jsonl','verbose','folder-segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x20total','collectSchema','resumeJourney','ps:rt:jn:list','Session:','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','/attempt/','Created','attribute','Validating\x20RT\x20configuration...','yes','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','\x0aError:','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','listParents','3246060ONOfVO','\x20RT-enabled\x20parent\x20segment','Status:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','parentFolder','ps:pz:service:token:delete','Create\x20a\x20realtime\x20personalization\x20entity','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','schemaValid','Master:','parent_segments','-1d','segment:parent:view','last_page_viewed','Error:\x20Token\x20name\x20is\x20required','execute','Join\x20on:','jobId','page_view','20425116wxmNrq','FINISHED','column_type','audienceId:\x20','Error:\x20--database\x20and\x20--table\x20are\x20required','/app/dw/parentSegments/','Fetching\x20personalization\x20service\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','Validate:','/sessions/','Delete\x20a\x20realtime\x20personalization','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','single','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','\x22\x20}','displayColumns','eventKind','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','interval','Patching\x20personalization\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','utf-8','yellow','\x20\x202.\x20Run\x20','created:','Options\x20(one\x20required):\x0a','scheduleType','processedRows','addAttributesFile','in\x20','Fetching\x20behavior\x20list...','updatedAt','label','SELECT\x20*\x20FROM\x20(\x0a','createParent','varchar','Resume\x20activations\x20in\x20an\x20RT\x20journey','public:','workflowId','Error:\x20Token\x20ID\x20is\x20required','⚡\x20Not\x20enabled','14047YGuwGl','site','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','Output\x20file:\x20','payload','eventKind:\x20','customerPercent','status:\x20','tdx\x20ps\x20preview\x20','idStitching','Next\x20steps:','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','getParentSQL','displayPreviewResults','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','ps:rt:validate','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','Creating','Error:\x20--attribute\x20requires\x20a\x20name\x0a','ps:pz:service:delete','personalization','Error\x20parsing\x20YAML:\x20','segment:parent:fields','segment:parent:create','updateParent','To\x20cancel:','segment:parent:show','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','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','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','error','columns','customers','Listing\x20RT-enabled\x20parent\x20segments...','Listing\x20personalizations\x20for\x20\x27','Rows:','SELECT\x20*\x20FROM\x20','Database:\x20','Create\x20parent\x20segment\x20\x27','stop','\x20+\x20[','Pattern:\x20','✔\x20No\x20changes\x20-\x20\x27','6FPKczc','\x20personalization','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','segment:parent:run','ps:pz:service:update','Show\x20a\x20specific\x20realtime\x20personalization','RT\x20Journey\x20ID:\x20','(id:\x20','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','RT\x202.0:','repeat','use','isDirectory','Source:','<database>.<table>','\x27\x20(id:\x20','enriched','\x20\x20\x20\x20\x20\x20\x20\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','red','Pause\x20activations\x20in\x20an\x20RT\x20journey','✔\x20Created\x20parent\x20segment\x20\x27','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','payload:','Customers:','log','schemaError','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','Creating\x20parent\x20segment\x20\x27','format','\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','\x20RT\x20configuration\x20is\x20valid','Personalization\x20service\x20description','/{name}.yml\x0a','Resolving\x20parent\x20segment\x20\x27','workflowSessionId','\x20\x20\x20\x20-\x20','Overwrite\x20\x27','Fetching\x20SQL\x20for\x20\x27','behaviors','50qDnlsp','\x20--behavior\x20\x22','ps:rt:jn:pause','get','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Join:','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','launched','attributes','previewParentYaml','SQL\x20query:\x0a','ps:pz:service:list','reduce','\x0aChanges\x20to\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Deleting\x20token\x20\x27','2047176guNHCB','Delete\x20a\x20personalization\x20service','{\x0a\x20\x20\x22database\x22:\x20\x22','list','ps:rt:list','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','segment:parent:pull','👥\x20','\x20--enriched','segment:parent:desc','scheduleOption','setJobId','\x20kill','No\x20personalizations\x20configured','parent_segment','Site:\x20','dirname','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','\x20to\x20configure\x20your\x20personalization\x20service','number','Parent\x20segment:\x20','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','double','personalization_services','Deleting\x20personalization\x20service\x20\x27','Error:\x20--behavior\x20requires\x20a\x20name\x0a','\x20rows)','\x27\x20is\x20up\x20to\x20date','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','runParent','✔\x20Renamed\x20directory\x20to\x20','1638XHyHgh','text','pushParentYaml','allowedIps','database','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','\x20personalization\x20service','Audience\x20ID:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','sections:','table','message','realtime','output','createdAt','Show\x20parent\x20segment\x20details','audienceId:','keyEventCriteria','\x20configured','Get\x20SQL\x20query\x20for\x20parent\x20segment','\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}','RT\x202.0\x20Validate:','information_schema','ps:pz:delete','Finding\x20service\x20for\x20token...','\x0a⚠️\x20\x20Both\x20','sourceTableError','parent_id','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','column_name','user_id','coveragePercent','Aborted.','\x20true','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','\x20Configuration\x20is\x20valid','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','displaySampleData','\x20service','Found\x20YAML\x20file:\x20','tdx\x20ps\x20push\x20','Creating\x20token\x20\x27','\x20\x20\x20\x20','\x5c$&','\x20No\x20changes\x20-\x20','Options:\x0a','public','Enriched:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','Attributes:','\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','ps:rt:jn:resume','customersWithEvents','My\x20Service','stageCount','\x0a\x20\x20\x20\x20]','events','dim'];a31_0x52a9=function(){return _0xf57bb5;};return a31_0x52a9();}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x1e12b4(0x1ef)]='segment:parent:push';['description']=a31_0x1e12b4(0xe7);async[a31_0x1e12b4(0x26e)](_0x19bd55){const _0x44fa3b=a31_0x1e12b4,{options:_0x2906e3,args:_0x200776,tdx:_0x486c72}=_0x19bd55,_0x2ddd9d=_0x2906e3,_0x2a8d67=_0x200776[0x0]||_0x2906e3[_0x44fa3b(0x1ce)];if(!_0x2a8d67)return showParentSegmentNotSetError(_0x44fa3b(0xd7)+_0x44fa3b(0x137)),0x1;const _0x2262c3=resolveYamlFile(_0x2a8d67);if(!existsSync(_0x2262c3))return showFileNotFoundError(_0x2262c3,_0x2a8d67),0x1;_0x2ddd9d[_0x44fa3b(0x24c)]&&(console[_0x44fa3b(0x9a)](_0x44fa3b(0xf3)+_0x2ddd9d[_0x44fa3b(0x29d)]),console[_0x44fa3b(0x9a)](_0x44fa3b(0x1b7)+_0x2262c3));let _0x5a56c1;try{_0x5a56c1=readFileSync(_0x2262c3,'utf-8');}catch(_0x5264a6){const _0x12bb8c=_0x5264a6 instanceof Error?_0x5264a6[_0x44fa3b(0x112)]:String(_0x5264a6);return console[_0x44fa3b(0x9a)]('Error\x20reading\x20file:\x20'+_0x12bb8c),0x1;}const _0x4c8c33=await withSpinner(_0x44fa3b(0x233),()=>_0x486c72[_0x44fa3b(0x1ee)]['pushParentYaml'](_0x5a56c1),{'verbose':_0x2ddd9d[_0x44fa3b(0x24c)]}),_0x210728=_0x4c8c33['data'],{isNew:_0x4b4427,name:_0x58dd8a,hasChanges:_0x149748,diffFormatted:_0x3ab975}=_0x210728;if(!_0x149748)return console[_0x44fa3b(0x9a)](_0x44fa3b(0xa6)+_0x58dd8a+'\x27\x20is\x20already\x20up\x20to\x20date'),0x0;_0x4b4427?console[_0x44fa3b(0x9a)](_0x44fa3b(0x15e)+_0x58dd8a+'\x27:'):console['error'](_0x44fa3b(0x10b)+_0x58dd8a+'\x27:');console[_0x44fa3b(0x9a)]('─'['repeat'](0x3c)),console[_0x44fa3b(0x9a)](_0x3ab975),console[_0x44fa3b(0x9a)]('─'[_0x44fa3b(0xb1)](0x3c));const _0x5b8ebc=_0x4b4427?_0x44fa3b(0xa2)+_0x58dd8a+'\x27?':_0x44fa3b(0x164)+_0x58dd8a+'\x27?';if(!_0x2ddd9d[_0x44fa3b(0x25a)]){if(!isInteractive())return console['error'](a31_0x46217b[_0x44fa3b(0xba)]('\x0aError:'),_0x44fa3b(0x155)),console[_0x44fa3b(0x9a)](a31_0x46217b['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2c6a57=await confirmKey(_0x5b8ebc);if(!_0x2c6a57)return console[_0x44fa3b(0x9a)](a31_0x46217b['yellow'](_0x44fa3b(0x127))),0x1;}const _0x1905c9=_0x4b4427?_0x44fa3b(0x8d):_0x44fa3b(0x143),_0x145164=await withSpinner(_0x1905c9+'\x20parent\x20segment\x20\x27'+_0x58dd8a+_0x44fa3b(0x14d),()=>_0x210728[_0x44fa3b(0x1eb)](),{'verbose':_0x2ddd9d[_0x44fa3b(0x24c)]}),_0x5b663b=_0x145164['data'],_0x5d5155=getConsoleNextUrl(_0x2ddd9d[_0x44fa3b(0x29d)],_0x44fa3b(0x277)+_0x5b663b['id']),_0x234928=_0x4b4427?_0x44fa3b(0x257):_0x44fa3b(0x1e0);return console[_0x44fa3b(0x9a)]('✔\x20'+_0x234928+'\x20parent\x20segment\x20\x27'+_0x5b663b['name']+'\x27'),console[_0x44fa3b(0x9a)]('\x20\x20'+_0x5d5155),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x1e12b4(0x1ef)]='segment:parent:validate';['description']=a31_0x1e12b4(0x102);async['execute'](_0x5b31b5){const _0x375293=a31_0x1e12b4,{options:_0x19b8ad,args:_0x1da154,tdx:_0x3c3906}=_0x5b31b5,_0x1bfb98=_0x19b8ad,_0x3454cd=_0x1da154[0x0]||_0x19b8ad['parentSegment'];if(!_0x3454cd)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'+_0x375293(0x10f)+'Options:\x0a'+_0x375293(0x1fc)+_0x375293(0x21f)+_0x375293(0x206)),0x1;const _0x21f7f0=resolveYamlFile(_0x3454cd);if(!existsSync(_0x21f7f0))return showFileNotFoundError(_0x21f7f0,_0x3454cd),0x1;_0x1bfb98[_0x375293(0x24c)]&&(console['error'](_0x375293(0xf3)+_0x1bfb98['site']),console[_0x375293(0x9a)](_0x375293(0x1b7)+_0x21f7f0));let _0x855245;try{_0x855245=readFileSync(_0x21f7f0,_0x375293(0x288));}catch(_0x30ed3b){const _0x30dc11=_0x30ed3b instanceof Error?_0x30ed3b['message']:String(_0x30ed3b);return console[_0x375293(0x9a)]('Error\x20reading\x20file:\x20'+_0x30dc11),0x1;}const _0xb0f85b=createCommandSpinner(a31_0x46217b['dim'](_0x375293(0x14b)),{'verbose':_0x1bfb98[_0x375293(0x24c)]});_0xb0f85b[_0x375293(0x1e4)]();const _0x2a0835={'onProgress':_0xdf31a9=>{const _0x1b9715=_0x375293;_0xb0f85b[_0x1b9715(0x107)]=formatProgressMessage(_0xdf31a9);}};if(_0x1bfb98[_0x375293(0x19a)])_0x2a0835['master']=!![];if(_0x1bfb98[_0x375293(0xb7)])_0x2a0835['enriched']=!![];_0x1bfb98['attribute']&&(_0x2a0835[_0x375293(0x258)]=_0x1bfb98[_0x375293(0x258)]);_0x1bfb98[_0x375293(0x1c4)]&&(_0x2a0835[_0x375293(0x1c4)]=_0x1bfb98[_0x375293(0x1c4)]);if(_0x1bfb98[_0x375293(0x284)])_0x2a0835[_0x375293(0x284)]=_0x1bfb98[_0x375293(0x284)];let _0x166fc7;try{_0x166fc7=await _0x3c3906[_0x375293(0x1ee)][_0x375293(0x1d2)](_0x855245,_0x2a0835),_0xb0f85b['stop']();}catch(_0x25ce01){_0xb0f85b[_0x375293(0xa3)]();throw _0x25ce01;}const _0xb734fb=_0x1bfb98['interval']||_0x375293(0x26a);return this[_0x375293(0x19c)](_0x166fc7,_0x2a0835,_0x21f7f0,_0xb734fb),_0x166fc7[_0x375293(0x15c)]?0x0:0x1;}[a31_0x1e12b4(0x19c)](_0x56fae3,_0x4460d7,_0x283ba2,_0x2afe5a){const _0x2f3df6=a31_0x1e12b4;console[_0x2f3df6(0x9a)]('\x0a'+a31_0x46217b['bold'](_0x2f3df6(0x27a))+'\x20'+_0x56fae3['name']),console[_0x2f3df6(0x9a)]('═'[_0x2f3df6(0xb1)](0x3c)),this[_0x2f3df6(0x244)](_0x56fae3);if(typeof _0x4460d7[_0x2f3df6(0x258)]===_0x2f3df6(0x1a9)){this['displayAttributesStats'](_0x56fae3),this[_0x2f3df6(0x22d)](_0x56fae3),this[_0x2f3df6(0x14e)](_0x283ba2,_0x2afe5a,'attribute',_0x4460d7[_0x2f3df6(0x258)]);return;}if(_0x4460d7[_0x2f3df6(0x258)]===!![]){this[_0x2f3df6(0x245)](_0x56fae3),this[_0x2f3df6(0x22d)](_0x56fae3),this['displayPreviewHints'](_0x283ba2,_0x2afe5a,_0x2f3df6(0xd9));return;}if(typeof _0x4460d7[_0x2f3df6(0x1c4)]===_0x2f3df6(0x1a9)){this[_0x2f3df6(0x17d)](_0x56fae3,_0x2afe5a),this[_0x2f3df6(0x22d)](_0x56fae3),this[_0x2f3df6(0x14e)](_0x283ba2,_0x2afe5a,_0x2f3df6(0x1c4),_0x4460d7[_0x2f3df6(0x1c4)]);return;}if(_0x4460d7[_0x2f3df6(0x1c4)]===!![]){this[_0x2f3df6(0x17d)](_0x56fae3,_0x2afe5a),this[_0x2f3df6(0x22d)](_0x56fae3),this[_0x2f3df6(0x14e)](_0x283ba2,_0x2afe5a,_0x2f3df6(0xd0));return;}this[_0x2f3df6(0x245)](_0x56fae3),this[_0x2f3df6(0x17d)](_0x56fae3,_0x2afe5a),this['displayRealtimeInfo'](_0x56fae3),this['displaySummary'](_0x56fae3),this[_0x2f3df6(0x14e)](_0x283ba2,_0x2afe5a,_0x2f3df6(0x248));}[a31_0x1e12b4(0x18b)](_0x4087d5){displayRealtimeValidation(_0x4087d5);}[a31_0x1e12b4(0x14e)](_0x19d374,_0x1637b7,_0x15f0a4,_0xd1e00f){const _0x26a2bc=a31_0x1e12b4;console[_0x26a2bc(0x9a)]('\x0a'+a31_0x46217b[_0x26a2bc(0x140)](_0x26a2bc(0x1b5)));const _0x149ab0=_0x1637b7!=='-1d'?_0x26a2bc(0x20f)+_0x1637b7:'';if(_0x15f0a4==='attribute'&&_0xd1e00f)console[_0x26a2bc(0x9a)]('\x20\x20'+a31_0x46217b[_0x26a2bc(0x140)]('tdx\x20ps\x20preview\x20'+_0x19d374+_0x26a2bc(0x1fd)+_0xd1e00f+'\x22'+_0x149ab0));else{if(_0x15f0a4===_0x26a2bc(0x1c4)&&_0xd1e00f)console[_0x26a2bc(0x9a)]('\x20\x20'+a31_0x46217b[_0x26a2bc(0x140)](_0x26a2bc(0x84)+_0x19d374+_0x26a2bc(0xd2)+_0xd1e00f+'\x22'+_0x149ab0));else(_0x15f0a4===_0x26a2bc(0xd9)||_0x15f0a4===_0x26a2bc(0x248))&&console[_0x26a2bc(0x9a)]('\x20\x20'+a31_0x46217b[_0x26a2bc(0x140)](_0x26a2bc(0x84)+_0x19d374+_0x26a2bc(0x1ec)+_0x149ab0));}(_0x15f0a4===_0x26a2bc(0xd0)||_0x15f0a4===_0x26a2bc(0x248))&&console[_0x26a2bc(0x9a)]('\x20\x20'+a31_0x46217b[_0x26a2bc(0x140)](_0x26a2bc(0x84)+_0x19d374+'\x20--behavior\x20\x22<name>\x22'+_0x149ab0)),_0x15f0a4==='all'&&console[_0x26a2bc(0x9a)]('\x20\x20'+a31_0x46217b[_0x26a2bc(0x140)]('tdx\x20ps\x20preview\x20'+_0x19d374+_0x26a2bc(0xec)+_0x149ab0));}[a31_0x1e12b4(0x244)](_0x40db00){const _0x182410=a31_0x1e12b4,{master:_0x22cb7a}=_0x40db00,_0x4d4f72=_0x22cb7a[_0x182410(0x267)]?a31_0x46217b['green']('✔'):a31_0x46217b[_0x182410(0xba)]('✘');console[_0x182410(0x9a)]('\x0a'+a31_0x46217b[_0x182410(0x140)]('Master\x20Table')),console[_0x182410(0x9a)](_0x4d4f72+'\x20'+a31_0x46217b[_0x182410(0x24a)](_0x22cb7a[_0x182410(0x10a)]+'.'+_0x22cb7a[_0x182410(0x111)])),_0x22cb7a['schemaValid']?_0x22cb7a['rowCount']!==undefined&&console[_0x182410(0x9a)]('\x20\x20'+a31_0x46217b[_0x182410(0x140)](_0x182410(0x9f))+'\x20'+a31_0x46217b[_0x182410(0x228)](formatRows(_0x22cb7a[_0x182410(0x21b)]))):console['error']('\x20\x20'+a31_0x46217b[_0x182410(0xba)](_0x182410(0x151))+'\x20'+_0x22cb7a[_0x182410(0xc1)]);}[a31_0x1e12b4(0x245)](_0x5cc754){const _0x231d25=a31_0x1e12b4;if(_0x5cc754['attributes']['length']===0x0)return;console['error']('\x0a'+a31_0x46217b[_0x231d25(0x140)]('Attributes'));for(const _0x594c2b of _0x5cc754[_0x231d25(0xd9)]){const _0x309e3f=_0x594c2b['schemaValid']?a31_0x46217b[_0x231d25(0x1a7)]('✔'):a31_0x46217b[_0x231d25(0xba)]('✘');let _0x55e913='';if(_0x594c2b[_0x231d25(0x267)]&&_0x594c2b[_0x231d25(0x1e3)]!==undefined&&_0x594c2b[_0x231d25(0x126)]!==undefined){const _0x2906d6=_0x594c2b[_0x231d25(0x126)]['toFixed'](0x1),_0x288630=_0x594c2b[_0x231d25(0x126)]>=0x50?a31_0x46217b[_0x231d25(0x1a7)]:_0x594c2b[_0x231d25(0x126)]>=0x32?a31_0x46217b[_0x231d25(0x289)]:a31_0x46217b[_0x231d25(0xba)];_0x55e913='\x20'+a31_0x46217b[_0x231d25(0x140)](_0x231d25(0x1c3))+'\x20'+_0x288630(_0x2906d6+'%')+'\x20('+formatRows(_0x594c2b['matchedCount'])+_0x231d25(0xff);}console[_0x231d25(0x9a)](_0x309e3f+'\x20'+a31_0x46217b['bold'](_0x594c2b[_0x231d25(0x1ef)])+_0x55e913),console[_0x231d25(0x9a)]('\x20\x20'+a31_0x46217b['dim'](_0x231d25(0xb4))+'\x20'+a31_0x46217b[_0x231d25(0x24a)](_0x594c2b[_0x231d25(0x10a)]+'.'+_0x594c2b[_0x231d25(0x111)]));const _0x2f999b=_0x594c2b[_0x231d25(0x1f2)]===_0x594c2b[_0x231d25(0x246)]?a31_0x46217b['dim'](_0x231d25(0x26f))+'\x20'+_0x594c2b[_0x231d25(0x1f2)]:a31_0x46217b[_0x231d25(0x140)](_0x231d25(0xd6))+'\x20'+_0x594c2b[_0x231d25(0x1f2)]+_0x231d25(0x162)+_0x594c2b['foreignKey'];console[_0x231d25(0x9a)]('\x20\x20'+_0x2f999b),console[_0x231d25(0x9a)]('\x20\x20'+a31_0x46217b['dim'](_0x231d25(0x23e))),this['displayColumns'](_0x594c2b[_0x231d25(0x9b)]),!_0x594c2b[_0x231d25(0x267)]&&console['error']('\x20\x20'+a31_0x46217b[_0x231d25(0xba)]('Error:')+'\x20'+_0x594c2b[_0x231d25(0xc1)]);}}['displayBehaviorsStats'](_0x3a64be,_0x543e9f){const _0x59b8ad=a31_0x1e12b4;if(_0x3a64be[_0x59b8ad(0xd0)][_0x59b8ad(0x179)]===0x0)return;console['error']('\x0a'+a31_0x46217b[_0x59b8ad(0x140)](_0x59b8ad(0x1bf))+'\x20'+a31_0x46217b[_0x59b8ad(0x140)]('('+_0x543e9f+')'));for(const _0x5340fd of _0x3a64be[_0x59b8ad(0xd0)]){const _0x204ba8=_0x5340fd[_0x59b8ad(0x267)]?a31_0x46217b[_0x59b8ad(0x1a7)]('✔'):a31_0x46217b[_0x59b8ad(0xba)]('✘');let _0x56307f='';if(_0x5340fd[_0x59b8ad(0x267)]&&_0x5340fd[_0x59b8ad(0x13b)]!==undefined&&_0x5340fd[_0x59b8ad(0x1cd)]!==undefined){const _0x329b2c=_0x5340fd[_0x59b8ad(0x2a2)]?.[_0x59b8ad(0x221)](0x1)||'?',_0x1c46a3=(_0x5340fd[_0x59b8ad(0x2a2)]??0x0)>=0x32?a31_0x46217b['green']:(_0x5340fd['customerPercent']??0x0)>=0x14?a31_0x46217b['yellow']:a31_0x46217b[_0x59b8ad(0xba)];_0x56307f='\x20'+a31_0x46217b[_0x59b8ad(0x140)](_0x59b8ad(0xbf))+'\x20'+_0x1c46a3(formatRows(_0x5340fd[_0x59b8ad(0x13b)]))+'\x20('+_0x329b2c+'%)\x20'+a31_0x46217b['dim'](_0x59b8ad(0x207))+'\x20'+a31_0x46217b[_0x59b8ad(0x228)](formatRows(_0x5340fd[_0x59b8ad(0x1cd)]));}console[_0x59b8ad(0x9a)](_0x204ba8+'\x20'+a31_0x46217b[_0x59b8ad(0x24a)](_0x5340fd[_0x59b8ad(0x1ef)])+_0x56307f),console[_0x59b8ad(0x9a)]('\x20\x20'+a31_0x46217b[_0x59b8ad(0x140)](_0x59b8ad(0xb4))+'\x20'+a31_0x46217b[_0x59b8ad(0x24a)](_0x5340fd['database']+'.'+_0x5340fd[_0x59b8ad(0x111)]));const _0x26fd02=_0x5340fd[_0x59b8ad(0x1f2)]===_0x5340fd[_0x59b8ad(0x246)]?a31_0x46217b['dim'](_0x59b8ad(0x26f))+'\x20'+_0x5340fd[_0x59b8ad(0x1f2)]:a31_0x46217b[_0x59b8ad(0x140)](_0x59b8ad(0xd6))+'\x20'+_0x5340fd[_0x59b8ad(0x1f2)]+_0x59b8ad(0x162)+_0x5340fd[_0x59b8ad(0x246)];console['error']('\x20\x20'+_0x26fd02),console[_0x59b8ad(0x9a)]('\x20\x20'+a31_0x46217b[_0x59b8ad(0x140)]('Columns:')),this[_0x59b8ad(0x281)](_0x5340fd[_0x59b8ad(0x9b)]),!_0x5340fd[_0x59b8ad(0x267)]&&console[_0x59b8ad(0x9a)]('\x20\x20'+a31_0x46217b[_0x59b8ad(0xba)]('Error:')+'\x20'+_0x5340fd[_0x59b8ad(0xc1)]);}}[a31_0x1e12b4(0x281)](_0x416d7f){const _0x20c00e=a31_0x1e12b4;for(const _0x147f0d of _0x416d7f){_0x147f0d[_0x20c00e(0x293)]===_0x147f0d['column']||_0x147f0d[_0x20c00e(0x176)]==='*'?console[_0x20c00e(0x9a)](_0x20c00e(0xcd)+_0x147f0d[_0x20c00e(0x293)]):console['error'](_0x20c00e(0xcd)+_0x147f0d[_0x20c00e(0x293)]+'\x20'+a31_0x46217b[_0x20c00e(0x140)]('('+_0x147f0d[_0x20c00e(0x176)]+')'));}}[a31_0x1e12b4(0x22d)](_0x448d69){const _0x666ae9=a31_0x1e12b4;console[_0x666ae9(0x9a)]('─'[_0x666ae9(0xb1)](0x3c));if(_0x448d69[_0x666ae9(0x203)][_0x666ae9(0x179)]>0x0){console[_0x666ae9(0x9a)]('\x0a'+a31_0x46217b[_0x666ae9(0xba)]('Errors:'));for(const _0x2156a3 of _0x448d69[_0x666ae9(0x203)]){console[_0x666ae9(0x9a)]('\x20\x20'+a31_0x46217b['red']('•')+'\x20'+_0x2156a3);}}_0x448d69[_0x666ae9(0x15c)]&&console[_0x666ae9(0x9a)]('\x0a'+a31_0x46217b[_0x666ae9(0x1a7)]('✔')+_0x666ae9(0x12a));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x142);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x1d0);async[a31_0x1e12b4(0x26e)](_0x3d8f16){const _0x13562f=a31_0x1e12b4,{options:_0x2d2397,args:_0x2384fa,tdx:_0x68185c}=_0x3d8f16,_0xce18c9=_0x2d2397,_0x3c50a0=_0x2384fa[0x0]||_0x2d2397['parentSegment'];if(!_0x3c50a0)return showParentSegmentNotSetError(_0x13562f(0x21a)+_0x13562f(0x222)+_0x13562f(0x28c)+'\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'+_0x13562f(0x181)+_0x13562f(0x27f)+_0x13562f(0x206)),0x1;if(!_0xce18c9[_0x13562f(0x19a)]&&!_0xce18c9[_0x13562f(0x258)]&&!_0xce18c9[_0x13562f(0x1c4)]&&!_0xce18c9[_0x13562f(0xb7)])return console[_0x13562f(0x9a)](a31_0x46217b[_0x13562f(0xba)](_0x13562f(0x1fa))),console['error'](_0x13562f(0xaf)),console[_0x13562f(0x9a)](_0x13562f(0x171)),console[_0x13562f(0x9a)](_0x13562f(0x17a)),console[_0x13562f(0x9a)](_0x13562f(0x8a)),console['error'](_0x13562f(0x1d8)),console['error'](_0x13562f(0x1e7)),0x1;const _0x19357d=resolveYamlFile(_0x3c50a0);if(!existsSync(_0x19357d))return showFileNotFoundError(_0x19357d,_0x3c50a0),0x1;_0xce18c9['verbose']&&(console[_0x13562f(0x9a)](_0x13562f(0xf3)+_0xce18c9[_0x13562f(0x29d)]),console['error']('YAML\x20file:\x20'+_0x19357d));let _0x437ba7;try{_0x437ba7=readFileSync(_0x19357d,'utf-8');}catch(_0x7d0758){const _0x4d02c4=_0x7d0758 instanceof Error?_0x7d0758[_0x13562f(0x112)]:String(_0x7d0758);return console[_0x13562f(0x9a)]('Error\x20reading\x20file:\x20'+_0x4d02c4),0x1;}let _0x2a7ed0;try{_0x2a7ed0=parseDef(_0x437ba7);}catch(_0x308b4e){const _0x1baf4d=_0x308b4e instanceof Error?_0x308b4e['message']:String(_0x308b4e);return console[_0x13562f(0x9a)](a31_0x46217b['red']('Error\x20parsing\x20YAML:\x20'+_0x1baf4d)),0x1;}if(_0xce18c9[_0x13562f(0x258)]===!![]||_0xce18c9[_0x13562f(0x258)]===''){const _0x587bc5=_0x2a7ed0[_0x13562f(0xd9)]?.[_0x13562f(0x16f)](_0xc44c46=>_0xc44c46['name'])||[];if(_0x587bc5['length']===0x0)console[_0x13562f(0x9a)](a31_0x46217b['red'](_0x13562f(0xc2)));else{console[_0x13562f(0x9a)](a31_0x46217b['red'](_0x13562f(0x8e))),console['error']('Available\x20attributes:');for(const _0x4728d2 of _0x587bc5){console[_0x13562f(0x9a)]('\x20\x20'+a31_0x46217b['cyan'](_0x4728d2));}console[_0x13562f(0x9a)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x3c50a0+_0x13562f(0x1fd)+_0x587bc5[0x0]+'\x22');}return 0x1;}if(_0xce18c9[_0x13562f(0x1c4)]===!![]||_0xce18c9['behavior']===''){const _0x5040a7=_0x2a7ed0[_0x13562f(0xd0)]?.['map'](_0x1a08c0=>_0x1a08c0[_0x13562f(0x1ef)])||[];if(_0x5040a7[_0x13562f(0x179)]===0x0)console['error'](a31_0x46217b[_0x13562f(0xba)](_0x13562f(0xc3)));else{console['error'](a31_0x46217b[_0x13562f(0xba)](_0x13562f(0xfe))),console[_0x13562f(0x9a)](_0x13562f(0x144));for(const _0x22906e of _0x5040a7){console[_0x13562f(0x9a)]('\x20\x20'+a31_0x46217b[_0x13562f(0x228)](_0x22906e));}console[_0x13562f(0x9a)](_0x13562f(0x213)+_0x3c50a0+_0x13562f(0xd2)+_0x5040a7[0x0]+'\x22');}return 0x1;}const _0x42eb99=createCommandSpinner(a31_0x46217b['dim'](_0x13562f(0x175)),{'verbose':_0xce18c9[_0x13562f(0x24c)]});_0x42eb99[_0x13562f(0x1e4)]();const _0x2af286={'onProgress':_0x3a7ec1=>{const _0x1e876d=_0x13562f;_0x42eb99[_0x1e876d(0x107)]=formatProgressMessage(_0x3a7ec1);}};if(_0xce18c9['master'])_0x2af286[_0x13562f(0x19a)]=!![];if(_0xce18c9['attribute']&&typeof _0xce18c9[_0x13562f(0x258)]===_0x13562f(0x1a9))_0x2af286[_0x13562f(0x258)]=_0xce18c9[_0x13562f(0x258)];if(_0xce18c9[_0x13562f(0x1c4)]&&typeof _0xce18c9[_0x13562f(0x1c4)]==='string')_0x2af286[_0x13562f(0x1c4)]=_0xce18c9[_0x13562f(0x1c4)];if(_0xce18c9[_0x13562f(0xb7)])_0x2af286['enriched']=!![];if(_0xce18c9['interval'])_0x2af286[_0x13562f(0x284)]=_0xce18c9[_0x13562f(0x284)];let _0x2ffb7d;try{_0x2ffb7d=await _0x68185c[_0x13562f(0x1ee)][_0x13562f(0xda)](_0x437ba7,_0x2af286),_0x42eb99[_0x13562f(0xa3)]();}catch(_0xf73fdf){_0x42eb99[_0x13562f(0xa3)]();throw _0xf73fdf;}return await this[_0x13562f(0x89)](_0x2ffb7d,{'master':_0xce18c9['master'],'attribute':typeof _0xce18c9[_0x13562f(0x258)]==='string'?_0xce18c9['attribute']:undefined,'behavior':typeof _0xce18c9[_0x13562f(0x1c4)]===_0x13562f(0x1a9)?_0xce18c9[_0x13562f(0x1c4)]:undefined,'enriched':_0xce18c9[_0x13562f(0xb7)]}),_0x2ffb7d[_0x13562f(0x15c)]?0x0:0x1;}async[a31_0x1e12b4(0x89)](_0x3f323e,_0x332a6f){const _0xd4c913=a31_0x1e12b4;console['error']('\x0a'+a31_0x46217b[_0xd4c913(0x24a)](_0xd4c913(0x16b))+'\x20'+_0x3f323e[_0xd4c913(0x1ef)]),console[_0xd4c913(0x9a)]('═'[_0xd4c913(0xb1)](0x3c));if(_0x332a6f[_0xd4c913(0x19a)]&&_0x3f323e[_0xd4c913(0x152)]){const _0x5dfcc2=a31_0x46217b[_0xd4c913(0x140)](_0xd4c913(0x268))+'\x20'+a31_0x46217b[_0xd4c913(0x24a)](_0x3f323e[_0xd4c913(0x19a)][_0xd4c913(0x10a)]+'.'+_0x3f323e[_0xd4c913(0x19a)][_0xd4c913(0x111)]);await this['displaySampleData'](_0x5dfcc2,_0x3f323e['sampleData']);}else{if(_0x332a6f[_0xd4c913(0x258)]&&_0x3f323e[_0xd4c913(0x152)]){const _0x5c3b70=a31_0x46217b['dim']('Attribute:')+'\x20'+a31_0x46217b[_0xd4c913(0x24a)](_0x332a6f[_0xd4c913(0x258)]);await this[_0xd4c913(0x12c)](_0x5c3b70,_0x3f323e[_0xd4c913(0x152)]);}else{if(_0x332a6f[_0xd4c913(0x1c4)]&&_0x3f323e[_0xd4c913(0x152)]){const _0x5ad0eb=a31_0x46217b['dim']('Behavior:')+'\x20'+a31_0x46217b[_0xd4c913(0x24a)](_0x332a6f['behavior']);await this[_0xd4c913(0x12c)](_0x5ad0eb,_0x3f323e[_0xd4c913(0x152)]);}else{if(_0x332a6f[_0xd4c913(0xb7)]&&_0x3f323e[_0xd4c913(0x152)]){const _0x1d4236=a31_0x46217b[_0xd4c913(0x140)](_0xd4c913(0x136))+'\x20'+a31_0x46217b[_0xd4c913(0x24a)]('Master\x20+\x20Attributes');await this[_0xd4c913(0x12c)](_0x1d4236,_0x3f323e[_0xd4c913(0x152)]);}else!_0x3f323e[_0xd4c913(0x152)]&&console[_0xd4c913(0x9a)](_0xd4c913(0x1c6));}}}if(_0x3f323e[_0xd4c913(0x203)]['length']>0x0){console[_0xd4c913(0x9a)]('─'['repeat'](0x3c)),console['error']('\x0a'+a31_0x46217b[_0xd4c913(0xba)]('Errors:'));for(const _0x40b1d7 of _0x3f323e[_0xd4c913(0x203)]){console[_0xd4c913(0x9a)]('\x20\x20'+a31_0x46217b['red']('•')+'\x20'+_0x40b1d7);}}}async[a31_0x1e12b4(0x12c)](_0x38a041,_0x38c61c){const _0x5d6a5f=a31_0x1e12b4;if(_0x38c61c[_0x5d6a5f(0x179)]===0x0){console['error']('\x0a'+_0x38a041),console['error'](_0x5d6a5f(0x223));return;}console[_0x5d6a5f(0x9a)]('\x0a'+_0x38a041);const _0x1e7bba=Object['keys'](_0x38c61c[0x0])[_0x5d6a5f(0x16f)](_0x5c8dd4=>({'name':_0x5c8dd4,'type':typeof _0x38c61c[0x0][_0x5c8dd4]===_0x5d6a5f(0xf7)?_0x5d6a5f(0xfb):_0x5d6a5f(0x296)})),_0x382ebb={'queryId':'preview','columns':_0x1e7bba,'data':_0x38c61c,'stats':{'state':_0x5d6a5f(0x273),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x38c61c[_0x5d6a5f(0x179)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x2987c4=formatAsTable(_0x382ebb,_0x38c61c[_0x5d6a5f(0x179)],!![]);await writeOutput(_0x2987c4,undefined,_0x5d6a5f(0x111));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0xaa);[a31_0x1e12b4(0x18c)]='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async[a31_0x1e12b4(0x26e)](_0x17dae5){const _0x59e833=a31_0x1e12b4,{options:_0x4e8ef6,args:_0x41f17a,tdx:_0x5bf404}=_0x17dae5,_0x1610bf=_0x4e8ef6,_0x10dc37=_0x41f17a[0x0]||_0x4e8ef6[_0x59e833(0x1ce)];if(!_0x10dc37)return showParentSegmentNotSetError(_0x59e833(0x231)+_0x59e833(0x262)),0x1;const _0x28456f=resolveYamlFile(_0x10dc37);if(existsSync(_0x28456f)){_0x1610bf['verbose']&&console[_0x59e833(0x9a)](_0x59e833(0x12e)+_0x28456f);let _0x28467d;try{_0x28467d=readFileSync(_0x28456f,_0x59e833(0x288));}catch(_0x2f5ab2){const _0x45ac2f=_0x2f5ab2 instanceof Error?_0x2f5ab2[_0x59e833(0x112)]:String(_0x2f5ab2);return console['error'](_0x59e833(0x1ff)+_0x45ac2f),0x1;}const _0x358ecb=await withSpinner(_0x59e833(0x233),()=>_0x5bf404[_0x59e833(0x1ee)][_0x59e833(0x108)](_0x28467d),{'verbose':_0x1610bf['verbose']}),_0x51bf9e=_0x358ecb[_0x59e833(0x22f)],{isNew:_0x1de039,name:_0x31eb6d,hasChanges:_0x40ae33,diffFormatted:_0x221ecd}=_0x51bf9e;if(_0x40ae33){_0x1de039?console[_0x59e833(0x9a)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x31eb6d+'\x27:'):console[_0x59e833(0x9a)]('\x0aChanges\x20to\x20apply\x20to\x20\x27'+_0x31eb6d+'\x27:');console[_0x59e833(0x9a)]('─'['repeat'](0x3c)),console[_0x59e833(0x9a)](_0x221ecd),console[_0x59e833(0x9a)]('─'[_0x59e833(0xb1)](0x3c));const _0x30af0c=_0x1de039?_0x59e833(0xa2)+_0x31eb6d+_0x59e833(0x1ae):_0x59e833(0x164)+_0x31eb6d+'\x27\x20and\x20run\x20workflow?';if(!_0x1610bf[_0x59e833(0x25a)]){if(!isInteractive())return console[_0x59e833(0x9a)](a31_0x46217b['red'](_0x59e833(0x25c)),_0x59e833(0x155)),console[_0x59e833(0x9a)](a31_0x46217b[_0x59e833(0x140)](_0x59e833(0x15d))),0x1;const _0x41d446=await confirmKey(_0x30af0c);if(!_0x41d446)return console['error'](a31_0x46217b[_0x59e833(0x289)](_0x59e833(0x127))),0x1;}const _0x4c13f8=_0x1de039?_0x59e833(0x8d):'Updating';await withSpinner(_0x4c13f8+'\x20parent\x20segment\x20\x27'+_0x31eb6d+_0x59e833(0x14d),()=>_0x51bf9e[_0x59e833(0x1eb)](),{'verbose':_0x1610bf[_0x59e833(0x24c)]});const _0x2c7175=_0x1de039?'Created':'Updated';console[_0x59e833(0x9a)]('✔\x20'+_0x2c7175+_0x59e833(0xc6)+_0x31eb6d+'\x27');}else console[_0x59e833(0x9a)]('✔\x20No\x20changes\x20-\x20\x27'+_0x31eb6d+_0x59e833(0x100));}const _0x574d2d=await withSpinner(_0x59e833(0x1a0)+_0x10dc37+_0x59e833(0x14d),()=>_0x5bf404[_0x59e833(0x1ee)][_0x59e833(0x104)](_0x10dc37),{'verbose':_0x1610bf[_0x59e833(0x24c)]}),_0xcd9714=_0x574d2d[_0x59e833(0x22f)],_0x4114e4=getConsoleUrl(_0x1610bf[_0x59e833(0x29d)],_0x59e833(0x18a)+_0xcd9714[_0x59e833(0x299)]+_0x59e833(0x27b)+_0xcd9714[_0x59e833(0xcc)]+_0x59e833(0x256)+_0xcd9714[_0x59e833(0x1b8)]);return console[_0x59e833(0x9a)]('\x0a✔\x20Workflow\x20started'),console[_0x59e833(0x9a)]('\x20\x20'+a31_0x46217b[_0x59e833(0x140)](_0x59e833(0x10e))+'\x20'+_0xcd9714[_0x59e833(0x191)]),console['error']('\x20\x20'+a31_0x46217b[_0x59e833(0x140)](_0x59e833(0x261))+'\x20'+_0xcd9714['status']),console[_0x59e833(0x9a)]('\x20\x20'+a31_0x46217b[_0x59e833(0x140)](_0x59e833(0x253))+'\x20'+_0xcd9714[_0x59e833(0xcc)]),console[_0x59e833(0x9a)]('\x20\x20'+a31_0x46217b[_0x59e833(0x140)]('Attempt:')+'\x20'+_0xcd9714[_0x59e833(0x1b8)]),console[_0x59e833(0x9a)]('\x20\x20'+_0x4114e4),console['error']('\x0a'+a31_0x46217b[_0x59e833(0x140)](_0x59e833(0x95))+_0x59e833(0x1bd)+_0xcd9714[_0x59e833(0x1b8)]+_0x59e833(0xf0)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x92);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x1cf);async[a31_0x1e12b4(0x26e)](_0x5da118){const _0x3edfeb=a31_0x1e12b4,{options:_0x15e816,args:_0x3e4857,tdx:_0x387f2c}=_0x5da118,_0x1e7501=_0x3e4857[0x0]||_0x15e816[_0x3edfeb(0x1ce)];if(!_0x1e7501)return showParentSegmentNotSetError(_0x3edfeb(0x20c)+_0x3edfeb(0x266)),0x1;_0x15e816[_0x3edfeb(0x24c)]&&(console[_0x3edfeb(0x9a)](_0x3edfeb(0xf3)+_0x15e816[_0x3edfeb(0x29d)]),console[_0x3edfeb(0x9a)](_0x3edfeb(0xf8)+_0x1e7501));const _0x878b3=await withSpinner(_0x3edfeb(0x1e9)+_0x1e7501+_0x3edfeb(0x14d),()=>_0x387f2c[_0x3edfeb(0x1ee)]['listFields'](_0x1e7501),{'verbose':_0x15e816[_0x3edfeb(0x24c)]}),_0x5bf17e=_0x878b3[_0x3edfeb(0x22f)];console[_0x3edfeb(0x9a)](_0x3edfeb(0x1ad)+_0x5bf17e[_0x3edfeb(0x179)]+'\x20field'+(_0x5bf17e[_0x3edfeb(0x179)]!==0x1?'s':''));if(_0x15e816[_0x3edfeb(0x141)]||_0x15e816[_0x3edfeb(0x24b)])return await handleSDKOutput(_0x5bf17e,_0x15e816),0x0;return displayFieldsHumanReadable(_0x5bf17e,_0x1e7501),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x26b);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x116);async['execute'](_0x3b6b6d){const _0x4a3e1f=a31_0x1e12b4,{options:_0x58854d,args:_0x2fd60c,tdx:_0x585e64}=_0x3b6b6d,_0x559522=_0x58854d,_0x354a6c=_0x2fd60c[0x0]||_0x58854d[_0x4a3e1f(0x1ce)];if(!_0x354a6c)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'+_0x4a3e1f(0x10c)+_0x4a3e1f(0x134)+_0x4a3e1f(0x123)),0x1;_0x58854d['verbose']&&(console[_0x4a3e1f(0x9a)](_0x4a3e1f(0xf3)+_0x58854d['site']),console['error'](_0x4a3e1f(0xf8)+_0x354a6c));const _0x435900=await withSpinner(_0x4a3e1f(0x17f)+_0x354a6c+_0x4a3e1f(0x14d),()=>_0x585e64[_0x4a3e1f(0x1ee)][_0x4a3e1f(0x1cc)](_0x354a6c),{'verbose':_0x58854d['verbose']}),_0x3e54f8=_0x435900['data'];if(_0x559522['web']){const _0x1ddfa3=getConsoleNextUrl(_0x559522[_0x4a3e1f(0x29d)],_0x4a3e1f(0x277)+_0x3e54f8['id']);return console[_0x4a3e1f(0x9a)](a31_0x46217b[_0x4a3e1f(0x1a7)]('✔')+_0x4a3e1f(0x21c)+a31_0x46217b[_0x4a3e1f(0x228)](_0x1ddfa3)),openBrowser(_0x1ddfa3),0x0;}return await handleSingleObjectOutput(_0x3e54f8,_0x58854d),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0xed);[a31_0x1e12b4(0x18c)]='Show\x20parent\x20segment\x20schema\x20(column\x20types)';async[a31_0x1e12b4(0x26e)](_0x341856){const _0x117e7b=a31_0x1e12b4,{options:_0x7a4a92,args:_0x14ea5f,tdx:_0x411fbd}=_0x341856,_0xff3941=_0x7a4a92,_0x50a47f=_0x14ea5f[0x0]||_0x7a4a92[_0x117e7b(0x1ce)];if(!_0x50a47f)return showParentSegmentNotSetError(_0x117e7b(0x1c2)+_0x117e7b(0x18e)+_0x117e7b(0x134)+'\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path'),0x1;_0x7a4a92[_0x117e7b(0x24c)]&&(console['error'](_0x117e7b(0xf3)+_0x7a4a92[_0x117e7b(0x29d)]),console['error'](_0x117e7b(0xf8)+_0x50a47f));const _0x40a35b=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x50a47f+_0x117e7b(0x14d),()=>_0x411fbd[_0x117e7b(0x1ee)]['resolveParentId'](_0x50a47f),{'verbose':_0x7a4a92[_0x117e7b(0x24c)]}),_0x52e85e=_0x40a35b['data'],_0x5a2ab9=_0x411fbd['segment']['getOutputDatabaseName'](_0x52e85e);if(_0xff3941[_0x117e7b(0x114)]){const _0x1dcd3e=await this[_0x117e7b(0x250)](_0x341856,_0x50a47f,_0x52e85e,_0x5a2ab9),_0x59d74b=this['formatSchemaJson'](_0x1dcd3e);writeFileSync(_0xff3941['output'],_0x59d74b);const _0x24ff61=_0x1dcd3e['customers'][_0x117e7b(0x9b)]['length']+_0x1dcd3e['behaviors'][_0x117e7b(0xdd)]((_0x1bf47b,_0x57a7ef)=>_0x1bf47b+_0x57a7ef[_0x117e7b(0x9b)][_0x117e7b(0x179)],0x0),_0x2d8412=_0x1dcd3e[_0x117e7b(0xd0)][_0x117e7b(0x1b3)](_0x5b43bb=>_0x5b43bb[_0x117e7b(0x9b)][_0x117e7b(0x179)]===0x0)[_0x117e7b(0x179)];return console[_0x117e7b(0xc0)](_0x117e7b(0x190)+_0xff3941['output']),console['log'](_0x117e7b(0x18f)+_0x5a2ab9),console[_0x117e7b(0xc0)]('\x20\x20Tables:\x201\x20customers\x20+\x20'+_0x1dcd3e[_0x117e7b(0xd0)][_0x117e7b(0x179)]+'\x20behaviors'),console[_0x117e7b(0xc0)]('\x20\x20Columns:\x20'+_0x24ff61+_0x117e7b(0x24f)),_0x2d8412>0x0&&console['log'](_0x117e7b(0x169)+_0x2d8412+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console['error']('\x0a'+a31_0x46217b['bold']('Output\x20Database:')+'\x20'+a31_0x46217b['cyan'](_0x5a2ab9));const _0x453fb9=await withSpinner(_0x117e7b(0x22c),()=>_0x411fbd[_0x117e7b(0x1ee)]['getParentSQL'](_0x52e85e),{'verbose':_0x7a4a92[_0x117e7b(0x24c)]});console[_0x117e7b(0x9a)]('\x0a'+a31_0x46217b['bold']('customers')+'\x20'+a31_0x46217b[_0x117e7b(0x140)]('('+_0x5a2ab9+_0x117e7b(0x216)));const _0x2cd9d1=await executeSchemaQuery(_0x453fb9[_0x117e7b(0x22f)],_0x411fbd,_0x7a4a92);await handleQueryOutput(_0x2cd9d1,_0x7a4a92);const _0x180e92=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x411fbd[_0x117e7b(0x1ee)]['getBehaviorNames'](_0x52e85e),{'verbose':_0x7a4a92['verbose']});for(const _0x3397ef of _0x180e92[_0x117e7b(0x22f)]){const _0x11e1b0=_0x117e7b(0x193)+_0x3397ef['toLowerCase']()[_0x117e7b(0x192)](/\s+/g,'_'),_0xfcc253=_0x117e7b(0xa0)+_0x5a2ab9+'.'+_0x11e1b0;console['error']('\x0a'+a31_0x46217b[_0x117e7b(0x24a)](_0x3397ef)+'\x20'+a31_0x46217b['dim']('('+_0x5a2ab9+'.'+_0x11e1b0+')'));try{const _0x34fdc5=await executeSchemaQuery(_0xfcc253,_0x411fbd,_0x7a4a92);await handleQueryOutput(_0x34fdc5,_0x7a4a92);}catch{console[_0x117e7b(0x9a)](a31_0x46217b[_0x117e7b(0x289)](_0x117e7b(0xbd)));}}return 0x0;}async[a31_0x1e12b4(0x250)](_0x39170b,_0x180b4a,_0x1dadd8,_0x37ca52){const _0x1cdfd3=a31_0x1e12b4,{options:_0x5684e4,tdx:_0x49e480}=_0x39170b,_0x1f8712=await withSpinner(_0x1cdfd3(0x22c),()=>_0x49e480[_0x1cdfd3(0x1ee)][_0x1cdfd3(0x88)](_0x1dadd8),{'verbose':_0x5684e4[_0x1cdfd3(0x24c)]}),_0x3bdef8=await executeSchemaQuery(_0x1f8712[_0x1cdfd3(0x22f)],_0x49e480,_0x5684e4),_0x2a17e0=_0x3bdef8['data']['map'](_0x48bf64=>({'name':_0x48bf64[_0x1cdfd3(0x124)],'type':_0x48bf64[_0x1cdfd3(0x274)]})),_0x5e067f=await withSpinner(_0x1cdfd3(0x291),()=>_0x49e480[_0x1cdfd3(0x1ee)]['getBehaviorNames'](_0x1dadd8),{'verbose':_0x5684e4[_0x1cdfd3(0x24c)]}),_0x227aa5=[];for(const _0x58b212 of _0x5e067f['data']){const _0x573c99='behavior_'+_0x58b212['toLowerCase']()['replace'](/\s+/g,'_'),_0x595254='SELECT\x20*\x20FROM\x20'+_0x37ca52+'.'+_0x573c99;let _0x23f0a9=[];try{const _0x3e590b=await executeSchemaQuery(_0x595254,_0x49e480,_0x5684e4);_0x23f0a9=_0x3e590b['data']['map'](_0x17cf4b=>({'name':_0x17cf4b[_0x1cdfd3(0x124)],'type':_0x17cf4b[_0x1cdfd3(0x274)]}));}catch{}_0x227aa5[_0x1cdfd3(0x195)]({'table':_0x573c99,'columns':_0x23f0a9});}return{'database':_0x37ca52,'parent_segment':_0x180b4a,'parent_id':_0x1dadd8,'customers':{'table':_0x1cdfd3(0x9c),'columns':_0x2a17e0},'behaviors':_0x227aa5};}[a31_0x1e12b4(0x234)](_0x4649d4){const _0xc2dc58=a31_0x1e12b4,_0x40111e=_0x5b2253=>{const _0x20c577=a31_0x556b;if(_0x5b2253[_0x20c577(0x179)]===0x0)return'[]';const _0x6980cc=_0x5b2253[_0x20c577(0x16f)](_0x56bb5d=>_0x20c577(0x1c5)+_0x56bb5d['name']+_0x20c577(0x1f5)+_0x56bb5d[_0x20c577(0x185)]+_0x20c577(0x280));return'[\x0a'+_0x6980cc[_0x20c577(0x161)](',\x0a')+_0x20c577(0x13e);},_0x5a23db=_0x4649d4[_0xc2dc58(0xd0)][_0xc2dc58(0x16f)](_0x1c10b9=>{const _0x28a9ae=_0xc2dc58;return _0x28a9ae(0x21e)+_0x1c10b9[_0x28a9ae(0x111)]+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20'+_0x40111e(_0x1c10b9[_0x28a9ae(0x9b)])['replace'](/^/gm,'\x20\x20')[_0x28a9ae(0x1f7)]()+'\x0a\x20\x20\x20\x20}';})[_0xc2dc58(0x161)](',\x0a');return _0xc2dc58(0xe3)+_0x4649d4[_0xc2dc58(0x10a)]+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x4649d4[_0xc2dc58(0xf2)]+_0xc2dc58(0xf9)+_0x4649d4[_0xc2dc58(0x122)]+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x4649d4['customers'][_0xc2dc58(0x111)]+_0xc2dc58(0xe8)+_0x40111e(_0x4649d4[_0xc2dc58(0x9c)][_0xc2dc58(0x9b)])[_0xc2dc58(0x192)](/^/gm,'\x20\x20')['trim']()+_0xc2dc58(0x230)+_0x5a23db+_0xc2dc58(0x1a1);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x1a2);['description']=a31_0x1e12b4(0x11a);async[a31_0x1e12b4(0x26e)](_0x4bc1a9){const _0x1339f5=a31_0x1e12b4,{options:_0x5d5eb2,args:_0x1b8438,tdx:_0x5d89f4}=_0x4bc1a9,_0x197d9a=_0x1b8438[0x0]||_0x5d5eb2[_0x1339f5(0x1ce)];if(!_0x197d9a)return showParentSegmentNotSetError(_0x1339f5(0xfa)+_0x1339f5(0xd5)),0x1;_0x5d5eb2[_0x1339f5(0x24c)]&&(console[_0x1339f5(0x9a)]('Site:\x20'+_0x5d5eb2[_0x1339f5(0x29d)]),console[_0x1339f5(0x9a)](_0x1339f5(0xf8)+_0x197d9a));const _0x43872e=await withSpinner(_0x1339f5(0xcb)+_0x197d9a+'\x27...',()=>_0x5d89f4[_0x1339f5(0x1ee)][_0x1339f5(0x17e)](_0x197d9a),{'verbose':_0x5d5eb2[_0x1339f5(0x24c)]}),_0x33ffad=_0x43872e[_0x1339f5(0x22f)],_0x5236dc=await withSpinner(_0x1339f5(0xcf)+_0x197d9a+_0x1339f5(0x14d),()=>_0x5d89f4[_0x1339f5(0x1ee)][_0x1339f5(0x88)](_0x33ffad),{'verbose':_0x5d5eb2[_0x1339f5(0x24c)]}),_0x10c1c4=_0x5236dc['data'];return _0x5d5eb2[_0x1339f5(0xc5)]===_0x1339f5(0x141)||_0x5d5eb2['format']===_0x1339f5(0x24b)?await handleSDKOutput([{'sql':_0x10c1c4}],_0x5d5eb2):console['log'](_0x10c1c4),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x96);['description']='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0x1e12b4(0x26e)](_0x278c2b){const _0x3c1ff4=a31_0x1e12b4,{options:_0x516665,args:_0x50cd30,tdx:_0x155154}=_0x278c2b,_0x2edc36=_0x50cd30[0x0]||_0x516665[_0x3c1ff4(0x1ce)];if(!_0x2edc36)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'+_0x3c1ff4(0x197)),0x1;_0x516665[_0x3c1ff4(0x24c)]&&(console[_0x3c1ff4(0x9a)](_0x3c1ff4(0xf3)+_0x516665[_0x3c1ff4(0x29d)]),console[_0x3c1ff4(0x9a)](_0x3c1ff4(0xf8)+_0x2edc36));const _0x3ccf45=await withSpinner(_0x3c1ff4(0xcb)+_0x2edc36+_0x3c1ff4(0x14d),()=>_0x155154[_0x3c1ff4(0x1ee)][_0x3c1ff4(0x17e)](_0x2edc36),{'verbose':_0x516665[_0x3c1ff4(0x24c)]}),_0x13d79d=_0x3ccf45[_0x3c1ff4(0x22f)],_0x491618=await withSpinner(_0x3c1ff4(0xcf)+_0x2edc36+_0x3c1ff4(0x14d),()=>_0x155154[_0x3c1ff4(0x1ee)][_0x3c1ff4(0x88)](_0x13d79d),{'verbose':_0x516665[_0x3c1ff4(0x24c)]});let _0xe73a7=_0x491618[_0x3c1ff4(0x22f)];const _0x26a2ba=resolveLimit(_0x516665[_0x3c1ff4(0x1d3)],DEFAULT_DISPLAY_LIMIT),_0x3b4e58=/\bLIMIT\s+\d+/i['test'](_0xe73a7);!_0x3b4e58&&(_0xe73a7=_0xe73a7[_0x3c1ff4(0x1f7)]()[_0x3c1ff4(0x192)](/;+$/,''),_0xe73a7=_0x3c1ff4(0x294)+_0xe73a7+_0x3c1ff4(0x255)+_0x26a2ba);_0x516665['verbose']&&console[_0x3c1ff4(0x9a)](_0x3c1ff4(0xdb)+_0xe73a7);const _0x421f90=await withProgressSpinner(_0x3c1ff4(0x211),async _0x410374=>{const _0x567f03=_0x3c1ff4,_0x3b7888=await _0x155154['query'][_0x567f03(0x26e)](_0xe73a7,{'catalog':'td','schema':_0x567f03(0x11d),'onJobId':_0x60a866=>{const _0xf56e8d=_0x567f03;_0x410374[_0xf56e8d(0xef)](_0x60a866);}});return _0x3b7888;},{'verbose':_0x516665[_0x3c1ff4(0x24c)]}),_0x28201d=_0x421f90[_0x3c1ff4(0x22f)],_0xcd895=_0x28201d[_0x3c1ff4(0x270)]?_0x3c1ff4(0x22b)+_0x28201d[_0x3c1ff4(0x270)]+']':'';return console[_0x3c1ff4(0x9a)](_0x3c1ff4(0x18d)+_0x28201d['stats'][_0x3c1ff4(0x28e)][_0x3c1ff4(0x227)]()+'\x20rows\x20'+(_0x3c1ff4(0x290)+formatElapsed(_0x28201d['stats'][_0x3c1ff4(0x1d4)])+_0xcd895)),await handleQueryOutput(_0x28201d,_0x516665),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0xe5);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x1ac);async['execute'](_0x327aac){const _0x4d06e5=a31_0x1e12b4,{options:_0x1fcae1,args:_0x378f6b,tdx:_0xb0e15e}=_0x327aac,_0x54c6fa=_0x378f6b[0x0],_0xa0bac4=await withSpinner(_0x54c6fa?_0x4d06e5(0x1ca)+_0x54c6fa+_0x4d06e5(0x14d):_0x4d06e5(0x9d),()=>_0xb0e15e[_0x4d06e5(0x113)][_0x4d06e5(0xe4)](),{'verbose':_0x1fcae1['verbose']});let _0x12be4e=_0xa0bac4[_0x4d06e5(0x22f)][_0x4d06e5(0x1b3)](_0x1c7830=>_0x1c7830[_0x4d06e5(0x20e)]);if(_0x54c6fa){const _0x153e5a=_0x54c6fa[_0x4d06e5(0x192)](/[.+^${}()|[\]\\]/g,_0x4d06e5(0x132))[_0x4d06e5(0x192)](/\*/g,'.*')[_0x4d06e5(0x192)](/\?/g,'.'),_0xc5e547=new RegExp('^'+_0x153e5a+'$','i');_0x12be4e=_0x12be4e[_0x4d06e5(0x1b3)](_0x466392=>_0xc5e547[_0x4d06e5(0x23a)](_0x466392[_0x4d06e5(0x1ef)]));}_0x12be4e[_0x4d06e5(0x215)]((_0x55da40,_0x321716)=>_0x55da40[_0x4d06e5(0x1ef)][_0x4d06e5(0x1f3)](_0x321716[_0x4d06e5(0x1ef)])),console[_0x4d06e5(0x9a)](_0x4d06e5(0x1ad)+_0x12be4e[_0x4d06e5(0x179)]+_0x4d06e5(0x260)+(_0x12be4e[_0x4d06e5(0x179)]!==0x1?'s':''));const _0x582b24=_0xaeca60=>{const _0x3e1636=_0x4d06e5;return getConsoleNextUrl(_0x1fcae1[_0x3e1636(0x29d)],_0x3e1636(0x277)+_0xaeca60);};if(_0x1fcae1[_0x4d06e5(0xc5)]===_0x4d06e5(0x141)||_0x1fcae1['format']==='jsonl'){const _0x150470=_0x12be4e['map'](_0x39c9ea=>({..._0x39c9ea,'url':_0x582b24(_0x39c9ea['id'])}));await handleSDKOutput(_0x150470,_0x1fcae1);}else{if(_0x12be4e[_0x4d06e5(0x179)]===0x0)console[_0x4d06e5(0xc0)]('No\x20RT-enabled\x20parent\x20segments\x20found');else for(const _0x3d8147 of _0x12be4e){const _0x5748fb=_0x3d8147[_0x4d06e5(0x1af)]?a31_0x46217b[_0x4d06e5(0x140)]('\x20('+formatRows(_0x3d8147['population'])+')'):'',_0x14f80c=hyperlink(_0x3d8147['name'],_0x582b24(_0x3d8147['id']));console[_0x4d06e5(0xc0)]('⚡\x20'+_0x14f80c+_0x5748fb);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x8b);['description']='Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML';async[a31_0x1e12b4(0x26e)](_0x5de0ee){const _0xe455c0=a31_0x1e12b4,{options:_0xc83bd2,args:_0x276f41,tdx:_0x35442f}=_0x5de0ee,_0x27e9df=_0x276f41[0x0]||_0xc83bd2[_0xe455c0(0x1ce)];if(!_0x27e9df)return showParentSegmentNotSetError(_0xe455c0(0x205)+_0xe455c0(0x139)),0x1;const _0x3fd5ee=resolveYamlFile(_0x27e9df);if(!existsSync(_0x3fd5ee))return showFileNotFoundError(_0x3fd5ee,_0x27e9df),0x1;let _0x3208ae;try{_0x3208ae=readFileSync(_0x3fd5ee,'utf-8');}catch(_0xacf590){const _0x3eb76c=_0xacf590 instanceof Error?_0xacf590[_0xe455c0(0x112)]:String(_0xacf590);return console[_0xe455c0(0x9a)](_0xe455c0(0x1ff)+_0x3eb76c),0x1;}const _0x307dee=createCommandSpinner(a31_0x46217b['dim'](_0xe455c0(0x259)),{'verbose':_0xc83bd2[_0xe455c0(0x24c)]});_0x307dee[_0xe455c0(0x1e4)]();const _0xe75c05={'realtime':!![],'onProgress':_0x4e769a=>{_0x307dee['text']=formatProgressMessage(_0x4e769a);}};let _0x2ec1dc;try{_0x2ec1dc=await _0x35442f[_0xe455c0(0x1ee)][_0xe455c0(0x1d2)](_0x3208ae,_0xe75c05),_0x307dee['stop']();}catch(_0x3a9783){_0x307dee[_0xe455c0(0xa3)]();throw _0x3a9783;}console[_0xe455c0(0x9a)]('\x0a'+a31_0x46217b['bold'](_0xe455c0(0x11c))+'\x20'+_0x2ec1dc[_0xe455c0(0x1ef)]),console[_0xe455c0(0x9a)]('═'[_0xe455c0(0xb1)](0x3c)),displayRealtimeValidation(_0x2ec1dc),console[_0xe455c0(0x9a)]('─'[_0xe455c0(0xb1)](0x3c));if(_0x2ec1dc[_0xe455c0(0x203)][_0xe455c0(0x179)]>0x0){console[_0xe455c0(0x9a)]('\x0a'+a31_0x46217b['red']('Errors:'));for(const _0x38a1da of _0x2ec1dc['errors']){console[_0xe455c0(0x9a)]('\x20\x20'+a31_0x46217b[_0xe455c0(0xba)]('•')+'\x20'+_0x38a1da);}}return _0x2ec1dc[_0xe455c0(0x15c)]&&console[_0xe455c0(0x9a)]('\x0a'+a31_0x46217b[_0xe455c0(0x1a7)]('✔')+_0xe455c0(0xc8)),_0x2ec1dc[_0xe455c0(0x15c)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0x1e12b4(0x252);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x196);async[a31_0x1e12b4(0x26e)](_0x977b72){const _0x29e733=a31_0x1e12b4,{options:_0x4206f6,args:_0x72d93a,tdx:_0xa83de}=_0x977b72,_0x3f2ffc=_0x72d93a[0x0]||_0x4206f6[_0x29e733(0x1ce)];if(!_0x3f2ffc)return showParentSegmentNotSetError(_0x29e733(0x25d)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20jn\x20list\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20for\x20specific\x20parent\x20segment'),0x1;_0x4206f6[_0x29e733(0x24c)]&&(console[_0x29e733(0x9a)](_0x29e733(0xf3)+_0x4206f6[_0x29e733(0x29d)]),console[_0x29e733(0x9a)]('Parent\x20segment:\x20'+_0x3f2ffc));const _0x58e7a7=await withSpinner(_0x29e733(0xcb)+_0x3f2ffc+_0x29e733(0x14d),()=>_0xa83de[_0x29e733(0x1ee)]['resolveParentId'](_0x3f2ffc),{'verbose':_0x4206f6[_0x29e733(0x24c)]}),_0x2c61f3=_0x58e7a7['data'],_0x251423=await withSpinner(_0x29e733(0x180)+_0x3f2ffc+_0x29e733(0x14d),()=>_0xa83de[_0x29e733(0x113)][_0x29e733(0x238)](_0x2c61f3),{'verbose':_0x4206f6['verbose']}),_0x2b993b=_0x251423[_0x29e733(0x22f)];console[_0x29e733(0x9a)](_0x29e733(0x1ad)+_0x2b993b[_0x29e733(0x179)]+'\x20RT\x20journey'+(_0x2b993b[_0x29e733(0x179)]!==0x1?'s':''));if(_0x4206f6['format']===_0x29e733(0x141)||_0x4206f6[_0x29e733(0xc5)]===_0x29e733(0x24b))await handleSDKOutput(_0x2b993b,_0x4206f6);else{if(_0x2b993b[_0x29e733(0x179)]===0x0)console['log'](_0x29e733(0x194));else for(const _0x347844 of _0x2b993b){const _0x3f5c50=_0x347844[_0x29e733(0x202)]===_0x29e733(0xd8)?'🚀':'📝',_0x178b21=_0x347844[_0x29e733(0x1dd)]?a31_0x46217b[_0x29e733(0x289)](_0x29e733(0x224)):'',_0x5d5034=a31_0x46217b['dim']('\x20('+_0x347844[_0x29e733(0x13d)]+_0x29e733(0x1f1)+(_0x347844[_0x29e733(0x13d)]!==0x1?'s':'')+')');console[_0x29e733(0xc0)](_0x3f5c50+'\x20'+_0x347844[_0x29e733(0x1ef)]+_0x178b21+_0x5d5034);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0xd3);['description']=a31_0x1e12b4(0xbb);async[a31_0x1e12b4(0x26e)](_0x36d5fd){const _0x4eb7ca=a31_0x1e12b4,{options:_0x1fc290,args:_0x3af277,tdx:_0x1121f5}=_0x36d5fd,_0x35b180=_0x3af277[0x0];if(!_0x35b180)return console['error'](a31_0x46217b['red'](_0x4eb7ca(0x103))),console[_0x4eb7ca(0x9a)](_0x4eb7ca(0x1b2)),console[_0x4eb7ca(0x9a)](a31_0x46217b['dim']('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x1fc290[_0x4eb7ca(0x24c)]&&(console[_0x4eb7ca(0x9a)](_0x4eb7ca(0xf3)+_0x1fc290[_0x4eb7ca(0x29d)]),console[_0x4eb7ca(0x9a)](_0x4eb7ca(0xad)+_0x35b180));const _0x3d78f5=await withSpinner(_0x4eb7ca(0x12b)+_0x35b180+'\x27...',()=>_0x1121f5[_0x4eb7ca(0x113)][_0x4eb7ca(0x23c)](_0x35b180),{'verbose':_0x1fc290[_0x4eb7ca(0x24c)]}),_0x5b1179=_0x3d78f5[_0x4eb7ca(0x22f)];console[_0x4eb7ca(0x9a)]('✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x5b1179['name']+'\x27');if(_0x1fc290[_0x4eb7ca(0xc5)]===_0x4eb7ca(0x141)||_0x1fc290[_0x4eb7ca(0xc5)]===_0x4eb7ca(0x24b))await handleSDKOutput([_0x5b1179],_0x1fc290);else{const _0x48c79b=_0x5b1179[_0x4eb7ca(0x202)]===_0x4eb7ca(0xd8)?'🚀':'📝',_0x10c337=_0x5b1179[_0x4eb7ca(0x1dd)]?a31_0x46217b[_0x4eb7ca(0x289)](_0x4eb7ca(0x224)):'';console[_0x4eb7ca(0xc0)](_0x48c79b+'\x20'+_0x5b1179[_0x4eb7ca(0x1ef)]+_0x10c337);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x13a);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x297);async[a31_0x1e12b4(0x26e)](_0x49e50d){const _0x20558d=a31_0x1e12b4,{options:_0x4e0b6d,args:_0x2b4650,tdx:_0x52274d}=_0x49e50d,_0x2c7f14=_0x2b4650[0x0];if(!_0x2c7f14)return console[_0x20558d(0x9a)](a31_0x46217b['red']('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0x20558d(0x9a)](_0x20558d(0xa9)),console[_0x20558d(0x9a)](a31_0x46217b['dim'](_0x20558d(0x163))),0x1;_0x4e0b6d['verbose']&&(console['error'](_0x20558d(0xf3)+_0x4e0b6d['site']),console[_0x20558d(0x9a)](_0x20558d(0xad)+_0x2c7f14));const _0x5e6e5a=await withSpinner(_0x20558d(0x247)+_0x2c7f14+_0x20558d(0x14d),()=>_0x52274d[_0x20558d(0x113)][_0x20558d(0x251)](_0x2c7f14),{'verbose':_0x4e0b6d[_0x20558d(0x24c)]}),_0x2b95dd=_0x5e6e5a[_0x20558d(0x22f)];console[_0x20558d(0x9a)]('✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x2b95dd[_0x20558d(0x1ef)]+'\x27');if(_0x4e0b6d['format']===_0x20558d(0x141)||_0x4e0b6d['format']==='jsonl')await handleSDKOutput([_0x2b95dd],_0x4e0b6d);else{const _0x5e35ad=_0x2b95dd[_0x20558d(0x202)]==='launched'?'🚀':'📝',_0x5f0ffa=_0x2b95dd['paused']?a31_0x46217b['yellow']('\x20(paused)'):'';console[_0x20558d(0xc0)](_0x5e35ad+'\x20'+_0x2b95dd[_0x20558d(0x1ef)]+_0x5f0ffa);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x166);['description']=a31_0x1e12b4(0x153);async[a31_0x1e12b4(0x26e)](_0x4d2a77){const _0x5649cf=a31_0x1e12b4,{options:_0x47f9f1,args:_0x444bd8,tdx:_0x37344c}=_0x4d2a77,_0x240962=_0x444bd8[0x0]||_0x47f9f1[_0x5649cf(0x1ce)];if(!_0x240962)return showParentSegmentNotSetError(_0x5649cf(0x22e)+_0x5649cf(0x279)),0x1;_0x47f9f1[_0x5649cf(0x24c)]&&(console['error'](_0x5649cf(0xf3)+_0x47f9f1['site']),console['error'](_0x5649cf(0xf8)+_0x240962));const _0x50195c=await withSpinner(_0x5649cf(0xcb)+_0x240962+_0x5649cf(0x14d),()=>_0x37344c[_0x5649cf(0x1ee)][_0x5649cf(0x17e)](_0x240962),{'verbose':_0x47f9f1[_0x5649cf(0x24c)]}),_0x4ce7b2=_0x50195c[_0x5649cf(0x22f)],_0x8c19b=await withSpinner('Getting\x20RT\x20configuration\x20version\x20for\x20\x27'+_0x240962+_0x5649cf(0x14d),()=>_0x37344c[_0x5649cf(0x113)][_0x5649cf(0x1a3)](_0x4ce7b2),{'verbose':_0x47f9f1[_0x5649cf(0x24c)]}),_0xef17b2=_0x8c19b[_0x5649cf(0x22f)];return console[_0x5649cf(0x9a)](_0x5649cf(0x1c0)),_0x47f9f1[_0x5649cf(0xc5)]==='json'||_0x47f9f1[_0x5649cf(0xc5)]===_0x5649cf(0x24b)?await handleSDKOutput([_0xef17b2],_0x47f9f1):(console[_0x5649cf(0xc0)](_0x5649cf(0x242)+_0xef17b2['id']),console['log'](_0x5649cf(0x275)+_0xef17b2[_0x5649cf(0x191)]),console[_0x5649cf(0xc0)]('identifier:\x20'+_0xef17b2['identifier']),console[_0x5649cf(0xc0)](_0x5649cf(0x2a1)+_0xef17b2[_0x5649cf(0x282)]),console['log'](_0x5649cf(0x83)+_0xef17b2['status'])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0xdc);[a31_0x1e12b4(0x18c)]='List\x20personalization\x20services\x20for\x20a\x20parent\x20segment';async[a31_0x1e12b4(0x26e)](_0x3b3990){const _0x508685=a31_0x1e12b4,{options:_0x528fae,args:_0x4811da,tdx:_0x529760}=_0x3b3990,_0x3e9e62=_0x4811da[0x0]||_0x528fae[_0x508685(0x1ce)];if(!_0x3e9e62)return showParentSegmentNotSetError(_0x508685(0x189)+_0x508685(0x218)),0x1;const _0x18f59f=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3e9e62+_0x508685(0x14d),()=>_0x529760['segment']['resolveParentId'](_0x3e9e62),{'verbose':_0x528fae['verbose']}),_0x2ff720=_0x18f59f[_0x508685(0x22f)],_0x5acdab=await withSpinner(_0x508685(0x159)+_0x3e9e62+'\x27...',()=>_0x529760[_0x508685(0x90)][_0x508685(0xe4)](_0x2ff720),{'verbose':_0x528fae[_0x508685(0x24c)]}),_0x42fb5c=_0x5acdab['data'];console[_0x508685(0x9a)](_0x508685(0x1ad)+_0x42fb5c['length']+_0x508685(0x10d)+(_0x42fb5c[_0x508685(0x179)]!==0x1?'s':''));if(_0x528fae[_0x508685(0xc5)]===_0x508685(0x141)||_0x528fae[_0x508685(0xc5)]===_0x508685(0x24b))await handleSDKOutput(_0x42fb5c,_0x528fae);else{if(_0x42fb5c[_0x508685(0x179)]===0x0)console['log']('No\x20personalization\x20services\x20configured'),console[_0x508685(0x9a)](a31_0x46217b[_0x508685(0x228)]('\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML'));else for(const _0x12fb5a of _0x42fb5c){console[_0x508685(0xc0)](a31_0x46217b[_0x508685(0x24a)](_0x12fb5a[_0x508685(0x1ef)])+'\x20'+a31_0x46217b['dim'](_0x508685(0xae)+_0x12fb5a['id']+')'));_0x12fb5a[_0x508685(0x18c)]&&console['log']('\x20\x20'+a31_0x46217b[_0x508685(0x140)](_0x12fb5a[_0x508685(0x18c)]));if(_0x12fb5a[_0x508685(0x1b4)]&&_0x12fb5a[_0x508685(0x1b4)][_0x508685(0x179)]>0x0)for(const _0x38fbab of _0x12fb5a[_0x508685(0x1b4)]){const _0xeaca4d=_0x38fbab[_0x508685(0x109)]?.[_0x508685(0x179)]?_0x38fbab[_0x508685(0x109)][_0x508685(0x161)](',\x20'):_0x508685(0x1d1);console[_0x508685(0xc0)]('\x20\x20'+a31_0x46217b['cyan']('token:')+'\x20'+_0x38fbab[_0x508685(0x1ef)]+'\x20'+a31_0x46217b[_0x508685(0x140)](_0x508685(0xae)+_0x38fbab['id']+')')),console['log'](_0x508685(0x131)+a31_0x46217b['dim'](_0x508685(0x1e5))+'\x20'+_0xeaca4d);}else console[_0x508685(0xc0)]('\x20\x20'+a31_0x46217b[_0x508685(0x140)](_0x508685(0x15a)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']='ps:pz:service:create';['description']='Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment';async[a31_0x1e12b4(0x26e)](_0x48ca12){const _0x3787f5=a31_0x1e12b4,{options:_0x2c14ca,args:_0x5f0273,tdx:_0x4967f3}=_0x48ca12,_0x3a014f=_0x2c14ca,_0xc74b92=_0x5f0273[0x0],_0x526f71=_0x5f0273[0x1]||_0x2c14ca[_0x3787f5(0x1ce)];if(!_0xc74b92)return console[_0x3787f5(0x9a)]('Error:\x20Service\x20name\x20is\x20required'),console[_0x3787f5(0x9a)](_0x3787f5(0xc7)),console[_0x3787f5(0x9a)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x526f71)return showParentSegmentNotSetError(_0x3787f5(0x8c)+_0x3787f5(0x225)),0x1;const _0x2cf416=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x526f71+_0x3787f5(0x14d),()=>_0x4967f3[_0x3787f5(0x1ee)]['resolveParentId'](_0x526f71),{'verbose':_0x2c14ca[_0x3787f5(0x24c)]}),_0x12909d=_0x2cf416[_0x3787f5(0x22f)],_0x3e90ab={'name':_0xc74b92,'description':_0x3a014f[_0x3787f5(0x18c)],'public':_0x3a014f[_0x3787f5(0x135)]},_0x207f3f=await withSpinner('Creating\x20personalization\x20service\x20\x27'+_0xc74b92+_0x3787f5(0x14d),()=>_0x4967f3[_0x3787f5(0x90)][_0x3787f5(0x1e2)](_0x12909d,_0x3e90ab),{'verbose':_0x2c14ca['verbose']}),_0x11638b=_0x207f3f[_0x3787f5(0x22f)];return console[_0x3787f5(0x9a)](_0x3787f5(0x1a8)+_0x11638b[_0x3787f5(0x1ef)]+'\x27\x20with\x20ID:\x20'+_0x11638b['id']),await handleSDKOutput([_0x11638b],_0x2c14ca),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]='ps:pz:service:show';['description']='Show\x20personalization\x20service\x20details';async['execute'](_0x2fd54c){const _0x1c0287=a31_0x1e12b4,{options:_0xeefe,args:_0x4fac82,tdx:_0x5b9243}=_0x2fd54c,_0x33bcac=_0x4fac82[0x0],_0x1560d5=_0x4fac82[0x1]||_0xeefe[_0x1c0287(0x1ce)];if(!_0x33bcac)return console[_0x1c0287(0x9a)](_0x1c0287(0x167)),console[_0x1c0287(0x9a)](_0x1c0287(0x287)),console[_0x1c0287(0x9a)](_0x1c0287(0xdf)),0x1;if(!_0x1560d5)return showParentSegmentNotSetError(_0x1c0287(0x101)+_0x1c0287(0xdf)),0x1;const _0x578f1b=await withSpinner(_0x1c0287(0xcb)+_0x1560d5+_0x1c0287(0x14d),()=>_0x5b9243[_0x1c0287(0x1ee)][_0x1c0287(0x17e)](_0x1560d5),{'verbose':_0xeefe[_0x1c0287(0x24c)]}),_0x197baf=_0x578f1b[_0x1c0287(0x22f)],_0x13aa17=await withSpinner(_0x1c0287(0x278)+_0x33bcac+_0x1c0287(0x14d),()=>_0x5b9243[_0x1c0287(0x90)][_0x1c0287(0xd4)](_0x197baf,_0x33bcac),{'verbose':_0xeefe[_0x1c0287(0x24c)]}),_0x492fd6=_0x13aa17['data'];if(_0xeefe[_0x1c0287(0x141)]||_0xeefe['jsonl'])await handleSDKOutput([_0x492fd6],_0xeefe);else{console['log'](a31_0x46217b['bold'](_0x492fd6[_0x1c0287(0x1ef)])+'\x20'+a31_0x46217b[_0x1c0287(0x140)](_0x1c0287(0xae)+_0x492fd6['id']+')'));_0x492fd6[_0x1c0287(0x18c)]&&console['log']('\x20\x20'+a31_0x46217b[_0x1c0287(0x140)](_0x492fd6[_0x1c0287(0x18c)]));console['log']('\x20\x20'+a31_0x46217b[_0x1c0287(0x228)](_0x1c0287(0x298))+'\x20'+(_0x492fd6[_0x1c0287(0x135)]?_0x1c0287(0x25a):'no'));if(_0x492fd6[_0x1c0287(0x1b4)]&&_0x492fd6['tokens']['length']>0x0)for(const _0x190399 of _0x492fd6[_0x1c0287(0x1b4)]){const _0x40e1a3=_0x190399['allowedIps']?.[_0x1c0287(0x179)]?_0x190399[_0x1c0287(0x109)][_0x1c0287(0x161)](',\x20'):_0x1c0287(0x1d1);console[_0x1c0287(0xc0)]('\x20\x20'+a31_0x46217b[_0x1c0287(0x228)](_0x1c0287(0x146))+'\x20'+_0x190399[_0x1c0287(0x1ef)]+'\x20'+a31_0x46217b['dim'](_0x1c0287(0xae)+_0x190399['id']+')')),console[_0x1c0287(0xc0)](_0x1c0287(0x131)+a31_0x46217b[_0x1c0287(0x140)]('allowed\x20IPs:')+'\x20'+_0x40e1a3);}else console[_0x1c0287(0xc0)]('\x20\x20'+a31_0x46217b['dim']('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x8f);['description']=a31_0x1e12b4(0xe2);async[a31_0x1e12b4(0x26e)](_0x473ea5){const _0x27cf57=a31_0x1e12b4,{options:_0x249668,args:_0x4a077b,tdx:_0x1618d4}=_0x473ea5,_0x542052=_0x4a077b[0x0],_0x36f913=_0x4a077b[0x1]||_0x249668[_0x27cf57(0x1ce)];if(!_0x542052)return console[_0x27cf57(0x9a)](_0x27cf57(0x167)),console[_0x27cf57(0x9a)](_0x27cf57(0x1f8)),console[_0x27cf57(0x9a)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x36f913)return showParentSegmentNotSetError(_0x27cf57(0xe9)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x5164fc=await withSpinner(_0x27cf57(0xcb)+_0x36f913+'\x27...',()=>_0x1618d4[_0x27cf57(0x1ee)][_0x27cf57(0x17e)](_0x36f913),{'verbose':_0x249668[_0x27cf57(0x24c)]}),_0x2e7521=_0x5164fc[_0x27cf57(0x22f)];return await withSpinner(_0x27cf57(0xfd)+_0x542052+'\x27...',()=>_0x1618d4[_0x27cf57(0x90)][_0x27cf57(0x165)](_0x2e7521,_0x542052),{'verbose':_0x249668[_0x27cf57(0x24c)]}),console['error']('✔\x20Deleted\x20personalization\x20service\x20\x27'+_0x542052+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0xab);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x1ab);async[a31_0x1e12b4(0x26e)](_0x2e0c48){const _0x257382=a31_0x1e12b4,{options:_0x2dc026,args:_0x7bcc0,tdx:_0x7b38e9}=_0x2e0c48,_0x3e8e35=_0x2dc026,_0x25950f=_0x7bcc0[0x0],_0x3061cd=_0x7bcc0[0x1]||_0x2dc026[_0x257382(0x1ce)];if(!_0x25950f)return console['error']('Error:\x20Service\x20ID\x20is\x20required'),console[_0x257382(0x9a)](_0x257382(0xf5)),console[_0x257382(0x9a)](_0x257382(0x23f)),0x1;if(!_0x3e8e35[_0x257382(0x1ef)])return console[_0x257382(0x9a)](_0x257382(0x182)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),0x1;if(!_0x3061cd)return showParentSegmentNotSetError(_0x257382(0xe6)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x5cd92f=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3061cd+'\x27...',()=>_0x7b38e9['segment']['resolveParentId'](_0x3061cd),{'verbose':_0x2dc026[_0x257382(0x24c)]}),_0x49aecc=_0x5cd92f[_0x257382(0x22f)],_0x237f56={'name':_0x3e8e35[_0x257382(0x1ef)]};_0x3e8e35['description']!==undefined&&(_0x237f56[_0x257382(0x18c)]=_0x3e8e35[_0x257382(0x18c)]);const _0x3b8485=await withSpinner(_0x257382(0x14c)+_0x25950f+_0x257382(0x14d),()=>_0x7b38e9['personalization']['patch'](_0x49aecc,_0x25950f,_0x237f56),{'verbose':_0x2dc026[_0x257382(0x24c)]}),_0x5807e9=_0x3b8485[_0x257382(0x22f)];return console[_0x257382(0x9a)](_0x257382(0x15b)+_0x5807e9[_0x257382(0x1ef)]+'\x27'),await handleSDKOutput([_0x5807e9],_0x2dc026),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x226);[a31_0x1e12b4(0x18c)]='Create\x20a\x20token\x20for\x20a\x20personalization\x20service';async[a31_0x1e12b4(0x26e)](_0xb86632){const _0x431b54=a31_0x1e12b4,{options:_0x1e7754,args:_0x41506e,tdx:_0x3950a7}=_0xb86632,_0x530110=_0x1e7754,_0x552bba=_0x41506e[0x0],_0x10d736=_0x41506e[0x1],_0x211ef3=_0x41506e[0x2]||_0x1e7754[_0x431b54(0x1ce)];if(!_0x552bba)return console['error'](_0x431b54(0x26d)),console[_0x431b54(0x9a)](_0x431b54(0x87)),console[_0x431b54(0x9a)](_0x431b54(0x1c8)),0x1;if(!_0x10d736)return console[_0x431b54(0x9a)](_0x431b54(0x167)),console[_0x431b54(0x9a)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x431b54(0x9a)](_0x431b54(0x1c8)),0x1;if(!_0x211ef3)return showParentSegmentNotSetError(_0x431b54(0x1aa)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x114e9d=await withSpinner(_0x431b54(0xcb)+_0x211ef3+'\x27...',()=>_0x3950a7['segment'][_0x431b54(0x17e)](_0x211ef3),{'verbose':_0x1e7754['verbose']}),_0x5c9c93=_0x114e9d[_0x431b54(0x22f)],_0x207c23={'name':_0x552bba};_0x530110['allowedIps']&&(_0x207c23[_0x431b54(0x109)]=_0x530110[_0x431b54(0x109)][_0x431b54(0x1e1)](',')['map'](_0x5d9716=>_0x5d9716[_0x431b54(0x1f7)]()));_0x530110[_0x431b54(0x18c)]&&(_0x207c23[_0x431b54(0x18c)]=_0x530110[_0x431b54(0x18c)]);const _0x217092=await withSpinner(_0x431b54(0x130)+_0x552bba+'\x27\x20for\x20service\x20\x27'+_0x10d736+_0x431b54(0x14d),()=>_0x3950a7['personalization']['createToken'](_0x5c9c93,_0x10d736,_0x207c23),{'verbose':_0x1e7754[_0x431b54(0x24c)]}),_0x520d7c=_0x217092['data'];return console[_0x431b54(0x9a)](_0x431b54(0x1c1)+_0x520d7c['name']+_0x431b54(0x236)+_0x520d7c['id']),_0x520d7c['value']&&(console[_0x431b54(0x9a)](a31_0x46217b[_0x431b54(0x289)]('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0x431b54(0x9a)](a31_0x46217b['cyan'](_0x520d7c[_0x431b54(0x150)])),console[_0x431b54(0x9a)]('')),await handleSDKOutput([_0x520d7c],_0x1e7754),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x264);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x1d6);async[a31_0x1e12b4(0x26e)](_0x12d3eb){const _0x5e636a=a31_0x1e12b4,{options:_0x266a00,args:_0x575fec,tdx:_0x223079}=_0x12d3eb,_0x3043a7=_0x575fec[0x0],_0x5b0033=_0x575fec[0x1]||_0x266a00[_0x5e636a(0x1ce)];if(!_0x3043a7)return console[_0x5e636a(0x9a)](_0x5e636a(0x29a)),console[_0x5e636a(0x9a)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console[_0x5e636a(0x9a)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x5b0033)return showParentSegmentNotSetError(_0x5e636a(0x97)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x489b23=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x5b0033+_0x5e636a(0x14d),()=>_0x223079[_0x5e636a(0x1ee)][_0x5e636a(0x17e)](_0x5b0033),{'verbose':_0x266a00['verbose']}),_0x29194d=_0x489b23['data'],_0x1aba81=await withSpinner(_0x5e636a(0x11f),()=>_0x223079[_0x5e636a(0x90)][_0x5e636a(0xe4)](_0x29194d),{'verbose':_0x266a00[_0x5e636a(0x24c)]}),_0x5eea64=_0x1aba81['data'];let _0xdcf890;for(const _0x51d6c6 of _0x5eea64){if(_0x51d6c6[_0x5e636a(0x1b4)]?.['some'](_0x586f00=>_0x586f00['id']===_0x3043a7)){_0xdcf890=_0x51d6c6['id'];break;}}if(!_0xdcf890)return console[_0x5e636a(0x9a)](_0x5e636a(0x204)+_0x3043a7+_0x5e636a(0x158)),0x1;const _0x9c8cc=await withSpinner(_0x5e636a(0xe0)+_0x3043a7+_0x5e636a(0x14d),()=>_0x223079['personalization'][_0x5e636a(0x172)](_0x29194d,_0xdcf890,_0x3043a7),{'verbose':_0x266a00[_0x5e636a(0x24c)]}),_0x4e3096=_0x9c8cc['data'];return console[_0x5e636a(0x9a)](_0x5e636a(0x1f4)+(_0x4e3096[_0x5e636a(0x1ef)]||_0x3043a7)+'\x27'),await handleSDKOutput([_0x4e3096],_0x266a00),0x0;}}export class PSPzListCommand extends BaseCommand{['name']=a31_0x1e12b4(0x15f);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x214);async['execute'](_0x2aec80){const _0x1eb2c7=a31_0x1e12b4,{options:_0x48d86e,args:_0x5e7d50,tdx:_0x30bb61}=_0x2aec80,_0x274227=_0x5e7d50[0x0]||_0x48d86e[_0x1eb2c7(0x1ce)];if(!_0x274227)return showParentSegmentNotSetError(_0x1eb2c7(0x29e)+_0x1eb2c7(0x219)),0x1;const _0x3649e5=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x274227+_0x1eb2c7(0x14d),()=>_0x30bb61[_0x1eb2c7(0x1ee)][_0x1eb2c7(0x17e)](_0x274227),{'verbose':_0x48d86e['verbose']}),_0x204f67=_0x3649e5[_0x1eb2c7(0x22f)],_0x445d22=await withSpinner(_0x1eb2c7(0x9e)+_0x274227+_0x1eb2c7(0x14d),()=>_0x30bb61['personalization'][_0x1eb2c7(0x1e8)](_0x204f67),{'verbose':_0x48d86e[_0x1eb2c7(0x24c)]}),_0x2227ca=_0x445d22['data'];console[_0x1eb2c7(0x9a)](_0x1eb2c7(0x1ad)+_0x2227ca['length']+_0x1eb2c7(0xa8)+(_0x2227ca[_0x1eb2c7(0x179)]!==0x1?'s':''));if(_0x48d86e[_0x1eb2c7(0xc5)]==='json'||_0x48d86e[_0x1eb2c7(0xc5)]===_0x1eb2c7(0x24b))await handleSDKOutput(_0x2227ca,_0x48d86e);else{if(_0x2227ca['length']===0x0)console['log'](_0x1eb2c7(0xf1));else for(const _0x49a8a6 of _0x2227ca){console[_0x1eb2c7(0xc0)](a31_0x46217b[_0x1eb2c7(0x24a)](_0x49a8a6['name'])+'\x20'+a31_0x46217b[_0x1eb2c7(0x140)](_0x1eb2c7(0xae)+_0x49a8a6['id']+')'));_0x49a8a6[_0x1eb2c7(0x18c)]&&console[_0x1eb2c7(0xc0)]('\x20\x20'+a31_0x46217b['dim'](_0x49a8a6[_0x1eb2c7(0x18c)]));const _0x36e680=_0x49a8a6[_0x1eb2c7(0x148)]?.[_0x1eb2c7(0x179)]||0x0;console['log']('\x20\x20'+a31_0x46217b['cyan'](_0x1eb2c7(0x110))+'\x20'+_0x36e680);if(_0x49a8a6[_0x1eb2c7(0x148)]&&_0x49a8a6['sections'][_0x1eb2c7(0x179)]>0x0)for(const _0x4fff02 of _0x49a8a6['sections']){console['log'](_0x1eb2c7(0xcd)+_0x4fff02[_0x1eb2c7(0x1ef)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x23d);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0xac);async[a31_0x1e12b4(0x26e)](_0x23e250){const _0x548da8=a31_0x1e12b4,{options:_0x56b8c1,args:_0x4ccc3a,tdx:_0x7360a9}=_0x23e250,_0x20ab73=_0x4ccc3a[0x0];if(!_0x20ab73)return console[_0x548da8(0x9a)](_0x548da8(0x1bb)),console[_0x548da8(0x9a)](_0x548da8(0x1fb)),0x1;const _0x1d9b36=await withSpinner(_0x548da8(0x19f)+_0x20ab73+_0x548da8(0x14d),()=>_0x7360a9[_0x548da8(0x90)][_0x548da8(0x240)](_0x20ab73),{'verbose':_0x56b8c1[_0x548da8(0x24c)]}),_0x35e1ad=_0x1d9b36[_0x548da8(0x22f)];console[_0x548da8(0x9a)](_0x548da8(0x168)+_0x35e1ad[_0x548da8(0x1ef)]+'\x27');if(_0x56b8c1[_0x548da8(0xc5)]==='json'||_0x56b8c1[_0x548da8(0xc5)]==='jsonl')await handleSDKOutput([_0x35e1ad],_0x56b8c1);else{console['log'](a31_0x46217b[_0x548da8(0x24a)](_0x35e1ad[_0x548da8(0x1ef)])+'\x20'+a31_0x46217b[_0x548da8(0x140)](_0x548da8(0xae)+_0x35e1ad['id']+')'));_0x35e1ad['description']&&console[_0x548da8(0xc0)]('\x20\x20'+a31_0x46217b[_0x548da8(0x140)](_0x35e1ad[_0x548da8(0x18c)]));_0x35e1ad[_0x548da8(0x191)]&&console['log']('\x20\x20'+a31_0x46217b[_0x548da8(0x228)](_0x548da8(0x117))+'\x20'+_0x35e1ad['audienceId']);console[_0x548da8(0xc0)]('\x20\x20'+a31_0x46217b['cyan'](_0x548da8(0x28b))+'\x20'+_0x35e1ad[_0x548da8(0x115)]),console[_0x548da8(0xc0)]('\x20\x20'+a31_0x46217b[_0x548da8(0x228)]('updated:')+'\x20'+_0x35e1ad[_0x548da8(0x292)]);const _0x2aab85=_0x35e1ad[_0x548da8(0x148)]?.[_0x548da8(0x179)]||0x0;console[_0x548da8(0xc0)]('\x20\x20'+a31_0x46217b['cyan']('sections:')+'\x20'+_0x2aab85);if(_0x35e1ad['sections']&&_0x35e1ad[_0x548da8(0x148)]['length']>0x0)for(const _0x4440bb of _0x35e1ad[_0x548da8(0x148)]){console[_0x548da8(0xc0)](_0x548da8(0x131)+a31_0x46217b[_0x548da8(0x24a)](_0x4440bb[_0x548da8(0x1ef)])+'\x20'+a31_0x46217b[_0x548da8(0x140)](_0x548da8(0xae)+_0x4440bb['id']+')')),_0x4440bb['entryCriteria']&&(console[_0x548da8(0xc0)]('\x20\x20\x20\x20\x20\x20'+a31_0x46217b['cyan'](_0x548da8(0x156))+'\x20'+_0x4440bb[_0x548da8(0x1cb)]['name']),_0x4440bb[_0x548da8(0x1cb)][_0x548da8(0x118)]?.[_0x548da8(0x20d)]&&console['log'](_0x548da8(0xb8)+a31_0x46217b['cyan'](_0x548da8(0x1c7))+'\x20'+_0x4440bb[_0x548da8(0x1cb)][_0x548da8(0x118)][_0x548da8(0x20d)])),_0x4440bb[_0x548da8(0x2a0)]&&console[_0x548da8(0xc0)](_0x548da8(0x154)+a31_0x46217b['cyan'](_0x548da8(0xbe))+'\x20'+JSON[_0x548da8(0x183)](_0x4440bb['payload'])),_0x4440bb[_0x548da8(0x201)]&&console[_0x548da8(0xc0)]('\x20\x20\x20\x20\x20\x20'+a31_0x46217b[_0x548da8(0x228)](_0x548da8(0x199))+_0x548da8(0x128));}}return 0x0;}}function a31_0x556b(_0x1edab1,_0x37c64b){_0x1edab1=_0x1edab1-0x83;const _0x52a9c3=a31_0x52a9();let _0x556b9f=_0x52a9c3[_0x1edab1];return _0x556b9f;}export class PSPzDeleteCommand extends BaseCommand{['name']=a31_0x1e12b4(0x11e);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x27c);async[a31_0x1e12b4(0x26e)](_0x42b74a){const _0x5476ff=a31_0x1e12b4,{options:_0x2c4c5a,args:_0x5c5f0f,tdx:_0x1c6883}=_0x42b74a,_0x42af93=_0x5c5f0f[0x0];if(!_0x42af93)return console[_0x5476ff(0x9a)](_0x5476ff(0x1bb)),console[_0x5476ff(0x9a)](_0x5476ff(0x217)),0x1;return await withSpinner('Deleting\x20personalization\x20\x27'+_0x42af93+_0x5476ff(0x14d),()=>_0x1c6883['personalization']['deletePersonalization'](_0x42af93),{'verbose':_0x2c4c5a[_0x5476ff(0x24c)]}),console[_0x5476ff(0x9a)]('✔\x20Deleted\x20personalization\x20\x27'+_0x42af93+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x1b6);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x265);async[a31_0x1e12b4(0x26e)](_0x2acc9c){const _0x12c876=a31_0x1e12b4,{options:_0xc22949,tdx:_0x4be2f0}=_0x2acc9c,_0xec82f2=_0xc22949;let _0x4d75f0;if(_0xec82f2[_0x12c876(0x1e6)]){_0x4d75f0=await loadJSON(_0xec82f2[_0x12c876(0x1e6)],!![]);if(!_0x4d75f0[_0x12c876(0x249)]?.[_0x12c876(0x263)])return console[_0x12c876(0x9a)]('Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.'),console[_0x12c876(0x9a)](_0x12c876(0x1b1)),console['error'](_0x12c876(0x11b)),0x1;}else{if(!_0xec82f2['name'])return console[_0x12c876(0x9a)](_0x12c876(0x1a4)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0x12c876(0x9a)](_0x12c876(0x24e)),0x1;if(_0xec82f2[_0x12c876(0x18c)]===undefined)return console[_0x12c876(0x9a)](_0x12c876(0x147)),console[_0x12c876(0x9a)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0x12c876(0x9a)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0xec82f2[_0x12c876(0x235)]===undefined)return console[_0x12c876(0x9a)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console['error']('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x28dc5e=_0xec82f2[_0x12c876(0x191)];if(!_0x28dc5e&&_0xc22949[_0x12c876(0x1ce)]){const _0x3cd481=await withSpinner(_0x12c876(0xcb)+_0xc22949[_0x12c876(0x1ce)]+_0x12c876(0x14d),()=>_0x4be2f0[_0x12c876(0x1ee)][_0x12c876(0x17e)](_0xc22949[_0x12c876(0x1ce)]),{'verbose':_0xc22949[_0x12c876(0x24c)]});_0x28dc5e=_0x3cd481[_0x12c876(0x22f)];}let _0x4b5d6c;_0xec82f2[_0x12c876(0x148)]&&(_0x4b5d6c=await loadJSON(_0xec82f2[_0x12c876(0x148)],![]));const _0x355018=_0xec82f2[_0x12c876(0x235)]==='null'?null:{'id':_0xec82f2['folderId'],'type':_0x12c876(0x24d)};_0x4d75f0={'attributes':{'name':_0xec82f2[_0x12c876(0x1ef)],'description':_0xec82f2[_0x12c876(0x18c)]||null,..._0x28dc5e!==undefined&&{'audienceId':_0x28dc5e},..._0x4b5d6c!==undefined&&{'sections':_0x4b5d6c}},'relationships':{'parentFolder':{'data':_0x355018}}};}const _0x13fc7f=await withSpinner(_0x12c876(0x160)+(_0x4d75f0[_0x12c876(0xd9)]?.[_0x12c876(0x1ef)]??'')+'\x27...',()=>_0x4be2f0['personalization']['createPersonalization'](_0x4d75f0),{'verbose':_0xc22949['verbose']}),_0x309750=_0x13fc7f['data'];return console['error']('✔\x20Created\x20personalization\x20\x27'+_0x309750[_0x12c876(0x1ef)]+_0x12c876(0x236)+_0x309750['id']),await handleSDKOutput([_0x309750],_0xc22949),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x200);['description']=a31_0x1e12b4(0x1ed);async[a31_0x1e12b4(0x26e)](_0x21402f){const _0x1d75ab=a31_0x1e12b4,{options:_0x7a2cd9,args:_0x44beb2}=_0x21402f,_0x30ff55=_0x7a2cd9,_0x319e97=_0x44beb2[0x0];if(!_0x319e97)return console['error'](_0x1d75ab(0x1bb)),console[_0x1d75ab(0x9a)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0x1d75ab(0x9a)](_0x1d75ab(0x21d)),0x1;let _0x3bf038;if(_0x30ff55[_0x1d75ab(0x1e6)])_0x3bf038=await loadJSON(_0x30ff55[_0x1d75ab(0x1e6)],!![]);else{if(!_0x30ff55[_0x1d75ab(0x1ef)])return console[_0x1d75ab(0x9a)](_0x1d75ab(0x1a4)),console[_0x1d75ab(0x9a)](_0x1d75ab(0x286)),0x1;if(_0x30ff55[_0x1d75ab(0x18c)]===undefined)return console[_0x1d75ab(0x9a)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console['error'](_0x1d75ab(0x286)),0x1;let _0x479cd3;_0x30ff55['sections']&&(_0x479cd3=await loadJSON(_0x30ff55['sections'],![])),_0x3bf038={'attributes':{'name':_0x30ff55[_0x1d75ab(0x1ef)],'description':_0x30ff55['description']||null,..._0x479cd3!==undefined&&{'sections':_0x479cd3}}};}const {tdx:_0x35a92c}=_0x21402f,_0x5b09dc=await withSpinner(_0x1d75ab(0x285)+_0x319e97+'\x27...',()=>_0x35a92c[_0x1d75ab(0x90)]['patchPersonalization'](_0x319e97,_0x3bf038),{'verbose':_0x7a2cd9['verbose']}),_0x4e4b76=_0x5b09dc[_0x1d75ab(0x22f)];return console[_0x1d75ab(0x9a)](_0x1d75ab(0x232)+_0x4e4b76['name']+_0x1d75ab(0xb6)+_0x4e4b76['id']+')'),await handleSDKOutput([_0x4e4b76],_0x7a2cd9),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x1e12b4(0x1ef)]=a31_0x1e12b4(0x241);[a31_0x1e12b4(0x18c)]=a31_0x1e12b4(0x99);async[a31_0x1e12b4(0x26e)](_0xf9289){const _0x572e77=a31_0x1e12b4,{options:_0x20c182,args:_0x20a5af}=_0xf9289,_0x2fa355=_0x20a5af[0x0]||_0x20c182[_0x572e77(0x1ce)];if(!_0x2fa355)return showParentSegmentNotSetError(_0x572e77(0x98)+_0x572e77(0x177)),0x1;const _0x1a0a85=resolveYamlFile(_0x2fa355);if(!existsSync(_0x1a0a85))return showFileNotFoundError(_0x1a0a85,_0x2fa355),0x1;let _0x153902;try{_0x153902=readFileSync(_0x1a0a85,_0x572e77(0x288));}catch(_0x412c41){const _0x20348d=_0x412c41 instanceof Error?_0x412c41[_0x572e77(0x112)]:String(_0x412c41);return console[_0x572e77(0x9a)]('Error\x20reading\x20file:\x20'+_0x20348d),0x1;}let _0x4378a9;try{_0x4378a9=parseDef(_0x153902);}catch(_0x3559cd){const _0x47a275=_0x3559cd instanceof Error?_0x3559cd[_0x572e77(0x112)]:String(_0x3559cd);return console[_0x572e77(0x9a)](a31_0x46217b[_0x572e77(0xba)](_0x572e77(0x91)+_0x47a275)),0x1;}if(_0x4378a9[_0x572e77(0xfc)]&&_0x4378a9[_0x572e77(0xfc)]['length']>0x0)return console[_0x572e77(0x9a)](a31_0x46217b['yellow'](_0x572e77(0x20b)+_0x1a0a85)),console[_0x572e77(0x9a)](a31_0x46217b[_0x572e77(0x140)](_0x572e77(0x145)+_0x4378a9[_0x572e77(0xfc)][_0x572e77(0x179)]+_0x572e77(0x178))),0x1;!_0x4378a9[_0x572e77(0x113)]&&(_0x4378a9[_0x572e77(0x113)]={'events':[{'name':_0x572e77(0x271),'source_table':_0x572e77(0xb5)}],'attributes':[{'name':_0x572e77(0x26c),'type':_0x572e77(0x27e)}],'id_stitching':{'primary_key':_0x4378a9[_0x572e77(0x19a)][_0x572e77(0x111)]===_0x572e77(0x9c)?_0x572e77(0x1f6):_0x572e77(0x125)}});_0x4378a9[_0x572e77(0xfc)]=[{'name':_0x572e77(0x13c),'description':_0x572e77(0xc9),'trigger_event':'page_view','sections':[{'name':_0x572e77(0x1b0),'criteria':'true','attributes':['last_page_viewed']}]}];const _0x591046=serializeDef(_0x4378a9);return writeFileSync(_0x1a0a85,_0x591046,_0x572e77(0x288)),console[_0x572e77(0x9a)](a31_0x46217b[_0x572e77(0x1a7)]('✔')+_0x572e77(0x17b)+a31_0x46217b[_0x572e77(0x228)](_0x1a0a85)),(!_0x4378a9['realtime']||_0x153902['indexOf'](_0x572e77(0x239))===-0x1)&&console[_0x572e77(0x9a)](a31_0x46217b[_0x572e77(0x1a7)]('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console[_0x572e77(0x9a)]('\x0a'+a31_0x46217b[_0x572e77(0x140)](_0x572e77(0x86))),console[_0x572e77(0x9a)]('\x20\x201.\x20Edit\x20'+_0x1a0a85+_0x572e77(0xf6)),console[_0x572e77(0x9a)](_0x572e77(0x28a)+a31_0x46217b['dim'](_0x572e77(0x12f)+_0x2fa355)+_0x572e77(0x237)),0x0;}}
|
|
1
|
+
const a31_0x33df17=a31_0x26a5;(function(_0x3f5b5e,_0x4db013){const _0x16b37a=a31_0x26a5,_0x1960e2=_0x3f5b5e();while(!![]){try{const _0x26b25f=parseInt(_0x16b37a(0x2a0))/0x1*(-parseInt(_0x16b37a(0x1a3))/0x2)+parseInt(_0x16b37a(0x24f))/0x3*(parseInt(_0x16b37a(0x36c))/0x4)+-parseInt(_0x16b37a(0x1ae))/0x5*(-parseInt(_0x16b37a(0x32c))/0x6)+-parseInt(_0x16b37a(0x1c2))/0x7*(parseInt(_0x16b37a(0x3ae))/0x8)+-parseInt(_0x16b37a(0x357))/0x9*(parseInt(_0x16b37a(0x2a1))/0xa)+-parseInt(_0x16b37a(0x2ce))/0xb*(parseInt(_0x16b37a(0x3af))/0xc)+-parseInt(_0x16b37a(0x1e9))/0xd*(-parseInt(_0x16b37a(0x2e8))/0xe);if(_0x26b25f===_0x4db013)break;else _0x1960e2['push'](_0x1960e2['shift']());}catch(_0x4a3600){_0x1960e2['push'](_0x1960e2['shift']());}}}(a31_0x9269,0x854bb));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x3ba6d8 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_0x437b86 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_0x33df17(0x227),LEGACY_PARENT_SEGMENT_DIR=a31_0x33df17(0x38d);function openBrowser(_0x438557){const _0x736787=a31_0x33df17,_0xfe6cd4=process[_0x736787(0x1ad)],_0xc89d9c=_0xfe6cd4===_0x736787(0x314)?_0x736787(0x38e):_0xfe6cd4===_0x736787(0x2c0)?_0x736787(0x249):_0x736787(0x284);spawn(_0xc89d9c,[_0x438557],{'detached':!![],'stdio':_0x736787(0x28a)})[_0x736787(0x2d4)]();}function migrateLegacyDirectory(){const _0x59d958=a31_0x33df17;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x29d41b=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x29d41b[_0x59d958(0x1e3)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x59d958(0x2ef)](a31_0x437b86[_0x59d958(0x2e5)](_0x59d958(0x35a)+LEGACY_PARENT_SEGMENT_DIR+_0x59d958(0x1f9)+PARENT_SEGMENT_DIR+_0x59d958(0x220))),console[_0x59d958(0x2ef)](a31_0x437b86[_0x59d958(0x358)](_0x59d958(0x1ff)+LEGACY_PARENT_SEGMENT_DIR+_0x59d958(0x301))),![];console[_0x59d958(0x2ef)](a31_0x437b86[_0x59d958(0x2e5)]('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x59d958(0x1a7)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x59d958(0x2ef)](a31_0x437b86['green']('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x1692e9){const _0x393f5e=_0x1692e9 instanceof Error?_0x1692e9[_0x59d958(0x367)]:String(_0x1692e9);return console[_0x59d958(0x2ef)](a31_0x437b86[_0x59d958(0x1bb)](_0x59d958(0x297)+_0x393f5e+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x33df17(0x306)](_0x50feac){const _0x3d0a88=a31_0x33df17;return migrateLegacyDirectory(),super[_0x3d0a88(0x306)](_0x50feac);}}function resolveYamlFile(_0x1bc318){const _0x8f6517=a31_0x33df17;if(_0x1bc318[_0x8f6517(0x2d6)](_0x8f6517(0x309))||_0x1bc318['endsWith'](_0x8f6517(0x21f)))return _0x1bc318;return a31_0x3ba6d8[_0x8f6517(0x1d3)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x1bc318)+_0x8f6517(0x309));}function formatProgressMessage(_0xd304ac){const _0x4a7377=a31_0x33df17,_0x31bda0=_0xd304ac['match'](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x31bda0){const [,_0x56d0ee,_0xbd9b7f,_0x2c7cff='']=_0x31bda0;return a31_0x437b86[_0x4a7377(0x358)](_0x56d0ee+':')+'\x20'+_0xbd9b7f+a31_0x437b86[_0x4a7377(0x358)](_0x2c7cff);}return a31_0x437b86[_0x4a7377(0x358)](_0xd304ac);}function showFileNotFoundError(_0x2df25c,_0x556e44){const _0x578b34=a31_0x33df17;console[_0x578b34(0x2ef)](a31_0x437b86[_0x578b34(0x1bb)](_0x578b34(0x345)+_0x2df25c+'\x0a')),console['error'](a31_0x437b86[_0x578b34(0x269)](_0x578b34(0x279)+_0x556e44+_0x578b34(0x2cd)));}function displayRealtimeValidation(_0x29dcfc){const _0x2737cc=a31_0x33df17;if(!_0x29dcfc[_0x2737cc(0x3bb)])return;const _0x267f33=_0x29dcfc[_0x2737cc(0x3bb)],_0x42ecb4=_0x267f33['enabled']?a31_0x437b86[_0x2737cc(0x292)](_0x2737cc(0x285)):a31_0x437b86['yellow'](_0x2737cc(0x20f));console[_0x2737cc(0x2ef)]('\x0a'+a31_0x437b86[_0x2737cc(0x358)](_0x2737cc(0x2e4))+'\x20'+_0x42ecb4);if(_0x267f33[_0x2737cc(0x1da)]&&_0x267f33['events'][_0x2737cc(0x2e9)]>0x0){console['error']('\x20\x20'+a31_0x437b86['dim'](_0x2737cc(0x2af))+'\x20'+_0x267f33['events'][_0x2737cc(0x2e9)]+_0x2737cc(0x39f));for(const _0x1f0ccd of _0x267f33[_0x2737cc(0x1da)]){const _0x394506=_0x1f0ccd[_0x2737cc(0x33a)]===![]?a31_0x437b86[_0x2737cc(0x1bb)]('✘'):a31_0x437b86['green']('✔');console['error'](_0x2737cc(0x373)+_0x394506+'\x20'+_0x1f0ccd[_0x2737cc(0x296)]),_0x1f0ccd[_0x2737cc(0x33e)]&&console[_0x2737cc(0x2ef)]('\x20\x20\x20\x20\x20\x20'+a31_0x437b86[_0x2737cc(0x1bb)](_0x1f0ccd[_0x2737cc(0x33e)]));}}if(_0x267f33[_0x2737cc(0x39d)]&&_0x267f33[_0x2737cc(0x39d)][_0x2737cc(0x2e9)]>0x0){console[_0x2737cc(0x2ef)]('\x20\x20'+a31_0x437b86[_0x2737cc(0x358)]('Attributes:')+'\x20'+_0x267f33[_0x2737cc(0x39d)][_0x2737cc(0x2e9)]+'\x20configured');for(const _0x4c77d6 of _0x267f33[_0x2737cc(0x39d)]){const _0x26f875=_0x4c77d6[_0x2737cc(0x351)]?a31_0x437b86[_0x2737cc(0x292)]('✔'):a31_0x437b86[_0x2737cc(0x1bb)]('✘');console[_0x2737cc(0x2ef)](_0x2737cc(0x373)+_0x26f875+'\x20'+_0x4c77d6['name']+'\x20'+a31_0x437b86[_0x2737cc(0x358)]('('+_0x4c77d6[_0x2737cc(0x34e)]+')'));}}if(_0x267f33['idStitching']){const _0x9cf069=_0x267f33[_0x2737cc(0x35e)][_0x2737cc(0x3bc)]?.[_0x2737cc(0x2e9)]?_0x2737cc(0x226)+_0x267f33[_0x2737cc(0x35e)][_0x2737cc(0x3bc)][_0x2737cc(0x1d3)](',\x20')+']':'';console[_0x2737cc(0x2ef)]('\x20\x20'+a31_0x437b86[_0x2737cc(0x358)](_0x2737cc(0x2f9))+'\x20'+_0x267f33[_0x2737cc(0x35e)][_0x2737cc(0x23c)]+_0x9cf069);}if(_0x267f33[_0x2737cc(0x3b2)]&&_0x267f33[_0x2737cc(0x3b2)][_0x2737cc(0x2e9)]>0x0){console['error']('\x20\x20'+a31_0x437b86[_0x2737cc(0x358)]('Personalization:')+'\x20'+_0x267f33['personalizationServices']['length']+_0x2737cc(0x203)+(_0x267f33[_0x2737cc(0x3b2)][_0x2737cc(0x2e9)]!==0x1?'s':''));for(const _0x23d5c1 of _0x267f33[_0x2737cc(0x3b2)]){console[_0x2737cc(0x2ef)](_0x2737cc(0x229)+_0x23d5c1[_0x2737cc(0x296)]);}}}function showParentSegmentNotSetError(_0x1e3b33){const _0x303a2c=a31_0x33df17;console[_0x303a2c(0x2ef)](a31_0x437b86[_0x303a2c(0x2e5)](_0x303a2c(0x260))),console[_0x303a2c(0x2ef)](_0x1e3b33);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x388);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x2f8);async[a31_0x33df17(0x29e)](_0x2b4f3c){const _0x3fed58=a31_0x33df17,{options:_0x21e387,args:_0x13ac69,tdx:_0x42afa1}=_0x2b4f3c,_0x1aed93=_0x13ac69[0x0];_0x21e387[_0x3fed58(0x1a0)]&&(console['error'](_0x3fed58(0x368)+_0x21e387[_0x3fed58(0x24d)]),_0x1aed93&&console[_0x3fed58(0x2ef)]('Pattern:\x20'+_0x1aed93));const _0x490e3b=await withSpinner(_0x1aed93?'Listing\x20parent\x20segments\x20matching\x20\x27'+_0x1aed93+'\x27...':_0x3fed58(0x356),()=>_0x42afa1[_0x3fed58(0x207)][_0x3fed58(0x1bc)](),{'verbose':_0x21e387['verbose']});let _0x202ab7=_0x490e3b['data'];if(_0x1aed93){const _0x12cc01=_0x1aed93[_0x3fed58(0x341)](/[.+^${}()|[\]\\]/g,_0x3fed58(0x2bf))[_0x3fed58(0x341)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x4120d2=new RegExp('^'+_0x12cc01+'$','i');_0x202ab7=_0x202ab7['filter'](_0x4ef65e=>_0x4120d2[_0x3fed58(0x2d9)](_0x4ef65e[_0x3fed58(0x39d)]['name']));}_0x202ab7[_0x3fed58(0x36e)]((_0x361817,_0x54d93a)=>_0x361817['attributes'][_0x3fed58(0x296)][_0x3fed58(0x35d)](_0x54d93a[_0x3fed58(0x39d)]['name'])),console['error'](_0x3fed58(0x396)+_0x202ab7['length']+_0x3fed58(0x3b3)+(_0x202ab7[_0x3fed58(0x2e9)]!==0x1?'s':''));const _0x4dcd2c=_0x53eec=>{const _0x4b5d27=_0x3fed58;return getConsoleNextUrl(_0x21e387[_0x4b5d27(0x24d)],_0x4b5d27(0x201)+_0x53eec);};if(_0x21e387[_0x3fed58(0x1f3)]===_0x3fed58(0x2c3)||_0x21e387[_0x3fed58(0x1f3)]===_0x3fed58(0x33b)){const _0x2ce704=_0x202ab7[_0x3fed58(0x1f7)](_0x9f7e1e=>({..._0x9f7e1e,'url':_0x4dcd2c(_0x9f7e1e['id'])}));await handleSDKOutput(_0x2ce704,_0x21e387);}else{if(_0x202ab7[_0x3fed58(0x2e9)]===0x0)_0x1aed93?console[_0x3fed58(0x2c2)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x1aed93):console[_0x3fed58(0x2c2)](_0x3fed58(0x2ed));else for(const _0x41856a of _0x202ab7){const _0x3315bd=_0x41856a['attributes'][_0x3fed58(0x1eb)]?a31_0x437b86[_0x3fed58(0x358)]('\x20('+formatRows(_0x41856a['attributes'][_0x3fed58(0x1eb)])+')'):'',_0x4b5661=hyperlink(_0x41856a[_0x3fed58(0x39d)][_0x3fed58(0x296)],_0x4dcd2c(_0x41856a['id']));console['log']('👥\x20'+_0x4b5661+_0x3315bd);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x224);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x25e);async[a31_0x33df17(0x29e)](_0x3c3c06){const _0x1a7653=a31_0x33df17,{options:_0xe53f74,args:_0x5e4a27,tdx:_0x812f76}=_0x3c3c06;console[_0x1a7653(0x2ef)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a'+_0x1a7653(0x2ac)+_0x1a7653(0x316));const _0x551d08=_0xe53f74;if(_0x5e4a27[_0x1a7653(0x2e9)]===0x0)return console[_0x1a7653(0x2ef)](a31_0x437b86[_0x1a7653(0x1bb)]('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x1a7653(0x2ef)](_0x1a7653(0x2b4)),0x1;const _0x554d2e=_0x5e4a27[0x0];if(!_0x551d08[_0x1a7653(0x253)]||!_0x551d08[_0x1a7653(0x30d)])return console['error'](_0x1a7653(0x383)),console[_0x1a7653(0x2ef)](_0x1a7653(0x2b4)),0x1;_0x551d08[_0x1a7653(0x1a0)]&&(console[_0x1a7653(0x2ef)](_0x1a7653(0x368)+_0x551d08[_0x1a7653(0x24d)]),console['error'](_0x1a7653(0x319)+_0x554d2e),console[_0x1a7653(0x2ef)](_0x1a7653(0x1f0)+_0x551d08['database']),console[_0x1a7653(0x2ef)](_0x1a7653(0x206)+_0x551d08[_0x1a7653(0x30d)]));const _0x2747ff=await loadJSONFromOptions(_0x551d08[_0x1a7653(0x39d)],_0x551d08[_0x1a7653(0x1d4)]),_0x20af78=await loadJSONFromOptions(_0x551d08[_0x1a7653(0x308)],_0x551d08[_0x1a7653(0x228)]),_0x441a08=await loadJSONFromOptions(_0x551d08[_0x1a7653(0x332)],_0x551d08[_0x1a7653(0x2fc)]),_0xdad5a2={'name':_0x554d2e,'description':_0x551d08[_0x1a7653(0x2fa)],'scheduleType':_0x551d08[_0x1a7653(0x1e4)],'scheduleOption':_0x551d08['scheduleOption'],'timezone':_0x551d08[_0x1a7653(0x331)],'master':{'parentDatabaseName':_0x551d08[_0x1a7653(0x253)],'parentTableName':_0x551d08['table']},'attributes':_0x2747ff,'behaviors':_0x20af78,'customerGroup':_0x441a08},_0x1d2faa=await withSpinner(_0x1a7653(0x32d)+_0x554d2e+_0x1a7653(0x335),()=>_0x812f76[_0x1a7653(0x207)][_0x1a7653(0x26c)](_0xdad5a2),{'verbose':_0xe53f74[_0x1a7653(0x1a0)]}),_0x256e6b=_0x1d2faa['data'];return console['error'](_0x1a7653(0x354)+_0x256e6b[_0x1a7653(0x296)]+_0x1a7653(0x363)+_0x256e6b['id']),await handleSDKOutput([_0x256e6b],_0xe53f74),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0x33df17(0x296)]='segment:parent:update';['description']=a31_0x33df17(0x237);async[a31_0x33df17(0x29e)](_0x411892){const _0x56f14b=a31_0x33df17,{options:_0x16bb02,args:_0x55e32c,tdx:_0x4cb132}=_0x411892;console[_0x56f14b(0x2ef)](_0x56f14b(0x2c5)+_0x56f14b(0x2ac)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x3dd3e0=_0x16bb02;if(_0x55e32c[_0x56f14b(0x2e9)]===0x0)return console[_0x56f14b(0x2ef)](a31_0x437b86['red']('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x56f14b(0x2ef)](_0x56f14b(0x2ec)),0x1;const _0x75ae87=_0x55e32c[0x0];_0x3dd3e0[_0x56f14b(0x1a0)]&&(console[_0x56f14b(0x2ef)]('Site:\x20'+_0x3dd3e0[_0x56f14b(0x24d)]),console[_0x56f14b(0x2ef)](_0x56f14b(0x29f)+_0x75ae87));const _0x54ec3b=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x75ae87+_0x56f14b(0x335),()=>_0x4cb132[_0x56f14b(0x207)][_0x56f14b(0x318)](_0x75ae87),{'verbose':_0x3dd3e0[_0x56f14b(0x1a0)]}),_0x32fe85=_0x54ec3b[_0x56f14b(0x1a1)],_0x4e7344=await loadJSONFromOptions(_0x3dd3e0[_0x56f14b(0x2bc)],_0x3dd3e0[_0x56f14b(0x1cc)]),_0xddfce0=await loadJSONFromOptions(_0x3dd3e0[_0x56f14b(0x1ca)],_0x3dd3e0['addBehaviorsFile']),_0x439067={'name':_0x32fe85[_0x56f14b(0x296)],'description':_0x3dd3e0[_0x56f14b(0x2fa)]!==undefined?_0x3dd3e0[_0x56f14b(0x2fa)]:_0x32fe85['description'],'scheduleType':_0x3dd3e0[_0x56f14b(0x1e4)]!==undefined?_0x3dd3e0[_0x56f14b(0x1e4)]:_0x32fe85['scheduleType'],'scheduleOption':_0x3dd3e0[_0x56f14b(0x377)]!==undefined?_0x3dd3e0[_0x56f14b(0x377)]:_0x32fe85[_0x56f14b(0x377)],'timezone':_0x3dd3e0[_0x56f14b(0x331)]!==undefined?_0x3dd3e0['timezone']:_0x32fe85[_0x56f14b(0x331)],'master':_0x32fe85[_0x56f14b(0x211)],'attributes':_0x4e7344?[..._0x32fe85[_0x56f14b(0x39d)]||[],..._0x4e7344]:_0x32fe85[_0x56f14b(0x39d)],'behaviors':_0xddfce0?[..._0x32fe85[_0x56f14b(0x308)]||[],..._0xddfce0]:_0x32fe85[_0x56f14b(0x308)],'customerGroup':_0x32fe85['customerGroup']},_0x439645=await withSpinner(_0x56f14b(0x2aa)+_0x75ae87+'\x27...',()=>_0x4cb132[_0x56f14b(0x207)][_0x56f14b(0x1c4)](_0x75ae87,_0x439067),{'verbose':_0x3dd3e0[_0x56f14b(0x1a0)]}),_0x49c518=_0x439645[_0x56f14b(0x1a1)];return console[_0x56f14b(0x2ef)](_0x56f14b(0x1fa)+_0x49c518['name']+'\x27'),await handleSDKOutput([_0x49c518],_0x3dd3e0),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']=a31_0x33df17(0x1dd);['description']=a31_0x33df17(0x3bd);async[a31_0x33df17(0x29e)](_0x1b8f03){const _0x2e6cf9=a31_0x33df17,{options:_0x22c2c0,args:_0x4f6b38,tdx:_0xf2a923}=_0x1b8f03,_0x10b298=_0x22c2c0,_0x99a7de=_0x4f6b38[0x0]||_0x22c2c0['parentSegment'];if(!_0x99a7de)return showParentSegmentNotSetError(_0x2e6cf9(0x3aa)+_0x2e6cf9(0x1c8)),0x1;if(_0x10b298['use']&&_0x10b298[_0x2e6cf9(0x233)])return console[_0x2e6cf9(0x2ef)](a31_0x437b86[_0x2e6cf9(0x1bb)](_0x2e6cf9(0x3a5))),console[_0x2e6cf9(0x2ef)](a31_0x437b86['dim'](_0x2e6cf9(0x2b1))),console[_0x2e6cf9(0x2ef)](a31_0x437b86[_0x2e6cf9(0x358)](_0x2e6cf9(0x204)+PARENT_SEGMENT_DIR+_0x2e6cf9(0x1a6))),console['error'](a31_0x437b86[_0x2e6cf9(0x269)](_0x2e6cf9(0x33f))),0x1;const _0x517218=_0x10b298[_0x2e6cf9(0x233)]||a31_0x3ba6d8[_0x2e6cf9(0x1d3)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x99a7de)+_0x2e6cf9(0x309));_0x10b298[_0x2e6cf9(0x1a0)]&&(console[_0x2e6cf9(0x2ef)](_0x2e6cf9(0x368)+_0x10b298[_0x2e6cf9(0x24d)]),console[_0x2e6cf9(0x2ef)]('Parent\x20segment:\x20'+_0x99a7de),console[_0x2e6cf9(0x2ef)](_0x2e6cf9(0x2eb)+_0x517218));const _0x9ca6dc=await withSpinner(_0x2e6cf9(0x394)+_0x99a7de+'\x27...',()=>_0xf2a923[_0x2e6cf9(0x207)][_0x2e6cf9(0x1bd)](_0x99a7de),{'verbose':_0x10b298[_0x2e6cf9(0x1a0)]}),_0x1f6dbf=_0x9ca6dc['data'];if(existsSync(_0x517218)){const _0x75173b=readFileSync(_0x517218,_0x2e6cf9(0x2e6)),_0x2ba799=generateDiff(_0x75173b,_0x1f6dbf);if(!hasChanges(_0x2ba799))console[_0x2e6cf9(0x2ef)](a31_0x437b86['green']('✔')+_0x2e6cf9(0x272)+a31_0x437b86[_0x2e6cf9(0x269)](_0x517218)+'\x20is\x20already\x20up\x20to\x20date');else{console[_0x2e6cf9(0x2ef)](_0x2e6cf9(0x1b9)+_0x517218+'\x27:'),console[_0x2e6cf9(0x2ef)]('─'[_0x2e6cf9(0x1ea)](0x3c)),console[_0x2e6cf9(0x2ef)](formatDiffWithColors(_0x2ba799)),console['error']('─'[_0x2e6cf9(0x1ea)](0x3c));if(!_0x10b298[_0x2e6cf9(0x32e)]){if(!isInteractive())return console['error'](a31_0x437b86['red']('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x2e6cf9(0x2ef)](a31_0x437b86[_0x2e6cf9(0x358)](_0x2e6cf9(0x262))),0x1;const _0x25cdf2=await confirmKey('Overwrite\x20\x27'+_0x517218+'\x27?');if(!_0x25cdf2)return console[_0x2e6cf9(0x2ef)](a31_0x437b86[_0x2e6cf9(0x2e5)](_0x2e6cf9(0x20d))),0x1;}writeFileSync(_0x517218,_0x1f6dbf,_0x2e6cf9(0x2e6)),console['error'](a31_0x437b86['green']('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x437b86[_0x2e6cf9(0x269)](_0x517218));}}else{const _0x1218b0=a31_0x3ba6d8[_0x2e6cf9(0x27e)](_0x517218);!existsSync(_0x1218b0)&&mkdirSync(_0x1218b0,{'recursive':!![]}),writeFileSync(_0x517218,_0x1f6dbf,_0x2e6cf9(0x2e6)),console[_0x2e6cf9(0x2ef)](a31_0x437b86[_0x2e6cf9(0x292)]('✔')+_0x2e6cf9(0x2f6)+a31_0x437b86[_0x2e6cf9(0x269)](_0x517218));}return saveSessionContext({'parent_segment':_0x99a7de},_0x10b298['session']),console['error'](a31_0x437b86[_0x2e6cf9(0x292)]('✔')+'\x20Context\x20set:\x20'+a31_0x437b86['dim'](_0x2e6cf9(0x38d))+_0x2e6cf9(0x2e2)+a31_0x437b86[_0x2e6cf9(0x269)](_0x99a7de)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{['name']=a31_0x33df17(0x39a);[a31_0x33df17(0x2fa)]='Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file';async[a31_0x33df17(0x29e)](_0x1c839b){const _0x2406a4=a31_0x33df17,{options:_0x5b3593,args:_0x4e0760,tdx:_0x450f17}=_0x1c839b,_0x31699f=_0x5b3593,_0x2edd23=_0x4e0760[0x0]||_0x5b3593['parentSegment'];if(!_0x2edd23)return showParentSegmentNotSetError(_0x2406a4(0x1e1)+_0x2406a4(0x252)),0x1;const _0x7a681a=resolveYamlFile(_0x2edd23);if(!existsSync(_0x7a681a))return showFileNotFoundError(_0x7a681a,_0x2edd23),0x1;_0x31699f['verbose']&&(console[_0x2406a4(0x2ef)](_0x2406a4(0x368)+_0x31699f[_0x2406a4(0x24d)]),console[_0x2406a4(0x2ef)]('YAML\x20file:\x20'+_0x7a681a));let _0x57df6b;try{_0x57df6b=readFileSync(_0x7a681a,_0x2406a4(0x2e6));}catch(_0x36fb91){const _0x2717a4=_0x36fb91 instanceof Error?_0x36fb91[_0x2406a4(0x367)]:String(_0x36fb91);return console[_0x2406a4(0x2ef)]('Error\x20reading\x20file:\x20'+_0x2717a4),0x1;}const _0xfdb41e=await withSpinner(_0x2406a4(0x2d7),()=>_0x450f17['segment'][_0x2406a4(0x27d)](_0x57df6b),{'verbose':_0x31699f[_0x2406a4(0x1a0)]}),_0x59e749=_0xfdb41e['data'],{isNew:_0x4d5a2a,name:_0x37b371,hasChanges:_0x450da3,diffFormatted:_0x54b425}=_0x59e749;if(!_0x450da3)return console['error'](_0x2406a4(0x1d8)+_0x37b371+_0x2406a4(0x240)),0x0;_0x4d5a2a?console['error'](_0x2406a4(0x28e)+_0x37b371+'\x27:'):console[_0x2406a4(0x2ef)](_0x2406a4(0x353)+_0x37b371+'\x27:');console['error']('─'[_0x2406a4(0x1ea)](0x3c)),console[_0x2406a4(0x2ef)](_0x54b425),console[_0x2406a4(0x2ef)]('─'[_0x2406a4(0x1ea)](0x3c));const _0xa38d9a=_0x4d5a2a?'Create\x20parent\x20segment\x20\x27'+_0x37b371+'\x27?':_0x2406a4(0x31e)+_0x37b371+'\x27?';if(!_0x31699f['yes']){if(!isInteractive())return console['error'](a31_0x437b86[_0x2406a4(0x1bb)](_0x2406a4(0x340)),_0x2406a4(0x3ab)),console['error'](a31_0x437b86[_0x2406a4(0x358)](_0x2406a4(0x262))),0x1;const _0x5ba482=await confirmKey(_0xa38d9a);if(!_0x5ba482)return console['error'](a31_0x437b86['yellow'](_0x2406a4(0x20d))),0x1;}const _0x3f9fa3=_0x4d5a2a?_0x2406a4(0x27c):_0x2406a4(0x231),_0x4017d4=await withSpinner(_0x3f9fa3+_0x2406a4(0x360)+_0x37b371+_0x2406a4(0x335),()=>_0x59e749['apply'](),{'verbose':_0x31699f['verbose']}),_0x3ffdf4=_0x4017d4[_0x2406a4(0x1a1)],_0x5c646b=getConsoleNextUrl(_0x31699f['site'],'/app/dw/parentSegments/'+_0x3ffdf4['id']),_0xfca05c=_0x4d5a2a?_0x2406a4(0x1d2):'Updated';return console[_0x2406a4(0x2ef)]('✔\x20'+_0xfca05c+'\x20parent\x20segment\x20\x27'+_0x3ffdf4[_0x2406a4(0x296)]+'\x27'),console['error']('\x20\x20'+_0x5c646b),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x23a);['description']=a31_0x33df17(0x1ac);async['execute'](_0x43250b){const _0x494505=a31_0x33df17,{options:_0x1b4a7a,args:_0x1262d1,tdx:_0xd6e8c5}=_0x43250b,_0x3bcf59=_0x1b4a7a,_0x55bf94=_0x1262d1[0x0]||_0x1b4a7a[_0x494505(0x2dd)];if(!_0x55bf94)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'+_0x494505(0x28b)+_0x494505(0x238)+_0x494505(0x2d1)+'\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a'+_0x494505(0x212)),0x1;const _0x149099=resolveYamlFile(_0x55bf94);if(!existsSync(_0x149099))return showFileNotFoundError(_0x149099,_0x55bf94),0x1;_0x3bcf59['verbose']&&(console[_0x494505(0x2ef)](_0x494505(0x368)+_0x3bcf59[_0x494505(0x24d)]),console[_0x494505(0x2ef)]('YAML\x20file:\x20'+_0x149099));let _0xfaebc9;try{_0xfaebc9=readFileSync(_0x149099,_0x494505(0x2e6));}catch(_0x22a184){const _0x1ffc9d=_0x22a184 instanceof Error?_0x22a184[_0x494505(0x367)]:String(_0x22a184);return console['error'](_0x494505(0x30e)+_0x1ffc9d),0x1;}const _0x1fdf4c=createCommandSpinner(a31_0x437b86[_0x494505(0x358)](_0x494505(0x268)),{'verbose':_0x3bcf59[_0x494505(0x1a0)]});_0x1fdf4c[_0x494505(0x249)]();const _0x384cf3={'onProgress':_0x575916=>{const _0x1a66b6=_0x494505;_0x1fdf4c[_0x1a66b6(0x2f5)]=formatProgressMessage(_0x575916);}};if(_0x3bcf59[_0x494505(0x211)])_0x384cf3[_0x494505(0x211)]=!![];if(_0x3bcf59[_0x494505(0x205)])_0x384cf3[_0x494505(0x205)]=!![];_0x3bcf59[_0x494505(0x39c)]&&(_0x384cf3[_0x494505(0x39c)]=_0x3bcf59['attribute']);_0x3bcf59['behavior']&&(_0x384cf3[_0x494505(0x1d0)]=_0x3bcf59['behavior']);if(_0x3bcf59[_0x494505(0x1e7)])_0x384cf3[_0x494505(0x1e7)]=_0x3bcf59[_0x494505(0x1e7)];let _0x13e638;try{_0x13e638=await _0xd6e8c5[_0x494505(0x207)]['validateParentYaml'](_0xfaebc9,_0x384cf3),_0x1fdf4c[_0x494505(0x2a4)]();}catch(_0x25a519){_0x1fdf4c[_0x494505(0x2a4)]();throw _0x25a519;}const _0x3c6022=_0x3bcf59[_0x494505(0x1e7)]||'-1d';return this['displayValidateResults'](_0x13e638,_0x384cf3,_0x149099,_0x3c6022),_0x13e638[_0x494505(0x324)]?0x0:0x1;}['displayValidateResults'](_0x2fd531,_0x469116,_0x556cd5,_0x1d5f72){const _0x4222c0=a31_0x33df17;console[_0x4222c0(0x2ef)]('\x0a'+a31_0x437b86[_0x4222c0(0x31c)](_0x4222c0(0x329))+'\x20'+_0x2fd531['name']),console['error']('═'[_0x4222c0(0x1ea)](0x3c)),this[_0x4222c0(0x326)](_0x2fd531);if(typeof _0x469116[_0x4222c0(0x39c)]===_0x4222c0(0x3b0)){this[_0x4222c0(0x2c8)](_0x2fd531),this[_0x4222c0(0x307)](_0x2fd531),this[_0x4222c0(0x1f8)](_0x556cd5,_0x1d5f72,_0x4222c0(0x39c),_0x469116[_0x4222c0(0x39c)]);return;}if(_0x469116[_0x4222c0(0x39c)]===!![]){this[_0x4222c0(0x2c8)](_0x2fd531),this[_0x4222c0(0x307)](_0x2fd531),this[_0x4222c0(0x1f8)](_0x556cd5,_0x1d5f72,'attributes');return;}if(typeof _0x469116[_0x4222c0(0x1d0)]===_0x4222c0(0x3b0)){this[_0x4222c0(0x208)](_0x2fd531,_0x1d5f72),this['displaySummary'](_0x2fd531),this[_0x4222c0(0x1f8)](_0x556cd5,_0x1d5f72,_0x4222c0(0x1d0),_0x469116[_0x4222c0(0x1d0)]);return;}if(_0x469116[_0x4222c0(0x1d0)]===!![]){this[_0x4222c0(0x208)](_0x2fd531,_0x1d5f72),this[_0x4222c0(0x307)](_0x2fd531),this['displayPreviewHints'](_0x556cd5,_0x1d5f72,_0x4222c0(0x308));return;}this[_0x4222c0(0x2c8)](_0x2fd531),this['displayBehaviorsStats'](_0x2fd531,_0x1d5f72),this[_0x4222c0(0x24b)](_0x2fd531),this[_0x4222c0(0x307)](_0x2fd531),this[_0x4222c0(0x1f8)](_0x556cd5,_0x1d5f72,'all');}[a31_0x33df17(0x24b)](_0x1e1820){displayRealtimeValidation(_0x1e1820);}[a31_0x33df17(0x1f8)](_0x23580f,_0xff7134,_0x148b9c,_0x1e7bdf){const _0x398ad4=a31_0x33df17;console[_0x398ad4(0x2ef)]('\x0a'+a31_0x437b86[_0x398ad4(0x358)](_0x398ad4(0x3ad)));const _0x451410=_0xff7134!==_0x398ad4(0x30a)?_0x398ad4(0x2c6)+_0xff7134:'';if(_0x148b9c===_0x398ad4(0x39c)&&_0x1e7bdf)console[_0x398ad4(0x2ef)]('\x20\x20'+a31_0x437b86[_0x398ad4(0x358)](_0x398ad4(0x215)+_0x23580f+_0x398ad4(0x1b3)+_0x1e7bdf+'\x22'+_0x451410));else{if(_0x148b9c===_0x398ad4(0x1d0)&&_0x1e7bdf)console[_0x398ad4(0x2ef)]('\x20\x20'+a31_0x437b86['dim'](_0x398ad4(0x215)+_0x23580f+_0x398ad4(0x2a3)+_0x1e7bdf+'\x22'+_0x451410));else(_0x148b9c===_0x398ad4(0x39d)||_0x148b9c===_0x398ad4(0x24a))&&console[_0x398ad4(0x2ef)]('\x20\x20'+a31_0x437b86['dim'](_0x398ad4(0x215)+_0x23580f+_0x398ad4(0x264)+_0x451410));}(_0x148b9c===_0x398ad4(0x308)||_0x148b9c==='all')&&console[_0x398ad4(0x2ef)]('\x20\x20'+a31_0x437b86[_0x398ad4(0x358)](_0x398ad4(0x215)+_0x23580f+_0x398ad4(0x3a7)+_0x451410)),_0x148b9c===_0x398ad4(0x24a)&&console[_0x398ad4(0x2ef)]('\x20\x20'+a31_0x437b86[_0x398ad4(0x358)](_0x398ad4(0x215)+_0x23580f+_0x398ad4(0x359)+_0x451410));}[a31_0x33df17(0x326)](_0xfe72df){const _0xc159=a31_0x33df17,{master:_0x54fd09}=_0xfe72df,_0x4e9ac8=_0x54fd09['schemaValid']?a31_0x437b86['green']('✔'):a31_0x437b86[_0xc159(0x1bb)]('✘');console['error']('\x0a'+a31_0x437b86[_0xc159(0x358)](_0xc159(0x393))),console['error'](_0x4e9ac8+'\x20'+a31_0x437b86[_0xc159(0x31c)](_0x54fd09[_0xc159(0x253)]+'.'+_0x54fd09['table'])),_0x54fd09[_0xc159(0x295)]?_0x54fd09['rowCount']!==undefined&&console[_0xc159(0x2ef)]('\x20\x20'+a31_0x437b86[_0xc159(0x358)](_0xc159(0x1e6))+'\x20'+a31_0x437b86['cyan'](formatRows(_0x54fd09[_0xc159(0x283)]))):console[_0xc159(0x2ef)]('\x20\x20'+a31_0x437b86[_0xc159(0x1bb)](_0xc159(0x30c))+'\x20'+_0x54fd09[_0xc159(0x31b)]);}[a31_0x33df17(0x2c8)](_0x373b06){const _0x47df47=a31_0x33df17;if(_0x373b06['attributes']['length']===0x0)return;console[_0x47df47(0x2ef)]('\x0a'+a31_0x437b86[_0x47df47(0x358)]('Attributes'));for(const _0x1cdff6 of _0x373b06[_0x47df47(0x39d)]){const _0x7b3af8=_0x1cdff6[_0x47df47(0x295)]?a31_0x437b86['green']('✔'):a31_0x437b86[_0x47df47(0x1bb)]('✘');let _0x3a0934='';if(_0x1cdff6['schemaValid']&&_0x1cdff6[_0x47df47(0x33c)]!==undefined&&_0x1cdff6[_0x47df47(0x21a)]!==undefined){const _0x5b3d22=_0x1cdff6[_0x47df47(0x21a)][_0x47df47(0x210)](0x1),_0xbdb301=_0x1cdff6[_0x47df47(0x21a)]>=0x50?a31_0x437b86[_0x47df47(0x292)]:_0x1cdff6[_0x47df47(0x21a)]>=0x32?a31_0x437b86[_0x47df47(0x2e5)]:a31_0x437b86[_0x47df47(0x1bb)];_0x3a0934='\x20'+a31_0x437b86[_0x47df47(0x358)](_0x47df47(0x2bb))+'\x20'+_0xbdb301(_0x5b3d22+'%')+'\x20('+formatRows(_0x1cdff6[_0x47df47(0x33c)])+_0x47df47(0x371);}console[_0x47df47(0x2ef)](_0x7b3af8+'\x20'+a31_0x437b86['bold'](_0x1cdff6[_0x47df47(0x296)])+_0x3a0934),console['error']('\x20\x20'+a31_0x437b86[_0x47df47(0x358)]('Source:')+'\x20'+a31_0x437b86[_0x47df47(0x31c)](_0x1cdff6['database']+'.'+_0x1cdff6[_0x47df47(0x30d)]));const _0x3d9786=_0x1cdff6[_0x47df47(0x3b4)]===_0x1cdff6['foreignKey']?a31_0x437b86[_0x47df47(0x358)](_0x47df47(0x3a8))+'\x20'+_0x1cdff6[_0x47df47(0x3b4)]:a31_0x437b86[_0x47df47(0x358)](_0x47df47(0x2ca))+'\x20'+_0x1cdff6[_0x47df47(0x3b4)]+_0x47df47(0x2e2)+_0x1cdff6[_0x47df47(0x2de)];console[_0x47df47(0x2ef)]('\x20\x20'+_0x3d9786),console[_0x47df47(0x2ef)]('\x20\x20'+a31_0x437b86[_0x47df47(0x358)](_0x47df47(0x29d))),this[_0x47df47(0x20e)](_0x1cdff6[_0x47df47(0x34d)]),!_0x1cdff6[_0x47df47(0x295)]&&console['error']('\x20\x20'+a31_0x437b86[_0x47df47(0x1bb)](_0x47df47(0x30c))+'\x20'+_0x1cdff6[_0x47df47(0x31b)]);}}[a31_0x33df17(0x208)](_0x19590e,_0x1e448f){const _0xaaae20=a31_0x33df17;if(_0x19590e['behaviors']['length']===0x0)return;console[_0xaaae20(0x2ef)]('\x0a'+a31_0x437b86[_0xaaae20(0x358)](_0xaaae20(0x305))+'\x20'+a31_0x437b86[_0xaaae20(0x358)]('('+_0x1e448f+')'));for(const _0x54f9df of _0x19590e[_0xaaae20(0x308)]){const _0x3a04ee=_0x54f9df['schemaValid']?a31_0x437b86['green']('✔'):a31_0x437b86[_0xaaae20(0x1bb)]('✘');let _0x36981e='';if(_0x54f9df[_0xaaae20(0x295)]&&_0x54f9df[_0xaaae20(0x261)]!==undefined&&_0x54f9df[_0xaaae20(0x1b7)]!==undefined){const _0x1ad245=_0x54f9df[_0xaaae20(0x1e8)]?.[_0xaaae20(0x210)](0x1)||'?',_0x58b692=(_0x54f9df[_0xaaae20(0x1e8)]??0x0)>=0x32?a31_0x437b86[_0xaaae20(0x292)]:(_0x54f9df[_0xaaae20(0x1e8)]??0x0)>=0x14?a31_0x437b86[_0xaaae20(0x2e5)]:a31_0x437b86[_0xaaae20(0x1bb)];_0x36981e='\x20'+a31_0x437b86[_0xaaae20(0x358)]('Customers:')+'\x20'+_0x58b692(formatRows(_0x54f9df[_0xaaae20(0x261)]))+'\x20('+_0x1ad245+_0xaaae20(0x2b0)+a31_0x437b86[_0xaaae20(0x358)](_0xaaae20(0x2af))+'\x20'+a31_0x437b86[_0xaaae20(0x269)](formatRows(_0x54f9df['totalEvents']));}console[_0xaaae20(0x2ef)](_0x3a04ee+'\x20'+a31_0x437b86[_0xaaae20(0x31c)](_0x54f9df[_0xaaae20(0x296)])+_0x36981e),console[_0xaaae20(0x2ef)]('\x20\x20'+a31_0x437b86[_0xaaae20(0x358)](_0xaaae20(0x3ac))+'\x20'+a31_0x437b86['bold'](_0x54f9df[_0xaaae20(0x253)]+'.'+_0x54f9df[_0xaaae20(0x30d)]));const _0x2ed24c=_0x54f9df[_0xaaae20(0x3b4)]===_0x54f9df[_0xaaae20(0x2de)]?a31_0x437b86[_0xaaae20(0x358)](_0xaaae20(0x3a8))+'\x20'+_0x54f9df[_0xaaae20(0x3b4)]:a31_0x437b86[_0xaaae20(0x358)]('Join:')+'\x20'+_0x54f9df[_0xaaae20(0x3b4)]+_0xaaae20(0x2e2)+_0x54f9df[_0xaaae20(0x2de)];console['error']('\x20\x20'+_0x2ed24c),console[_0xaaae20(0x2ef)]('\x20\x20'+a31_0x437b86[_0xaaae20(0x358)](_0xaaae20(0x29d))),this[_0xaaae20(0x20e)](_0x54f9df[_0xaaae20(0x34d)]),!_0x54f9df['schemaValid']&&console[_0xaaae20(0x2ef)]('\x20\x20'+a31_0x437b86[_0xaaae20(0x1bb)](_0xaaae20(0x30c))+'\x20'+_0x54f9df['schemaError']);}}[a31_0x33df17(0x20e)](_0x71a37){const _0x577356=a31_0x33df17;for(const _0x4caf51 of _0x71a37){_0x4caf51[_0x577356(0x1ee)]===_0x4caf51[_0x577356(0x3b6)]||_0x4caf51['column']==='*'?console[_0x577356(0x2ef)](_0x577356(0x229)+_0x4caf51['label']):console[_0x577356(0x2ef)](_0x577356(0x229)+_0x4caf51[_0x577356(0x1ee)]+'\x20'+a31_0x437b86[_0x577356(0x358)]('('+_0x4caf51['column']+')'));}}[a31_0x33df17(0x307)](_0x321ff7){const _0x479288=a31_0x33df17;console[_0x479288(0x2ef)]('─'['repeat'](0x3c));if(_0x321ff7[_0x479288(0x245)][_0x479288(0x2e9)]>0x0){console[_0x479288(0x2ef)]('\x0a'+a31_0x437b86[_0x479288(0x1bb)]('Errors:'));for(const _0x4c7b9a of _0x321ff7[_0x479288(0x245)]){console[_0x479288(0x2ef)]('\x20\x20'+a31_0x437b86['red']('•')+'\x20'+_0x4c7b9a);}}_0x321ff7[_0x479288(0x324)]&&console[_0x479288(0x2ef)]('\x0a'+a31_0x437b86[_0x479288(0x292)]('✔')+'\x20Configuration\x20is\x20valid');}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0x33df17(0x296)]='segment:parent:preview';[a31_0x33df17(0x2fa)]=a31_0x33df17(0x2b2);async[a31_0x33df17(0x29e)](_0x5ca351){const _0x55584d=a31_0x33df17,{options:_0x325608,args:_0x429b44,tdx:_0x3831e1}=_0x5ca351,_0x342c80=_0x325608,_0x4ea343=_0x429b44[0x0]||_0x325608['parentSegment'];if(!_0x4ea343)return showParentSegmentNotSetError(_0x55584d(0x3b5)+_0x55584d(0x348)+'Options\x20(one\x20required):\x0a'+_0x55584d(0x337)+_0x55584d(0x1ec)+_0x55584d(0x1c5)+_0x55584d(0x218)+_0x55584d(0x212)),0x1;if(!_0x342c80[_0x55584d(0x211)]&&!_0x342c80['attribute']&&!_0x342c80[_0x55584d(0x1d0)]&&!_0x342c80[_0x55584d(0x205)])return console['error'](a31_0x437b86[_0x55584d(0x1bb)](_0x55584d(0x216))),console[_0x55584d(0x2ef)](_0x55584d(0x34f)),console[_0x55584d(0x2ef)](_0x55584d(0x27f)),console[_0x55584d(0x2ef)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console[_0x55584d(0x2ef)](_0x55584d(0x3c0)),console[_0x55584d(0x2ef)](_0x55584d(0x2a9)),console[_0x55584d(0x2ef)](_0x55584d(0x384)),0x1;const _0x50d0a7=resolveYamlFile(_0x4ea343);if(!existsSync(_0x50d0a7))return showFileNotFoundError(_0x50d0a7,_0x4ea343),0x1;_0x342c80[_0x55584d(0x1a0)]&&(console['error']('Site:\x20'+_0x342c80[_0x55584d(0x24d)]),console['error']('YAML\x20file:\x20'+_0x50d0a7));let _0x178785;try{_0x178785=readFileSync(_0x50d0a7,_0x55584d(0x2e6));}catch(_0x15e607){const _0x2dfd9f=_0x15e607 instanceof Error?_0x15e607[_0x55584d(0x367)]:String(_0x15e607);return console[_0x55584d(0x2ef)]('Error\x20reading\x20file:\x20'+_0x2dfd9f),0x1;}let _0x5e14e0;try{_0x5e14e0=parseDef(_0x178785);}catch(_0x48a3af){const _0x47f2d5=_0x48a3af instanceof Error?_0x48a3af[_0x55584d(0x367)]:String(_0x48a3af);return console['error'](a31_0x437b86['red'](_0x55584d(0x24c)+_0x47f2d5)),0x1;}if(_0x342c80[_0x55584d(0x39c)]===!![]||_0x342c80[_0x55584d(0x39c)]===''){const _0x531d92=_0x5e14e0['attributes']?.[_0x55584d(0x1f7)](_0x3d98b7=>_0x3d98b7['name'])||[];if(_0x531d92['length']===0x0)console[_0x55584d(0x2ef)](a31_0x437b86[_0x55584d(0x1bb)](_0x55584d(0x1a8)));else{console[_0x55584d(0x2ef)](a31_0x437b86['red'](_0x55584d(0x2d8))),console['error']('Available\x20attributes:');for(const _0x24392f of _0x531d92){console[_0x55584d(0x2ef)]('\x20\x20'+a31_0x437b86[_0x55584d(0x269)](_0x24392f));}console[_0x55584d(0x2ef)](_0x55584d(0x278)+_0x4ea343+_0x55584d(0x1b3)+_0x531d92[0x0]+'\x22');}return 0x1;}if(_0x342c80[_0x55584d(0x1d0)]===!![]||_0x342c80['behavior']===''){const _0x429e52=_0x5e14e0[_0x55584d(0x308)]?.[_0x55584d(0x1f7)](_0x3e5426=>_0x3e5426[_0x55584d(0x296)])||[];if(_0x429e52[_0x55584d(0x2e9)]===0x0)console[_0x55584d(0x2ef)](a31_0x437b86[_0x55584d(0x1bb)](_0x55584d(0x2d0)));else{console['error'](a31_0x437b86[_0x55584d(0x1bb)](_0x55584d(0x1b6))),console[_0x55584d(0x2ef)](_0x55584d(0x3a2));for(const _0x6f1888 of _0x429e52){console[_0x55584d(0x2ef)]('\x20\x20'+a31_0x437b86['cyan'](_0x6f1888));}console['error']('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x4ea343+_0x55584d(0x2a3)+_0x429e52[0x0]+'\x22');}return 0x1;}const _0x28ed45=createCommandSpinner(a31_0x437b86[_0x55584d(0x358)](_0x55584d(0x321)),{'verbose':_0x342c80[_0x55584d(0x1a0)]});_0x28ed45['start']();const _0x16dae4={'onProgress':_0x2877c6=>{const _0x466106=_0x55584d;_0x28ed45[_0x466106(0x2f5)]=formatProgressMessage(_0x2877c6);}};if(_0x342c80[_0x55584d(0x211)])_0x16dae4['master']=!![];if(_0x342c80[_0x55584d(0x39c)]&&typeof _0x342c80[_0x55584d(0x39c)]==='string')_0x16dae4['attribute']=_0x342c80[_0x55584d(0x39c)];if(_0x342c80[_0x55584d(0x1d0)]&&typeof _0x342c80[_0x55584d(0x1d0)]===_0x55584d(0x3b0))_0x16dae4[_0x55584d(0x1d0)]=_0x342c80['behavior'];if(_0x342c80[_0x55584d(0x205)])_0x16dae4['enriched']=!![];if(_0x342c80[_0x55584d(0x1e7)])_0x16dae4['interval']=_0x342c80[_0x55584d(0x1e7)];let _0x329b0c;try{_0x329b0c=await _0x3831e1[_0x55584d(0x207)][_0x55584d(0x287)](_0x178785,_0x16dae4),_0x28ed45[_0x55584d(0x2a4)]();}catch(_0x1c0c2c){_0x28ed45[_0x55584d(0x2a4)]();throw _0x1c0c2c;}return await this['displayPreviewResults'](_0x329b0c,{'master':_0x342c80[_0x55584d(0x211)],'attribute':typeof _0x342c80[_0x55584d(0x39c)]===_0x55584d(0x3b0)?_0x342c80['attribute']:undefined,'behavior':typeof _0x342c80[_0x55584d(0x1d0)]===_0x55584d(0x3b0)?_0x342c80['behavior']:undefined,'enriched':_0x342c80[_0x55584d(0x205)]}),_0x329b0c[_0x55584d(0x324)]?0x0:0x1;}async[a31_0x33df17(0x251)](_0x463201,_0x3eac55){const _0x51e9e4=a31_0x33df17;console[_0x51e9e4(0x2ef)]('\x0a'+a31_0x437b86['bold']('Preview:')+'\x20'+_0x463201['name']),console[_0x51e9e4(0x2ef)]('═'[_0x51e9e4(0x1ea)](0x3c));if(_0x3eac55[_0x51e9e4(0x211)]&&_0x463201[_0x51e9e4(0x2c4)]){const _0x2c37de=a31_0x437b86['dim'](_0x51e9e4(0x347))+'\x20'+a31_0x437b86['bold'](_0x463201[_0x51e9e4(0x211)][_0x51e9e4(0x253)]+'.'+_0x463201[_0x51e9e4(0x211)][_0x51e9e4(0x30d)]);await this[_0x51e9e4(0x37d)](_0x2c37de,_0x463201[_0x51e9e4(0x2c4)]);}else{if(_0x3eac55[_0x51e9e4(0x39c)]&&_0x463201[_0x51e9e4(0x2c4)]){const _0x30b32a=a31_0x437b86[_0x51e9e4(0x358)](_0x51e9e4(0x2ff))+'\x20'+a31_0x437b86[_0x51e9e4(0x31c)](_0x3eac55[_0x51e9e4(0x39c)]);await this[_0x51e9e4(0x37d)](_0x30b32a,_0x463201[_0x51e9e4(0x2c4)]);}else{if(_0x3eac55[_0x51e9e4(0x1d0)]&&_0x463201['sampleData']){const _0xfed5a3=a31_0x437b86[_0x51e9e4(0x358)](_0x51e9e4(0x294))+'\x20'+a31_0x437b86[_0x51e9e4(0x31c)](_0x3eac55[_0x51e9e4(0x1d0)]);await this[_0x51e9e4(0x37d)](_0xfed5a3,_0x463201['sampleData']);}else{if(_0x3eac55[_0x51e9e4(0x205)]&&_0x463201[_0x51e9e4(0x2c4)]){const _0x3cd03a=a31_0x437b86['dim']('Enriched:')+'\x20'+a31_0x437b86['bold'](_0x51e9e4(0x1ba));await this[_0x51e9e4(0x37d)](_0x3cd03a,_0x463201[_0x51e9e4(0x2c4)]);}else!_0x463201[_0x51e9e4(0x2c4)]&&console['error']('\x0aNo\x20sample\x20data\x20available');}}}if(_0x463201[_0x51e9e4(0x245)][_0x51e9e4(0x2e9)]>0x0){console['error']('─'[_0x51e9e4(0x1ea)](0x3c)),console[_0x51e9e4(0x2ef)]('\x0a'+a31_0x437b86[_0x51e9e4(0x1bb)]('Errors:'));for(const _0x54b566 of _0x463201['errors']){console[_0x51e9e4(0x2ef)]('\x20\x20'+a31_0x437b86[_0x51e9e4(0x1bb)]('•')+'\x20'+_0x54b566);}}}async[a31_0x33df17(0x37d)](_0x3bafe2,_0x4151c6){const _0x1ba5d0=a31_0x33df17;if(_0x4151c6['length']===0x0){console[_0x1ba5d0(0x2ef)]('\x0a'+_0x3bafe2),console[_0x1ba5d0(0x2ef)]('\x20\x20No\x20sample\x20data\x20available');return;}console[_0x1ba5d0(0x2ef)]('\x0a'+_0x3bafe2);const _0x429278=Object[_0x1ba5d0(0x2ad)](_0x4151c6[0x0])['map'](_0x4946ab=>({'name':_0x4946ab,'type':typeof _0x4151c6[0x0][_0x4946ab]===_0x1ba5d0(0x397)?_0x1ba5d0(0x1b0):'varchar'})),_0x28f3d7={'queryId':_0x1ba5d0(0x1b1),'columns':_0x429278,'data':_0x4151c6,'stats':{'state':_0x1ba5d0(0x38f),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x4151c6[_0x1ba5d0(0x2e9)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x39b602=formatAsTable(_0x28f3d7,_0x4151c6['length'],!![]);await writeOutput(_0x39b602,undefined,'table');}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{['name']=a31_0x33df17(0x37a);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x2a8);async['execute'](_0x18c641){const _0x57e068=a31_0x33df17,{options:_0x86de41,args:_0x15b124,tdx:_0x4781c0}=_0x18c641,_0x271f25=_0x86de41,_0x7fd9aa=_0x15b124[0x0]||_0x86de41[_0x57e068(0x2dd)];if(!_0x7fd9aa)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a'+_0x57e068(0x325)),0x1;const _0x3628bb=resolveYamlFile(_0x7fd9aa);if(existsSync(_0x3628bb)){_0x271f25[_0x57e068(0x1a0)]&&console[_0x57e068(0x2ef)]('Found\x20YAML\x20file:\x20'+_0x3628bb);let _0x6222a6;try{_0x6222a6=readFileSync(_0x3628bb,_0x57e068(0x2e6));}catch(_0x45b90d){const _0x1046f9=_0x45b90d instanceof Error?_0x45b90d[_0x57e068(0x367)]:String(_0x45b90d);return console[_0x57e068(0x2ef)]('Error\x20reading\x20file:\x20'+_0x1046f9),0x1;}const _0x5840ee=await withSpinner(_0x57e068(0x2d7),()=>_0x4781c0['segment'][_0x57e068(0x27d)](_0x6222a6),{'verbose':_0x271f25[_0x57e068(0x1a0)]}),_0x552383=_0x5840ee[_0x57e068(0x1a1)],{isNew:_0x2cc9e2,name:_0xb3edda,hasChanges:_0x5667cd,diffFormatted:_0x372c25}=_0x552383;if(_0x5667cd){_0x2cc9e2?console[_0x57e068(0x2ef)](_0x57e068(0x28e)+_0xb3edda+'\x27:'):console[_0x57e068(0x2ef)](_0x57e068(0x353)+_0xb3edda+'\x27:');console['error']('─'[_0x57e068(0x1ea)](0x3c)),console[_0x57e068(0x2ef)](_0x372c25),console['error']('─'[_0x57e068(0x1ea)](0x3c));const _0x1bdb5c=_0x2cc9e2?'Create\x20parent\x20segment\x20\x27'+_0xb3edda+_0x57e068(0x276):_0x57e068(0x31e)+_0xb3edda+'\x27\x20and\x20run\x20workflow?';if(!_0x271f25[_0x57e068(0x32e)]){if(!isInteractive())return console[_0x57e068(0x2ef)](a31_0x437b86['red'](_0x57e068(0x340)),_0x57e068(0x3ab)),console['error'](a31_0x437b86[_0x57e068(0x358)](_0x57e068(0x262))),0x1;const _0x20b961=await confirmKey(_0x1bdb5c);if(!_0x20b961)return console[_0x57e068(0x2ef)](a31_0x437b86[_0x57e068(0x2e5)](_0x57e068(0x20d))),0x1;}const _0x1cd9ef=_0x2cc9e2?_0x57e068(0x27c):_0x57e068(0x231);await withSpinner(_0x1cd9ef+_0x57e068(0x360)+_0xb3edda+_0x57e068(0x335),()=>_0x552383['apply'](),{'verbose':_0x271f25[_0x57e068(0x1a0)]});const _0x11f524=_0x2cc9e2?_0x57e068(0x1d2):_0x57e068(0x25d);console[_0x57e068(0x2ef)]('✔\x20'+_0x11f524+_0x57e068(0x360)+_0xb3edda+'\x27');}else console[_0x57e068(0x2ef)](_0x57e068(0x1d8)+_0xb3edda+_0x57e068(0x2ab));}const _0x10ed60=await withSpinner('Running\x20parent\x20segment\x20workflow\x20for\x20\x27'+_0x7fd9aa+_0x57e068(0x335),()=>_0x4781c0[_0x57e068(0x207)][_0x57e068(0x310)](_0x7fd9aa),{'verbose':_0x271f25[_0x57e068(0x1a0)]}),_0x3f9852=_0x10ed60['data'],_0x664073=getConsoleUrl(_0x271f25['site'],_0x57e068(0x267)+_0x3f9852[_0x57e068(0x21d)]+_0x57e068(0x37f)+_0x3f9852[_0x57e068(0x3be)]+_0x57e068(0x339)+_0x3f9852[_0x57e068(0x255)]);return console[_0x57e068(0x2ef)](_0x57e068(0x376)),console['error']('\x20\x20'+a31_0x437b86['dim'](_0x57e068(0x35f))+'\x20'+_0x3f9852[_0x57e068(0x2fd)]),console[_0x57e068(0x2ef)]('\x20\x20'+a31_0x437b86[_0x57e068(0x358)](_0x57e068(0x232))+'\x20'+_0x3f9852[_0x57e068(0x26f)]),console[_0x57e068(0x2ef)]('\x20\x20'+a31_0x437b86[_0x57e068(0x358)](_0x57e068(0x2fe))+'\x20'+_0x3f9852[_0x57e068(0x3be)]),console[_0x57e068(0x2ef)]('\x20\x20'+a31_0x437b86['dim'](_0x57e068(0x2d3))+'\x20'+_0x3f9852[_0x57e068(0x255)]),console[_0x57e068(0x2ef)]('\x20\x20'+_0x664073),console[_0x57e068(0x2ef)]('\x0a'+a31_0x437b86[_0x57e068(0x358)](_0x57e068(0x1d7))+_0x57e068(0x1a5)+_0x3f9852[_0x57e068(0x255)]+_0x57e068(0x1ce)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x33df17(0x296)]='segment:parent:fields';[a31_0x33df17(0x2fa)]=a31_0x33df17(0x1a4);async[a31_0x33df17(0x29e)](_0x6e6f74){const _0x4aff01=a31_0x33df17,{options:_0x527135,args:_0x27e501,tdx:_0xc9bc94}=_0x6e6f74,_0xa33d5c=_0x27e501[0x0]||_0x527135[_0x4aff01(0x2dd)];if(!_0xa33d5c)return showParentSegmentNotSetError(_0x4aff01(0x299)+_0x4aff01(0x1d5)),0x1;_0x527135[_0x4aff01(0x1a0)]&&(console[_0x4aff01(0x2ef)]('Site:\x20'+_0x527135[_0x4aff01(0x24d)]),console['error'](_0x4aff01(0x29f)+_0xa33d5c));const _0xade800=await withSpinner(_0x4aff01(0x2cc)+_0xa33d5c+_0x4aff01(0x335),()=>_0xc9bc94[_0x4aff01(0x207)]['listFields'](_0xa33d5c),{'verbose':_0x527135['verbose']}),_0x201e22=_0xade800[_0x4aff01(0x1a1)];console[_0x4aff01(0x2ef)](_0x4aff01(0x396)+_0x201e22[_0x4aff01(0x2e9)]+_0x4aff01(0x3a1)+(_0x201e22[_0x4aff01(0x2e9)]!==0x1?'s':''));if(_0x527135[_0x4aff01(0x2c3)]||_0x527135[_0x4aff01(0x33b)])return await handleSDKOutput(_0x201e22,_0x527135),0x0;return displayFieldsHumanReadable(_0x201e22,_0xa33d5c),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x2f0);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x2f7);async[a31_0x33df17(0x29e)](_0x1c6081){const _0x1d5139=a31_0x33df17,{options:_0x3e2a2d,args:_0x1261b9,tdx:_0x2003a2}=_0x1c6081,_0x4296e4=_0x3e2a2d,_0x2e459d=_0x1261b9[0x0]||_0x3e2a2d[_0x1d5139(0x2dd)];if(!_0x2e459d)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'+_0x1d5139(0x286)+'Options:\x0a'+'\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser'),0x1;_0x3e2a2d[_0x1d5139(0x1a0)]&&(console[_0x1d5139(0x2ef)](_0x1d5139(0x368)+_0x3e2a2d['site']),console[_0x1d5139(0x2ef)]('Parent\x20segment:\x20'+_0x2e459d));const _0x31d03d=await withSpinner(_0x1d5139(0x394)+_0x2e459d+_0x1d5139(0x335),()=>_0x2003a2['segment'][_0x1d5139(0x318)](_0x2e459d),{'verbose':_0x3e2a2d[_0x1d5139(0x1a0)]}),_0x2000d2=_0x31d03d[_0x1d5139(0x1a1)];if(_0x4296e4[_0x1d5139(0x37b)]){const _0x2f34dc=getConsoleNextUrl(_0x4296e4['site'],_0x1d5139(0x201)+_0x2000d2['id']);return console[_0x1d5139(0x2ef)](a31_0x437b86['green']('✔')+_0x1d5139(0x239)+a31_0x437b86['cyan'](_0x2f34dc)),openBrowser(_0x2f34dc),0x0;}return await handleSingleObjectOutput(_0x2000d2,_0x3e2a2d),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x33df17(0x296)]='segment:parent:desc';['description']=a31_0x33df17(0x21b);async['execute'](_0x3c0ce6){const _0x230a99=a31_0x33df17,{options:_0x309d4c,args:_0x4b54d1,tdx:_0x22575d}=_0x3c0ce6,_0x382d4c=_0x309d4c,_0x1837e9=_0x4b54d1[0x0]||_0x309d4c[_0x230a99(0x2dd)];if(!_0x1837e9)return showParentSegmentNotSetError(_0x230a99(0x266)+_0x230a99(0x2b5)+_0x230a99(0x238)+_0x230a99(0x374)),0x1;_0x309d4c[_0x230a99(0x1a0)]&&(console['error'](_0x230a99(0x368)+_0x309d4c[_0x230a99(0x24d)]),console[_0x230a99(0x2ef)]('Parent\x20segment:\x20'+_0x1837e9));const _0x53ad77=await withSpinner(_0x230a99(0x221)+_0x1837e9+_0x230a99(0x335),()=>_0x22575d[_0x230a99(0x207)][_0x230a99(0x1fc)](_0x1837e9),{'verbose':_0x309d4c['verbose']}),_0x156c9e=_0x53ad77['data'],_0x406b40=_0x22575d[_0x230a99(0x207)]['getOutputDatabaseName'](_0x156c9e);if(_0x382d4c['output']){const _0x2f41ac=await this[_0x230a99(0x265)](_0x3c0ce6,_0x1837e9,_0x156c9e,_0x406b40),_0x2d5227=this[_0x230a99(0x235)](_0x2f41ac);writeFileSync(_0x382d4c['output'],_0x2d5227);const _0x10f987=_0x2f41ac[_0x230a99(0x1b2)][_0x230a99(0x34d)][_0x230a99(0x2e9)]+_0x2f41ac[_0x230a99(0x308)][_0x230a99(0x1df)]((_0x3dbc9e,_0x2417b0)=>_0x3dbc9e+_0x2417b0[_0x230a99(0x34d)][_0x230a99(0x2e9)],0x0),_0x39c012=_0x2f41ac[_0x230a99(0x308)][_0x230a99(0x315)](_0x3cac7b=>_0x3cac7b[_0x230a99(0x34d)][_0x230a99(0x2e9)]===0x0)['length'];return console[_0x230a99(0x2c2)]('Schema\x20saved\x20to\x20'+_0x382d4c[_0x230a99(0x233)]),console[_0x230a99(0x2c2)](_0x230a99(0x22d)+_0x406b40),console[_0x230a99(0x2c2)](_0x230a99(0x2ba)+_0x2f41ac[_0x230a99(0x308)][_0x230a99(0x2e9)]+_0x230a99(0x322)),console[_0x230a99(0x2c2)](_0x230a99(0x25f)+_0x10f987+_0x230a99(0x2b6)),_0x39c012>0x0&&console[_0x230a99(0x2c2)](_0x230a99(0x263)+_0x39c012+_0x230a99(0x209)),0x0;}console[_0x230a99(0x2ef)]('\x0a'+a31_0x437b86[_0x230a99(0x31c)](_0x230a99(0x2ae))+'\x20'+a31_0x437b86['cyan'](_0x406b40));const _0x37d3e1=await withSpinner(_0x230a99(0x304),()=>_0x22575d[_0x230a99(0x207)][_0x230a99(0x334)](_0x156c9e),{'verbose':_0x309d4c[_0x230a99(0x1a0)]});console[_0x230a99(0x2ef)]('\x0a'+a31_0x437b86[_0x230a99(0x31c)](_0x230a99(0x1b2))+'\x20'+a31_0x437b86['dim']('('+_0x406b40+_0x230a99(0x390)));const _0x5c6408=await executeSchemaQuery(_0x37d3e1[_0x230a99(0x1a1)],_0x22575d,_0x309d4c);await handleQueryOutput(_0x5c6408,_0x309d4c);const _0x192f3c=await withSpinner(_0x230a99(0x214),()=>_0x22575d[_0x230a99(0x207)][_0x230a99(0x270)](_0x156c9e),{'verbose':_0x309d4c['verbose']});for(const _0x546672 of _0x192f3c[_0x230a99(0x1a1)]){const _0x3aafdb=_0x230a99(0x1f5)+_0x546672[_0x230a99(0x242)]()[_0x230a99(0x341)](/\s+/g,'_'),_0x2e0630=_0x230a99(0x25b)+_0x406b40+'.'+_0x3aafdb;console['error']('\x0a'+a31_0x437b86['bold'](_0x546672)+'\x20'+a31_0x437b86['dim']('('+_0x406b40+'.'+_0x3aafdb+')'));try{const _0x357b6e=await executeSchemaQuery(_0x2e0630,_0x22575d,_0x309d4c);await handleQueryOutput(_0x357b6e,_0x309d4c);}catch{console[_0x230a99(0x2ef)](a31_0x437b86[_0x230a99(0x2e5)](_0x230a99(0x370)));}}return 0x0;}async[a31_0x33df17(0x265)](_0x2a5d1d,_0x4a91fc,_0x26e889,_0x208b6c){const _0x4d6f47=a31_0x33df17,{options:_0xa17f45,tdx:_0x2ea480}=_0x2a5d1d,_0x3e822c=await withSpinner(_0x4d6f47(0x304),()=>_0x2ea480[_0x4d6f47(0x207)][_0x4d6f47(0x334)](_0x26e889),{'verbose':_0xa17f45[_0x4d6f47(0x1a0)]}),_0x2f5ca2=await executeSchemaQuery(_0x3e822c[_0x4d6f47(0x1a1)],_0x2ea480,_0xa17f45),_0x3b2ced=_0x2f5ca2['data'][_0x4d6f47(0x1f7)](_0x43e753=>({'name':_0x43e753[_0x4d6f47(0x22e)],'type':_0x43e753['column_type']})),_0x98d59a=await withSpinner(_0x4d6f47(0x214),()=>_0x2ea480[_0x4d6f47(0x207)]['getBehaviorNames'](_0x26e889),{'verbose':_0xa17f45[_0x4d6f47(0x1a0)]}),_0x235be1=[];for(const _0x45873b of _0x98d59a[_0x4d6f47(0x1a1)]){const _0x5c078f=_0x4d6f47(0x1f5)+_0x45873b[_0x4d6f47(0x242)]()['replace'](/\s+/g,'_'),_0xde6f78=_0x4d6f47(0x25b)+_0x208b6c+'.'+_0x5c078f;let _0x58ce88=[];try{const _0xdc2cbb=await executeSchemaQuery(_0xde6f78,_0x2ea480,_0xa17f45);_0x58ce88=_0xdc2cbb[_0x4d6f47(0x1a1)][_0x4d6f47(0x1f7)](_0x593900=>({'name':_0x593900[_0x4d6f47(0x22e)],'type':_0x593900[_0x4d6f47(0x27b)]}));}catch{}_0x235be1[_0x4d6f47(0x277)]({'table':_0x5c078f,'columns':_0x58ce88});}return{'database':_0x208b6c,'parent_segment':_0x4a91fc,'parent_id':_0x26e889,'customers':{'table':_0x4d6f47(0x1b2),'columns':_0x3b2ced},'behaviors':_0x235be1};}[a31_0x33df17(0x235)](_0x590514){const _0x3158d3=a31_0x33df17,_0x1bc592=_0x5cdf9b=>{const _0x585bee=a31_0x26a5;if(_0x5cdf9b[_0x585bee(0x2e9)]===0x0)return'[]';const _0x2e0cfc=_0x5cdf9b['map'](_0x12173d=>_0x585bee(0x1cd)+_0x12173d[_0x585bee(0x296)]+_0x585bee(0x1f2)+_0x12173d[_0x585bee(0x34e)]+'\x22\x20}');return'[\x0a'+_0x2e0cfc[_0x585bee(0x1d3)](',\x0a')+_0x585bee(0x1e0);},_0x24e8b0=_0x590514[_0x3158d3(0x308)][_0x3158d3(0x1f7)](_0x21f769=>{const _0x3fd4a3=_0x3158d3;return'\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x21f769[_0x3fd4a3(0x30d)]+_0x3fd4a3(0x26d)+_0x1bc592(_0x21f769[_0x3fd4a3(0x34d)])['replace'](/^/gm,'\x20\x20')[_0x3fd4a3(0x364)]()+_0x3fd4a3(0x302);})[_0x3158d3(0x1d3)](',\x0a');return _0x3158d3(0x223)+_0x590514[_0x3158d3(0x253)]+_0x3158d3(0x21c)+_0x590514[_0x3158d3(0x38d)]+_0x3158d3(0x222)+_0x590514['parent_id']+'\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x590514['customers'][_0x3158d3(0x30d)]+'\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20'+_0x1bc592(_0x590514[_0x3158d3(0x1b2)]['columns'])[_0x3158d3(0x341)](/^/gm,'\x20\x20')[_0x3158d3(0x364)]()+_0x3158d3(0x243)+_0x24e8b0+_0x3158d3(0x2c1);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x1d6);[a31_0x33df17(0x2fa)]='Get\x20SQL\x20query\x20for\x20parent\x20segment';async[a31_0x33df17(0x29e)](_0x4be00d){const _0x4dba22=a31_0x33df17,{options:_0x460adc,args:_0x5eeab5,tdx:_0x4e1f6c}=_0x4be00d,_0x33b824=_0x5eeab5[0x0]||_0x460adc['parentSegment'];if(!_0x33b824)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'+_0x4dba22(0x236)),0x1;_0x460adc[_0x4dba22(0x1a0)]&&(console[_0x4dba22(0x2ef)](_0x4dba22(0x368)+_0x460adc[_0x4dba22(0x24d)]),console[_0x4dba22(0x2ef)](_0x4dba22(0x29f)+_0x33b824));const _0x38da07=await withSpinner(_0x4dba22(0x221)+_0x33b824+_0x4dba22(0x335),()=>_0x4e1f6c[_0x4dba22(0x207)]['resolveParentId'](_0x33b824),{'verbose':_0x460adc['verbose']}),_0x5165cd=_0x38da07[_0x4dba22(0x1a1)],_0x1f3e61=await withSpinner(_0x4dba22(0x338)+_0x33b824+_0x4dba22(0x335),()=>_0x4e1f6c[_0x4dba22(0x207)][_0x4dba22(0x334)](_0x5165cd),{'verbose':_0x460adc[_0x4dba22(0x1a0)]}),_0x211a97=_0x1f3e61[_0x4dba22(0x1a1)];return _0x460adc[_0x4dba22(0x1f3)]===_0x4dba22(0x2c3)||_0x460adc['format']==='jsonl'?await handleSDKOutput([{'sql':_0x211a97}],_0x460adc):console[_0x4dba22(0x2c2)](_0x211a97),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']=a31_0x33df17(0x320);['description']='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a31_0x33df17(0x29e)](_0xa736e4){const _0x1f1a49=a31_0x33df17,{options:_0xa1fdb9,args:_0x518297,tdx:_0xae6d6f}=_0xa736e4,_0x1ec067=_0x518297[0x0]||_0xa1fdb9['parentSegment'];if(!_0x1ec067)return showParentSegmentNotSetError(_0x1f1a49(0x2cf)+_0x1f1a49(0x290)),0x1;_0xa1fdb9[_0x1f1a49(0x1a0)]&&(console[_0x1f1a49(0x2ef)](_0x1f1a49(0x368)+_0xa1fdb9['site']),console[_0x1f1a49(0x2ef)]('Parent\x20segment:\x20'+_0x1ec067));const _0x35d675=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1ec067+_0x1f1a49(0x335),()=>_0xae6d6f[_0x1f1a49(0x207)][_0x1f1a49(0x1fc)](_0x1ec067),{'verbose':_0xa1fdb9[_0x1f1a49(0x1a0)]}),_0x1795f5=_0x35d675[_0x1f1a49(0x1a1)],_0x46ca65=await withSpinner(_0x1f1a49(0x338)+_0x1ec067+'\x27...',()=>_0xae6d6f['segment']['getParentSQL'](_0x1795f5),{'verbose':_0xa1fdb9[_0x1f1a49(0x1a0)]});let _0x5e3051=_0x46ca65['data'];const _0x4a59b9=resolveLimit(_0xa1fdb9['limit'],DEFAULT_DISPLAY_LIMIT),_0x3b7d25=/\bLIMIT\s+\d+/i[_0x1f1a49(0x2d9)](_0x5e3051);!_0x3b7d25&&(_0x5e3051=_0x5e3051['trim']()[_0x1f1a49(0x341)](/;+$/,''),_0x5e3051=_0x1f1a49(0x26e)+_0x5e3051+_0x1f1a49(0x327)+_0x4a59b9);_0xa1fdb9['verbose']&&console[_0x1f1a49(0x2ef)](_0x1f1a49(0x330)+_0x5e3051);const _0x2356f6=await withProgressSpinner(_0x1f1a49(0x2e1),async _0x124ac4=>{const _0x135906=_0x1f1a49,_0x15eb99=await _0xae6d6f[_0x135906(0x2b3)][_0x135906(0x29e)](_0x5e3051,{'catalog':'td','schema':_0x135906(0x31a),'onJobId':_0x23d211=>{_0x124ac4['setJobId'](_0x23d211);}});return _0x15eb99;},{'verbose':_0xa1fdb9[_0x1f1a49(0x1a0)]}),_0x30c5dd=_0x2356f6[_0x1f1a49(0x1a1)],_0x1c3d52=_0x30c5dd[_0x1f1a49(0x23b)]?_0x1f1a49(0x25c)+_0x30c5dd[_0x1f1a49(0x23b)]+']':'';return console['error'](_0x1f1a49(0x1dc)+_0x30c5dd[_0x1f1a49(0x3b1)][_0x1f1a49(0x3a9)][_0x1f1a49(0x2d5)]()+'\x20rows\x20'+(_0x1f1a49(0x312)+formatElapsed(_0x30c5dd[_0x1f1a49(0x3b1)][_0x1f1a49(0x392)])+_0x1c3d52)),await handleQueryOutput(_0x30c5dd,_0xa1fdb9),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x298);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x247);async['execute'](_0x2e9c34){const _0x3c1c97=a31_0x33df17,{options:_0x50dfad,args:_0x39bd84,tdx:_0x229593}=_0x2e9c34,_0x20aebe=_0x39bd84[0x0],_0x5bf5c5=await withSpinner(_0x20aebe?'Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27'+_0x20aebe+_0x3c1c97(0x335):'Listing\x20RT-enabled\x20parent\x20segments...',()=>_0x229593[_0x3c1c97(0x3bb)][_0x3c1c97(0x288)](),{'verbose':_0x50dfad[_0x3c1c97(0x1a0)]});let _0x18315b=_0x5bf5c5['data']['filter'](_0x511cf2=>_0x511cf2['realtime_enabled']);if(_0x20aebe){const _0x25254b=_0x20aebe[_0x3c1c97(0x341)](/[.+^${}()|[\]\\]/g,_0x3c1c97(0x2bf))[_0x3c1c97(0x341)](/\*/g,'.*')[_0x3c1c97(0x341)](/\?/g,'.'),_0x545ad3=new RegExp('^'+_0x25254b+'$','i');_0x18315b=_0x18315b[_0x3c1c97(0x315)](_0x48bad7=>_0x545ad3[_0x3c1c97(0x2d9)](_0x48bad7['name']));}_0x18315b['sort']((_0x3a3d55,_0x2cc74d)=>_0x3a3d55[_0x3c1c97(0x296)][_0x3c1c97(0x35d)](_0x2cc74d[_0x3c1c97(0x296)])),console[_0x3c1c97(0x2ef)]('✔\x20Found\x20'+_0x18315b[_0x3c1c97(0x2e9)]+_0x3c1c97(0x1c1)+(_0x18315b[_0x3c1c97(0x2e9)]!==0x1?'s':''));const _0x5e481f=_0x5254c8=>{const _0x33d2d5=_0x3c1c97;return getConsoleNextUrl(_0x50dfad[_0x33d2d5(0x24d)],'/app/dw/parentSegments/'+_0x5254c8);};if(_0x50dfad['format']===_0x3c1c97(0x2c3)||_0x50dfad[_0x3c1c97(0x1f3)]===_0x3c1c97(0x33b)){const _0x4d4e57=_0x18315b[_0x3c1c97(0x1f7)](_0x565095=>({..._0x565095,'url':_0x5e481f(_0x565095['id'])}));await handleSDKOutput(_0x4d4e57,_0x50dfad);}else{if(_0x18315b['length']===0x0)console[_0x3c1c97(0x2c2)]('No\x20RT-enabled\x20parent\x20segments\x20found');else for(const _0x3b2f18 of _0x18315b){const _0x43ad11=_0x3b2f18[_0x3c1c97(0x1eb)]?a31_0x437b86[_0x3c1c97(0x358)]('\x20('+formatRows(_0x3b2f18[_0x3c1c97(0x1eb)])+')'):'',_0xcf08f3=hyperlink(_0x3b2f18[_0x3c1c97(0x296)],_0x5e481f(_0x3b2f18['id']));console[_0x3c1c97(0x2c2)]('⚡\x20'+_0xcf08f3+_0x43ad11);}}return 0x0;}}function a31_0x9269(){const _0x551de3=['tdx\x20ps\x20preview\x20','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','Error:\x20Token\x20ID\x20is\x20required','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','coveragePercent','Show\x20parent\x20segment\x20schema\x20(column\x20types)','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','workflowId','\x20Added\x20personalization\x20template\x20to\x20','.yaml','/\x20directories\x20exist.','Resolving\x20parent\x20segment\x20\x27','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','{\x0a\x20\x20\x22database\x22:\x20\x22','segment:parent:create','delete','\x20+\x20[','parent_segments','behaviorsFile','\x20\x20\x20\x20-\x20','Error:\x20--name\x20is\x20required','Personalization\x20service\x20description','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x20\x20Database:\x20','column_name','entryCriteria','token:','Updating','Status:','output','✔\x20Found\x20personalization\x20\x27','formatSchemaJson','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','Options:\x0a','\x20Opening\x20','segment:parent:validate','jobId','primaryKey','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','No\x20personalizations\x20configured','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','\x27\x20is\x20already\x20up\x20to\x20date','last_page_viewed','toLowerCase','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','\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','errors','✔\x20Created\x20personalization\x20service\x20\x27','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','patchPersonalization','start','all','displayRealtimeInfo','Error\x20parsing\x20YAML:\x20','site','identifier','2494053kZulfR','value','displayPreviewResults','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','database','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','workflowAttemptId','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','payload','Fetching\x20personalization\x20service\x20\x27','folderId','Error:\x20Service\x20ID\x20is\x20required','SELECT\x20*\x20FROM\x20','\x20[Job\x20ID:\x20','Updated','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x20\x20Columns:\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','customersWithEvents','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20\x20Note:\x20','\x20--attribute\x20\x22<name>\x22','collectSchema','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','/app/workflows/','Validating\x20configuration...','cyan','includeSensitive','Create\x20a\x20realtime\x20personalization\x20entity','createParent','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','SELECT\x20*\x20FROM\x20(\x0a','status','getBehaviorNames','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','\x20No\x20changes\x20-\x20','Delete\x20a\x20realtime\x20personalization','\x20RT\x20journey','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','\x27\x20and\x20run\x20workflow?','push','\x0aUsage:\x20tdx\x20ps\x20preview\x20','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','ps:rt:jn:pause','column_type','Creating','pushParentYaml','dirname','Options:','any','updatedAt','Deleting\x20token\x20\x27','rowCount','xdg-open','⚡\x20Enabled','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','previewParentYaml','list','My\x20Service','ignore','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','✔\x20Deleted\x20personalization\x20service\x20\x27','createToken','\x0aNew\x20parent\x20segment\x20\x27','ps:pz:list','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','ps:pz:service:list','green','\x27\x20for\x20service\x20\x27','Behavior:','schemaValid','name','✘\x20Failed\x20to\x20rename\x20directory:\x20','ps:rt:list','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','paused','ps:pz:init','(id:\x20','Columns:','execute','Parent\x20segment:\x20','178009uToUmw','30kdATPJ','stringify','\x20--behavior\x20\x22','stop','\x20\x201.\x20Edit\x20','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','allowedIps','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Updating\x20parent\x20segment\x20\x27','\x27\x20is\x20up\x20to\x20date','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','keys','Output\x20Database:','Events:','%)\x20','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','query','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','\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','\x20total','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','ps:pz:delete','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x20\x20Tables:\x201\x20customers\x20+\x20','Coverage:','addAttributes','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','\x5c$&','win32','\x0a\x20\x20]\x0a}\x0a','log','json','sampleData','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','\x20--interval\x20','\x20personalization','displayAttributesStats','<database>.<table>','Join:','ps:rt:jn:resume','Listing\x20fields\x20for\x20\x27','`\x20to\x20download\x20the\x20configuration\x20first','339449ElWlgA','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','Show\x20personalization\x20service\x20details','Attempt:','unref','toLocaleString','endsWith','Analyzing\x20changes...','Error:\x20--attribute\x20requires\x20a\x20name\x0a','test','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','tokens','parentSegment','foreignKey','\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','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','Executing\x20parent\x20segment\x20query...','\x20=\x20','file','RT\x202.0:','yellow','utf-8','sections','126yVcQJh','length','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','Output\x20file:\x20','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','No\x20parent\x20segments\x20found','\x20\x20\x20\x20\x20\x20','error','segment:parent:view','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','ps:pz:patch','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','some','text','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','Show\x20parent\x20segment\x20details','List\x20parent\x20segments','ID\x20Stitching:','description','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','customerGroupFile','audienceId','Session:','Attribute:','create','/\x20directory.\x0a','\x0a\x20\x20\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','Fetching\x20customers\x20schema...','Behaviors','run','displaySummary','behaviors','.yml','-1d','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','Error:','table','Error\x20reading\x20file:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','runParent','ps:pz:create','in\x20','Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a','darwin','filter','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','state','getParentFull','Name:\x20','information_schema','schemaError','bold','ps:rt:configuration_versions','Apply\x20changes\x20to\x20\x27','Patching\x20personalization\x20\x27','segment:parent:show','Fetching\x20sample\x20data...','\x20behaviors','Creating\x20token\x20\x27','allValid','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','displayMasterInfo','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','stageCount','Validate:','RT\x202.0\x20Validate:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','126vnAhwP','Creating\x20parent\x20segment\x20\x27','yes','audienceId:\x20','SQL\x20query:\x0a','timezone','customerGroup','Listing\x20RT\x20journeys\x20for\x20\x27','getParentSQL','\x27...','validateParentYaml','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','Fetching\x20SQL\x20for\x20\x27','/attempt/','sourceTableValid','jsonl','matchedCount','get','sourceTableError','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','\x0aError:','replace','relationships','\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','Deleting\x20personalization\x20service\x20\x27','Error:\x20File\x20not\x20found:\x20','\x20RT\x20configuration\x20is\x20valid','Master:','\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\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','entryCriteria:','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','✔\x20Retrieved\x20RT\x20configuration\x20version','columns','type','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','valid','\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','\x0aChanges\x20to\x20apply\x20to\x20\x27','✔\x20Created\x20parent\x20segment\x20\x27','\x20stage','Listing\x20parent\x20segments...','1778895PVtXzP','dim','\x20--enriched','\x0a⚠️\x20\x20Both\x20','Listing\x20personalizations\x20for\x20\x27','Creating\x20personalization\x20service\x20\x27','localeCompare','idStitching','Audience\x20ID:','\x20parent\x20segment\x20\x27','ps:pz:service:token:delete','id:\x20','\x27\x20with\x20ID:\x20','trim','personalization_services','sections:','message','Site:\x20','Errors:','true','Error:\x20Service\x20name\x20is\x20required','4gaqEMs','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','sort','includeSensitive:','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','\x20rows)','\x20true','\x20\x20\x20\x20','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','identifier:\x20','\x0a✔\x20Workflow\x20started','scheduleOption','public','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','segment:parent:run','web','createdAt','displaySampleData','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','/sessions/','Default','folder-segment','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','Error:\x20--database\x20and\x20--table\x20are\x20required','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','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','segment:parent:list','RT\x20Journey\x20ID:\x20','Pause\x20activations\x20in\x20an\x20RT\x20journey','resumeJourney','ps:pz:service:delete','parent_segment','open','FINISHED','.customers)','ps:pz:service:show','elapsedTimeMillis','Master\x20Table','Fetching\x20parent\x20segment\x20\x27','ps:pz:show','✔\x20Found\x20','number','ps:pz:service:token:create','payload:','segment:parent:push','ps:rt:jn:list','attribute','attributes','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','\x20configured','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','\x20field','Available\x20behaviors:','✔\x20Created\x20personalization\x20\x27','created:','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','getPersonalization','\x20--behavior\x20\x22<name>\x22','Join\x20on:','processedRows','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Source:','To\x20view\x20sample\x20data:','2692448glWYoW','324drMtHX','string','stats','personalizationServices','\x20parent\x20segment','joinKey','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','column','\x20to\x20configure\x20your\x20personalization\x20service','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','✔\x20Created\x20token\x20\x27','audienceId:','realtime','stitchingKeys','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','workflowSessionId','single','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','ps:rt:validate','verbose','data','split','4kASLZW','List\x20available\x20fields\x20for\x20segmentation','\x20tdx\x20wf\x20attempt\x20','/{name}.yml\x0a','/\x20→\x20','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','page_view','launched','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','platform','222295oPFkOe','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','double','preview','customers','\x20--attribute\x20\x22','null','keyEventCriteria','Error:\x20--behavior\x20requires\x20a\x20name\x0a','totalEvents','keyEventId:','\x0aChanges\x20to\x20\x27','Master\x20+\x20Attributes','red','listParents','pullParentYaml','Creating\x20personalization\x20\x27','\x20to\x20push\x20the\x20configuration','Updating\x20personalization\x20service\x20\x27','\x20RT-enabled\x20parent\x20segment','7yKVxep','pauseJourney','updateParent','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','\x20service(s)\x20configured','Show\x20a\x20specific\x20realtime\x20personalization','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','deleteToken','addBehaviors','allowed\x20IPs:','addAttributesFile','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','\x20kill','\x20(paused)','behavior','personalization','Created','join','attributesFile','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','segment:parent:sql','To\x20cancel:','✔\x20No\x20changes\x20-\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','events','tdx\x20ps\x20push\x20','✔\x20Query\x20completed:\x20Processed\x20','segment:parent:pull','Deleting\x20personalization\x20\x27','reduce','\x0a\x20\x20\x20\x20]','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','isDirectory','scheduleType','Listing\x20personalization\x20services\x20for\x20\x27','Rows:','interval','customerPercent','1299597PWGFaJ','repeat','population','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','label','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','Database:\x20','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','\x22,\x20\x22type\x22:\x20\x22','format','eventKind','behavior_','realtime:','map','displayPreviewHints','/\x20and\x20','✔\x20Updated\x20parent\x20segment\x20\x27','\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}','resolveParentId','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','Error:\x20Personalization\x20ID\x20is\x20required','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','Update\x20a\x20realtime\x20personalization\x20entity','/app/dw/parentSegments/','Finding\x20service\x20for\x20token...','\x20service','using\x20the\x20default\x20path:\x20','enriched','Table:\x20','segment','displayBehaviorsStats','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','\x20personalization\x20service','\x20\x20\x20\x20\x20\x20\x20\x20','No\x20personalization\x20services\x20configured','Aborted.','displayColumns','⚡\x20Not\x20enabled','toFixed','master','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','Fetching\x20behavior\x20list...'];a31_0x9269=function(){return _0x551de3;};return a31_0x9269();}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x3c1);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x1ed);async['execute'](_0x4e9c0d){const _0xdd2b51=a31_0x33df17,{options:_0x35f6ce,args:_0x1f3b0c,tdx:_0xf53c56}=_0x4e9c0d,_0x58719f=_0x1f3b0c[0x0]||_0x35f6ce[_0xdd2b51(0x2dd)];if(!_0x58719f)return showParentSegmentNotSetError(_0xdd2b51(0x275)+_0xdd2b51(0x303)),0x1;const _0x5618b9=resolveYamlFile(_0x58719f);if(!existsSync(_0x5618b9))return showFileNotFoundError(_0x5618b9,_0x58719f),0x1;let _0x12b7d3;try{_0x12b7d3=readFileSync(_0x5618b9,_0xdd2b51(0x2e6));}catch(_0x4bca04){const _0x489fa0=_0x4bca04 instanceof Error?_0x4bca04[_0xdd2b51(0x367)]:String(_0x4bca04);return console[_0xdd2b51(0x2ef)](_0xdd2b51(0x30e)+_0x489fa0),0x1;}const _0x589589=createCommandSpinner(a31_0x437b86[_0xdd2b51(0x358)]('Validating\x20RT\x20configuration...'),{'verbose':_0x35f6ce[_0xdd2b51(0x1a0)]});_0x589589[_0xdd2b51(0x249)]();const _0x15f180={'realtime':!![],'onProgress':_0x50f0af=>{const _0x54db51=_0xdd2b51;_0x589589[_0x54db51(0x2f5)]=formatProgressMessage(_0x50f0af);}};let _0x15ab51;try{_0x15ab51=await _0xf53c56[_0xdd2b51(0x207)][_0xdd2b51(0x336)](_0x12b7d3,_0x15f180),_0x589589[_0xdd2b51(0x2a4)]();}catch(_0xb7f442){_0x589589['stop']();throw _0xb7f442;}console[_0xdd2b51(0x2ef)]('\x0a'+a31_0x437b86[_0xdd2b51(0x31c)](_0xdd2b51(0x32a))+'\x20'+_0x15ab51[_0xdd2b51(0x296)]),console['error']('═'[_0xdd2b51(0x1ea)](0x3c)),displayRealtimeValidation(_0x15ab51),console[_0xdd2b51(0x2ef)]('─'[_0xdd2b51(0x1ea)](0x3c));if(_0x15ab51[_0xdd2b51(0x245)][_0xdd2b51(0x2e9)]>0x0){console[_0xdd2b51(0x2ef)]('\x0a'+a31_0x437b86[_0xdd2b51(0x1bb)](_0xdd2b51(0x369)));for(const _0x4ffbc5 of _0x15ab51['errors']){console[_0xdd2b51(0x2ef)]('\x20\x20'+a31_0x437b86[_0xdd2b51(0x1bb)]('•')+'\x20'+_0x4ffbc5);}}return _0x15ab51[_0xdd2b51(0x324)]&&console[_0xdd2b51(0x2ef)]('\x0a'+a31_0x437b86['green']('✔')+_0xdd2b51(0x346)),_0x15ab51[_0xdd2b51(0x324)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0x33df17(0x39b);[a31_0x33df17(0x2fa)]='List\x20RT\x20journeys';async[a31_0x33df17(0x29e)](_0x4ac9b6){const _0x2c94a8=a31_0x33df17,{options:_0x2b7755,args:_0x76fac,tdx:_0x17ee47}=_0x4ac9b6,_0x2af706=_0x76fac[0x0]||_0x2b7755['parentSegment'];if(!_0x2af706)return showParentSegmentNotSetError(_0x2c94a8(0x313)+_0x2c94a8(0x2df)),0x1;_0x2b7755[_0x2c94a8(0x1a0)]&&(console[_0x2c94a8(0x2ef)](_0x2c94a8(0x368)+_0x2b7755[_0x2c94a8(0x24d)]),console[_0x2c94a8(0x2ef)](_0x2c94a8(0x29f)+_0x2af706));const _0x2bf8b8=await withSpinner(_0x2c94a8(0x221)+_0x2af706+_0x2c94a8(0x335),()=>_0x17ee47[_0x2c94a8(0x207)][_0x2c94a8(0x1fc)](_0x2af706),{'verbose':_0x2b7755[_0x2c94a8(0x1a0)]}),_0x55bd0a=_0x2bf8b8[_0x2c94a8(0x1a1)],_0x91fadd=await withSpinner(_0x2c94a8(0x333)+_0x2af706+_0x2c94a8(0x335),()=>_0x17ee47[_0x2c94a8(0x3bb)]['listJourneys'](_0x55bd0a),{'verbose':_0x2b7755[_0x2c94a8(0x1a0)]}),_0x3385a4=_0x91fadd[_0x2c94a8(0x1a1)];console[_0x2c94a8(0x2ef)](_0x2c94a8(0x396)+_0x3385a4['length']+_0x2c94a8(0x274)+(_0x3385a4['length']!==0x1?'s':''));if(_0x2b7755['format']==='json'||_0x2b7755[_0x2c94a8(0x1f3)]===_0x2c94a8(0x33b))await handleSDKOutput(_0x3385a4,_0x2b7755);else{if(_0x3385a4[_0x2c94a8(0x2e9)]===0x0)console[_0x2c94a8(0x2c2)]('No\x20RT\x20journeys\x20found');else for(const _0x1a41be of _0x3385a4){const _0x58dc01=_0x1a41be['state']===_0x2c94a8(0x1aa)?'🚀':'📝',_0x451c55=_0x1a41be[_0x2c94a8(0x29a)]?a31_0x437b86[_0x2c94a8(0x2e5)]('\x20(paused)'):'',_0x1279cf=a31_0x437b86['dim']('\x20('+_0x1a41be[_0x2c94a8(0x328)]+_0x2c94a8(0x355)+(_0x1a41be[_0x2c94a8(0x328)]!==0x1?'s':'')+')');console[_0x2c94a8(0x2c2)](_0x58dc01+'\x20'+_0x1a41be['name']+_0x451c55+_0x1279cf);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x27a);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x38a);async[a31_0x33df17(0x29e)](_0x1ae08e){const _0x53283f=a31_0x33df17,{options:_0x4b8e72,args:_0x43baec,tdx:_0x280647}=_0x1ae08e,_0x29ee13=_0x43baec[0x0];if(!_0x29ee13)return console['error'](a31_0x437b86[_0x53283f(0x1bb)](_0x53283f(0x2f3))),console[_0x53283f(0x2ef)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console[_0x53283f(0x2ef)](a31_0x437b86['dim'](_0x53283f(0x30b))),0x1;_0x4b8e72[_0x53283f(0x1a0)]&&(console[_0x53283f(0x2ef)]('Site:\x20'+_0x4b8e72[_0x53283f(0x24d)]),console['error'](_0x53283f(0x389)+_0x29ee13));const _0x555173=await withSpinner(_0x53283f(0x1f1)+_0x29ee13+_0x53283f(0x335),()=>_0x280647[_0x53283f(0x3bb)][_0x53283f(0x1c3)](_0x29ee13),{'verbose':_0x4b8e72['verbose']}),_0x3fc16f=_0x555173[_0x53283f(0x1a1)];console[_0x53283f(0x2ef)](_0x53283f(0x1e2)+_0x3fc16f['name']+'\x27');if(_0x4b8e72[_0x53283f(0x1f3)]===_0x53283f(0x2c3)||_0x4b8e72['format']===_0x53283f(0x33b))await handleSDKOutput([_0x3fc16f],_0x4b8e72);else{const _0x131ef9=_0x3fc16f[_0x53283f(0x317)]===_0x53283f(0x1aa)?'🚀':'📝',_0x3a3339=_0x3fc16f[_0x53283f(0x29a)]?a31_0x437b86[_0x53283f(0x2e5)]('\x20(paused)'):'';console['log'](_0x131ef9+'\x20'+_0x3fc16f[_0x53283f(0x296)]+_0x3a3339);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x2cb);[a31_0x33df17(0x2fa)]='Resume\x20activations\x20in\x20an\x20RT\x20journey';async['execute'](_0x534f83){const _0x3d5099=a31_0x33df17,{options:_0x4ce517,args:_0x133355,tdx:_0x5503b7}=_0x534f83,_0x28e939=_0x133355[0x0];if(!_0x28e939)return console[_0x3d5099(0x2ef)](a31_0x437b86[_0x3d5099(0x1bb)](_0x3d5099(0x2f3))),console[_0x3d5099(0x2ef)](_0x3d5099(0x1af)),console[_0x3d5099(0x2ef)](a31_0x437b86[_0x3d5099(0x358)](_0x3d5099(0x30b))),0x1;_0x4ce517[_0x3d5099(0x1a0)]&&(console[_0x3d5099(0x2ef)](_0x3d5099(0x368)+_0x4ce517[_0x3d5099(0x24d)]),console['error'](_0x3d5099(0x389)+_0x28e939));const _0x5a6e13=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x28e939+_0x3d5099(0x335),()=>_0x5503b7[_0x3d5099(0x3bb)][_0x3d5099(0x38b)](_0x28e939),{'verbose':_0x4ce517[_0x3d5099(0x1a0)]}),_0x15a4e5=_0x5a6e13[_0x3d5099(0x1a1)];console[_0x3d5099(0x2ef)]('✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x15a4e5[_0x3d5099(0x296)]+'\x27');if(_0x4ce517['format']===_0x3d5099(0x2c3)||_0x4ce517['format']===_0x3d5099(0x33b))await handleSDKOutput([_0x15a4e5],_0x4ce517);else{const _0x2d868f=_0x15a4e5['state']===_0x3d5099(0x1aa)?'🚀':'📝',_0x5cf87e=_0x15a4e5[_0x3d5099(0x29a)]?a31_0x437b86[_0x3d5099(0x2e5)](_0x3d5099(0x1cf)):'';console[_0x3d5099(0x2c2)](_0x2d868f+'\x20'+_0x15a4e5[_0x3d5099(0x296)]+_0x5cf87e);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a31_0x33df17(0x31d);[a31_0x33df17(0x2fa)]='Get\x20current\x20RT\x20configuration\x20version\x20status';async[a31_0x33df17(0x29e)](_0x521388){const _0x4a2426=a31_0x33df17,{options:_0x1bc728,args:_0x16c47c,tdx:_0xf556c3}=_0x521388,_0x4130b7=_0x16c47c[0x0]||_0x1bc728['parentSegment'];if(!_0x4130b7)return showParentSegmentNotSetError(_0x4a2426(0x3a0)+'\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'),0x1;_0x1bc728[_0x4a2426(0x1a0)]&&(console['error'](_0x4a2426(0x368)+_0x1bc728[_0x4a2426(0x24d)]),console[_0x4a2426(0x2ef)](_0x4a2426(0x29f)+_0x4130b7));const _0xf407b=await withSpinner(_0x4a2426(0x221)+_0x4130b7+_0x4a2426(0x335),()=>_0xf556c3[_0x4a2426(0x207)]['resolveParentId'](_0x4130b7),{'verbose':_0x1bc728[_0x4a2426(0x1a0)]}),_0x3b78dc=_0xf407b[_0x4a2426(0x1a1)],_0x2f1c67=await withSpinner(_0x4a2426(0x271)+_0x4130b7+_0x4a2426(0x335),()=>_0xf556c3[_0x4a2426(0x3bb)]['getCurrentConfigVersion'](_0x3b78dc),{'verbose':_0x1bc728[_0x4a2426(0x1a0)]}),_0x1b8268=_0x2f1c67[_0x4a2426(0x1a1)];return console['error'](_0x4a2426(0x34c)),_0x1bc728['format']==='json'||_0x1bc728[_0x4a2426(0x1f3)]===_0x4a2426(0x33b)?await handleSDKOutput([_0x1b8268],_0x1bc728):(console[_0x4a2426(0x2c2)](_0x4a2426(0x362)+_0x1b8268['id']),console['log'](_0x4a2426(0x32f)+_0x1b8268['audienceId']),console[_0x4a2426(0x2c2)](_0x4a2426(0x375)+_0x1b8268[_0x4a2426(0x24e)]),console['log']('eventKind:\x20'+_0x1b8268[_0x4a2426(0x1f4)]),console['log']('status:\x20'+_0x1b8268['status'])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x291);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x2e0);async[a31_0x33df17(0x29e)](_0x21625f){const _0x13d510=a31_0x33df17,{options:_0xc74688,args:_0x396547,tdx:_0x1696c3}=_0x21625f,_0x32098d=_0x396547[0x0]||_0xc74688['parentSegment'];if(!_0x32098d)return showParentSegmentNotSetError(_0x13d510(0x2f1)+_0x13d510(0x343)),0x1;const _0x40c525=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x32098d+_0x13d510(0x335),()=>_0x1696c3[_0x13d510(0x207)][_0x13d510(0x1fc)](_0x32098d),{'verbose':_0xc74688[_0x13d510(0x1a0)]}),_0x20df41=_0x40c525['data'],_0x5c50bc=await withSpinner(_0x13d510(0x1e5)+_0x32098d+_0x13d510(0x335),()=>_0x1696c3[_0x13d510(0x1d1)][_0x13d510(0x288)](_0x20df41),{'verbose':_0xc74688[_0x13d510(0x1a0)]}),_0x4eb260=_0x5c50bc[_0x13d510(0x1a1)];console[_0x13d510(0x2ef)](_0x13d510(0x396)+_0x4eb260[_0x13d510(0x2e9)]+_0x13d510(0x20a)+(_0x4eb260[_0x13d510(0x2e9)]!==0x1?'s':''));if(_0xc74688['format']==='json'||_0xc74688[_0x13d510(0x1f3)]==='jsonl')await handleSDKOutput(_0x4eb260,_0xc74688);else{if(_0x4eb260[_0x13d510(0x2e9)]===0x0)console[_0x13d510(0x2c2)](_0x13d510(0x20c)),console[_0x13d510(0x2ef)](a31_0x437b86[_0x13d510(0x269)](_0x13d510(0x34b)));else for(const _0x4526db of _0x4eb260){console[_0x13d510(0x2c2)](a31_0x437b86['bold'](_0x4526db[_0x13d510(0x296)])+'\x20'+a31_0x437b86[_0x13d510(0x358)](_0x13d510(0x29c)+_0x4526db['id']+')'));_0x4526db[_0x13d510(0x2fa)]&&console['log']('\x20\x20'+a31_0x437b86[_0x13d510(0x358)](_0x4526db[_0x13d510(0x2fa)]));if(_0x4526db[_0x13d510(0x2dc)]&&_0x4526db[_0x13d510(0x2dc)][_0x13d510(0x2e9)]>0x0)for(const _0x2acb8b of _0x4526db['tokens']){const _0xc2b0be=_0x2acb8b[_0x13d510(0x2a7)]?.[_0x13d510(0x2e9)]?_0x2acb8b['allowedIps'][_0x13d510(0x1d3)](',\x20'):_0x13d510(0x280);console[_0x13d510(0x2c2)]('\x20\x20'+a31_0x437b86[_0x13d510(0x269)](_0x13d510(0x230))+'\x20'+_0x2acb8b[_0x13d510(0x296)]+'\x20'+a31_0x437b86[_0x13d510(0x358)](_0x13d510(0x29c)+_0x2acb8b['id']+')')),console[_0x13d510(0x2c2)](_0x13d510(0x373)+a31_0x437b86[_0x13d510(0x358)](_0x13d510(0x1cb))+'\x20'+_0xc2b0be);}else console['log']('\x20\x20'+a31_0x437b86['dim']('no\x20tokens\x20configured'));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']='ps:pz:service:create';[a31_0x33df17(0x2fa)]=a31_0x33df17(0x382);async[a31_0x33df17(0x29e)](_0x33b061){const _0xb940e=a31_0x33df17,{options:_0x2acfe0,args:_0x4009c1,tdx:_0x3d26b7}=_0x33b061,_0x444598=_0x2acfe0,_0x2510ac=_0x4009c1[0x0],_0x46583f=_0x4009c1[0x1]||_0x2acfe0[_0xb940e(0x2dd)];if(!_0x2510ac)return console[_0xb940e(0x2ef)](_0xb940e(0x36b)),console[_0xb940e(0x2ef)](_0xb940e(0x1ab)),console[_0xb940e(0x2ef)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x46583f)return showParentSegmentNotSetError(_0xb940e(0x219)+_0xb940e(0x2db)),0x1;const _0x52d032=await withSpinner(_0xb940e(0x221)+_0x46583f+_0xb940e(0x335),()=>_0x3d26b7[_0xb940e(0x207)][_0xb940e(0x1fc)](_0x46583f),{'verbose':_0x2acfe0[_0xb940e(0x1a0)]}),_0xa8c9db=_0x52d032[_0xb940e(0x1a1)],_0x40bc2d={'name':_0x2510ac,'description':_0x444598['description'],'public':_0x444598[_0xb940e(0x378)]},_0x3d06c6=await withSpinner(_0xb940e(0x35c)+_0x2510ac+'\x27...',()=>_0x3d26b7[_0xb940e(0x1d1)][_0xb940e(0x300)](_0xa8c9db,_0x40bc2d),{'verbose':_0x2acfe0[_0xb940e(0x1a0)]}),_0x422b2a=_0x3d06c6[_0xb940e(0x1a1)];return console[_0xb940e(0x2ef)](_0xb940e(0x246)+_0x422b2a[_0xb940e(0x296)]+_0xb940e(0x363)+_0x422b2a['id']),await handleSDKOutput([_0x422b2a],_0x2acfe0),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{['name']=a31_0x33df17(0x391);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x2d2);async[a31_0x33df17(0x29e)](_0x26d90c){const _0x253b05=a31_0x33df17,{options:_0x48256a,args:_0x4ece0c,tdx:_0x5a4ee0}=_0x26d90c,_0x4836a0=_0x4ece0c[0x0],_0x20d822=_0x4ece0c[0x1]||_0x48256a[_0x253b05(0x2dd)];if(!_0x4836a0)return console[_0x253b05(0x2ef)](_0x253b05(0x25a)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console[_0x253b05(0x2ef)](_0x253b05(0x349)),0x1;if(!_0x20d822)return showParentSegmentNotSetError(_0x253b05(0x2da)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x35742d=await withSpinner(_0x253b05(0x221)+_0x20d822+_0x253b05(0x335),()=>_0x5a4ee0['segment']['resolveParentId'](_0x20d822),{'verbose':_0x48256a['verbose']}),_0x50580d=_0x35742d['data'],_0x29f28a=await withSpinner(_0x253b05(0x258)+_0x4836a0+'\x27...',()=>_0x5a4ee0['personalization'][_0x253b05(0x33d)](_0x50580d,_0x4836a0),{'verbose':_0x48256a[_0x253b05(0x1a0)]}),_0xbfe574=_0x29f28a[_0x253b05(0x1a1)];if(_0x48256a[_0x253b05(0x2c3)]||_0x48256a[_0x253b05(0x33b)])await handleSDKOutput([_0xbfe574],_0x48256a);else{console['log'](a31_0x437b86[_0x253b05(0x31c)](_0xbfe574[_0x253b05(0x296)])+'\x20'+a31_0x437b86['dim'](_0x253b05(0x29c)+_0xbfe574['id']+')'));_0xbfe574[_0x253b05(0x2fa)]&&console[_0x253b05(0x2c2)]('\x20\x20'+a31_0x437b86[_0x253b05(0x358)](_0xbfe574[_0x253b05(0x2fa)]));console[_0x253b05(0x2c2)]('\x20\x20'+a31_0x437b86[_0x253b05(0x269)]('public:')+'\x20'+(_0xbfe574[_0x253b05(0x378)]?'yes':'no'));if(_0xbfe574['tokens']&&_0xbfe574[_0x253b05(0x2dc)][_0x253b05(0x2e9)]>0x0)for(const _0x1c6d8c of _0xbfe574['tokens']){const _0xa6a10d=_0x1c6d8c[_0x253b05(0x2a7)]?.['length']?_0x1c6d8c[_0x253b05(0x2a7)][_0x253b05(0x1d3)](',\x20'):_0x253b05(0x280);console[_0x253b05(0x2c2)]('\x20\x20'+a31_0x437b86[_0x253b05(0x269)]('token:')+'\x20'+_0x1c6d8c[_0x253b05(0x296)]+'\x20'+a31_0x437b86[_0x253b05(0x358)](_0x253b05(0x29c)+_0x1c6d8c['id']+')')),console[_0x253b05(0x2c2)](_0x253b05(0x373)+a31_0x437b86[_0x253b05(0x358)]('allowed\x20IPs:')+'\x20'+_0xa6a10d);}else console[_0x253b05(0x2c2)]('\x20\x20'+a31_0x437b86['dim']('no\x20tokens\x20configured'));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x38c);['description']='Delete\x20a\x20personalization\x20service';async[a31_0x33df17(0x29e)](_0x448dd2){const _0x36db96=a31_0x33df17,{options:_0x4c866a,args:_0x330668,tdx:_0x19ab39}=_0x448dd2,_0xaf2719=_0x330668[0x0],_0xe5b8e3=_0x330668[0x1]||_0x4c866a['parentSegment'];if(!_0xaf2719)return console[_0x36db96(0x2ef)](_0x36db96(0x25a)),console[_0x36db96(0x2ef)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]'),console[_0x36db96(0x2ef)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0xe5b8e3)return showParentSegmentNotSetError(_0x36db96(0x39e)+_0x36db96(0x30f)),0x1;const _0x23c897=await withSpinner(_0x36db96(0x221)+_0xe5b8e3+_0x36db96(0x335),()=>_0x19ab39['segment'][_0x36db96(0x1fc)](_0xe5b8e3),{'verbose':_0x4c866a[_0x36db96(0x1a0)]}),_0x206217=_0x23c897[_0x36db96(0x1a1)];return await withSpinner(_0x36db96(0x344)+_0xaf2719+_0x36db96(0x335),()=>_0x19ab39['personalization'][_0x36db96(0x225)](_0x206217,_0xaf2719),{'verbose':_0x4c866a['verbose']}),console[_0x36db96(0x2ef)](_0x36db96(0x28c)+_0xaf2719+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x33df17(0x296)]='ps:pz:service:update';['description']=a31_0x33df17(0x37e);async[a31_0x33df17(0x29e)](_0x1adc5d){const _0x5e5550=a31_0x33df17,{options:_0x40dac2,args:_0x870470,tdx:_0x101143}=_0x1adc5d,_0x26352a=_0x40dac2,_0x2b1bfd=_0x870470[0x0],_0x388c45=_0x870470[0x1]||_0x40dac2[_0x5e5550(0x2dd)];if(!_0x2b1bfd)return console['error'](_0x5e5550(0x25a)),console['error'](_0x5e5550(0x2fb)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x26352a['name'])return console[_0x5e5550(0x2ef)](_0x5e5550(0x22a)),console[_0x5e5550(0x2ef)](_0x5e5550(0x2fb)),0x1;if(!_0x388c45)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a'+_0x5e5550(0x3b8)),0x1;const _0x29ef48=await withSpinner(_0x5e5550(0x221)+_0x388c45+'\x27...',()=>_0x101143['segment'][_0x5e5550(0x1fc)](_0x388c45),{'verbose':_0x40dac2[_0x5e5550(0x1a0)]}),_0x164763=_0x29ef48[_0x5e5550(0x1a1)],_0x41ed1a={'name':_0x26352a[_0x5e5550(0x296)]};_0x26352a['description']!==undefined&&(_0x41ed1a[_0x5e5550(0x2fa)]=_0x26352a['description']);const _0x5cbf3d=await withSpinner(_0x5e5550(0x1c0)+_0x2b1bfd+_0x5e5550(0x335),()=>_0x101143[_0x5e5550(0x1d1)]['patch'](_0x164763,_0x2b1bfd,_0x41ed1a),{'verbose':_0x40dac2[_0x5e5550(0x1a0)]}),_0x362e70=_0x5cbf3d[_0x5e5550(0x1a1)];return console['error']('✔\x20Updated\x20personalization\x20service\x20\x27'+_0x362e70[_0x5e5550(0x296)]+'\x27'),await handleSDKOutput([_0x362e70],_0x40dac2),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x398);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x2be);async[a31_0x33df17(0x29e)](_0x461e06){const _0x144aec=a31_0x33df17,{options:_0xcb3798,args:_0x9ad04e,tdx:_0x5a59d4}=_0x461e06,_0x4fcf4d=_0xcb3798,_0x558417=_0x9ad04e[0x0],_0x20ec3a=_0x9ad04e[0x1],_0x5c7d87=_0x9ad04e[0x2]||_0xcb3798[_0x144aec(0x2dd)];if(!_0x558417)return console[_0x144aec(0x2ef)]('Error:\x20Token\x20name\x20is\x20required'),console[_0x144aec(0x2ef)](_0x144aec(0x256)),console[_0x144aec(0x2ef)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x20ec3a)return console[_0x144aec(0x2ef)](_0x144aec(0x25a)),console[_0x144aec(0x2ef)](_0x144aec(0x256)),console['error'](_0x144aec(0x32b)),0x1;if(!_0x5c7d87)return showParentSegmentNotSetError(_0x144aec(0x2b7)+_0x144aec(0x32b)),0x1;const _0x2692c7=await withSpinner(_0x144aec(0x221)+_0x5c7d87+_0x144aec(0x335),()=>_0x5a59d4[_0x144aec(0x207)][_0x144aec(0x1fc)](_0x5c7d87),{'verbose':_0xcb3798['verbose']}),_0x51081e=_0x2692c7[_0x144aec(0x1a1)],_0x113f92={'name':_0x558417};_0x4fcf4d[_0x144aec(0x2a7)]&&(_0x113f92[_0x144aec(0x2a7)]=_0x4fcf4d['allowedIps'][_0x144aec(0x1a2)](',')['map'](_0x2ac349=>_0x2ac349['trim']()));_0x4fcf4d[_0x144aec(0x2fa)]&&(_0x113f92[_0x144aec(0x2fa)]=_0x4fcf4d['description']);const _0x38faaa=await withSpinner(_0x144aec(0x323)+_0x558417+_0x144aec(0x293)+_0x20ec3a+_0x144aec(0x335),()=>_0x5a59d4[_0x144aec(0x1d1)][_0x144aec(0x28d)](_0x51081e,_0x20ec3a,_0x113f92),{'verbose':_0xcb3798[_0x144aec(0x1a0)]}),_0x1d4dae=_0x38faaa['data'];return console['error'](_0x144aec(0x3b9)+_0x1d4dae[_0x144aec(0x296)]+_0x144aec(0x363)+_0x1d4dae['id']),_0x1d4dae[_0x144aec(0x250)]&&(console['error'](a31_0x437b86[_0x144aec(0x2e5)](_0x144aec(0x23f))),console['error'](a31_0x437b86['cyan'](_0x1d4dae[_0x144aec(0x250)])),console[_0x144aec(0x2ef)]('')),await handleSDKOutput([_0x1d4dae],_0xcb3798),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x361);[a31_0x33df17(0x2fa)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async[a31_0x33df17(0x29e)](_0x299351){const _0x43138b=a31_0x33df17,{options:_0x390bdd,args:_0xc79f5c,tdx:_0x5a8d9b}=_0x299351,_0x6f2706=_0xc79f5c[0x0],_0x9c69c2=_0xc79f5c[0x1]||_0x390bdd['parentSegment'];if(!_0x6f2706)return console[_0x43138b(0x2ef)](_0x43138b(0x217)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x9c69c2)return showParentSegmentNotSetError(_0x43138b(0x379)+_0x43138b(0x254)),0x1;const _0x592f74=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x9c69c2+'\x27...',()=>_0x5a8d9b['segment'][_0x43138b(0x1fc)](_0x9c69c2),{'verbose':_0x390bdd[_0x43138b(0x1a0)]}),_0x51a58e=_0x592f74[_0x43138b(0x1a1)],_0x4c3b16=await withSpinner(_0x43138b(0x202),()=>_0x5a8d9b[_0x43138b(0x1d1)][_0x43138b(0x288)](_0x51a58e),{'verbose':_0x390bdd[_0x43138b(0x1a0)]}),_0x4858ad=_0x4c3b16[_0x43138b(0x1a1)];let _0x507e0b;for(const _0x4b1fa4 of _0x4858ad){if(_0x4b1fa4[_0x43138b(0x2dc)]?.[_0x43138b(0x2f4)](_0x46fb2b=>_0x46fb2b['id']===_0x6f2706)){_0x507e0b=_0x4b1fa4['id'];break;}}if(!_0x507e0b)return console[_0x43138b(0x2ef)]('Error:\x20Token\x20\x27'+_0x6f2706+'\x27\x20not\x20found\x20in\x20any\x20personalization\x20service'),0x1;const _0x109006=await withSpinner(_0x43138b(0x282)+_0x6f2706+_0x43138b(0x335),()=>_0x5a8d9b['personalization'][_0x43138b(0x1c9)](_0x51a58e,_0x507e0b,_0x6f2706),{'verbose':_0x390bdd[_0x43138b(0x1a0)]}),_0x35a3c4=_0x109006['data'];return console[_0x43138b(0x2ef)]('✔\x20Deleted\x20token\x20\x27'+(_0x35a3c4[_0x43138b(0x296)]||_0x6f2706)+'\x27'),await handleSDKOutput([_0x35a3c4],_0x390bdd),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x28f);['description']=a31_0x33df17(0x2a6);async[a31_0x33df17(0x29e)](_0x3c4abd){const _0x4b65b1=a31_0x33df17,{options:_0x21eb57,args:_0x846acb,tdx:_0x560c51}=_0x3c4abd,_0x12b4fd=_0x846acb[0x0]||_0x21eb57['parentSegment'];if(!_0x12b4fd)return showParentSegmentNotSetError(_0x4b65b1(0x387)+_0x4b65b1(0x352)),0x1;const _0x3de383=await withSpinner(_0x4b65b1(0x221)+_0x12b4fd+'\x27...',()=>_0x560c51[_0x4b65b1(0x207)][_0x4b65b1(0x1fc)](_0x12b4fd),{'verbose':_0x21eb57[_0x4b65b1(0x1a0)]}),_0x59c6ff=_0x3de383['data'],_0x67691e=await withSpinner(_0x4b65b1(0x35b)+_0x12b4fd+_0x4b65b1(0x335),()=>_0x560c51[_0x4b65b1(0x1d1)]['listPersonalizations'](_0x59c6ff),{'verbose':_0x21eb57[_0x4b65b1(0x1a0)]}),_0x100b6c=_0x67691e[_0x4b65b1(0x1a1)];console[_0x4b65b1(0x2ef)](_0x4b65b1(0x396)+_0x100b6c[_0x4b65b1(0x2e9)]+_0x4b65b1(0x2c7)+(_0x100b6c[_0x4b65b1(0x2e9)]!==0x1?'s':''));if(_0x21eb57[_0x4b65b1(0x1f3)]==='json'||_0x21eb57[_0x4b65b1(0x1f3)]==='jsonl')await handleSDKOutput(_0x100b6c,_0x21eb57);else{if(_0x100b6c[_0x4b65b1(0x2e9)]===0x0)console[_0x4b65b1(0x2c2)](_0x4b65b1(0x23e));else for(const _0x58bfed of _0x100b6c){console[_0x4b65b1(0x2c2)](a31_0x437b86[_0x4b65b1(0x31c)](_0x58bfed[_0x4b65b1(0x296)])+'\x20'+a31_0x437b86[_0x4b65b1(0x358)](_0x4b65b1(0x29c)+_0x58bfed['id']+')'));_0x58bfed['description']&&console[_0x4b65b1(0x2c2)]('\x20\x20'+a31_0x437b86[_0x4b65b1(0x358)](_0x58bfed[_0x4b65b1(0x2fa)]));const _0x56a192=_0x58bfed[_0x4b65b1(0x2e7)]?.['length']||0x0;console[_0x4b65b1(0x2c2)]('\x20\x20'+a31_0x437b86[_0x4b65b1(0x269)](_0x4b65b1(0x366))+'\x20'+_0x56a192);if(_0x58bfed['sections']&&_0x58bfed[_0x4b65b1(0x2e7)][_0x4b65b1(0x2e9)]>0x0)for(const _0xf04e13 of _0x58bfed['sections']){console[_0x4b65b1(0x2c2)](_0x4b65b1(0x229)+_0xf04e13[_0x4b65b1(0x296)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x395);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x1c7);async[a31_0x33df17(0x29e)](_0x1d5ed9){const _0x27c361=a31_0x33df17,{options:_0x44ab1d,args:_0x30cc59,tdx:_0x67bda2}=_0x1d5ed9,_0x1152e3=_0x30cc59[0x0];if(!_0x1152e3)return console['error']('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x27c361(0x2ef)]('Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>'),0x1;const _0x43df3b=await withSpinner('Getting\x20personalization\x20\x27'+_0x1152e3+'\x27...',()=>_0x67bda2[_0x27c361(0x1d1)][_0x27c361(0x3a6)](_0x1152e3),{'verbose':_0x44ab1d[_0x27c361(0x1a0)]}),_0x104943=_0x43df3b[_0x27c361(0x1a1)];console[_0x27c361(0x2ef)](_0x27c361(0x234)+_0x104943[_0x27c361(0x296)]+'\x27');if(_0x44ab1d[_0x27c361(0x1f3)]==='json'||_0x44ab1d[_0x27c361(0x1f3)]===_0x27c361(0x33b))await handleSDKOutput([_0x104943],_0x44ab1d);else{console['log'](a31_0x437b86['bold'](_0x104943[_0x27c361(0x296)])+'\x20'+a31_0x437b86[_0x27c361(0x358)](_0x27c361(0x29c)+_0x104943['id']+')'));_0x104943['description']&&console[_0x27c361(0x2c2)]('\x20\x20'+a31_0x437b86['dim'](_0x104943[_0x27c361(0x2fa)]));_0x104943[_0x27c361(0x2fd)]&&console[_0x27c361(0x2c2)]('\x20\x20'+a31_0x437b86[_0x27c361(0x269)](_0x27c361(0x3ba))+'\x20'+_0x104943[_0x27c361(0x2fd)]);console[_0x27c361(0x2c2)]('\x20\x20'+a31_0x437b86[_0x27c361(0x269)](_0x27c361(0x3a4))+'\x20'+_0x104943[_0x27c361(0x37c)]),console[_0x27c361(0x2c2)]('\x20\x20'+a31_0x437b86[_0x27c361(0x269)]('updated:')+'\x20'+_0x104943[_0x27c361(0x281)]);const _0x3dec31=_0x104943[_0x27c361(0x2e7)]?.[_0x27c361(0x2e9)]||0x0;console[_0x27c361(0x2c2)]('\x20\x20'+a31_0x437b86[_0x27c361(0x269)](_0x27c361(0x366))+'\x20'+_0x3dec31);if(_0x104943[_0x27c361(0x2e7)]&&_0x104943[_0x27c361(0x2e7)][_0x27c361(0x2e9)]>0x0)for(const _0x4f346a of _0x104943[_0x27c361(0x2e7)]){console['log'](_0x27c361(0x373)+a31_0x437b86[_0x27c361(0x31c)](_0x4f346a['name'])+'\x20'+a31_0x437b86[_0x27c361(0x358)](_0x27c361(0x29c)+_0x4f346a['id']+')')),_0x4f346a[_0x27c361(0x22f)]&&(console[_0x27c361(0x2c2)](_0x27c361(0x2ee)+a31_0x437b86[_0x27c361(0x269)](_0x27c361(0x34a))+'\x20'+_0x4f346a[_0x27c361(0x22f)][_0x27c361(0x296)]),_0x4f346a['entryCriteria']['keyEventCriteria']?.['keyEventId']&&console['log'](_0x27c361(0x20b)+a31_0x437b86['cyan'](_0x27c361(0x1b8))+'\x20'+_0x4f346a[_0x27c361(0x22f)][_0x27c361(0x1b5)]['keyEventId'])),_0x4f346a['payload']&&console[_0x27c361(0x2c2)]('\x20\x20\x20\x20\x20\x20'+a31_0x437b86['cyan'](_0x27c361(0x399))+'\x20'+JSON[_0x27c361(0x2a2)](_0x4f346a[_0x27c361(0x257)])),_0x4f346a[_0x27c361(0x26a)]&&console[_0x27c361(0x2c2)](_0x27c361(0x2ee)+a31_0x437b86[_0x27c361(0x269)](_0x27c361(0x36f))+_0x27c361(0x372));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x2b8);['description']=a31_0x33df17(0x273);async[a31_0x33df17(0x29e)](_0x43ba2f){const _0x5b1dad=a31_0x33df17,{options:_0x13f071,args:_0xb4140,tdx:_0x57ce96}=_0x43ba2f,_0x1368be=_0xb4140[0x0];if(!_0x1368be)return console[_0x5b1dad(0x2ef)](_0x5b1dad(0x1fe)),console[_0x5b1dad(0x2ef)](_0x5b1dad(0x1d9)),0x1;return await withSpinner(_0x5b1dad(0x1de)+_0x1368be+_0x5b1dad(0x335),()=>_0x57ce96[_0x5b1dad(0x1d1)]['deletePersonalization'](_0x1368be),{'verbose':_0x13f071[_0x5b1dad(0x1a0)]}),console[_0x5b1dad(0x2ef)]('✔\x20Deleted\x20personalization\x20\x27'+_0x1368be+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x311);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x26b);async['execute'](_0x118c59){const _0x2a915f=a31_0x33df17,{options:_0x3095e4,tdx:_0x1c7ed1}=_0x118c59,_0x3ef6ce=_0x3095e4;let _0x241ace;if(_0x3ef6ce['file']){_0x241ace=await loadJSON(_0x3ef6ce[_0x2a915f(0x2e3)],!![]);if(!_0x241ace[_0x2a915f(0x342)]?.['parentFolder'])return console[_0x2a915f(0x2ef)](_0x2a915f(0x1ef)),console[_0x2a915f(0x2ef)](_0x2a915f(0x2ea)),console[_0x2a915f(0x2ef)](_0x2a915f(0x1fb)),0x1;}else{if(!_0x3ef6ce[_0x2a915f(0x296)])return console[_0x2a915f(0x2ef)](_0x2a915f(0x2b9)),console[_0x2a915f(0x2ef)](_0x2a915f(0x23d)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x3ef6ce['description']===undefined)return console[_0x2a915f(0x2ef)](_0x2a915f(0x22c)),console[_0x2a915f(0x2ef)]('Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]'),console[_0x2a915f(0x2ef)](_0x2a915f(0x213)),0x1;if(_0x3ef6ce['folderId']===undefined)return console[_0x2a915f(0x2ef)](_0x2a915f(0x386)),console[_0x2a915f(0x2ef)](_0x2a915f(0x385)),0x1;let _0x5909db=_0x3ef6ce[_0x2a915f(0x2fd)];if(!_0x5909db&&_0x3095e4[_0x2a915f(0x2dd)]){const _0x11cab0=await withSpinner(_0x2a915f(0x221)+_0x3095e4[_0x2a915f(0x2dd)]+'\x27...',()=>_0x1c7ed1[_0x2a915f(0x207)][_0x2a915f(0x1fc)](_0x3095e4[_0x2a915f(0x2dd)]),{'verbose':_0x3095e4['verbose']});_0x5909db=_0x11cab0[_0x2a915f(0x1a1)];}let _0x5032f5;_0x3ef6ce[_0x2a915f(0x2e7)]&&(_0x5032f5=await loadJSON(_0x3ef6ce['sections'],![]));const _0x77d98a=_0x3ef6ce[_0x2a915f(0x259)]===_0x2a915f(0x1b4)?null:{'id':_0x3ef6ce[_0x2a915f(0x259)],'type':_0x2a915f(0x381)};_0x241ace={'attributes':{'name':_0x3ef6ce[_0x2a915f(0x296)],'description':_0x3ef6ce[_0x2a915f(0x2fa)]||null,..._0x5909db!==undefined&&{'audienceId':_0x5909db},..._0x5032f5!==undefined&&{'sections':_0x5032f5}},'relationships':{'parentFolder':{'data':_0x77d98a}}};}const _0x5502df=await withSpinner(_0x2a915f(0x1be)+(_0x241ace['attributes']?.['name']??'')+_0x2a915f(0x335),()=>_0x1c7ed1[_0x2a915f(0x1d1)]['createPersonalization'](_0x241ace),{'verbose':_0x3095e4[_0x2a915f(0x1a0)]}),_0xd9d0cf=_0x5502df[_0x2a915f(0x1a1)];return console[_0x2a915f(0x2ef)](_0x2a915f(0x3a3)+_0xd9d0cf['name']+_0x2a915f(0x363)+_0xd9d0cf['id']),await handleSDKOutput([_0xd9d0cf],_0x3095e4),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x33df17(0x296)]=a31_0x33df17(0x2f2);['description']=a31_0x33df17(0x200);async[a31_0x33df17(0x29e)](_0x522e9b){const _0xc339e2=a31_0x33df17,{options:_0x495120,args:_0x26bc9a}=_0x522e9b,_0x34b4be=_0x495120,_0x253bcd=_0x26bc9a[0x0];if(!_0x253bcd)return console[_0xc339e2(0x2ef)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0xc339e2(0x2ef)](_0xc339e2(0x350)),console[_0xc339e2(0x2ef)](_0xc339e2(0x1fd)),0x1;let _0x2833e7;if(_0x34b4be[_0xc339e2(0x2e3)])_0x2833e7=await loadJSON(_0x34b4be[_0xc339e2(0x2e3)],!![]);else{if(!_0x34b4be[_0xc339e2(0x296)])return console[_0xc339e2(0x2ef)](_0xc339e2(0x2b9)),console[_0xc339e2(0x2ef)](_0xc339e2(0x350)),0x1;if(_0x34b4be[_0xc339e2(0x2fa)]===undefined)return console[_0xc339e2(0x2ef)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0xc339e2(0x2ef)](_0xc339e2(0x350)),0x1;let _0x4500b1;_0x34b4be['sections']&&(_0x4500b1=await loadJSON(_0x34b4be[_0xc339e2(0x2e7)],![])),_0x2833e7={'attributes':{'name':_0x34b4be[_0xc339e2(0x296)],'description':_0x34b4be[_0xc339e2(0x2fa)]||null,..._0x4500b1!==undefined&&{'sections':_0x4500b1}}};}const {tdx:_0x5c114e}=_0x522e9b,_0x5db79c=await withSpinner(_0xc339e2(0x31f)+_0x253bcd+'\x27...',()=>_0x5c114e[_0xc339e2(0x1d1)][_0xc339e2(0x248)](_0x253bcd,_0x2833e7),{'verbose':_0x495120['verbose']}),_0x531c21=_0x5db79c[_0xc339e2(0x1a1)];return console[_0xc339e2(0x2ef)]('✔\x20Updated\x20personalization\x20\x27'+_0x531c21[_0xc339e2(0x296)]+'\x27\x20(id:\x20'+_0x531c21['id']+')'),await handleSDKOutput([_0x531c21],_0x495120),0x0;}}function a31_0x26a5(_0x617322,_0x36147f){_0x617322=_0x617322-0x1a0;const _0x92691c=a31_0x9269();let _0x26a506=_0x92691c[_0x617322];return _0x26a506;}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']=a31_0x33df17(0x29b);[a31_0x33df17(0x2fa)]=a31_0x33df17(0x2bd);async[a31_0x33df17(0x29e)](_0x11e9dc){const _0x3eedc0=a31_0x33df17,{options:_0x42e444,args:_0x4dd821}=_0x11e9dc,_0x20ba74=_0x4dd821[0x0]||_0x42e444[_0x3eedc0(0x2dd)];if(!_0x20ba74)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'+_0x3eedc0(0x244)),0x1;const _0x24f69a=resolveYamlFile(_0x20ba74);if(!existsSync(_0x24f69a))return showFileNotFoundError(_0x24f69a,_0x20ba74),0x1;let _0x39e058;try{_0x39e058=readFileSync(_0x24f69a,'utf-8');}catch(_0x3390fa){const _0x265489=_0x3390fa instanceof Error?_0x3390fa[_0x3eedc0(0x367)]:String(_0x3390fa);return console[_0x3eedc0(0x2ef)](_0x3eedc0(0x30e)+_0x265489),0x1;}let _0x471500;try{_0x471500=parseDef(_0x39e058);}catch(_0x4ed314){const _0x2c02f0=_0x4ed314 instanceof Error?_0x4ed314[_0x3eedc0(0x367)]:String(_0x4ed314);return console['error'](a31_0x437b86[_0x3eedc0(0x1bb)](_0x3eedc0(0x24c)+_0x2c02f0)),0x1;}if(_0x471500[_0x3eedc0(0x365)]&&_0x471500[_0x3eedc0(0x365)][_0x3eedc0(0x2e9)]>0x0)return console[_0x3eedc0(0x2ef)](a31_0x437b86[_0x3eedc0(0x2e5)](_0x3eedc0(0x36d)+_0x24f69a)),console['error'](a31_0x437b86[_0x3eedc0(0x358)]('\x20\x20\x20'+_0x471500[_0x3eedc0(0x365)][_0x3eedc0(0x2e9)]+_0x3eedc0(0x1c6))),0x1;!_0x471500['realtime']&&(_0x471500[_0x3eedc0(0x3bb)]={'events':[{'name':'page_view','source_table':_0x3eedc0(0x2c9)}],'attributes':[{'name':_0x3eedc0(0x241),'type':_0x3eedc0(0x3bf)}],'id_stitching':{'primary_key':_0x471500[_0x3eedc0(0x211)][_0x3eedc0(0x30d)]==='customers'?'td_client_id':'user_id'}});_0x471500[_0x3eedc0(0x365)]=[{'name':_0x3eedc0(0x289),'description':_0x3eedc0(0x22b),'trigger_event':_0x3eedc0(0x1a9),'sections':[{'name':_0x3eedc0(0x380),'criteria':_0x3eedc0(0x36a),'attributes':[_0x3eedc0(0x241)]}]}];const _0x10255e=serializeDef(_0x471500);return writeFileSync(_0x24f69a,_0x10255e,_0x3eedc0(0x2e6)),console[_0x3eedc0(0x2ef)](a31_0x437b86[_0x3eedc0(0x292)]('✔')+_0x3eedc0(0x21e)+a31_0x437b86['cyan'](_0x24f69a)),(!_0x471500[_0x3eedc0(0x3bb)]||_0x39e058['indexOf'](_0x3eedc0(0x1f6))===-0x1)&&console[_0x3eedc0(0x2ef)](a31_0x437b86[_0x3eedc0(0x292)]('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console[_0x3eedc0(0x2ef)]('\x0a'+a31_0x437b86['dim']('Next\x20steps:')),console[_0x3eedc0(0x2ef)](_0x3eedc0(0x2a5)+_0x24f69a+_0x3eedc0(0x3b7)),console[_0x3eedc0(0x2ef)]('\x20\x202.\x20Run\x20'+a31_0x437b86[_0x3eedc0(0x358)](_0x3eedc0(0x1db)+_0x20ba74)+_0x3eedc0(0x1bf)),0x0;}}
|